diffing 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +50 -42
- package/dist/client/assets/{angular-html-BVFBJbbm.js → angular-html-DIKVmS-w.js} +1 -1
- package/dist/client/assets/{angular-ts-CbJB4bNJ.js → angular-ts-DK13mfBQ.js} +1 -1
- package/dist/client/assets/{apl-MzqTwOQT.js → apl-NVZUxqwo.js} +1 -1
- package/dist/client/assets/{arc-DkYz3FVO.js → arc-kijUuucY.js} +1 -1
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-CU3k1-_g.js → architectureDiagram-3BPJPVTR-Dup-CzBS.js} +1 -1
- package/dist/client/assets/{astro-DDblGxmh.js → astro-RPdCumat.js} +1 -1
- package/dist/client/assets/{blade-DlgT3iuV.js → blade-_ubz_KMD.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-1lwkHRY_.js → blockDiagram-GPEHLZMM-Cl0-G1MY.js} +1 -1
- package/dist/client/assets/{c-BL61MF4M.js → c-IEKcSTtW.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-BPBjnNM8.js → c4Diagram-AAUBKEIU-C3T6FV-K.js} +1 -1
- package/dist/client/assets/channel-CpWSvbvQ.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-C_SASPYW.js → chunk-2J33WTMH-B5MFxFjX.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-CTcbOBts.js → chunk-3OPIFGDE-DWxCOZgI.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-BipHnfY4.js → chunk-4BX2VUAB-DWdovlBC.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BzJYLlnc.js → chunk-55IACEB6-CFSaZijP.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-CorupEGf.js → chunk-5ZQYHXKU-BH_cLkIj.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-Cqjzb4FZ.js → chunk-727SXJPM-BbsJC2PT.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-DcaAmtSe.js → chunk-AQP2D5EJ-tFAP6fC1.js} +1 -1
- package/dist/client/assets/{chunk-BSJP7CBP-CiBjSxwv.js → chunk-BSJP7CBP-BGuhsdwy.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-BTbf6qN3.js → chunk-CSCIHK7Q-DXSJWhsY.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-BA8_ZS2e.js → chunk-FMBD7UC4-6vBylg_I.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-ChcT2GOp.js → chunk-KSCS5N6A-C7iBFsUg.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-BjzpE0xm.js → chunk-L5ZTLDWV-CRU3nvaK.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-Bu0azrf_.js → chunk-LZXEDZCA-6ppA-_4h.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-Co55RNsd.js → chunk-ND2GUHAM-D1cTmgHe.js} +1 -1
- package/dist/client/assets/{chunk-NZK2D7GU-CtPYeO8_.js → chunk-NZK2D7GU-CpUab6v7.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-CzRKb_Hn.js → chunk-O5CBEL6O-cDxBycWe.js} +1 -1
- package/dist/client/assets/chunk-QZHKN3VN-HhMIifwl.js +1 -0
- package/dist/client/assets/chunk-WU5MYG2G-CvIzXEms.js +1 -0
- package/dist/client/assets/{chunk-XPW4576I-CYH9wUok.js → chunk-XPW4576I-CI9GEEdy.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DFu-dNVy.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-D7Xcgo6q.js +1 -0
- package/dist/client/assets/{cobol-D37UDAkO.js → cobol-BVhbHJgp.js} +1 -1
- package/dist/client/assets/{coffee-NCjhDwWZ.js → coffee-gY6asS_B.js} +1 -1
- package/dist/client/assets/{cose-bilkent-S5V4N54A-B8RnQ-yF.js → cose-bilkent-S5V4N54A-BOs7zxZa.js} +1 -1
- package/dist/client/assets/{cpp-CQUNgUz4.js → cpp-el3R6exS.js} +1 -1
- package/dist/client/assets/{crystal-DGHLJtZ_.js → crystal-D2_0btIo.js} +1 -1
- package/dist/client/assets/{css-xCgEbp_3.js → css-DtPe7dg4.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-CvmQMXPT.js → dagre-BM42HDAG-CR_0cBOz.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-wIyWTlXo.js → diagram-2AECGRRQ-D9um0wp2.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-BLMMWtHj.js → diagram-5GNKFQAL-Dx0TEfBJ.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-Duz_hHky.js → diagram-KO2AKTUF-DjBHOuUD.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-CftQIrJ1.js → diagram-LMA3HP47-CK2MO5Gx.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-7odjt2qL.js → diagram-OG6HWLK6-CANQancN.js} +1 -1
- package/dist/client/assets/{dist-PmPhNea3.js → dist-DGlwcsQQ.js} +1 -1
- package/dist/client/assets/{edge-C6_UFojU.js → edge-Ch_PYBsB.js} +1 -1
- package/dist/client/assets/{elixir-B12MoaTY.js → elixir-DEJrJATq.js} +1 -1
- package/dist/client/assets/{elm-C80KxC_R.js → elm-Brlko4-d.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-DOeyf617.js → erDiagram-TEJ5UH35-Dnfrs6yk.js} +1 -1
- package/dist/client/assets/{erb-DqelkF7l.js → erb-DQPphNua.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-BJX7W8r0.js → flowDiagram-I6XJVG4X-BNMdFtjG.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-CFWnCca0.js → ganttDiagram-6RSMTGT7-X-fPXz_A.js} +1 -1
- package/dist/client/assets/{git-rebase-7L4r_tbx.js → git-rebase-BpS915SI.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-oNErRHPR.js → gitGraphDiagram-PVQCEYII-CRN_dRXM.js} +1 -1
- package/dist/client/assets/{glimmer-js-8OQAbTGs.js → glimmer-js-DZDngVuD.js} +1 -1
- package/dist/client/assets/{glimmer-ts-3IyQiCHC.js → glimmer-ts-DKNjJvyp.js} +1 -1
- package/dist/client/assets/{glsl-Bi_bzGJK.js → glsl-C-Y1tHoU.js} +1 -1
- package/dist/client/assets/{graphql-YcGxsBfT.js → graphql-DYVBNazO.js} +1 -1
- package/dist/client/assets/{hack-C9IpUqi6.js → hack-DewKAtLe.js} +1 -1
- package/dist/client/assets/{haml-YWDwVGeX.js → haml-CIA_AeXu.js} +1 -1
- package/dist/client/assets/{handlebars-zyG7ocdI.js → handlebars-Bade6JXX.js} +1 -1
- package/dist/client/assets/{html-CHYhpzfH.js → html-C4hhbuGp.js} +1 -1
- package/dist/client/assets/{html-derivative-BhgSILdB.js → html-derivative-BXfztBtv.js} +1 -1
- package/dist/client/assets/{http-BPv6bUpq.js → http-Cq90-CTl.js} +1 -1
- package/dist/client/assets/{hurl-CpohSten.js → hurl-DklQHYoa.js} +1 -1
- package/dist/client/assets/{index-BIrpcT6-.js → index-j9gqGQit.js} +94 -94
- package/dist/client/assets/{infoDiagram-5YYISTIA-D1xM4RZP.js → infoDiagram-5YYISTIA-Ht-AcvP4.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-7DsxXa1L.js → ishikawaDiagram-YF4QCWOH-k_l70iFb.js} +1 -1
- package/dist/client/assets/{java-Bt4sAY2m.js → java-BMUwLm1h.js} +1 -1
- package/dist/client/assets/{javascript-DZjI42QZ.js → javascript-B8nPCUVp.js} +1 -1
- package/dist/client/assets/{jinja-D2zTW07t.js → jinja-CkxiRcB3.js} +1 -1
- package/dist/client/assets/{jison-Dz-ndIM5.js → jison-CFnN5uQs.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-C_A1TmoL.js → journeyDiagram-JHISSGLW-C98PUC9Y.js} +1 -1
- package/dist/client/assets/{json-Ykn4LhOH.js → json-B7HNnjIx.js} +1 -1
- package/dist/client/assets/{jsx-Ce8SKNSt.js → jsx-BfVPuW3i.js} +1 -1
- package/dist/client/assets/{julia-DlfibiGU.js → julia-Bj0ETGjT.js} +1 -1
- package/dist/client/assets/{just-CT2PIeY2.js → just-CqIe_c9k.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-ccKLE8Df.js → kanban-definition-UN3LZRKU-BE-uvH7w.js} +1 -1
- package/dist/client/assets/{latex-Dkfo8_p4.js → latex-Cvy8E64e.js} +1 -1
- package/dist/client/assets/{line-BbqJI7bZ.js → line-BpooNUgm.js} +1 -1
- package/dist/client/assets/{linear-B7c0dSOq.js → linear-CM6ZoyCp.js} +1 -1
- package/dist/client/assets/{liquid-dWmg5egV.js → liquid-x09l8QqE.js} +1 -1
- package/dist/client/assets/{lua-6hNhLpj8.js → lua-BSlDLjt5.js} +1 -1
- package/dist/client/assets/{marko-DTVuQVoJ.js → marko-CoNMQlTn.js} +1 -1
- package/dist/client/assets/{mdc-LbJVW6cj.js → mdc-BSzVESPu.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-f-eKVdX9.js → mermaid-parser.core-BDXJMxHu.js} +1 -1
- package/dist/client/assets/{mermaid.core-ClMOD6O3.js → mermaid.core-Dw-_vXTc.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-vaLTR09L.js → mindmap-definition-RKZ34NQL-BTxGT8rM.js} +1 -1
- package/dist/client/assets/{nginx-BvMTgdwH.js → nginx-CBhJTj0i.js} +1 -1
- package/dist/client/assets/{nim-BdGYhiTu.js → nim-CtHbOBlO.js} +1 -1
- package/dist/client/assets/{perl-DamEOAxn.js → perl-DLMzG3tu.js} +1 -1
- package/dist/client/assets/{php-DtubpAAy.js → php-KomVR3Hz.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-yuTkGKaM.js → pieDiagram-4H26LBE5-BBUObAJW.js} +1 -1
- package/dist/client/assets/{pug-CMYtl1BN.js → pug-T4SRLx8P.js} +1 -1
- package/dist/client/assets/{qml-D76DCV4U.js → qml-DJdSRUmU.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Db00tlGp.js → quadrantDiagram-W4KKPZXB-B7vvauZv.js} +1 -1
- package/dist/client/assets/{r-gMTLVmYP.js → r-CwuTg9lK.js} +1 -1
- package/dist/client/assets/{razor-1oOg77PO.js → razor-Ch4dgsGY.js} +1 -1
- package/dist/client/assets/{regexp-BJzbycG8.js → regexp-D2GTwJE0.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-CwCGFaVe.js → requirementDiagram-4Y6WPE33-DpcNiR3Y.js} +1 -1
- package/dist/client/assets/{rst-Be7RtxcU.js → rst-D78f0DyR.js} +1 -1
- package/dist/client/assets/{ruby-oyNd3WUZ.js → ruby-BUcw6ITs.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-D78nH-eA.js → sankeyDiagram-5OEKKPKP-ChzSQD2O.js} +1 -1
- package/dist/client/assets/{sas-Bx8dCxcK.js → sas-DoT2JDsj.js} +1 -1
- package/dist/client/assets/{scss-DzZEPh1d.js → scss-B6G_d-6b.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-CEy9mjHg.js → sequenceDiagram-3UESZ5HK-CzkdL8s7.js} +1 -1
- package/dist/client/assets/{shellscript-t9s0AoBc.js → shellscript-DI252Bga.js} +1 -1
- package/dist/client/assets/{shellsession-NczJO6Io.js → shellsession-BuO_s8FQ.js} +1 -1
- package/dist/client/assets/{soy-Dl6InSac.js → soy-DZTZJTEE.js} +1 -1
- package/dist/client/assets/{sql-DXkZEc28.js → sql-C4isoJr_.js} +1 -1
- package/dist/client/assets/{src-DCIMHd9M.js → src-BMvz5HE8.js} +1 -1
- package/dist/client/assets/{stata-DmpUDP7M.js → stata-Dhu6qITh.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-Cz0qtN4R.js → stateDiagram-AJRCARHV-DvYcrdap.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-D5igY81I.js +1 -0
- package/dist/client/assets/{surrealql-BAZp4tA6.js → surrealql-CSDpq5j3.js} +1 -1
- package/dist/client/assets/{svelte-DXBMAgu7.js → svelte-C4ITAvxr.js} +1 -1
- package/dist/client/assets/{templ-CF-yfRM7.js → templ-BTgKA9-7.js} +1 -1
- package/dist/client/assets/{tex-D5tGX-j9.js → tex-Dg4N9ndP.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-B6_u5aFI.js → timeline-definition-PNZ67QCA-Djt5Lwk2.js} +1 -1
- package/dist/client/assets/{ts-tags-DWMVxoO1.js → ts-tags-BufYnYos.js} +1 -1
- package/dist/client/assets/{tsx-C6QVlWvX.js → tsx-DmkFP0sw.js} +1 -1
- package/dist/client/assets/{twig-DKFN0Lvm.js → twig-BJv_IWYK.js} +1 -1
- package/dist/client/assets/{typescript-DVfrnfSW.js → typescript-BKp05Qme.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-C_-TQFos.js → vennDiagram-CIIHVFJN-DDVADTIa.js} +1 -1
- package/dist/client/assets/{vue-BCLQ-g1T.js → vue-BsHXCXzh.js} +1 -1
- package/dist/client/assets/{vue-html-Ddr0JbE-.js → vue-html-CCsH-lmo.js} +1 -1
- package/dist/client/assets/{vue-vine-CX36RUs5.js → vue-vine-B5P1JXxo.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-BJQg7Pb-.js → wardleyDiagram-YWT4CUSO-yeVKWvtX.js} +1 -1
- package/dist/client/assets/{xml-FnMA1W8C.js → xml-CFkhYff0.js} +1 -1
- package/dist/client/assets/{xsl-CLduN3zs.js → xsl-Dc5XRzm6.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-1Ux8tle4.js → xychartDiagram-2RQKCTM6--8Ik-9v0.js} +1 -1
- package/dist/client/assets/{yaml-B6hNfHm7.js → yaml-BTCCxCxi.js} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
- package/dist/client/assets/channel-BX6tZjG6.js +0 -1
- package/dist/client/assets/chunk-QZHKN3VN-BCSN705V.js +0 -1
- package/dist/client/assets/chunk-WU5MYG2G-xPWDnrji.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-7xfBUC5E.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CFM5yYso.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Dye5cILT.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DIKVmS-w.js","assets/html-C4hhbuGp.js","assets/css-DtPe7dg4.js","assets/javascript-B8nPCUVp.js","assets/angular-ts-DK13mfBQ.js","assets/scss-B6G_d-6b.js","assets/apl-NVZUxqwo.js","assets/json-B7HNnjIx.js","assets/xml-CFkhYff0.js","assets/java-BMUwLm1h.js","assets/astro-RPdCumat.js","assets/postcss-BHCm7Qae.js","assets/tsx-DmkFP0sw.js","assets/typescript-BKp05Qme.js","assets/blade-_ubz_KMD.js","assets/html-derivative-BXfztBtv.js","assets/sql-C4isoJr_.js","assets/bsl-BrHd4RA2.js","assets/sdbl-AL_m-RO_.js","assets/cairo-BDZ6TRZS.js","assets/python-D1NFioGW.js","assets/cobol-BVhbHJgp.js","assets/coffee-gY6asS_B.js","assets/cpp-el3R6exS.js","assets/glsl-C-Y1tHoU.js","assets/c-IEKcSTtW.js","assets/regexp-D2GTwJE0.js","assets/crystal-D2_0btIo.js","assets/shellscript-DI252Bga.js","assets/edge-Ch_PYBsB.js","assets/elixir-DEJrJATq.js","assets/elm-Brlko4-d.js","assets/erb-DQPphNua.js","assets/ruby-BUcw6ITs.js","assets/graphql-DYVBNazO.js","assets/jsx-BfVPuW3i.js","assets/haml-CIA_AeXu.js","assets/lua-BSlDLjt5.js","assets/yaml-BTCCxCxi.js","assets/erlang-cuhwpmsu.js","assets/markdown-DXxotAxn.js","assets/fortran-fixed-form-DWr0EnJn.js","assets/fortran-free-form-Br4jRtSc.js","assets/fsharp-CQ5iYSPA.js","assets/gdresource-CN-lsNu5.js","assets/gdscript-hSAZM1eh.js","assets/gdshader-D4XNAEs9.js","assets/git-commit-6e79eN7Q.js","assets/diff-CW0RWGd9.js","assets/git-rebase-BpS915SI.js","assets/glimmer-js-DZDngVuD.js","assets/glimmer-ts-DKNjJvyp.js","assets/hack-DewKAtLe.js","assets/handlebars-Bade6JXX.js","assets/http-Cq90-CTl.js","assets/hurl-DklQHYoa.js","assets/csv-BBwiVr0X.js","assets/hxml-nwJci6H5.js","assets/haxe-DMg0jS3a.js","assets/jinja-CkxiRcB3.js","assets/jison-CFnN5uQs.js","assets/julia-Bj0ETGjT.js","assets/r-CwuTg9lK.js","assets/just-CqIe_c9k.js","assets/perl-DLMzG3tu.js","assets/latex-Cvy8E64e.js","assets/tex-Dg4N9ndP.js","assets/liquid-x09l8QqE.js","assets/marko-CoNMQlTn.js","assets/less-DyHub3ow.js","assets/mdc-BSzVESPu.js","assets/nextflow-DSfydIxt.js","assets/nextflow-groovy-DV4H3hok.js","assets/nginx-CBhJTj0i.js","assets/nim-CtHbOBlO.js","assets/php-KomVR3Hz.js","assets/pug-T4SRLx8P.js","assets/qml-DJdSRUmU.js","assets/razor-Ch4dgsGY.js","assets/csharp-C3YlYcLV.js","assets/rst-D78f0DyR.js","assets/cmake-DaqQuj4A.js","assets/sas-DoT2JDsj.js","assets/shaderlab-CbbQwRPF.js","assets/hlsl-DPe9L0Dt.js","assets/shellsession-BuO_s8FQ.js","assets/soy-DZTZJTEE.js","assets/sparql-DEoxFJ5d.js","assets/turtle-BM-MG8WY.js","assets/stata-Dhu6qITh.js","assets/surrealql-CSDpq5j3.js","assets/svelte-C4ITAvxr.js","assets/templ-BTgKA9-7.js","assets/go-BJpWXZEs.js","assets/ts-tags-BufYnYos.js","assets/twig-BJv_IWYK.js","assets/vue-BsHXCXzh.js","assets/vue-html-CCsH-lmo.js","assets/vue-vine-B5P1JXxo.js","assets/stylus-B_iq45Sj.js","assets/xsl-Dc5XRzm6.js","assets/mermaid.core-Dw-_vXTc.js","assets/chunk-O5CBEL6O-cDxBycWe.js","assets/src-BMvz5HE8.js","assets/chunk-5ZQYHXKU-BH_cLkIj.js","assets/dist-DGlwcsQQ.js","assets/chunk-CSCIHK7Q-DXSJWhsY.js","assets/chunk-3OPIFGDE-DWxCOZgI.js","assets/chunk-L5ZTLDWV-CRU3nvaK.js","assets/chunk-NZK2D7GU-CpUab6v7.js","assets/rough.esm-BBrzuQ0N.js","assets/chunk-BSJP7CBP-BGuhsdwy.js","assets/chunk-KSCS5N6A-C7iBFsUg.js","assets/line-BpooNUgm.js","assets/path-g3G46IZB.js","assets/array-CkF66D10.js","assets/chunk-LZXEDZCA-6ppA-_4h.js","assets/chunk-WU5MYG2G-CvIzXEms.js","assets/chunk-XPW4576I-CI9GEEdy.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.4`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],ee=-1;function te(e){return{current:e}}function B(e){0>ee||(e.current=z[ee],z[ee]=null,ee--)}function V(e,t){ee++,z[ee]=e.current,e.current=t}var H=te(null),ne=te(null),re=te(null),ie=te(null);function ae(e,t){switch(V(re,t),V(ne,e),V(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(H),V(H,e)}function oe(){B(H),B(ne),B(re)}function se(e){e.memoizedState!==null&&V(ie,e);var t=H.current,n=qd(t,e.type);t!==n&&(V(ne,e),V(H,n))}function ce(e){ne.current===e&&(B(H),B(ne)),ie.current===e&&(B(ie),rp._currentValue=R)}var le,ue;function U(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+le+e+ue}var de=!1;function fe(e,t){if(!e||de)return``;de=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -18,7 +18,7 @@ Error generating stack: `+e.message+`
|
|
|
18
18
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
19
19
|
\f\r "&'<=>\``.split(``),`\0
|
|
20
20
|
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function Oo(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=ga);let l=ko(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!xo(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!io(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function ko(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Ao(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Ao(e,t,n){let r=fa(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ba(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Do.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?qa:Ja)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ba(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Do.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ka(n,o)>Ka(n,e.alternative)&&(o=e.alternative),s=o+Ba(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Do.single:Do.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var jo=[`<`,`&`];function Mo(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ba(e.value,Object.assign({},r.settings.characterReferences,{subset:jo}))}function No(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Mo(e,t,n,r)}function Po(e,t,n,r){return r.all(e)}var Fo=va(`type`,{invalid:Io,unknown:Lo,handlers:{comment:Wa,doctype:Ga,element:Oo,raw:No,root:Po,text:Mo}});function Io(e){throw Error("Expected node, not `"+e+"`")}function Lo(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Ro={},zo={},Bo=[];function Vo(e,t){let n=t||Ro,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ho,all:Uo,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Ii,characterReferences:n.characterReferences||zo,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?ga:ha,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Ho(e,t,n){return Fo(e,t,n,this)}function Uo(e){let t=[],n=e&&e.children||Bo,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function Wo(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 Go(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Ko(e){return Array.isArray(e)?e:[e]}async function qo(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Jo(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Yo(e){return e===`ansi`||Jo(e)}function Xo(e){return e===`none`}function Zo(e){return Xo(e)}function Qo(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function $o(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),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}function es(e){let t=$o(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function ts(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var ns=`light-dark()`,rs=[`color`,`background-color`];function is(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function as(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?is(e,t):e})):e}function os(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ss(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&rs.includes(a))if(r===ns&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Qn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ss(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&yr.Italic&&(t[`font-style`]=`italic`),e.fontStyle&yr.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&yr.Underline&&n.push(`underline`),e.fontStyle&yr.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function cs(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var ls=new WeakMap;function us(e,t){ls.set(e,t)}function ds(e){return ls.get(e)}var fs=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(Ko(n).map(e=>[e,Fi])),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 ps(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ps(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 ms(e,t){if(!(e instanceof fs))throw new Qn(`Invalid grammar state`);return e.getInternalStack(t)}function hs(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Qn(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new Qn(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new Qn(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=es(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));gs(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return as(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Qn(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=_s(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Qn(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Qn(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Qo(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function gs(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Qn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Qn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function _s(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(_s).join(``):``}var vs=[hs()];function ys(e){let t=bs(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...vs]}function bs(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var xs=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ss={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Cs(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function ws(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Ts(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Ss[r]&&t.push({type:`setDecoration`,value:Ss[r]});else if(r<=29){let e=Ss[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:xs[r-30]}});else if(r===38){let n=ws(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:xs[r-40]}});else if(r===48){let n=ws(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:xs[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:xs[r-100+8]}})}return t}function Es(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Cs(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Ts(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ds={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Os(e=Ds){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<xs.length;e++)r.push(t(xs[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var ks={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function As(e,t,n){let r=Wo(e,n),i=$o(t),a=Os(Object.fromEntries(xs.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||ks[t]]}))),o=Es();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Go(i,r),o=Go(o,r),n.decorations.has(`dim`)&&(i=js(i));let s=yr.None;return n.decorations.has(`bold`)&&(s|=yr.Bold),n.decorations.has(`italic`)&&(s|=yr.Italic),n.decorations.has(`underline`)&&(s|=yr.Underline),n.decorations.has(`strikethrough`)&&(s|=yr.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function js(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Ms(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(Jo(i)||Xo(r))return $o(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return As(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new Qn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new Qn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Ps(t,s,a,o,n)}function Ns(...e){if(e.length===2)return ds(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Jo(i)||Xo(a))throw new Qn(`Plain language does not have grammar state`);if(i===`ansi`)throw new Qn(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new fs(Fs(n,c,o,s,r).stateStack,c.name,o.name)}function Ps(e,t,n,r,i){let a=Fs(e,t,n,r,i),o=new fs(a.stateStack,t.name,n.name);return us(a.tokens,o),a.tokens}function Fs(e,t,n,r,i){let a=Wo(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=$o(e),l=i.grammarState?ms(i.grammarState,n.name)??Fi:i.grammarContextCode==null?Fi:Fs(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,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]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=Go(r[Tr.getForeground(s)],a),l=Tr.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Is(t.scopes):Ls(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Is(e){return e.map(e=>({scopeName:e}))}function Ls(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Bs(e,i,t.slice(0,r))}}return n}function Rs(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function zs(e,t,n){if(!Rs(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Rs(e[r],n[i])&&--r,--i;return r===-1}function Bs(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(zs(e,t,n)){r.push(a);break}return r}function Vs(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Ms(e,t,{...n,theme:r.theme});return{tokens:i,state:ds(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Hs(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new fs(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&us(o,s),o}function Hs(...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}function Us(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new Qn("`themes` option must not be empty");let p=Vs(e,t,n);if(c=ds(p),l&&ns!==l&&!f.find(e=>e.color===l))throw new Qn(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>os(e,h,u,l,d))),c&&us(a,c);let g=f.map(e=>Wo(e.theme,n));i=Ws(f,m,g,u,l,`fg`,d),r=Ws(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Wo(n.theme,n);a=Ms(e,t,n);let l=e.getTheme(n.theme);r=Go(l.bg,s),i=Go(l.fg,s),o=l.name,c=ds(a)}else throw new Qn("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Ws(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Go(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===ns&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Qn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Go(t[r][a],n[r])||`inherit`}, ${Go(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Gs(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Gs(e,t,n),codeToTokens:(t,n)=>Us(e,t,n)}){let i=t;for(let e of ys(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Us(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=qs(a):d===`never`&&(a=Js(a)),f&&(a=Ys(a));let p={...r,get source(){return i}};for(let e of ys(n))a=e.tokens?.call(p,a)||a;return Ks(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Ks(e,t,n,r=ds(e)){let i=ys(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Qo,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
21
|
-
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=cs(a.htmlStyle||ss(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&us(m,r),m}function qs(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&yr.Underline||i.fontStyle&yr.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Js(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Ys(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=cs(e.htmlStyle||ss(e)),i=cs(n.htmlStyle||ss(n)),a=e.fontStyle&&(e.fontStyle&yr.Underline||e.fontStyle&yr.Strikethrough),o=n.fontStyle&&(n.fontStyle&yr.Underline||n.fontStyle&yr.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Xs=Vo;function Zs(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Gs(e,t,n),codeToTokens:(t,n)=>Us(e,t,n)},i=Xs(Gs(e,t,n,r));for(let e of ys(n))i=e.postprocess?.call(r,i,n)||i;return i}var Qs={light:`#333333`,dark:`#bbbbbb`},$s={light:`#fffffe`,dark:`#1e1e1e`},ec=`__shiki_resolved`;function tc(e){if(e?.[ec])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`?Qs.light:Qs.dark,n||=t.type===`light`?$s.light:$s.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,ec,{enumerable:!1,writable:!1,value:!0}),t}async function nc(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Yo(e)).map(async e=>await qo(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rc(e){return(await Promise.all(e.map(async e=>Zo(e)?null:tc(await qo(e))))).filter(e=>!!e)}var ic=3,ac=!1;function oc(e,t=3){if(ic&&!(typeof ic==`number`&&t>ic)){if(ac)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var sc=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cc(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 sc(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var lc=class extends Pi{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)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=tc(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=fr.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=cc(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=Array.from(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 sc(`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))}},uc=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}},dc=0;function fc(e){dc+=1,e.warnings!==!1&&dc>=10&&dc%10==0&&console.warn(`[Shiki] ${dc} 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 sc("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(tc),i=new lc(new uc(e.engine,n),r,n,e.langAlias),a;function o(t){return cc(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new sc(`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 sc(`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 nc(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await rc(e))}function g(){if(t)throw new sc(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--dc)}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 pc(e){e.engine||oc("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rc(e.themes||[]),nc(e.langs||[]),e.engine]);return fc({...e,themes:t,langs:n,engine:r})}async function mc(e){let t=await pc(e);return{getLastGrammarState:(...e)=>Ns(t,...e),codeToTokensBase:(e,n)=>Ms(t,e,n),codeToTokensWithThemes:(e,n)=>Vs(t,e,n),codeToTokens:(e,n)=>Us(t,e,n),codeToHast:(e,n)=>Gs(t,e,n),codeToHtml:(e,n)=>Zs(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function hc(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Yo(n))return[];let r=t[n];if(!r)throw new Qn(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Zo(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Qn(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await mc({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function gc(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function _c(e,t){let n=gc(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var vc=`modulepreload`,yc=function(e){return`/`+e},bc={},J=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=yc(t,n),t in bc)return;bc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:vc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},xc=[{id:`abap`,name:`ABAP`,import:(()=>J(()=>import(`./abap-cWYhO34H.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>J(()=>import(`./actionscript-3-B80ndJsD.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>J(()=>import(`./ada-C0C0SoYB.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>J(()=>import(`./angular-html-BVFBJbbm.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>J(()=>import(`./angular-ts-CbJB4bNJ.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>J(()=>import(`./apache-DBwBm4bB.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>J(()=>import(`./apex-FcV7UxQi.js`),[]))},{id:`apl`,name:`APL`,import:(()=>J(()=>import(`./apl-MzqTwOQT.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>J(()=>import(`./applescript-hQs8VNpS.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>J(()=>import(`./ara-BOadBOZg.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>J(()=>import(`./asciidoc-BsfqiBck.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>J(()=>import(`./asm-C2vUqzqz.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>J(()=>import(`./astro-DDblGxmh.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>J(()=>import(`./awk-D4e-eeZT.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>J(()=>import(`./ballerina-BzvFqbha.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>J(()=>import(`./bat-CFyw2ERn.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>J(()=>import(`./beancount-a6Gsu5WX.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>J(()=>import(`./berry-C2jyz4Ah.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>J(()=>import(`./bibtex-Dyet-B83.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>J(()=>import(`./bicep-CghvUIvy.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>J(()=>import(`./bird2-nHigvs-R.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>J(()=>import(`./blade-DlgT3iuV.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>J(()=>import(`./bsl-BrHd4RA2.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>J(()=>import(`./c-BL61MF4M.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>J(()=>import(`./c3-9ZrcmAmr.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>J(()=>import(`./cadence-BPDgYNWy.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>J(()=>import(`./cairo-BDZ6TRZS.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>J(()=>import(`./clarity-Cmao5KSK.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>J(()=>import(`./clojure-D2dPuTkk.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>J(()=>import(`./cmake-DaqQuj4A.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>J(()=>import(`./cobol-D37UDAkO.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>J(()=>import(`./codeowners-B748jmvc.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>J(()=>import(`./codeql-CXb_8gHR.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>J(()=>import(`./coffee-NCjhDwWZ.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>J(()=>import(`./common-lisp-UZn9nc_5.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>J(()=>import(`./coq-DtO6yBIf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>J(()=>import(`./cpp-CQUNgUz4.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>J(()=>import(`./crystal-DGHLJtZ_.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>J(()=>import(`./csharp-C3YlYcLV.js`),[]))},{id:`css`,name:`CSS`,import:(()=>J(()=>import(`./css-xCgEbp_3.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>J(()=>import(`./csv-BBwiVr0X.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>J(()=>import(`./cue-ScBFXY5f.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>J(()=>import(`./cypher-CGStaC1X.js`),[]))},{id:`d`,name:`D`,import:(()=>J(()=>import(`./d-CuTCIvnX.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>J(()=>import(`./dart-CqEodbm2.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>J(()=>import(`./dax-UdE5S0Dh.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>J(()=>import(`./desktop-DfmsfHJA.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>J(()=>import(`./diff-CW0RWGd9.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>J(()=>import(`./docker-B1qtW4ha.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>J(()=>import(`./dotenv-BUzOh1k8.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>J(()=>import(`./dream-maker-CBvk18nW.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>J(()=>import(`./edge-C6_UFojU.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>J(()=>import(`./elixir-B12MoaTY.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>J(()=>import(`./elm-C80KxC_R.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>J(()=>import(`./emacs-lisp-DvSgLhDc.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>J(()=>import(`./erb-DqelkF7l.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>J(()=>import(`./erlang-cuhwpmsu.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>J(()=>import(`./fennel-C-1kWlGf.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>J(()=>import(`./fish-CCpdtwqS.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>J(()=>import(`./fluent-BLg032oD.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>J(()=>import(`./fortran-fixed-form-DWr0EnJn.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>J(()=>import(`./fortran-free-form-Br4jRtSc.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>J(()=>import(`./fsharp-CQ5iYSPA.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>J(()=>import(`./gdresource-CN-lsNu5.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>J(()=>import(`./gdscript-hSAZM1eh.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>J(()=>import(`./gdshader-D4XNAEs9.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>J(()=>import(`./genie-DmN-ICAN.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>J(()=>import(`./gherkin-cuHHmRcX.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>J(()=>import(`./git-commit-6e79eN7Q.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>J(()=>import(`./git-rebase-7L4r_tbx.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>J(()=>import(`./gleam-D8VhqPDN.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>J(()=>import(`./glimmer-js-8OQAbTGs.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>J(()=>import(`./glimmer-ts-3IyQiCHC.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>J(()=>import(`./glsl-Bi_bzGJK.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>J(()=>import(`./gn-BjGRlX27.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>J(()=>import(`./gnuplot-BZCXuE4q.js`),[]))},{id:`go`,name:`Go`,import:(()=>J(()=>import(`./go-BJpWXZEs.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>J(()=>import(`./graphql-YcGxsBfT.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>J(()=>import(`./groovy-D9w3Dn-z.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>J(()=>import(`./hack-C9IpUqi6.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>J(()=>import(`./haml-YWDwVGeX.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>J(()=>import(`./handlebars-zyG7ocdI.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>J(()=>import(`./haskell-DqDdKEgk.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>J(()=>import(`./haxe-DMg0jS3a.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>J(()=>import(`./hcl-SZIZUK_X.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>J(()=>import(`./hjson-DF1VspiE.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>J(()=>import(`./hlsl-DPe9L0Dt.js`),[]))},{id:`html`,name:`HTML`,import:(()=>J(()=>import(`./html-CHYhpzfH.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>J(()=>import(`./html-derivative-BhgSILdB.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>J(()=>import(`./http-BPv6bUpq.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>J(()=>import(`./hurl-CpohSten.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>J(()=>import(`./hxml-nwJci6H5.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>J(()=>import(`./hy-B0f-B1mH.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>J(()=>import(`./imba-Bq3j1cW5.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>J(()=>import(`./ini-BayloP2U.js`),[]))},{id:`java`,name:`Java`,import:(()=>J(()=>import(`./java-Bt4sAY2m.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>J(()=>import(`./javascript-DZjI42QZ.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>J(()=>import(`./jinja-D2zTW07t.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>J(()=>import(`./jison-Dz-ndIM5.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>J(()=>import(`./json-Ykn4LhOH.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>J(()=>import(`./json5-CRSfdIrY.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>J(()=>import(`./jsonc-y4g9DQPx.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>J(()=>import(`./jsonl-D2paVn9r.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>J(()=>import(`./jsonnet-CLH27mtz.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>J(()=>import(`./jssm-CPPYaqX-.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>J(()=>import(`./jsx-Ce8SKNSt.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>J(()=>import(`./julia-DlfibiGU.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>J(()=>import(`./just-CT2PIeY2.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>J(()=>import(`./kdl-D1BQjjnw.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>J(()=>import(`./kotlin-ndCaDnf0.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>J(()=>import(`./kusto-D-4nbkD3.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>J(()=>import(`./latex-Dkfo8_p4.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>J(()=>import(`./lean-YmtAsB0p.js`),[]))},{id:`less`,name:`Less`,import:(()=>J(()=>import(`./less-DyHub3ow.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>J(()=>import(`./liquid-dWmg5egV.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>J(()=>import(`./llvm-DCcqrY0D.js`),[]))},{id:`log`,name:`Log file`,import:(()=>J(()=>import(`./log-DWAAMNbe.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>J(()=>import(`./logo-ClQMGkNL.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>J(()=>import(`./lua-6hNhLpj8.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>J(()=>import(`./luau-CmcXFvLt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>J(()=>import(`./make-DcfJyUzm.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>J(()=>import(`./markdown-DXxotAxn.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>J(()=>import(`./marko-DTVuQVoJ.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>J(()=>import(`./matlab-BlfbTznR.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>J(()=>import(`./mdc-LbJVW6cj.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>J(()=>import(`./mdx-H8fyPQd8.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>J(()=>import(`./mermaid-CWAV2dmV.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>J(()=>import(`./mipsasm-BWYFAm2s.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>J(()=>import(`./mojo-DZcPJEIN.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>J(()=>import(`./moonbit-6eslNlJL.js`),[]))},{id:`move`,name:`Move`,import:(()=>J(()=>import(`./move-DxFc9-QU.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>J(()=>import(`./narrat-gv38dJOT.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>J(()=>import(`./nextflow-DSfydIxt.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>J(()=>import(`./nextflow-groovy-DV4H3hok.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>J(()=>import(`./nginx-BvMTgdwH.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>J(()=>import(`./nim-BdGYhiTu.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>J(()=>import(`./nix-NlOz3HGM.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>J(()=>import(`./nushell-D86Z8aFF.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>J(()=>import(`./objective-c-iuJvUjCv.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>J(()=>import(`./objective-cpp-C62JvfMT.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>J(()=>import(`./ocaml-Rbryo9lg.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>J(()=>import(`./odin-CfaOVNP_.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>J(()=>import(`./openscad-DCRhgheK.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>J(()=>import(`./pascal-CTesTHtV.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>J(()=>import(`./perl-DamEOAxn.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>J(()=>import(`./php-DtubpAAy.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>J(()=>import(`./pkl-BjUMjQkt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>J(()=>import(`./plsql-BgKEZSSo.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>J(()=>import(`./po-C5s_CVt8.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>J(()=>import(`./polar-y4hX8qM0.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>J(()=>import(`./postcss-BHCm7Qae.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>J(()=>import(`./powerquery-C2vMt8aZ.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>J(()=>import(`./powershell-DEcjmg1c.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>J(()=>import(`./prisma-Ba-Tcxy5.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>J(()=>import(`./prolog-B4o261Jv.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>J(()=>import(`./proto-o3IZKiMR.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>J(()=>import(`./pug-CMYtl1BN.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>J(()=>import(`./puppet-BC0dqZ31.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>J(()=>import(`./purescript-CLDw1y5G.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>J(()=>import(`./python-D1NFioGW.js`),[]))},{id:`qml`,name:`QML`,import:(()=>J(()=>import(`./qml-D76DCV4U.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>J(()=>import(`./qmldir-B7i9e9Vn.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>J(()=>import(`./qss-DIe6oKX8.js`),[]))},{id:`r`,name:`R`,import:(()=>J(()=>import(`./r-gMTLVmYP.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>J(()=>import(`./racket-CAOC_yyk.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>J(()=>import(`./raku-Ccua3vW6.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>J(()=>import(`./razor-1oOg77PO.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>J(()=>import(`./reg-CAYZT9kE.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>J(()=>import(`./regexp-BJzbycG8.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>J(()=>import(`./rel-cvB6F5nO.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>J(()=>import(`./riscv-SYGtE4EN.js`),[]))},{id:`ron`,name:`RON`,import:(()=>J(()=>import(`./ron-CRt869SB.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>J(()=>import(`./rosmsg-BwrfJ66Z.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>J(()=>import(`./rst-Be7RtxcU.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>J(()=>import(`./ruby-oyNd3WUZ.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>J(()=>import(`./rust-DCKTTPxN.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>J(()=>import(`./sas-Bx8dCxcK.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>J(()=>import(`./sass-CorcwySt.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>J(()=>import(`./scala-DlI-OmYj.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>J(()=>import(`./scheme-CcNEGkZH.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>J(()=>import(`./scss-DzZEPh1d.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>J(()=>import(`./sdbl-AL_m-RO_.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>J(()=>import(`./shaderlab-CbbQwRPF.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>J(()=>import(`./shellscript-t9s0AoBc.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>J(()=>import(`./shellsession-NczJO6Io.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>J(()=>import(`./smalltalk-Y2ogrfbk.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>J(()=>import(`./solidity-Bfbm9QZQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>J(()=>import(`./soy-Dl6InSac.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>J(()=>import(`./sparql-DEoxFJ5d.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>J(()=>import(`./splunk-6DJA2XFa.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>J(()=>import(`./sql-DXkZEc28.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>J(()=>import(`./ssh-config-CbQtdF-u.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>J(()=>import(`./stata-DmpUDP7M.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>J(()=>import(`./stylus-B_iq45Sj.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>J(()=>import(`./surrealql-BAZp4tA6.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>J(()=>import(`./svelte-DXBMAgu7.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>J(()=>import(`./swift-C7KIgN-p.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>J(()=>import(`./system-verilog-C3G9wERd.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>J(()=>import(`./systemd-CwxGrojj.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>J(()=>import(`./talonscript-DqnSo1EO.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>J(()=>import(`./tasl-T8ethp86.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>J(()=>import(`./tcl-Ccl366o0.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>J(()=>import(`./templ-CF-yfRM7.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>J(()=>import(`./terraform-BBf6ZI_0.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>J(()=>import(`./tex-D5tGX-j9.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>J(()=>import(`./toml-C5Z_BR4r.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>J(()=>import(`./ts-tags-DWMVxoO1.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>J(()=>import(`./tsv-rX8sUJs7.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>J(()=>import(`./tsx-C6QVlWvX.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>J(()=>import(`./turtle-BM-MG8WY.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>J(()=>import(`./twig-DKFN0Lvm.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>J(()=>import(`./typescript-DVfrnfSW.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>J(()=>import(`./typespec-C5gKydvR.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>J(()=>import(`./typst--_5VchrY.js`),[]))},{id:`v`,name:`V`,import:(()=>J(()=>import(`./v-C6PwpmTC.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>J(()=>import(`./vala-4pTaceSj.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>J(()=>import(`./vb-DhoR5A6S.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>J(()=>import(`./verilog-B9f_1lPn.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>J(()=>import(`./vhdl-Cy4RAmOe.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>J(()=>import(`./viml-CFQW-CcD.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>J(()=>import(`./vue-BCLQ-g1T.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>J(()=>import(`./vue-html-Ddr0JbE-.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>J(()=>import(`./vue-vine-CX36RUs5.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>J(()=>import(`./vyper-BW5zj9bE.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>J(()=>import(`./wasm-BigxSLnm.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>J(()=>import(`./wenyan-BZzM1SQT.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>J(()=>import(`./wgsl-xBPHbLlq.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>J(()=>import(`./wikitext-BXJWUNJK.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>J(()=>import(`./wit-2GnUs67P.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>J(()=>import(`./wolfram-DIFDmw-g.js`),[]))},{id:`xml`,name:`XML`,import:(()=>J(()=>import(`./xml-FnMA1W8C.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>J(()=>import(`./xsl-CLduN3zs.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>J(()=>import(`./yaml-B6hNfHm7.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>J(()=>import(`./zenscript-DQaUUjbx.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>J(()=>import(`./zig-BDepRvBi.js`),[]))}],Sc=Object.fromEntries(xc.map(e=>[e.id,e.import])),Cc=Object.fromEntries(xc.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),wc={...Sc,...Cc},Tc=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>J(()=>import(`./andromeeda-Ch2kWS7s.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>J(()=>import(`./aurora-x-BHLqzt7j.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>J(()=>import(`./ayu-dark-DCotN_ZT.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>J(()=>import(`./ayu-light-CKB6o_im.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>J(()=>import(`./ayu-mirage-B38lW-C5.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-frappe-BY_2ofjk.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>J(()=>import(`./catppuccin-latte-D6GXPBmA.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-macchiato-BuW8_cyo.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-mocha-znex9DPe.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>J(()=>import(`./dark-plus-BvePH-r3.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>J(()=>import(`./dracula-kJQjC_Gy.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>J(()=>import(`./dracula-soft-B3XhEjCl.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>J(()=>import(`./everforest-dark-u0zLn75q.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>J(()=>import(`./everforest-light-D3syIoAR.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>J(()=>import(`./github-dark-CEBLh0--.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>J(()=>import(`./github-dark-default-Dq0Z4Xai.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>J(()=>import(`./github-dark-dimmed-D90YmS4w.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>J(()=>import(`./github-dark-high-contrast-B6BWv1iC.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>J(()=>import(`./github-light-lXSVSq5T.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>J(()=>import(`./github-light-default-DsPWmj4v.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>J(()=>import(`./github-light-high-contrast-C7aLb3kp.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-hard-_deksD0U.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-medium-CT31284j.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-soft-BZuEUCbj.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-hard-dxv4n_ZS.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-medium-BsW_fVfR.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-soft-BiGy99gD.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>J(()=>import(`./horizon-Ngud75Kn.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>J(()=>import(`./horizon-bright-Cnljd0XD.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>J(()=>import(`./houston-BenZxlMr.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>J(()=>import(`./kanagawa-dragon-Bt5mhLu1.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>J(()=>import(`./kanagawa-lotus-FGA3pRJk.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>J(()=>import(`./kanagawa-wave-DnLVZPAD.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>J(()=>import(`./laserwave-D2qAZkaG.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>J(()=>import(`./light-plus-CP13QUvm.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>J(()=>import(`./material-theme-JFoPTBSr.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>J(()=>import(`./material-theme-darker-BHaqZ19v.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>J(()=>import(`./material-theme-lighter-CGnnS2bs.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>J(()=>import(`./material-theme-ocean-Drhewjqf.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>J(()=>import(`./material-theme-palenight-DbUypmpb.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>J(()=>import(`./min-dark-BEelvXUB.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>J(()=>import(`./min-light-CTPBOACR.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>J(()=>import(`./monokai-DQlZXbkg.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>J(()=>import(`./night-owl-BLcrYhaC.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>J(()=>import(`./night-owl-light-BG-tBJOz.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>J(()=>import(`./nord-Dm2F5_QB.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>J(()=>import(`./one-dark-pro-DC9SHdX0.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>J(()=>import(`./one-light-Doo39p0H.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>J(()=>import(`./plastic-B3CcSpon.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>J(()=>import(`./poimandres-BsK70ma5.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>J(()=>import(`./red-DtDH206x.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>J(()=>import(`./rose-pine-CjBfSJ5b.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>J(()=>import(`./rose-pine-dawn-C0xwy7iJ.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>J(()=>import(`./rose-pine-moon-BSNy9Ty0.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>J(()=>import(`./slack-dark-rMhrfPm6.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>J(()=>import(`./slack-ochin-9w8X74hU.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>J(()=>import(`./snazzy-light-DHr9ygpP.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>J(()=>import(`./solarized-dark-UPcKev9Q.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>J(()=>import(`./solarized-light-DUsjROvl.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>J(()=>import(`./synthwave-84-lf_Wt0K_.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>J(()=>import(`./tokyo-night-BF5ata25.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>J(()=>import(`./vesper-CmBi_iCT.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>J(()=>import(`./vitesse-black-CE8RoBJP.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>J(()=>import(`./vitesse-dark-BpF142p_.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>J(()=>import(`./vitesse-light-CMwxPBrg.js`),[]))}].map(e=>[e.id,e.import])),Ec=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Dc(){return 2147483648}function Oc(){return typeof performance<`u`?performance.now():Date.now()}var kc=(e,t)=>e+(t-e%t)%t;async function Ac(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=Dc();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,kc(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:Oc,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 jc=Object.defineProperty,Mc=(e,t,n)=>t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nc=(e,t,n)=>Mc(e,typeof t==`symbol`?t:t+``,n),Pc=null;function Fc(e){throw new Ec(e.UTF8ToString(e.getLastOnigError()))}var Ic=class e{constructor(t){Nc(this,`utf16Length`),Nc(this,`utf8Length`),Nc(this,`utf16Value`),Nc(this,`utf8Value`),Nc(this,`utf16OffsetToUtf8`),Nc(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)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Lc=class e{constructor(t){if(Nc(this,`id`,++e.LAST_ID),Nc(this,`_onigBinding`),Nc(this,`content`),Nc(this,`utf16Length`),Nc(this,`utf8Length`),Nc(this,`utf16OffsetToUtf8`),Nc(this,`utf8OffsetToUtf16`),Nc(this,`ptr`),!Pc)throw new Ec(`Must invoke loadWasm first.`);this._onigBinding=Pc,this.content=t;let n=new Ic(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Pc.omalloc(1e4),e._sharedPtrInUse=!0,Pc.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Pc)}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)}};Nc(Lc,`LAST_ID`,0),Nc(Lc,`_sharedPtr`,0),Nc(Lc,`_sharedPtrInUse`,!1);var Rc=Lc,zc=class{constructor(e){if(Nc(this,`_onigBinding`),Nc(this,`_ptr`),!Pc)throw new Ec(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ic(e[r]);t[r]=i.createString(Pc),n[r]=i.utf8Length}let r=Pc.omalloc(4*e.length);Pc.HEAPU32.set(t,r/4);let i=Pc.omalloc(4*e.length);Pc.HEAPU32.set(n,i/4);let a=Pc.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Pc.ofree(t[n]);Pc.ofree(i),Pc.ofree(r),a===0&&Fc(Pc),this._onigBinding=Pc,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 Rc(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 Bc(e){return typeof e.instantiator==`function`}function Vc(e){return typeof e.default==`function`}function Hc(e){return e.data!==void 0}function Uc(e){return typeof Response<`u`&&e instanceof Response}function Wc(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 Gc;function Kc(e){if(Gc)return Gc;async function t(){Pc=await Ac(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Bc(n)?n=await n.instantiator(t):Vc(n)?n=await n.default(t):(Hc(n)&&(n=n.data),Uc(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Jc(n)(t):await Yc(n)(t):Wc(n)||n instanceof WebAssembly.Module?n=await qc(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await qc(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Gc=t(),Gc}function qc(e){return t=>WebAssembly.instantiate(e,t)}function Jc(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Yc(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Xc(e){return e&&await Kc(e),{createScanner(e){return new zc(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Rc(e)}}}var Zc=hc({langs:wc,themes:Tc,engine:()=>Xc(J(()=>import(`./wasm-CSccDuAq.js`),[]))}),{codeToHtml:Qc,codeToHast:$c,codeToTokens:el,codeToTokensBase:tl,codeToTokensWithThemes:nl,getSingletonHighlighter:rl,getLastGrammarState:il}=_c(Zc,{guessEmbeddedLanguages:ts});function al(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function ol(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var sl=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),cl=String.raw;function ll(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ul=cl`\[\^?`,dl=`c.? | C(?:-.?)?|${cl`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${cl`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${cl`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${cl`o\{[^\}]*\}?`}|${cl`\d{1,3}`}`,fl=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,pl=new RegExp(cl`
|
|
21
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=cs(a.htmlStyle||ss(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&us(m,r),m}function qs(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&yr.Underline||i.fontStyle&yr.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Js(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Ys(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=cs(e.htmlStyle||ss(e)),i=cs(n.htmlStyle||ss(n)),a=e.fontStyle&&(e.fontStyle&yr.Underline||e.fontStyle&yr.Strikethrough),o=n.fontStyle&&(n.fontStyle&yr.Underline||n.fontStyle&yr.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Xs=Vo;function Zs(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Gs(e,t,n),codeToTokens:(t,n)=>Us(e,t,n)},i=Xs(Gs(e,t,n,r));for(let e of ys(n))i=e.postprocess?.call(r,i,n)||i;return i}var Qs={light:`#333333`,dark:`#bbbbbb`},$s={light:`#fffffe`,dark:`#1e1e1e`},ec=`__shiki_resolved`;function tc(e){if(e?.[ec])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`?Qs.light:Qs.dark,n||=t.type===`light`?$s.light:$s.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,ec,{enumerable:!1,writable:!1,value:!0}),t}async function nc(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Yo(e)).map(async e=>await qo(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rc(e){return(await Promise.all(e.map(async e=>Zo(e)?null:tc(await qo(e))))).filter(e=>!!e)}var ic=3,ac=!1;function oc(e,t=3){if(ic&&!(typeof ic==`number`&&t>ic)){if(ac)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var sc=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function cc(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 sc(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var lc=class extends Pi{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)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=tc(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=fr.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=cc(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=Array.from(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 sc(`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))}},uc=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}},dc=0;function fc(e){dc+=1,e.warnings!==!1&&dc>=10&&dc%10==0&&console.warn(`[Shiki] ${dc} 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 sc("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(tc),i=new lc(new uc(e.engine,n),r,n,e.langAlias),a;function o(t){return cc(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new sc(`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 sc(`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 nc(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await rc(e))}function g(){if(t)throw new sc(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--dc)}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 pc(e){e.engine||oc("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rc(e.themes||[]),nc(e.langs||[]),e.engine]);return fc({...e,themes:t,langs:n,engine:r})}async function mc(e){let t=await pc(e);return{getLastGrammarState:(...e)=>Ns(t,...e),codeToTokensBase:(e,n)=>Ms(t,e,n),codeToTokensWithThemes:(e,n)=>Vs(t,e,n),codeToTokens:(e,n)=>Us(t,e,n),codeToHast:(e,n)=>Gs(t,e,n),codeToHtml:(e,n)=>Zs(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function hc(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Yo(n))return[];let r=t[n];if(!r)throw new Qn(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Zo(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Qn(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await mc({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function gc(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function _c(e,t){let n=gc(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var vc=`modulepreload`,yc=function(e){return`/`+e},bc={},J=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=yc(t,n),t in bc)return;bc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:vc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},xc=[{id:`abap`,name:`ABAP`,import:(()=>J(()=>import(`./abap-cWYhO34H.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>J(()=>import(`./actionscript-3-B80ndJsD.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>J(()=>import(`./ada-C0C0SoYB.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>J(()=>import(`./angular-html-DIKVmS-w.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>J(()=>import(`./angular-ts-DK13mfBQ.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>J(()=>import(`./apache-DBwBm4bB.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>J(()=>import(`./apex-FcV7UxQi.js`),[]))},{id:`apl`,name:`APL`,import:(()=>J(()=>import(`./apl-NVZUxqwo.js`),__vite__mapDeps([6,2,1,3,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>J(()=>import(`./applescript-hQs8VNpS.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>J(()=>import(`./ara-BOadBOZg.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>J(()=>import(`./asciidoc-BsfqiBck.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>J(()=>import(`./asm-C2vUqzqz.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>J(()=>import(`./astro-RPdCumat.js`),__vite__mapDeps([10,2,3,7,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>J(()=>import(`./awk-D4e-eeZT.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>J(()=>import(`./ballerina-BzvFqbha.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>J(()=>import(`./bat-CFyw2ERn.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>J(()=>import(`./beancount-a6Gsu5WX.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>J(()=>import(`./berry-C2jyz4Ah.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>J(()=>import(`./bibtex-Dyet-B83.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>J(()=>import(`./bicep-CghvUIvy.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>J(()=>import(`./bird2-nHigvs-R.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>J(()=>import(`./blade-_ubz_KMD.js`),__vite__mapDeps([14,2,15,1,3,7,16,8,9])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>J(()=>import(`./bsl-BrHd4RA2.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>J(()=>import(`./c-IEKcSTtW.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>J(()=>import(`./c3-9ZrcmAmr.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>J(()=>import(`./cadence-BPDgYNWy.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>J(()=>import(`./cairo-BDZ6TRZS.js`),__vite__mapDeps([19,20])))},{id:`clarity`,name:`Clarity`,import:(()=>J(()=>import(`./clarity-Cmao5KSK.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>J(()=>import(`./clojure-D2dPuTkk.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>J(()=>import(`./cmake-DaqQuj4A.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>J(()=>import(`./cobol-BVhbHJgp.js`),__vite__mapDeps([21,1,2,3,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>J(()=>import(`./codeowners-B748jmvc.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>J(()=>import(`./codeql-CXb_8gHR.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>J(()=>import(`./coffee-gY6asS_B.js`),__vite__mapDeps([22,3])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>J(()=>import(`./common-lisp-UZn9nc_5.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>J(()=>import(`./coq-DtO6yBIf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>J(()=>import(`./cpp-el3R6exS.js`).then(e=>e.n),__vite__mapDeps([23,24,25,26,16])))},{id:`crystal`,name:`Crystal`,import:(()=>J(()=>import(`./crystal-D2_0btIo.js`),__vite__mapDeps([27,25,2,1,3,28,16])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>J(()=>import(`./csharp-C3YlYcLV.js`),[]))},{id:`css`,name:`CSS`,import:(()=>J(()=>import(`./css-DtPe7dg4.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>J(()=>import(`./csv-BBwiVr0X.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>J(()=>import(`./cue-ScBFXY5f.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>J(()=>import(`./cypher-CGStaC1X.js`),[]))},{id:`d`,name:`D`,import:(()=>J(()=>import(`./d-CuTCIvnX.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>J(()=>import(`./dart-CqEodbm2.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>J(()=>import(`./dax-UdE5S0Dh.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>J(()=>import(`./desktop-DfmsfHJA.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>J(()=>import(`./diff-CW0RWGd9.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>J(()=>import(`./docker-B1qtW4ha.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>J(()=>import(`./dotenv-BUzOh1k8.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>J(()=>import(`./dream-maker-CBvk18nW.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>J(()=>import(`./edge-Ch_PYBsB.js`),__vite__mapDeps([29,15,1,2,3,13])))},{id:`elixir`,name:`Elixir`,import:(()=>J(()=>import(`./elixir-DEJrJATq.js`),__vite__mapDeps([30,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>J(()=>import(`./elm-Brlko4-d.js`),__vite__mapDeps([31,24,25])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>J(()=>import(`./emacs-lisp-DvSgLhDc.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>J(()=>import(`./erb-DQPphNua.js`),__vite__mapDeps([32,1,2,3,33,25,23,24,26,16,34,35,12,13,36,37,28,8,9,38])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>J(()=>import(`./erlang-cuhwpmsu.js`),__vite__mapDeps([39,40])))},{id:`fennel`,name:`Fennel`,import:(()=>J(()=>import(`./fennel-C-1kWlGf.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>J(()=>import(`./fish-CCpdtwqS.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>J(()=>import(`./fluent-BLg032oD.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>J(()=>import(`./fortran-fixed-form-DWr0EnJn.js`),__vite__mapDeps([41,42])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>J(()=>import(`./fortran-free-form-Br4jRtSc.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>J(()=>import(`./fsharp-CQ5iYSPA.js`),__vite__mapDeps([43,40])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>J(()=>import(`./gdresource-CN-lsNu5.js`),__vite__mapDeps([44,45,46])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>J(()=>import(`./gdscript-hSAZM1eh.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>J(()=>import(`./gdshader-D4XNAEs9.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>J(()=>import(`./genie-DmN-ICAN.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>J(()=>import(`./gherkin-cuHHmRcX.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>J(()=>import(`./git-commit-6e79eN7Q.js`),__vite__mapDeps([47,48])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>J(()=>import(`./git-rebase-BpS915SI.js`),__vite__mapDeps([49,28])))},{id:`gleam`,name:`Gleam`,import:(()=>J(()=>import(`./gleam-D8VhqPDN.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>J(()=>import(`./glimmer-js-DZDngVuD.js`),__vite__mapDeps([50,2,1,3,13])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>J(()=>import(`./glimmer-ts-DKNjJvyp.js`),__vite__mapDeps([51,2,1,3,13])))},{id:`glsl`,name:`GLSL`,import:(()=>J(()=>import(`./glsl-C-Y1tHoU.js`).then(e=>e.n),__vite__mapDeps([24,25])))},{id:`gn`,name:`GN`,import:(()=>J(()=>import(`./gn-BjGRlX27.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>J(()=>import(`./gnuplot-BZCXuE4q.js`),[]))},{id:`go`,name:`Go`,import:(()=>J(()=>import(`./go-BJpWXZEs.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>J(()=>import(`./graphql-DYVBNazO.js`).then(e=>e.n),__vite__mapDeps([34,3,35,12,13])))},{id:`groovy`,name:`Groovy`,import:(()=>J(()=>import(`./groovy-D9w3Dn-z.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>J(()=>import(`./hack-DewKAtLe.js`),__vite__mapDeps([52,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>J(()=>import(`./haml-CIA_AeXu.js`).then(e=>e.n),__vite__mapDeps([36,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>J(()=>import(`./handlebars-Bade6JXX.js`),__vite__mapDeps([53,2,1,3,38])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>J(()=>import(`./haskell-DqDdKEgk.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>J(()=>import(`./haxe-DMg0jS3a.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>J(()=>import(`./hcl-SZIZUK_X.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>J(()=>import(`./hjson-DF1VspiE.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>J(()=>import(`./hlsl-DPe9L0Dt.js`),[]))},{id:`html`,name:`HTML`,import:(()=>J(()=>import(`./html-C4hhbuGp.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>J(()=>import(`./html-derivative-BXfztBtv.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>J(()=>import(`./http-Cq90-CTl.js`),__vite__mapDeps([54,34,3,35,12,13,7,28,8,9])))},{id:`hurl`,name:`Hurl`,import:(()=>J(()=>import(`./hurl-DklQHYoa.js`),__vite__mapDeps([55,56,34,3,35,12,13,8,9])))},{id:`hxml`,name:`HXML`,import:(()=>J(()=>import(`./hxml-nwJci6H5.js`),__vite__mapDeps([57,58])))},{id:`hy`,name:`Hy`,import:(()=>J(()=>import(`./hy-B0f-B1mH.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>J(()=>import(`./imba-Bq3j1cW5.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>J(()=>import(`./ini-BayloP2U.js`),[]))},{id:`java`,name:`Java`,import:(()=>J(()=>import(`./java-BMUwLm1h.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>J(()=>import(`./javascript-B8nPCUVp.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>J(()=>import(`./jinja-CkxiRcB3.js`),__vite__mapDeps([59,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>J(()=>import(`./jison-CFnN5uQs.js`),__vite__mapDeps([60,3])))},{id:`json`,name:`JSON`,import:(()=>J(()=>import(`./json-B7HNnjIx.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>J(()=>import(`./json5-CRSfdIrY.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>J(()=>import(`./jsonc-y4g9DQPx.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>J(()=>import(`./jsonl-D2paVn9r.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>J(()=>import(`./jsonnet-CLH27mtz.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>J(()=>import(`./jssm-CPPYaqX-.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>J(()=>import(`./jsx-BfVPuW3i.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>J(()=>import(`./julia-Bj0ETGjT.js`),__vite__mapDeps([61,23,24,25,26,16,3,20,62])))},{id:`just`,name:`Just`,import:(()=>J(()=>import(`./just-CqIe_c9k.js`),__vite__mapDeps([63,3,64,2,1,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38])))},{id:`kdl`,name:`KDL`,import:(()=>J(()=>import(`./kdl-D1BQjjnw.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>J(()=>import(`./kotlin-ndCaDnf0.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>J(()=>import(`./kusto-D-4nbkD3.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>J(()=>import(`./latex-Cvy8E64e.js`),__vite__mapDeps([65,66,62])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>J(()=>import(`./lean-YmtAsB0p.js`),[]))},{id:`less`,name:`Less`,import:(()=>J(()=>import(`./less-DyHub3ow.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>J(()=>import(`./liquid-x09l8QqE.js`),__vite__mapDeps([67,2,1,3,7])))},{id:`llvm`,name:`LLVM IR`,import:(()=>J(()=>import(`./llvm-DCcqrY0D.js`),[]))},{id:`log`,name:`Log file`,import:(()=>J(()=>import(`./log-DWAAMNbe.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>J(()=>import(`./logo-ClQMGkNL.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>J(()=>import(`./lua-BSlDLjt5.js`).then(e=>e.n),__vite__mapDeps([37,25])))},{id:`luau`,name:`Luau`,import:(()=>J(()=>import(`./luau-CmcXFvLt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>J(()=>import(`./make-DcfJyUzm.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>J(()=>import(`./markdown-DXxotAxn.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>J(()=>import(`./marko-CoNMQlTn.js`),__vite__mapDeps([68,2,69,5,13])))},{id:`matlab`,name:`MATLAB`,import:(()=>J(()=>import(`./matlab-BlfbTznR.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>J(()=>import(`./mdc-BSzVESPu.js`),__vite__mapDeps([70,15,1,2,3,40,38])))},{id:`mdx`,name:`MDX`,import:(()=>J(()=>import(`./mdx-H8fyPQd8.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>J(()=>import(`./mermaid-CWAV2dmV.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>J(()=>import(`./mipsasm-BWYFAm2s.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>J(()=>import(`./mojo-DZcPJEIN.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>J(()=>import(`./moonbit-6eslNlJL.js`),[]))},{id:`move`,name:`Move`,import:(()=>J(()=>import(`./move-DxFc9-QU.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>J(()=>import(`./narrat-gv38dJOT.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>J(()=>import(`./nextflow-DSfydIxt.js`),__vite__mapDeps([71,72])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>J(()=>import(`./nextflow-groovy-DV4H3hok.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>J(()=>import(`./nginx-CBhJTj0i.js`),__vite__mapDeps([73,37,25])))},{id:`nim`,name:`Nim`,import:(()=>J(()=>import(`./nim-CtHbOBlO.js`),__vite__mapDeps([74,25,2,24,1,3,40,8,9])))},{id:`nix`,name:`Nix`,import:(()=>J(()=>import(`./nix-NlOz3HGM.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>J(()=>import(`./nushell-D86Z8aFF.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>J(()=>import(`./objective-c-iuJvUjCv.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>J(()=>import(`./objective-cpp-C62JvfMT.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>J(()=>import(`./ocaml-Rbryo9lg.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>J(()=>import(`./odin-CfaOVNP_.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>J(()=>import(`./openscad-DCRhgheK.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>J(()=>import(`./pascal-CTesTHtV.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>J(()=>import(`./perl-DLMzG3tu.js`),__vite__mapDeps([64,2,1,3,16,8,9])))},{id:`php`,name:`PHP`,import:(()=>J(()=>import(`./php-KomVR3Hz.js`),__vite__mapDeps([75,2,1,3,7,16,8,9])))},{id:`pkl`,name:`Pkl`,import:(()=>J(()=>import(`./pkl-BjUMjQkt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>J(()=>import(`./plsql-BgKEZSSo.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>J(()=>import(`./po-C5s_CVt8.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>J(()=>import(`./polar-y4hX8qM0.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>J(()=>import(`./postcss-BHCm7Qae.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>J(()=>import(`./powerquery-C2vMt8aZ.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>J(()=>import(`./powershell-DEcjmg1c.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>J(()=>import(`./prisma-Ba-Tcxy5.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>J(()=>import(`./prolog-B4o261Jv.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>J(()=>import(`./proto-o3IZKiMR.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>J(()=>import(`./pug-T4SRLx8P.js`),__vite__mapDeps([76,2,1,3])))},{id:`puppet`,name:`Puppet`,import:(()=>J(()=>import(`./puppet-BC0dqZ31.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>J(()=>import(`./purescript-CLDw1y5G.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>J(()=>import(`./python-D1NFioGW.js`),[]))},{id:`qml`,name:`QML`,import:(()=>J(()=>import(`./qml-DJdSRUmU.js`),__vite__mapDeps([77,3])))},{id:`qmldir`,name:`QML Directory`,import:(()=>J(()=>import(`./qmldir-B7i9e9Vn.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>J(()=>import(`./qss-DIe6oKX8.js`),[]))},{id:`r`,name:`R`,import:(()=>J(()=>import(`./r-CwuTg9lK.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>J(()=>import(`./racket-CAOC_yyk.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>J(()=>import(`./raku-Ccua3vW6.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>J(()=>import(`./razor-Ch4dgsGY.js`),__vite__mapDeps([78,79,1,2,3])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>J(()=>import(`./reg-CAYZT9kE.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>J(()=>import(`./regexp-D2GTwJE0.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>J(()=>import(`./rel-cvB6F5nO.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>J(()=>import(`./riscv-SYGtE4EN.js`),[]))},{id:`ron`,name:`RON`,import:(()=>J(()=>import(`./ron-CRt869SB.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>J(()=>import(`./rosmsg-BwrfJ66Z.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>J(()=>import(`./rst-D78f0DyR.js`),__vite__mapDeps([80,81,23,24,25,26,16,15,1,2,3,20,33,34,35,12,13,36,37,28,8,9,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>J(()=>import(`./ruby-BUcw6ITs.js`),__vite__mapDeps([33,25,23,24,26,16,2,34,3,35,12,13,36,1,37,28,8,9,38])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>J(()=>import(`./rust-DCKTTPxN.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>J(()=>import(`./sas-DoT2JDsj.js`),__vite__mapDeps([82,16])))},{id:`sass`,name:`Sass`,import:(()=>J(()=>import(`./sass-CorcwySt.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>J(()=>import(`./scala-DlI-OmYj.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>J(()=>import(`./scheme-CcNEGkZH.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>J(()=>import(`./scss-B6G_d-6b.js`).then(e=>e.n),__vite__mapDeps([5,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>J(()=>import(`./sdbl-AL_m-RO_.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>J(()=>import(`./shaderlab-CbbQwRPF.js`),__vite__mapDeps([83,84])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>J(()=>import(`./shellscript-DI252Bga.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>J(()=>import(`./shellsession-BuO_s8FQ.js`),__vite__mapDeps([85,28])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>J(()=>import(`./smalltalk-Y2ogrfbk.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>J(()=>import(`./solidity-Bfbm9QZQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>J(()=>import(`./soy-DZTZJTEE.js`),__vite__mapDeps([86,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>J(()=>import(`./sparql-DEoxFJ5d.js`),__vite__mapDeps([87,88])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>J(()=>import(`./splunk-6DJA2XFa.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>J(()=>import(`./sql-C4isoJr_.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>J(()=>import(`./ssh-config-CbQtdF-u.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>J(()=>import(`./stata-Dhu6qITh.js`),__vite__mapDeps([89,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>J(()=>import(`./stylus-B_iq45Sj.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>J(()=>import(`./surrealql-CSDpq5j3.js`),__vite__mapDeps([90,3])))},{id:`svelte`,name:`Svelte`,import:(()=>J(()=>import(`./svelte-C4ITAvxr.js`),__vite__mapDeps([91,2,3,11,13])))},{id:`swift`,name:`Swift`,import:(()=>J(()=>import(`./swift-C7KIgN-p.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>J(()=>import(`./system-verilog-C3G9wERd.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>J(()=>import(`./systemd-CwxGrojj.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>J(()=>import(`./talonscript-DqnSo1EO.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>J(()=>import(`./tasl-T8ethp86.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>J(()=>import(`./tcl-Ccl366o0.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>J(()=>import(`./templ-BTgKA9-7.js`),__vite__mapDeps([92,2,93,3])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>J(()=>import(`./terraform-BBf6ZI_0.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>J(()=>import(`./tex-Dg4N9ndP.js`),__vite__mapDeps([66,62])))},{id:`toml`,name:`TOML`,import:(()=>J(()=>import(`./toml-C5Z_BR4r.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>J(()=>import(`./ts-tags-BufYnYos.js`),__vite__mapDeps([94,2,24,25,1,3,16,13,8,9])))},{id:`tsv`,name:`TSV`,import:(()=>J(()=>import(`./tsv-rX8sUJs7.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>J(()=>import(`./tsx-DmkFP0sw.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>J(()=>import(`./turtle-BM-MG8WY.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>J(()=>import(`./twig-BJv_IWYK.js`),__vite__mapDeps([95,2,3,75,1,7,16,8,9,20,33,25,23,24,26,34,35,12,13,36,37,28,38,5])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>J(()=>import(`./typescript-BKp05Qme.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>J(()=>import(`./typespec-C5gKydvR.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>J(()=>import(`./typst--_5VchrY.js`),[]))},{id:`v`,name:`V`,import:(()=>J(()=>import(`./v-C6PwpmTC.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>J(()=>import(`./vala-4pTaceSj.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>J(()=>import(`./vb-DhoR5A6S.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>J(()=>import(`./verilog-B9f_1lPn.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>J(()=>import(`./vhdl-Cy4RAmOe.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>J(()=>import(`./viml-CFQW-CcD.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>J(()=>import(`./vue-BsHXCXzh.js`),__vite__mapDeps([96,2,15,1,3,7,13])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>J(()=>import(`./vue-html-CCsH-lmo.js`),__vite__mapDeps([97,3])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>J(()=>import(`./vue-vine-B5P1JXxo.js`),__vite__mapDeps([98,2,3,69,11,5,99])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>J(()=>import(`./vyper-BW5zj9bE.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>J(()=>import(`./wasm-BigxSLnm.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>J(()=>import(`./wenyan-BZzM1SQT.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>J(()=>import(`./wgsl-xBPHbLlq.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>J(()=>import(`./wikitext-BXJWUNJK.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>J(()=>import(`./wit-2GnUs67P.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>J(()=>import(`./wolfram-DIFDmw-g.js`),[]))},{id:`xml`,name:`XML`,import:(()=>J(()=>import(`./xml-CFkhYff0.js`).then(e=>e.n),__vite__mapDeps([8,9])))},{id:`xsl`,name:`XSL`,import:(()=>J(()=>import(`./xsl-Dc5XRzm6.js`),__vite__mapDeps([100,8,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>J(()=>import(`./yaml-BTCCxCxi.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>J(()=>import(`./zenscript-DQaUUjbx.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>J(()=>import(`./zig-BDepRvBi.js`),[]))}],Sc=Object.fromEntries(xc.map(e=>[e.id,e.import])),Cc=Object.fromEntries(xc.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),wc={...Sc,...Cc},Tc=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>J(()=>import(`./andromeeda-Ch2kWS7s.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>J(()=>import(`./aurora-x-BHLqzt7j.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>J(()=>import(`./ayu-dark-DCotN_ZT.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>J(()=>import(`./ayu-light-CKB6o_im.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>J(()=>import(`./ayu-mirage-B38lW-C5.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-frappe-BY_2ofjk.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>J(()=>import(`./catppuccin-latte-D6GXPBmA.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-macchiato-BuW8_cyo.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>J(()=>import(`./catppuccin-mocha-znex9DPe.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>J(()=>import(`./dark-plus-BvePH-r3.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>J(()=>import(`./dracula-kJQjC_Gy.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>J(()=>import(`./dracula-soft-B3XhEjCl.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>J(()=>import(`./everforest-dark-u0zLn75q.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>J(()=>import(`./everforest-light-D3syIoAR.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>J(()=>import(`./github-dark-CEBLh0--.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>J(()=>import(`./github-dark-default-Dq0Z4Xai.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>J(()=>import(`./github-dark-dimmed-D90YmS4w.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>J(()=>import(`./github-dark-high-contrast-B6BWv1iC.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>J(()=>import(`./github-light-lXSVSq5T.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>J(()=>import(`./github-light-default-DsPWmj4v.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>J(()=>import(`./github-light-high-contrast-C7aLb3kp.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-hard-_deksD0U.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-medium-CT31284j.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>J(()=>import(`./gruvbox-dark-soft-BZuEUCbj.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-hard-dxv4n_ZS.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-medium-BsW_fVfR.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>J(()=>import(`./gruvbox-light-soft-BiGy99gD.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>J(()=>import(`./horizon-Ngud75Kn.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>J(()=>import(`./horizon-bright-Cnljd0XD.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>J(()=>import(`./houston-BenZxlMr.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>J(()=>import(`./kanagawa-dragon-Bt5mhLu1.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>J(()=>import(`./kanagawa-lotus-FGA3pRJk.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>J(()=>import(`./kanagawa-wave-DnLVZPAD.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>J(()=>import(`./laserwave-D2qAZkaG.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>J(()=>import(`./light-plus-CP13QUvm.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>J(()=>import(`./material-theme-JFoPTBSr.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>J(()=>import(`./material-theme-darker-BHaqZ19v.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>J(()=>import(`./material-theme-lighter-CGnnS2bs.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>J(()=>import(`./material-theme-ocean-Drhewjqf.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>J(()=>import(`./material-theme-palenight-DbUypmpb.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>J(()=>import(`./min-dark-BEelvXUB.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>J(()=>import(`./min-light-CTPBOACR.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>J(()=>import(`./monokai-DQlZXbkg.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>J(()=>import(`./night-owl-BLcrYhaC.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>J(()=>import(`./night-owl-light-BG-tBJOz.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>J(()=>import(`./nord-Dm2F5_QB.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>J(()=>import(`./one-dark-pro-DC9SHdX0.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>J(()=>import(`./one-light-Doo39p0H.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>J(()=>import(`./plastic-B3CcSpon.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>J(()=>import(`./poimandres-BsK70ma5.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>J(()=>import(`./red-DtDH206x.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>J(()=>import(`./rose-pine-CjBfSJ5b.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>J(()=>import(`./rose-pine-dawn-C0xwy7iJ.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>J(()=>import(`./rose-pine-moon-BSNy9Ty0.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>J(()=>import(`./slack-dark-rMhrfPm6.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>J(()=>import(`./slack-ochin-9w8X74hU.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>J(()=>import(`./snazzy-light-DHr9ygpP.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>J(()=>import(`./solarized-dark-UPcKev9Q.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>J(()=>import(`./solarized-light-DUsjROvl.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>J(()=>import(`./synthwave-84-lf_Wt0K_.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>J(()=>import(`./tokyo-night-BF5ata25.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>J(()=>import(`./vesper-CmBi_iCT.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>J(()=>import(`./vitesse-black-CE8RoBJP.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>J(()=>import(`./vitesse-dark-BpF142p_.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>J(()=>import(`./vitesse-light-CMwxPBrg.js`),[]))}].map(e=>[e.id,e.import])),Ec=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Dc(){return 2147483648}function Oc(){return typeof performance<`u`?performance.now():Date.now()}var kc=(e,t)=>e+(t-e%t)%t;async function Ac(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=Dc();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,kc(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:Oc,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 jc=Object.defineProperty,Mc=(e,t,n)=>t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nc=(e,t,n)=>Mc(e,typeof t==`symbol`?t:t+``,n),Pc=null;function Fc(e){throw new Ec(e.UTF8ToString(e.getLastOnigError()))}var Ic=class e{constructor(t){Nc(this,`utf16Length`),Nc(this,`utf8Length`),Nc(this,`utf16Value`),Nc(this,`utf8Value`),Nc(this,`utf16OffsetToUtf8`),Nc(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)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Lc=class e{constructor(t){if(Nc(this,`id`,++e.LAST_ID),Nc(this,`_onigBinding`),Nc(this,`content`),Nc(this,`utf16Length`),Nc(this,`utf8Length`),Nc(this,`utf16OffsetToUtf8`),Nc(this,`utf8OffsetToUtf16`),Nc(this,`ptr`),!Pc)throw new Ec(`Must invoke loadWasm first.`);this._onigBinding=Pc,this.content=t;let n=new Ic(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=Pc.omalloc(1e4),e._sharedPtrInUse=!0,Pc.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(Pc)}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)}};Nc(Lc,`LAST_ID`,0),Nc(Lc,`_sharedPtr`,0),Nc(Lc,`_sharedPtrInUse`,!1);var Rc=Lc,zc=class{constructor(e){if(Nc(this,`_onigBinding`),Nc(this,`_ptr`),!Pc)throw new Ec(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ic(e[r]);t[r]=i.createString(Pc),n[r]=i.utf8Length}let r=Pc.omalloc(4*e.length);Pc.HEAPU32.set(t,r/4);let i=Pc.omalloc(4*e.length);Pc.HEAPU32.set(n,i/4);let a=Pc.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)Pc.ofree(t[n]);Pc.ofree(i),Pc.ofree(r),a===0&&Fc(Pc),this._onigBinding=Pc,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 Rc(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 Bc(e){return typeof e.instantiator==`function`}function Vc(e){return typeof e.default==`function`}function Hc(e){return e.data!==void 0}function Uc(e){return typeof Response<`u`&&e instanceof Response}function Wc(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 Gc;function Kc(e){if(Gc)return Gc;async function t(){Pc=await Ac(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Bc(n)?n=await n.instantiator(t):Vc(n)?n=await n.default(t):(Hc(n)&&(n=n.data),Uc(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Jc(n)(t):await Yc(n)(t):Wc(n)||n instanceof WebAssembly.Module?n=await qc(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await qc(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Gc=t(),Gc}function qc(e){return t=>WebAssembly.instantiate(e,t)}function Jc(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Yc(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Xc(e){return e&&await Kc(e),{createScanner(e){return new zc(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Rc(e)}}}var Zc=hc({langs:wc,themes:Tc,engine:()=>Xc(J(()=>import(`./wasm-CSccDuAq.js`),[]))}),{codeToHtml:Qc,codeToHast:$c,codeToTokens:el,codeToTokensBase:tl,codeToTokensWithThemes:nl,getSingletonHighlighter:rl,getLastGrammarState:il}=_c(Zc,{guessEmbeddedLanguages:ts});function al(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function ol(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var sl=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),cl=String.raw;function ll(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ul=cl`\[\^?`,dl=`c.? | C(?:-.?)?|${cl`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${cl`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${cl`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${cl`o\{[^\}]*\}?`}|${cl`\d{1,3}`}`,fl=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,pl=new RegExp(cl`
|
|
22
22
|
\\ (?:
|
|
23
23
|
${dl}
|
|
24
24
|
| [gk]<[^>]*>?
|
|
@@ -1884,7 +1884,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[Nu(e),e])),Dd=new Map([[`s`,dd(383)],[dd(383
|
|
|
1884
1884
|
--font-sans: ${g}${r} !important;
|
|
1885
1885
|
--font-mono: ${_}${r} !important;
|
|
1886
1886
|
}
|
|
1887
|
-
`,()=>{h?.remove()}},[e,t,n])}var RE=[`viewed`];async function zE(){return(await fetch(`/api/viewed`)).json()}function BE(){let e=Ve(),{data:t=[]}=nt({queryKey:RE,queryFn:zE});return{viewedFiles:(0,W.useMemo)(()=>new Set(t),[t]),setViewed:(0,W.useCallback)(async(t,n)=>{e.setQueryData(RE,(e=[])=>n?e.includes(t)?e:[...e,t]:e.filter(e=>e!==t)),await fetch(`/api/viewed`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:t,viewed:n})})},[e])}}var VE=100;function HE(e=VE){let[t,n]=(0,W.useState)([]),[r,i]=(0,W.useState)(-1),a=(0,W.useRef)(-1),o=(0,W.useRef)([]);return{jumpList:t,jumpListIndex:r,addToJumpList:(0,W.useCallback)((t,r)=>{let s=a.current,c=o.current.slice(0,s+1);for(c.push({scrollY:t,file:r});c.length>e;)c.shift();let l=Math.min(s+1,e-1);o.current=c,a.current=l,n(c),i(l)},[e]),goBack:(0,W.useCallback)(()=>{if(a.current<=0)return null;let e=a.current-1,t=o.current[e]??null;return a.current=e,i(e),t},[]),goForward:(0,W.useCallback)(()=>{if(a.current>=o.current.length-1)return null;let e=a.current+1,t=o.current[e]??null;return a.current=e,i(e),t},[])}}var UE={success:{pattern:[{duration:30,intensity:.5},{delay:60,duration:40,intensity:1}]},warning:{pattern:[{duration:40,intensity:.8},{delay:100,duration:40,intensity:.6}]},error:{pattern:[{duration:40,intensity:.9},{delay:40,duration:40,intensity:.9},{delay:40,duration:40,intensity:.9}]},light:{pattern:[{duration:15,intensity:.4}]},medium:{pattern:[{duration:25,intensity:.7}]},heavy:{pattern:[{duration:35,intensity:1}]},soft:{pattern:[{duration:40,intensity:.5}]},rigid:{pattern:[{duration:10,intensity:1}]},selection:{pattern:[{duration:8,intensity:.3}]},nudge:{pattern:[{duration:80,intensity:.8},{delay:80,duration:50,intensity:.3}]},buzz:{pattern:[{duration:1e3,intensity:1}]}},WE=16,GE=184,KE=1e3,qE=20;function JE(e){if(typeof e==`number`)return{vibrations:[{duration:e}]};if(typeof e==`string`){let t=UE[e];return t?{vibrations:t.pattern.map(e=>({...e}))}:(console.warn(`[web-haptics] Unknown preset: "${e}"`),null)}if(Array.isArray(e)){if(e.length===0)return{vibrations:[]};if(typeof e[0]==`number`){let t=e,n=[];for(let e=0;e<t.length;e+=2){let r=e>0?t[e-1]:0;n.push({...r>0&&{delay:r},duration:t[e]})}return{vibrations:n}}return{vibrations:e.map(e=>({...e}))}}return{vibrations:e.pattern.map(e=>({...e}))}}function YE(e,t){if(t>=1)return[e];if(t<=0)return[];let n=Math.max(1,Math.round(qE*t)),r=qE-n,i=[],a=e;for(;a>=qE;)i.push(n),i.push(r),a-=qE;if(a>0){let e=Math.max(1,Math.round(a*t));i.push(e);let n=a-e;n>0&&i.push(n)}return i}function XE(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=Math.max(0,Math.min(1,i.intensity??t)),o=i.delay??0;o>0&&(n.length>0&&n.length%2==0?n[n.length-1]+=o:(n.length===0&&n.push(0),n.push(o)));let s=YE(i.duration,a);if(s.length===0){n.length>0&&n.length%2==0?n[n.length-1]+=i.duration:i.duration>0&&(n.push(0),n.push(i.duration));continue}for(let e of s)n.push(e)}return n}var ZE=0,QE=class e{hapticLabel=null;domInitialized=!1;instanceId;debug;showSwitch;rafId=null;patternResolve=null;audioCtx=null;audioFilter=null;audioGain=null;audioBuffer=null;constructor(e){this.instanceId=++ZE,this.debug=e?.debug??!1,this.showSwitch=e?.showSwitch??!1}static isSupported=typeof navigator<`u`&&typeof navigator.vibrate==`function`;async trigger(t=[{duration:25,intensity:.7}],n){let r=JE(t);if(!r)return;let{vibrations:i}=r;if(i.length===0)return;let a=Math.max(0,Math.min(1,n?.intensity??.5));for(let e of i)if(e.duration>KE&&(e.duration=KE),!Number.isFinite(e.duration)||e.duration<0||e.delay!==void 0&&(!Number.isFinite(e.delay)||e.delay<0)){console.warn(`[web-haptics] Invalid vibration values. Durations and delays must be finite non-negative numbers.`);return}if(e.isSupported&&navigator.vibrate(XE(i,a)),!e.isSupported||this.debug){if(this.ensureDOM(),!this.hapticLabel)return;this.debug&&await this.ensureAudio(),this.stopPattern();let e=(i[0]?.delay??0)===0;if(e&&(this.hapticLabel.click(),this.debug&&this.audioCtx)){let e=Math.max(0,Math.min(1,i[0].intensity??a));this.playClick(e)}await this.runPattern(i,a,e)}}cancel(){this.stopPattern(),e.isSupported&&navigator.vibrate(0)}destroy(){this.stopPattern(),this.hapticLabel&&(this.hapticLabel.remove(),this.hapticLabel=null,this.domInitialized=!1),this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setDebug(e){this.debug=e,!e&&this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setShowSwitch(e){if(this.showSwitch=e,this.hapticLabel){let t=this.hapticLabel.querySelector(`input`);this.hapticLabel.style.display=e?``:`none`,t&&(t.style.display=e?``:`none`)}}stopPattern(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.patternResolve?.(),this.patternResolve=null}runPattern(e,t,n){return new Promise(r=>{this.patternResolve=r;let i=[],a=0;for(let n of e){let e=Math.max(0,Math.min(1,n.intensity??t)),r=n.delay??0;r>0&&(a+=r,i.push({end:a,isOn:!1,intensity:0})),a+=n.duration,i.push({end:a,isOn:!0,intensity:e})}let o=a,s=0,c=-1,l=e=>{s===0&&(s=e);let t=e-s;if(t>=o){this.rafId=null,this.patternResolve=null,r();return}let a=i[0];for(let e of i)if(t<e.end){a=e;break}if(a.isOn){let t=WE+(1-a.intensity)*GE;c===-1?(c=e,n||=(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(a.intensity),!0)):e-c>=t&&(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(a.intensity),c=e)}this.rafId=requestAnimationFrame(l)};this.rafId=requestAnimationFrame(l)})}playClick(e){if(!this.audioCtx||!this.audioFilter||!this.audioGain||!this.audioBuffer)return;let t=this.audioBuffer.getChannelData(0);for(let e=0;e<t.length;e++)t[e]=(Math.random()*2-1)*Math.exp(-e/25);this.audioGain.gain.value=.5*e;let n=2e3+e*2e3,r=1+(Math.random()-.5)*.3;this.audioFilter.frequency.value=n*r;let i=this.audioCtx.createBufferSource();i.buffer=this.audioBuffer,i.connect(this.audioFilter),i.onended=()=>i.disconnect(),i.start()}async ensureAudio(){if(!this.audioCtx&&typeof AudioContext<`u`){this.audioCtx=new AudioContext,this.audioFilter=this.audioCtx.createBiquadFilter(),this.audioFilter.type=`bandpass`,this.audioFilter.frequency.value=4e3,this.audioFilter.Q.value=8,this.audioGain=this.audioCtx.createGain(),this.audioFilter.connect(this.audioGain),this.audioGain.connect(this.audioCtx.destination),this.audioBuffer=this.audioCtx.createBuffer(1,this.audioCtx.sampleRate*.004,this.audioCtx.sampleRate);let e=this.audioBuffer.getChannelData(0);for(let t=0;t<e.length;t++)e[t]=(Math.random()*2-1)*Math.exp(-t/25)}this.audioCtx?.state===`suspended`&&await this.audioCtx.resume()}ensureDOM(){if(this.domInitialized||typeof document>`u`)return;let e=`web-haptics-${this.instanceId}`,t=document.createElement(`label`);t.setAttribute(`for`,e),t.textContent=`Haptic feedback`,t.style.position=`fixed`,t.style.bottom=`10px`,t.style.left=`10px`,t.style.padding=`5px 10px`,t.style.backgroundColor=`rgba(0, 0, 0, 0.7)`,t.style.color=`white`,t.style.fontFamily=`sans-serif`,t.style.fontSize=`14px`,t.style.borderRadius=`4px`,t.style.zIndex=`9999`,t.style.userSelect=`none`,this.hapticLabel=t;let n=document.createElement(`input`);n.type=`checkbox`,n.setAttribute(`switch`,``),n.id=e,n.style.all=`initial`,n.style.appearance=`auto`,this.showSwitch||(t.style.display=`none`,n.style.display=`none`),t.appendChild(n),document.body.appendChild(t),this.domInitialized=!0}};function $E(e){let t=(0,W.useRef)(null);return(0,W.useEffect)(()=>(t.current=new QE(e),()=>{t.current?.destroy(),t.current=null}),[]),(0,W.useEffect)(()=>{t.current?.setDebug(e?.debug??!1)},[e?.debug]),(0,W.useEffect)(()=>{t.current?.setShowSwitch(e?.showSwitch??!1)},[e?.showSwitch]),{trigger:(0,W.useCallback)((e,n)=>t.current?.trigger(e,n),[]),cancel:(0,W.useCallback)(()=>t.current?.cancel(),[]),isSupported:QE.isSupported}}var eD=(0,W.createContext)({hapticsEnabled:!1,soundsEnabled:!1,haptic:()=>{},sound:()=>{}}),tD=null;function nD(){if(typeof window>`u`)return null;if(tD)return tD;try{tD=new(window.AudioContext||window.webkitAudioContext)}catch{tD=null}return tD}function rD(e,t){let n=e.currentTime,r=e.destination,i=(t,i,a,o,s,c)=>{let l=e.createOscillator(),u=e.createGain();l.connect(u),u.connect(r),l.type=i,l.frequency.setValueAtTime(t,n+o),c!==void 0&&l.frequency.exponentialRampToValueAtTime(c,n+o+s),u.gain.setValueAtTime(a,n+o),u.gain.exponentialRampToValueAtTime(.001,n+o+s),l.start(n+o),l.stop(n+o+s)};switch(t){case`click`:i(700,`sine`,.16,0,.03,350);break;case`toggle`:i(460,`square`,.06,0,.04,230);break;case`navigate`:i(520,`sine`,.07,0,.02);break;case`open`:i(210,`sine`,.12,0,.13,560);break;case`close`:i(560,`sine`,.1,0,.11,210);break;case`success`:i(523,`sine`,.17,0,.1),i(784,`sine`,.17,.09,.13);break;case`resolve`:i(659,`sine`,.15,0,.1),i(988,`sine`,.15,.09,.13);break;case`send`:i(523,`sine`,.15,0,.1),i(659,`sine`,.15,.07,.1),i(784,`sine`,.15,.14,.14);break;case`error`:i(280,`sawtooth`,.16,0,.15,80);break;case`warning`:i(330,`sine`,.13,0,.09),i(330,`sine`,.09,.12,.09);break;case`remove`:i(380,`sine`,.13,0,.08,140);break}}var iD={current:!1},aD={current:!1},oD=null;function sD(e=`click`){if(!iD.current)return;let t=nD();t&&(t.state===`suspended`?t.resume():Promise.resolve()).then(()=>{try{rD(t,e)}catch{}}).catch(()=>{})}function cD(e=`selection`){if(!(!aD.current||!oD))try{oD(e)}catch{}}function lD(e=`selection`,t=`click`){cD(e),sD(t)}function uD({enabled:e,soundsEnabled:t,children:n}){let{trigger:r,isSupported:i}=$E({showSwitch:!1}),a=(0,W.useRef)(e);a.current=e;let o=(0,W.useRef)(t);o.current=t;let s=(0,W.useRef)(r);s.current=r,(0,W.useEffect)(()=>{aD.current=e&&i,oD=r}),(0,W.useEffect)(()=>{iD.current=t});let c=(0,W.useMemo)(()=>(e=`selection`)=>{if(a.current)try{s.current(e)}catch{}},[]),l=(0,W.useMemo)(()=>(e=`click`)=>{if(!o.current)return;let t=nD();t&&(t.state===`suspended`?t.resume():Promise.resolve()).then(()=>{try{rD(t,e)}catch{}}).catch(()=>{})},[]);(0,W.useEffect)(()=>{if(!e&&!t)return;let n=e=>{let t=e.target?.closest(`button, a[href], [role="button"], input[type="checkbox"], [role="option"]`);if(!t||t.disabled)return;let n=t.tagName===`INPUT`&&t.type===`checkbox`;if(a.current)try{s.current(`selection`)}catch{}if(o.current){let e=nD();e&&(e.state===`suspended`?e.resume():Promise.resolve()).then(()=>{try{rD(e,n?`toggle`:`click`)}catch{}}).catch(()=>{})}};return document.addEventListener(`click`,n,!0),()=>document.removeEventListener(`click`,n,!0)},[e,t]);let u=(0,W.useMemo)(()=>({hapticsEnabled:e&&i,soundsEnabled:t,haptic:c,sound:l}),[e,i,t,c,l]);return(0,G.jsx)(eD.Provider,{value:u,children:n})}function dD(){let{haptic:e,sound:t}=(0,W.useContext)(eD);return{haptic:e,sound:t}}var fD={};async function pD(){try{let e=await fetch(`/api/ui-state`);e.ok&&(fD=await e.json())}catch(e){console.error(`Failed to load UI state:`,e)}}function mD(e){let t=fD[e];return t==null?null:String(t)}var hD={},gD=null;function _D(){gD&&=(clearTimeout(gD),null);let e={...hD};hD={},fetch(`/api/ui-state`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}).catch(e=>{console.error(`Failed to save UI state:`,e)})}function vD(e,t){fD[e]=t,hD[e]=t,gD||=setTimeout(_D,200)}function yD(e){delete fD[e],hD[e]=null,gD||=setTimeout(_D,200)}function bD(e){return(0,W.useMemo)(()=>{let t=[];for(let n of e)for(let e of n.hunks)for(let r of e.hunkContent)if(r.type===`change`){if(r.additions>0){let i=r.additionLineIndex,a=r.additions;for(let r=0;r<a;r++){let a=i+r,o=n.additionLines[a];o&&o.trim()&&t.push({filePath:n.name,lineNumber:e.additionStart+(a-e.additionLineIndex),side:`additions`,content:o})}}if(r.deletions>0){let i=r.deletionLineIndex,a=r.deletions;for(let r=0;r<a;r++){let a=i+r,o=n.deletionLines[a];o&&o.trim()&&t.push({filePath:n.name,lineNumber:e.deletionStart+(a-e.deletionLineIndex),side:`deletions`,content:o})}}}return t},[e])}var xD=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),SD=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),CD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),wD=e=>{let t=CD(e);return t.charAt(0).toUpperCase()+t.slice(1)},TD={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ED=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},DD=(0,W.createContext)({}),OD=()=>(0,W.useContext)(DD),kD=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=OD()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...TD,width:t??l??TD.width,height:t??l??TD.height,stroke:e??f,strokeWidth:m,className:xD(`lucide`,p,i),...!a&&!ED(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),AD=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(kD,{ref:i,iconNode:t,className:xD(`lucide-${SD(wD(e))}`,`lucide-${e}`,n),...r}));return n.displayName=wD(e),n},jD=AD(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),MD=AD(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ND=AD(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),PD=AD(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),FD=AD(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ID=AD(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),LD=AD(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),RD=AD(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),zD=AD(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),BD=AD(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),VD=AD(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),HD=AD(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),UD=AD(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),WD=AD(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),GD=AD(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),KD=AD(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),qD=AD(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),JD=AD(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),YD=AD(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),XD=AD(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),ZD=AD(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),QD=AD(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),$D=AD(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),eO=AD(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),tO=AD(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),nO=AD(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),rO=AD(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),iO=AD(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),aO=AD(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),oO=AD(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),sO=AD(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),cO=AD(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),lO=AD(`message-square-warning`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 15h.01`,key:`q59x07`}],[`path`,{d:`M12 7v4`,key:`xawao1`}]]),uO=AD(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),dO=AD(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),fO=AD(`navigation`,[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]),pO=AD(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),mO=AD(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),hO=AD(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),gO=AD(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),_O=AD(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),vO=AD(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),yO=AD(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),bO=AD(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),xO=AD(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),SO=AD(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),CO=AD(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),wO=AD(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),TO=AD(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),EO=AD(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),DO=AD(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),OO=AD(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),kO=AD(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),AO=AD(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),jO=AD(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),MO=AD(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),NO={},PO={},FO=``;function IO(e){if(typeof document>`u`)return!1;let t=Cx(e);return U_(t).innerWidth-t.documentElement.clientWidth>0}function LO(e){let t=Cx(e),n=t.documentElement,r=t.body,i=Y_(n)?n:r,a=i.style.overflow;return i.style.overflow=`hidden`,()=>{i.style.overflow=a}}function RO(e){let t=Cx(e),n=t.documentElement,r=t.body,i=U_(n),a=0,o=0,s=xx.create(),c=typeof CSS<`u`&&CSS.supports?.(`scrollbar-gutter`,`stable`);if(Sv&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let e=i.getComputedStyle(n),t=i.getComputedStyle(r),s=(e.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,NO={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},FO=n.style.scrollBehavior,PO={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let l=n.scrollHeight>n.clientHeight,u=n.scrollWidth>n.clientWidth,d=e.overflowY===`scroll`||t.overflowY===`scroll`,f=e.overflowX===`scroll`||t.overflowX===`scroll`,p=Math.max(0,i.innerWidth-n.clientWidth),m=Math.max(0,i.innerHeight-n.clientHeight),h=parseFloat(t.marginTop)+parseFloat(t.marginBottom),g=parseFloat(t.marginLeft)+parseFloat(t.marginRight),_=Y_(n)?n:r;if(c){n.style.scrollbarGutter=s,_.style.overflowY=`hidden`,_.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:s,overflowY:`hidden`,overflowX:`hidden`}),(l||d)&&(n.style.overflowY=`scroll`),(u||f)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:h||m?`calc(100dvh - ${h+m}px)`:`100dvh`,width:g||p?`calc(100vw - ${g+p}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,NO),Object.assign(r.style,PO),c||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=FO)}function d(){u(),s.request(l)}return l(),i.addEventListener(`resize`,d),()=>{s.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var zO=new class{lockCount=0;restore=null;timeoutLock=z_.create();timeoutUnlock=z_.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Cx(e).documentElement,n=U_(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=zb;return}this.restore=Cv||!IO(e)?LO(e):RO(e)}};function BO(e=!0,t=null){Y(()=>{if(e)return zO.acquire(t)},[e,t])}var VO=W.createContext(void 0);function HO(e){let t=W.useContext(VO);if(t===void 0&&!e)throw Error(j_(47));return t}function UO(){return{...Sw(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}var WO={...Cw,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),openMethod:Z(e=>e.openMethod),openChangeReason:Z(e=>e.openChangeReason),modal:Z(e=>e.modal),stickIfOpen:Z(e=>e.stickIfOpen),titleElementId:Z(e=>e.titleElementId),descriptionElementId:Z(e=>e.descriptionElementId),openOnHover:Z(e=>e.openOnHover),closeDelay:Z(e=>e.closeDelay)},GO=class e extends uw{constructor(e){let t={...UO(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:W.createRef(),beforeContentFocusGuardRef:W.createRef(),stickIfOpenTimeout:new z_,triggerElements:new bw},WO)}setOpen=(e,t)=>{let n=t.reason===Yb,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),aS.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=F_(()=>t??new e(n)).current;return L_(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function KO(e){let t=W.useRef(``),n=W.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:W.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n&&e(n,n.pointerType),e(n,t.current),t.current=``},[e]),onPointerDown:n}}function qO(e){let[t,n]=W.useState(null),r=X((t,r)=>{e||n(r)}),i=W.useCallback(()=>{n(null)},[]),{onClick:a,onPointerDown:o}=KO(r);return W.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:a,onPointerDown:o}}),[t,i,a,o])}function JO({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=GO.useStore(s?.store,{open:n??r,modal:o,activeTriggerId:c===void 0?l:c});u.useControlledProp(`open`,n,r),u.useControlledProp(`activeTriggerId`,c,l);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g,reset:_}=qO(d);vw(u);let{forceUnmount:v}=yw(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null}),_()});BO(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),W.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let y=W.useCallback(e=>{let t=ox(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),b=W.useCallback(()=>{u.setOpen(!1,y(ix))},[u,y]);W.useImperativeHandle(e.actionsRef,()=>({unmount:v,close:b}),[v,b]);let x=Ew({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=zw([LC(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),Xw(x)]),T=W.useMemo(()=>S(g),[S,g]),E=W.useMemo(()=>w(g),[w,g]),D=W.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:Pb()!=null});let O=W.useMemo(()=>({store:u}),[u]);return(0,G.jsx)(VO.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function YO(e){return HO(!0)?(0,G.jsx)(JO,{props:e}):(0,G.jsx)(Rb,{children:(0,G.jsx)(JO,{props:e})})}var XO=W.createContext(void 0);function ZO(e=!1){let t=W.useContext(XO);if(t===void 0&&!e)throw Error(j_(16));return t}function QO(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:W.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function $O(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,a=W.useRef(null),o=ZO(!0)!==void 0,s=X(()=>{let e=a.current;return!!(e?.tagName===`A`&&e?.href)}),{props:c}=QO({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:r,isNativeButton:i}),l=W.useCallback(()=>{let e=a.current;ek(e)&&o&&t&&c.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,c.disabled,o]);return Y(l,[l]),{getButtonProps:W.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:l,...u}=e;return Wx({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Qx(e),o?.(e)),e.baseUIHandlerPrevented)return;let r=e.target===e.currentTarget&&!i&&!s()&&!t,a=e.key===`Enter`,c=e.key===` `;r&&((c||a)&&e.preventDefault(),a&&n?.(e))},onKeyUp(e){t||(Qx(e),a?.(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&e.key===` `&&n?.(e)},onPointerDown(e){if(t){e.preventDefault();return}l?.(e)}},i?void 0:{role:`button`},c,u)},[t,c,i,s]),buttonRef:X(e=>{a.current=e,l()})}}function ek(e){return q_(e)&&e.tagName===`BUTTON`}var tk=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=HO(!0),m=o?.store??p?.store;if(!m)throw Error(j_(74));let h=bT(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=W.useRef(null),{registerTrigger:b,isMountedByThisTrigger:x}=_w(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),S=m.useState(`openChangeReason`),C=m.useState(`stickIfOpen`),w=m.useState(`openMethod`),T=Rw(_,{enabled:_!=null&&c&&(w!==`touch`||S!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:eT(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),E=zw([SS(_,{enabled:_!=null,stickIfOpen:C})]),D=m.useState(`triggerProps`,x),O=W.useMemo(()=>({disabled:i,open:v}),[i,v]),{getButtonProps:k,buttonRef:A}=$O({disabled:i,native:a}),j=W.useMemo(()=>({open(e){return e&&S===`trigger-press`?vT.open(e):_T.open(e)}}),[S]),M=tS(`button`,e,{state:O,ref:[A,t,b,y],props:[E.getReferenceProps(),T,D,{[Ub]:``,id:h},f,k],stateAttributesMapping:j}),N=W.useRef(null),P=X(e=>{aS.flushSync(()=>{m.setOpen(!1,ox($b,e.nativeEvent,e.currentTarget))}),xb(N.current)?.focus()}),F=X(e=>{let t=m.select(`positionerElement`);if(t&&Sb(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{aS.flushSync(()=>{m.setOpen(!1,ox($b,e.nativeEvent,e.currentTarget))});let n=bb(y.current);for(;n!==null&&Rv(t,n)||n?.hasAttribute(`aria-hidden`);){let e=n;if(n=_b(n),n===e)break}n?.focus()}});return g?(0,G.jsxs)(W.Fragment,{children:[(0,G.jsx)(wx,{ref:N,onFocus:P}),(0,G.jsx)(W.Fragment,{children:M},h),(0,G.jsx)(wx,{ref:m.context.triggerFocusTargetRef,onFocus:F})]}):(0,G.jsx)(W.Fragment,{children:M},h)}),nk=W.createContext(void 0);function rk(){let e=W.useContext(nk);if(e===void 0)throw Error(j_(45));return e}var ik=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=HO();return i.useState(`mounted`)||n?(0,G.jsx)(nk.Provider,{value:n,children:(0,G.jsx)(uS,{ref:t,...r,renderGuards:!1})}):null}),ak=W.createContext(void 0);function ok(){let e=W.useContext(ak);if(!e)throw Error(j_(46));return e}var sk=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
|
|
1887
|
+
`,()=>{h?.remove()}},[e,t,n])}var RE=[`viewed`];async function zE(){return(await fetch(`/api/viewed`)).json()}function BE(){let e=Ve(),{data:t=[]}=nt({queryKey:RE,queryFn:zE});return{viewedFiles:(0,W.useMemo)(()=>new Set(t),[t]),setViewed:(0,W.useCallback)(async(t,n)=>{e.setQueryData(RE,(e=[])=>n?e.includes(t)?e:[...e,t]:e.filter(e=>e!==t)),await fetch(`/api/viewed`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:t,viewed:n})})},[e])}}var VE={success:{pattern:[{duration:30,intensity:.5},{delay:60,duration:40,intensity:1}]},warning:{pattern:[{duration:40,intensity:.8},{delay:100,duration:40,intensity:.6}]},error:{pattern:[{duration:40,intensity:.9},{delay:40,duration:40,intensity:.9},{delay:40,duration:40,intensity:.9}]},light:{pattern:[{duration:15,intensity:.4}]},medium:{pattern:[{duration:25,intensity:.7}]},heavy:{pattern:[{duration:35,intensity:1}]},soft:{pattern:[{duration:40,intensity:.5}]},rigid:{pattern:[{duration:10,intensity:1}]},selection:{pattern:[{duration:8,intensity:.3}]},nudge:{pattern:[{duration:80,intensity:.8},{delay:80,duration:50,intensity:.3}]},buzz:{pattern:[{duration:1e3,intensity:1}]}},HE=16,UE=184,WE=1e3,GE=20;function KE(e){if(typeof e==`number`)return{vibrations:[{duration:e}]};if(typeof e==`string`){let t=VE[e];return t?{vibrations:t.pattern.map(e=>({...e}))}:(console.warn(`[web-haptics] Unknown preset: "${e}"`),null)}if(Array.isArray(e)){if(e.length===0)return{vibrations:[]};if(typeof e[0]==`number`){let t=e,n=[];for(let e=0;e<t.length;e+=2){let r=e>0?t[e-1]:0;n.push({...r>0&&{delay:r},duration:t[e]})}return{vibrations:n}}return{vibrations:e.map(e=>({...e}))}}return{vibrations:e.pattern.map(e=>({...e}))}}function qE(e,t){if(t>=1)return[e];if(t<=0)return[];let n=Math.max(1,Math.round(GE*t)),r=GE-n,i=[],a=e;for(;a>=GE;)i.push(n),i.push(r),a-=GE;if(a>0){let e=Math.max(1,Math.round(a*t));i.push(e);let n=a-e;n>0&&i.push(n)}return i}function JE(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=Math.max(0,Math.min(1,i.intensity??t)),o=i.delay??0;o>0&&(n.length>0&&n.length%2==0?n[n.length-1]+=o:(n.length===0&&n.push(0),n.push(o)));let s=qE(i.duration,a);if(s.length===0){n.length>0&&n.length%2==0?n[n.length-1]+=i.duration:i.duration>0&&(n.push(0),n.push(i.duration));continue}for(let e of s)n.push(e)}return n}var YE=0,XE=class e{hapticLabel=null;domInitialized=!1;instanceId;debug;showSwitch;rafId=null;patternResolve=null;audioCtx=null;audioFilter=null;audioGain=null;audioBuffer=null;constructor(e){this.instanceId=++YE,this.debug=e?.debug??!1,this.showSwitch=e?.showSwitch??!1}static isSupported=typeof navigator<`u`&&typeof navigator.vibrate==`function`;async trigger(t=[{duration:25,intensity:.7}],n){let r=KE(t);if(!r)return;let{vibrations:i}=r;if(i.length===0)return;let a=Math.max(0,Math.min(1,n?.intensity??.5));for(let e of i)if(e.duration>WE&&(e.duration=WE),!Number.isFinite(e.duration)||e.duration<0||e.delay!==void 0&&(!Number.isFinite(e.delay)||e.delay<0)){console.warn(`[web-haptics] Invalid vibration values. Durations and delays must be finite non-negative numbers.`);return}if(e.isSupported&&navigator.vibrate(JE(i,a)),!e.isSupported||this.debug){if(this.ensureDOM(),!this.hapticLabel)return;this.debug&&await this.ensureAudio(),this.stopPattern();let e=(i[0]?.delay??0)===0;if(e&&(this.hapticLabel.click(),this.debug&&this.audioCtx)){let e=Math.max(0,Math.min(1,i[0].intensity??a));this.playClick(e)}await this.runPattern(i,a,e)}}cancel(){this.stopPattern(),e.isSupported&&navigator.vibrate(0)}destroy(){this.stopPattern(),this.hapticLabel&&(this.hapticLabel.remove(),this.hapticLabel=null,this.domInitialized=!1),this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setDebug(e){this.debug=e,!e&&this.audioCtx&&(this.audioCtx.close(),this.audioCtx=null,this.audioFilter=null,this.audioGain=null,this.audioBuffer=null)}setShowSwitch(e){if(this.showSwitch=e,this.hapticLabel){let t=this.hapticLabel.querySelector(`input`);this.hapticLabel.style.display=e?``:`none`,t&&(t.style.display=e?``:`none`)}}stopPattern(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.patternResolve?.(),this.patternResolve=null}runPattern(e,t,n){return new Promise(r=>{this.patternResolve=r;let i=[],a=0;for(let n of e){let e=Math.max(0,Math.min(1,n.intensity??t)),r=n.delay??0;r>0&&(a+=r,i.push({end:a,isOn:!1,intensity:0})),a+=n.duration,i.push({end:a,isOn:!0,intensity:e})}let o=a,s=0,c=-1,l=e=>{s===0&&(s=e);let t=e-s;if(t>=o){this.rafId=null,this.patternResolve=null,r();return}let a=i[0];for(let e of i)if(t<e.end){a=e;break}if(a.isOn){let t=HE+(1-a.intensity)*UE;c===-1?(c=e,n||=(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(a.intensity),!0)):e-c>=t&&(this.hapticLabel?.click(),this.debug&&this.audioCtx&&this.playClick(a.intensity),c=e)}this.rafId=requestAnimationFrame(l)};this.rafId=requestAnimationFrame(l)})}playClick(e){if(!this.audioCtx||!this.audioFilter||!this.audioGain||!this.audioBuffer)return;let t=this.audioBuffer.getChannelData(0);for(let e=0;e<t.length;e++)t[e]=(Math.random()*2-1)*Math.exp(-e/25);this.audioGain.gain.value=.5*e;let n=2e3+e*2e3,r=1+(Math.random()-.5)*.3;this.audioFilter.frequency.value=n*r;let i=this.audioCtx.createBufferSource();i.buffer=this.audioBuffer,i.connect(this.audioFilter),i.onended=()=>i.disconnect(),i.start()}async ensureAudio(){if(!this.audioCtx&&typeof AudioContext<`u`){this.audioCtx=new AudioContext,this.audioFilter=this.audioCtx.createBiquadFilter(),this.audioFilter.type=`bandpass`,this.audioFilter.frequency.value=4e3,this.audioFilter.Q.value=8,this.audioGain=this.audioCtx.createGain(),this.audioFilter.connect(this.audioGain),this.audioGain.connect(this.audioCtx.destination),this.audioBuffer=this.audioCtx.createBuffer(1,this.audioCtx.sampleRate*.004,this.audioCtx.sampleRate);let e=this.audioBuffer.getChannelData(0);for(let t=0;t<e.length;t++)e[t]=(Math.random()*2-1)*Math.exp(-t/25)}this.audioCtx?.state===`suspended`&&await this.audioCtx.resume()}ensureDOM(){if(this.domInitialized||typeof document>`u`)return;let e=`web-haptics-${this.instanceId}`,t=document.createElement(`label`);t.setAttribute(`for`,e),t.textContent=`Haptic feedback`,t.style.position=`fixed`,t.style.bottom=`10px`,t.style.left=`10px`,t.style.padding=`5px 10px`,t.style.backgroundColor=`rgba(0, 0, 0, 0.7)`,t.style.color=`white`,t.style.fontFamily=`sans-serif`,t.style.fontSize=`14px`,t.style.borderRadius=`4px`,t.style.zIndex=`9999`,t.style.userSelect=`none`,this.hapticLabel=t;let n=document.createElement(`input`);n.type=`checkbox`,n.setAttribute(`switch`,``),n.id=e,n.style.all=`initial`,n.style.appearance=`auto`,this.showSwitch||(t.style.display=`none`,n.style.display=`none`),t.appendChild(n),document.body.appendChild(t),this.domInitialized=!0}};function ZE(e){let t=(0,W.useRef)(null);return(0,W.useEffect)(()=>(t.current=new XE(e),()=>{t.current?.destroy(),t.current=null}),[]),(0,W.useEffect)(()=>{t.current?.setDebug(e?.debug??!1)},[e?.debug]),(0,W.useEffect)(()=>{t.current?.setShowSwitch(e?.showSwitch??!1)},[e?.showSwitch]),{trigger:(0,W.useCallback)((e,n)=>t.current?.trigger(e,n),[]),cancel:(0,W.useCallback)(()=>t.current?.cancel(),[]),isSupported:XE.isSupported}}var QE=(0,W.createContext)({hapticsEnabled:!1,soundsEnabled:!1,haptic:()=>{},sound:()=>{}}),$E=null;function eD(){if(typeof window>`u`)return null;if($E)return $E;try{$E=new(window.AudioContext||window.webkitAudioContext)}catch{$E=null}return $E}function tD(e,t){let n=e.currentTime,r=e.destination,i=(t,i,a,o,s,c)=>{let l=e.createOscillator(),u=e.createGain();l.connect(u),u.connect(r),l.type=i,l.frequency.setValueAtTime(t,n+o),c!==void 0&&l.frequency.exponentialRampToValueAtTime(c,n+o+s),u.gain.setValueAtTime(a,n+o),u.gain.exponentialRampToValueAtTime(.001,n+o+s),l.start(n+o),l.stop(n+o+s)};switch(t){case`click`:i(700,`sine`,.16,0,.03,350);break;case`toggle`:i(460,`square`,.06,0,.04,230);break;case`navigate`:i(520,`sine`,.07,0,.02);break;case`open`:i(210,`sine`,.12,0,.13,560);break;case`close`:i(560,`sine`,.1,0,.11,210);break;case`success`:i(523,`sine`,.17,0,.1),i(784,`sine`,.17,.09,.13);break;case`resolve`:i(659,`sine`,.15,0,.1),i(988,`sine`,.15,.09,.13);break;case`send`:i(523,`sine`,.15,0,.1),i(659,`sine`,.15,.07,.1),i(784,`sine`,.15,.14,.14);break;case`error`:i(280,`sawtooth`,.16,0,.15,80);break;case`warning`:i(330,`sine`,.13,0,.09),i(330,`sine`,.09,.12,.09);break;case`remove`:i(380,`sine`,.13,0,.08,140);break}}var nD={current:!1},rD={current:!1},iD=null;function aD(e=`click`){if(!nD.current)return;let t=eD();t&&(t.state===`suspended`?t.resume():Promise.resolve()).then(()=>{try{tD(t,e)}catch{}}).catch(()=>{})}function oD(e=`selection`){if(!(!rD.current||!iD))try{iD(e)}catch{}}function sD(e=`selection`,t=`click`){oD(e),aD(t)}function cD({enabled:e,soundsEnabled:t,children:n}){let{trigger:r,isSupported:i}=ZE({showSwitch:!1}),a=(0,W.useRef)(e);a.current=e;let o=(0,W.useRef)(t);o.current=t;let s=(0,W.useRef)(r);s.current=r,(0,W.useEffect)(()=>{rD.current=e&&i,iD=r}),(0,W.useEffect)(()=>{nD.current=t});let c=(0,W.useMemo)(()=>(e=`selection`)=>{if(a.current)try{s.current(e)}catch{}},[]),l=(0,W.useMemo)(()=>(e=`click`)=>{if(!o.current)return;let t=eD();t&&(t.state===`suspended`?t.resume():Promise.resolve()).then(()=>{try{tD(t,e)}catch{}}).catch(()=>{})},[]);(0,W.useEffect)(()=>{if(!e&&!t)return;let n=e=>{let t=e.target?.closest(`button, a[href], [role="button"], input[type="checkbox"], [role="option"]`);if(!t||t.disabled)return;let n=t.tagName===`INPUT`&&t.type===`checkbox`;if(a.current)try{s.current(`selection`)}catch{}if(o.current){let e=eD();e&&(e.state===`suspended`?e.resume():Promise.resolve()).then(()=>{try{tD(e,n?`toggle`:`click`)}catch{}}).catch(()=>{})}};return document.addEventListener(`click`,n,!0),()=>document.removeEventListener(`click`,n,!0)},[e,t]);let u=(0,W.useMemo)(()=>({hapticsEnabled:e&&i,soundsEnabled:t,haptic:c,sound:l}),[e,i,t,c,l]);return(0,G.jsx)(QE.Provider,{value:u,children:n})}function lD(){let{haptic:e,sound:t}=(0,W.useContext)(QE);return{haptic:e,sound:t}}var uD={};async function dD(){try{let e=await fetch(`/api/ui-state`);e.ok&&(uD=await e.json())}catch(e){console.error(`Failed to load UI state:`,e)}}function fD(e){let t=uD[e];return t==null?null:String(t)}var pD={},mD=null;function hD(){mD&&=(clearTimeout(mD),null);let e={...pD};pD={},fetch(`/api/ui-state`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}).catch(e=>{console.error(`Failed to save UI state:`,e)})}function gD(e,t){uD[e]=t,pD[e]=t,mD||=setTimeout(hD,200)}function _D(e){delete uD[e],pD[e]=null,mD||=setTimeout(hD,200)}function vD(e){return(0,W.useMemo)(()=>{let t=[];for(let n of e)for(let e of n.hunks)for(let r of e.hunkContent)if(r.type===`change`){if(r.additions>0){let i=r.additionLineIndex,a=r.additions;for(let r=0;r<a;r++){let a=i+r,o=n.additionLines[a];o&&o.trim()&&t.push({filePath:n.name,lineNumber:e.additionStart+(a-e.additionLineIndex),side:`additions`,content:o})}}if(r.deletions>0){let i=r.deletionLineIndex,a=r.deletions;for(let r=0;r<a;r++){let a=i+r,o=n.deletionLines[a];o&&o.trim()&&t.push({filePath:n.name,lineNumber:e.deletionStart+(a-e.deletionLineIndex),side:`deletions`,content:o})}}}return t},[e])}var yD=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),bD=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),xD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),SD=e=>{let t=xD(e);return t.charAt(0).toUpperCase()+t.slice(1)},CD={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},wD=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},TD=(0,W.createContext)({}),ED=()=>(0,W.useContext)(TD),DD=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ED()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...CD,width:t??l??CD.width,height:t??l??CD.height,stroke:e??f,strokeWidth:m,className:yD(`lucide`,p,i),...!a&&!wD(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),OD=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(DD,{ref:i,iconNode:t,className:yD(`lucide-${bD(SD(e))}`,`lucide-${e}`,n),...r}));return n.displayName=SD(e),n},kD=OD(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),AD=OD(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),jD=OD(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),MD=OD(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ND=OD(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),PD=OD(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),FD=OD(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),ID=OD(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),LD=OD(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),RD=OD(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),zD=OD(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),BD=OD(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),VD=OD(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),HD=OD(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),UD=OD(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),WD=OD(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),GD=OD(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),KD=OD(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),qD=OD(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),JD=OD(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),YD=OD(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),XD=OD(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),ZD=OD(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),QD=OD(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),$D=OD(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),eO=OD(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),tO=OD(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),nO=OD(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),rO=OD(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),iO=OD(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),aO=OD(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),oO=OD(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),sO=OD(`message-square-warning`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 15h.01`,key:`q59x07`}],[`path`,{d:`M12 7v4`,key:`xawao1`}]]),cO=OD(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),lO=OD(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),uO=OD(`navigation`,[[`polygon`,{points:`3 11 22 2 13 21 11 13 3 11`,key:`1ltx0t`}]]),dO=OD(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),fO=OD(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),pO=OD(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),mO=OD(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),hO=OD(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),gO=OD(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),_O=OD(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),vO=OD(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),yO=OD(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),bO=OD(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),xO=OD(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),SO=OD(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),CO=OD(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),wO=OD(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),TO=OD(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),EO=OD(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),DO=OD(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),OO=OD(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),kO=OD(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),AO=OD(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),jO={},MO={},NO=``;function PO(e){if(typeof document>`u`)return!1;let t=Cx(e);return U_(t).innerWidth-t.documentElement.clientWidth>0}function FO(e){let t=Cx(e),n=t.documentElement,r=t.body,i=Y_(n)?n:r,a=i.style.overflow;return i.style.overflow=`hidden`,()=>{i.style.overflow=a}}function IO(e){let t=Cx(e),n=t.documentElement,r=t.body,i=U_(n),a=0,o=0,s=xx.create(),c=typeof CSS<`u`&&CSS.supports?.(`scrollbar-gutter`,`stable`);if(Sv&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let e=i.getComputedStyle(n),t=i.getComputedStyle(r),s=(e.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,jO={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},NO=n.style.scrollBehavior,MO={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let l=n.scrollHeight>n.clientHeight,u=n.scrollWidth>n.clientWidth,d=e.overflowY===`scroll`||t.overflowY===`scroll`,f=e.overflowX===`scroll`||t.overflowX===`scroll`,p=Math.max(0,i.innerWidth-n.clientWidth),m=Math.max(0,i.innerHeight-n.clientHeight),h=parseFloat(t.marginTop)+parseFloat(t.marginBottom),g=parseFloat(t.marginLeft)+parseFloat(t.marginRight),_=Y_(n)?n:r;if(c){n.style.scrollbarGutter=s,_.style.overflowY=`hidden`,_.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:s,overflowY:`hidden`,overflowX:`hidden`}),(l||d)&&(n.style.overflowY=`scroll`),(u||f)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:h||m?`calc(100dvh - ${h+m}px)`:`100dvh`,width:g||p?`calc(100vw - ${g+p}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,jO),Object.assign(r.style,MO),c||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=NO)}function d(){u(),s.request(l)}return l(),i.addEventListener(`resize`,d),()=>{s.cancel(),u(),typeof i.removeEventListener==`function`&&i.removeEventListener(`resize`,d)}}var LO=new class{lockCount=0;restore=null;timeoutLock=z_.create();timeoutUnlock=z_.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Cx(e).documentElement,n=U_(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=zb;return}this.restore=Cv||!PO(e)?FO(e):IO(e)}};function RO(e=!0,t=null){Y(()=>{if(e)return LO.acquire(t)},[e,t])}var zO=W.createContext(void 0);function BO(e){let t=W.useContext(zO);if(t===void 0&&!e)throw Error(j_(47));return t}function VO(){return{...Sw(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}var HO={...Cw,disabled:Z(e=>e.disabled),instantType:Z(e=>e.instantType),openMethod:Z(e=>e.openMethod),openChangeReason:Z(e=>e.openChangeReason),modal:Z(e=>e.modal),stickIfOpen:Z(e=>e.stickIfOpen),titleElementId:Z(e=>e.titleElementId),descriptionElementId:Z(e=>e.descriptionElementId),openOnHover:Z(e=>e.openOnHover),closeDelay:Z(e=>e.closeDelay)},UO=class e extends uw{constructor(e){let t={...VO(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:W.createRef(),beforeContentFocusGuardRef:W.createRef(),stickIfOpenTimeout:new z_,triggerElements:new bw},HO)}setOpen=(e,t)=>{let n=t.reason===Yb,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let a={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit(`openchange`,a);let o=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),aS.flushSync(o)):o(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=F_(()=>t??new e(n)).current;return L_(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function WO(e){let t=W.useRef(``),n=W.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:W.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n&&e(n,n.pointerType),e(n,t.current),t.current=``},[e]),onPointerDown:n}}function GO(e){let[t,n]=W.useState(null),r=X((t,r)=>{e||n(r)}),i=W.useCallback(()=>{n(null)},[]),{onClick:a,onPointerDown:o}=WO(r);return W.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:a,onPointerDown:o}}),[t,i,a,o])}function KO({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=UO.useStore(s?.store,{open:n??r,modal:o,activeTriggerId:c===void 0?l:c});u.useControlledProp(`open`,n,r),u.useControlledProp(`activeTriggerId`,c,l);let d=u.useState(`open`),f=u.useState(`positionerElement`),p=u.useState(`payload`),m=u.useState(`openChangeReason`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:h,triggerProps:g,reset:_}=GO(d);vw(u);let{forceUnmount:v}=yw(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null}),_()});RO(d&&o===!0&&m!==`trigger-hover`&&h!==`touch`,f),W.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let y=W.useCallback(e=>{let t=ox(e);return t.preventUnmountOnClose=()=>{u.set(`preventUnmountingOnClose`,!0)},t},[u]),b=W.useCallback(()=>{u.setOpen(!1,y(ix))},[u,y]);W.useImperativeHandle(e.actionsRef,()=>({unmount:v,close:b}),[v,b]);let x=Ew({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:S,getFloatingProps:C,getTriggerProps:w}=zw([LC(x,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),Xw(x)]),T=W.useMemo(()=>S(g),[S,g]),E=W.useMemo(()=>w(g),[w,g]),D=W.useMemo(()=>C(),[C]);u.useSyncedValues({modal:o,openMethod:h,activeTriggerProps:T,inactiveTriggerProps:E,popupProps:D,floatingRootContext:x,nested:Pb()!=null});let O=W.useMemo(()=>({store:u}),[u]);return(0,G.jsx)(zO.Provider,{value:O,children:typeof t==`function`?t({payload:p}):t})}function qO(e){return BO(!0)?(0,G.jsx)(KO,{props:e}):(0,G.jsx)(Rb,{children:(0,G.jsx)(KO,{props:e})})}var JO=W.createContext(void 0);function YO(e=!1){let t=W.useContext(JO);if(t===void 0&&!e)throw Error(j_(16));return t}function XO(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:W.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function ZO(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,a=W.useRef(null),o=YO(!0)!==void 0,s=X(()=>{let e=a.current;return!!(e?.tagName===`A`&&e?.href)}),{props:c}=XO({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:r,isNativeButton:i}),l=W.useCallback(()=>{let e=a.current;QO(e)&&o&&t&&c.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,c.disabled,o]);return Y(l,[l]),{getButtonProps:W.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:l,...u}=e;return Wx({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Qx(e),o?.(e)),e.baseUIHandlerPrevented)return;let r=e.target===e.currentTarget&&!i&&!s()&&!t,a=e.key===`Enter`,c=e.key===` `;r&&((c||a)&&e.preventDefault(),a&&n?.(e))},onKeyUp(e){t||(Qx(e),a?.(e)),!e.baseUIHandlerPrevented&&e.target===e.currentTarget&&!i&&!t&&e.key===` `&&n?.(e)},onPointerDown(e){if(t){e.preventDefault();return}l?.(e)}},i?void 0:{role:`button`},c,u)},[t,c,i,s]),buttonRef:X(e=>{a.current=e,l()})}}function QO(e){return q_(e)&&e.tagName===`BUTTON`}var $O=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,...f}=e,p=BO(!0),m=o?.store??p?.store;if(!m)throw Error(j_(74));let h=bT(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`floatingRootContext`),v=m.useState(`isOpenedByTrigger`,h),y=W.useRef(null),{registerTrigger:b,isMountedByThisTrigger:x}=_w(h,y,m,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),S=m.useState(`openChangeReason`),C=m.useState(`stickIfOpen`),w=m.useState(`openMethod`),T=Rw(_,{enabled:_!=null&&c&&(w!==`touch`||S!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:eT(),restMs:l,delay:{close:u},triggerElementRef:y,isActiveTrigger:g}),E=zw([SS(_,{enabled:_!=null,stickIfOpen:C})]),D=m.useState(`triggerProps`,x),O=W.useMemo(()=>({disabled:i,open:v}),[i,v]),{getButtonProps:k,buttonRef:A}=ZO({disabled:i,native:a}),j=W.useMemo(()=>({open(e){return e&&S===`trigger-press`?vT.open(e):_T.open(e)}}),[S]),M=tS(`button`,e,{state:O,ref:[A,t,b,y],props:[E.getReferenceProps(),T,D,{[Ub]:``,id:h},f,k],stateAttributesMapping:j}),N=W.useRef(null),P=X(e=>{aS.flushSync(()=>{m.setOpen(!1,ox($b,e.nativeEvent,e.currentTarget))}),xb(N.current)?.focus()}),F=X(e=>{let t=m.select(`positionerElement`);if(t&&Sb(e,t))m.context.beforeContentFocusGuardRef.current?.focus();else{aS.flushSync(()=>{m.setOpen(!1,ox($b,e.nativeEvent,e.currentTarget))});let n=bb(y.current);for(;n!==null&&Rv(t,n)||n?.hasAttribute(`aria-hidden`);){let e=n;if(n=_b(n),n===e)break}n?.focus()}});return g?(0,G.jsxs)(W.Fragment,{children:[(0,G.jsx)(wx,{ref:N,onFocus:P}),(0,G.jsx)(W.Fragment,{children:M},h),(0,G.jsx)(wx,{ref:m.context.triggerFocusTargetRef,onFocus:F})]}):(0,G.jsx)(W.Fragment,{children:M},h)}),ek=W.createContext(void 0);function tk(){let e=W.useContext(ek);if(e===void 0)throw Error(j_(45));return e}var nk=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=BO();return i.useState(`mounted`)||n?(0,G.jsx)(ek.Provider,{value:n,children:(0,G.jsx)(uS,{ref:t,...r,renderGuards:!1})}):null}),rk=W.createContext(void 0);function ik(){let e=W.useContext(rk);if(!e)throw Error(j_(46));return e}var ak=W.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n?.getBoundingClientRect();i=`polygon(
|
|
1888
1888
|
0% 0%,
|
|
1889
1889
|
100% 0%,
|
|
1890
1890
|
100% 100%,
|
|
@@ -1895,44 +1895,44 @@ XID_Start XIDS`.split(/\s/).map(e=>[Nu(e),e])),Dd=new Map([[`s`,dd(383)],[dd(383
|
|
|
1895
1895
|
${e.right}px ${e.bottom}px,
|
|
1896
1896
|
${e.right}px ${e.top}px,
|
|
1897
1897
|
${e.left}px ${e.top}px
|
|
1898
|
-
)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),ck=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Gb,...g}=e,{store:_}=HO(),v=rk(),y=Ib(),b=_.useState(`floatingRootContext`),x=_.useState(`mounted`),S=_.useState(`open`),C=_.useState(`openChangeReason`),w=_.useState(`activeTriggerElement`),T=_.useState(`modal`),E=_.useState(`positionerElement`),D=_.useState(`instantType`),O=_.useState(`transitionStatus`),k=W.useRef(null),A=mw(E,!1,!1),j=zT({anchor:i,floatingRootContext:b,positionMethod:a,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:IT}),M=W.useMemo(()=>{let e={};return S||(e.pointerEvents=`none`),{role:`presentation`,hidden:!x,style:{...j.positionerStyles,...e}}},[S,x,j.positionerStyles]),N=W.useMemo(()=>({props:M,...j}),[M,j]),P=b?.select(`domReferenceElement`);Y(()=>{let e=P,t=k.current;if(e&&(k.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return A(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[P,A,_]);let F=W.useMemo(()=>({open:S,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:D}),[S,N.side,N.align,N.anchorHidden,D]),I=W.useCallback(e=>{_.set(`positionerElement`,e)},[_]),L=tS(`div`,e,{state:F,props:[N.props,VT(O),g],ref:[t,I],stateAttributesMapping:yT});return(0,G.jsxs)(ak.Provider,{value:N,children:[x&&T===!0&&C!==`trigger-hover`&&(0,G.jsx)(sk,{ref:_.context.internalBackdropRef,inert:ZT(!S),cutout:w}),(0,G.jsx)(Lb,{id:y,children:L})]})}),lk=`ArrowUp`,uk=`ArrowDown`,dk=`ArrowLeft`,fk=`ArrowRight`,pk=`Home`,mk=new Set([dk,fk]),hk=new Set([lk,uk]),gk=new Set([...mk,...hk]);new Set([...gk,pk,`End`]);var _k=new Set([lk,uk,dk,fk,pk,`End`]),vk=W.createContext(void 0);function yk(e){let t=W.useContext(vk);if(t===void 0&&!e)throw Error(j_(69));return t}var bk={...yT,...lT},xk=W.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=HO(),c=ok(),l=yk(!0)!=null,u=jT(),d=s.useState(`open`),f=s.useState(`openMethod`),p=s.useState(`instantType`),m=s.useState(`transitionStatus`),h=s.useState(`popupProps`),g=s.useState(`titleElementId`),_=s.useState(`descriptionElementId`),v=s.useState(`modal`),y=s.useState(`mounted`),b=s.useState(`openChangeReason`),x=s.useState(`popupElement`),S=s.useState(`payload`),C=s.useState(`positionerElement`),w=s.useState(`activeTriggerElement`),T=s.useState(`floatingRootContext`);hw({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}});let E=s.useState(`disabled`),D=s.useState(`openOnHover`),O=s.useState(`closeDelay`);Pw(T,{enabled:D&&!E,closeDelay:O});function k(e){return e===`touch`?s.context.popupRef.current:!0}let A=i===void 0?k:i,j=W.useMemo(()=>({open:d,side:c.side,align:c.align,instant:p,transitionStatus:m}),[d,c.side,c.align,p,m]),M=W.useCallback(e=>{s.set(`popupElement`,e)},[s]);function N(){T.context.events.emit(`measure-layout`)}function P(e,t){T.context.events.emit(`measure-layout-complete`,{previousDimensions:e,nextDimensions:t})}KT({popupElement:x,positionerElement:C,mounted:y,content:S,enabled:W.useCallback(()=>s.context.triggerElements.size>1,[s]),onMeasureLayout:N,onMeasureLayoutComplete:P,side:c.side,direction:u});let F=tS(`div`,e,{state:j,ref:[t,s.context.popupRef,M],props:[h,{"aria-labelledby":g,"aria-describedby":_,onKeyDown(e){l&&_k.has(e.key)&&e.stopPropagation()}},VT(m),o],stateAttributesMapping:bk});return(0,G.jsx)(xS,{context:T,openInteractionType:f,modal:v===`trap-focus`,disabled:!y||b===`trigger-hover`,initialFocus:A,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:q_(w)?w:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:F})});function Sk({trigger:e,children:t,open:n,onOpenChange:r,side:i=`bottom`,align:a=`end`,className:o,ariaLabel:s}){return(0,G.jsxs)(YO,{open:n,onOpenChange:r,children:[(0,G.jsx)(tk,{render:e}),(0,G.jsx)(ik,{children:(0,G.jsx)(ck,{className:`ui-popover-positioner`,side:i,align:a,sideOffset:8,children:(0,G.jsx)(xk,{className:`ui-popover ${o??``}`,"aria-label":s,children:t})})})]})}function Ck(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}function wk({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}var Tk=W.createContext(null),Ek=W.createContext(null);function Dk(){let e=W.useContext(Tk);if(e===null)throw Error(j_(60));return e}function Ok(){let e=W.useContext(Ek);if(e===null)throw Error(j_(61));return e}var kk=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Ak={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jk={valid(e){return e===null?null:e?{[kk.valid]:``}:{[kk.invalid]:``}}},Mk=W.createContext({invalid:void 0,name:void 0,validityData:{state:Ak,errors:[],error:``,value:``,initialValue:null},setValidityData:zb,disabled:void 0,touched:!1,setTouched:zb,dirty:!1,setDirty:zb,filled:!1,setFilled:zb,focused:!1,setFocused:zb,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Vb)=>e,getInputValidationProps:(e=Vb)=>e,inputRef:{current:null},commit:async()=>{}}});function Nk(e=!0){let t=W.useContext(Mk);if(t.setValidityData===zb&&!e)throw Error(j_(28));return t}var Pk=W.createContext({controlId:void 0,setControlId:zb,labelId:void 0,setLabelId:zb,messageIds:[],setMessageIds:zb,getDescriptionProps:e=>e});function Fk(){return W.useContext(Pk)}function Ik(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:a}=Fk(),o=bT(t);return Y(()=>{if(!(!n&&!t||a===zb)){if(n){let e=r?.current;K_(e)&&e.closest(`label`)!=null?a(t??null):a(i??o)}else t&&a(t);return()=>{t&&a(void 0)}}},[t,r,i,a,n,o]),i??o}var Lk=(e,t)=>Object.is(e,t);function Rk(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function zk(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Rk(e,t,n))}function Bk(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Rk(e,t,n))}function Vk(e,t,n){return e.filter(e=>!Rk(e,t,n))}function Hk(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Uk(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Wk(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Hk(e)}function Gk(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Hk(e.value):Hk(e)}function Kk(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??Wk(e,n);if(Array.isArray(t)){let r=Uk(t)?t.flatMap(e=>e.items):t;if(e==null){let t=r.find(e=>e.value==null);return t&&t.label!=null?t.label:Wk(e,n)}if(typeof e!=`object`){let t=r.find(t=>t&&t.value===e);return t&&t.label!=null?t.label:Wk(e,n)}if(`value`in e){let t=r.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return Wk(e,n)}function qk(e,t){return!Array.isArray(e)||e.length===0?``:e.map(e=>Wk(e,t)).join(`, `)}var Jk={id:Z(e=>e.id),modal:Z(e=>e.modal),multiple:Z(e=>e.multiple),items:Z(e=>e.items),itemToStringLabel:Z(e=>e.itemToStringLabel),itemToStringValue:Z(e=>e.itemToStringValue),isItemEqualToValue:Z(e=>e.isItemEqualToValue),value:Z(e=>e.value),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMount:Z(e=>e.forceMount),transitionStatus:Z(e=>e.transitionStatus),touchModality:Z(e=>e.touchModality),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Rk(e,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Rk(i,n,r)}),isSelectedByFocus:Z((e,t)=>e.selectedIndex===t),popupProps:Z(e=>e.popupProps),triggerProps:Z(e=>e.triggerProps),triggerElement:Z(e=>e.triggerElement),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),scrollUpArrowVisible:Z(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Z(e=>e.scrollDownArrowVisible),hasScrollArrows:Z(e=>e.hasScrollArrows),serializedValue:Z(e=>{let{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?``:Gk(n,r)})},Yk=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:zb,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Xk(){return W.useContext(Yk)}function Zk(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Qk(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=Xk(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=Nk(),f=X(e.getValue);Y(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),Y(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:Zk(u,c),validate(){let e=n;e===void 0&&(e=f()),l.current=!0,aS.flushSync(()=>o(e))}})},[o,a,t,s,f,r,c,l,i,u,n]),Y(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}function $k(e,t){let n=W.useRef(e),r=X(t);Y(()=>{n.current!==e&&r(n.current)},[e,r]),Y(()=>{n.current=e},[e])}function eA(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,disabled:l=!1,readOnly:u=!1,required:d=!1,modal:f=!0,actionsRef:p,inputRef:m,onOpenChangeComplete:h,items:g,multiple:_=!1,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b=Lk,highlightItemOnHover:x=!0,children:S}=e,{clearErrors:C}=Xk(),{setDirty:w,shouldValidateOnChange:T,validityData:E,setFilled:D,name:O,disabled:k,validation:A}=Nk(),{controlId:j}=Fk(),M=Ik({id:t}),N=k||l,P=O??c,[F,I]=wk({controlled:n,default:_?r??Bb:r,name:`Select`,state:`value`}),[L,R]=wk({controlled:a,default:o,name:`Select`,state:`open`}),z=W.useRef([]),ee=W.useRef([]),te=W.useRef(null),B=W.useRef(null),V=W.useRef(0),H=W.useRef(null),ne=W.useRef([]),re=W.useRef(!1),ie=W.useRef(!1),ae=W.useRef(null),oe=W.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),se=W.useRef(!1),{mounted:ce,setMounted:le,transitionStatus:ue}=pw(L),U=F_(()=>new lw({id:M,modal:f,multiple:_,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b,value:F,open:L,mounted:ce,transitionStatus:ue,items:g,forceMount:!1,touchModality:!1,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,de=ow(U,Jk.activeIndex),fe=ow(U,Jk.selectedIndex),pe=ow(U,Jk.triggerElement),me=ow(U,Jk.positionerElement),he=W.useMemo(()=>_&&Array.isArray(F)&&F.length===0?``:Gk(F,y),[_,F,y]),ge=fv(U.state.triggerElement);Qk({id:M,commit:A.commit,value:F,controlRef:ge,name:P,getValue:()=>F});let _e=W.useRef(F);Y(()=>{F!==_e.current&&U.set(`forceMount`,!0)},[U,F]),Y(()=>{D(F!==null)},[F,D]),Y(function(){if(L)return;let e=ne.current;if(_){let t=Array.isArray(F)?F:[];if(t.length===0){U.set(`selectedIndex`,null);return}let n=t[t.length-1],r=Bk(e,n,b);U.set(`selectedIndex`,r===-1?null:r);return}let t=Bk(e,F,b);U.set(`selectedIndex`,t===-1?null:t)},[_,L,F,ne,b,U]),$k(F,()=>{C(P),w(F!==E.initialValue),T()?A.commit(F):A.commit(F,!0)});let ve=X((e,t)=>{if(s?.(e,t),!t.isCanceled&&(R(e),!e&&U.state.activeIndex!==null)){let e=z.current[U.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),ye=X(()=>{le(!1),U.set(`activeIndex`,null),h?.(!1)});hw({enabled:!p,open:L,ref:te,onComplete(){L||ye()}}),W.useImperativeHandle(p,()=>({unmount:ye}),[ye]);let be=X((e,t)=>{i?.(e,t),!t.isCanceled&&I(e)}),xe=X(()=>{let e=U.state.listElement||te.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;U.state.scrollUpArrowVisible!==r&&U.set(`scrollUpArrowVisible`,r),U.state.scrollDownArrowVisible!==i&&U.set(`scrollDownArrowVisible`,i)}),Se=ww({open:L,onOpenChange:ve,elements:{reference:pe,floating:me}}),{getReferenceProps:Ce,getFloatingProps:we,getItemProps:Te}=zw([SS(Se,{enabled:!u&&!N,event:`mousedown`}),LC(Se,{bubbles:!1}),Jw(Se,{enabled:!u&&!N,listRef:z,activeIndex:de,selectedIndex:fe,disabledIndices:Bb,onNavigate(e){e===null&&!L||U.set(`activeIndex`,e)},focusItemOnHover:!1}),Zw(Se,{enabled:!u&&!N&&(L||!_),listRef:ee,activeIndex:de,selectedIndex:fe,onMatch(e){L?U.set(`activeIndex`,e):be(ne.current[e],ox(`none`))},onTypingChange(e){re.current=e}})]);Ck(()=>{U.update({popupProps:we(),triggerProps:Ce()})}),Y(()=>{U.update({id:M,modal:f,multiple:_,value:F,open:L,mounted:ce,transitionStatus:ue,popupProps:we(),triggerProps:Ce(),items:g,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b})},[U,M,f,_,F,L,ce,ue,we,Ce,g,v,y,b]);let Ee=W.useMemo(()=>({store:U,name:P,required:d,disabled:N,readOnly:u,multiple:_,itemToStringLabel:v,itemToStringValue:y,highlightItemOnHover:x,setValue:be,setOpen:ve,listRef:z,popupRef:te,scrollHandlerRef:B,handleScrollArrowVisibility:xe,scrollArrowsMountedCountRef:V,getItemProps:Te,events:Se.context.events,valueRef:H,valuesRef:ne,labelsRef:ee,typingRef:re,selectionRef:oe,selectedItemTextRef:ae,validation:A,onOpenChangeComplete:h,keyboardActiveRef:ie,alignItemWithTriggerActiveRef:se,initialValueRef:_e}),[U,P,d,N,u,_,v,y,x,be,ve,Te,Se.context.events,A,h,xe]),De=fx(m,A.inputRef),Oe=_&&Array.isArray(F)&&F.length>0,ke=W.useMemo(()=>!_||!Array.isArray(F)||!P?null:F.map(e=>{let t=Gk(e,y);return(0,G.jsx)(`input`,{type:`hidden`,name:P,value:t},t)}),[_,F,P,y]);return(0,G.jsx)(Tk.Provider,{value:Ee,children:(0,G.jsxs)(Ek.Provider,{value:Se,children:[S,(0,G.jsx)(`input`,{...A.getInputValidationProps({onFocus(){U.state.triggerElement?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=ox(qb,e.nativeEvent);function r(){if(_)return;let e=ne.current.find(e=>Gk(e,y).toLowerCase()===t.toLowerCase());e!=null&&(w(e!==E.initialValue),be(e,n),T()&&A.commit(e))}U.set(`forceMount`,!0),queueMicrotask(r)}}),id:t||j||void 0,name:_?void 0:P,value:he,disabled:N,required:d&&!Oe,readOnly:u,ref:De,style:vx,tabIndex:-1,"aria-hidden":!0}),ke]})})}function tA(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var nA=2,rA={...vT,...jk,value:()=>null},iA=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{setTouched:s,setFocused:c,validationMode:l,state:u,disabled:d}=Nk(),{labelId:f}=Fk(),{store:p,setOpen:m,selectionRef:h,validation:g,readOnly:_,alignItemWithTriggerActiveRef:v,disabled:y,keyboardActiveRef:b}=Dk(),x=d||y||i,S=ow(p,Jk.open),C=ow(p,Jk.value),w=ow(p,Jk.triggerProps),T=ow(p,Jk.positionerElement),E=ow(p,Jk.listElement),D=ow(p,Jk.serializedValue),O=fv(T),k=W.useRef(null),A=B_(),j=B_(),{getButtonProps:M,buttonRef:N}=$O({disabled:x,native:a}),P=fx(t,k,N,X(e=>{p.set(`triggerElement`,e)})),F=B_(),I=B_();W.useEffect(()=>{if(S)return I.start(200,()=>{h.current.allowUnselectedMouseUp=!0,F.start(200,()=>{h.current.allowSelectedMouseUp=!0})}),()=>{F.clear(),I.clear()};h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},j.clear()},[S,h,j,F,I]);let L=W.useMemo(()=>E?.id??Kv(T)?.id,[E,T]),R=Wx(w,{role:`combobox`,"aria-expanded":S?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":S?L:void 0,"aria-labelledby":f,"aria-readonly":_||void 0,tabIndex:x?-1:0,ref:P,onFocus(e){c(!0),S&&v.current&&m(!1,ox($b,e.nativeEvent)),A.start(0,()=>{p.set(`forceMount`,!0)})},onBlur(){s(!0),c(!1),l===`onBlur`&&g.commit(C)},onPointerMove({pointerType:e}){b.current=!1,p.set(`touchModality`,e===`touch`)},onPointerDown({pointerType:e}){p.set(`touchModality`,e===`touch`)},onKeyDown(){b.current=!0},onMouseDown(e){if(S)return;let t=Cx(e.currentTarget);function n(e){if(!k.current)return;let t=e.target;if(Rv(k.current,t)||Rv(O.current,t)||t===k.current)return;let n=tA(k.current);e.clientX>=n.left-nA&&e.clientX<=n.right+nA&&e.clientY>=n.top-nA&&e.clientY<=n.bottom+nA||m(!1,ox(nx,e))}j.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},g.getValidationProps,o,M);R.role=`combobox`;let z=W.useMemo(()=>({...u,open:S,disabled:x,value:C,readOnly:_,placeholder:!D}),[u,S,x,C,_,D]);return tS(`button`,e,{ref:[t,k],state:z,stateAttributesMapping:rA,props:R})}),aA={value:()=>null},oA=W.forwardRef(function(e,t){let{className:n,render:r,children:i,...a}=e,{store:o,valueRef:s}=Dk(),c=ow(o,Jk.value),l=ow(o,Jk.items),u=ow(o,Jk.itemToStringLabel),d=ow(o,Jk.serializedValue),f=W.useMemo(()=>({value:c,placeholder:!d}),[c,d]),p=typeof i==`function`?i(c):i??(Array.isArray(c)?qk(c,u):Kk(c,l,u));return tS(`span`,e,{state:f,ref:[t,s],props:[{children:p},a],stateAttributesMapping:aA})}),sA=W.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=Dk(),o=ow(a,Jk.open);return tS(`span`,e,{state:W.useMemo(()=>({open:o}),[o]),ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:_T})}),cA=W.createContext(void 0),lA=W.forwardRef(function(e,t){let{store:n}=Dk(),r=ow(n,Jk.mounted),i=ow(n,Jk.forceMount);return r||i?(0,G.jsx)(cA.Provider,{value:!0,children:(0,G.jsx)(uS,{ref:t,...e})}):null}),uA=W.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function dA(){return W.useContext(uA)}function fA(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),o=W.useRef(0),s=F_(mA).current,c=F_(pA).current,[l,u]=W.useState(0),d=W.useRef(l),f=X((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=X(e=>{c.delete(e),d.current+=1,u(d.current)}),m=W.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(hA).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Y(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Y(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{r&&(r.current=[])},[r]);let h=X(e=>(s.add(e),()=>{s.delete(e)}));Y(()=>{s.forEach(e=>e(m))},[s,m]);let g=W.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(uA.Provider,{value:g,children:t})}function pA(){return new Map}function mA(){return new Set}function hA(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var gA=W.createContext(void 0);function _A(){let e=W.useContext(gA);if(!e)throw Error(j_(59));return e}function vA(e,t){e&&Object.assign(e.style,t)}var yA={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},bA={position:`fixed`},xA=W.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Wb,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=Dk(),D=Ok(),O=ow(v,Jk.open),k=ow(v,Jk.mounted),A=ow(v,Jk.modal),j=ow(v,Jk.value),M=ow(v,Jk.touchModality),N=ow(v,Jk.positionerElement),P=ow(v,Jk.triggerElement),F=ow(v,Jk.isItemEqualToValue),I=W.useRef(null),L=W.useRef(null),[R,z]=W.useState(h),ee=k&&R&&!M;!k&&R!==h&&z(h),Y(()=>{k||(Jk.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),Jk.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),W.useImperativeHandle(x,()=>ee),BO((ee||A)&&O&&!M,P);let te=zT({anchor:n,floatingRootContext:D,positionMethod:r,mounted:k,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ee,collisionAvoidance:g,keepMounted:!0}),B=ee?`none`:te.side,V=ee?bA:te.positionerStyles,H=W.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...V,...e}}},[O,k,V]),ne=W.useMemo(()=>({open:O,side:B,align:te.align,anchorHidden:te.anchorHidden}),[O,B,te.align,te.anchorHidden]),re=tS(`div`,e,{ref:[t,X(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:yT,props:[H,_]}),ie=W.useRef(0),ae=X(e=>{if(e.size===0&&ie.current===0||C.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=ox(qb);if(t!==0&&!v.state.multiple&&j!==null&&Bk(C.current,j,F)===-1){let e=w.current,t=e!=null&&zk(C.current,e,F)?e:null;E(t,n),t===null&&(v.set(`selectedIndex`,null),S.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(j)){let e=j.filter(e=>zk(C.current,e,F));(e.length!==j.length||e.some(e=>!zk(j,e,F)))&&(E(e,n),e.length===0&&(v.set(`selectedIndex`,null),S.current=null))}if(O&&ee){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};vA(N,e),vA(T.current,e)}}),oe=W.useMemo(()=>({...te,side:B,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:I,scrollDownArrowRef:L}),[te,B,ee,z]);return(0,G.jsx)(fA,{elementsRef:y,labelsRef:b,onMapChange:ae,children:(0,G.jsxs)(gA.Provider,{value:oe,children:[k&&A&&(0,G.jsx)(sk,{inert:ZT(!O),cutout:P}),re]})})});function SA(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var CA=`base-ui-disable-scrollbar`,wA={className:CA,element:(0,G.jsx)(`style`,{href:CA,precedence:`base-ui:low`,children:`.${CA}{scrollbar-width:none}.${CA}::-webkit-scrollbar{display:none}`})},TA={...yT,...lT},EA=W.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:a,popupRef:o,onOpenChangeComplete:s,setOpen:c,valueRef:l,selectedItemTextRef:u,keyboardActiveRef:d,multiple:f,handleScrollArrowVisibility:p,scrollHandlerRef:m}=Dk(),{side:h,align:g,alignItemWithTriggerActive:_,setControlledAlignItemWithTrigger:v,scrollDownArrowRef:y,scrollUpArrowRef:b}=_A(),x=yk(!0)!=null,S=Ok(),C=B_(),w=ow(a,Jk.id),T=ow(a,Jk.open),E=ow(a,Jk.mounted),D=ow(a,Jk.popupProps),O=ow(a,Jk.transitionStatus),k=ow(a,Jk.triggerElement),A=ow(a,Jk.positionerElement),j=ow(a,Jk.listElement),M=W.useRef(0),N=W.useRef(!1),P=W.useRef(0),F=W.useRef(!1),I=W.useRef({}),L=Sx(),R=X(e=>{if(!A||!o.current||!F.current)return;if(N.current||!_){p();return}let t=A.style.top===`0px`,n=A.style.bottom===`0px`,r=A.getBoundingClientRect().height,i=Cx(A),a=getComputedStyle(A),s=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=i.documentElement.clientHeight-s-c,u=e.scrollTop,d=e.scrollHeight-e.clientHeight,f=null,m=null,h=!1;if(t){let e=r+(d-u),t=Math.min(e,l);f=t,t===l?h=!0:m=d}else if(n){let e=u-0,t=r+e,n=Math.min(t,l),i=t-l;f=n,n===l?(h=!0,u<d&&(m=u-(e-i))):m=0}f!=null&&(A.style.height=`${f}px`),m!=null&&(e.scrollTop=m),h&&(N.current=!0),p()});W.useImperativeHandle(m,()=>R,[R]),hw({open:T,ref:o,onComplete(){T&&s?.(!0)}});let z=W.useMemo(()=>({open:T,transitionStatus:O,side:h,align:g}),[T,O,h,g]);Y(()=>{!A||!o.current||Object.keys(I.current).length||(I.current={top:A.style.top||`0`,left:A.style.left||`0`,right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[o,A]),Y(()=>{E||_||(F.current=!1,N.current=!1,M.current=0,P.current=0,vA(A,I.current))},[E,_,A,o]),Y(()=>{let e=o.current;if(!(!E||!k||!A||!e)){if(!_){F.current=!0,L.request(p);return}queueMicrotask(()=>{let t=getComputedStyle(A),n=getComputedStyle(e),r=Cx(k),i=U_(A),a=k.getBoundingClientRect(),o=A.getBoundingClientRect(),s=a.left,c=a.height,d=j||e,f=d.scrollHeight,m=parseFloat(n.borderBottomWidth),h=parseFloat(t.marginTop)||10,g=parseFloat(t.marginBottom)||10,_=parseFloat(t.minHeight)||100,y=r.documentElement.clientHeight-h-g,b=r.documentElement.clientWidth,x=y-a.bottom+c,S=u.current,C=l.current,w=0,T=0;if(S&&C){let e=C.getBoundingClientRect(),t=S.getBoundingClientRect(),n=e.left-s,r=t.left-o.left,i=e.top-a.top+e.height/2,c=t.top-o.top+t.height/2;w=n-r,T=c-i}let E=x+T+g+m,D=Math.min(y,E),O=y-h-g,P=E-D,L=Math.max(5,s+w),R=b-5,z=Math.max(0,L+o.width-R);A.style.left=`${L-z}px`,A.style.height=`${D}px`,A.style.maxHeight=`auto`,A.style.marginTop=`${h}px`,A.style.marginBottom=`${g}px`,e.style.height=`100%`;let ee=d.scrollHeight-d.clientHeight,te=P>=ee;te&&(D=Math.min(y,o.height)-(P-ee));let B=a.top<20||a.bottom>y-20||D<Math.min(f,_),V=(i.visualViewport?.scale??1)!==1&&Sv;if(B||V){F.current=!0,vA(A,I.current),aS.flushSync(()=>v(!1));return}if(te){let e=Math.max(0,y-E);A.style.top=o.height>=O?`0`:`${e}px`,A.style.height=`${D}px`,d.scrollTop=d.scrollHeight-d.clientHeight,M.current=Math.max(_,D)}else A.style.bottom=`0`,M.current=Math.max(_,D),d.scrollTop=P;M.current===y&&(N.current=!0),p(),setTimeout(()=>{F.current=!0})})}},[a,E,A,k,l,u,o,p,_,v,L,y,b,j]),W.useEffect(()=>{if(!_||!A||!E)return;let e=U_(A);function t(e){c(!1,ox(ax,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[c,_,A,E]);let ee={...j?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":f||void 0,id:`${w}-list`},onKeyDown(e){d.current=!0,x&&_k.has(e.key)&&e.stopPropagation()},onMouseMove(){d.current=!1},onPointerLeave(e){if(SA(e)||e.pointerType===`touch`)return;let t=e.currentTarget;C.start(0,()=>{a.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){j||m.current?.(e.currentTarget)},..._&&{style:j?{height:`100%`}:yA}},te=tS(`div`,e,{ref:[t,o],state:z,stateAttributesMapping:TA,props:[D,ee,VT(O),{className:!j&&_?wA.className:void 0},i]});return(0,G.jsxs)(W.Fragment,{children:[wA.element,(0,G.jsx)(xS,{context:S,modal:!1,disabled:!E,restoreFocus:!0,children:te})]})}),DA=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function OA(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=dA(),f=W.useRef(-1),[p,m]=W.useState(a??(i===DA.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=W.useRef(null),g=W.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Y(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Y(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),W.useMemo(()=>({ref:g,index:p}),[p,g])}var kA=W.createContext(void 0);function AA(){let e=W.useContext(kA);if(!e)throw Error(j_(57));return e}var jA=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=W.useRef(null),u=OA({label:a,textRef:l,indexGuessBehavior:DA.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=Dk(),x=B_(),S=ow(d,Jk.isActive,u.index),C=ow(d,Jk.isSelected,u.index,i),w=ow(d,Jk.isSelectedByFocus,u.index),T=ow(d,Jk.isItemEqualToValue),E=u.index,D=E!==-1,O=W.useRef(null),k=fv(E);Y(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),Y(()=>{if(!D)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Rk(t,i,T)&&d.set(`selectedIndex`,E)},[D,E,y,T,d,i]);let A=W.useMemo(()=>({disabled:o,selected:C,highlighted:S}),[o,C,S]),j=f({active:S,selected:C});j.onFocus=void 0,j.id=void 0;let M=W.useRef(null),N=W.useRef(`mouse`),P=W.useRef(!1),{getButtonProps:F,buttonRef:I}=$O({disabled:o,focusableWhenDisabled:!0,native:s});function L(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(C?Vk(n,i,T):[...n,i],ox(Qb,e))}else m(i,ox(Qb,e)),p(!1,ox(Qb,e))}let R={role:`option`,"aria-selected":C,"aria-disabled":o||void 0,tabIndex:S?0:-1,onFocus(){d.set(`activeIndex`,E)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&d.set(`activeIndex`,E)},onMouseMove(){b&&d.set(`activeIndex`,E)},onMouseLeave(e){!b||v.current||SA(e)||x.start(0,()=>{d.state.activeIndex===E&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){M.current=e.key,d.set(`activeIndex`,E)},onClick(e){P.current=!1,!(e.type===`keydown`&&M.current===null)&&(o||M.current===` `&&g.current||N.current!==`touch`&&!S||(M.current=null,L(e.nativeEvent)))},onPointerEnter(e){N.current=e.pointerType},onPointerDown(e){N.current=e.pointerType,P.current=!0},onMouseUp(e){if(o)return;if(P.current){P.current=!1;return}let t=!h.current.allowSelectedMouseUp&&C,n=!h.current.allowUnselectedMouseUp&&!C;t||n||N.current!==`touch`&&!S||L(e.nativeEvent)}},z=tS(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,R,c,F]}),ee=W.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,G.jsx)(kA.Provider,{value:ee,children:z})})),MA=W.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=AA();return n||r?(0,G.jsx)(NA,{...e,ref:t}):null}),NA=W.memo(W.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=AA(),s=W.useRef(null),{transitionStatus:c,setMounted:l}=pw(o),u=W.useMemo(()=>({selected:o,transitionStatus:c}),[o,c]),d=tS(`span`,e,{ref:[t,s],state:u,props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:lT});return hw({open:o,ref:s,onComplete(){o||l(!1)}}),d})),PA=W.memo(W.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=AA(),{selectedItemTextRef:o}=Dk(),{className:s,render:c,...l}=e;return tS(`div`,e,{ref:[W.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})}));function FA({value:e,onValueChange:t,options:n,ariaLabel:r,className:i}){return(0,G.jsxs)(eA,{value:e,onValueChange:e=>t(e),modal:!1,children:[(0,G.jsxs)(iA,{className:`ui-select-trigger ${i??``}`,"aria-label":r,children:[(0,G.jsx)(oA,{children:e=>n.find(t=>t.value===e)?.label??e}),(0,G.jsx)(sA,{className:`ui-select-icon`,children:(0,G.jsx)(LD,{size:12})})]}),(0,G.jsx)(lA,{children:(0,G.jsx)(xA,{className:`ui-select-positioner`,sideOffset:4,align:`end`,side:`bottom`,alignItemWithTrigger:!1,children:(0,G.jsx)(EA,{className:`ui-select-popup`,children:n.map(e=>(0,G.jsxs)(jA,{value:e.value,className:`ui-select-item`,children:[(0,G.jsx)(PA,{children:e.label}),(0,G.jsx)(MA,{className:`ui-select-indicator`,children:(0,G.jsx)(ND,{size:13})})]},e.value))})})})]})}var IA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RA={};function zA(e,t){return((t||RA).jsx?LA:IA).test(e)}var BA=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
1899
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),VA=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(BA());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),HA=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),UA=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(VA()),r=HA();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),WA=KA(`end`),GA=KA(`start`);function KA(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function qA(e){let t=GA(e),n=WA(e);if(t&&n)return{start:t,end:n}}function JA(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?XA(e.position):`start`in e||`end`in e?XA(e):`line`in e||`column`in e?YA(e):``}function YA(e){return ZA(e&&e.line)+`:`+ZA(e&&e.column)}function XA(e){return YA(e&&e.start)+`-`+YA(e&&e.end)}function ZA(e){return e&&typeof e==`number`?e:1}var QA=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=JA(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};QA.prototype.file=``,QA.prototype.name=``,QA.prototype.reason=``,QA.prototype.message=``,QA.prototype.stack=``,QA.prototype.column=void 0,QA.prototype.line=void 0,QA.prototype.ancestors=void 0,QA.prototype.cause=void 0,QA.prototype.fatal=void 0,QA.prototype.place=void 0,QA.prototype.ruleId=void 0,QA.prototype.source=void 0;var $A=l(UA(),1),ej={}.hasOwnProperty,tj=new Map,nj=/[A-Z]/g,rj=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ij=new Set([`td`,`th`]),aj=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function oj(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=_j(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=gj(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ga:ha,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=sj(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function sj(e,t,n){if(t.type===`element`)return cj(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return lj(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return dj(e,t,n);if(t.type===`mdxjsEsm`)return uj(e,t);if(t.type===`root`)return fj(e,t,n);if(t.type===`text`)return pj(e,t)}function cj(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ga,e.schema=i),e.ancestors.push(t);let a=Cj(e,t.tagName,!1),o=vj(e,t),s=bj(e,t);return rj.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Xa(e):!0})),mj(e,o,a,t),hj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function lj(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}wj(e,t.position)}function uj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);wj(e,t.position)}function dj(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ga,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Cj(e,t.name,!0),o=yj(e,t),s=bj(e,t);return mj(e,o,a,t),hj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function fj(e,t,n){let r={};return hj(r,bj(e,t)),e.create(t,e.Fragment,r,n)}function pj(e,t){return t.value}function mj(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hj(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function gj(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function _j(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=GA(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function vj(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ej.call(t.properties,i)){let a=xj(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ij.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function yj(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else wj(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else wj(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function bj(e,t){let n=[],r=-1,i=e.passKeys?new Map:tj;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=sj(e,a,o);s!==void 0&&n.push(s)}return n}function xj(e,t,n){let r=fa(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?qa(n):Ja(n)),r.property===`style`){let t=typeof n==`object`?n:Sj(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Tj(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ca[r.property]||r.property:r.attribute,n]}}function Sj(e,t){try{return(0,$A.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new QA("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=aj+`#cannot-parse-style-attribute`,r}}function Cj(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=zA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=zA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ej.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);wj(e)}function wj(e,t){let n=new QA("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=aj+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Tj(e){let t={},n;for(n in e)ej.call(e,n)&&(t[Ej(n)]=e[n]);return t}function Ej(e){let t=e.replace(nj,Dj);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Dj(e){return`-`+e.toLowerCase()}var Oj={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},kj={};function Aj(e,t){let n=t||kj;return jj(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function jj(e,t,n){if(Nj(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Mj(e.children,t,n)}return Array.isArray(e)?Mj(e,t,n):``}function Mj(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=jj(e[i],t,n);return r.join(``)}function Nj(e){return!!(e&&typeof e==`object`)}var Pj=document.createElement(`i`);function Fj(e){let t=`&`+e+`;`;Pj.innerHTML=t;let n=Pj.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Ij(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Lj(e,t){return e.length>0?(Ij(e,e.length,0,t),e):t}var Rj={}.hasOwnProperty;function zj(e){let t={},n=-1;for(;++n<e.length;)Bj(t,e[n]);return t}function Bj(e,t){let n;for(n in t){let r=(Rj.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Rj.call(r,a)||(r[a]=[]);let e=i[a];Vj(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Vj(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ij(e,0,0,r)}function Hj(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Uj(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Wj=nM(/[A-Za-z]/),Gj=nM(/[\dA-Za-z]/),Kj=nM(/[#-'*+\--9=?A-Z^-~]/);function qj(e){return e!==null&&(e<32||e===127)}var Jj=nM(/\d/),Yj=nM(/[\dA-Fa-f]/),Xj=nM(/[!-/:-@[-`{-~]/);function Zj(e){return e!==null&&e<-2}function Qj(e){return e!==null&&(e<0||e===32)}function $j(e){return e===-2||e===-1||e===32}var eM=nM(/\p{P}|\p{S}/u),tM=nM(/\s/);function nM(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function rM(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Gj(e.charCodeAt(n+1))&&Gj(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function iM(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $j(r)?(e.enter(n),s(r)):t(r)}function s(r){return $j(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var aM={tokenize:oM};function oM(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),iM(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Zj(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var sM={tokenize:lM},cM={tokenize:uM};function lM(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ij(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cM,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(cM,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Zj(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Ij(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function uM(e,t,n){return iM(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function dM(e){if(e===null||Qj(e)||tM(e))return 1;if(eM(e))return 2}function fM(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var pM={name:`attention`,resolveAll:mM,tokenize:hM};function mM(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};gM(d,-c),gM(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Lj(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Lj(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Lj(l,fM(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Lj(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Lj(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Ij(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function hM(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=dM(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=dM(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function gM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var _M={name:`autolink`,tokenize:vM};function vM(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Wj(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Gj(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Gj(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||qj(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Kj(t)?(e.consume(t),l):n(t)}function u(e){return Gj(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Gj(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var yM={partial:!0,tokenize:bM};function bM(e,t,n){return r;function r(t){return $j(t)?iM(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Zj(e)?t(e):n(e)}}var xM={continuation:{tokenize:CM},exit:wM,name:`blockQuote`,tokenize:SM};function SM(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $j(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function CM(e,t,n){let r=this;return i;function i(t){return $j(t)?iM(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(xM,t,n)(r)}}function wM(e){e.exit(`blockQuote`)}var TM={name:`characterEscape`,tokenize:EM};function EM(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Xj(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var DM={name:`characterReference`,tokenize:OM};function OM(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Gj,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Yj,u):(e.enter(`characterReferenceValue`),a=7,o=Jj,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Gj&&!Fj(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var kM={partial:!0,tokenize:MM},AM={concrete:!0,name:`codeFenced`,tokenize:jM};function jM(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$j(t)?iM(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Zj(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(kM,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Zj(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$j(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),iM(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Zj(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Zj(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$j(t)?iM(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Zj(t)?e.check(kM,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Zj(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$j(t)?iM(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$j(t)?iM(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Zj(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function MM(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var NM={name:`codeIndented`,tokenize:FM},PM={partial:!0,tokenize:IM};function FM(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),iM(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Zj(t)?e.attempt(PM,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Zj(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function IM(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Zj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):iM(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Zj(e)?i(e):n(e)}}var LM={name:`codeText`,previous:zM,resolve:RM,tokenize:BM};function RM(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function zM(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function BM(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Zj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Zj(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var VM=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&HM(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),HM(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),HM(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);HM(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);HM(this.left,t.reverse())}}};function HM(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function UM(e){let t={},n=-1,r,i,a,o,s,c,l,u=new VM(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,WM(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ij(e,0,1/0,u.slice(0)),!l}function WM(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var GM={resolve:qM,tokenize:JM},KM={partial:!0,tokenize:YM};function qM(e){return UM(e),e}function JM(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Zj(t)?e.check(KM,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function YM(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),iM(e,a,`linePrefix`)}function a(i){if(i===null||Zj(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function XM(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||qj(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Zj(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Qj(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||qj(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ZM(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Zj(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Zj(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$j(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function QM(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Zj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),iM(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Zj(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function $M(e,t){let n;return r;function r(i){return Zj(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$j(i)?iM(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var eN={name:`definition`,tokenize:nN},tN={partial:!0,tokenize:rN};function nN(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ZM.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Uj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Qj(t)?$M(e,l)(t):l(t)}function l(t){return XM(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(tN,d,d)(t)}function d(t){return $j(t)?iM(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Zj(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function rN(e,t,n){return r;function r(t){return Qj(t)?$M(e,i)(t):n(t)}function i(t){return QM(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $j(t)?iM(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Zj(e)?t(e):n(e)}}var iN={name:`hardBreakEscape`,tokenize:aN};function aN(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Zj(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var oN={name:`headingAtx`,resolve:sN,tokenize:cN};function sN(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Ij(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function cN(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Qj(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Zj(n)?(e.exit(`atxHeading`),t(n)):$j(n)?iM(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Qj(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var lN=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),uN=[`pre`,`script`,`style`,`textarea`],dN={concrete:!0,name:`htmlFlow`,resolveTo:mN,tokenize:hN},fN={partial:!0,tokenize:_N},pN={partial:!0,tokenize:gN};function mN(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hN(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):Wj(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Wj(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Wj(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Qj(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&uN.includes(l)?(i=1,r.interrupt?t(s):O(s)):lN.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Gj(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $j(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Wj(t)?(e.consume(t),b):$j(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Gj(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$j(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$j(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Zj(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Qj(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$j(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Zj(t)?O(t):$j(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Zj(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(fN,R,k)(t)):t===null||Zj(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(pN,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Zj(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return uN.includes(n)?(e.consume(t),L):O(t)}return Wj(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||Zj(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function gN(e,t,n){let r=this;return i;function i(t){return Zj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function _N(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(yM,t,n)}}var vN={name:`htmlText`,tokenize:yN};function yN(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Wj(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Wj(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Zj(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Zj(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Zj(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Zj(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Wj(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Gj(t)?(e.consume(t),S):C(t)}function C(t){return Zj(t)?(o=C,N(t)):$j(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Gj(t)?(e.consume(t),w):t===47||t===62||Qj(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Wj(t)?(e.consume(t),E):Zj(t)?(o=T,N(t)):$j(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Gj(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Zj(t)?(o=D,N(t)):$j(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Zj(t)?(o=O,N(t)):$j(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Zj(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Qj(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Qj(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return $j(t)?iM(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var bN={name:`labelEnd`,resolveAll:wN,resolveTo:TN,tokenize:EN},xN={tokenize:DN},SN={tokenize:ON},CN={tokenize:kN};function wN(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ij(e,0,e.length,n),e}function TN(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Lj(s,e.slice(a+1,a+r+3)),s=Lj(s,[[`enter`,u,t]]),s=Lj(s,fM(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Lj(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Lj(s,e.slice(o+1)),s=Lj(s,[[`exit`,c,t]]),Ij(e,a,e.length,s),e}function EN(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Uj(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(xN,u,o?u:d)(t):t===91?e.attempt(SN,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(CN,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function DN(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Qj(t)?$M(e,a)(t):a(t)}function a(t){return t===41?u(t):XM(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Qj(t)?$M(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?QM(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Qj(t)?$M(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ON(e,t,n){let r=this;return i;function i(t){return ZM.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Uj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function kN(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var AN={name:`labelStartImage`,resolveAll:bN.resolveAll,tokenize:jN};function jN(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var MN={name:`labelStartLink`,resolveAll:bN.resolveAll,tokenize:NN};function NN(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var PN={name:`lineEnding`,tokenize:FN};function FN(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),iM(e,t,`linePrefix`)}}var IN={name:`thematicBreak`,tokenize:LN};function LN(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Zj(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$j(t)?iM(e,s,`whitespace`)(t):s(t))}}var RN={continuation:{tokenize:HN},exit:WN,name:`list`,tokenize:VN},zN={partial:!0,tokenize:GN},BN={partial:!0,tokenize:UN};function VN(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Jj(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(IN,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Jj(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(yM,r.interrupt?n:u,e.attempt(zN,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $j(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function HN(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(yM,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,iM(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$j(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(BN,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,iM(e,e.attempt(RN,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function UN(e,t,n){let r=this;return iM(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function WN(e){e.exit(this.containerState.type)}function GN(e,t,n){let r=this;return iM(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$j(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var KN={name:`setextUnderline`,resolveTo:qN,tokenize:JN};function qN(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function JN(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$j(t)?iM(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Zj(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var YN={tokenize:XN};function XN(e){let t=this,n=e.attempt(yM,r,e.attempt(this.parser.constructs.flowInitial,i,iM(e,e.attempt(this.parser.constructs.flow,i,e.attempt(GM,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ZN={resolveAll:tP()},QN=eP(`string`),$N=eP(`text`);function eP(e){return{resolveAll:tP(e===`text`?nP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function tP(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function nP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var rP=s({attentionMarkers:()=>dP,contentInitial:()=>aP,disable:()=>fP,document:()=>iP,flow:()=>sP,flowInitial:()=>oP,insideSpan:()=>uP,string:()=>cP,text:()=>lP}),iP={42:RN,43:RN,45:RN,48:RN,49:RN,50:RN,51:RN,52:RN,53:RN,54:RN,55:RN,56:RN,57:RN,62:xM},aP={91:eN},oP={[-2]:NM,[-1]:NM,32:NM},sP={35:oN,42:IN,45:[KN,IN],60:dN,61:KN,95:IN,96:AM,126:AM},cP={38:DM,92:TM},lP={[-5]:PN,[-4]:PN,[-3]:PN,33:AN,38:DM,42:pM,60:[_M,vN],91:MN,92:[iN,TM],93:bN,95:pM,96:LM},uP={null:[pM,ZN]},dP={null:[42,95]},fP={null:[]};function pP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Lj(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=fM(a,l.events,l),l.events):[]}function f(e,t){return hP(p(e),t)}function p(e){return mP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Zj(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ij(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hP(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1898
|
+
)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),ok=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Gb,...g}=e,{store:_}=BO(),v=tk(),y=Ib(),b=_.useState(`floatingRootContext`),x=_.useState(`mounted`),S=_.useState(`open`),C=_.useState(`openChangeReason`),w=_.useState(`activeTriggerElement`),T=_.useState(`modal`),E=_.useState(`positionerElement`),D=_.useState(`instantType`),O=_.useState(`transitionStatus`),k=W.useRef(null),A=mw(E,!1,!1),j=zT({anchor:i,floatingRootContext:b,positionMethod:a,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:v,nodeId:y,collisionAvoidance:h,adaptiveOrigin:IT}),M=W.useMemo(()=>{let e={};return S||(e.pointerEvents=`none`),{role:`presentation`,hidden:!x,style:{...j.positionerStyles,...e}}},[S,x,j.positionerStyles]),N=W.useMemo(()=>({props:M,...j}),[M,j]),P=b?.select(`domReferenceElement`);Y(()=>{let e=P,t=k.current;if(e&&(k.current=e),t&&e&&e!==t){_.set(`instantType`,void 0);let e=new AbortController;return A(()=>{_.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[P,A,_]);let F=W.useMemo(()=>({open:S,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:D}),[S,N.side,N.align,N.anchorHidden,D]),I=W.useCallback(e=>{_.set(`positionerElement`,e)},[_]),L=tS(`div`,e,{state:F,props:[N.props,VT(O),g],ref:[t,I],stateAttributesMapping:yT});return(0,G.jsxs)(rk.Provider,{value:N,children:[x&&T===!0&&C!==`trigger-hover`&&(0,G.jsx)(ak,{ref:_.context.internalBackdropRef,inert:ZT(!S),cutout:w}),(0,G.jsx)(Lb,{id:y,children:L})]})}),sk=`ArrowUp`,ck=`ArrowDown`,lk=`ArrowLeft`,uk=`ArrowRight`,dk=`Home`,fk=new Set([lk,uk]),pk=new Set([sk,ck]),mk=new Set([...fk,...pk]);new Set([...mk,dk,`End`]);var hk=new Set([sk,ck,lk,uk,dk,`End`]),gk=W.createContext(void 0);function _k(e){let t=W.useContext(gk);if(t===void 0&&!e)throw Error(j_(69));return t}var vk={...yT,...lT},yk=W.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,...o}=e,{store:s}=BO(),c=ik(),l=_k(!0)!=null,u=jT(),d=s.useState(`open`),f=s.useState(`openMethod`),p=s.useState(`instantType`),m=s.useState(`transitionStatus`),h=s.useState(`popupProps`),g=s.useState(`titleElementId`),_=s.useState(`descriptionElementId`),v=s.useState(`modal`),y=s.useState(`mounted`),b=s.useState(`openChangeReason`),x=s.useState(`popupElement`),S=s.useState(`payload`),C=s.useState(`positionerElement`),w=s.useState(`activeTriggerElement`),T=s.useState(`floatingRootContext`);hw({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}});let E=s.useState(`disabled`),D=s.useState(`openOnHover`),O=s.useState(`closeDelay`);Pw(T,{enabled:D&&!E,closeDelay:O});function k(e){return e===`touch`?s.context.popupRef.current:!0}let A=i===void 0?k:i,j=W.useMemo(()=>({open:d,side:c.side,align:c.align,instant:p,transitionStatus:m}),[d,c.side,c.align,p,m]),M=W.useCallback(e=>{s.set(`popupElement`,e)},[s]);function N(){T.context.events.emit(`measure-layout`)}function P(e,t){T.context.events.emit(`measure-layout-complete`,{previousDimensions:e,nextDimensions:t})}KT({popupElement:x,positionerElement:C,mounted:y,content:S,enabled:W.useCallback(()=>s.context.triggerElements.size>1,[s]),onMeasureLayout:N,onMeasureLayoutComplete:P,side:c.side,direction:u});let F=tS(`div`,e,{state:j,ref:[t,s.context.popupRef,M],props:[h,{"aria-labelledby":g,"aria-describedby":_,onKeyDown(e){l&&hk.has(e.key)&&e.stopPropagation()}},VT(m),o],stateAttributesMapping:vk});return(0,G.jsx)(xS,{context:T,openInteractionType:f,modal:v===`trap-focus`,disabled:!y||b===`trigger-hover`,initialFocus:A,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:q_(w)?w:void 0,nextFocusableElement:s.context.triggerFocusTargetRef,beforeContentFocusGuardRef:s.context.beforeContentFocusGuardRef,children:F})});function bk({trigger:e,children:t,open:n,onOpenChange:r,side:i=`bottom`,align:a=`end`,className:o,ariaLabel:s}){return(0,G.jsxs)(qO,{open:n,onOpenChange:r,children:[(0,G.jsx)($O,{render:e}),(0,G.jsx)(nk,{children:(0,G.jsx)(ok,{className:`ui-popover-positioner`,side:i,align:a,sideOffset:8,children:(0,G.jsx)(yk,{className:`ui-popover ${o??``}`,"aria-label":s,children:t})})})]})}function xk(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}function Sk({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=W.useRef(e!==void 0),[a,o]=W.useState(t);return[i?e:a,W.useCallback(e=>{i||o(e)},[])]}var Ck=W.createContext(null),wk=W.createContext(null);function Tk(){let e=W.useContext(Ck);if(e===null)throw Error(j_(60));return e}function Ek(){let e=W.useContext(wk);if(e===null)throw Error(j_(61));return e}var Dk=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),Ok={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},kk={valid(e){return e===null?null:e?{[Dk.valid]:``}:{[Dk.invalid]:``}}},Ak=W.createContext({invalid:void 0,name:void 0,validityData:{state:Ok,errors:[],error:``,value:``,initialValue:null},setValidityData:zb,disabled:void 0,touched:!1,setTouched:zb,dirty:!1,setDirty:zb,filled:!1,setFilled:zb,focused:!1,setFocused:zb,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Vb)=>e,getInputValidationProps:(e=Vb)=>e,inputRef:{current:null},commit:async()=>{}}});function jk(e=!0){let t=W.useContext(Ak);if(t.setValidityData===zb&&!e)throw Error(j_(28));return t}var Mk=W.createContext({controlId:void 0,setControlId:zb,labelId:void 0,setLabelId:zb,messageIds:[],setMessageIds:zb,getDescriptionProps:e=>e});function Nk(){return W.useContext(Mk)}function Pk(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,setControlId:a}=Nk(),o=bT(t);return Y(()=>{if(!(!n&&!t||a===zb)){if(n){let e=r?.current;K_(e)&&e.closest(`label`)!=null?a(t??null):a(i??o)}else t&&a(t);return()=>{t&&a(void 0)}}},[t,r,i,a,n,o]),i??o}var Fk=(e,t)=>Object.is(e,t);function Ik(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Lk(e,t,n){return!e||e.length===0?!1:e.some(e=>e===void 0?!1:Ik(e,t,n))}function Rk(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e===void 0?!1:Ik(e,t,n))}function zk(e,t,n){return e.filter(e=>!Ik(e,t,n))}function Bk(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Vk(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Hk(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Bk(e)}function Uk(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Bk(e.value):Bk(e)}function Wk(e,t,n){if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??Hk(e,n);if(Array.isArray(t)){let r=Vk(t)?t.flatMap(e=>e.items):t;if(e==null){let t=r.find(e=>e.value==null);return t&&t.label!=null?t.label:Hk(e,n)}if(typeof e!=`object`){let t=r.find(t=>t&&t.value===e);return t&&t.label!=null?t.label:Hk(e,n)}if(`value`in e){let t=r.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return Hk(e,n)}function Gk(e,t){return!Array.isArray(e)||e.length===0?``:e.map(e=>Hk(e,t)).join(`, `)}var Kk={id:Z(e=>e.id),modal:Z(e=>e.modal),multiple:Z(e=>e.multiple),items:Z(e=>e.items),itemToStringLabel:Z(e=>e.itemToStringLabel),itemToStringValue:Z(e=>e.itemToStringValue),isItemEqualToValue:Z(e=>e.isItemEqualToValue),value:Z(e=>e.value),open:Z(e=>e.open),mounted:Z(e=>e.mounted),forceMount:Z(e=>e.forceMount),transitionStatus:Z(e=>e.transitionStatus),touchModality:Z(e=>e.touchModality),activeIndex:Z(e=>e.activeIndex),selectedIndex:Z(e=>e.selectedIndex),isActive:Z((e,t)=>e.activeIndex===t),isSelected:Z((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>Ik(e,n,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Ik(i,n,r)}),isSelectedByFocus:Z((e,t)=>e.selectedIndex===t),popupProps:Z(e=>e.popupProps),triggerProps:Z(e=>e.triggerProps),triggerElement:Z(e=>e.triggerElement),positionerElement:Z(e=>e.positionerElement),listElement:Z(e=>e.listElement),scrollUpArrowVisible:Z(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Z(e=>e.scrollDownArrowVisible),hasScrollArrows:Z(e=>e.hasScrollArrows),serializedValue:Z(e=>{let{multiple:t,value:n,itemToStringValue:r}=e;return t&&Array.isArray(n)&&n.length===0?``:Uk(n,r)})},qk=W.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:zb,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function Jk(){return W.useContext(qk)}function Yk(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function Xk(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=Jk(),{invalid:c,markedDirtyRef:l,validityData:u,setValidityData:d}=jk(),f=X(e.getValue);Y(()=>{if(!t)return;let e=n;e===void 0&&(e=f()),u.initialValue===null&&e!==null&&d(t=>({...t,initialValue:e}))},[t,d,n,u.initialValue,f]),Y(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:i,controlRef:a,validityData:Yk(u,c),validate(){let e=n;e===void 0&&(e=f()),l.current=!0,aS.flushSync(()=>o(e))}})},[o,a,t,s,f,r,c,l,i,u,n]),Y(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}function Zk(e,t){let n=W.useRef(e),r=X(t);Y(()=>{n.current!==e&&r(n.current)},[e,r]),Y(()=>{n.current=e},[e])}function Qk(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,disabled:l=!1,readOnly:u=!1,required:d=!1,modal:f=!0,actionsRef:p,inputRef:m,onOpenChangeComplete:h,items:g,multiple:_=!1,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b=Fk,highlightItemOnHover:x=!0,children:S}=e,{clearErrors:C}=Jk(),{setDirty:w,shouldValidateOnChange:T,validityData:E,setFilled:D,name:O,disabled:k,validation:A}=jk(),{controlId:j}=Nk(),M=Pk({id:t}),N=k||l,P=O??c,[F,I]=Sk({controlled:n,default:_?r??Bb:r,name:`Select`,state:`value`}),[L,R]=Sk({controlled:a,default:o,name:`Select`,state:`open`}),z=W.useRef([]),ee=W.useRef([]),te=W.useRef(null),B=W.useRef(null),V=W.useRef(0),H=W.useRef(null),ne=W.useRef([]),re=W.useRef(!1),ie=W.useRef(!1),ae=W.useRef(null),oe=W.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),se=W.useRef(!1),{mounted:ce,setMounted:le,transitionStatus:ue}=pw(L),U=F_(()=>new lw({id:M,modal:f,multiple:_,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b,value:F,open:L,mounted:ce,transitionStatus:ue,items:g,forceMount:!1,touchModality:!1,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,de=ow(U,Kk.activeIndex),fe=ow(U,Kk.selectedIndex),pe=ow(U,Kk.triggerElement),me=ow(U,Kk.positionerElement),he=W.useMemo(()=>_&&Array.isArray(F)&&F.length===0?``:Uk(F,y),[_,F,y]),ge=fv(U.state.triggerElement);Xk({id:M,commit:A.commit,value:F,controlRef:ge,name:P,getValue:()=>F});let _e=W.useRef(F);Y(()=>{F!==_e.current&&U.set(`forceMount`,!0)},[U,F]),Y(()=>{D(F!==null)},[F,D]),Y(function(){if(L)return;let e=ne.current;if(_){let t=Array.isArray(F)?F:[];if(t.length===0){U.set(`selectedIndex`,null);return}let n=t[t.length-1],r=Rk(e,n,b);U.set(`selectedIndex`,r===-1?null:r);return}let t=Rk(e,F,b);U.set(`selectedIndex`,t===-1?null:t)},[_,L,F,ne,b,U]),Zk(F,()=>{C(P),w(F!==E.initialValue),T()?A.commit(F):A.commit(F,!0)});let ve=X((e,t)=>{if(s?.(e,t),!t.isCanceled&&(R(e),!e&&U.state.activeIndex!==null)){let e=z.current[U.state.activeIndex];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}}),ye=X(()=>{le(!1),U.set(`activeIndex`,null),h?.(!1)});hw({enabled:!p,open:L,ref:te,onComplete(){L||ye()}}),W.useImperativeHandle(p,()=>({unmount:ye}),[ye]);let be=X((e,t)=>{i?.(e,t),!t.isCanceled&&I(e)}),xe=X(()=>{let e=U.state.listElement||te.current;if(!e)return;let t=e.scrollTop,n=e.scrollTop+e.clientHeight,r=t>1,i=n<e.scrollHeight-1;U.state.scrollUpArrowVisible!==r&&U.set(`scrollUpArrowVisible`,r),U.state.scrollDownArrowVisible!==i&&U.set(`scrollDownArrowVisible`,i)}),Se=ww({open:L,onOpenChange:ve,elements:{reference:pe,floating:me}}),{getReferenceProps:Ce,getFloatingProps:we,getItemProps:Te}=zw([SS(Se,{enabled:!u&&!N,event:`mousedown`}),LC(Se,{bubbles:!1}),Jw(Se,{enabled:!u&&!N,listRef:z,activeIndex:de,selectedIndex:fe,disabledIndices:Bb,onNavigate(e){e===null&&!L||U.set(`activeIndex`,e)},focusItemOnHover:!1}),Zw(Se,{enabled:!u&&!N&&(L||!_),listRef:ee,activeIndex:de,selectedIndex:fe,onMatch(e){L?U.set(`activeIndex`,e):be(ne.current[e],ox(`none`))},onTypingChange(e){re.current=e}})]);xk(()=>{U.update({popupProps:we(),triggerProps:Ce()})}),Y(()=>{U.update({id:M,modal:f,multiple:_,value:F,open:L,mounted:ce,transitionStatus:ue,popupProps:we(),triggerProps:Ce(),items:g,itemToStringLabel:v,itemToStringValue:y,isItemEqualToValue:b})},[U,M,f,_,F,L,ce,ue,we,Ce,g,v,y,b]);let Ee=W.useMemo(()=>({store:U,name:P,required:d,disabled:N,readOnly:u,multiple:_,itemToStringLabel:v,itemToStringValue:y,highlightItemOnHover:x,setValue:be,setOpen:ve,listRef:z,popupRef:te,scrollHandlerRef:B,handleScrollArrowVisibility:xe,scrollArrowsMountedCountRef:V,getItemProps:Te,events:Se.context.events,valueRef:H,valuesRef:ne,labelsRef:ee,typingRef:re,selectionRef:oe,selectedItemTextRef:ae,validation:A,onOpenChangeComplete:h,keyboardActiveRef:ie,alignItemWithTriggerActiveRef:se,initialValueRef:_e}),[U,P,d,N,u,_,v,y,x,be,ve,Te,Se.context.events,A,h,xe]),De=fx(m,A.inputRef),Oe=_&&Array.isArray(F)&&F.length>0,ke=W.useMemo(()=>!_||!Array.isArray(F)||!P?null:F.map(e=>{let t=Uk(e,y);return(0,G.jsx)(`input`,{type:`hidden`,name:P,value:t},t)}),[_,F,P,y]);return(0,G.jsx)(Ck.Provider,{value:Ee,children:(0,G.jsxs)(wk.Provider,{value:Se,children:[S,(0,G.jsx)(`input`,{...A.getInputValidationProps({onFocus(){U.state.triggerElement?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=ox(qb,e.nativeEvent);function r(){if(_)return;let e=ne.current.find(e=>Uk(e,y).toLowerCase()===t.toLowerCase());e!=null&&(w(e!==E.initialValue),be(e,n),T()&&A.commit(e))}U.set(`forceMount`,!0),queueMicrotask(r)}}),id:t||j||void 0,name:_?void 0:P,value:he,disabled:N,required:d&&!Oe,readOnly:u,ref:De,style:vx,tabIndex:-1,"aria-hidden":!0}),ke]})})}function $k(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,`::before`),r=window.getComputedStyle(e,`::after`);if(!(n.content!==`none`||r.content!==`none`))return t;let i=parseFloat(n.width)||0,a=parseFloat(n.height)||0,o=parseFloat(r.width)||0,s=parseFloat(r.height)||0,c=Math.max(t.width,i,o),l=Math.max(t.height,a,s),u=c-t.width,d=l-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}var eA=2,tA={...vT,...kk,value:()=>null},nA=W.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,...o}=e,{setTouched:s,setFocused:c,validationMode:l,state:u,disabled:d}=jk(),{labelId:f}=Nk(),{store:p,setOpen:m,selectionRef:h,validation:g,readOnly:_,alignItemWithTriggerActiveRef:v,disabled:y,keyboardActiveRef:b}=Tk(),x=d||y||i,S=ow(p,Kk.open),C=ow(p,Kk.value),w=ow(p,Kk.triggerProps),T=ow(p,Kk.positionerElement),E=ow(p,Kk.listElement),D=ow(p,Kk.serializedValue),O=fv(T),k=W.useRef(null),A=B_(),j=B_(),{getButtonProps:M,buttonRef:N}=ZO({disabled:x,native:a}),P=fx(t,k,N,X(e=>{p.set(`triggerElement`,e)})),F=B_(),I=B_();W.useEffect(()=>{if(S)return I.start(200,()=>{h.current.allowUnselectedMouseUp=!0,F.start(200,()=>{h.current.allowSelectedMouseUp=!0})}),()=>{F.clear(),I.clear()};h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},j.clear()},[S,h,j,F,I]);let L=W.useMemo(()=>E?.id??Kv(T)?.id,[E,T]),R=Wx(w,{role:`combobox`,"aria-expanded":S?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":S?L:void 0,"aria-labelledby":f,"aria-readonly":_||void 0,tabIndex:x?-1:0,ref:P,onFocus(e){c(!0),S&&v.current&&m(!1,ox($b,e.nativeEvent)),A.start(0,()=>{p.set(`forceMount`,!0)})},onBlur(){s(!0),c(!1),l===`onBlur`&&g.commit(C)},onPointerMove({pointerType:e}){b.current=!1,p.set(`touchModality`,e===`touch`)},onPointerDown({pointerType:e}){p.set(`touchModality`,e===`touch`)},onKeyDown(){b.current=!0},onMouseDown(e){if(S)return;let t=Cx(e.currentTarget);function n(e){if(!k.current)return;let t=e.target;if(Rv(k.current,t)||Rv(O.current,t)||t===k.current)return;let n=$k(k.current);e.clientX>=n.left-eA&&e.clientX<=n.right+eA&&e.clientY>=n.top-eA&&e.clientY<=n.bottom+eA||m(!1,ox(nx,e))}j.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},g.getValidationProps,o,M);R.role=`combobox`;let z=W.useMemo(()=>({...u,open:S,disabled:x,value:C,readOnly:_,placeholder:!D}),[u,S,x,C,_,D]);return tS(`button`,e,{ref:[t,k],state:z,stateAttributesMapping:tA,props:R})}),rA={value:()=>null},iA=W.forwardRef(function(e,t){let{className:n,render:r,children:i,...a}=e,{store:o,valueRef:s}=Tk(),c=ow(o,Kk.value),l=ow(o,Kk.items),u=ow(o,Kk.itemToStringLabel),d=ow(o,Kk.serializedValue),f=W.useMemo(()=>({value:c,placeholder:!d}),[c,d]),p=typeof i==`function`?i(c):i??(Array.isArray(c)?Gk(c,u):Wk(c,l,u));return tS(`span`,e,{state:f,ref:[t,s],props:[{children:p},a],stateAttributesMapping:rA})}),aA=W.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a}=Tk(),o=ow(a,Kk.open);return tS(`span`,e,{state:W.useMemo(()=>({open:o}),[o]),ref:t,props:[{"aria-hidden":!0,children:`▼`},i],stateAttributesMapping:_T})}),oA=W.createContext(void 0),sA=W.forwardRef(function(e,t){let{store:n}=Tk(),r=ow(n,Kk.mounted),i=ow(n,Kk.forceMount);return r||i?(0,G.jsx)(oA.Provider,{value:!0,children:(0,G.jsx)(uS,{ref:t,...e})}):null}),cA=W.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function lA(){return W.useContext(cA)}function uA(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),o=W.useRef(0),s=F_(fA).current,c=F_(dA).current,[l,u]=W.useState(0),d=W.useRef(l),f=X((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=X(e=>{c.delete(e),d.current+=1,u(d.current)}),m=W.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(pA).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Y(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Y(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Y(()=>()=>{n.current=[]},[n]),Y(()=>()=>{r&&(r.current=[])},[r]);let h=X(e=>(s.add(e),()=>{s.delete(e)}));Y(()=>{s.forEach(e=>e(m))},[s,m]);let g=W.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,G.jsx)(cA.Provider,{value:g,children:t})}function dA(){return new Map}function fA(){return new Set}function pA(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var mA=W.createContext(void 0);function hA(){let e=W.useContext(mA);if(!e)throw Error(j_(59));return e}function gA(e,t){e&&Object.assign(e.style,t)}var _A={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},vA={position:`fixed`},yA=W.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=Wb,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=Tk(),D=Ek(),O=ow(v,Kk.open),k=ow(v,Kk.mounted),A=ow(v,Kk.modal),j=ow(v,Kk.value),M=ow(v,Kk.touchModality),N=ow(v,Kk.positionerElement),P=ow(v,Kk.triggerElement),F=ow(v,Kk.isItemEqualToValue),I=W.useRef(null),L=W.useRef(null),[R,z]=W.useState(h),ee=k&&R&&!M;!k&&R!==h&&z(h),Y(()=>{k||(Kk.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),Kk.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),W.useImperativeHandle(x,()=>ee),RO((ee||A)&&O&&!M,P);let te=zT({anchor:n,floatingRootContext:D,positionMethod:r,mounted:k,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ee,collisionAvoidance:g,keepMounted:!0}),B=ee?`none`:te.side,V=ee?vA:te.positionerStyles,H=W.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...V,...e}}},[O,k,V]),ne=W.useMemo(()=>({open:O,side:B,align:te.align,anchorHidden:te.anchorHidden}),[O,B,te.align,te.anchorHidden]),re=tS(`div`,e,{ref:[t,X(e=>{v.set(`positionerElement`,e)})],state:ne,stateAttributesMapping:yT,props:[H,_]}),ie=W.useRef(0),ae=X(e=>{if(e.size===0&&ie.current===0||C.current.length===0)return;let t=ie.current;if(ie.current=e.size,e.size===t)return;let n=ox(qb);if(t!==0&&!v.state.multiple&&j!==null&&Rk(C.current,j,F)===-1){let e=w.current,t=e!=null&&Lk(C.current,e,F)?e:null;E(t,n),t===null&&(v.set(`selectedIndex`,null),S.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(j)){let e=j.filter(e=>Lk(C.current,e,F));(e.length!==j.length||e.some(e=>!Lk(j,e,F)))&&(E(e,n),e.length===0&&(v.set(`selectedIndex`,null),S.current=null))}if(O&&ee){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};gA(N,e),gA(T.current,e)}}),oe=W.useMemo(()=>({...te,side:B,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:I,scrollDownArrowRef:L}),[te,B,ee,z]);return(0,G.jsx)(uA,{elementsRef:y,labelsRef:b,onMapChange:ae,children:(0,G.jsxs)(mA.Provider,{value:oe,children:[k&&A&&(0,G.jsx)(ak,{inert:ZT(!O),cutout:P}),re]})})});function bA(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var xA=`base-ui-disable-scrollbar`,SA={className:xA,element:(0,G.jsx)(`style`,{href:xA,precedence:`base-ui:low`,children:`.${xA}{scrollbar-width:none}.${xA}::-webkit-scrollbar{display:none}`})},CA={...yT,...lT},wA=W.forwardRef(function(e,t){let{render:n,className:r,...i}=e,{store:a,popupRef:o,onOpenChangeComplete:s,setOpen:c,valueRef:l,selectedItemTextRef:u,keyboardActiveRef:d,multiple:f,handleScrollArrowVisibility:p,scrollHandlerRef:m}=Tk(),{side:h,align:g,alignItemWithTriggerActive:_,setControlledAlignItemWithTrigger:v,scrollDownArrowRef:y,scrollUpArrowRef:b}=hA(),x=_k(!0)!=null,S=Ek(),C=B_(),w=ow(a,Kk.id),T=ow(a,Kk.open),E=ow(a,Kk.mounted),D=ow(a,Kk.popupProps),O=ow(a,Kk.transitionStatus),k=ow(a,Kk.triggerElement),A=ow(a,Kk.positionerElement),j=ow(a,Kk.listElement),M=W.useRef(0),N=W.useRef(!1),P=W.useRef(0),F=W.useRef(!1),I=W.useRef({}),L=Sx(),R=X(e=>{if(!A||!o.current||!F.current)return;if(N.current||!_){p();return}let t=A.style.top===`0px`,n=A.style.bottom===`0px`,r=A.getBoundingClientRect().height,i=Cx(A),a=getComputedStyle(A),s=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=i.documentElement.clientHeight-s-c,u=e.scrollTop,d=e.scrollHeight-e.clientHeight,f=null,m=null,h=!1;if(t){let e=r+(d-u),t=Math.min(e,l);f=t,t===l?h=!0:m=d}else if(n){let e=u-0,t=r+e,n=Math.min(t,l),i=t-l;f=n,n===l?(h=!0,u<d&&(m=u-(e-i))):m=0}f!=null&&(A.style.height=`${f}px`),m!=null&&(e.scrollTop=m),h&&(N.current=!0),p()});W.useImperativeHandle(m,()=>R,[R]),hw({open:T,ref:o,onComplete(){T&&s?.(!0)}});let z=W.useMemo(()=>({open:T,transitionStatus:O,side:h,align:g}),[T,O,h,g]);Y(()=>{!A||!o.current||Object.keys(I.current).length||(I.current={top:A.style.top||`0`,left:A.style.left||`0`,right:A.style.right,height:A.style.height,bottom:A.style.bottom,minHeight:A.style.minHeight,maxHeight:A.style.maxHeight,marginTop:A.style.marginTop,marginBottom:A.style.marginBottom})},[o,A]),Y(()=>{E||_||(F.current=!1,N.current=!1,M.current=0,P.current=0,gA(A,I.current))},[E,_,A,o]),Y(()=>{let e=o.current;if(!(!E||!k||!A||!e)){if(!_){F.current=!0,L.request(p);return}queueMicrotask(()=>{let t=getComputedStyle(A),n=getComputedStyle(e),r=Cx(k),i=U_(A),a=k.getBoundingClientRect(),o=A.getBoundingClientRect(),s=a.left,c=a.height,d=j||e,f=d.scrollHeight,m=parseFloat(n.borderBottomWidth),h=parseFloat(t.marginTop)||10,g=parseFloat(t.marginBottom)||10,_=parseFloat(t.minHeight)||100,y=r.documentElement.clientHeight-h-g,b=r.documentElement.clientWidth,x=y-a.bottom+c,S=u.current,C=l.current,w=0,T=0;if(S&&C){let e=C.getBoundingClientRect(),t=S.getBoundingClientRect(),n=e.left-s,r=t.left-o.left,i=e.top-a.top+e.height/2,c=t.top-o.top+t.height/2;w=n-r,T=c-i}let E=x+T+g+m,D=Math.min(y,E),O=y-h-g,P=E-D,L=Math.max(5,s+w),R=b-5,z=Math.max(0,L+o.width-R);A.style.left=`${L-z}px`,A.style.height=`${D}px`,A.style.maxHeight=`auto`,A.style.marginTop=`${h}px`,A.style.marginBottom=`${g}px`,e.style.height=`100%`;let ee=d.scrollHeight-d.clientHeight,te=P>=ee;te&&(D=Math.min(y,o.height)-(P-ee));let B=a.top<20||a.bottom>y-20||D<Math.min(f,_),V=(i.visualViewport?.scale??1)!==1&&Sv;if(B||V){F.current=!0,gA(A,I.current),aS.flushSync(()=>v(!1));return}if(te){let e=Math.max(0,y-E);A.style.top=o.height>=O?`0`:`${e}px`,A.style.height=`${D}px`,d.scrollTop=d.scrollHeight-d.clientHeight,M.current=Math.max(_,D)}else A.style.bottom=`0`,M.current=Math.max(_,D),d.scrollTop=P;M.current===y&&(N.current=!0),p(),setTimeout(()=>{F.current=!0})})}},[a,E,A,k,l,u,o,p,_,v,L,y,b,j]),W.useEffect(()=>{if(!_||!A||!E)return;let e=U_(A);function t(e){c(!1,ox(ax,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[c,_,A,E]);let ee={...j?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":f||void 0,id:`${w}-list`},onKeyDown(e){d.current=!0,x&&hk.has(e.key)&&e.stopPropagation()},onMouseMove(){d.current=!1},onPointerLeave(e){if(bA(e)||e.pointerType===`touch`)return;let t=e.currentTarget;C.start(0,()=>{a.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){j||m.current?.(e.currentTarget)},..._&&{style:j?{height:`100%`}:_A}},te=tS(`div`,e,{ref:[t,o],state:z,stateAttributesMapping:CA,props:[D,ee,VT(O),{className:!j&&_?SA.className:void 0},i]});return(0,G.jsxs)(W.Fragment,{children:[SA.element,(0,G.jsx)(xS,{context:S,modal:!1,disabled:!E,restoreFocus:!0,children:te})]})}),TA=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function EA(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=lA(),f=W.useRef(-1),[p,m]=W.useState(a??(i===TA.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=W.useRef(null),g=W.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Y(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Y(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),W.useMemo(()=>({ref:g,index:p}),[p,g])}var DA=W.createContext(void 0);function OA(){let e=W.useContext(DA);if(!e)throw Error(j_(57));return e}var kA=W.memo(W.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=W.useRef(null),u=EA({label:a,textRef:l,indexGuessBehavior:TA.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=Tk(),x=B_(),S=ow(d,Kk.isActive,u.index),C=ow(d,Kk.isSelected,u.index,i),w=ow(d,Kk.isSelectedByFocus,u.index),T=ow(d,Kk.isItemEqualToValue),E=u.index,D=E!==-1,O=W.useRef(null),k=fv(E);Y(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),Y(()=>{if(!D)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&Ik(t,i,T)&&d.set(`selectedIndex`,E)},[D,E,y,T,d,i]);let A=W.useMemo(()=>({disabled:o,selected:C,highlighted:S}),[o,C,S]),j=f({active:S,selected:C});j.onFocus=void 0,j.id=void 0;let M=W.useRef(null),N=W.useRef(`mouse`),P=W.useRef(!1),{getButtonProps:F,buttonRef:I}=ZO({disabled:o,focusableWhenDisabled:!0,native:s});function L(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(C?zk(n,i,T):[...n,i],ox(Qb,e))}else m(i,ox(Qb,e)),p(!1,ox(Qb,e))}let R={role:`option`,"aria-selected":C,"aria-disabled":o||void 0,tabIndex:S?0:-1,onFocus(){d.set(`activeIndex`,E)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&d.set(`activeIndex`,E)},onMouseMove(){b&&d.set(`activeIndex`,E)},onMouseLeave(e){!b||v.current||bA(e)||x.start(0,()=>{d.state.activeIndex===E&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){M.current=e.key,d.set(`activeIndex`,E)},onClick(e){P.current=!1,!(e.type===`keydown`&&M.current===null)&&(o||M.current===` `&&g.current||N.current!==`touch`&&!S||(M.current=null,L(e.nativeEvent)))},onPointerEnter(e){N.current=e.pointerType},onPointerDown(e){N.current=e.pointerType,P.current=!0},onMouseUp(e){if(o)return;if(P.current){P.current=!1;return}let t=!h.current.allowSelectedMouseUp&&C,n=!h.current.allowUnselectedMouseUp&&!C;t||n||N.current!==`touch`&&!S||L(e.nativeEvent)}},z=tS(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,R,c,F]}),ee=W.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,G.jsx)(DA.Provider,{value:ee,children:z})})),AA=W.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=OA();return n||r?(0,G.jsx)(jA,{...e,ref:t}):null}),jA=W.memo(W.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=OA(),s=W.useRef(null),{transitionStatus:c,setMounted:l}=pw(o),u=W.useMemo(()=>({selected:o,transitionStatus:c}),[o,c]),d=tS(`span`,e,{ref:[t,s],state:u,props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:lT});return hw({open:o,ref:s,onComplete(){o||l(!1)}}),d})),MA=W.memo(W.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=OA(),{selectedItemTextRef:o}=Tk(),{className:s,render:c,...l}=e;return tS(`div`,e,{ref:[W.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})}));function NA({value:e,onValueChange:t,options:n,ariaLabel:r,className:i}){return(0,G.jsxs)(Qk,{value:e,onValueChange:e=>t(e),modal:!1,children:[(0,G.jsxs)(nA,{className:`ui-select-trigger ${i??``}`,"aria-label":r,children:[(0,G.jsx)(iA,{children:e=>n.find(t=>t.value===e)?.label??e}),(0,G.jsx)(aA,{className:`ui-select-icon`,children:(0,G.jsx)(FD,{size:12})})]}),(0,G.jsx)(sA,{children:(0,G.jsx)(yA,{className:`ui-select-positioner`,sideOffset:4,align:`end`,side:`bottom`,alignItemWithTrigger:!1,children:(0,G.jsx)(wA,{className:`ui-select-popup`,children:n.map(e=>(0,G.jsxs)(kA,{value:e.value,className:`ui-select-item`,children:[(0,G.jsx)(MA,{children:e.label}),(0,G.jsx)(AA,{className:`ui-select-indicator`,children:(0,G.jsx)(jD,{size:13})})]},e.value))})})})]})}var PA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,IA={};function LA(e,t){return((t||IA).jsx?FA:PA).test(e)}var RA=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
1899
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),zA=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(RA());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),BA=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),VA=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(zA()),r=BA();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),HA=WA(`end`),UA=WA(`start`);function WA(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function GA(e){let t=UA(e),n=HA(e);if(t&&n)return{start:t,end:n}}function KA(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?JA(e.position):`start`in e||`end`in e?JA(e):`line`in e||`column`in e?qA(e):``}function qA(e){return YA(e&&e.line)+`:`+YA(e&&e.column)}function JA(e){return qA(e&&e.start)+`-`+qA(e&&e.end)}function YA(e){return e&&typeof e==`number`?e:1}var XA=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=KA(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};XA.prototype.file=``,XA.prototype.name=``,XA.prototype.reason=``,XA.prototype.message=``,XA.prototype.stack=``,XA.prototype.column=void 0,XA.prototype.line=void 0,XA.prototype.ancestors=void 0,XA.prototype.cause=void 0,XA.prototype.fatal=void 0,XA.prototype.place=void 0,XA.prototype.ruleId=void 0,XA.prototype.source=void 0;var ZA=l(VA(),1),QA={}.hasOwnProperty,$A=new Map,ej=/[A-Z]/g,tj=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),nj=new Set([`td`,`th`]),rj=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function ij(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=hj(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=mj(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?ga:ha,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=aj(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function aj(e,t,n){if(t.type===`element`)return oj(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return sj(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return lj(e,t,n);if(t.type===`mdxjsEsm`)return cj(e,t);if(t.type===`root`)return uj(e,t,n);if(t.type===`text`)return dj(e,t)}function oj(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=ga,e.schema=i),e.ancestors.push(t);let a=xj(e,t.tagName,!1),o=gj(e,t),s=vj(e,t);return tj.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Xa(e):!0})),fj(e,o,a,t),pj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function sj(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sj(e,t.position)}function cj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sj(e,t.position)}function lj(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=ga,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:xj(e,t.name,!0),o=_j(e,t),s=vj(e,t);return fj(e,o,a,t),pj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uj(e,t,n){let r={};return pj(r,vj(e,t)),e.create(t,e.Fragment,r,n)}function dj(e,t){return t.value}function fj(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pj(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function mj(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function hj(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=UA(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function gj(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&QA.call(t.properties,i)){let a=yj(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&nj.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function _j(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Sj(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Sj(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function vj(e,t){let n=[],r=-1,i=e.passKeys?new Map:$A;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=aj(e,a,o);s!==void 0&&n.push(s)}return n}function yj(e,t,n){let r=fa(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?qa(n):Ja(n)),r.property===`style`){let t=typeof n==`object`?n:bj(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Cj(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?ca[r.property]||r.property:r.attribute,n]}}function bj(e,t){try{return(0,ZA.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new XA("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=rj+`#cannot-parse-style-attribute`,r}}function xj(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=LA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=LA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return QA.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Sj(e)}function Sj(e,t){let n=new XA("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=rj+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Cj(e){let t={},n;for(n in e)QA.call(e,n)&&(t[wj(n)]=e[n]);return t}function wj(e){let t=e.replace(ej,Tj);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Tj(e){return`-`+e.toLowerCase()}var Ej={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Dj={};function Oj(e,t){let n=t||Dj;return kj(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function kj(e,t,n){if(jj(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Aj(e.children,t,n)}return Array.isArray(e)?Aj(e,t,n):``}function Aj(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=kj(e[i],t,n);return r.join(``)}function jj(e){return!!(e&&typeof e==`object`)}var Mj=document.createElement(`i`);function Nj(e){let t=`&`+e+`;`;Mj.innerHTML=t;let n=Mj.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Pj(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Fj(e,t){return e.length>0?(Pj(e,e.length,0,t),e):t}var Ij={}.hasOwnProperty;function Lj(e){let t={},n=-1;for(;++n<e.length;)Rj(t,e[n]);return t}function Rj(e,t){let n;for(n in t){let r=(Ij.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ij.call(r,a)||(r[a]=[]);let e=i[a];zj(r[a],Array.isArray(e)?e:e?[e]:[])}}}function zj(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Pj(e,0,0,r)}function Bj(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Vj(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Hj=eM(/[A-Za-z]/),Uj=eM(/[\dA-Za-z]/),Wj=eM(/[#-'*+\--9=?A-Z^-~]/);function Gj(e){return e!==null&&(e<32||e===127)}var Kj=eM(/\d/),qj=eM(/[\dA-Fa-f]/),Jj=eM(/[!-/:-@[-`{-~]/);function Yj(e){return e!==null&&e<-2}function Xj(e){return e!==null&&(e<0||e===32)}function Zj(e){return e===-2||e===-1||e===32}var Qj=eM(/\p{P}|\p{S}/u),$j=eM(/\s/);function eM(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function tM(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Uj(e.charCodeAt(n+1))&&Uj(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function nM(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Zj(r)?(e.enter(n),s(r)):t(r)}function s(r){return Zj(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var rM={tokenize:iM};function iM(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),nM(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Yj(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var aM={tokenize:sM},oM={tokenize:cM};function sM(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Pj(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oM,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(oM,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Yj(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Pj(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cM(e,t,n){return nM(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function lM(e){if(e===null||Xj(e)||$j(e))return 1;if(Qj(e))return 2}function uM(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var dM={name:`attention`,resolveAll:fM,tokenize:pM};function fM(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};mM(d,-c),mM(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Fj(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Fj(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Fj(l,uM(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Fj(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Fj(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Pj(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function pM(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=lM(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=lM(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function mM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var hM={name:`autolink`,tokenize:gM};function gM(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Hj(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Uj(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Uj(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Gj(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Wj(t)?(e.consume(t),l):n(t)}function u(e){return Uj(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Uj(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var _M={partial:!0,tokenize:vM};function vM(e,t,n){return r;function r(t){return Zj(t)?nM(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Yj(e)?t(e):n(e)}}var yM={continuation:{tokenize:xM},exit:SM,name:`blockQuote`,tokenize:bM};function bM(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Zj(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function xM(e,t,n){let r=this;return i;function i(t){return Zj(t)?nM(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(yM,t,n)(r)}}function SM(e){e.exit(`blockQuote`)}var CM={name:`characterEscape`,tokenize:wM};function wM(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Jj(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var TM={name:`characterReference`,tokenize:EM};function EM(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Uj,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=qj,u):(e.enter(`characterReferenceValue`),a=7,o=Kj,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Uj&&!Nj(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var DM={partial:!0,tokenize:AM},OM={concrete:!0,name:`codeFenced`,tokenize:kM};function kM(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Zj(t)?nM(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Yj(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(DM,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Yj(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Zj(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),nM(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Yj(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Yj(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Zj(t)?nM(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Yj(t)?e.check(DM,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Yj(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Zj(t)?nM(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Zj(t)?nM(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Yj(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function AM(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var jM={name:`codeIndented`,tokenize:NM},MM={partial:!0,tokenize:PM};function NM(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),nM(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Yj(t)?e.attempt(MM,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Yj(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function PM(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Yj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):nM(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Yj(e)?i(e):n(e)}}var FM={name:`codeText`,previous:LM,resolve:IM,tokenize:RM};function IM(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function LM(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function RM(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Yj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Yj(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var zM=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&BM(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),BM(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),BM(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);BM(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);BM(this.left,t.reverse())}}};function BM(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function VM(e){let t={},n=-1,r,i,a,o,s,c,l,u=new zM(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,HM(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Pj(e,0,1/0,u.slice(0)),!l}function HM(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var UM={resolve:GM,tokenize:KM},WM={partial:!0,tokenize:qM};function GM(e){return VM(e),e}function KM(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Yj(t)?e.check(WM,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function qM(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),nM(e,a,`linePrefix`)}function a(i){if(i===null||Yj(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function JM(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Gj(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Yj(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Xj(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Gj(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function YM(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Yj(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Yj(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Zj(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function XM(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Yj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),nM(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Yj(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ZM(e,t){let n;return r;function r(i){return Yj(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Zj(i)?nM(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var QM={name:`definition`,tokenize:eN},$M={partial:!0,tokenize:tN};function eN(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return YM.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Vj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Xj(t)?ZM(e,l)(t):l(t)}function l(t){return JM(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt($M,d,d)(t)}function d(t){return Zj(t)?nM(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Yj(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function tN(e,t,n){return r;function r(t){return Xj(t)?ZM(e,i)(t):n(t)}function i(t){return XM(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Zj(t)?nM(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Yj(e)?t(e):n(e)}}var nN={name:`hardBreakEscape`,tokenize:rN};function rN(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Yj(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var iN={name:`headingAtx`,resolve:aN,tokenize:oN};function aN(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Pj(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function oN(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Xj(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Yj(n)?(e.exit(`atxHeading`),t(n)):Zj(n)?nM(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Xj(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var sN=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),cN=[`pre`,`script`,`style`,`textarea`],lN={concrete:!0,name:`htmlFlow`,resolveTo:fN,tokenize:pN},uN={partial:!0,tokenize:hN},dN={partial:!0,tokenize:mN};function fN(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function pN(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):Hj(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Hj(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Hj(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Xj(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&cN.includes(l)?(i=1,r.interrupt?t(s):O(s)):sN.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Uj(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Zj(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Hj(t)?(e.consume(t),b):Zj(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Uj(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Zj(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Zj(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Yj(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Xj(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Zj(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Yj(t)?O(t):Zj(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Yj(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(uN,R,k)(t)):t===null||Yj(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(dN,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Yj(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return cN.includes(n)?(e.consume(t),L):O(t)}return Hj(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||Yj(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function mN(e,t,n){let r=this;return i;function i(t){return Yj(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function hN(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(_M,t,n)}}var gN={name:`htmlText`,tokenize:_N};function _N(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Hj(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Hj(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Yj(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Yj(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Yj(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Yj(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Hj(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Uj(t)?(e.consume(t),S):C(t)}function C(t){return Yj(t)?(o=C,N(t)):Zj(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Uj(t)?(e.consume(t),w):t===47||t===62||Xj(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Hj(t)?(e.consume(t),E):Yj(t)?(o=T,N(t)):Zj(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Uj(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Yj(t)?(o=D,N(t)):Zj(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Yj(t)?(o=O,N(t)):Zj(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Yj(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Xj(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Xj(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Zj(t)?nM(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var vN={name:`labelEnd`,resolveAll:SN,resolveTo:CN,tokenize:wN},yN={tokenize:TN},bN={tokenize:EN},xN={tokenize:DN};function SN(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Pj(e,0,e.length,n),e}function CN(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Fj(s,e.slice(a+1,a+r+3)),s=Fj(s,[[`enter`,u,t]]),s=Fj(s,uM(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Fj(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Fj(s,e.slice(o+1)),s=Fj(s,[[`exit`,c,t]]),Pj(e,a,e.length,s),e}function wN(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Vj(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(yN,u,o?u:d)(t):t===91?e.attempt(bN,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(xN,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function TN(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Xj(t)?ZM(e,a)(t):a(t)}function a(t){return t===41?u(t):JM(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Xj(t)?ZM(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?XM(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Xj(t)?ZM(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function EN(e,t,n){let r=this;return i;function i(t){return YM.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Vj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function DN(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ON={name:`labelStartImage`,resolveAll:vN.resolveAll,tokenize:kN};function kN(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var AN={name:`labelStartLink`,resolveAll:vN.resolveAll,tokenize:jN};function jN(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var MN={name:`lineEnding`,tokenize:NN};function NN(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),nM(e,t,`linePrefix`)}}var PN={name:`thematicBreak`,tokenize:FN};function FN(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Yj(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Zj(t)?nM(e,s,`whitespace`)(t):s(t))}}var IN={continuation:{tokenize:BN},exit:HN,name:`list`,tokenize:zN},LN={partial:!0,tokenize:UN},RN={partial:!0,tokenize:VN};function zN(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Kj(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(PN,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Kj(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(_M,r.interrupt?n:u,e.attempt(LN,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Zj(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function BN(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(_M,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nM(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Zj(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(RN,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,nM(e,e.attempt(IN,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function VN(e,t,n){let r=this;return nM(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function HN(e){e.exit(this.containerState.type)}function UN(e,t,n){let r=this;return nM(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Zj(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var WN={name:`setextUnderline`,resolveTo:GN,tokenize:KN};function GN(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function KN(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Zj(t)?nM(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Yj(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var qN={tokenize:JN};function JN(e){let t=this,n=e.attempt(_M,r,e.attempt(this.parser.constructs.flowInitial,i,nM(e,e.attempt(this.parser.constructs.flow,i,e.attempt(UM,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var YN={resolveAll:$N()},XN=QN(`string`),ZN=QN(`text`);function QN(e){return{resolveAll:$N(e===`text`?eP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function $N(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function eP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var tP=s({attentionMarkers:()=>lP,contentInitial:()=>rP,disable:()=>uP,document:()=>nP,flow:()=>aP,flowInitial:()=>iP,insideSpan:()=>cP,string:()=>oP,text:()=>sP}),nP={42:IN,43:IN,45:IN,48:IN,49:IN,50:IN,51:IN,52:IN,53:IN,54:IN,55:IN,56:IN,57:IN,62:yM},rP={91:QM},iP={[-2]:jM,[-1]:jM,32:jM},aP={35:iN,42:PN,45:[WN,PN],60:lN,61:WN,95:PN,96:OM,126:OM},oP={38:TM,92:CM},sP={[-5]:MN,[-4]:MN,[-3]:MN,33:ON,38:TM,42:dM,60:[hM,gN],91:AN,92:[nN,CM],93:vN,95:dM,96:FM},cP={null:[dM,YN]},lP={null:[42,95]},uP={null:[]};function dP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Fj(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=uM(a,l.events,l),l.events):[]}function f(e,t){return pP(p(e),t)}function p(e){return fP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Yj(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Pj(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function fP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function pP(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
1900
1900
|
`;break;case-3:o=`\r
|
|
1901
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function gP(e){let t={constructs:zj([rP,...(e||{}).extensions||[]]),content:n(aM),defined:[],document:n(sM),flow:n(YN),lazy:{},string:n(QN),text:n($N)};return t;function n(e){return n;function n(n){return pP(t,e,n)}}}function _P(e){for(;!UM(e););return e}var vP=/[\0\t\n\r]/g;function yP(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(vP.lastIndex=u,c=vP.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var bP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function xP(e){return e.replace(bP,SP)}function SP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Hj(n.slice(t?2:1),t?16:10)}return Fj(n)||e}var CP={}.hasOwnProperty;function wP(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),TP(n)(_P(gP(n).document().write(yP()(e,t,!0))))}function TP(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(de),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ce),blockQuote:a(re),characterEscape:T,characterReference:T,codeFenced:a(ie),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ie,o),codeText:a(ae,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(oe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(se),hardBreakEscape:a(le),hardBreakTrailing:a(le),htmlFlow:a(ue,o),htmlFlowData:T,htmlText:a(ue,o),htmlTextData:T,image:a(U),label:o,link:a(de),listItem:a(pe),listItemValue:f,listOrdered:a(fe,d),listUnordered:a(fe),paragraph:a(me),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ce),strong:a(he),thematicBreak:a(_e)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ne,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:B,characterReference:V,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};DP(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];CP.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||kP).call(a,void 0,e[0])}for(r.position={start:EP(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:EP(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:EP(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||kP).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+JA({start:e.start,end:e.end})+`): it’s not open`);n.position.end=EP(e.end)}function u(){return Aj(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Uj(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:EP(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=EP(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=EP(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=xP(t),n.identifier=Uj(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function ee(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Uj(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function te(e){this.data.characterReferenceType=e.type}function B(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Hj(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Fj(t);let i=this.stack[this.stack.length-1];i.value+=r}function V(e){let t=this.stack.pop();t.position.end=EP(e.end)}function H(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ne(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function re(){return{type:`blockquote`,children:[]}}function ie(){return{type:`code`,lang:null,meta:null,value:``}}function ae(){return{type:`inlineCode`,value:``}}function oe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function se(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function U(){return{type:`image`,title:null,url:``,alt:null}}function de(){return{type:`link`,title:null,url:``,children:[]}}function fe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function pe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function me(){return{type:`paragraph`,children:[]}}function he(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function EP(e){return{line:e.line,column:e.column,offset:e.offset}}function DP(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?DP(e,r):OP(e,r)}}function OP(e,t){let n;for(n in t)if(CP.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function kP(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+JA({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+JA({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+JA({start:t.start,end:t.end})+`) is still open`)}function AP(e){let t=this;t.parser=n;function n(n){return wP(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function jP(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function MP(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
1902
|
-
`}]}function
|
|
1903
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
1901
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function mP(e){let t={constructs:Lj([tP,...(e||{}).extensions||[]]),content:n(rM),defined:[],document:n(aM),flow:n(qN),lazy:{},string:n(XN),text:n(ZN)};return t;function n(e){return n;function n(n){return dP(t,e,n)}}}function hP(e){for(;!VM(e););return e}var gP=/[\0\t\n\r]/g;function _P(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(gP.lastIndex=u,c=gP.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var vP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yP(e){return e.replace(vP,bP)}function bP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Bj(n.slice(t?2:1),t?16:10)}return Nj(n)||e}var xP={}.hasOwnProperty;function SP(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),CP(n)(hP(mP(n).document().write(_P()(e,t,!0))))}function CP(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(de),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ce),blockQuote:a(re),characterEscape:T,characterReference:T,codeFenced:a(ie),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ie,o),codeText:a(ae,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(oe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(se),hardBreakEscape:a(le),hardBreakTrailing:a(le),htmlFlow:a(ue,o),htmlFlowData:T,htmlText:a(ue,o),htmlTextData:T,image:a(U),label:o,link:a(de),listItem:a(pe),listItemValue:f,listOrdered:a(fe,d),listUnordered:a(fe),paragraph:a(me),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ce),strong:a(he),thematicBreak:a(_e)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ne,autolinkProtocol:H,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:B,characterReference:V,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};TP(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];xP.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||DP).call(a,void 0,e[0])}for(r.position={start:wP(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:wP(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:wP(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||DP).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+KA({start:e.start,end:e.end})+`): it’s not open`);n.position.end=wP(e.end)}function u(){return Oj(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Vj(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:wP(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=wP(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=wP(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=yP(t),n.identifier=Vj(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function ee(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Vj(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function te(e){this.data.characterReferenceType=e.type}function B(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Bj(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Nj(t);let i=this.stack[this.stack.length-1];i.value+=r}function V(e){let t=this.stack.pop();t.position.end=wP(e.end)}function H(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ne(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function re(){return{type:`blockquote`,children:[]}}function ie(){return{type:`code`,lang:null,meta:null,value:``}}function ae(){return{type:`inlineCode`,value:``}}function oe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function se(){return{type:`emphasis`,children:[]}}function ce(){return{type:`heading`,depth:0,children:[]}}function le(){return{type:`break`}}function ue(){return{type:`html`,value:``}}function U(){return{type:`image`,title:null,url:``,alt:null}}function de(){return{type:`link`,title:null,url:``,children:[]}}function fe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function pe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function me(){return{type:`paragraph`,children:[]}}function he(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function wP(e){return{line:e.line,column:e.column,offset:e.offset}}function TP(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?TP(e,r):EP(e,r)}}function EP(e,t){let n;for(n in t)if(xP.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function DP(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+KA({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+KA({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+KA({start:t.start,end:t.end})+`) is still open`)}function OP(e){let t=this;t.parser=n;function n(n){return SP(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function kP(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function AP(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
1902
|
+
`}]}function jP(e,t){let n=t.value?t.value+`
|
|
1903
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function MP(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NP(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PP(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=tM(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function FP(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IP(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function LP(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function RP(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LP(e,t);let i={src:tM(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function zP(e,t){let n={src:tM(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function BP(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function VP(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return LP(e,t);let i={href:tM(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function HP(e,t){let n={href:tM(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UP(e,t,n){let r=e.all(t),i=n?WP(n):GP(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1904
1904
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
1905
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
1905
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function WP(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=GP(n[r])}return t}function GP(e){return e.spread??e.children.length>1}function KP(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function qP(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JP(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function YP(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XP(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=UA(t.children[1]),o=HA(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function ZP(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function QP(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var $P=9,eF=32;function tF(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(nF(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(nF(t.slice(i),i>0,!1)),a.join(``)}function nF(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===$P||t===eF;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===$P||t===eF;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function rF(e,t){let n={type:`text`,value:tF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function iF(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var aF={blockquote:kP,break:AP,code:jP,delete:MP,emphasis:NP,footnoteReference:PP,heading:FP,html:IP,imageReference:RP,image:zP,inlineCode:BP,linkReference:VP,link:HP,listItem:UP,list:KP,paragraph:qP,root:JP,strong:YP,table:XP,tableCell:QP,tableRow:ZP,text:rF,thematicBreak:iF,toml:oF,yaml:oF,definition:oF,footnoteDefinition:oF};function oF(){}var sF=typeof self==`object`?self:globalThis,cF=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new sF[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new sF[a](o),i)};return r},lF=e=>cF(new Map,e)(0),uF=``,{toString:dF}={},{keys:fF}=Object,pF=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=dF.call(e).slice(8,-1);switch(n){case`Array`:return[1,uF];case`Object`:return[2,uF];case`Date`:return[3,uF];case`RegExp`:return[4,uF];case`Map`:return[5,uF];case`Set`:return[6,uF];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},mF=([e,t])=>e===0&&(t===`function`||t===`symbol`),hF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=pF(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of fF(r))(e||!mF(pF(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(mF(pF(n))||mF(pF(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!mF(pF(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},gF=(e,{json:t,lossy:n}={})=>{let r=[];return hF(!(t||n),!!t,new Map,r)(e),r},_F=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?lF(gF(e,t)):structuredClone(e):(e,t)=>lF(gF(e,t));function vF(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function yF(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function bF(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||vF,r=e.options.footnoteBackLabel||yF,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=tM(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{..._F(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
1906
1906
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
1907
|
-
`}]}}var
|
|
1907
|
+
`}]}}var xF=(function(e){if(e==null)return EF;if(typeof e==`function`)return TF(e);if(typeof e==`object`)return Array.isArray(e)?SF(e):CF(e);if(typeof e==`string`)return wF(e);throw Error(`Expected function, string, or object as test`)});function SF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=xF(e[n]);return TF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function CF(e){let t=e;return TF(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function wF(e){return TF(t);function t(t){return t&&t.type===e}}function TF(e){return t;function t(t,n,r){return!!(DF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function EF(){return!0}function DF(e){return typeof e==`object`&&!!e&&`type`in e}function OF(e){return e}var kF=[];function AF(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=xF(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+OF(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=kF,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=jF(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function jF(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?kF:[e]}function MF(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),AF(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var NF={}.hasOwnProperty,PF={};function FF(e,t){let n=t||PF,r=new Map,i=new Map,a={all:s,applyData:LF,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...aF,...n.handlers},one:o,options:n,patch:IF,wrap:zF};return MF(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(NF.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=_F(n);return r.children=a.all(e),r}return _F(e)}return(a.options.unknownHandler||RF)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=BF(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=BF(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function IF(e,t){e.position&&(t.position=GA(e))}function LF(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,_F(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function RF(e,t){let n=t.data||{},r=`value`in t&&!(NF.call(n,`hProperties`)||NF.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zF(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
1908
1908
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
1909
1909
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
1910
|
-
`}),n}function
|
|
1911
|
-
`},i)),a}function WF(e,t){return e&&`run`in e?async function(n,r){let i=UF(n,{file:r,...t});await e.run(i,r)}:function(n,r){return UF(n,{file:r,...e||t})}}function GF(e){if(e)throw e}var KF=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function qF(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function JF(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?YF(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function YF(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var XF={basename:ZF,dirname:QF,extname:$F,join:eI,sep:`/`};function ZF(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);rI(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function QF(e){if(rI(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $F(e){rI(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function eI(...e){let t=-1,n;for(;++t<e.length;)rI(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:tI(n)}function tI(e){rI(e);let t=e.codePointAt(0)===47,n=nI(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nI(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function rI(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var iI={cwd:aI};function aI(){return`/`}function oI(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sI(e){if(typeof e==`string`)e=new URL(e);else if(!oI(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cI(e)}function cI(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lI=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],uI=class{constructor(e){let t;t=e?oI(e)?{path:e}:typeof e==`string`||mI(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:iI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lI.length;){let e=lI[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lI.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?XF.basename(this.path):void 0}set basename(e){fI(e,`basename`),dI(e,`basename`),this.path=XF.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?XF.dirname(this.path):void 0}set dirname(e){pI(this.basename,`dirname`),this.path=XF.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?XF.extname(this.path):void 0}set extname(e){if(dI(e,`extname`),pI(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=XF.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){oI(e)&&(e=sI(e)),fI(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?XF.basename(this.path,this.extname):void 0}set stem(e){fI(e,`stem`),dI(e,`stem`),this.path=XF.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new QA(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dI(e,t){if(e&&e.includes(XF.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+XF.sep+"`")}function fI(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function pI(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hI=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gI=l(KF(),1),_I={}.hasOwnProperty,vI=new class e extends hI{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=JF()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gI.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xI(`data`,this.frozen),this.namespace[e]=t,this):_I.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xI(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wI(e),n=this.parser||this.Parser;return yI(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yI(`process`,this.parser||this.Parser),bI(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wI(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);EI(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yI(`processSync`,this.parser||this.Parser),bI(`processSync`,this.compiler||this.Compiler),this.process(e,r),CI(`processSync`,`process`,t),n;function r(e,r){t=!0,GF(e),n=r}}run(e,t,n){SI(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wI(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),CI(`runSync`,`run`,n),r;function i(e,t){GF(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wI(t),r=this.compiler||this.Compiler;return bI(`stringify`,r),SI(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xI(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,gI.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qF(o)&&qF(r)&&(r=(0,gI.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function SI(e){if(!qF(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function CI(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wI(e){return TI(e)?e:new uI(e)}function TI(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function EI(e){return typeof e==`string`||DI(e)}function DI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var OI=[],kI={allowDangerousHtml:!0},AI=/^(https?|ircs?|mailto|xmpp)$/i,jI=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function MI(e){let t=NI(e),n=PI(e);return FI(t.runSync(t.parse(n),n),e)}function NI(e){let t=e.rehypePlugins||OI,n=e.remarkPlugins||OI,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kI}:kI;return vI().use(AP).use(n).use(WF,r).use(t)}function PI(e){let t=e.children||``,n=new uI;return typeof t==`string`?n.value=t:``+t,n}function FI(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||II;for(let e of jI)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return PF(e,l),oj(e,{Fragment:G.Fragment,components:i,ignoreInvalidStyle:!0,jsx:G.jsx,jsxs:G.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Oj)if(Object.hasOwn(Oj,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Oj[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function II(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||AI.test(e.slice(0,t))?e:``}function LI(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function RI(e,t,n){let r=CF((n||{}).ignore||[]),i=zI(t),a=-1;for(;++a<i.length;)MF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function zI(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([BI(e[0]),VI(e[1])])}return t}function BI(e){return typeof e==`string`?new RegExp(LI(e),`g`):e}function VI(e){return typeof e==`function`?e:function(){return e}}var HI=`phrasing`,UI=[`autolink`,`link`,`image`,`label`];function WI(){return{transforms:[QI],enter:{literalAutolink:KI,literalAutolinkEmail:qI,literalAutolinkHttp:qI,literalAutolinkWww:qI},exit:{literalAutolink:ZI,literalAutolinkEmail:XI,literalAutolinkHttp:JI,literalAutolinkWww:YI}}}function GI(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:HI,notInConstruct:UI},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:HI,notInConstruct:UI},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:HI,notInConstruct:UI}]}}function KI(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function qI(e){this.config.enter.autolinkProtocol.call(this,e)}function JI(e){this.config.exit.autolinkProtocol.call(this,e)}function YI(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function XI(e){this.config.exit.autolinkEmail.call(this,e)}function ZI(e){this.exit(e)}function QI(e){RI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$I],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,eL]],{ignore:[`link`,`linkReference`]})}function $I(e,t,n,r,i){let a=``;if(!rL(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!tL(n)))return!1;let o=nL(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function eL(e,t,n,r){return!rL(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function tL(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function nL(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ka(e,`(`),a=Ka(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function rL(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||tM(n)||eM(n))&&(!t||n!==47)}pL.peek=fL;function iL(){this.buffer()}function aL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function oL(){this.buffer()}function sL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function cL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Uj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lL(e){this.exit(e)}function uL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Uj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function dL(e){this.exit(e)}function fL(){return`[`}function pL(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function mL(){return{enter:{gfmFootnoteCallString:iL,gfmFootnoteCall:aL,gfmFootnoteDefinitionLabelString:oL,gfmFootnoteDefinition:sL},exit:{gfmFootnoteCallString:cL,gfmFootnoteCall:lL,gfmFootnoteDefinitionLabelString:uL,gfmFootnoteDefinition:dL}}}function hL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:pL},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
1912
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
1913
|
-
`)}function
|
|
1914
|
-
`&&
|
|
1915
|
-
`}function
|
|
1910
|
+
`}),n}function BF(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function VF(e,t){let n=FF(e,t),r=n.one(e,void 0),i=bF(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
1911
|
+
`},i)),a}function HF(e,t){return e&&`run`in e?async function(n,r){let i=VF(n,{file:r,...t});await e.run(i,r)}:function(n,r){return VF(n,{file:r,...e||t})}}function UF(e){if(e)throw e}var WF=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function GF(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function KF(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?qF(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function qF(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var JF={basename:YF,dirname:XF,extname:ZF,join:QF,sep:`/`};function YF(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);tI(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function XF(e){if(tI(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ZF(e){tI(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function QF(...e){let t=-1,n;for(;++t<e.length;)tI(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:$F(n)}function $F(e){tI(e);let t=e.codePointAt(0)===47,n=eI(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function eI(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function tI(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var nI={cwd:rI};function rI(){return`/`}function iI(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function aI(e){if(typeof e==`string`)e=new URL(e);else if(!iI(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return oI(e)}function oI(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var sI=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],cI=class{constructor(e){let t;t=e?iI(e)?{path:e}:typeof e==`string`||fI(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:nI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<sI.length;){let e=sI[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)sI.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?JF.basename(this.path):void 0}set basename(e){uI(e,`basename`),lI(e,`basename`),this.path=JF.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?JF.dirname(this.path):void 0}set dirname(e){dI(this.basename,`dirname`),this.path=JF.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?JF.extname(this.path):void 0}set extname(e){if(lI(e,`extname`),dI(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=JF.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){iI(e)&&(e=aI(e)),uI(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?JF.basename(this.path,this.extname):void 0}set stem(e){uI(e,`stem`),lI(e,`stem`),this.path=JF.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new XA(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function lI(e,t){if(e&&e.includes(JF.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+JF.sep+"`")}function uI(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function dI(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function fI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var pI=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),mI=l(WF(),1),hI={}.hasOwnProperty,gI=new class e extends pI{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=KF()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,mI.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(yI(`data`,this.frozen),this.namespace[e]=t,this):hI.call(this.namespace,e)&&this.namespace[e]||void 0:e?(yI(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=SI(e),n=this.parser||this.Parser;return _I(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),_I(`process`,this.parser||this.Parser),vI(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=SI(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);wI(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),_I(`processSync`,this.parser||this.Parser),vI(`processSync`,this.compiler||this.Compiler),this.process(e,r),xI(`processSync`,`process`,t),n;function r(e,r){t=!0,UF(e),n=r}}run(e,t,n){bI(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=SI(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),xI(`runSync`,`run`,n),r;function i(e,t){UF(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=SI(t),r=this.compiler||this.Compiler;return vI(`stringify`,r),bI(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(yI(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,mI.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];GF(o)&&GF(r)&&(r=(0,mI.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function _I(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function vI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function yI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bI(e){if(!GF(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function xI(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function SI(e){return CI(e)?e:new cI(e)}function CI(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function wI(e){return typeof e==`string`||TI(e)}function TI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var EI=[],DI={allowDangerousHtml:!0},OI=/^(https?|ircs?|mailto|xmpp)$/i,kI=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function AI(e){let t=jI(e),n=MI(e);return NI(t.runSync(t.parse(n),n),e)}function jI(e){let t=e.rehypePlugins||EI,n=e.remarkPlugins||EI,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...DI}:DI;return gI().use(OP).use(n).use(HF,r).use(t)}function MI(e){let t=e.children||``,n=new cI;return typeof t==`string`?n.value=t:``+t,n}function NI(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||PI;for(let e of kI)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return MF(e,l),ij(e,{Fragment:G.Fragment,components:i,ignoreInvalidStyle:!0,jsx:G.jsx,jsxs:G.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Ej)if(Object.hasOwn(Ej,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Ej[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function PI(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||OI.test(e.slice(0,t))?e:``}function FI(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function II(e,t,n){let r=xF((n||{}).ignore||[]),i=LI(t),a=-1;for(;++a<i.length;)AF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function LI(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([RI(e[0]),zI(e[1])])}return t}function RI(e){return typeof e==`string`?new RegExp(FI(e),`g`):e}function zI(e){return typeof e==`function`?e:function(){return e}}var BI=`phrasing`,VI=[`autolink`,`link`,`image`,`label`];function HI(){return{transforms:[XI],enter:{literalAutolink:WI,literalAutolinkEmail:GI,literalAutolinkHttp:GI,literalAutolinkWww:GI},exit:{literalAutolink:YI,literalAutolinkEmail:JI,literalAutolinkHttp:KI,literalAutolinkWww:qI}}}function UI(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:BI,notInConstruct:VI},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:BI,notInConstruct:VI},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:BI,notInConstruct:VI}]}}function WI(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function GI(e){this.config.enter.autolinkProtocol.call(this,e)}function KI(e){this.config.exit.autolinkProtocol.call(this,e)}function qI(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function JI(e){this.config.exit.autolinkEmail.call(this,e)}function YI(e){this.exit(e)}function XI(e){II(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ZI],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,QI]],{ignore:[`link`,`linkReference`]})}function ZI(e,t,n,r,i){let a=``;if(!tL(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!$I(n)))return!1;let o=eL(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function QI(e,t,n,r){return!tL(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function $I(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function eL(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ka(e,`(`),a=Ka(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function tL(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||$j(n)||Qj(n))&&(!t||n!==47)}dL.peek=uL;function nL(){this.buffer()}function rL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function iL(){this.buffer()}function aL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function oL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sL(e){this.exit(e)}function cL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Vj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lL(e){this.exit(e)}function uL(){return`[`}function dL(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function fL(){return{enter:{gfmFootnoteCallString:nL,gfmFootnoteCall:rL,gfmFootnoteDefinitionLabelString:iL,gfmFootnoteDefinition:aL},exit:{gfmFootnoteCallString:oL,gfmFootnoteCall:sL,gfmFootnoteDefinitionLabelString:cL,gfmFootnoteDefinition:lL}}}function pL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dL},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
1912
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?hL:mL))),s(),o}}function mL(e,t,n){return t===0?e:hL(e,t,n)}function hL(e,t,n){return(n?``:` `)+e}var gL=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];xL.peek=SL;function _L(){return{canContainEols:[`delete`],enter:{strikethrough:yL},exit:{strikethrough:bL}}}function vL(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:gL}],handlers:{delete:xL}}}function yL(e){this.enter({type:`delete`,children:[]},e)}function bL(e){this.exit(e)}function xL(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function SL(){return`~`}function CL(e){return e.length}function wL(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||CL,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=TL(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=EL(r[d]);else{let e=EL(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
1913
|
+
`)}function TL(e){return e==null?``:String(e)}function EL(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function DL(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),OL);return i(),o}function OL(e,t,n){return`>`+(n?``:` `)+e}function kL(e,t){return AL(e,t.inConstruct,!0)&&!AL(e,t.notInConstruct,!1)}function AL(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jL(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
1914
|
+
`&&kL(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
1915
|
+
`}function ML(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function NL(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function PL(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function FL(e,t,n,r){let i=PL(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(NL(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,IL);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(ML(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
1916
1916
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
1917
1917
|
`),a&&(u+=s.move(a+`
|
|
1918
|
-
`)),u+=s.move(c),l(),u}function
|
|
1919
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
1918
|
+
`)),u+=s.move(c),l(),u}function IL(e,t,n){return(n?``:` `)+e}function LL(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function RL(e,t,n,r){let i=LL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
1919
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function zL(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function BL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function VL(e,t,n){let r=lM(e),i=lM(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}HL.peek=UL;function HL(e,t,n,r){let i=zL(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=VL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=BL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=VL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+BL(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function UL(e,t,n){return n.options.emphasis||`*`}function WL(e,t){let n=!1;return MF(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Oj(e)&&(t.options.setext||n))}function GL(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(WL(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
1920
1920
|
`,after:`
|
|
1921
1921
|
`});return r(),t(),o+`
|
|
1922
1922
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
1923
1923
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
1924
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
1924
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=BL(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}KL.peek=qL;function KL(e){return e.value||``}function qL(){return`<`}JL.peek=YL;function JL(e,t,n,r){let i=LL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function YL(){return`!`}XL.peek=ZL;function XL(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ZL(){return`!`}QL.peek=$L;function QL(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function $L(){return"`"}function eR(e,t){let n=Oj(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tR.peek=nR;function tR(e,t,n,r){let i=LL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(eR(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function nR(e,t,n){return eR(e,n)?`<`:`[`}rR.peek=iR;function rR(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function iR(){return`[`}function aR(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oR(e){let t=aR(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sR(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function cR(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lR(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?sR(n):aR(n),s=e.ordered?o===`.`?`)`:`.`:oR(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),cR(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function uR(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dR(e,t,n,r){let i=uR(n),a=n.bulletCurrent||aR(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function fR(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var pR=xF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function mR(e,t,n,r){return(e.children.some(function(e){return pR(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function hR(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}gR.peek=_R;function gR(e,t,n,r){let i=hR(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=VL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=BL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=VL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+BL(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function _R(e,t,n){return n.options.strong||`*`}function vR(e,t,n,r){return n.safe(e.value,r)}function yR(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bR(e,t,n){let r=(cR(n)+(n.options.ruleSpaces?` `:``)).repeat(yR(n));return n.options.ruleSpaces?r.slice(0,-1):r}var xR={blockquote:DL,break:jL,code:FL,definition:RL,emphasis:HL,hardBreak:jL,heading:GL,html:KL,image:JL,imageReference:XL,inlineCode:QL,link:tR,linkReference:rR,list:lR,listItem:dR,paragraph:fR,root:mR,strong:gR,text:vR,thematicBreak:bR};function SR(){return{enter:{table:CR,tableData:DR,tableHeader:DR,tableRow:TR},exit:{codeText:OR,table:wR,tableData:ER,tableHeader:ER,tableRow:ER}}}function CR(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function wR(e){this.exit(e),this.data.inTable=void 0}function TR(e){this.enter({type:`tableRow`,children:[]},e)}function ER(e){this.exit(e)}function DR(e){this.enter({type:`tableCell`,children:[]},e)}function OR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kR));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kR(e,t){return t===`|`?t:e}function AR(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
1925
1925
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
1926
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return EL(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=CR.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function NR(){return{exit:{taskListCheckValueChecked:FR,taskListCheckValueUnchecked:FR,paragraph:IR}}}function PR(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:LR}}}function FR(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function IR(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function LR(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=CR.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function RR(){return[WI(),mL(),yL(),wR(),NR()]}function zR(e){return{extensions:[GI(),hL(e),bL(),MR(e),PR()]}}var BR={tokenize:ez,partial:!0},VR={tokenize:tz,partial:!0},HR={tokenize:nz,partial:!0},UR={tokenize:rz,partial:!0},WR={tokenize:iz,partial:!0},GR={name:`wwwAutolink`,tokenize:QR,previous:az},KR={name:`protocolAutolink`,tokenize:$R,previous:oz},qR={name:`emailAutolink`,tokenize:ZR,previous:sz},JR={};function YR(){return{text:JR}}for(var XR=48;XR<123;)JR[XR]=qR,XR++,XR===58?XR=65:XR===91&&(XR=97);JR[43]=qR,JR[45]=qR,JR[46]=qR,JR[95]=qR,JR[72]=[qR,KR],JR[104]=[qR,KR],JR[87]=[qR,GR],JR[119]=[qR,GR];function ZR(e,t,n){let r=this,i,a;return o;function o(t){return!cz(t)||!sz.call(r,r.previous)||lz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return cz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(WR,u,l)(t):t===45||t===95||Gj(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Wj(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function QR(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!az.call(r,r.previous)||lz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(BR,e.attempt(VR,e.attempt(HR,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function $R(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&oz.call(r,r.previous)&&!lz(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Wj(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||qj(t)||Qj(t)||tM(t)||eM(t)?n(t):e.attempt(VR,e.attempt(HR,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ez(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function tz(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(UR,c,s)(t):t===null||Qj(t)||tM(t)||t!==45&&eM(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function nz(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(UR,t,a)(o):o===null||Qj(o)||tM(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function rz(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Qj(o)||tM(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Qj(e)||tM(e)?t(e):r(e)}function a(e){return Wj(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Wj(t)?(e.consume(t),o):n(t)}}function iz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Gj(e)?n(e):t(e)}}function az(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Qj(e)}function oz(e){return!Wj(e)}function sz(e){return!(e===47||cz(e))}function cz(e){return e===43||e===45||e===46||e===95||Gj(e)}function lz(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var uz={tokenize:vz,partial:!0};function dz(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hz,continuation:{tokenize:gz},exit:_z}},text:{91:{name:`gfmFootnoteCall`,tokenize:mz},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fz,resolveTo:pz}}}}function fz(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Uj(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function pz(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function mz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Qj(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Uj(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Qj(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Qj(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Uj(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Qj(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),iM(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gz(e,t,n){return e.check(yM,t,e.attempt(uz,t,n))}function _z(e){e.exit(`gfmFootnoteDefinition`)}function vz(e,t,n){let r=this;return iM(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yz(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Ij(o,o.length,0,fM(s,e.slice(r+1,n),t)),Ij(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Ij(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=dM(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=dM(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var bz=class{constructor(){this.map=[]}add(e,t,n){xz(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function xz(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Sz(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Cz(){return{flow:{null:{name:`table`,tokenize:wz,resolveAll:Tz}}}}function wz(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Zj(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$j(t)?iM(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Qj(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$j(t)?iM(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $j(t)?iM(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Zj(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $j(t)?iM(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Zj(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Zj(n)?(e.exit(`tableRow`),t(n)):$j(n)?iM(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Qj(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Tz(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new bz;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Dz(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ez(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ez(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ez(f,t,o,i,n,d)):(o[0]=o[1],d=Ez(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Dz(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Sz(t.events,n))}return e}function Ez(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Oz(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Oz(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Oz(t.events,n[2]),a=Oz(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Oz(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Dz(e,t,n,r,i){let a=[],o=Oz(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Oz(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var kz={name:`tasklistCheck`,tokenize:jz};function Az(){return{text:{91:kz}}}function jz(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Qj(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Zj(r)?t(r):$j(r)?e.check({tokenize:Mz},t,n)(r):n(r)}}function Mz(e,t,n){return iM(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Nz(e){return zj([YR(),dz(),yz(e),Cz(),Az()])}var Pz={};function Fz(e){let t=this,n=e||Pz,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Nz(n)),a.push(RR()),o.push(zR(n))}function Iz(e){RI(e,[/\r?\n|\r/g,Lz])}function Lz(){return{type:`break`}}function Rz(){return function(e){Iz(e)}}var zz=(function(e,t,n){let r=CF(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Bz=(function(e){if(e==null)return Wz;if(typeof e==`string`)return Hz(e);if(typeof e==`object`)return Vz(e);if(typeof e==`function`)return Uz(e);throw Error("Expected function, string, or array as `test`")});function Vz(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Bz(e[n]);return Uz(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Hz(e){return Uz(t);function t(t){return t.tagName===e}}function Uz(e){return t;function t(t,n,r){return!!(Gz(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Wz(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function Gz(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var Kz=/\n/g,qz=/[\t ]+/g,Jz=Bz(`br`),Yz=Bz(cB),Xz=Bz(`p`),Zz=Bz(`tr`),Qz=Bz([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,sB,lB]),$z=Bz(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function eB(e,t){let n=t||{},r=`children`in e?e.children:[],i=$z(e),a=oB(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...rB(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...tB(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Jz(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
|
|
1927
|
-
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function
|
|
1928
|
-
`:Xz(e)?(s=2,c=2):$z(e)&&(s=1,c=1);++a<i.length;)o=o.concat(tB(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Jz(i[a+1]):c}));return Yz(e)&&zz(t,e,Yz)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function rB(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){Kz.lastIndex=a;let e=Kz.exec(n),i=e&&`index`in e?e.index:n.length;r.push(aB(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function iB(e){return[String(e.value)]}function aB(e,t,n){let r=[],i=0,a;for(;i<e.length;){qz.lastIndex=i;let n=qz.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function oB(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function sB(e){return!!(e.properties||{}).hidden}function cB(e){return e.tagName===`td`||e.tagName===`th`}function lB(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function uB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function dB(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=uB(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function fB(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function pB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},p=[l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:f,contains:p.concat([{begin:/\(/,end:/\)/,keywords:f,contains:p.concat([`self`]),relevance:0}]),relevance:0},h={begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:f,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C`,aliases:[`h`],keywords:f,disableAutodetect:!0,illegal:`</`,contains:[].concat(m,h,p,[l,{begin:e.IDENT_RE+`::`,keywords:f},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:l,strings:s,keywords:f}}}function mB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function hB(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var gB=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_B=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),vB=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),yB=[..._B,...vB],bB=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),xB=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),SB=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),CB=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function wB(e){let t=e.regex,n=gB(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+xB.join(`|`)+`)`},{begin:`:(:)?(`+SB.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+CB.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:bB.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+yB.join(`|`)+`)\\b`}]}}function TB(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function EB(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function DB(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function OB(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var kB=`[0-9](_*[0-9])*`,AB=`\\.(${kB})`,jB=`[0-9a-fA-F](_*[0-9a-fA-F])*`,MB={className:`number`,variants:[{begin:`(\\b(${kB})((${AB})|\\.)?|(${AB}))[eE][+-]?(${kB})[fFdD]?\\b`},{begin:`\\b(${kB})((${AB})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${AB})[fFdD]?\\b`},{begin:`\\b(${kB})[fFdD]\\b`},{begin:`\\b0[xX]((${jB})\\.?|(${jB})?\\.(${jB}))[pP][+-]?(${kB})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${jB})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function NB(e,t,n){return n===-1?``:e.replace(t,r=>NB(e,t,n-1))}function PB(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+NB(`(?:<`+n+`~~~(?:\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,MB,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},MB,a]}}var FB=`[A-Za-z$_][0-9A-Za-z$_]*`,IB=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),LB=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],RB=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),zB=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],BB=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],VB=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],HB=[].concat(BB,RB,zB);function UB(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=FB,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:FB,keyword:IB,literal:LB,built_in:HB,"variable.language":VB},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...RB,...zB]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...BB,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function WB(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var GB=`[0-9](_*[0-9])*`,KB=`\\.(${GB})`,qB=`[0-9a-fA-F](_*[0-9a-fA-F])*`,JB={className:`number`,variants:[{begin:`(\\b(${GB})((${KB})|\\.)?|(${KB}))[eE][+-]?(${GB})[fFdD]?\\b`},{begin:`\\b(${GB})((${KB})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${KB})[fFdD]?\\b`},{begin:`\\b(${GB})[fFdD]\\b`},{begin:`\\b0[xX]((${qB})\\.?|(${qB})?\\.(${qB}))[pP][+-]?(${GB})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${qB})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function YB(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=JB,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
1929
|
-
`},l]}}var XB=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),ZB=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),QB=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),$B=[...ZB,...QB],eV=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),tV=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),nV=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),rV=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),iV=tV.concat(nV).sort().reverse();function aV(e){let t=XB(e),n=iV,r=`[\\w-]+`,i=`(`+r+`|@\\{[\\w-]+\\})`,a=[],o=[],s=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},c=function(e,t,n){return{className:e,begin:t,relevance:n}},l={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:eV.join(` `)},u={begin:`\\(`,end:`\\)`,contains:o,keywords:l,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s(`'`),s(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.HEXCOLOR,u,c(`variable`,`@@?`+r,10),c(`variable`,`@\\{`+r+`\\}`),c(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:r+`\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let d=o.concat({begin:/\{/,end:/\}/,contains:a}),f={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(o)},p={begin:i+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+rV.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:o}}]},m={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:l,returnEnd:!0,contains:o,relevance:0}},h={className:`variable`,variants:[{begin:`@`+r+`\\s*:`,relevance:15},{begin:`@`+r}],starts:{end:`[;}]`,returnEnd:!0,contains:d}},g={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c(`keyword`,`all\\b`),c(`variable`,`@\\{`+r+`\\}`),{begin:`\\b(`+$B.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,c(`selector-tag`,i,0),c(`selector-id`,`#`+i),c(`selector-class`,`\\.`+i,0),c(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+tV.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+nV.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:`!important`},t.FUNCTION_DISPATCH]},_={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[g]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,h,_,p,g,f,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function oV(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!`+t+`)`,`$`),e.COMMENT(`--`+t,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function sV(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function cV(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function lV(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r=[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`],i=`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),a=[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],o=[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],s={"variable.language":[`this`,`super`],$pattern:n,keyword:i,literal:a,built_in:o,type:r},c={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:s,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+c.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function uV(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function dV(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
1930
|
-
]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function fV(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function pV(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function mV(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function hV(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function gV(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function _V(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a=[`include`,`extend`,`prepend`,`public`,`private`,`protected`,`raise`,`throw`],o={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:[`alias`,`and`,`begin`,`BEGIN`,`break`,`case`,`class`,`defined`,`do`,`else`,`elsif`,`end`,`END`,`ensure`,`for`,`if`,`in`,`module`,`next`,`not`,`or`,`redo`,`require`,`rescue`,`retry`,`return`,`then`,`undef`,`unless`,`until`,`when`,`while`,`yield`,...a],built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},s={className:`doctag`,begin:`@[A-Za-z]+`},c={begin:`#<`,end:`>`},l=[e.COMMENT(`#`,`$`,{contains:[s]}),e.COMMENT(`^=begin`,`^=end`,{contains:[s],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],u={className:`subst`,begin:/#\{/,end:/\}/,keywords:o},d={className:`string`,contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},f=`[0-9](_?[0-9])*`,p={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},m={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},h={match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:o},g={variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:o},_={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},v={match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},y=[d,g,h,{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},_,{relevance:0,match:r,scope:`title.class`},v,{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[d,{begin:n}],relevance:0},p,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(c,l),relevance:0}].concat(c,l);u.contains=y,m.contains=y;let b=[{begin:/^\s*=>/,starts:{end:`$`,contains:y}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:o,contains:y}}];return l.unshift(c),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(b,l,y)}}function vV(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var yV=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),bV=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),xV=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),SV=[...bV,...xV],CV=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),wV=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),TV=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),EV=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function DV(e){let t=yV(e),n=TV,r=wV,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+SV.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+EV.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:CV.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function OV(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function kV(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function AV(e){return e?typeof e==`string`?e:e.source:null}function jV(e){return MV(`(?=`,e,`)`)}function MV(...e){return e.map(e=>AV(e)).join(``)}function NV(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function PV(...e){return`(`+(NV(e).capture?``:`?:`)+e.map(e=>AV(e)).join(`|`)+`)`}var FV=e=>MV(/\b/,e,/\w$/.test(e)?/\b/:/\B/),IV=[`Protocol`,`Type`].map(FV),LV=[`init`,`self`].map(FV),RV=[`Any`,`Self`],zV=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],BV=[`false`,`nil`,`true`],VV=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],HV=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],UV=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),WV=PV(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),GV=PV(WV,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),KV=MV(WV,GV,`*`),qV=PV(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),JV=PV(qV,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),YV=MV(qV,JV,`*`),XV=MV(/[A-Z]/,JV,`*`),ZV=[`attached`,`autoclosure`,MV(/convention\(/,PV(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,MV(/objc\(/,YV,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],QV=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function $V(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,PV(...IV,...LV)],className:{2:`keyword`}},a={match:MV(/\./,PV(...zV)),relevance:0},o=zV.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:PV(...zV.filter(e=>typeof e!=`string`).concat(RV).map(FV),...LV)}]},c={$pattern:PV(/\b\w+/,/#\w+/),keyword:o.concat(HV),literal:BV},l=[i,a,s],u=[{match:MV(/\./,PV(...UV)),relevance:0},{className:`built_in`,match:MV(/\b/,PV(...UV),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:KV},{match:`\\.(\\.|${GV})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:MV(/\\/,e,/[0\\tnr"']/)},{match:MV(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:MV(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:MV(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:MV(e,/"""/),end:MV(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:MV(e,/"/),end:MV(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=MV(e,/\//),n=MV(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:MV(/`/,YV,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${JV}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:QV,contains:[...f,h,x]}]}},{scope:`keyword`,match:MV(/@/,PV(...ZV),jV(PV(/\(/,/\s+/)))},{scope:`meta`,match:MV(/@/,YV)}],k={match:jV(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:MV(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,JV,`+`)},{className:`type`,match:XV,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:MV(/\s+&\s+/,jV(XV)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:MV(YV,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},M={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},N={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:PV(jV(MV(YV,/\s*:/)),jV(MV(YV,/\s+/,YV,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:YV}]},...r,...l,...f,h,x,...O,k,j],endsParent:!0,illegal:/["']/},P={match:[/(func|macro)/,/\s+/,PV(E.match,YV,KV)],className:{1:`keyword`,3:`title.function`},contains:[M,N,t],illegal:[/\[/,/%/]},F={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[M,N,t],illegal:/\[|%/},I={match:[/operator/,/\s+/,KV],className:{1:`keyword`,3:`title`}},L={begin:[/precedencegroup/,/\s+/,XV],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...VV,...BV],end:/}/},R={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},z={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},ee={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,YV,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[M,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:XV},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,P,F,R,z,ee,I,L,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,j]}}var eH=`[A-Za-z$_][0-9A-Za-z$_]*`,tH=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),nH=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],rH=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),iH=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],aH=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],oH=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],sH=[].concat(aH,rH,iH);function cH(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=eH,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:eH,keyword:tH,literal:nH,built_in:sH,"variable.language":oH},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...rH,...iH]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...aH,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function lH(e){let t=e.regex,n=cH(e),r=eH,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:eH,keyword:tH.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:nH,built_in:sH.concat(i),"variable.language":oH},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function uH(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function dH(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push(`self`);let n=e.COMMENT(/;;/,/$/),r=`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`),i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},a={className:`variable`,begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},s={className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},l={className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},a,o,i,e.QUOTE_STRING_MODE,c,l,s]}}function fH(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function pH(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var mH={arduino:dB,bash:fB,c:pB,cpp:mB,csharp:hB,css:wB,diff:TB,go:EB,graphql:DB,ini:OB,java:PB,javascript:UB,json:WB,kotlin:YB,less:aV,lua:oV,makefile:sV,markdown:cV,objectivec:lV,perl:uV,php:dV,"php-template":fV,plaintext:pV,python:mV,"python-repl":hV,r:gV,ruby:_V,rust:vV,scss:DV,shell:OV,sql:kV,swift:$V,typescript:lH,vbnet:uH,wasm:dH,xml:fH,yaml:pH},hH=l(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},L=I(`//`,`$`),R=I(`/\\*`,`\\*/`),z=I(`#`,`$`),ee={scope:`number`,begin:D,relevance:0},te={scope:`number`,begin:O,relevance:0},B={scope:`number`,begin:k,relevance:0},V={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},H={scope:`title`,begin:T,relevance:0},ne={scope:`title`,begin:E,relevance:0},re={begin:`\\.\\s*`+E,relevance:0},ie=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:B,BINARY_NUMBER_RE:k,COMMENT:I,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:L,C_NUMBER_MODE:te,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:re,NUMBER_MODE:ee,NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:V,RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:H,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:ne});function ae(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function oe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function se(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ae,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ce(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function le(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function ue(e,t){e.relevance===void 0&&(e.relevance=1)}var U=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},de=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],fe=`keyword`;function pe(e,t,n=fe){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,pe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,me(n[0],n[1])]})}}function me(e,t){return t?Number(t):he(e)?0:1}function he(e){return de.includes(e.toLowerCase())}var ge={},_e=e=>{console.error(e)},ve=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ye=(e,t)=>{ge[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ge[`${e}/${t}`]=!0)},be=Error();function xe(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Se(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw _e(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),be;if(typeof e.beginScope!=`object`||e.beginScope===null)throw _e(`beginScope must be object`),be;xe(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Ce(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw _e(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),be;if(typeof e.endScope!=`object`||e.endScope===null)throw _e(`endScope must be object`),be;xe(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function we(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Te(e){we(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Se(e),Ce(e)}function Ee(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[oe,le,Te,U].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[se,ce,ue].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=pe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Oe(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function De(e){return e?e.endsWithParent||De(e.starts):!1}function Oe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:De(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var ke=`11.11.1`,Ae=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},je=i,Me=a,Ne=Symbol(`nomatch`),Pe=7,Fe=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ve(s.replace(`{}`,n[1])),ve(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(ye(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),ye(`10.7.0`,`Please use highlight(code, options) instead.
|
|
1926
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return wL(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=xR.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function jR(){return{exit:{taskListCheckValueChecked:NR,taskListCheckValueUnchecked:NR,paragraph:PR}}}function MR(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:FR}}}function NR(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function PR(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function FR(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=xR.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function IR(){return[HI(),fL(),_L(),SR(),jR()]}function LR(e){return{extensions:[UI(),pL(e),vL(),AR(e),MR()]}}var RR={tokenize:QR,partial:!0},zR={tokenize:$R,partial:!0},BR={tokenize:ez,partial:!0},VR={tokenize:tz,partial:!0},HR={tokenize:nz,partial:!0},UR={name:`wwwAutolink`,tokenize:XR,previous:rz},WR={name:`protocolAutolink`,tokenize:ZR,previous:iz},GR={name:`emailAutolink`,tokenize:YR,previous:az},KR={};function qR(){return{text:KR}}for(var JR=48;JR<123;)KR[JR]=GR,JR++,JR===58?JR=65:JR===91&&(JR=97);KR[43]=GR,KR[45]=GR,KR[46]=GR,KR[95]=GR,KR[72]=[GR,WR],KR[104]=[GR,WR],KR[87]=[GR,UR],KR[119]=[GR,UR];function YR(e,t,n){let r=this,i,a;return o;function o(t){return!oz(t)||!az.call(r,r.previous)||sz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return oz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(HR,u,l)(t):t===45||t===95||Uj(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Hj(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function XR(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!rz.call(r,r.previous)||sz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(RR,e.attempt(zR,e.attempt(BR,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function ZR(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&iz.call(r,r.previous)&&!sz(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Hj(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Gj(t)||Xj(t)||$j(t)||Qj(t)?n(t):e.attempt(zR,e.attempt(BR,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function QR(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function $R(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(VR,c,s)(t):t===null||Xj(t)||$j(t)||t!==45&&Qj(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ez(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(VR,t,a)(o):o===null||Xj(o)||$j(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function tz(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Xj(o)||$j(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Xj(e)||$j(e)?t(e):r(e)}function a(e){return Hj(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Hj(t)?(e.consume(t),o):n(t)}}function nz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Uj(e)?n(e):t(e)}}function rz(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Xj(e)}function iz(e){return!Hj(e)}function az(e){return!(e===47||oz(e))}function oz(e){return e===43||e===45||e===46||e===95||Uj(e)}function sz(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var cz={tokenize:gz,partial:!0};function lz(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:pz,continuation:{tokenize:mz},exit:hz}},text:{91:{name:`gfmFootnoteCall`,tokenize:fz},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:uz,resolveTo:dz}}}}function uz(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Vj(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function dz(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function fz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Xj(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Vj(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Xj(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function pz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Xj(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Vj(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Xj(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),nM(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function mz(e,t,n){return e.check(_M,t,e.attempt(cz,t,n))}function hz(e){e.exit(`gfmFootnoteDefinition`)}function gz(e,t,n){let r=this;return nM(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function _z(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Pj(o,o.length,0,uM(s,e.slice(r+1,n),t)),Pj(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Pj(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=lM(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=lM(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var vz=class{constructor(){this.map=[]}add(e,t,n){yz(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function yz(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function bz(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function xz(){return{flow:{null:{name:`table`,tokenize:Sz,resolveAll:Cz}}}}function Sz(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Yj(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Zj(t)?nM(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Xj(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Zj(t)?nM(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Zj(t)?nM(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Yj(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Zj(t)?nM(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Yj(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Yj(n)?(e.exit(`tableRow`),t(n)):Zj(n)?nM(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Xj(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Cz(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new vz;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Tz(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wz(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wz(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=wz(f,t,o,i,n,d)):(o[0]=o[1],d=wz(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Tz(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=bz(t.events,n))}return e}function wz(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ez(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ez(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ez(t.events,n[2]),a=Ez(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ez(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Tz(e,t,n,r,i){let a=[],o=Ez(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ez(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Dz={name:`tasklistCheck`,tokenize:kz};function Oz(){return{text:{91:Dz}}}function kz(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Xj(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Yj(r)?t(r):Zj(r)?e.check({tokenize:Az},t,n)(r):n(r)}}function Az(e,t,n){return nM(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function jz(e){return Lj([qR(),lz(),_z(e),xz(),Oz()])}var Mz={};function Nz(e){let t=this,n=e||Mz,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(jz(n)),a.push(IR()),o.push(LR(n))}function Pz(e){II(e,[/\r?\n|\r/g,Fz])}function Fz(){return{type:`break`}}function Iz(){return function(e){Pz(e)}}var Lz=(function(e,t,n){let r=xF(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Rz=(function(e){if(e==null)return Hz;if(typeof e==`string`)return Bz(e);if(typeof e==`object`)return zz(e);if(typeof e==`function`)return Vz(e);throw Error("Expected function, string, or array as `test`")});function zz(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Rz(e[n]);return Vz(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Bz(e){return Vz(t);function t(t){return t.tagName===e}}function Vz(e){return t;function t(t,n,r){return!!(Uz(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Hz(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function Uz(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var Wz=/\n/g,Gz=/[\t ]+/g,Kz=Rz(`br`),qz=Rz(oB),Jz=Rz(`p`),Yz=Rz(`tr`),Xz=Rz([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,aB,sB]),Zz=Rz(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function Qz(e,t){let n=t||{},r=`children`in e?e.children:[],i=Zz(e),a=iB(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...tB(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...$z(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Kz(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
|
|
1927
|
+
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function $z(e,t,n){return e.type===`element`?eB(e,t,n):e.type===`text`?n.whitespace===`normal`?tB(e,n):nB(e):[]}function eB(e,t,n){let r=iB(e,n),i=e.children||[],a=-1,o=[];if(Xz(e))return o;let s,c;for(Kz(e)||Yz(e)&&Lz(t,e,Yz)?c=`
|
|
1928
|
+
`:Jz(e)?(s=2,c=2):Zz(e)&&(s=1,c=1);++a<i.length;)o=o.concat($z(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Kz(i[a+1]):c}));return qz(e)&&Lz(t,e,qz)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function tB(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){Wz.lastIndex=a;let e=Wz.exec(n),i=e&&`index`in e?e.index:n.length;r.push(rB(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function nB(e){return[String(e.value)]}function rB(e,t,n){let r=[],i=0,a;for(;i<e.length;){Gz.lastIndex=i;let n=Gz.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function iB(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function aB(e){return!!(e.properties||{}).hidden}function oB(e){return e.tagName===`td`||e.tagName===`th`}function sB(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function cB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function lB(e){let t={type:[`boolean`,`byte`,`word`,`String`],built_in:`KeyboardController.MouseController.SoftwareSerial.EthernetServer.EthernetClient.LiquidCrystal.RobotControl.GSMVoiceCall.EthernetUDP.EsploraTFT.HttpClient.RobotMotor.WiFiClient.GSMScanner.FileSystem.Scheduler.GSMServer.YunClient.YunServer.IPAddress.GSMClient.GSMModem.Keyboard.Ethernet.Console.GSMBand.Esplora.Stepper.Process.WiFiUDP.GSM_SMS.Mailbox.USBHost.Firmata.PImage.Client.Server.GSMPIN.FileIO.Bridge.Serial.EEPROM.Stream.Mouse.Audio.Servo.File.Task.GPRS.WiFi.Wire.TFT.GSM.SPI.SD`.split(`.`),_hints:`setup.loop.runShellCommandAsynchronously.analogWriteResolution.retrieveCallingNumber.printFirmwareVersion.analogReadResolution.sendDigitalPortPair.noListenOnLocalhost.readJoystickButton.setFirmwareVersion.readJoystickSwitch.scrollDisplayRight.getVoiceCallStatus.scrollDisplayLeft.writeMicroseconds.delayMicroseconds.beginTransmission.getSignalStrength.runAsynchronously.getAsynchronously.listenOnLocalhost.getCurrentCarrier.readAccelerometer.messageAvailable.sendDigitalPorts.lineFollowConfig.countryNameWrite.runShellCommand.readStringUntil.rewindDirectory.readTemperature.setClockDivider.readLightSensor.endTransmission.analogReference.detachInterrupt.countryNameRead.attachInterrupt.encryptionType.readBytesUntil.robotNameWrite.readMicrophone.robotNameRead.cityNameWrite.userNameWrite.readJoystickY.readJoystickX.mouseReleased.openNextFile.scanNetworks.noInterrupts.digitalWrite.beginSpeaker.mousePressed.isActionDone.mouseDragged.displayLogos.noAutoscroll.addParameter.remoteNumber.getModifiers.keyboardRead.userNameRead.waitContinue.processInput.parseCommand.printVersion.readNetworks.writeMessage.blinkVersion.cityNameRead.readMessage.setDataMode.parsePacket.isListening.setBitOrder.beginPacket.isDirectory.motorsWrite.drawCompass.digitalRead.clearScreen.serialEvent.rightToLeft.setTextSize.leftToRight.requestFrom.keyReleased.compassRead.analogWrite.interrupts.WiFiServer.disconnect.playMelody.parseFloat.autoscroll.getPINUsed.setPINUsed.setTimeout.sendAnalog.readSlider.analogRead.beginWrite.createChar.motorsStop.keyPressed.tempoWrite.readButton.subnetMask.debugPrint.macAddress.writeGreen.randomSeed.attachGPRS.readString.sendString.remotePort.releaseAll.mouseMoved.background.getXChange.getYChange.answerCall.getResult.voiceCall.endPacket.constrain.getSocket.writeJSON.getButton.available.connected.findUntil.readBytes.exitValue.readGreen.writeBlue.startLoop.IPAddress.isPressed.sendSysex.pauseMode.gatewayIP.setCursor.getOemKey.tuneWrite.noDisplay.loadImage.switchPIN.onRequest.onReceive.changePIN.playFile.noBuffer.parseInt.overflow.checkPIN.knobRead.beginTFT.bitClear.updateIR.bitWrite.position.writeRGB.highByte.writeRed.setSpeed.readBlue.noStroke.remoteIP.transfer.shutdown.hangCall.beginSMS.endWrite.attached.maintain.noCursor.checkReg.checkPUK.shiftOut.isValid.shiftIn.pulseIn.connect.println.localIP.pinMode.getIMEI.display.noBlink.process.getBand.running.beginSD.drawBMP.lowByte.setBand.release.bitRead.prepare.pointTo.readRed.setMode.noFill.remove.listen.stroke.detach.attach.noTone.exists.buffer.height.bitSet.circle.config.cursor.random.IRread.setDNS.endSMS.getKey.micros.millis.begin.print.write.ready.flush.width.isPIN.blink.clear.press.mkdir.rmdir.close.point.yield.image.BSSID.click.delay.read.text.move.peek.beep.rect.line.open.seek.fill.size.turn.stop.home.find.step.tone.sqrt.RSSI.SSID.end.bit.tan.cos.sin.pow.map.abs.max.min.get.run.put`.split(`.`),literal:[`DIGITAL_MESSAGE`,`FIRMATA_STRING`,`ANALOG_MESSAGE`,`REPORT_DIGITAL`,`REPORT_ANALOG`,`INPUT_PULLUP`,`SET_PIN_MODE`,`INTERNAL2V56`,`SYSTEM_RESET`,`LED_BUILTIN`,`INTERNAL1V1`,`SYSEX_START`,`INTERNAL`,`EXTERNAL`,`DEFAULT`,`OUTPUT`,`INPUT`,`HIGH`,`LOW`]},n=cB(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name=`Arduino`,n.aliases=[`ino`],n.supersetOf=`cpp`,n}function uB(e){let t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:[`self`,{begin:/:-/,contains:[n]}]};Object.assign(n,{className:`variable`,variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,`(?![\\w\\d])(?![$])`)},r]});let i={className:`subst`,begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:`comment`}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:`string`})]}},s={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(s);let c={match:/\\"/},l={className:`string`,begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:`number`},e.NUMBER_MODE,n]},f=e.SHEBANG({binary:`(${[`fish`,`bash`,`zsh`,`sh`,`csh`,`ksh`,`tcsh`,`dash`,`scsh`].join(`|`)})`,relevance:10}),p={className:`function`,begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=[`if`,`then`,`else`,`elif`,`fi`,`time`,`for`,`while`,`until`,`in`,`do`,`done`,`case`,`esac`,`coproc`,`function`,`select`],h=[`true`,`false`],g={match:/(\/[a-z._-]+)+/},_=[`break`,`cd`,`continue`,`eval`,`exec`,`exit`,`export`,`getopts`,`hash`,`pwd`,`readonly`,`return`,`shift`,`test`,`times`,`trap`,`umask`,`unset`],v=[`alias`,`bind`,`builtin`,`caller`,`command`,`declare`,`echo`,`enable`,`help`,`let`,`local`,`logout`,`mapfile`,`printf`,`read`,`readarray`,`source`,`sudo`,`type`,`typeset`,`ulimit`,`unalias`],y=`autoload.bg.bindkey.bye.cap.chdir.clone.comparguments.compcall.compctl.compdescribe.compfiles.compgroups.compquote.comptags.comptry.compvalues.dirs.disable.disown.echotc.echoti.emulate.fc.fg.float.functions.getcap.getln.history.integer.jobs.kill.limit.log.noglob.popd.print.pushd.pushln.rehash.sched.setcap.setopt.stat.suspend.ttyctl.unfunction.unhash.unlimit.unsetopt.vared.wait.whence.where.which.zcompile.zformat.zftp.zle.zmodload.zparseopts.zprof.zpty.zregexparse.zsocket.zstyle.ztcp`.split(`.`),b=`chcon.chgrp.chown.chmod.cp.dd.df.dir.dircolors.ln.ls.mkdir.mkfifo.mknod.mktemp.mv.realpath.rm.rmdir.shred.sync.touch.truncate.vdir.b2sum.base32.base64.cat.cksum.comm.csplit.cut.expand.fmt.fold.head.join.md5sum.nl.numfmt.od.paste.ptx.pr.sha1sum.sha224sum.sha256sum.sha384sum.sha512sum.shuf.sort.split.sum.tac.tail.tr.tsort.unexpand.uniq.wc.arch.basename.chroot.date.dirname.du.echo.env.expr.factor.groups.hostid.id.link.logname.nice.nohup.nproc.pathchk.pinky.printenv.printf.pwd.readlink.runcon.seq.sleep.stat.stdbuf.stty.tee.test.timeout.tty.uname.unlink.uptime.users.who.whoami.yes`.split(`.`);return{name:`Bash`,aliases:[`sh`,`zsh`],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:h,built_in:[..._,...v,`set`,`shopt`,...y,...b]},contains:[f,e.SHEBANG(),p,d,a,o,g,s,c,l,u,n]}}function dB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,variants:[{begin:`\\b[a-z\\d_]*_t\\b`},{match:/\batomic_[a-z]{3,6}\b/}]},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f={keyword:`asm.auto.break.case.continue.default.do.else.enum.extern.for.fortran.goto.if.inline.register.restrict.return.sizeof.typeof.typeof_unqual.struct.switch.typedef.union.volatile.while._Alignas._Alignof._Atomic._Generic._Noreturn._Static_assert._Thread_local.alignas.alignof.noreturn.static_assert.thread_local._Pragma`.split(`.`),type:`float.double.signed.unsigned.int.short.long.char.void._Bool._BitInt._Complex._Imaginary._Decimal32._Decimal64._Decimal96._Decimal128._Decimal64x._Decimal128x._Float16._Float32._Float64._Float128._Float32x._Float64x._Float128x.const.static.constexpr.complex.bool.imaginary`.split(`.`),literal:`true false NULL`,built_in:`std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr`},p=[l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],m={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:f,contains:p.concat([{begin:/\(/,end:/\)/,keywords:f,contains:p.concat([`self`]),relevance:0}]),relevance:0},h={begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:f,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:f,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(u,{className:`title.function`})],relevance:0},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C`,aliases:[`h`],keywords:f,disableAutodetect:!0,illegal:`</`,contains:[].concat(m,h,p,[l,{begin:e.IDENT_RE+`::`,keywords:f},{className:`class`,beginKeywords:`enum class struct union`,end:/[{;:<>=]/,contains:[{beginKeywords:`final class struct`},e.TITLE_MODE]}]),exports:{preprocessor:l,strings:s,keywords:f}}}function fB(e){let t=e.regex,n=e.COMMENT(`//`,`$`,{contains:[{begin:/\\\n/}]}),r=`decltype\\(auto\\)`,i=`[a-zA-Z_]\\w*::`,a=`(?!struct)(`+r+`|`+t.optional(i)+`[a-zA-Z_]\\w*`+t.optional(`<[^<>]+>`)+`)`,o={className:`type`,begin:`\\b[a-z\\d_]*_t\\b`},s={className:`string`,variants:[{begin:`(u8?|U|L)?"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]},{begin:`(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)`,end:`'`,illegal:`.`},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:`number`,variants:[{begin:`[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)`},{begin:`[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)`}],relevance:0},l={className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(s,{className:`string`}),{className:`string`,begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},u={className:`title`,begin:t.optional(i)+e.IDENT_RE,relevance:0},d=t.optional(i)+e.IDENT_RE+`\\s*\\(`,f=`alignas.alignof.and.and_eq.asm.atomic_cancel.atomic_commit.atomic_noexcept.auto.bitand.bitor.break.case.catch.class.co_await.co_return.co_yield.compl.concept.const_cast|10.consteval.constexpr.constinit.continue.decltype.default.delete.do.dynamic_cast|10.else.enum.explicit.export.extern.false.final.for.friend.goto.if.import.inline.module.mutable.namespace.new.noexcept.not.not_eq.nullptr.operator.or.or_eq.override.private.protected.public.reflexpr.register.reinterpret_cast|10.requires.return.sizeof.static_assert.static_cast|10.struct.switch.synchronized.template.this.thread_local.throw.transaction_safe.transaction_safe_dynamic.true.try.typedef.typeid.typename.union.using.virtual.volatile.while.xor.xor_eq`.split(`.`),p=[`bool`,`char`,`char16_t`,`char32_t`,`char8_t`,`double`,`float`,`int`,`long`,`short`,`void`,`wchar_t`,`unsigned`,`signed`,`const`,`static`],m=`any.auto_ptr.barrier.binary_semaphore.bitset.complex.condition_variable.condition_variable_any.counting_semaphore.deque.false_type.flat_map.flat_set.future.imaginary.initializer_list.istringstream.jthread.latch.lock_guard.multimap.multiset.mutex.optional.ostringstream.packaged_task.pair.promise.priority_queue.queue.recursive_mutex.recursive_timed_mutex.scoped_lock.set.shared_future.shared_lock.shared_mutex.shared_timed_mutex.shared_ptr.stack.string_view.stringstream.timed_mutex.thread.true_type.tuple.unique_lock.unique_ptr.unordered_map.unordered_multimap.unordered_multiset.unordered_set.variant.vector.weak_ptr.wstring.wstring_view`.split(`.`),h=`abort.abs.acos.apply.as_const.asin.atan.atan2.calloc.ceil.cerr.cin.clog.cos.cosh.cout.declval.endl.exchange.exit.exp.fabs.floor.fmod.forward.fprintf.fputs.free.frexp.fscanf.future.invoke.isalnum.isalpha.iscntrl.isdigit.isgraph.islower.isprint.ispunct.isspace.isupper.isxdigit.labs.launder.ldexp.log.log10.make_pair.make_shared.make_shared_for_overwrite.make_tuple.make_unique.malloc.memchr.memcmp.memcpy.memset.modf.move.pow.printf.putchar.puts.realloc.scanf.sin.sinh.snprintf.sprintf.sqrt.sscanf.std.stderr.stdin.stdout.strcat.strchr.strcmp.strcpy.strcspn.strlen.strncat.strncmp.strncpy.strpbrk.strrchr.strspn.strstr.swap.tan.tanh.terminate.to_underlying.tolower.toupper.vfprintf.visit.vprintf.vsprintf`.split(`.`),g={type:p,keyword:f,literal:[`NULL`,`false`,`nullopt`,`nullptr`,`true`],built_in:[`_Pragma`],_type_hints:m},_={className:`function.dispatch`,relevance:0,keywords:{_hint:h},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[_,l,o,n,e.C_BLOCK_COMMENT_MODE,c,s],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:`new throw return else`,end:/;/}],keywords:g,contains:v.concat([{begin:/\(/,end:/\)/,keywords:g,contains:v.concat([`self`]),relevance:0}]),relevance:0},b={className:`function`,begin:`(`+a+`[\\*&\\s]+)+`+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:d,returnBegin:!0,contains:[u],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[s,c]},{relevance:0,match:/,/},{className:`params`,begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,s,c,o,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[`self`,n,e.C_BLOCK_COMMENT_MODE,s,c,o]}]},o,n,e.C_BLOCK_COMMENT_MODE,l]};return{name:`C++`,aliases:[`cc`,`c++`,`h++`,`hpp`,`hh`,`hxx`,`cxx`],keywords:g,illegal:`</`,classNameAliases:{"function.dispatch":`built_in`},contains:[].concat(y,b,_,v,[l,{begin:`\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)`,end:`>`,keywords:g,contains:[`self`,o]},{begin:e.IDENT_RE+`::`,keywords:g},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:`keyword`,3:`title.class`}}])}}function pB(e){let t=[`bool`,`byte`,`char`,`decimal`,`delegate`,`double`,`dynamic`,`enum`,`float`,`int`,`long`,`nint`,`nuint`,`object`,`sbyte`,`short`,`string`,`ulong`,`uint`,`ushort`],n=[`public`,`private`,`protected`,`static`,`internal`,`protected`,`abstract`,`async`,`extern`,`override`,`unsafe`,`virtual`,`new`,`sealed`,`partial`],r={keyword:`abstract.as.base.break.case.catch.class.const.continue.do.else.event.explicit.extern.finally.fixed.for.foreach.goto.if.implicit.in.interface.internal.is.lock.namespace.new.operator.out.override.params.private.protected.public.readonly.record.ref.return.scoped.sealed.sizeof.stackalloc.static.struct.switch.this.throw.try.typeof.unchecked.unsafe.using.virtual.void.volatile.while`.split(`.`).concat(`add.alias.and.ascending.args.async.await.by.descending.dynamic.equals.file.from.get.global.group.init.into.join.let.nameof.not.notnull.on.or.orderby.partial.record.remove.required.scoped.select.set.unmanaged.value|0.var.when.where.with.yield`.split(`.`)),built_in:t,literal:[`default`,`false`,`null`,`true`]},i=e.inherit(e.TITLE_MODE,{begin:`[a-zA-Z](\\.?\\w)*`}),a={className:`number`,variants:[{begin:`\\b(0b[01']+)`},{begin:`(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)`},{begin:`(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)`}],relevance:0},o={className:`string`,begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},s={className:`string`,begin:`@"`,end:`"`,contains:[{begin:`""`}]},c=e.inherit(s,{illegal:/\n/}),l={className:`subst`,begin:/\{/,end:/\}/,keywords:r},u=e.inherit(l,{illegal:/\n/}),d={className:`string`,begin:/\$"/,end:`"`,illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,u]},f={className:`string`,begin:/\$@"/,end:`"`,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},l]},p=e.inherit(f,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:`""`},u]});l.contains=[f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE],u.contains=[p,d,c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];let m={variants:[o,f,d,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:`<`,end:`>`,contains:[{beginKeywords:`in out`},i]},g=e.IDENT_RE+`(<`+e.IDENT_RE+`(\\s*,\\s*`+e.IDENT_RE+`)*>)?(\\[\\])?`,_={begin:`@`+e.IDENT_RE,relevance:0};return{name:`C#`,aliases:[`cs`,`c#`],keywords:r,illegal:/::/,contains:[e.COMMENT(`///`,`$`,{returnBegin:!0,contains:[{className:`doctag`,variants:[{begin:`///`,relevance:0},{begin:`<!--|-->`},{begin:`</?`,end:`>`}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`meta`,begin:`#`,end:`$`,keywords:{keyword:`if else elif endif define undef warning error line region endregion pragma checksum`}},m,a,{beginKeywords:`class interface`,relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:`where class`},i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`namespace`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`record`,relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[i,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`meta`,begin:`^\\s*\\[(?=[\\w])`,excludeBegin:!0,end:`\\]`,excludeEnd:!0,contains:[{className:`string`,begin:/"/,end:/"/}]},{beginKeywords:`new return throw await else`,relevance:0},{className:`function`,begin:`(`+g+`\\s+)+`+e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:r,contains:[{beginKeywords:n.join(` `),relevance:0},{begin:e.IDENT_RE+`\\s*(<[^=]+>\\s*)?\\(`,returnBegin:!0,contains:[e.TITLE_MODE,h],relevance:0},{match:/\(\)/},{className:`params`,begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,relevance:0,contains:[m,a,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}var mB=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),hB=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),gB=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),_B=[...hB,...gB],vB=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),yB=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),bB=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),xB=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function SB(e){let t=e.regex,n=mB(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i=/@-?\w[\w]*(-\w+)*/,a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:`CSS`,case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:`from to`},classNameAliases:{keyframePosition:`selector-tag`},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:`selector-id`,begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:`selector-class`,begin:`\\.[a-zA-Z-][a-zA-Z0-9_-]*`,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,variants:[{begin:`:(`+yB.join(`|`)+`)`},{begin:`:(:)?(`+bB.join(`|`)+`)`}]},n.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+xB.join(`|`)+`)\\b`},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:`url data-uri`},contains:[...a,{className:`string`,begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:`[{;]`,relevance:0,illegal:/:/,contains:[{className:`keyword`,begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:vB.join(` `)},contains:[{begin:/[a-z-]+(?=:)/,className:`attribute`},...a,n.CSS_NUMBER_MODE]}]},{className:`selector-tag`,begin:`\\b(`+_B.join(`|`)+`)\\b`}]}}function CB(e){let t=e.regex;return{name:`Diff`,aliases:[`patch`],contains:[{className:`meta`,relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:`comment`,variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:`addition`,begin:/^\+/,end:/$/},{className:`deletion`,begin:/^-/,end:/$/},{className:`addition`,begin:/^!/,end:/$/}]}}function wB(e){let t={keyword:[`break`,`case`,`chan`,`const`,`continue`,`default`,`defer`,`else`,`fallthrough`,`for`,`func`,`go`,`goto`,`if`,`import`,`interface`,`map`,`package`,`range`,`return`,`select`,`struct`,`switch`,`type`,`var`],type:[`bool`,`byte`,`complex64`,`complex128`,`error`,`float32`,`float64`,`int8`,`int16`,`int32`,`int64`,`string`,`uint8`,`uint16`,`uint32`,`uint64`,`int`,`uint`,`uintptr`,`rune`],literal:[`true`,`false`,`iota`,`nil`],built_in:[`append`,`cap`,`close`,`complex`,`copy`,`imag`,`len`,`make`,`new`,`panic`,`print`,`println`,`real`,`recover`,`delete`]};return{name:`Go`,aliases:[`golang`],keywords:t,illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:`string`,variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:`number`,variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:`function`,beginKeywords:`func`,end:`\\s*(\\{|$)`,excludeEnd:!0,contains:[e.TITLE_MODE,{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}}function TB(e){let t=e.regex;return{name:`GraphQL`,aliases:[`gql`],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:[`query`,`mutation`,`subscription`,`type`,`input`,`schema`,`directive`,`interface`,`union`,`scalar`,`fragment`,`enum`,`on`],literal:[`true`,`false`,`null`]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:`punctuation`,match:/[.]{3}/,relevance:0},{scope:`punctuation`,begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:`variable`,begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:`meta`,match:/@\w+/,excludeEnd:!0},{scope:`symbol`,begin:t.concat(/[_A-Za-z][_0-9A-Za-z]*/,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function EB(e){let t=e.regex,n={className:`number`,relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];let i={className:`variable`,variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:`literal`,begin:/\bon|off|true|false|yes|no\b/},o={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:`'''`,end:`'''`,relevance:10},{begin:`"""`,end:`"""`,relevance:10},{begin:`"`,end:`"`},{begin:`'`,end:`'`}]},s={begin:/\[/,end:/\]/,contains:[r,a,i,o,n,`self`],relevance:0},c=t.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:`TOML, also INI`,aliases:[`toml`],case_insensitive:!0,illegal:/\S/,contains:[r,{className:`section`,begin:/\[+/,end:/\]+/},{begin:t.concat(c,`(\\s*\\.\\s*`,c,`)*`,t.lookahead(/\s*=\s*[^#\s]/)),className:`attr`,starts:{end:/$/,contains:[r,s,a,i,o,n]}}]}}var DB=`[0-9](_*[0-9])*`,OB=`\\.(${DB})`,kB=`[0-9a-fA-F](_*[0-9a-fA-F])*`,AB={className:`number`,variants:[{begin:`(\\b(${DB})((${OB})|\\.)?|(${OB}))[eE][+-]?(${DB})[fFdD]?\\b`},{begin:`\\b(${DB})((${OB})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${OB})[fFdD]?\\b`},{begin:`\\b(${DB})[fFdD]\\b`},{begin:`\\b0[xX]((${kB})\\.?|(${kB})?\\.(${kB}))[pP][+-]?(${DB})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${kB})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function jB(e,t,n){return n===-1?``:e.replace(t,r=>jB(e,t,n-1))}function MB(e){let t=e.regex,n=`[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*`,r=n+jB(`(?:<`+n+`~~~(?:\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*~~~)*>)?`,/~~~/g,2),i={keyword:`synchronized.abstract.private.var.static.if.const .for.while.strictfp.finally.protected.import.native.final.void.enum.else.break.transient.catch.instanceof.volatile.case.assert.package.default.public.try.switch.continue.throws.protected.public.private.module.requires.exports.do.sealed.yield.permits.goto.when`.split(`.`),literal:[`false`,`true`,`null`],type:[`char`,`boolean`,`long`,`float`,`int`,`byte`,`short`,`double`],built_in:[`super`,`this`]},a={className:`meta`,begin:`@`+n,contains:[{begin:/\(/,end:/\)/,contains:[`self`]}]},o={className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:`Java`,aliases:[`jsp`],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:`doctag`,begin:`@[A-Za-z]+`}]}),{begin:/import java\.[a-z]+\./,keywords:`import`,relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:`string`,contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:`keyword`,3:`title.class`}},{match:/non-sealed/,scope:`keyword`},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:`type`,3:`variable`,5:`operator`}},{begin:[/record/,/\s+/,n],className:{1:`keyword`,3:`title.class`},contains:[o,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:`new throw return else`,relevance:0},{begin:[`(?:`+r+`\\s+)`,e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:`title.function`},keywords:i,contains:[{className:`params`,begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,AB,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},AB,a]}}var NB=`[A-Za-z$_][0-9A-Za-z$_]*`,PB=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),FB=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],IB=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),LB=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],RB=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],zB=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],BB=[].concat(RB,IB,LB);function VB(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=NB,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:NB,keyword:PB,literal:FB,built_in:BB,"variable.language":zB},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...IB,...LB]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...RB,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function HB(e){let t={className:`attr`,begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:`punctuation`,relevance:0},r=[`true`,`false`,`null`],i={scope:`literal`,beginKeywords:r.join(` `)};return{name:`JSON`,aliases:[`jsonc`],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:`\\S`}}var UB=`[0-9](_*[0-9])*`,WB=`\\.(${UB})`,GB=`[0-9a-fA-F](_*[0-9a-fA-F])*`,KB={className:`number`,variants:[{begin:`(\\b(${UB})((${WB})|\\.)?|(${WB}))[eE][+-]?(${UB})[fFdD]?\\b`},{begin:`\\b(${UB})((${WB})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${WB})[fFdD]?\\b`},{begin:`\\b(${UB})[fFdD]\\b`},{begin:`\\b0[xX]((${GB})\\.?|(${GB})?\\.(${GB}))[pP][+-]?(${UB})[fFdD]?\\b`},{begin:`\\b(0|[1-9](_*[0-9])*)[lL]?\\b`},{begin:`\\b0[xX](${GB})[lL]?\\b`},{begin:`\\b0(_*[0-7])*[lL]?\\b`},{begin:`\\b0[bB][01](_*[01])*[lL]?\\b`}],relevance:0};function qB(e){let t={keyword:`abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual`,built_in:`Byte Short Char Int Long Boolean Float Double Void Unit Nothing`,literal:`true false null`},n={className:`keyword`,begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:`symbol`,begin:/@\w+/}]}},r={className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`@`},i={className:`subst`,begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:`variable`,begin:`\\$`+e.UNDERSCORE_IDENT_RE},o={className:`string`,variants:[{begin:`"""`,end:`"""(?=[^"])`,contains:[a,i]},{begin:`'`,end:`'`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,i]}]};i.contains.push(o);let s={className:`meta`,begin:`@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*`+e.UNDERSCORE_IDENT_RE+`)?`},c={className:`meta`,begin:`@`+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:`string`}),`self`]}]},l=KB,u=e.COMMENT(`/\\*`,`\\*/`,{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:`type`,begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:`Kotlin`,aliases:[`kt`,`kts`],keywords:t,contains:[e.COMMENT(`/\\*\\*`,`\\*/`,{relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`}]}),e.C_LINE_COMMENT_MODE,u,n,r,s,c,{className:`function`,beginKeywords:`fun`,end:`[(]|$`,returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+`\\s*\\(`,returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:`type`,begin:/</,end:/>/,keywords:`reified`,relevance:0},{className:`params`,begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,s,c,o,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:`title.class`},keywords:`class interface trait`,end:/[:\{(]|$/,excludeEnd:!0,illegal:`extends implements`,contains:[{beginKeywords:`public protected internal private constructor`},e.UNDERSCORE_TITLE_MODE,{className:`type`,begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},s,c]},o,{className:`meta`,begin:`^#!/usr/bin/env`,end:`$`,illegal:`
|
|
1929
|
+
`},l]}}var JB=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),YB=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),XB=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),ZB=[...YB,...XB],QB=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),$B=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),eV=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),tV=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse(),nV=$B.concat(eV).sort().reverse();function rV(e){let t=JB(e),n=nV,r=`[\\w-]+`,i=`(`+r+`|@\\{[\\w-]+\\})`,a=[],o=[],s=function(e){return{className:`string`,begin:`~?`+e+`.*?`+e}},c=function(e,t,n){return{className:e,begin:t,relevance:n}},l={$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:QB.join(` `)},u={begin:`\\(`,end:`\\)`,contains:o,keywords:l,relevance:0};o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s(`'`),s(`"`),t.CSS_NUMBER_MODE,{begin:`(url|data-uri)\\(`,starts:{className:`string`,end:`[\\)\\n]`,excludeEnd:!0}},t.HEXCOLOR,u,c(`variable`,`@@?`+r,10),c(`variable`,`@\\{`+r+`\\}`),c(`built_in`,"~?`[^`]*?`"),{className:`attribute`,begin:r+`\\s*:`,end:`:`,returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:`and not`},t.FUNCTION_DISPATCH);let d=o.concat({begin:/\{/,end:/\}/,contains:a}),f={beginKeywords:`when`,endsWithParent:!0,contains:[{beginKeywords:`and not`}].concat(o)},p={begin:i+`\\s*:`,returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+tV.join(`|`)+`)\\b`,end:/(?=:)/,starts:{endsWithParent:!0,illegal:`[<=$]`,relevance:0,contains:o}}]},m={className:`keyword`,begin:`@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b`,starts:{end:`[;{}]`,keywords:l,returnEnd:!0,contains:o,relevance:0}},h={className:`variable`,variants:[{begin:`@`+r+`\\s*:`,relevance:15},{begin:`@`+r}],starts:{end:`[;}]`,returnEnd:!0,contains:d}},g={variants:[{begin:`[\\.#:&\\[>]`,end:`[;{}]`},{begin:i,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f,c(`keyword`,`all\\b`),c(`variable`,`@\\{`+r+`\\}`),{begin:`\\b(`+ZB.join(`|`)+`)\\b`,className:`selector-tag`},t.CSS_NUMBER_MODE,c(`selector-tag`,i,0),c(`selector-id`,`#`+i),c(`selector-class`,`\\.`+i,0),c(`selector-tag`,`&`,0),t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-pseudo`,begin:`:(`+$B.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+eV.join(`|`)+`)`},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:`!important`},t.FUNCTION_DISPATCH]},_={begin:`[\\w-]+:(:)?(${n.join(`|`)})`,returnBegin:!0,contains:[g]};return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,h,_,p,g,f,t.FUNCTION_DISPATCH),{name:`Less`,case_insensitive:!0,illegal:`[=>'/<($"]`,contains:a}}function iV(e){let t=`\\[=*\\[`,n=`\\]=*\\]`,r={begin:t,end:n,contains:[`self`]},i=[e.COMMENT(`--(?!`+t+`)`,`$`),e.COMMENT(`--`+t,n,{contains:[r],relevance:10})];return{name:`Lua`,aliases:[`pluto`],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:`true false nil`,keyword:`and break do else elseif end for goto if in local not or repeat return then until while`,built_in:`_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove`},contains:i.concat([{className:`function`,beginKeywords:`function`,end:`\\)`,contains:[e.inherit(e.TITLE_MODE,{begin:`([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*`}),{className:`params`,begin:`\\(`,endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:`string`,begin:t,end:n,contains:[r],relevance:5}])}}function aV(e){let t={className:`variable`,variants:[{begin:`\\$\\(`+e.UNDERSCORE_IDENT_RE+`\\)`,contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:`variable`,begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:`subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value`},contains:[t,n]},i={begin:`^`+e.UNDERSCORE_IDENT_RE+`\\s*(?=[:+?]?=)`},a={className:`meta`,begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:`.PHONY`}},o={className:`section`,begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:`Makefile`,aliases:[`mk`,`mak`,`make`],keywords:{$pattern:/[\w-]+/,keyword:`define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath`},contains:[e.HASH_COMMENT_MODE,t,n,r,i,a,o]}}function oV(e){let t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:`>`,subLanguage:`xml`,relevance:0},r={begin:`^[-\\*]{3,}`,end:`$`},i={className:`code`,variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:`(~{3,})[^~](.|\\n)*?\\1~*[ ]*`},{begin:"```",end:"```+[ ]*$"},{begin:`~~~`,end:`~~~+[ ]*$`},{begin:"`.+?`"},{begin:`(?=^( {4}|\\t))`,contains:[{begin:`^( {4}|\\t)`,end:`(\\n)$`}],relevance:0}]},a={className:`bullet`,begin:`^[ ]*([*+-]|(\\d+\\.))(?=\\s+)`,end:`\\s+`,excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:`symbol`,begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:`link`,begin:/:\s*/,end:/$/,excludeBegin:!0}]},s={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:`string`,relevance:0,begin:`\\[`,end:`\\]`,excludeBegin:!0,returnEnd:!0},{className:`link`,relevance:0,begin:`\\]\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0},{className:`symbol`,relevance:0,begin:`\\]\\[`,end:`\\]`,excludeBegin:!0,excludeEnd:!0}]},c={className:`strong`,contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},l={className:`emphasis`,contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},u=e.inherit(c,{contains:[]}),d=e.inherit(l,{contains:[]});c.contains.push(d),l.contains.push(u);let f=[n,s];return[c,l,u,d].forEach(e=>{e.contains=e.contains.concat(f)}),f=f.concat(c,l),{name:`Markdown`,aliases:[`md`,`mkdown`,`mkd`],contains:[{className:`section`,variants:[{begin:`^#{1,6}`,end:`$`,contains:f},{begin:`(?=^.+?\\n[=-]{2,}$)`,contains:[{begin:`^[=-]*$`},{begin:`^`,end:`\\n`,contains:f}]}]},n,a,c,l,{className:`quote`,begin:`^>\\s+`,contains:f,end:`$`},i,r,s,o,{scope:`literal`,match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function sV(e){let t={className:`built_in`,begin:`\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+`},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r=[`int`,`float`,`char`,`unsigned`,`signed`,`short`,`long`,`double`,`wchar_t`,`unichar`,`void`,`bool`,`BOOL`,`id|0`,`_Bool`],i=`while.export.sizeof.typedef.const.struct.for.union.volatile.static.mutable.if.do.return.goto.enum.else.break.extern.asm.case.default.register.explicit.typename.switch.continue.inline.readonly.assign.readwrite.self.@synchronized.id.typeof.nonatomic.IBOutlet.IBAction.strong.weak.copy.in.out.inout.bycopy.byref.oneway.__strong.__weak.__block.__autoreleasing.@private.@protected.@public.@try.@property.@end.@throw.@catch.@finally.@autoreleasepool.@synthesize.@dynamic.@selector.@optional.@required.@encode.@package.@import.@defs.@compatibility_alias.__bridge.__bridge_transfer.__bridge_retained.__bridge_retain.__covariant.__contravariant.__kindof._Nonnull._Nullable._Null_unspecified.__FUNCTION__.__PRETTY_FUNCTION__.__attribute__.getter.setter.retain.unsafe_unretained.nonnull.nullable.null_unspecified.null_resettable.class.instancetype.NS_DESIGNATED_INITIALIZER.NS_UNAVAILABLE.NS_REQUIRES_SUPER.NS_RETURNS_INNER_POINTER.NS_INLINE.NS_AVAILABLE.NS_DEPRECATED.NS_ENUM.NS_OPTIONS.NS_SWIFT_UNAVAILABLE.NS_ASSUME_NONNULL_BEGIN.NS_ASSUME_NONNULL_END.NS_REFINED_FOR_SWIFT.NS_SWIFT_NAME.NS_SWIFT_NOTHROW.NS_DURING.NS_HANDLER.NS_ENDHANDLER.NS_VALUERETURN.NS_VOIDRETURN`.split(`.`),a=[`false`,`true`,`FALSE`,`TRUE`,`nil`,`YES`,`NO`,`NULL`],o=[`dispatch_once_t`,`dispatch_queue_t`,`dispatch_sync`,`dispatch_async`,`dispatch_once`],s={"variable.language":[`this`,`super`],$pattern:n,keyword:i,literal:a,built_in:o,type:r},c={$pattern:n,keyword:[`@interface`,`@class`,`@protocol`,`@implementation`]};return{name:`Objective-C`,aliases:[`mm`,`objc`,`obj-c`,`obj-c++`,`objective-c++`],keywords:s,illegal:`</`,contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:`string`,variants:[{begin:`@"`,end:`"`,illegal:`\\n`,contains:[e.BACKSLASH_ESCAPE]}]},{className:`meta`,begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:`if else elif endif define undef warning error line pragma ifdef ifndef include`},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),{className:`string`,begin:/<.*?>/,end:/$/,illegal:`\\n`},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:`class`,begin:`(`+c.keyword.join(`|`)+`)\\b`,end:/(\{|$)/,excludeEnd:!0,keywords:c,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:`\\.`+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function cV(e){let t=e.regex,n=`abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0`.split(`.`),r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(` `)},a={className:`subst`,begin:`[$@]\\{`,end:`\\}`,keywords:i},o={begin:/->\{/,end:/\}/},s={scope:`attr`,match:/\s+:\s*\w+(\s*\(.*?\))?/},c={scope:`variable`,variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,`(?![A-Za-z])(?![@$%])`)},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},l={className:`number`,variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,a,c],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(e,n,i=`\\1`)=>{let a=i===`\\1`?i:t.concat(i,n);return t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,a,/(?:\\.|[^\\\/])*?/,i,r)},p=(e,n,i)=>t.concat(t.concat(`(?:`,e,`)`),n,/(?:\\.|[^\\\/])*?/,i,r),m=[c,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:`string`,contains:u,variants:[{begin:`q[qwxr]?\\s*\\(`,end:`\\)`,relevance:5},{begin:`q[qwxr]?\\s*\\[`,end:`\\]`,relevance:5},{begin:`q[qwxr]?\\s*\\{`,end:`\\}`,relevance:5},{begin:`q[qwxr]?\\s*\\|`,end:`\\|`,relevance:5},{begin:`q[qwxr]?\\s*<`,end:`>`,relevance:5},{begin:`qw\\s+q`,end:`q`,relevance:5},{begin:`'`,end:`'`,contains:[e.BACKSLASH_ESCAPE]},{begin:`"`,end:`"`},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:`-?\\w+\\s*=>`,relevance:0}]},l,{begin:`(\\/\\/|`+e.RE_STARTERS_RE+`|\\b(split|return|print|reverse|grep)\\b)\\s*`,keywords:`split return print reverse grep`,relevance:0,contains:[e.HASH_COMMENT_MODE,{className:`regexp`,variants:[{begin:f(`s|tr|y`,t.either(...d,{capture:!0}))},{begin:f(`s|tr|y`,`\\(`,`\\)`)},{begin:f(`s|tr|y`,`\\[`,`\\]`)},{begin:f(`s|tr|y`,`\\{`,`\\}`)}],relevance:2},{className:`regexp`,variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p(`(?:m|qr)?`,/\//,/\//)},{begin:p(`m|qr`,t.either(...d,{capture:!0}),/\1/)},{begin:p(`m|qr`,/\(/,/\)/)},{begin:p(`m|qr`,/\[/,/\]/)},{begin:p(`m|qr`,/\{/,/\}/)}]}]},{className:`function`,beginKeywords:`sub method`,end:`(\\s*\\(.*?\\))?[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s]},{className:`class`,beginKeywords:`class`,end:`[;{]`,excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,s,l]},{begin:`-\\w\\b`,relevance:0},{begin:`^__DATA__$`,end:`^__END__$`,subLanguage:`mojolicious`,contains:[{begin:`^@@.*`,end:`$`,className:`comment`}]}];return a.contains=m,o.contains=m,{name:`Perl`,aliases:[`pl`,`pm`],keywords:i,contains:m}}function lV(e){let t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),o={scope:`variable`,match:`\\$+`+r},s={scope:`meta`,variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},c={scope:`subst`,variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(c)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(c),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
|
|
1930
|
+
]`,m={scope:`string`,variants:[u,l,d,f]},h={scope:`number`,variants:[{begin:`\\b0[bB][01]+(?:_[01]+)*\\b`},{begin:`\\b0[oO][0-7]+(?:_[0-7]+)*\\b`},{begin:`\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b`},{begin:`(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?`}],relevance:0},g=[`false`,`null`,`true`],_=`__CLASS__.__DIR__.__FILE__.__FUNCTION__.__COMPILER_HALT_OFFSET__.__LINE__.__METHOD__.__NAMESPACE__.__TRAIT__.die.echo.exit.include.include_once.print.require.require_once.array.abstract.and.as.binary.bool.boolean.break.callable.case.catch.class.clone.const.continue.declare.default.do.double.else.elseif.empty.enddeclare.endfor.endforeach.endif.endswitch.endwhile.enum.eval.extends.final.finally.float.for.foreach.from.global.goto.if.implements.instanceof.insteadof.int.integer.interface.isset.iterable.list.match|0.mixed.new.never.object.or.private.protected.public.readonly.real.return.string.switch.throw.trait.try.unset.use.var.void.while.xor.yield`.split(`.`),v=`Error|0.AppendIterator.ArgumentCountError.ArithmeticError.ArrayIterator.ArrayObject.AssertionError.BadFunctionCallException.BadMethodCallException.CachingIterator.CallbackFilterIterator.CompileError.Countable.DirectoryIterator.DivisionByZeroError.DomainException.EmptyIterator.ErrorException.Exception.FilesystemIterator.FilterIterator.GlobIterator.InfiniteIterator.InvalidArgumentException.IteratorIterator.LengthException.LimitIterator.LogicException.MultipleIterator.NoRewindIterator.OutOfBoundsException.OutOfRangeException.OuterIterator.OverflowException.ParentIterator.ParseError.RangeException.RecursiveArrayIterator.RecursiveCachingIterator.RecursiveCallbackFilterIterator.RecursiveDirectoryIterator.RecursiveFilterIterator.RecursiveIterator.RecursiveIteratorIterator.RecursiveRegexIterator.RecursiveTreeIterator.RegexIterator.RuntimeException.SeekableIterator.SplDoublyLinkedList.SplFileInfo.SplFileObject.SplFixedArray.SplHeap.SplMaxHeap.SplMinHeap.SplObjectStorage.SplObserver.SplPriorityQueue.SplQueue.SplStack.SplSubject.SplTempFileObject.TypeError.UnderflowException.UnexpectedValueException.UnhandledMatchError.ArrayAccess.BackedEnum.Closure.Fiber.Generator.Iterator.IteratorAggregate.Serializable.Stringable.Throwable.Traversable.UnitEnum.WeakReference.WeakMap.Directory.__PHP_Incomplete_Class.parent.php_user_filter.self.static.stdClass`.split(`.`),y={keyword:_,literal:(e=>{let t=[];return e.forEach(e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())}),t})(g),built_in:v},b=e=>e.map(e=>e.replace(/\|\d+$/,``)),x={variants:[{match:[/new/,t.concat(p,`+`),t.concat(`(?!`,b(v).join(`\\b|`),`\\b)`),i],scope:{1:`keyword`,4:`title.class`}}]},S=t.concat(r,`\\b(?!\\()`),C={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{2:`variable.constant`}},{match:[/::/,/class/],scope:{2:`variable.language`}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),S],scope:{1:`title.class`,3:`variable.constant`}},{match:[i,t.concat(`::`,t.lookahead(/(?!class\b)/))],scope:{1:`title.class`}},{match:[i,/::/,/class/],scope:{1:`title.class`,3:`variable.language`}}]},w={scope:`attr`,match:t.concat(r,t.lookahead(`:`),t.lookahead(/(?!::)/))},T={relevance:0,begin:/\(/,end:/\)/,keywords:y,contains:[w,o,C,e.C_BLOCK_COMMENT_MODE,m,h,x]},E={relevance:0,match:[/\b/,t.concat(`(?!fn\\b|function\\b|`,b(_).join(`\\b|`),`|`,b(v).join(`\\b|`),`\\b)`),r,t.concat(p,`*`),t.lookahead(/(?=\()/)],scope:{3:`title.function.invoke`},contains:[T]};T.contains.push(E);let D=[w,C,e.C_BLOCK_COMMENT_MODE,m,h,x],O={begin:t.concat(/#\[\s*\\?/,t.either(i,a)),beginScope:`meta`,end:/]/,endScope:`meta`,keywords:{literal:g,keyword:[`new`,`array`]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:[`new`,`array`]},contains:[`self`,...D]},...D,{scope:`meta`,variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:y,contains:[O,e.HASH_COMMENT_MODE,e.COMMENT(`//`,`$`),e.COMMENT(`/\\*`,`\\*/`,{contains:[{scope:`doctag`,match:`@[A-Za-z]+`}]}),{match:/__halt_compiler\(\);/,keywords:`__halt_compiler`,starts:{scope:`comment`,end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:`meta`,endsParent:!0}]}},s,{scope:`variable.language`,match:/\$this\b/},o,E,C,{match:[/const/,/\s/,r],scope:{1:`keyword`,3:`variable.constant`}},x,{scope:`function`,relevance:0,beginKeywords:`fn function`,end:/[;{]/,excludeEnd:!0,illegal:`[$%\\[]`,contains:[{beginKeywords:`use`},e.UNDERSCORE_TITLE_MODE,{begin:`=>`,endsParent:!0},{scope:`params`,begin:`\\(`,end:`\\)`,excludeBegin:!0,excludeEnd:!0,keywords:y,contains:[`self`,O,o,C,e.C_BLOCK_COMMENT_MODE,m,h]}]},{scope:`class`,variants:[{beginKeywords:`enum`,illegal:/[($"]/},{beginKeywords:`class interface trait`,illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:`extends implements`},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:`namespace`,relevance:0,end:`;`,illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:`title.class`})]},{beginKeywords:`use`,relevance:0,end:`;`,contains:[{match:/\b(as|const|function)\b/,scope:`keyword`},e.UNDERSCORE_TITLE_MODE]},m,h]}}function uV(e){return{name:`PHP template`,subLanguage:`xml`,contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:`php`,contains:[{begin:`/\\*`,end:`\\*/`,skip:!0},{begin:`b"`,end:`"`,skip:!0},{begin:`b'`,end:`'`,skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function dV(e){return{name:`Plain text`,aliases:[`text`,`txt`],disableAutodetect:!0}}function fV(e){let t=e.regex,n=/[\p{XID_Start}_]\p{XID_Continue}*/u,r=`and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield`.split(`.`),i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:`__import__.abs.all.any.ascii.bin.bool.breakpoint.bytearray.bytes.callable.chr.classmethod.compile.complex.delattr.dict.dir.divmod.enumerate.eval.exec.filter.float.format.frozenset.getattr.globals.hasattr.hash.help.hex.id.input.int.isinstance.issubclass.iter.len.list.locals.map.max.memoryview.min.next.object.oct.open.ord.pow.print.property.range.repr.reversed.round.set.setattr.slice.sorted.staticmethod.str.sum.super.tuple.type.vars.zip`.split(`.`),literal:[`__debug__`,`Ellipsis`,`False`,`None`,`NotImplemented`,`True`],type:[`Any`,`Callable`,`Coroutine`,`Dict`,`List`,`Literal`,`Generic`,`Optional`,`Sequence`,`Set`,`Tuple`,`Type`,`Union`]},a={className:`meta`,begin:/^(>>>|\.\.\.) /},o={className:`subst`,begin:/\{/,end:/\}/,keywords:i,illegal:/#/},s={begin:/\{\{/,relevance:0},c={className:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,s,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,s,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,s,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},l=`[0-9](_?[0-9])*`,u=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,d=`\\b|${r.join(`|`)}`,f={className:`number`,relevance:0,variants:[{begin:`(\\b(${l})|(${u}))[eE][+-]?(${l})[jJ]?(?=${d})`},{begin:`(${u})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${l})[jJ](?=${d})`}]},p={className:`comment`,begin:t.lookahead(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:`params`,variants:[{className:``,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:[`self`,a,f,c,e.HASH_COMMENT_MODE]}]};return o.contains=[c,f,a],{name:`Python`,aliases:[`py`,`gyp`,`ipython`],unicodeRegex:!0,keywords:i,illegal:/(<\/|\?)|=>/,contains:[a,f,{scope:`variable.language`,match:/\bself\b/},{beginKeywords:`if`,relevance:0},{match:/\bor\b/,scope:`keyword`},c,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:`keyword`,3:`title.class`,6:`title.class.inherited`}},{className:`meta`,begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[f,m,c]}]}}function pV(e){return{aliases:[`pycon`],contains:[{className:`meta.prompt`,starts:{end:/ |$/,starts:{end:`$`,subLanguage:`python`}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function mV(e){let t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:`R`,keywords:{$pattern:n,keyword:`function if in break next repeat else for while`,literal:`NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10`,built_in:`LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm`},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:`doctag`,match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:`doctag`,begin:`@param`,end:/$/,contains:[{scope:`variable`,variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:`doctag`,match:/@[a-zA-Z]+/},{scope:`keyword`,match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:`string`,contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:`"`,end:`"`,relevance:0},{begin:`'`,end:`'`,relevance:0}]},{relevance:0,variants:[{scope:{1:`operator`,2:`number`},match:[i,r]},{scope:{1:`operator`,2:`number`},match:[/%[^%]*%/,r]},{scope:{1:`punctuation`,2:`number`},match:[a,r]},{scope:{2:`number`},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:`operator`},match:[n,/\s+/,/<-/,/\s+/]},{scope:`operator`,relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:`punctuation`,relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function hV(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),a=[`include`,`extend`,`prepend`,`public`,`private`,`protected`,`raise`,`throw`],o={"variable.constant":[`__FILE__`,`__LINE__`,`__ENCODING__`],"variable.language":[`self`,`super`],keyword:[`alias`,`and`,`begin`,`BEGIN`,`break`,`case`,`class`,`defined`,`do`,`else`,`elsif`,`end`,`END`,`ensure`,`for`,`if`,`in`,`module`,`next`,`not`,`or`,`redo`,`require`,`rescue`,`retry`,`return`,`then`,`undef`,`unless`,`until`,`when`,`while`,`yield`,...a],built_in:[`proc`,`lambda`,`attr_accessor`,`attr_reader`,`attr_writer`,`define_method`,`private_constant`,`module_function`],literal:[`true`,`false`,`nil`]},s={className:`doctag`,begin:`@[A-Za-z]+`},c={begin:`#<`,end:`>`},l=[e.COMMENT(`#`,`$`,{contains:[s]}),e.COMMENT(`^=begin`,`^=end`,{contains:[s],relevance:10}),e.COMMENT(`^__END__`,e.MATCH_NOTHING_RE)],u={className:`subst`,begin:/#\{/,end:/\}/,keywords:o},d={className:`string`,contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},f=`[0-9](_?[0-9])*`,p={className:`number`,relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${f}))?([eE][+-]?(${f})|r)?i?\\b`},{begin:`\\b0[dD][0-9](_?[0-9])*r?i?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*r?i?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*r?i?\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b`},{begin:`\\b0(_?[0-7])+r?i?\\b`}]},m={variants:[{match:/\(\)/},{className:`params`,begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},h={match:[/(include|extend)\s+/,i],scope:{2:`title.class`},keywords:o},g={variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:`title.class`,4:`title.class.inherited`},keywords:o},_={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`},v={match:[/def/,/\s+/,n],scope:{1:`keyword`,3:`title.function`},contains:[m]},y=[d,g,h,{relevance:0,match:[i,/\.new[. (]/],scope:{1:`title.class`}},_,{relevance:0,match:r,scope:`title.class`},v,{begin:e.IDENT_RE+`::`},{className:`symbol`,begin:e.UNDERSCORE_IDENT_RE+`(!|\\?)?:`,relevance:0},{className:`symbol`,begin:`:(?!\\s)`,contains:[d,{begin:n}],relevance:0},p,{className:`variable`,begin:`(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])`},{className:`params`,begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:`(`+e.RE_STARTERS_RE+`|unless)\\s*`,keywords:`unless`,contains:[{className:`regexp`,contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:`/`,end:`/[a-z]*`},{begin:/%r\{/,end:/\}[a-z]*/},{begin:`%r\\(`,end:`\\)[a-z]*`},{begin:`%r!`,end:`![a-z]*`},{begin:`%r\\[`,end:`\\][a-z]*`}]}].concat(c,l),relevance:0}].concat(c,l);u.contains=y,m.contains=y;let b=[{begin:/^\s*=>/,starts:{end:`$`,contains:y}},{className:`meta.prompt`,begin:`^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])`,starts:{end:`$`,keywords:o,contains:y}}];return l.unshift(c),{name:`Ruby`,aliases:[`rb`,`gemspec`,`podspec`,`thor`,`irb`],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:`ruby`})].concat(b,l,y)}}function gV(e){let t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),a={className:`title.function.invoke`,relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},o=`([ui](8|16|32|64|128|size)|f(32|64))?`,s=`abstract.as.async.await.become.box.break.const.continue.crate.do.dyn.else.enum.extern.false.final.fn.for.if.impl.in.let.loop.macro.match.mod.move.mut.override.priv.pub.ref.return.self.Self.static.struct.super.trait.true.try.type.typeof.union.unsafe.unsized.use.virtual.where.while.yield`.split(`.`),c=[`true`,`false`,`Some`,`None`,`Ok`,`Err`],l=`drop .Copy.Send.Sized.Sync.Drop.Fn.FnMut.FnOnce.ToOwned.Clone.Debug.PartialEq.PartialOrd.Eq.Ord.AsRef.AsMut.Into.From.Default.Iterator.Extend.IntoIterator.DoubleEndedIterator.ExactSizeIterator.SliceConcatExt.ToString.assert!.assert_eq!.bitflags!.bytes!.cfg!.col!.concat!.concat_idents!.debug_assert!.debug_assert_eq!.env!.eprintln!.panic!.file!.format!.format_args!.include_bytes!.include_str!.line!.local_data_key!.module_path!.option_env!.print!.println!.select!.stringify!.try!.unimplemented!.unreachable!.vec!.write!.writeln!.macro_rules!.assert_ne!.debug_assert_ne!`.split(`.`),u=[`i8`,`i16`,`i32`,`i64`,`i128`,`isize`,`u8`,`u16`,`u32`,`u64`,`u128`,`usize`,`f32`,`f64`,`str`,`char`,`bool`,`Box`,`Option`,`Result`,`String`,`Vec`];return{name:`Rust`,aliases:[`rs`],keywords:{$pattern:e.IDENT_RE+`!?`,type:u,keyword:s,literal:c,built_in:l},illegal:`</`,contains:[e.C_LINE_COMMENT_MODE,e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:`symbol`,begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:`string`,variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:`char.escape`,match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:`number`,variants:[{begin:`\\b0b([01_]+)`+o},{begin:`\\b0o([0-7_]+)`+o},{begin:`\\b0x([A-Fa-f0-9_]+)`+o},{begin:`\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)`+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:`keyword`,3:`title.function`}},{className:`meta`,begin:`#!?\\[`,end:`\\]`,contains:[{className:`string`,begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:`keyword`,3:`keyword`,4:`variable`}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:`keyword`,3:`variable`,5:`keyword`}},{begin:[/type/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:`keyword`,3:`title.class`}},{begin:e.IDENT_RE+`::`,keywords:{keyword:`Self`,built_in:l,type:u}},{className:`punctuation`,begin:`->`},a]}}var _V=e=>({IMPORTANT:{scope:`meta`,begin:`!important`},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:`number`,begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:`built_in`,begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:`selector-attr`,begin:/\[/,end:/\]/,illegal:`$`,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:`number`,begin:e.NUMBER_RE+`(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?`,relevance:0},CSS_VARIABLE:{className:`attr`,begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),vV=`a.abbr.address.article.aside.audio.b.blockquote.body.button.canvas.caption.cite.code.dd.del.details.dfn.div.dl.dt.em.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.html.i.iframe.img.input.ins.kbd.label.legend.li.main.mark.menu.nav.object.ol.optgroup.option.p.picture.q.quote.samp.section.select.source.span.strong.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.ul.var.video`.split(`.`),yV=`defs.g.marker.mask.pattern.svg.switch.symbol.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feFlood.feGaussianBlur.feImage.feMerge.feMorphology.feOffset.feSpecularLighting.feTile.feTurbulence.linearGradient.radialGradient.stop.circle.ellipse.image.line.path.polygon.polyline.rect.text.use.textPath.tspan.foreignObject.clipPath`.split(`.`),bV=[...vV,...yV],xV=`any-hover.any-pointer.aspect-ratio.color.color-gamut.color-index.device-aspect-ratio.device-height.device-width.display-mode.forced-colors.grid.height.hover.inverted-colors.monochrome.orientation.overflow-block.overflow-inline.pointer.prefers-color-scheme.prefers-contrast.prefers-reduced-motion.prefers-reduced-transparency.resolution.scan.scripting.update.width.min-width.max-width.min-height.max-height`.split(`.`).sort().reverse(),SV=`active.any-link.blank.checked.current.default.defined.dir.disabled.drop.empty.enabled.first.first-child.first-of-type.fullscreen.future.focus.focus-visible.focus-within.has.host.host-context.hover.indeterminate.in-range.invalid.is.lang.last-child.last-of-type.left.link.local-link.not.nth-child.nth-col.nth-last-child.nth-last-col.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.past.placeholder-shown.read-only.read-write.required.right.root.scope.target.target-within.user-invalid.valid.visited.where`.split(`.`).sort().reverse(),CV=[`after`,`backdrop`,`before`,`cue`,`cue-region`,`first-letter`,`first-line`,`grammar-error`,`marker`,`part`,`placeholder`,`selection`,`slotted`,`spelling-error`].sort().reverse(),wV=`accent-color.align-content.align-items.align-self.alignment-baseline.all.anchor-name.animation.animation-composition.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-range.animation-range-end.animation-range-start.animation-timeline.animation-timing-function.appearance.aspect-ratio.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.block-size.border.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-end-end-radius.border-end-start-radius.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-start-end-radius.border-start-start-radius.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-align.box-decoration-break.box-direction.box-flex.box-flex-group.box-lines.box-ordinal-group.box-orient.box-pack.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.color-scheme.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.contain-intrinsic-block-size.contain-intrinsic-height.contain-intrinsic-inline-size.contain-intrinsic-size.contain-intrinsic-width.container.container-name.container-type.content.content-visibility.counter-increment.counter-reset.counter-set.cue.cue-after.cue-before.cursor.cx.cy.direction.display.dominant-baseline.empty-cells.enable-background.field-sizing.fill.fill-opacity.fill-rule.filter.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.flood-color.flood-opacity.flow.font.font-display.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-palette.font-size.font-size-adjust.font-smooth.font-smoothing.font-stretch.font-style.font-synthesis.font-synthesis-position.font-synthesis-small-caps.font-synthesis-style.font-synthesis-weight.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-emoji.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.forced-color-adjust.gap.glyph-orientation-horizontal.glyph-orientation-vertical.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphenate-character.hyphenate-limit-chars.hyphens.icon.image-orientation.image-rendering.image-resolution.ime-mode.initial-letter.initial-letter-align.inline-size.inset.inset-area.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.kerning.left.letter-spacing.lighting-color.line-break.line-height.line-height-step.list-style.list-style-image.list-style-position.list-style-type.margin.margin-block.margin-block-end.margin-block-start.margin-bottom.margin-inline.margin-inline-end.margin-inline-start.margin-left.margin-right.margin-top.margin-trim.marker.marker-end.marker-mid.marker-start.marks.mask.mask-border.mask-border-mode.mask-border-outset.mask-border-repeat.mask-border-slice.mask-border-source.mask-border-width.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.masonry-auto-flow.math-depth.math-shift.math-style.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.nav-down.nav-index.nav-left.nav-right.nav-up.none.normal.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-anchor.overflow-block.overflow-clip-margin.overflow-inline.overflow-wrap.overflow-x.overflow-y.overlay.overscroll-behavior.overscroll-behavior-block.overscroll-behavior-inline.overscroll-behavior-x.overscroll-behavior-y.padding.padding-block.padding-block-end.padding-block-start.padding-bottom.padding-inline.padding-inline-end.padding-inline-start.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.paint-order.pause.pause-after.pause-before.perspective.perspective-origin.place-content.place-items.place-self.pointer-events.position.position-anchor.position-visibility.print-color-adjust.quotes.r.resize.rest.rest-after.rest-before.right.rotate.row-gap.ruby-align.ruby-position.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-stop.scroll-snap-type.scroll-timeline.scroll-timeline-axis.scroll-timeline-name.scrollbar-color.scrollbar-gutter.scrollbar-width.shape-image-threshold.shape-margin.shape-outside.shape-rendering.speak.speak-as.src.stop-color.stop-opacity.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.table-layout.text-align.text-align-all.text-align-last.text-anchor.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-decoration-thickness.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-indent.text-justify.text-orientation.text-overflow.text-rendering.text-shadow.text-size-adjust.text-transform.text-underline-offset.text-underline-position.text-wrap.text-wrap-mode.text-wrap-style.timeline-scope.top.touch-action.transform.transform-box.transform-origin.transform-style.transition.transition-behavior.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-modify.user-select.vector-effect.vertical-align.view-timeline.view-timeline-axis.view-timeline-inset.view-timeline-name.view-transition-name.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.white-space.white-space-collapse.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.x.y.z-index.zoom`.split(`.`).sort().reverse();function TV(e){let t=_V(e),n=CV,r=SV,i=`@[a-z-]+`,a={className:`variable`,begin:`(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b`,relevance:0};return{name:`SCSS`,case_insensitive:!0,illegal:`[=/|']`,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:`selector-id`,begin:`#[A-Za-z0-9_-]+`,relevance:0},{className:`selector-class`,begin:`\\.[A-Za-z0-9_-]+`,relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:`selector-tag`,begin:`\\b(`+bV.join(`|`)+`)\\b`,relevance:0},{className:`selector-pseudo`,begin:`:(`+r.join(`|`)+`)`},{className:`selector-pseudo`,begin:`:(:)?(`+n.join(`|`)+`)`},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:`attribute`,begin:`\\b(`+wV.join(`|`)+`)\\b`},{begin:`\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b`},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:`@(page|font-face)`,keywords:{$pattern:i,keyword:`@page @font-face`}},{begin:`@`,end:`[{;]`,returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:`and or not only`,attribute:xV.join(` `)},contains:[{begin:i,className:`keyword`},{begin:/[a-z-]+(?=:)/,className:`attribute`},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function EV(e){return{name:`Shell Session`,aliases:[`console`,`shellsession`],contains:[{className:`meta.prompt`,begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:`bash`}}]}}function DV(e){let t=e.regex,n=e.COMMENT(`--`,`$`),r={scope:`string`,variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=[`true`,`false`,`unknown`],o=[`double precision`,`large object`,`with timezone`,`without timezone`],s=`bigint.binary.blob.boolean.char.character.clob.date.dec.decfloat.decimal.float.int.integer.interval.nchar.nclob.national.numeric.real.row.smallint.time.timestamp.varchar.varying.varbinary`.split(`.`),c=[`add`,`asc`,`collation`,`desc`,`final`,`first`,`last`,`view`],l=`abs.acos.all.allocate.alter.and.any.are.array.array_agg.array_max_cardinality.as.asensitive.asin.asymmetric.at.atan.atomic.authorization.avg.begin.begin_frame.begin_partition.between.bigint.binary.blob.boolean.both.by.call.called.cardinality.cascaded.case.cast.ceil.ceiling.char.char_length.character.character_length.check.classifier.clob.close.coalesce.collate.collect.column.commit.condition.connect.constraint.contains.convert.copy.corr.corresponding.cos.cosh.count.covar_pop.covar_samp.create.cross.cube.cume_dist.current.current_catalog.current_date.current_default_transform_group.current_path.current_role.current_row.current_schema.current_time.current_timestamp.current_path.current_role.current_transform_group_for_type.current_user.cursor.cycle.date.day.deallocate.dec.decimal.decfloat.declare.default.define.delete.dense_rank.deref.describe.deterministic.disconnect.distinct.double.drop.dynamic.each.element.else.empty.end.end_frame.end_partition.end-exec.equals.escape.every.except.exec.execute.exists.exp.external.extract.false.fetch.filter.first_value.float.floor.for.foreign.frame_row.free.from.full.function.fusion.get.global.grant.group.grouping.groups.having.hold.hour.identity.in.indicator.initial.inner.inout.insensitive.insert.int.integer.intersect.intersection.interval.into.is.join.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.language.large.last_value.lateral.lead.leading.left.like.like_regex.listagg.ln.local.localtime.localtimestamp.log.log10.lower.match.match_number.match_recognize.matches.max.member.merge.method.min.minute.mod.modifies.module.month.multiset.national.natural.nchar.nclob.new.no.none.normalize.not.nth_value.ntile.null.nullif.numeric.octet_length.occurrences_regex.of.offset.old.omit.on.one.only.open.or.order.out.outer.over.overlaps.overlay.parameter.partition.pattern.per.percent.percent_rank.percentile_cont.percentile_disc.period.portion.position.position_regex.power.precedes.precision.prepare.primary.procedure.ptf.range.rank.reads.real.recursive.ref.references.referencing.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.release.result.return.returns.revoke.right.rollback.rollup.row.row_number.rows.running.savepoint.scope.scroll.search.second.seek.select.sensitive.session_user.set.show.similar.sin.sinh.skip.smallint.some.specific.specifictype.sql.sqlexception.sqlstate.sqlwarning.sqrt.start.static.stddev_pop.stddev_samp.submultiset.subset.substring.substring_regex.succeeds.sum.symmetric.system.system_time.system_user.table.tablesample.tan.tanh.then.time.timestamp.timezone_hour.timezone_minute.to.trailing.translate.translate_regex.translation.treat.trigger.trim.trim_array.true.truncate.uescape.union.unique.unknown.unnest.update.upper.user.using.value.values.value_of.var_pop.var_samp.varbinary.varchar.varying.versioning.when.whenever.where.width_bucket.window.with.within.without.year`.split(`.`),u=`abs.acos.array_agg.asin.atan.avg.cast.ceil.ceiling.coalesce.corr.cos.cosh.count.covar_pop.covar_samp.cume_dist.dense_rank.deref.element.exp.extract.first_value.floor.json_array.json_arrayagg.json_exists.json_object.json_objectagg.json_query.json_table.json_table_primitive.json_value.lag.last_value.lead.listagg.ln.log.log10.lower.max.min.mod.nth_value.ntile.nullif.percent_rank.percentile_cont.percentile_disc.position.position_regex.power.rank.regr_avgx.regr_avgy.regr_count.regr_intercept.regr_r2.regr_slope.regr_sxx.regr_sxy.regr_syy.row_number.sin.sinh.sqrt.stddev_pop.stddev_samp.substring.substring_regex.sum.tan.tanh.translate.translate_regex.treat.trim.trim_array.unnest.upper.value_of.var_pop.var_samp.width_bucket`.split(`.`),d=[`current_catalog`,`current_date`,`current_default_transform_group`,`current_path`,`current_role`,`current_schema`,`current_transform_group_for_type`,`current_user`,`session_user`,`system_time`,`system_user`,`current_time`,`localtime`,`current_timestamp`,`localtimestamp`],f=[`create table`,`insert into`,`primary key`,`foreign key`,`not null`,`alter table`,`add constraint`,`grouping sets`,`on overflow`,`character set`,`respect nulls`,`ignore nulls`,`nulls first`,`nulls last`,`depth first`,`breadth first`],p=u,m=[...l,...c].filter(e=>!u.includes(e)),h={scope:`variable`,match:/@[a-z0-9][a-z0-9_]*/},g={scope:`operator`,match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function v(e){return t.concat(/\b/,t.either(...e.map(e=>e.replace(/\s+/,`\\s+`))),/\b/)}let y={scope:`keyword`,match:v(f),relevance:0};function b(e,{exceptions:t,when:n}={}){let r=n;return t||=[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}return{name:`SQL`,case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:b(m,{when:e=>e.length<3}),literal:a,type:s,built_in:d},contains:[{scope:`type`,match:v(o)},y,_,h,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,g]}}function OV(e){return e?typeof e==`string`?e:e.source:null}function kV(e){return AV(`(?=`,e,`)`)}function AV(...e){return e.map(e=>OV(e)).join(``)}function jV(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function MV(...e){return`(`+(jV(e).capture?``:`?:`)+e.map(e=>OV(e)).join(`|`)+`)`}var NV=e=>AV(/\b/,e,/\w$/.test(e)?/\b/:/\B/),PV=[`Protocol`,`Type`].map(NV),FV=[`init`,`self`].map(NV),IV=[`Any`,`Self`],LV=[`actor`,`any`,`associatedtype`,`async`,`await`,/as\?/,/as!/,`as`,`borrowing`,`break`,`case`,`catch`,`class`,`consume`,`consuming`,`continue`,`convenience`,`copy`,`default`,`defer`,`deinit`,`didSet`,`distributed`,`do`,`dynamic`,`each`,`else`,`enum`,`extension`,`fallthrough`,/fileprivate\(set\)/,`fileprivate`,`final`,`for`,`func`,`get`,`guard`,`if`,`import`,`indirect`,`infix`,/init\?/,/init!/,`inout`,/internal\(set\)/,`internal`,`in`,`is`,`isolated`,`nonisolated`,`lazy`,`let`,`macro`,`mutating`,`nonmutating`,/open\(set\)/,`open`,`operator`,`optional`,`override`,`package`,`postfix`,`precedencegroup`,`prefix`,/private\(set\)/,`private`,`protocol`,/public\(set\)/,`public`,`repeat`,`required`,`rethrows`,`return`,`set`,`some`,`static`,`struct`,`subscript`,`super`,`switch`,`throws`,`throw`,/try\?/,/try!/,`try`,`typealias`,/unowned\(safe\)/,/unowned\(unsafe\)/,`unowned`,`var`,`weak`,`where`,`while`,`willSet`],RV=[`false`,`nil`,`true`],zV=[`assignment`,`associativity`,`higherThan`,`left`,`lowerThan`,`none`,`right`],BV=[`#colorLiteral`,`#column`,`#dsohandle`,`#else`,`#elseif`,`#endif`,`#error`,`#file`,`#fileID`,`#fileLiteral`,`#filePath`,`#function`,`#if`,`#imageLiteral`,`#keyPath`,`#line`,`#selector`,`#sourceLocation`,`#warning`],VV=`abs.all.any.assert.assertionFailure.debugPrint.dump.fatalError.getVaList.isKnownUniquelyReferenced.max.min.numericCast.pointwiseMax.pointwiseMin.precondition.preconditionFailure.print.readLine.repeatElement.sequence.stride.swap.swift_unboxFromSwiftValueWithType.transcode.type.unsafeBitCast.unsafeDowncast.withExtendedLifetime.withUnsafeMutablePointer.withUnsafePointer.withVaList.withoutActuallyEscaping.zip`.split(`.`),HV=MV(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),UV=MV(HV,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),WV=AV(HV,UV,`*`),GV=MV(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),KV=MV(GV,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),qV=AV(GV,KV,`*`),JV=AV(/[A-Z]/,KV,`*`),YV=[`attached`,`autoclosure`,AV(/convention\(/,MV(`swift`,`block`,`c`),/\)/),`discardableResult`,`dynamicCallable`,`dynamicMemberLookup`,`escaping`,`freestanding`,`frozen`,`GKInspectable`,`IBAction`,`IBDesignable`,`IBInspectable`,`IBOutlet`,`IBSegueAction`,`inlinable`,`main`,`nonobjc`,`NSApplicationMain`,`NSCopying`,`NSManaged`,AV(/objc\(/,qV,/\)/),`objc`,`objcMembers`,`propertyWrapper`,`requires_stored_property_inits`,`resultBuilder`,`Sendable`,`testable`,`UIApplicationMain`,`unchecked`,`unknown`,`usableFromInline`,`warn_unqualified_access`],XV=[`iOS`,`iOSApplicationExtension`,`macOS`,`macOSApplicationExtension`,`macCatalyst`,`macCatalystApplicationExtension`,`watchOS`,`watchOSApplicationExtension`,`tvOS`,`tvOSApplicationExtension`,`swift`];function ZV(e){let t={match:/\s+/,relevance:0},n=e.COMMENT(`/\\*`,`\\*/`,{contains:[`self`]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,MV(...PV,...FV)],className:{2:`keyword`}},a={match:AV(/\./,MV(...LV)),relevance:0},o=LV.filter(e=>typeof e==`string`).concat([`_|0`]),s={variants:[{className:`keyword`,match:MV(...LV.filter(e=>typeof e!=`string`).concat(IV).map(NV),...FV)}]},c={$pattern:MV(/\b\w+/,/#\w+/),keyword:o.concat(BV),literal:RV},l=[i,a,s],u=[{match:AV(/\./,MV(...VV)),relevance:0},{className:`built_in`,match:AV(/\b/,MV(...VV),/(?=\()/)}],d={match:/->/,relevance:0},f=[d,{className:`operator`,relevance:0,variants:[{match:WV},{match:`\\.(\\.|${UV})+`}]}],p=`([0-9]_*)+`,m=`([0-9a-fA-F]_*)+`,h={className:`number`,relevance:0,variants:[{match:`\\b(${p})(\\.(${p}))?([eE][+-]?(${p}))?\\b`},{match:`\\b0x(${m})(\\.(${m}))?([pP][+-]?(${p}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e=``)=>({className:`subst`,variants:[{match:AV(/\\/,e,/[0\\tnr"']/)},{match:AV(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_=(e=``)=>({className:`subst`,match:AV(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e=``)=>({className:`subst`,label:`interpol`,begin:AV(/\\/,e,/\(/),end:/\)/}),y=(e=``)=>({begin:AV(e,/"""/),end:AV(/"""/,e),contains:[g(e),_(e),v(e)]}),b=(e=``)=>({begin:AV(e,/"/),end:AV(/"/,e),contains:[g(e),v(e)]}),x={className:`string`,variants:[y(),y(`#`),y(`##`),y(`###`),b(),b(`#`),b(`##`),b(`###`)]},S=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],C={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:S},w=e=>{let t=AV(e,/\//),n=AV(/\//,e);return{begin:t,end:n,contains:[...S,{scope:`comment`,begin:`#(?!.*${n})`,end:/$/}]}},T={scope:`regexp`,variants:[w(`###`),w(`##`),w(`#`),C]},E={match:AV(/`/,qV,/`/)},D=[E,{className:`variable`,match:/\$\d+/},{className:`variable`,match:`\\$${KV}+`}],O=[{match:/(@|#(un)?)available/,scope:`keyword`,starts:{contains:[{begin:/\(/,end:/\)/,keywords:XV,contains:[...f,h,x]}]}},{scope:`keyword`,match:AV(/@/,MV(...YV),kV(MV(/\(/,/\s+/)))},{scope:`meta`,match:AV(/@/,qV)}],k={match:kV(/\b[A-Z]/),relevance:0,contains:[{className:`type`,match:AV(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,KV,`+`)},{className:`type`,match:JV,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:AV(/\s+&\s+/,kV(JV)),relevance:0}]},A={begin:/</,end:/>/,keywords:c,contains:[...r,...l,...O,d,k]};k.contains.push(A);let j={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:[`self`,{match:AV(qV,/\s*:/),keywords:`_|0`,relevance:0},...r,T,...l,...u,...f,h,x,...D,...O,k]},M={begin:/</,end:/>/,keywords:`repeat each`,contains:[...r,k]},N={begin:/\(/,end:/\)/,keywords:c,contains:[{begin:MV(kV(AV(qV,/\s*:/)),kV(AV(qV,/\s+/,qV,/\s*:/))),end:/:/,relevance:0,contains:[{className:`keyword`,match:/\b_\b/},{className:`params`,match:qV}]},...r,...l,...f,h,x,...O,k,j],endsParent:!0,illegal:/["']/},P={match:[/(func|macro)/,/\s+/,MV(E.match,qV,WV)],className:{1:`keyword`,3:`title.function`},contains:[M,N,t],illegal:[/\[/,/%/]},F={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:`keyword`},contains:[M,N,t],illegal:/\[|%/},I={match:[/operator/,/\s+/,WV],className:{1:`keyword`,3:`title`}},L={begin:[/precedencegroup/,/\s+/,JV],className:{1:`keyword`,3:`title`},contains:[k],keywords:[...zV,...RV],end:/}/},R={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:`keyword`,3:`keyword`,5:`title.function`}},z={match:[/class\b/,/\s+/,/var\b/],scope:{1:`keyword`,3:`keyword`}},ee={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,qV,/\s*/],beginScope:{1:`keyword`,3:`title.class`},keywords:c,contains:[M,...l,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:`title.class.inherited`,match:JV},...l],relevance:0}]};for(let e of x.variants){let t=e.contains.find(e=>e.label===`interpol`);t.keywords=c;let n=[...l,...u,...f,h,x,...D];t.contains=[...n,{begin:/\(/,end:/\)/,contains:[`self`,...n]}]}return{name:`Swift`,keywords:c,contains:[...r,P,F,R,z,ee,I,L,{beginKeywords:`import`,end:/$/,contains:[...r],relevance:0},T,...l,...u,...f,h,x,...D,...O,k,j]}}var QV=`[A-Za-z$_][0-9A-Za-z$_]*`,$V=`as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using`.split(`.`),eH=[`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`],tH=`Object.Function.Boolean.Symbol.Math.Date.Number.BigInt.String.RegExp.Array.Float32Array.Float64Array.Int8Array.Uint8Array.Uint8ClampedArray.Int16Array.Int32Array.Uint16Array.Uint32Array.BigInt64Array.BigUint64Array.Set.Map.WeakSet.WeakMap.ArrayBuffer.SharedArrayBuffer.Atomics.DataView.JSON.Promise.Generator.GeneratorFunction.AsyncFunction.Reflect.Proxy.Intl.WebAssembly`.split(`.`),nH=[`Error`,`EvalError`,`InternalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],rH=[`setInterval`,`setTimeout`,`clearInterval`,`clearTimeout`,`require`,`exports`,`eval`,`isFinite`,`isNaN`,`parseFloat`,`parseInt`,`decodeURI`,`decodeURIComponent`,`encodeURI`,`encodeURIComponent`,`escape`,`unescape`],iH=[`arguments`,`this`,`super`,`console`,`window`,`document`,`localStorage`,`sessionStorage`,`module`,`global`],aH=[].concat(rH,tH,nH);function oH(e){let t=e.regex,n=(e,{after:t})=>{let n=`</`+e[0].slice(1);return e.input.indexOf(n,t)!==-1},r=QV,i={begin:`<>`,end:`</>`},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{let r=e[0].length+e.index,i=e.input[r];if(i===`<`||i===`,`){t.ignoreMatch();return}i===`>`&&(n(e,{after:r})||t.ignoreMatch());let a,o=e.input.substring(r);if(a=o.match(/^\s*=/)){t.ignoreMatch();return}if((a=o.match(/^\s+extends\s+/))&&a.index===0){t.ignoreMatch();return}}},s={$pattern:QV,keyword:$V,literal:eH,built_in:aH,"variable.language":iH},c=`[0-9](_?[0-9])*`,l=`\\.(${c})`,u=`0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`,d={className:`number`,variants:[{begin:`(\\b(${u})((${l})|\\.)?|(${l}))[eE][+-]?(${c})\\b`},{begin:`\\b(${u})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:`\\b(0|[1-9](_?[0-9])*)n\\b`},{begin:`\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b`},{begin:`\\b0[bB][0-1](_?[0-1])*n?\\b`},{begin:`\\b0[oO][0-7](_?[0-7])*n?\\b`},{begin:`\\b0[0-7]+n?\\b`}],relevance:0},f={className:`subst`,begin:`\\$\\{`,end:`\\}`,keywords:s,contains:[]},p={begin:".?html`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`xml`}},m={begin:".?css`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`css`}},h={begin:".?gql`",end:``,starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:`graphql`}},g={className:`string`,begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},_={className:`comment`,variants:[e.COMMENT(/\/\*\*(?!\/)/,`\\*/`,{relevance:0,contains:[{begin:`(?=@[A-Za-z]+)`,relevance:0,contains:[{className:`doctag`,begin:`@[A-Za-z]+`},{className:`type`,begin:`\\{`,end:`\\}`,excludeEnd:!0,excludeBegin:!0,relevance:0},{className:`variable`,begin:r+`(?=\\s*(-)|$)`,endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:s,contains:[`self`].concat(v)});let y=[].concat(_,f.contains),b=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:[`self`].concat(y)}]),x={className:`params`,begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},S={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,`(`,t.concat(/\./,r),`)*`)],scope:{1:`keyword`,3:`title.class`,5:`keyword`,7:`title.class.inherited`}},{match:[/class/,/\s+/,r],scope:{1:`keyword`,3:`title.class`}}]},C={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:`title.class`,keywords:{_:[...tH,...nH]}},w={label:`use_strict`,className:`meta`,relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},T={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:`keyword`,3:`title.function`},label:`func.def`,contains:[x],illegal:/%/},E={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:`variable.constant`};function D(e){return t.concat(`(?!`,e.join(`|`),`)`)}let O={match:t.concat(/\b/,D([...rH,`super`,`import`].map(e=>`${e}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:`title.function`,relevance:0},k={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:`prototype`,className:`property`,relevance:0},A={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:`keyword`,3:`title.function`},contains:[{begin:/\(\)/},x]},j=`(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|`+e.UNDERSCORE_IDENT_RE+`)\\s*=>`,M={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:`async`,className:{1:`keyword`,3:`title.function`},contains:[x]};return{name:`JavaScript`,aliases:[`js`,`jsx`,`mjs`,`cjs`],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:C},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:`shebang`,binary:`node`,relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,m,h,g,_,{match:/\$\d+/},d,C,{scope:`attr`,match:r+t.lookahead(`:`),relevance:0},M,{begin:`(`+e.RE_STARTERS_RE+`|\\b(case|return|throw)\\b)\\s*`,keywords:`return throw case`,relevance:0,contains:[_,e.REGEXP_MODE,{className:`function`,begin:j,returnBegin:!0,end:`\\s*=>`,contains:[{className:`params`,variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:`xml`,contains:[{begin:o.begin,end:o.end,skip:!0,contains:[`self`]}]}]},T,{beginKeywords:`while if switch catch for`},{begin:`\\b(?!function)`+e.UNDERSCORE_IDENT_RE+`\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{`,returnBegin:!0,label:`func.def`,contains:[x,e.inherit(e.TITLE_MODE,{begin:r,className:`title.function`})]},{match:/\.\.\./,relevance:0},k,{match:`\\$`+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:`title.function`},contains:[x]},O,E,S,A,{match:/\$[(.]/}]}}function sH(e){let t=e.regex,n=oH(e),r=QV,i=[`any`,`void`,`number`,`boolean`,`string`,`object`,`never`,`symbol`,`bigint`,`unknown`],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:`keyword`,3:`title.class`}},o={beginKeywords:`interface`,end:/\{/,excludeEnd:!0,keywords:{keyword:`interface extends`,built_in:i},contains:[n.exports.CLASS_REFERENCE]},s={className:`meta`,relevance:10,begin:/^\s*['"]use strict['"]/},c={$pattern:QV,keyword:$V.concat([`type`,`interface`,`public`,`private`,`protected`,`implements`,`declare`,`abstract`,`readonly`,`enum`,`override`,`satisfies`]),literal:eH,built_in:aH.concat(i),"variable.language":iH},l={className:`meta`,begin:`@`+r},u=(e,t,n)=>{let r=e.contains.findIndex(e=>e.label===t);if(r===-1)throw Error(`can not find mode to replace`);e.contains.splice(r,1,n)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(l);let d=n.contains.find(e=>e.scope===`attr`),f=Object.assign({},d,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,d,f]),n.contains=n.contains.concat([l,a,o,f]),u(n,`shebang`,e.SHEBANG()),u(n,`use_strict`,s);let p=n.contains.find(e=>e.label===`func.def`);return p.relevance=0,Object.assign(n,{name:`TypeScript`,aliases:[`ts`,`tsx`,`mts`,`cts`]}),n}function cH(e){let t=e.regex,n={className:`string`,begin:/"(""|[^/n])"C\b/},r={className:`string`,begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,c={className:`literal`,variants:[{begin:t.concat(/# */,t.either(a,i),/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,o,/ *#/)},{begin:t.concat(/# */,t.either(a,i),/ +/,t.either(o,s),/ *#/)}]},l={className:`number`,relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:`label`,begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:`doctag`,begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:`Visual Basic .NET`,aliases:[`vb`],case_insensitive:!0,classNameAliases:{label:`symbol`},keywords:{keyword:`addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield`,built_in:`addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort`,type:`boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort`,literal:`true false nothing`},illegal:`//|\\{|\\}|endif|gosub|variant|wend|^\\$ `,contains:[n,r,c,l,u,d,f,{className:`meta`,begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:`const disable else elseif enable end externalsource if region then`},contains:[f]}]}}function lH(e){e.regex;let t=e.COMMENT(/\(;/,/;\)/);t.contains.push(`self`);let n=e.COMMENT(/;;/,/$/),r=`anyfunc,block,br,br_if,br_table,call,call_indirect,data,drop,elem,else,end,export,func,global.get,global.set,local.get,local.set,local.tee,get_global,get_local,global,if,import,local,loop,memory,memory.grow,memory.size,module,mut,nop,offset,param,result,return,select,set_global,set_local,start,table,tee_local,then,type,unreachable`.split(`,`),i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:`keyword`,3:`title.function`}},a={className:`variable`,begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:`punctuation`,relevance:0},s={className:`number`,relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},c={match:/(i32|i64|f32|f64)(?!\.)/,className:`type`},l={className:`keyword`,match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:`WebAssembly`,keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:`keyword`,3:`operator`}},a,o,i,e.QUOTE_STRING_MODE,c,l,s]}}function uH(e){let t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:`symbol`,begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:`keyword`,begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),s=e.inherit(e.APOS_STRING_MODE,{className:`string`}),c=e.inherit(e.QUOTE_STRING_MODE,{className:`string`}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:`attr`,begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:`string`,endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:`HTML, XML`,aliases:[`html`,`xhtml`,`rss`,`atom`,`xjb`,`xsd`,`xsl`,`plist`,`wsf`,`svg`],case_insensitive:!0,unicodeRegex:!0,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,c,s,o,{begin:/\[/,end:/\]/,contains:[{className:`meta`,begin:/<![a-z]/,end:/>/,contains:[a,o,c,s]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:`meta`,end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:`tag`,begin:/<style(?=\s|>)/,end:/>/,keywords:{name:`style`},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:[`css`,`xml`]}},{className:`tag`,begin:/<script(?=\s|>)/,end:/>/,keywords:{name:`script`},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:[`javascript`,`handlebars`,`xml`]}},{className:`tag`,begin:/<>|<\/>/},{className:`tag`,begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:`name`,begin:n,relevance:0,starts:l}]},{className:`tag`,begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:`name`,begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function dH(e){let t=`true false yes no null`,n=`[\\w#;/?:@&=+$,.~*'()[\\]]+`,r={className:`attr`,variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:`template-variable`,variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:`string`,relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:`char.escape`,relevance:0}]},o={className:`string`,relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},s=e.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),c={className:`number`,begin:`\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b`},l={end:`,`,endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},u={begin:/\{/,end:/\}/,contains:[l],illegal:`\\n`,relevance:0},d={begin:`\\[`,end:`\\]`,contains:[l],illegal:`\\n`,relevance:0},f=[r,{className:`meta`,begin:`^---\\s*$`,relevance:10},{className:`string`,begin:`[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*`},{begin:`<%[%=-]?`,end:`[%-]?%>`,subLanguage:`ruby`,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:`type`,begin:`!\\w+!`+n},{className:`type`,begin:`!<`+n+`>`},{className:`type`,begin:`!`+n},{className:`type`,begin:`!!`+n},{className:`meta`,begin:`&`+e.UNDERSCORE_IDENT_RE+`$`},{className:`meta`,begin:`\\*`+e.UNDERSCORE_IDENT_RE+`$`},{className:`bullet`,begin:`-(?=[ ]|$)`,relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},c,{className:`number`,begin:e.C_NUMBER_RE+`\\b`,relevance:0},u,d,a,o],p=[...f];return p.pop(),p.push(s),l.contains=p,{name:`YAML`,case_insensitive:!0,aliases:[`yml`],contains:f}}var fH={arduino:lB,bash:uB,c:dB,cpp:fB,csharp:pB,css:SB,diff:CB,go:wB,graphql:TB,ini:EB,java:MB,javascript:VB,json:HB,kotlin:qB,less:rV,lua:iV,makefile:aV,markdown:oV,objectivec:sV,perl:cV,php:lV,"php-template":uV,plaintext:dV,python:fV,"python-repl":pV,r:mV,ruby:hV,rust:gV,scss:TV,shell:EV,sql:DV,swift:ZV,typescript:sH,vbnet:cH,wasm:lH,xml:uH,yaml:dH},pH=l(o(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},f=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function p(e){return e?typeof e==`string`?e:e.source:null}function m(e){return _(`(?=`,e,`)`)}function h(e){return _(`(?:`,e,`)*`)}function g(e){return _(`(?:`,e,`)?`)}function _(...e){return e.map(e=>p(e)).join(``)}function v(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function y(...e){return`(`+(v(e).capture?``:`?:`)+e.map(e=>p(e)).join(`|`)+`)`}function b(e){return RegExp(e.toString()+`|`).exec(``).length-1}function x(e,t){let n=e&&e.exec(t);return n&&n.index===0}var S=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function C(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=p(e),i=``;for(;r.length>0;){let e=S.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var w=/\b\B/,T=`[a-zA-Z]\\w*`,E=`[a-zA-Z_]\\w*`,D=`\\b\\d+(\\.\\d+)?`,O=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,k=`\\b(0b[01]+)`,A=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,j=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=_(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},M={begin:`\\\\[\\s\\S]`,relevance:0},N={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[M]},P={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[M]},F={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},I=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=y(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:_(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},L=I(`//`,`$`),R=I(`/\\*`,`\\*/`),z=I(`#`,`$`),ee={scope:`number`,begin:D,relevance:0},te={scope:`number`,begin:O,relevance:0},B={scope:`number`,begin:k,relevance:0},V={scope:`regexp`,begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[M,{begin:/\[/,end:/\]/,relevance:0,contains:[M]}]},H={scope:`title`,begin:T,relevance:0},ne={scope:`title`,begin:E,relevance:0},re={begin:`\\.\\s*`+E,relevance:0},ie=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:M,BINARY_NUMBER_MODE:B,BINARY_NUMBER_RE:k,COMMENT:I,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:L,C_NUMBER_MODE:te,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:T,MATCH_NOTHING_RE:w,METHOD_GUARD:re,NUMBER_MODE:ee,NUMBER_RE:D,PHRASAL_WORDS_MODE:F,QUOTE_STRING_MODE:P,REGEXP_MODE:V,RE_STARTERS_RE:A,SHEBANG:j,TITLE_MODE:H,UNDERSCORE_IDENT_RE:E,UNDERSCORE_TITLE_MODE:ne});function ae(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function oe(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function se(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=ae,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ce(e,t){Array.isArray(e.illegal)&&(e.illegal=y(...e.illegal))}function le(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function ue(e,t){e.relevance===void 0&&(e.relevance=1)}var U=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=_(n.beforeMatch,m(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},de=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],fe=`keyword`;function pe(e,t,n=fe){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,pe(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,me(n[0],n[1])]})}}function me(e,t){return t?Number(t):he(e)?0:1}function he(e){return de.includes(e.toLowerCase())}var ge={},_e=e=>{console.error(e)},ve=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ye=(e,t)=>{ge[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ge[`${e}/${t}`]=!0)},be=Error();function xe(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=b(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function Se(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw _e(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),be;if(typeof e.beginScope!=`object`||e.beginScope===null)throw _e(`beginScope must be object`),be;xe(e,e.begin,{key:`beginScope`}),e.begin=C(e.begin,{joinWith:``})}}function Ce(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw _e(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),be;if(typeof e.endScope!=`object`||e.endScope===null)throw _e(`endScope must be object`),be;xe(e,e.end,{key:`endScope`}),e.end=C(e.end,{joinWith:``})}}function we(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Te(e){we(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),Se(e),Ce(e)}function Ee(e){function t(t,n){return new RegExp(p(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=b(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(C(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[oe,le,Te,U].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[se,ce,ue].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=pe(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=p(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Oe(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function De(e){return e?e.endsWithParent||De(e.starts):!1}function Oe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:De(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var ke=`11.11.1`,Ae=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},je=i,Me=a,Ne=Symbol(`nomatch`),Pe=7,Fe=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:f};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=N(n[1]);return t||(ve(s.replace(`{}`,n[1])),ve(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||N(e))}function p(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(ye(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),ye(`10.7.0`,`Please use highlight(code, options) instead.
|
|
1931
1931
|
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};z(`before:highlight`,a);let o=a.result?a.result:v(a.language,a.code,n);return o.code=a.code,z(`after:highlight`,o),o}function v(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!A.keywords){M.addText(P);return}let e=0;A.keywordPatternRe.lastIndex=0;let t=A.keywordPatternRe.exec(P),n=``;for(;t;){n+=P.substring(e,t.index);let r=D.case_insensitive?t[0].toLowerCase():t[0],i=u(A,r);if(i){let[e,a]=i;if(M.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Pe&&(F+=a),e.startsWith(`_`))n+=t[0];else{let n=D.classNameAliases[e]||e;m(t[0],n)}}else n+=t[0];e=A.keywordPatternRe.lastIndex,t=A.keywordPatternRe.exec(P)}n+=P.substring(e),M.addText(n)}function f(){if(P===``)return;let e=null;if(typeof A.subLanguage==`string`){if(!t[A.subLanguage]){M.addText(P);return}e=v(A.subLanguage,P,!0,j[A.subLanguage]),j[A.subLanguage]=e._top}else e=S(P,A.subLanguage.length?A.subLanguage:null);A.relevance>0&&(F+=e.relevance),M.__addSublanguage(e._emitter,e.language)}function p(){A.subLanguage==null?d():f(),P=``}function m(e,t){e!==``&&(M.startScope(t),M.addText(e),M.endScope())}function h(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=D.classNameAliases[e[n]]||e[n],i=t[n];r?m(i,r):(P=i,d(),P=``),n++}}function g(e,t){return e.scope&&typeof e.scope==`string`&&M.openNode(D.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(P,D.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),P=``):e.beginScope._multi&&(h(e.beginScope,t),P=``)),A=Object.create(e,{parent:{value:A}}),A}function _(e,t,n){let i=x(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return _(e.parent,t,n)}function y(e){return A.matcher.regexIndex===0?(P+=e[0],1):(R=!0,0)}function b(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return y(t);return n.skip?P+=t:(n.excludeBegin&&(P+=t),p(),!n.returnBegin&&!n.excludeBegin&&(P=t)),g(n,e),n.returnBegin?0:t.length}function C(e){let t=e[0],r=n.substring(e.index),i=_(A,e,r);if(!i)return Ne;let a=A;A.endScope&&A.endScope._wrap?(p(),m(t,A.endScope._wrap)):A.endScope&&A.endScope._multi?(p(),h(A.endScope,e)):a.skip?P+=t:(a.returnEnd||a.excludeEnd||(P+=t),p(),a.excludeEnd&&(P=t));do A.scope&&M.closeNode(),!A.skip&&!A.subLanguage&&(F+=A.relevance),A=A.parent;while(A!==i.parent);return i.starts&&g(i.starts,e),a.returnEnd?0:t.length}function w(){let e=[];for(let t=A;t!==D;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>M.openNode(e))}let T={};function E(t,r){let a=r&&r[0];if(P+=t,a==null)return p(),0;if(T.type===`begin`&&r.type===`end`&&T.index===r.index&&a===``){if(P+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=T.rule,t}return 1}if(T=r,r.type===`begin`)return b(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(A.scope||`<unnamed>`)+`"`);throw e.mode=A,e}else if(r.type===`end`){let e=C(r);if(e!==Ne)return e}if(r.type===`illegal`&&a===``)return P+=`
|
|
1932
|
-
`,1;if(L>1e5&&L>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw _e(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=Ee(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,I=0,L=0,R=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){L++,R?R=!1:A.matcher.considerAll(),A.matcher.lastIndex=I;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(I,e.index),e);I=e.index+t}E(n.substring(I))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:je(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:I,context:n.slice(I-100,I+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:je(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:je(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(z(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Ae(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),z(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Me(l,e)}let E=()=>{k(),ye(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),ye(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}if(document.readyState===`loading`){O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(_e(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)_e(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function I(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function L(e){I(e),a.push(e)}function R(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function z(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ee(e){return ye(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),ye(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ee,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Me,addPlugin:L,removePlugin:R}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=ke,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ie)typeof ie[e]==`object`&&n(ie[e]);return Object.assign(e,ie),e},Ie=Fe({});Ie.newInstance=()=>Fe({}),t.exports=Ie,Ie.HighlightJS=Ie,Ie.default=Ie}))()).default,gH={},_H=`hljs-`;function vH(e){let t=hH.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||gH,a=typeof i.prefix==`string`?i.prefix:_H;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:yH,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||gH).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var yH=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},bH={};function xH(e){let t=e||bH,n=t.aliases,r=t.detect||!1,i=t.languages||mH,a=t.plainText,o=t.prefix,s=t.subset,c=`hljs`,l=vH(i);if(n&&l.registerAlias(n),o){let e=o.indexOf(`-`);c=e===-1?o:o.slice(0,e)}return function(e,t){PF(e,`element`,function(e,n,i){if(e.tagName!==`code`||!i||i.type!==`element`||i.tagName!==`pre`)return;let u=SH(e);if(u===!1||!u&&!r||u&&a&&a.includes(u))return;Array.isArray(e.properties.className)||(e.properties.className=[]),e.properties.className.includes(c)||e.properties.className.unshift(c);let d=eB(e,{whitespace:`pre`}),f;try{f=u?l.highlight(u,d,{prefix:o}):l.highlightAuto(d,{prefix:o,subset:s})}catch(n){let r=n;if(u&&/Unknown language/.test(r.message)){t.message("Cannot highlight as `"+u+"`, it’s not registered",{ancestors:[i,e],cause:r,place:e.position,ruleId:`missing-language`,source:`rehype-highlight`});return}throw r}!u&&f.data&&f.data.language&&e.properties.className.push(`language-`+f.data.language),f.children.length>0&&(e.children=f.children)})}}function SH(e){let t=e.properties.className,n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){let e=String(t[n]);if(e===`no-highlight`||e===`nohighlight`)return!1;!r&&e.slice(0,5)===`lang-`&&(r=e.slice(5)),!r&&e.slice(0,9)===`language-`&&(r=e.slice(9))}return r}var CH=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],wH={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...CH,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...CH],h2:[[`className`,`sr-only`]],img:[...CH,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...CH,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...CH],table:[...CH],ul:[...CH,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},TH={}.hasOwnProperty;function EH(e,t){let n={type:`root`,children:[]},r=DH({schema:t?{...wH,...t}:wH,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function DH(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return OH(e,n);case`doctype`:return kH(e,n);case`element`:return AH(e,n);case`root`:return jH(e,n);case`text`:return MH(e,n);default:}}}function OH(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return zH(r,t),r}}function kH(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return zH(e,t),e}}function AH(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=NH(e,t.children),i=PH(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&TH.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return zH(o,t),o}function jH(e,t){let n={type:`root`,children:NH(e,t.children)};return zH(n,t),n}function MH(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return zH(n,t),n}function NH(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=DH(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function PH(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&TH.call(r,n)?r[n]:void 0,o=r&&TH.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(TH.call(s,l)){let t=s[l],n=FH(e,BH(a,l),l,t);n??=FH(e,BH(o,l),l,t),n!=null&&(c[l]=n)}if(i&&TH.call(i,n)){let e=i[n];for(l in e)TH.call(e,l)&&!TH.call(c,l)&&(c[l]=e[l])}return c}function FH(e,t,n,r){return t?Array.isArray(r)?IH(e,t,n,r):LH(e,t,n,r):void 0}function IH(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=LH(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function LH(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&RH(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function RH(e,t,n){let r=e.schema.protocols&&TH.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function zH(e,t){let n=qA(t);t.data&&(e.data=yF(t.data)),n&&(e.position=n)}function BH(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function VH(e){return function(t){return EH(t,e)}}function HH(){return typeof document>`u`?`dark`:(nE[document.documentElement.getAttribute(`data-theme`)||`nord`]?.type??`dark`)===`light`?`default`:`dark`}function UH({chart:e}){let t=(0,W.useRef)(null),n=`mermaid-${(0,W.useId)().replace(/[^a-zA-Z0-9]/g,``)}`,[r,i]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let r=!1;if(t.current)return(async()=>{try{let a=(await J(async()=>{let{default:e}=await import(`./mermaid.core-ClMOD6O3.js`);return{default:e}},__vite__mapDeps([101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]))).default;a.initialize({startOnLoad:!1,securityLevel:`strict`,theme:HH()});let{svg:o,bindFunctions:s}=await a.render(n,e);if(r||!t.current)return;t.current.innerHTML=o,s?.(t.current),i(null)}catch(e){r||i(e instanceof Error?e.message:String(e))}})(),()=>{r=!0}},[e,n]),r?(0,G.jsxs)(`div`,{className:`mermaid-error`,children:[(0,G.jsxs)(`div`,{className:`mermaid-error-note`,children:[`Failed to render diagram: `,r]}),(0,G.jsx)(`pre`,{children:(0,G.jsx)(`code`,{children:e})})]}):(0,G.jsx)(`div`,{className:`mermaid`,ref:t,role:`img`,"aria-label":`Mermaid diagram`})}var WH=[Fz,Rz],GH=[[VH,{...wH,protocols:{...wH.protocols,href:[...wH.protocols?.href??[],`file`,`file-mention`]}}],[xH,{ignoreMissing:!0,plainText:[`mermaid`,`suggestion`]}]];function KH(e){return e.startsWith(`file://`)||e.startsWith(`file-mention://`)?e:II(e)}function qH(e){return e==null||e===!1||e===!0?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(qH).join(``):(0,W.isValidElement)(e)?qH(e.props.children):``}function JH(e){return typeof e==`string`?/language-([\w-]+)/.exec(e)?.[1]??null:null}var YH={pre({children:e}){let t=JH((0,W.isValidElement)(e)?e.props.className:void 0);return t===`mermaid`?(0,G.jsx)(UH,{chart:qH(e).replace(/\n$/,``)}):t===`suggestion`?null:(0,G.jsx)(`pre`,{children:e})},a({href:e,children:t}){return typeof e==`string`&&e.startsWith(`file-mention://`)?(0,G.jsx)(`span`,{className:`mention-file`,title:e.slice(15),children:t}):(0,G.jsx)(`a`,{href:e,...typeof e==`string`&&/^https?:\/\//.test(e)?{target:`_blank`,rel:`noopener noreferrer`}:{},children:t})}};function XH({content:e,className:t}){return(0,G.jsx)(`div`,{className:t,children:(0,G.jsx)(MI,{remarkPlugins:WH,rehypePlugins:GH,urlTransform:KH,components:YH,children:e})})}function ZH(e,t){let n=e.slice(0,t);for(let e=t-1;e>=0;e--){let t=n[e];if(t===`@`){if(e===0||/\s/.test(n[e-1])){let t=n.slice(e+1);if(!/\s/.test(t))return{atStart:e,query:t}}return null}if(t===`
|
|
1933
|
-
`)return null}return null}function QH(e,t){let n=(0,W.useRef)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(0),[s,c]=(0,W.useState)(0),l=(0,W.useRef)(0),u=(0,W.useCallback)(e=>{n.current=e},[]);(0,W.useEffect)(()=>{let t=n.current;if(!t)return;let r=t.selectionStart;l.current=r;let a=ZH(e,r);if(i(a),a){o(0);let n=parseFloat(getComputedStyle(t).lineHeight)||20,i=(e.slice(0,r).match(/\n/g)||[]).length;c((parseFloat(getComputedStyle(t).paddingTop)||0)+(i+1)*n+4)}},[e]);let d=r?.query??``,f=nt({queryKey:[`file-mention`,d],enabled:r!==null,placeholderData:V,staleTime:5e3,queryFn:async({signal:e})=>{let t=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},signal:e,body:JSON.stringify({scope:`files`,query:d})});if(!t.ok)throw Error(`Search failed (${t.status})`);return await t.json()}}),p=f.data?.items??[],m=r!==null&&(p.length>0||f.isFetching),h=(0,W.useCallback)(a=>{if(!r)return;let o=n.current;if(!o)return;let s=e.slice(0,r.atStart),c=e.slice(l.current),u=`@${a} `;t(s+u+c),i(null),requestAnimationFrame(()=>{o.selectionStart=o.selectionEnd=(s+u).length,o.focus()})},[r,e,t]),g=(0,W.useCallback)(e=>{if(!m)return!1;if(e.key===`ArrowDown`){e.preventDefault();let t=p.length;return t>0&&o(e=>(e+1)%t),!0}if(e.key===`ArrowUp`){e.preventDefault();let t=p.length;return t>0&&o(e=>e===0?t-1:e-1),!0}return(e.key===`Enter`||e.key===`Tab`)&&p[a]?(e.preventDefault(),h(p[a].path),!0):e.key===`Escape`?(e.preventDefault(),i(null),!0):!1},[m,p,a,h]),_=(0,W.useCallback)(e=>h(e),[h]);return{isOpen:m,results:p,focusedIndex:a,query:d,isFetching:f.isFetching,cursorTop:s,handleKeyDown:g,onSelect:_,setFocusedIndex:o,setTextareaRef:u}}function $H(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.toLowerCase(),i=[],a=0;for(let e=0;e<r.length&&a<n.length;e++)if(r[e]===n[a]){let t=i[i.length-1];t&&t[1]===e?t[1]=e+1:i.push([e,e+1]),a++}return a===n.length?i:[]}function eU({text:e,ranges:t}){if(!t.length)return(0,G.jsx)(G.Fragment,{children:e});let n=[],r=0;return t.forEach(([t,i],a)=>{t>r&&n.push(e.slice(r,t)),n.push((0,G.jsx)(`mark`,{className:`mention-highlight`,children:e.slice(t,i)},a)),r=i}),r<e.length&&n.push(e.slice(r)),(0,G.jsx)(G.Fragment,{children:n})}var tU=e=>{let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t+1)},nU=e=>{let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)};function rU({results:e,focusedIndex:t,query:n,cursorTop:r,onSelect:i,onHover:a}){let o=(0,W.useRef)(null);return(0,W.useEffect)(()=>{(o.current?.querySelector(`[data-focused="true"]`))?.scrollIntoView({block:`nearest`})},[t]),e.length===0?null:(0,G.jsx)(`div`,{className:`mention-dropdown`,ref:o,role:`listbox`,"aria-label":`File suggestions`,style:{top:r},children:e.map((e,r)=>{let o=nU(e.path),s=$H(o,n),c=r===t;return(0,G.jsxs)(`div`,{role:`option`,"aria-selected":c,"data-focused":c,className:`mention-item ${c?`mention-item-focused`:``}`,onMouseDown:t=>{t.preventDefault(),i(e.path)},onMouseEnter:()=>a(r),children:[(0,G.jsx)(`span`,{className:`mention-icon`,children:(0,G.jsx)(YD,{size:13})}),(0,G.jsxs)(`div`,{className:`mention-info`,children:[(0,G.jsx)(`span`,{className:`mention-name`,children:(0,G.jsx)(eU,{text:o,ranges:s})}),(0,G.jsx)(`span`,{className:`mention-dir`,children:tU(e.path)||`./`})]})]},e.path)})})}function iU(e){return e.replace(/@([^\s@]+)/g,(e,t)=>`[${t.split(`/`).pop()||t}](file-mention://${t})`)}function aU({id:e,value:t,onChange:n,placeholder:r,rows:i=3,ariaLabel:a,textareaClassName:o,onSubmitShortcut:s}){let[c,l]=(0,W.useState)(`write`),u=(0,W.useRef)(null),d=(0,W.useRef)(null),f=QH(t,n),p=(0,W.useRef)(t);(0,W.useEffect)(()=>{p.current=t},[t]),(0,W.useEffect)(()=>{c===`preview`&&d.current?.focus()},[c]);let m=async e=>{let r=e.clipboardData.items,i=null;for(let e=0;e<r.length;e++){let t=r[e];if(t.kind===`file`&&t.type.startsWith(`image/`)){i=t.getAsFile();break}}if(!i)return;e.preventDefault();let a=u.current;if(!a)return;let o=a.selectionStart,s=a.selectionEnd,c=Math.random().toString(36).slice(2,8),l=`![Uploading image… ${c}]()`,d=t.slice(0,o)+l+t.slice(s);n(d),p.current=d;try{let e=new FormData;e.append(`file`,i,i.name||`pasted-${c}.png`);let t=await fetch(`/api/attachments`,{method:`POST`,body:e});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(!r.url)throw Error(r.error||`Upload failed`);n(p.current.replace(l,``))}catch(e){console.error(`Image upload failed:`,e),n(p.current.replace(l,`![upload failed]()`))}};return(0,G.jsxs)(`div`,{className:`md-field`,children:[(0,G.jsxs)(`div`,{className:`comment-form-tabs`,role:`tablist`,"aria-label":`Markdown editor mode`,children:[(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`write`,onClick:()=>l(`write`),onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),l(`preview`))},className:`comment-form-tab-btn ${c===`write`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Write`}),(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`preview`,onClick:()=>l(`preview`),onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),l(`write`))},className:`comment-form-tab-btn ${c===`preview`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Preview`})]}),c===`write`?(0,G.jsxs)(`div`,{style:{position:`relative`},children:[(0,G.jsx)(`textarea`,{id:e,ref:e=>{u.current=e,f.setTextareaRef(e)},className:o,value:t,rows:i,placeholder:r,"aria-label":a,onChange:e=>n(e.target.value),onPaste:m,onKeyDown:e=>{f.handleKeyDown(e)||(e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),s?.()),e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),l(e=>e===`write`?`preview`:`write`)))}}),f.isOpen&&(0,G.jsx)(rU,{results:f.results,focusedIndex:f.focusedIndex,query:f.query,cursorTop:f.cursorTop,onSelect:f.onSelect,onHover:f.setFocusedIndex})]}):(0,G.jsx)(`div`,{ref:d,className:`md-field-preview markdown-body`,role:`tabpanel`,"aria-label":`Markdown preview`,tabIndex:0,onKeyDown:e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),l(`write`))},children:t.trim()?(0,G.jsx)(XH,{content:iU(t)}):(0,G.jsx)(`span`,{className:`md-field-empty`,children:`Nothing to preview`})})]})}var oU=[{value:`approved`,label:`Approve`,description:`The changes look good — the agent can proceed.`,icon:ND,className:`plan-verdict-approve`},{value:`changes-requested`,label:`Request edits`,description:`The agent should address the comments and apply edits.`,icon:lO,className:`plan-verdict-changes`},{value:`rejected`,label:`Reject`,description:`Don't keep building on this — the approach needs rethinking.`,icon:MO,className:`plan-verdict-reject`},{value:`comment-only`,label:`Comment only`,description:`Agent must NOT edit files — only reply to comments. General note goes to chat.`,icon:uO,className:`plan-verdict-comment-only`}];function sU({comments:e,onEditComment:t,onDeleteComment:n,onSend:r,sending:i,agentWaiting:a,onCopyComments:o}){let{haptic:s,sound:c}=dD(),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(!1),_=async()=>{o&&(await o(),g(!0),setTimeout(()=>g(!1),2e3))},v=e.length,y=(0,W.useMemo)(()=>[...e].sort((e,t)=>e.createdAt-t.createdAt),[e]),b=async()=>{p&&(s(`heavy`),c(`send`),await r(p,d,p===`comment-only`?`comment-only`:`standard`),f(``),m(null),u(!1))};return(0,G.jsx)(Sk,{open:l,onOpenChange:u,ariaLabel:`Submit your review to the agent`,className:`send-review-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:i,title:a?`An agent is connected and waiting`:`Submit your review to a waiting agent`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[a&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),(0,G.jsx)(MD,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:i?`Sending…`:v>0?`Send to agent (${v})`:`Send to agent`})]}),children:(0,G.jsxs)(`div`,{className:`srp`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[(0,G.jsx)(MD,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:`Send review to agent`}),(0,G.jsxs)(`span`,{className:`srp-count`,children:[v,` comment`,v===1?``:`s`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:oU.map(e=>{let t=e.icon,n=p===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>m(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),v>0?(0,G.jsx)(`ul`,{className:`srp-list`,"aria-label":`Comments to send`,children:y.map(e=>(0,G.jsx)(cU,{comment:e,onEdit:t,onDelete:n},e.id))}):(0,G.jsx)(`p`,{className:`srp-empty`,children:`No inline comments — your verdict and overall note will be sent on their own.`}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`srp-general-input`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(aU,{id:`srp-general-input`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the agent that applies to the whole review…`,rows:3,ariaLabel:`Overall review comment`,onSubmitShortcut:b})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[o&&(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:_,disabled:v===0,style:{marginRight:`auto`},children:h?`Copied!`:`Copy comments`}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>u(!1),disabled:i,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:b,disabled:!p||i,children:i?`Sending…`:`Send review`})]})]})})}function cU({comment:e,onEdit:t,onDelete:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(e.body),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{r&&(s.current?.focus(),s.current?.select())},[r]);let c=e.lineNumber>0?e.startLineNumber&&e.startLineNumber!==e.lineNumber?`:${e.startLineNumber}-${e.lineNumber}`:`:${e.lineNumber}`:` · file`,l=()=>{let n=a.trim();n&&n!==e.body&&t(e.id,n),i(!1)};return(0,G.jsxs)(`li`,{className:`srp-item`,children:[(0,G.jsxs)(`div`,{className:`srp-item-top`,children:[(0,G.jsxs)(`span`,{className:`srp-item-loc`,children:[(0,G.jsx)(`span`,{className:`srp-item-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`srp-item-line`,children:c})]}),e.status===`resolved`&&(0,G.jsx)(`span`,{className:`srp-item-resolved`,children:`resolved`}),(0,G.jsxs)(`span`,{className:`srp-item-actions`,children:[r?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:l,title:`Save edit`,children:(0,G.jsx)(ND,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>{o(e.body),i(!1)},title:`Cancel edit`,children:(0,G.jsx)(MO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>i(!0),title:`Edit comment`,children:(0,G.jsx)(_O,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn srp-icon-btn-danger`,onClick:()=>n(e.id),title:`Remove from review`,children:(0,G.jsx)(DO,{size:13,"aria-hidden":`true`})})]})]}),e.lineContent?.trim()&&(0,G.jsx)(`code`,{className:`srp-item-code`,children:e.lineContent.trim().slice(0,160)}),r?(0,G.jsx)(`textarea`,{ref:s,className:`srp-item-edit`,value:a,rows:2,onChange:e=>o(e.target.value),onKeyDown:t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),l()):t.key===`Escape`&&(t.preventDefault(),o(e.body),i(!1))}}):(0,G.jsx)(`p`,{className:`srp-item-body`,children:e.body})]})}var lU=[{value:`word`,label:`Word`},{value:`word-alt`,label:`Word (alt)`},{value:`char`,label:`Character`},{value:`none`,label:`None`}],uU=[{value:`classic`,label:`Classic (+/−)`},{value:`bars`,label:`Bars`},{value:`none`,label:`None`}],dU=[{value:`line-info`,label:`Line info + context`},{value:`line-info-basic`,label:`Line info`},{value:`metadata`,label:`Metadata only`},{value:`simple`,label:`Simple`}],fU=[{value:`both`,label:`Both`},{value:`line`,label:`Line only`},{value:`number`,label:`Number only`},{value:`disabled`,label:`Disabled`}],pU=[11,12,13,14,15,16].map(e=>({value:String(e),label:`${e}px`})),mU=[2,4,8].map(e=>({value:String(e),label:String(e)})),hU=[{value:``,label:`Default`},{value:`chrome`,label:`Chrome`},{value:`firefox`,label:`Firefox`},{value:`edge`,label:`Edge`},{value:`brave`,label:`Brave`}],gU=[{value:`default`,label:`Default / System`},{value:`vscode`,label:`VS Code`},{value:`zed`,label:`Zed`},{value:`vim`,label:`Vim`},{value:`neovim`,label:`Neovim`}],_U=(0,W.memo)(function({repoName:e,branch:t,fileCount:n,additions:r,deletions:i,commentCount:a,planCount:o,pendingPlanCount:s,onOpenPlans:c,diffStyle:l,diffOptions:u,defaultTabSize:d,browser:f,theme:p,editorIDE:m,customMode:h,showMode:g,showCommitCount:_,lineDiffType:v,lineWrap:y,diffIndicators:b,showLineNumbers:x,hunkSeparators:S,lineHoverHighlight:C,fontSize:w,haptics:T,sounds:E,uiFont:D,monoFont:O,onDiffStyleChange:k,onDiffOptionsChange:A,onDefaultTabSizeChange:j,onBrowserChange:M,onOpenThemeModal:N,onEditorIDEChange:P,onLineDiffTypeChange:F,onLineWrapChange:I,onDiffIndicatorsChange:L,onShowLineNumbersChange:R,onHunkSeparatorsChange:z,onLineHoverHighlightChange:ee,onFontSizeChange:te,onHapticsChange:B,onSoundsChange:V,onOpenUiFontModal:H,onOpenMonoFontModal:ne,onOpenSearch:re,onCopyComments:ie,onSendToAgent:ae,agentWaiting:oe,sending:se,comments:ce,onEditComment:le,onDeleteComment:ue,sidebarCollapsed:U,onToggleSidebar:de}){let[fe,pe]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`,`||e.code===`Comma`)&&(e.preventDefault(),pe(e=>!e))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,G.jsxs)(`div`,{className:`toolbar`,children:[(0,G.jsxs)(`div`,{className:`toolbar-left`,children:[de&&(0,G.jsx)(`button`,{className:`toolbar-mobile-toggle`,onClick:de,"aria-label":`Toggle sidebar`,title:U?`Open sidebar`:`Close sidebar`,children:(0,G.jsx)(oO,{size:18})}),(0,G.jsx)(`h1`,{className:`toolbar-title`,children:e}),t&&(0,G.jsxs)(`span`,{className:`toolbar-branch`,children:[(0,G.jsx)(XD,{size:12}),t]}),(0,G.jsx)(`span`,{className:`toolbar-stat`,children:g?(0,G.jsxs)(G.Fragment,{children:[`showing`,` `,(0,G.jsx)(`strong`,{className:`toolbar-stat-count`,children:_}),` `,`commit`,_===1?``:`s`]}):(0,G.jsxs)(G.Fragment,{children:[n,` file`,n===1?``:`s`,` changed`,r>0&&(0,G.jsxs)(`span`,{className:`stat-additions`,children:[` +`,r]}),i>0&&(0,G.jsxs)(`span`,{className:`stat-deletions`,children:[` -`,i]})]})})]}),(0,G.jsxs)(`div`,{className:`toolbar-right`,children:[(0,G.jsxs)(`button`,{className:`btn btn-sm toolbar-search-btn`,onClick:re,title:`Search (⌘K)`,children:[(0,G.jsx)(CO,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{children:`Search`}),(0,G.jsx)(`kbd`,{className:`toolbar-search-kbd`,children:`⌘K`})]}),o>0&&(0,G.jsxs)(`button`,{className:`btn btn-sm toolbar-plans-btn ${s>0?`toolbar-plans-btn-pending`:``}`,onClick:c,title:s>0?`${s} plan${s===1?``:`s`} awaiting your review`:`Review agent plans`,children:[s>0&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),(0,G.jsx)(HD,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{children:`Plans`}),s>0&&(0,G.jsx)(`span`,{className:`toolbar-plans-badge`,children:s})]}),(0,G.jsx)(Sk,{open:fe,onOpenChange:pe,ariaLabel:`Settings`,className:`settings-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn ${fe?`btn-active`:``}`,title:`Settings`,children:[(0,G.jsx)(wO,{size:14}),` `,(0,G.jsx)(`span`,{className:`btn-label`,children:`Settings`})]}),children:(0,G.jsxs)(`div`,{className:`popover-scroll settings-panel`,children:[!h&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Source`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:u.staged,onChange:e=>A({...u,staged:e.target.checked})}),`Show staged`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:u.untracked,onChange:e=>A({...u,untracked:e.target.checked})}),`Show untracked`]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Display`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Inline diff`}),(0,G.jsx)(FA,{value:v,onValueChange:e=>F(e),options:lU,ariaLabel:`Inline diff style`})]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>I(e.target.checked)}),`Wrap long lines`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Diff indicators`}),(0,G.jsx)(FA,{value:b,onValueChange:e=>L(e),options:uU,ariaLabel:`Diff indicators`})]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>R(e.target.checked)}),`Show line numbers`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hunk separator`}),(0,G.jsx)(FA,{value:S,onValueChange:e=>z(e),options:dU,ariaLabel:`Hunk separator style`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hover highlight`}),(0,G.jsx)(FA,{value:C,onValueChange:e=>ee(e),options:fU,ariaLabel:`Hover highlight`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Font size`}),(0,G.jsx)(FA,{value:String(w),onValueChange:e=>te(Number(e)),options:pU,ariaLabel:`Font size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Default tab size`}),(0,G.jsx)(FA,{value:String(d),onValueChange:e=>j(Number(e)),options:mU,ariaLabel:`Default tab size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`UI font`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),H()},style:{display:`inline-flex`,alignItems:`center`},title:D??`Default (Geist Mono)`,children:[(0,G.jsx)(kO,{size:13,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{style:{maxWidth:`120px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:D??`Default…`})]})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Code font`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),ne()},style:{display:`inline-flex`,alignItems:`center`},title:O??`Default (JetBrains Mono)`,children:[(0,G.jsx)(kO,{size:13,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{style:{maxWidth:`120px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:O??`Default…`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`External tools`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Browser`}),(0,G.jsx)(FA,{value:f||``,onValueChange:M,options:hU,ariaLabel:`Browser`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Preferred IDE`}),(0,G.jsx)(FA,{value:m||`default`,onValueChange:P,options:gU,ariaLabel:`Preferred IDE`})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Review Options`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Diff style`}),(0,G.jsx)(FA,{value:l,onValueChange:e=>k(e),options:[{value:`split`,label:`Split`},{value:`unified`,label:`Unified`}],ariaLabel:`Diff style`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Theme`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),N()},style:{display:`inline-flex`,alignItems:`center`},children:[(0,G.jsx)(pO,{size:14,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{children:`Switch Theme...`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Feedback`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>B(e.target.checked)}),`Haptic feedback`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>V(e.target.checked)}),`Sound effects`]})]})}),(0,G.jsx)(sU,{comments:ce,onEditComment:le,onDeleteComment:ue,onSend:ae,sending:se,agentWaiting:oe,onCopyComments:ie})]})]})});function vU({commit:e,index:t,total:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let c=async()=>{try{await navigator.clipboard.writeText(e.sha),i(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>i(!1),1500)}catch{}},l=e.body.trim().length>0,u=e.parents.length>1,d=n>1?`Commit ${t+1} of ${n}: ${e.subject}`:`Commit: ${e.subject}`;return(0,G.jsxs)(`section`,{className:`commit-banner`,"aria-label":d,children:[(0,G.jsxs)(`header`,{className:`commit-banner-header`,children:[(0,G.jsxs)(`div`,{className:`commit-banner-line`,children:[(0,G.jsx)(ZD,{size:14,className:`commit-banner-icon`,"aria-hidden":`true`}),(0,G.jsxs)(`button`,{type:`button`,className:`commit-banner-sha`,onClick:c,title:r?`Copied full SHA`:`Click to copy full SHA`,"aria-label":`Copy full SHA ${e.sha}`,children:[(0,G.jsx)(`span`,{className:`commit-banner-sha-text`,children:e.shortSha}),r?(0,G.jsx)(ND,{size:12,className:`commit-banner-sha-icon`,"aria-hidden":`true`}):(0,G.jsx)(GD,{size:12,className:`commit-banner-sha-icon`,"aria-hidden":`true`})]}),u&&(0,G.jsx)(`span`,{className:`commit-banner-merge-badge`,title:`Merge commit with ${e.parents.length} parents`,children:`merge`}),(0,G.jsx)(`h2`,{className:`commit-banner-subject`,children:e.subject})]}),(0,G.jsxs)(`div`,{className:`commit-banner-meta`,children:[(0,G.jsxs)(`span`,{className:`commit-banner-author`,children:[(0,G.jsx)(`span`,{className:`commit-banner-author-name`,children:e.authorName}),(0,G.jsxs)(`span`,{className:`commit-banner-author-email`,children:[`<`,e.authorEmail,`>`]})]}),(0,G.jsx)(`span`,{className:`commit-banner-date`,title:e.authorDate,children:yU(e.authorDate)}),e.committerName!==e.authorName||e.committerEmail!==e.authorEmail?(0,G.jsxs)(`span`,{className:`commit-banner-committer`,title:`Committed by ${e.committerName} <${e.committerEmail}> at ${e.committerDate}`,children:[(0,G.jsx)(`span`,{className:`commit-banner-committer-label`,children:`committed by`}),` `,(0,G.jsx)(`span`,{children:e.committerName})]}):null]})]}),l&&(0,G.jsxs)(`div`,{className:`commit-banner-body`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`commit-banner-body-toggle`,onClick:()=>o(e=>!e),"aria-expanded":a,"aria-controls":`commit-banner-body-${e.shortSha}`,children:[a?(0,G.jsx)(PD,{size:14}):(0,G.jsx)(ID,{size:14}),(0,G.jsx)(YD,{size:13,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:a?`Hide message`:`Show message`})]}),a&&(0,G.jsx)(`pre`,{id:`commit-banner-body-${e.shortSha}`,className:`commit-banner-body-pre`,children:e.body})]})]})}function yU(e){try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}var bU=W.createContext(void 0);function xU(e){let t=W.useContext(bU);if(e===!1&&t===void 0)throw Error(j_(27));return t}var SU={...yT,...lT},CU=W.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=xU(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`),u=o.useState(`transitionStatus`);return tS(`div`,e,{state:W.useMemo(()=>({open:s,transitionStatus:u}),[s,u]),ref:[o.context.backdropRef,t],stateAttributesMapping:SU,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),wU=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),TU=function(e){return e[e.open=uT.open]=`open`,e[e.closed=uT.closed]=`closed`,e[e.startingStyle=uT.startingStyle]=`startingStyle`,e[e.endingStyle=uT.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),EU=W.createContext(void 0);function DU(){let e=W.useContext(EU);if(e===void 0)throw Error(j_(26));return e}var OU={...yT,...lT,nestedDialogOpen(e){return e?{[TU.nestedDialogOpen]:``}:null}},kU=W.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=xU(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);DU(),hw({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=h>0,w=tS(`div`,e,{state:W.useMemo(()=>({open:g,nested:m,transitionStatus:y,nestedDialogOpen:C}),[g,m,y,C]),props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){_k.has(e.key)&&e.stopPropagation()},style:{[wU.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:OU});return(0,G.jsx)(xS,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:w})}),AU=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=xU(),a=i.useState(`mounted`),o=i.useState(`modal`);return a||n?(0,G.jsx)(EU.Provider,{value:n,children:(0,G.jsxs)(uS,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(sk,{ref:i.context.internalBackdropRef,inert:ZT(!open)}),e.children]})}):null});function jU(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l,reset:u}=qO(i);vw(t);let{forceUnmount:d}=yw(i,t,()=>{u()}),f=X(e=>{let n=ox(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),p=W.useCallback(()=>{t.setOpen(!1,f(ix))},[t,f]);W.useImperativeHandle(r,()=>({unmount:d,close:p}),[d,p]);let m=Ew({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[h,g]=W.useState(0),_=h===0,v=Xw(m),y=LC(m,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=zv(e);if(_&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Rv(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:_});BO(i&&o===!0,s);let{getReferenceProps:b,getFloatingProps:x,getTriggerProps:S}=zw([v,y]);t.useContextCallback(`onNestedDialogOpen`,e=>{g(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{g(0)}),W.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(h),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,h]);let C=W.useMemo(()=>b(l),[b,l]),w=W.useMemo(()=>S(l),[S,l]),T=W.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:m,nestedOpenDialogCount:h})}var MU={...Cw,modal:Z(e=>e.modal),nested:Z(e=>e.nested),nestedOpenDialogCount:Z(e=>e.nestedOpenDialogCount),disablePointerDismissal:Z(e=>e.disablePointerDismissal),openMethod:Z(e=>e.openMethod),descriptionElementId:Z(e=>e.descriptionElementId),titleElementId:Z(e=>e.titleElementId),viewportElement:Z(e=>e.viewportElement),role:Z(e=>e.role)},NU=class extends uw{constructor(e){super(PU(e),{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),triggerElements:new bw,onOpenChange:void 0,onOpenChangeComplete:void 0},MU)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function PU(e={}){return{...Sw(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function FU(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=xU(!0),p=!!f,m=F_(()=>l?.store??new NU({open:n??r,activeTriggerId:u===void 0?d:u,modal:s,disablePointerDismissal:o,nested:p})).current;m.useControlledProp(`open`,n,r),m.useControlledProp(`activeTriggerId`,u,d),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);jU({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=W.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(bU.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}function IU({open:e,onClose:t,className:n,ariaLabel:r,initialFocus:i,onKeyDown:a,children:o}){return(0,G.jsx)(FU,{open:e,onOpenChange:e=>{e||t()},children:(0,G.jsxs)(AU,{children:[(0,G.jsx)(CU,{className:`ui-modal-backdrop`}),(0,G.jsx)(kU,{className:`ui-modal-popup ${n??``}`,"aria-label":r,initialFocus:i,onKeyDown:a,children:o})]})})}async function LU(e,t){let n=await fetch(`/api/file-text?path=${encodeURIComponent(e)}&version=${t}`);if(!n.ok){if(n.status===404)return null;throw Error(`HTTP ${n.status} fetching ${t} ${e}`)}let r=await n.json();if(r.missing)return null;if(r.error)throw Error(r.error);return r.content??``}function RU(e,t){let[n,r]=(0,W.useState)({loading:!1,error:null,oldContent:null,newContent:null});return(0,W.useEffect)(()=>{if(!t||!e)return;let n=!1;return r(e=>({...e,loading:!0,error:null})),Promise.all([LU(e,`old`),LU(e,`new`)]).then(([e,t])=>{n||r({loading:!1,error:null,oldContent:e,newContent:t})}).catch(e=>{n||r({loading:!1,error:e.message,oldContent:null,newContent:null})}),()=>{n=!0}},[e,t]),n}var zU=`diffing-draft-`,BU=10080*60*1e3;function VU(...e){return zU+e.join(`:`)}function HU(...e){try{let t=mD(VU(...e));if(!t)return null;let n=JSON.parse(t);return Date.now()-n.timestamp>BU?(yD(VU(...e)),null):n.body}catch{return null}}var UU={};function WU(e,...t){let n=VU(...t);UU[n]&&clearTimeout(UU[n]),UU[n]=setTimeout(()=>{GU(e,...t),delete UU[n]},500)}function GU(e,...t){let n=VU(...t);try{e.trim()?vD(n,JSON.stringify({body:e,timestamp:Date.now()})):yD(n)}catch{}}function KU(...e){try{yD(VU(...e))}catch{}}function qU(e){return e.replace(/@([^\s@]+)/g,(e,t)=>`[${t.split(`/`).pop()||t}](file-mention://${t})`)}function JU({initialBody:e,lineContent:t,draftKey:n,onSubmit:r,onCancel:i}){let{haptic:a,sound:o}=dD(),[s,c]=(0,W.useState)(()=>{if(n){let e=HU(n);if(e)return e}return e||``}),[l,u]=(0,W.useState)(`write`),d=(0,W.useRef)(null),f=(0,W.useRef)(null),p=QH(s,c);(0,W.useEffect)(()=>{l===`write`?d.current?.focus():f.current?.focus()},[l]),(0,W.useEffect)(()=>{n&&WU(s,n)},[s,n]);let m=()=>{let e=s.trim();e&&(n&&KU(n),a(`success`),o(`success`),r(e))},h=e=>{if(!p.handleKeyDown(e)&&(e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m()),e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),u(e=>e===`write`?`preview`:`write`)),e.key===`Escape`)){if(s.includes(`
|
|
1934
|
-
`))return;i()}},g=async e=>{let t=e.clipboardData.items,n=null;for(let e=0;e<t.length;e++){let r=t[e];if(r.kind===`file`&&r.type.startsWith(`image/`)){n=r.getAsFile();break}}if(!n)return;e.preventDefault();let r=d.current;if(!r)return;let i=r.selectionStart,a=r.selectionEnd,o=Math.random().toString(36).slice(2,8),s=`![Uploading image… ${o}]()`,l=r.value;c(l.slice(0,i)+s+l.slice(a));try{let e=new FormData;e.append(`file`,n,n.name||`pasted-${o}.png`);let t=await fetch(`/api/attachments`,{method:`POST`,body:e});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(!r.url)throw Error(r.error||`Upload failed`);let i=``;c(e=>e.replace(s,i))}catch(e){console.error(`Image upload failed:`,e),c(e=>e.replace(s,`![upload failed]()`))}};return(0,G.jsxs)(`div`,{className:`comment-form`,style:{padding:`16px`},role:`form`,"aria-label":`Comment form`,children:[(0,G.jsxs)(`div`,{className:`comment-form-tabs`,role:`tablist`,"aria-label":`Comment form mode`,children:[(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":l===`write`,"aria-controls":`comment-write-panel`,onClick:()=>u(`write`),onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),u(`preview`))},className:`comment-form-tab-btn ${l===`write`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Write`}),(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":l===`preview`,"aria-controls":`comment-preview-panel`,onClick:()=>u(`preview`),onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),u(`write`))},className:`comment-form-tab-btn ${l===`preview`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Preview`})]}),l===`write`?(0,G.jsxs)(`div`,{style:{position:`relative`},children:[(0,G.jsx)(`textarea`,{id:`comment-write-panel`,ref:e=>{d.current=e,p.setTextareaRef(e)},value:s,onChange:e=>c(e.target.value),onKeyDown:h,onPaste:g,placeholder:`Leave a review comment (supports Markdown and Pasting Clipboard Images)...`,rows:4,"aria-label":`Comment body`,style:{minHeight:`100px`}}),p.isOpen&&(0,G.jsx)(rU,{results:p.results,focusedIndex:p.focusedIndex,query:p.query,cursorTop:p.cursorTop,onSelect:p.onSelect,onHover:p.setFocusedIndex})]}):(0,G.jsxs)(`div`,{id:`comment-preview-panel`,ref:f,role:`tabpanel`,"aria-label":`Preview`,tabIndex:0,onKeyDown:e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),u(`write`))},style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:[(()=>{let e=!!s.match(/```suggestion\n([\s\S]*?)```/);return s.replace(/```suggestion\n([\s\S]*?)```/g,``).trim().length>0||!e?(0,G.jsx)(`div`,{className:`comment-preview markdown-body`,style:{minHeight:`100px`,padding:`12px 16px`,border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,background:`var(--bg-primary)`,fontSize:`14px`,lineHeight:1.6,color:`var(--text-primary)`,overflowY:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflowWrap:`break-word`},children:s.trim()?(0,G.jsx)(XH,{content:qU(s)}):(0,G.jsx)(`span`,{style:{color:`var(--text-muted)`,fontStyle:`italic`},children:`Nothing to preview`})}):null})(),(()=>{let e=s.match(/```suggestion\n([\s\S]*?)```/),n=!!e,r=e?e[1].trimEnd():``;return n?(0,G.jsxs)(`div`,{className:`suggestion-card`,style:{border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,overflow:`hidden`,background:`var(--bg-primary)`,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsx)(`div`,{className:`suggestion-header`,style:{padding:`8px 12px`,background:`var(--bg-secondary)`,borderBottom:`1px solid var(--border-normal)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:`12px`,fontWeight:600},children:(0,G.jsx)(`span`,{style:{color:`var(--text-secondary)`},children:`Suggested Change Preview`})}),(0,G.jsxs)(`div`,{className:`suggestion-diff`,style:{display:`flex`,flexDirection:`column`,fontSize:`12px`,fontFamily:`var(--font-mono)`,overflowX:`auto`},children:[t&&(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-danger-bg)`,borderBottom:`1px dashed var(--border-color)`,color:`var(--feedback-danger-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`-`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:t})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-success-bg)`,color:`var(--feedback-success-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`+`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:r})]})]})]}):null})()]}),(0,G.jsxs)(`div`,{className:`comment-form-actions`,style:{display:`flex`,justifyContent:`flex-end`,gap:`8px`,marginTop:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:i,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:m,disabled:!s.trim(),children:e?`Save`:`Comment`})]})]})}function YU({role:e,size:t=16}){return e===`agent`?(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-agent`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(MD,{size:t,"aria-hidden":`true`})}):(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-user`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(jO,{size:t,"aria-hidden":`true`})})}function XU({comment:e,onDelete:t}){let[,n]=(0,W.useState)(0),{resolveComment:r,unresolveComment:i,addReply:a,removeReply:o,editReply:s,applySuggestion:c,editComment:l}=xE(),u=e.status===`resolved`,[d,f]=(0,W.useState)(u),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),x=(0,W.useRef)(null),S=e.body.replace(/```suggestion\n([\s\S]*?)```/g,``).trim().length>0;(0,W.useEffect)(()=>{f(e.status===`resolved`)},[e.status]),(0,W.useEffect)(()=>{let e=setInterval(()=>n(e=>e+1),3e4);return()=>clearInterval(e)},[]);let C=()=>r(e.id),w=()=>i(e.id),T=e=>{b(e)},E=t=>{o(e.id,t)};return u&&d?(0,G.jsxs)(`div`,{className:`comment-resolved-collapsed`,style:{padding:`12px 18px`,margin:`14px 20px`,background:`var(--bg-secondary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-md)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,opacity:.85,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,fontSize:`13px`,color:`var(--text-muted)`},children:[(0,G.jsx)(zD,{size:16,style:{color:`var(--success)`}}),(0,G.jsx)(`span`,{style:{fontWeight:600},children:`Conversation resolved`}),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`2px 6px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`2px 6px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]}),(0,G.jsx)(`span`,{children:`•`}),(0,G.jsx)(`span`,{children:e.replies?.length>0?`${e.replies.length+1} comments`:`1 comment`})]}),(0,G.jsx)(`button`,{style:{background:`none`,border:`none`,color:`var(--primary)`,fontSize:`12px`,fontWeight:600,cursor:`pointer`},onClick:()=>f(!1),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f(!1))},"aria-label":`Show resolved conversation`,children:`Show resolved`})]}):h?(0,G.jsx)(`div`,{className:`comment-bubble-canvas`,id:`comment-${e.id}`,role:`article`,"aria-label":`Edit comment`,children:(0,G.jsxs)(`div`,{className:`comment-node`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(YU,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`1px 5px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`1px 5px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]})]})]}),(0,G.jsx)(`div`,{style:{marginTop:`8px`},children:(0,G.jsx)(JU,{draftKey:`edit:${e.id}`,initialBody:e.body,lineContent:e.lineContent,onSubmit:t=>{l(e.id,t),g(!1)},onCancel:()=>g(!1)})})]})]})}):(0,G.jsxs)(`div`,{className:`comment-bubble-canvas ${u?`comment-bubble-canvas-resolved`:``}`,id:`comment-${e.id}`,role:`article`,"aria-label":e.lineNumber===0?`File-level comment`:`Comment by user on line ${e.lineNumber}`,children:[(0,G.jsxs)(`div`,{className:`comment-node ${u?`comment-node-resolved`:``}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(YU,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`1px 5px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`1px 5px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]})]}),u&&(0,G.jsxs)(`span`,{className:`comment-canvas-resolved-banner`,style:{marginLeft:`8px`},children:[(0,G.jsx)(zD,{size:13}),`Resolved`]}),!u&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{ref:x,className:`comment-node-btn`,onClick:()=>g(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(!0))},title:`Edit comment`,"aria-label":`Edit comment`,tabIndex:0,children:(0,G.jsx)(_O,{size:13,"aria-hidden":`true`})}),_?(0,G.jsxs)(`div`,{className:`comment-delete-confirm`,style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsxs)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>t(e.id),title:`Confirm delete`,"aria-label":`Confirm delete comment`,style:{color:`var(--danger)`,background:`var(--feedback-danger-bg)`,fontWeight:600,fontSize:`11px`,borderRadius:`var(--radius-sm)`,border:`1px solid var(--feedback-danger-border)`,padding:`2px 6px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`2px`,width:`auto`,height:`auto`},children:[(0,G.jsx)(OO,{size:11}),`Delete?`]}),(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>v(!1),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(!1))},title:`Cancel delete`,"aria-label":`Cancel delete`,style:{fontSize:`11px`,padding:`2px 6px`,width:`auto`,height:`auto`},children:`Cancel`})]}):(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>v(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(!0))},title:`Delete comment`,"aria-label":`Delete comment`,tabIndex:0,children:(0,G.jsx)(DO,{size:13,"aria-hidden":`true`})})]})]}),S&&(0,G.jsx)(XH,{content:e.body,className:`comment-node-body markdown-body ${u?`comment-resolved-line`:``}`}),(()=>{let t=e.body.match(/```suggestion\n([\s\S]*?)```/),n=!!t&&e.side===`additions`,r=t?t[1].trimEnd():``;return n?(0,G.jsxs)(`div`,{className:`suggestion-card`,style:{marginTop:`12px`,marginBottom:`4px`,border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,overflow:`hidden`,background:`var(--bg-primary)`,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsxs)(`div`,{className:`suggestion-header`,style:{padding:`8px 12px`,background:`var(--bg-secondary)`,borderBottom:`1px solid var(--border-normal)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:`12px`,fontWeight:600},children:[(0,G.jsx)(`span`,{style:{color:`var(--text-secondary)`},children:`Suggested Change`}),u?(0,G.jsxs)(`span`,{style:{color:`var(--feedback-success-text)`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsx)(zD,{size:12}),` Applied`]}):(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:async()=>{try{await c(e.id)}catch(e){alert(e.message)}},style:{fontSize:`11px`,padding:`2px 8px`,borderRadius:`var(--radius-sm)`,height:`24px`},children:`Apply Suggestion`})]}),(0,G.jsxs)(`div`,{className:`suggestion-diff`,style:{display:`flex`,flexDirection:`column`,fontSize:`12px`,fontFamily:`var(--font-mono)`,overflowX:`auto`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-danger-bg)`,borderBottom:`1px dashed var(--border-color)`,color:`var(--feedback-danger-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`-`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:e.lineContent})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-success-bg)`,color:`var(--feedback-success-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`+`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:r})]})]})]}):null})()]})]}),e.replies?.length>0&&(0,G.jsx)(`div`,{className:`comment-replies`,role:`list`,"aria-label":`Replies`,children:e.replies.map((t,n)=>{let r=t.role===`agent`,i=y===t.id;return(0,G.jsxs)(`div`,{className:`comment-node ${r?`comment-node-agent`:`comment-node-user`} ${u?`comment-node-resolved`:``}`,role:`listitem`,"aria-label":`${r?`Agent`:`User`} reply ${n+1}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(YU,{role:r?`agent`:`user`,size:14})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:r?`Agent`:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge ${r?`comment-node-badge-agent`:`comment-node-badge-user`}`,children:r?`Agent`:`User`}),r&&t.model&&(0,G.jsx)(`span`,{style:{fontSize:`10px`,fontWeight:600,padding:`1px 5px`,borderRadius:`4px`,background:`var(--bg-tertiary)`,color:`var(--text-secondary)`,fontFamily:`var(--font-mono)`},children:t.model}),(0,G.jsx)(`span`,{className:`comment-node-time`,children:eE(t.createdAt)}),!u&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>T(t.id),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),T(t.id))},title:`Edit reply`,"aria-label":`Edit reply`,tabIndex:0,children:(0,G.jsx)(_O,{size:12,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>E(t.id),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),E(t.id))},title:`Delete reply`,"aria-label":`Delete reply`,tabIndex:0,children:(0,G.jsx)(DO,{size:12,"aria-hidden":`true`})})]})]}),i?(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`6px`},children:(0,G.jsx)(JU,{draftKey:`reply-edit:${e.id}:${t.id}`,initialBody:t.body,onSubmit:n=>{s(e.id,t.id,n),b(null)},onCancel:()=>b(null)})}):(0,G.jsx)(XH,{content:t.body,className:`comment-node-body markdown-body`})]})]},t.id)})}),(0,G.jsxs)(`div`,{className:`comment-canvas-footer`,children:[!p&&(0,G.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,G.jsxs)(`button`,{onClick:()=>m(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),m(!0))},className:`comment-reply-trigger`,"aria-label":`Write a reply`,tabIndex:0,style:{width:`100%`,maxWidth:`320px`},children:[(0,G.jsx)(bO,{size:14,"aria-hidden":`true`}),`Reply...`]}),u?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,marginLeft:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:()=>f(!0),style:{fontSize:`12px`,padding:`4px 10px`},"aria-label":`Hide resolved conversation`,children:`Hide`}),(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:w,style:{fontSize:`12px`,padding:`4px 10px`},"aria-label":`Unresolve conversation`,children:`Unresolve`})]}):(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:C,style:{fontSize:`12px`,padding:`4px 10px`,marginLeft:`12px`},"aria-label":`Resolve conversation`,children:`Resolve conversation`})]}),p&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`4px`},children:(0,G.jsx)(JU,{draftKey:`reply:${e.id}`,onSubmit:t=>{a(e.id,t),m(!1)},onCancel:()=>{m(!1),x.current?.focus()}})})]})]})}var ZU=(0,W.memo)(function({id:e,fileDiff:t,filePath:n,annotations:r,diffStyle:i,tabSize:a,viewed:o,theme:s,editorIDE:c,lineDiffType:l,lineWrap:u,diffIndicators:d,showLineNumbers:f,hunkSeparators:p,lineHoverHighlight:m,fontSize:h,monoFontFamily:g,expandContextByDefault:_,collapsedContextThreshold:v,expansionLineCount:y,onViewedChange:b,onAddComment:x,onDeleteComment:S}){let[C,w]=(0,W.useState)(null),[T,E]=(0,W.useState)(null),[D,O]=(0,W.useState)(0),[k,A]=(0,W.useState)(null),[j,M]=(0,W.useState)(!1),[N,P]=(0,W.useState)(o),[F,I]=(0,W.useState)(!1),[L,R]=(0,W.useState)(!1),[z,ee]=(0,W.useState)(_),[te,B]=(0,W.useState)(null),[V,H]=(0,W.useState)(null),[ne,re]=(0,W.useState)(null),ie=(0,W.useRef)(null),ae=e=>{e.stopPropagation(),!(typeof navigator>`u`||!navigator.clipboard)&&navigator.clipboard.writeText(n).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)},()=>{})},oe=async(e,t=!1)=>{if(te===null&&!(!t&&typeof window<`u`&&!window.confirm(`Revert hunk #${e+1} in ${n}? This rewrites the file via "git apply --reverse".`))){B(e),H(null);try{let t=await fetch(`/api/revert-hunk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:n,hunkIndex:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}}catch(e){H(e.message)}finally{B(null)}}},se=t.type===`change`||t.type===`rename-changed`,ce=!N&&se,{loading:le,oldContent:ue,newContent:U}=RU(n,z&&ce),de=z&&ue!==null&&U!==null,fe=t.prevName??n;(0,W.useEffect)(()=>{P(o)},[o]);let pe=nE[s]||nE.nord,me=(0,W.useMemo)(()=>$U(a,h,g),[a,h,g]),he=(e,n,r)=>{let i=r&&r!==n?r:n,a=n,o=[];for(let n=i;n<=a;n++){let r=e===`additions`?t.additionLines:t.deletionLines,i=e===`additions`?`additionStart`:`deletionStart`,a=e===`additions`?`additionCount`:`deletionCount`,s=e===`additions`?`additionLineIndex`:`deletionLineIndex`,c=!1;for(let e of t.hunks){let t=e[i],l=e[a];if(n>=t&&n<t+l){let i=e[s]+(n-t);o.push(r[i]??``),c=!0;break}}c||o.push(``)}return o.join(`
|
|
1935
|
-
`)},ge=async e=>{if(e.stopPropagation(),t.type!==`deleted`){I(!0);try{await fetch(`/api/open-file`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:n,editor:c})})}catch(e){console.error(`Failed to open file in IDE editor:`,e)}finally{I(!1)}}},_e=()=>{switch(t.type){case`new`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-new`,children:`Added`});case`deleted`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-deleted`,children:`Deleted`});case`rename-pure`:case`rename-changed`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-renamed`,children:`Renamed`});default:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-modified`,children:`Modified`})}},ve=r.filter(e=>e.lineNumber===0),ye=r.filter(e=>e.lineNumber>0),be=e=>`_pending`in e.metadata?(0,G.jsx)(JU,{draftKey:`new:${n}:${C.side}:${C.startLineNumber||C.lineNumber}:${C.lineNumber}`,lineContent:he(C.side,C.lineNumber,C.startLineNumber),onSubmit:e=>{let t=he(C.side,C.lineNumber,C.startLineNumber);x(n,C.side,C.lineNumber,t,e,C.startLineNumber),w(null),E(null)},onCancel:()=>{w(null),E(null)}}):(0,G.jsx)(XU,{comment:e.metadata,onDelete:S}),xe=e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&w({side:t.side,lineNumber:t.lineNumber})},children:`+`}),Se=[...ye,...C?[{side:C.side,lineNumber:C.lineNumber,metadata:{_pending:!0}}]:[]];return(0,G.jsxs)(`div`,{ref:ie,className:`file-diff-card ${o?`file-diff-viewed`:``} ${N?`file-diff-collapsed`:``}`,id:e,children:[(0,G.jsxs)(`div`,{className:`file-diff-card-header`,onClick:()=>P(!N),children:[(0,G.jsxs)(`div`,{className:`file-diff-header-left`,children:[(0,G.jsx)(`span`,{className:`file-diff-collapse-indicator`,children:N?(0,G.jsx)(ID,{size:14}):(0,G.jsx)(PD,{size:14})}),(0,G.jsx)(`span`,{className:`file-diff-name`,title:n,children:n}),(0,G.jsx)(`button`,{className:`file-diff-copy-path-btn`,onClick:ae,title:`Copy file path to clipboard`,"aria-label":`Copy file path to clipboard`,children:j?(0,G.jsx)(ND,{size:12}):(0,G.jsx)(GD,{size:12})}),_e(),ye.length>0&&(0,G.jsxs)(`span`,{className:`file-diff-comment-badge`,title:`${ye.length} inline comment${ye.length===1?``:`s`}`,children:[(0,G.jsx)(uO,{size:10}),ye.length]}),D>0&&(0,G.jsxs)(`span`,{className:`file-diff-selection-badge`,"aria-live":`polite`,children:[D,` line`,D===1?``:`s`,` selected`]}),j&&(0,G.jsx)(`span`,{className:`file-diff-permalink-flash`,role:`status`,children:`Copied path`}),k&&(0,G.jsxs)(`span`,{className:`file-diff-permalink-flash`,role:`status`,children:[`Copied `,k]})]}),(0,G.jsxs)(`div`,{className:`file-diff-header-right`,onClick:e=>e.stopPropagation(),children:[ce&&(0,G.jsxs)(`button`,{className:`file-diff-edit-btn ${z?`btn-active`:``}`,onClick:()=>ee(e=>!e),disabled:le,title:z?`Hide unchanged context (use original patch render)`:`Load full file so unchanged context becomes expandable`,children:[le?(0,G.jsx)(iO,{size:11,className:`spin`}):(0,G.jsx)(aO,{size:11}),(0,G.jsx)(`span`,{children:le?`Loading…`:z?`Hide Context`:`Expand Context`})]}),t.type!==`deleted`&&(0,G.jsxs)(`button`,{className:`file-diff-edit-btn`,onClick:ge,disabled:F,title:`Open and edit full file locally`,children:[(0,G.jsx)(gO,{size:11}),(0,G.jsx)(`span`,{children:F?`Opening...`:`Edit File`})]}),(0,G.jsxs)(`button`,{className:`file-diff-edit-btn`,onClick:()=>{P(!1),R(!0)},title:`Comment on this entire file`,children:[(0,G.jsx)(uO,{size:11}),(0,G.jsx)(`span`,{children:`Add Comment`})]}),(0,G.jsxs)(`label`,{className:`viewed-label ${o?`viewed-checked`:``}`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>b(n,e.target.checked)}),`Viewed`]})]})]}),!N&&t.hunks.length>0&&(0,G.jsxs)(`div`,{className:`file-diff-hunk-actions`,onClick:e=>e.stopPropagation(),children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,G.jsx)(`span`,{className:`file-diff-hunk-actions-label`,style:{display:`inline-flex`,alignItems:`center`,gap:`4px`},children:`Selective Revert`}),(0,G.jsx)($T,{content:`Selective Revert lets you preview and undo specific blocks of changes (hunks) in this file using 'git apply --reverse'.`,side:`top`,children:(0,G.jsx)(BD,{size:12,style:{color:`var(--text-muted)`,cursor:`help`}})}),(0,G.jsx)(`span`,{style:{color:`var(--text-muted)`,fontSize:`11px`,margin:`0 4px`},children:`·`}),(0,G.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`11px`},children:[t.hunks.length,` block`,t.hunks.length===1?``:`s`,` available`]})]}),(0,G.jsx)(`div`,{className:`file-diff-hunk-actions-buttons`,children:t.hunks.map((e,t)=>(0,G.jsxs)(`button`,{type:`button`,className:`file-diff-hunk-revert-btn`,onClick:()=>re(t),disabled:te!==null,title:`Preview and revert hunk #${t+1} (lines @${e.additionStart}+${e.additionLines??e.additionCount})`,children:[te===t?(0,G.jsx)(iO,{size:10,className:`spin`}):(0,G.jsx)(AO,{size:10}),(0,G.jsxs)(`span`,{children:[`Hunk #`,t+1]})]},t))}),V&&(0,G.jsxs)(`span`,{className:`file-diff-hunk-error`,role:`alert`,children:[(0,G.jsx)(RD,{size:11}),V]})]}),ne!==null&&(()=>{let e=t.hunks[ne];if(!e)return null;let r=t.deletionLines.slice(e.deletionLineIndex,e.deletionLineIndex+(e.deletionCount??e.deletionLines??0)),i=t.additionLines.slice(e.additionLineIndex,e.additionLineIndex+(e.additionStart!==void 0&&e.additionLines!==void 0?e.additionLines:e.additionCount??0));return(0,G.jsxs)(IU,{open:ne!==null,onClose:()=>re(null),className:`hunk-revert-modal`,ariaLabel:`Selective Revert Preview Hunk #${ne+1}`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(AO,{size:18,className:`shortcuts-icon`}),(0,G.jsxs)(`h2`,{children:[`Revert Hunk #`,ne+1]})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:()=>re(null),"aria-label":`Close dialog`,children:(0,G.jsx)(MO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,children:[(0,G.jsxs)(`div`,{className:`hunk-preview-intro`,children:[`Reverting this hunk will restore the deleted (`,(0,G.jsx)(`span`,{style:{color:`var(--feedback-danger-text)`,fontWeight:600},children:`red`}),`) lines and remove the added (`,(0,G.jsx)(`span`,{style:{color:`var(--feedback-success-text)`,fontWeight:600},children:`green`}),`) lines from `,(0,G.jsx)(`strong`,{children:n.split(`/`).pop()}),`.`]}),(0,G.jsxs)(`div`,{className:`hunk-preview-container`,children:[(0,G.jsxs)(`div`,{className:`hunk-preview-header`,children:[(0,G.jsx)(`span`,{children:n}),(0,G.jsxs)(`span`,{children:[`Lines: @-`,e.deletionStart,`,`,e.deletionCount??e.deletionLines??0,` @+`,e.additionStart,`,`,e.additionLines??e.additionCount??0]})]}),(0,G.jsxs)(`div`,{className:`hunk-preview-code`,children:[r.map((e,t)=>(0,G.jsxs)(`div`,{className:`hunk-preview-line hunk-preview-line-deletion`,children:[(0,G.jsx)(`span`,{className:`hunk-preview-sign`,children:`-`}),(0,G.jsx)(`span`,{className:`hunk-preview-text`,children:e})]},`del-${t}`)),i.map((e,t)=>(0,G.jsxs)(`div`,{className:`hunk-preview-line hunk-preview-line-addition`,children:[(0,G.jsx)(`span`,{className:`hunk-preview-sign`,children:`+`}),(0,G.jsx)(`span`,{className:`hunk-preview-text`,children:e})]},`add-${t}`)),r.length===0&&i.length===0&&(0,G.jsx)(`div`,{className:`hunk-preview-line`,style:{fontStyle:`italic`,color:`var(--text-muted)`},children:`No changes in this hunk.`})]})]}),(0,G.jsx)(QU,{filePath:n,deletionStart:e.deletionStart,deletionCount:e.deletionCount??e.deletionLines??0})]}),(0,G.jsxs)(`div`,{className:`modal-footer`,children:[(0,G.jsx)(`button`,{className:`hunk-revert-btn-secondary`,onClick:()=>re(null),children:`Cancel`}),(0,G.jsx)(`button`,{className:`hunk-revert-btn-primary`,onClick:async()=>{let e=ne;re(null),await oe(e,!0)},children:`Revert Changes`})]})]})})(),!N&&(0,G.jsxs)(`div`,{className:`file-diff-card-body`,children:[(ve.length>0||L)&&(0,G.jsxs)(`div`,{className:`file-level-comments-section`,style:{margin:`16px 20px`,padding:`12px`,background:`rgba(255,255,255,0.02)`,border:`1px solid var(--border-color)`,borderRadius:`8px`,display:`flex`,flexDirection:`column`,gap:`12px`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,fontSize:`13px`,fontWeight:600,color:`var(--text-secondary)`},children:[(0,G.jsx)(uO,{size:14}),(0,G.jsxs)(`span`,{children:[`File-Level Comments (`,ve.length,`)`]})]}),ve.length>0&&(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:ve.map(e=>(0,G.jsx)(XU,{comment:e.metadata,onDelete:S},e.metadata.id))}),L&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`6px`,border:`1px solid var(--border-color)`},children:(0,G.jsx)(JU,{draftKey:`file-comment:${n}`,lineContent:``,onSubmit:e=>{x(n,`additions`,0,``,e),R(!1)},onCancel:()=>R(!1)})})]}),de?(0,G.jsx)(Xg,{oldFile:{name:fe,contents:ue??``},newFile:{name:n,contents:U??``},options:{diffStyle:i,enableGutterUtility:!0,enableLineSelection:!0,disableFileHeader:!0,lineDiffType:l,overflow:u?`wrap`:`scroll`,diffIndicators:d,disableLineNumbers:!f,hunkSeparators:p,lineHoverHighlight:m,expandUnchanged:!1,collapsedContextThreshold:v,expansionLineCount:y,onLineSelectionStart:()=>{E(null),O(0)},onLineSelectionChange:e=>{O(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{O(0),e&&(E(e),w({side:e.endSide||`additions`,lineNumber:e.end,startLineNumber:e.start}))},onLineNumberClick:e=>{let t=`${n}:${e.annotationSide===`deletions`?`-`:`+`}${e.lineNumber}`;navigator.clipboard?.writeText(t).then(()=>{A(t),setTimeout(()=>A(null),1600)},()=>{})},theme:{dark:pe.type===`dark`?pe.themeName:`nord`,light:pe.type===`light`?pe.themeName:`github-light`},themeType:pe.type,unsafeCSS:me},selectedLines:T,lineAnnotations:Se,renderHeaderMetadata:()=>null,renderAnnotation:be,renderGutterUtility:xe}):(0,G.jsx)(Yg,{fileDiff:t,options:{diffStyle:i,enableGutterUtility:!0,enableLineSelection:!0,disableFileHeader:!0,lineDiffType:l,overflow:u?`wrap`:`scroll`,diffIndicators:d,disableLineNumbers:!f,hunkSeparators:p,lineHoverHighlight:m,onLineSelectionStart:()=>{E(null),O(0)},onLineSelectionChange:e=>{O(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{O(0),e&&(E(e),w({side:e.endSide||`additions`,lineNumber:e.end,startLineNumber:e.start}))},onLineNumberClick:e=>{let t=`${n}:${e.annotationSide===`deletions`?`-`:`+`}${e.lineNumber}`;navigator.clipboard?.writeText(t).then(()=>{A(t),setTimeout(()=>A(null),1600)},()=>{})},theme:{dark:pe.type===`dark`?pe.themeName:`nord`,light:pe.type===`light`?pe.themeName:`github-light`},themeType:pe.type,unsafeCSS:me},selectedLines:T,lineAnnotations:Se,renderHeaderMetadata:()=>null,renderAnnotation:e=>`_pending`in e.metadata?(0,G.jsx)(JU,{draftKey:`new:${n}:${C.side}:${C.startLineNumber||C.lineNumber}:${C.lineNumber}`,lineContent:he(C.side,C.lineNumber,C.startLineNumber),onSubmit:e=>{let t=he(C.side,C.lineNumber,C.startLineNumber);x(n,C.side,C.lineNumber,t,e,C.startLineNumber),w(null),E(null)},onCancel:()=>{w(null),E(null)}}):(0,G.jsx)(XU,{comment:e.metadata,onDelete:S}),renderGutterUtility:e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&w({side:t.side,lineNumber:t.lineNumber})},children:`+`})})]})]})});function QU({filePath:e,deletionStart:t,deletionCount:n}){let[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(null);if((0,W.useEffect)(()=>{let r=!0;return(async()=>{o(!0),c(null);try{let a=new URLSearchParams({filePath:e,deletionStart:String(t),deletionCount:String(n)}),o=await fetch(`/api/hunk-history?${a}`);if(!o.ok)throw Error(`HTTP ${o.status}`);let s=await o.json();r&&i(s)}catch(e){r&&c(e.message||`Failed to fetch hunk history`)}finally{r&&o(!1)}})(),()=>{r=!1}},[e,t,n]),a)return(0,G.jsxs)(`div`,{className:`hunk-history-loading`,children:[(0,G.jsx)(iO,{size:14,className:`spin`,style:{marginRight:`8px`}}),(0,G.jsx)(`span`,{children:`Loading git history & origin blame…`})]});if(s)return(0,G.jsxs)(`div`,{className:`hunk-history-error`,children:[(0,G.jsx)(RD,{size:14,style:{color:`var(--feedback-danger-text)`,marginRight:`8px`}}),(0,G.jsxs)(`span`,{children:[`Failed to load git history: `,s]})]});if(!r)return null;let l=Array.from(new Map(r.blame.map(e=>[e.commit,e])).values());return(0,G.jsxs)(`div`,{className:`hunk-history-section`,children:[l.length>0&&(0,G.jsxs)(`div`,{className:`hunk-history-block`,children:[(0,G.jsx)(`h3`,{className:`hunk-history-title`,children:`Commit(s) introducing deleted lines`}),(0,G.jsx)(`div`,{className:`hunk-history-commits`,children:l.map(e=>(0,G.jsxs)(`div`,{className:`hunk-history-commit-card`,children:[(0,G.jsxs)(`div`,{className:`hunk-history-commit-header`,children:[(0,G.jsx)(`span`,{className:`hunk-history-commit-hash`,children:e.commit}),(0,G.jsxs)(`span`,{className:`hunk-history-commit-author`,children:[(0,G.jsx)(jO,{size:11}),(0,G.jsx)(`span`,{children:e.author})]}),(0,G.jsxs)(`span`,{className:`hunk-history-commit-date`,children:[(0,G.jsx)(UD,{size:11}),(0,G.jsx)(`span`,{children:e.date})]})]}),(0,G.jsx)(`div`,{className:`hunk-history-commit-msg`,children:e.summary})]},e.commit))})]}),r.recentCommits.length>0&&(0,G.jsxs)(`div`,{className:`hunk-history-block`,children:[(0,G.jsx)(`h3`,{className:`hunk-history-title`,children:`Recent File Modification History`}),(0,G.jsx)(`div`,{className:`hunk-history-log`,children:r.recentCommits.map(e=>(0,G.jsxs)(`div`,{className:`hunk-history-log-row`,children:[(0,G.jsx)(`span`,{className:`hunk-history-log-hash`,children:e.hash}),(0,G.jsx)(`span`,{className:`hunk-history-log-msg`,title:e.summary,children:e.summary}),(0,G.jsx)(`span`,{className:`hunk-history-log-author`,children:e.author}),(0,G.jsx)(`span`,{className:`hunk-history-log-date`,children:e.date})]},e.hash))})]})]})}function $U(e,t,n){return`
|
|
1932
|
+
`,1;if(L>1e5&&L>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return P+=a,a.length}let D=N(e);if(!D)throw _e(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let O=Ee(D),k=``,A=a||O,j={},M=new l.__emitter(l);w();let P=``,F=0,I=0,L=0,R=!1;try{if(D.__emitTokens)D.__emitTokens(n,M);else{for(A.matcher.considerAll();;){L++,R?R=!1:A.matcher.considerAll(),A.matcher.lastIndex=I;let e=A.matcher.exec(n);if(!e)break;let t=E(n.substring(I,e.index),e);I=e.index+t}E(n.substring(I))}return M.finalize(),k=M.toHTML(),{language:e,value:k,relevance:F,illegal:!1,_emitter:M,_top:A}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:je(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:I,context:n.slice(I-100,I+100),mode:t.mode,resultSoFar:k},_emitter:M};if(o)return{language:e,value:je(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:A};throw t}}function b(e){let t={value:je(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function S(e,n){n=n||l.languages||Object.keys(t);let r=b(e),i=n.filter(N).filter(F).map(t=>v(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(N(e.language).supersetOf===t.language)return 1;if(N(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function C(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function w(e){let t=null,n=d(e);if(u(n))return;if(z(`before:highlightElement`,{el:e,language:n}),e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);return}if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Ae(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?p(r,{language:n,ignoreIllegals:!0}):S(r);e.innerHTML=i.value,e.dataset.highlighted=`yes`,C(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),z(`after:highlightElement`,{el:e,result:i,text:r})}function T(e){l=Me(l,e)}let E=()=>{k(),ye(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function D(){k(),ye(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let O=!1;function k(){function e(){k()}if(document.readyState===`loading`){O||window.addEventListener(`DOMContentLoaded`,e,!1),O=!0;return}document.querySelectorAll(l.cssSelector).forEach(w)}function A(n,r){let i=null;try{i=r(e)}catch(e){if(_e(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)_e(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&P(i.aliases,{languageName:n})}function j(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function M(){return Object.keys(t)}function N(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function P(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function F(e){let t=N(e);return t&&!t.disableAutodetect}function I(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function L(e){I(e),a.push(e)}function R(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function z(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function ee(e){return ye(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),ye(`10.7.0`,`Please use highlightElement now.`),w(e)}Object.assign(e,{highlight:p,highlightAuto:S,highlightAll:k,highlightElement:w,highlightBlock:ee,configure:T,initHighlighting:E,initHighlightingOnLoad:D,registerLanguage:A,unregisterLanguage:j,listLanguages:M,getLanguage:N,registerAliases:P,autoDetection:F,inherit:Me,addPlugin:L,removePlugin:R}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=ke,e.regex={concat:_,lookahead:m,either:y,optional:g,anyNumberOfTimes:h};for(let e in ie)typeof ie[e]==`object`&&n(ie[e]);return Object.assign(e,ie),e},Ie=Fe({});Ie.newInstance=()=>Fe({}),t.exports=Ie,Ie.HighlightJS=Ie,Ie.default=Ie}))()).default,mH={},hH=`hljs-`;function gH(e){let t=pH.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function n(e,n,r){let i=r||mH,a=typeof i.prefix==`string`?i.prefix:hH;if(!t.getLanguage(e))throw Error("Unknown language: `"+e+"` is not registered");t.configure({__emitter:_H,classPrefix:a});let o=t.highlight(n,{ignoreIllegals:!0,language:e});if(o.errorRaised)throw Error("Could not highlight with `Highlight.js`",{cause:o.errorRaised});let s=o._emitter.root,c=s.data;return c.language=o.language,c.relevance=o.relevance,s}function r(e,r){let a=(r||mH).subset||i(),o=-1,s=0,c;for(;++o<a.length;){let i=a[o];if(!t.getLanguage(i))continue;let l=n(i,e,r);l.data&&l.data.relevance!==void 0&&l.data.relevance>s&&(s=l.data.relevance,c=l)}return c||{type:`root`,children:[],data:{language:void 0,relevance:s}}}function i(){return t.listLanguages()}function a(e,n){if(typeof e==`string`)t.registerLanguage(e,n);else{let n;for(n in e)Object.hasOwn(e,n)&&t.registerLanguage(n,e[n])}}function o(e,n){if(typeof e==`string`)t.registerAliases(typeof n==`string`?n:[...n],{languageName:e});else{let n;for(n in e)if(Object.hasOwn(e,n)){let r=e[n];t.registerAliases(typeof r==`string`?r:[...r],{languageName:n})}}}function s(e){return!!t.getLanguage(e)}}var _H=class{constructor(e){this.options=e,this.root={type:`root`,children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e===``)return;let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];n&&n.type===`text`?n.value+=e:t.children.push({type:`text`,value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){let n=this.stack[this.stack.length-1],r=e.root.children;t?n.children.push({type:`element`,tagName:`span`,properties:{className:[t]},children:r}):n.children.push(...r)}openNode(e){let t=this,n=e.split(`.`).map(function(e,n){return n?e+`_`.repeat(n):t.options.classPrefix+e}),r=this.stack[this.stack.length-1],i={type:`element`,tagName:`span`,properties:{className:n},children:[]};r.children.push(i),this.stack.push(i)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return``}},vH={};function yH(e){let t=e||vH,n=t.aliases,r=t.detect||!1,i=t.languages||fH,a=t.plainText,o=t.prefix,s=t.subset,c=`hljs`,l=gH(i);if(n&&l.registerAlias(n),o){let e=o.indexOf(`-`);c=e===-1?o:o.slice(0,e)}return function(e,t){MF(e,`element`,function(e,n,i){if(e.tagName!==`code`||!i||i.type!==`element`||i.tagName!==`pre`)return;let u=bH(e);if(u===!1||!u&&!r||u&&a&&a.includes(u))return;Array.isArray(e.properties.className)||(e.properties.className=[]),e.properties.className.includes(c)||e.properties.className.unshift(c);let d=Qz(e,{whitespace:`pre`}),f;try{f=u?l.highlight(u,d,{prefix:o}):l.highlightAuto(d,{prefix:o,subset:s})}catch(n){let r=n;if(u&&/Unknown language/.test(r.message)){t.message("Cannot highlight as `"+u+"`, it’s not registered",{ancestors:[i,e],cause:r,place:e.position,ruleId:`missing-language`,source:`rehype-highlight`});return}throw r}!u&&f.data&&f.data.language&&e.properties.className.push(`language-`+f.data.language),f.children.length>0&&(e.children=f.children)})}}function bH(e){let t=e.properties.className,n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){let e=String(t[n]);if(e===`no-highlight`||e===`nohighlight`)return!1;!r&&e.slice(0,5)===`lang-`&&(r=e.slice(5)),!r&&e.slice(0,9)===`language-`&&(r=e.slice(9))}return r}var xH=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],SH={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...xH,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...xH],h2:[[`className`,`sr-only`]],img:[...xH,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...xH,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...xH],table:[...xH],ul:[...xH,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},CH={}.hasOwnProperty;function wH(e,t){let n={type:`root`,children:[]},r=TH({schema:t?{...SH,...t}:SH,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function TH(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return EH(e,n);case`doctype`:return DH(e,n);case`element`:return OH(e,n);case`root`:return kH(e,n);case`text`:return AH(e,n);default:}}}function EH(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return LH(r,t),r}}function DH(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return LH(e,t),e}}function OH(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=jH(e,t.children),i=MH(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&CH.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return LH(o,t),o}function kH(e,t){let n={type:`root`,children:jH(e,t.children)};return LH(n,t),n}function AH(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return LH(n,t),n}function jH(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=TH(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function MH(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&CH.call(r,n)?r[n]:void 0,o=r&&CH.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(CH.call(s,l)){let t=s[l],n=NH(e,RH(a,l),l,t);n??=NH(e,RH(o,l),l,t),n!=null&&(c[l]=n)}if(i&&CH.call(i,n)){let e=i[n];for(l in e)CH.call(e,l)&&!CH.call(c,l)&&(c[l]=e[l])}return c}function NH(e,t,n,r){return t?Array.isArray(r)?PH(e,t,n,r):FH(e,t,n,r):void 0}function PH(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=FH(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function FH(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&IH(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function IH(e,t,n){let r=e.schema.protocols&&CH.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function LH(e,t){let n=GA(t);t.data&&(e.data=_F(t.data)),n&&(e.position=n)}function RH(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function zH(e){return function(t){return wH(t,e)}}function BH(){return typeof document>`u`?`dark`:(nE[document.documentElement.getAttribute(`data-theme`)||`nord`]?.type??`dark`)===`light`?`default`:`dark`}function VH({chart:e}){let t=(0,W.useRef)(null),n=`mermaid-${(0,W.useId)().replace(/[^a-zA-Z0-9]/g,``)}`,[r,i]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let r=!1;if(t.current)return(async()=>{try{let a=(await J(async()=>{let{default:e}=await import(`./mermaid.core-Dw-_vXTc.js`);return{default:e}},__vite__mapDeps([101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]))).default;a.initialize({startOnLoad:!1,securityLevel:`strict`,theme:BH()});let{svg:o,bindFunctions:s}=await a.render(n,e);if(r||!t.current)return;t.current.innerHTML=o,s?.(t.current),i(null)}catch(e){r||i(e instanceof Error?e.message:String(e))}})(),()=>{r=!0}},[e,n]),r?(0,G.jsxs)(`div`,{className:`mermaid-error`,children:[(0,G.jsxs)(`div`,{className:`mermaid-error-note`,children:[`Failed to render diagram: `,r]}),(0,G.jsx)(`pre`,{children:(0,G.jsx)(`code`,{children:e})})]}):(0,G.jsx)(`div`,{className:`mermaid`,ref:t,role:`img`,"aria-label":`Mermaid diagram`})}var HH=[Nz,Iz],UH=[[zH,{...SH,protocols:{...SH.protocols,href:[...SH.protocols?.href??[],`file`,`file-mention`]}}],[yH,{ignoreMissing:!0,plainText:[`mermaid`,`suggestion`]}]];function WH(e){return e.startsWith(`file://`)||e.startsWith(`file-mention://`)?e:PI(e)}function GH(e){return e==null||e===!1||e===!0?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(GH).join(``):(0,W.isValidElement)(e)?GH(e.props.children):``}function KH(e){return typeof e==`string`?/language-([\w-]+)/.exec(e)?.[1]??null:null}var qH={pre({children:e}){let t=KH((0,W.isValidElement)(e)?e.props.className:void 0);return t===`mermaid`?(0,G.jsx)(VH,{chart:GH(e).replace(/\n$/,``)}):t===`suggestion`?null:(0,G.jsx)(`pre`,{children:e})},a({href:e,children:t}){return typeof e==`string`&&e.startsWith(`file-mention://`)?(0,G.jsx)(`span`,{className:`mention-file`,title:e.slice(15),children:t}):(0,G.jsx)(`a`,{href:e,...typeof e==`string`&&/^https?:\/\//.test(e)?{target:`_blank`,rel:`noopener noreferrer`}:{},children:t})}};function JH({content:e,className:t}){return(0,G.jsx)(`div`,{className:t,children:(0,G.jsx)(AI,{remarkPlugins:HH,rehypePlugins:UH,urlTransform:WH,components:qH,children:e})})}function YH(e,t){let n=e.slice(0,t);for(let e=t-1;e>=0;e--){let t=n[e];if(t===`@`){if(e===0||/\s/.test(n[e-1])){let t=n.slice(e+1);if(!/\s/.test(t))return{atStart:e,query:t}}return null}if(t===`
|
|
1933
|
+
`)return null}return null}function XH(e,t){let n=(0,W.useRef)(null),[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(0),[s,c]=(0,W.useState)(0),l=(0,W.useRef)(0),u=(0,W.useCallback)(e=>{n.current=e},[]);(0,W.useEffect)(()=>{let t=n.current;if(!t)return;let r=t.selectionStart;l.current=r;let a=YH(e,r);if(i(a),a){o(0);let n=parseFloat(getComputedStyle(t).lineHeight)||20,i=(e.slice(0,r).match(/\n/g)||[]).length;c((parseFloat(getComputedStyle(t).paddingTop)||0)+(i+1)*n+4)}},[e]);let d=r?.query??``,f=nt({queryKey:[`file-mention`,d],enabled:r!==null,placeholderData:V,staleTime:5e3,queryFn:async({signal:e})=>{let t=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},signal:e,body:JSON.stringify({scope:`files`,query:d})});if(!t.ok)throw Error(`Search failed (${t.status})`);return await t.json()}}),p=f.data?.items??[],m=r!==null&&(p.length>0||f.isFetching),h=(0,W.useCallback)(a=>{if(!r)return;let o=n.current;if(!o)return;let s=e.slice(0,r.atStart),c=e.slice(l.current),u=`@${a} `;t(s+u+c),i(null),requestAnimationFrame(()=>{o.selectionStart=o.selectionEnd=(s+u).length,o.focus()})},[r,e,t]),g=(0,W.useCallback)(e=>{if(!m)return!1;if(e.key===`ArrowDown`){e.preventDefault();let t=p.length;return t>0&&o(e=>(e+1)%t),!0}if(e.key===`ArrowUp`){e.preventDefault();let t=p.length;return t>0&&o(e=>e===0?t-1:e-1),!0}return(e.key===`Enter`||e.key===`Tab`)&&p[a]?(e.preventDefault(),h(p[a].path),!0):e.key===`Escape`?(e.preventDefault(),i(null),!0):!1},[m,p,a,h]),_=(0,W.useCallback)(e=>h(e),[h]);return{isOpen:m,results:p,focusedIndex:a,query:d,isFetching:f.isFetching,cursorTop:s,handleKeyDown:g,onSelect:_,setFocusedIndex:o,setTextareaRef:u}}function ZH(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.toLowerCase(),i=[],a=0;for(let e=0;e<r.length&&a<n.length;e++)if(r[e]===n[a]){let t=i[i.length-1];t&&t[1]===e?t[1]=e+1:i.push([e,e+1]),a++}return a===n.length?i:[]}function QH({text:e,ranges:t}){if(!t.length)return(0,G.jsx)(G.Fragment,{children:e});let n=[],r=0;return t.forEach(([t,i],a)=>{t>r&&n.push(e.slice(r,t)),n.push((0,G.jsx)(`mark`,{className:`mention-highlight`,children:e.slice(t,i)},a)),r=i}),r<e.length&&n.push(e.slice(r)),(0,G.jsx)(G.Fragment,{children:n})}var $H=e=>{let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t+1)},eU=e=>{let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)};function tU({results:e,focusedIndex:t,query:n,cursorTop:r,onSelect:i,onHover:a}){let o=(0,W.useRef)(null);return(0,W.useEffect)(()=>{(o.current?.querySelector(`[data-focused="true"]`))?.scrollIntoView({block:`nearest`})},[t]),e.length===0?null:(0,G.jsx)(`div`,{className:`mention-dropdown`,ref:o,role:`listbox`,"aria-label":`File suggestions`,style:{top:r},children:e.map((e,r)=>{let o=eU(e.path),s=ZH(o,n),c=r===t;return(0,G.jsxs)(`div`,{role:`option`,"aria-selected":c,"data-focused":c,className:`mention-item ${c?`mention-item-focused`:``}`,onMouseDown:t=>{t.preventDefault(),i(e.path)},onMouseEnter:()=>a(r),children:[(0,G.jsx)(`span`,{className:`mention-icon`,children:(0,G.jsx)(qD,{size:13})}),(0,G.jsxs)(`div`,{className:`mention-info`,children:[(0,G.jsx)(`span`,{className:`mention-name`,children:(0,G.jsx)(QH,{text:o,ranges:s})}),(0,G.jsx)(`span`,{className:`mention-dir`,children:$H(e.path)||`./`})]})]},e.path)})})}function nU(e){return e.replace(/@([^\s@]+)/g,(e,t)=>`[${t.split(`/`).pop()||t}](file-mention://${t})`)}function rU({id:e,value:t,onChange:n,placeholder:r,rows:i=3,ariaLabel:a,textareaClassName:o,onSubmitShortcut:s}){let[c,l]=(0,W.useState)(`write`),u=(0,W.useRef)(null),d=(0,W.useRef)(null),f=XH(t,n),p=(0,W.useRef)(t);(0,W.useEffect)(()=>{p.current=t},[t]),(0,W.useEffect)(()=>{c===`preview`&&d.current?.focus()},[c]);let m=async e=>{let r=e.clipboardData.items,i=null;for(let e=0;e<r.length;e++){let t=r[e];if(t.kind===`file`&&t.type.startsWith(`image/`)){i=t.getAsFile();break}}if(!i)return;e.preventDefault();let a=u.current;if(!a)return;let o=a.selectionStart,s=a.selectionEnd,c=Math.random().toString(36).slice(2,8),l=`![Uploading image… ${c}]()`,d=t.slice(0,o)+l+t.slice(s);n(d),p.current=d;try{let e=new FormData;e.append(`file`,i,i.name||`pasted-${c}.png`);let t=await fetch(`/api/attachments`,{method:`POST`,body:e});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(!r.url)throw Error(r.error||`Upload failed`);n(p.current.replace(l,``))}catch(e){console.error(`Image upload failed:`,e),n(p.current.replace(l,`![upload failed]()`))}};return(0,G.jsxs)(`div`,{className:`md-field`,children:[(0,G.jsxs)(`div`,{className:`comment-form-tabs`,role:`tablist`,"aria-label":`Markdown editor mode`,children:[(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`write`,onClick:()=>l(`write`),onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),l(`preview`))},className:`comment-form-tab-btn ${c===`write`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Write`}),(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":c===`preview`,onClick:()=>l(`preview`),onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),l(`write`))},className:`comment-form-tab-btn ${c===`preview`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Preview`})]}),c===`write`?(0,G.jsxs)(`div`,{style:{position:`relative`},children:[(0,G.jsx)(`textarea`,{id:e,ref:e=>{u.current=e,f.setTextareaRef(e)},className:o,value:t,rows:i,placeholder:r,"aria-label":a,onChange:e=>n(e.target.value),onPaste:m,onKeyDown:e=>{f.handleKeyDown(e)||(e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),s?.()),e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),l(e=>e===`write`?`preview`:`write`)))}}),f.isOpen&&(0,G.jsx)(tU,{results:f.results,focusedIndex:f.focusedIndex,query:f.query,cursorTop:f.cursorTop,onSelect:f.onSelect,onHover:f.setFocusedIndex})]}):(0,G.jsx)(`div`,{ref:d,className:`md-field-preview markdown-body`,role:`tabpanel`,"aria-label":`Markdown preview`,tabIndex:0,onKeyDown:e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),l(`write`))},children:t.trim()?(0,G.jsx)(JH,{content:nU(t)}):(0,G.jsx)(`span`,{className:`md-field-empty`,children:`Nothing to preview`})})]})}var iU=[{value:`approved`,label:`Approve`,description:`The changes look good — the agent can proceed.`,icon:jD,className:`plan-verdict-approve`},{value:`changes-requested`,label:`Request edits`,description:`The agent should address the comments and apply edits.`,icon:sO,className:`plan-verdict-changes`},{value:`rejected`,label:`Reject`,description:`Don't keep building on this — the approach needs rethinking.`,icon:AO,className:`plan-verdict-reject`},{value:`comment-only`,label:`Comment only`,description:`Agent must NOT edit files — only reply to comments. General note goes to chat.`,icon:cO,className:`plan-verdict-comment-only`}];function aU({comments:e,onEditComment:t,onDeleteComment:n,onSend:r,sending:i,agentWaiting:a,onCopyComments:o}){let{haptic:s,sound:c}=lD(),[l,u]=(0,W.useState)(!1),[d,f]=(0,W.useState)(``),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(!1),_=async()=>{o&&(await o(),g(!0),setTimeout(()=>g(!1),2e3))},v=e.length,y=(0,W.useMemo)(()=>[...e].sort((e,t)=>e.createdAt-t.createdAt),[e]),b=async()=>{p&&(s(`heavy`),c(`send`),await r(p,d,p===`comment-only`?`comment-only`:`standard`),f(``),m(null),u(!1))};return(0,G.jsx)(bk,{open:l,onOpenChange:u,ariaLabel:`Submit your review to the agent`,className:`send-review-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:i,title:a?`An agent is connected and waiting`:`Submit your review to a waiting agent`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[a&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),(0,G.jsx)(AD,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:i?`Sending…`:v>0?`Send to agent (${v})`:`Send to agent`})]}),children:(0,G.jsxs)(`div`,{className:`srp`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[(0,G.jsx)(AD,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:`Send review to agent`}),(0,G.jsxs)(`span`,{className:`srp-count`,children:[v,` comment`,v===1?``:`s`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:iU.map(e=>{let t=e.icon,n=p===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>m(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),v>0?(0,G.jsx)(`ul`,{className:`srp-list`,"aria-label":`Comments to send`,children:y.map(e=>(0,G.jsx)(oU,{comment:e,onEdit:t,onDelete:n},e.id))}):(0,G.jsx)(`p`,{className:`srp-empty`,children:`No inline comments — your verdict and overall note will be sent on their own.`}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`srp-general-input`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(rU,{id:`srp-general-input`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the agent that applies to the whole review…`,rows:3,ariaLabel:`Overall review comment`,onSubmitShortcut:b})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[o&&(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:_,disabled:v===0,style:{marginRight:`auto`},children:h?`Copied!`:`Copy comments`}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>u(!1),disabled:i,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:b,disabled:!p||i,children:i?`Sending…`:`Send review`})]})]})})}function oU({comment:e,onEdit:t,onDelete:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(e.body),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{r&&(s.current?.focus(),s.current?.select())},[r]);let c=e.lineNumber>0?e.startLineNumber&&e.startLineNumber!==e.lineNumber?`:${e.startLineNumber}-${e.lineNumber}`:`:${e.lineNumber}`:` · file`,l=()=>{let n=a.trim();n&&n!==e.body&&t(e.id,n),i(!1)};return(0,G.jsxs)(`li`,{className:`srp-item`,children:[(0,G.jsxs)(`div`,{className:`srp-item-top`,children:[(0,G.jsxs)(`span`,{className:`srp-item-loc`,children:[(0,G.jsx)(`span`,{className:`srp-item-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`srp-item-line`,children:c})]}),e.status===`resolved`&&(0,G.jsx)(`span`,{className:`srp-item-resolved`,children:`resolved`}),(0,G.jsxs)(`span`,{className:`srp-item-actions`,children:[r?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:l,title:`Save edit`,children:(0,G.jsx)(jD,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>{o(e.body),i(!1)},title:`Cancel edit`,children:(0,G.jsx)(AO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>i(!0),title:`Edit comment`,children:(0,G.jsx)(hO,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn srp-icon-btn-danger`,onClick:()=>n(e.id),title:`Remove from review`,children:(0,G.jsx)(TO,{size:13,"aria-hidden":`true`})})]})]}),e.lineContent?.trim()&&(0,G.jsx)(`code`,{className:`srp-item-code`,children:e.lineContent.trim().slice(0,160)}),r?(0,G.jsx)(`textarea`,{ref:s,className:`srp-item-edit`,value:a,rows:2,onChange:e=>o(e.target.value),onKeyDown:t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),l()):t.key===`Escape`&&(t.preventDefault(),o(e.body),i(!1))}}):(0,G.jsx)(`p`,{className:`srp-item-body`,children:e.body})]})}var sU=[{value:`word`,label:`Word`},{value:`word-alt`,label:`Word (alt)`},{value:`char`,label:`Character`},{value:`none`,label:`None`}],cU=[{value:`classic`,label:`Classic (+/−)`},{value:`bars`,label:`Bars`},{value:`none`,label:`None`}],lU=[{value:`line-info`,label:`Line info + context`},{value:`line-info-basic`,label:`Line info`},{value:`metadata`,label:`Metadata only`},{value:`simple`,label:`Simple`}],uU=[{value:`both`,label:`Both`},{value:`line`,label:`Line only`},{value:`number`,label:`Number only`},{value:`disabled`,label:`Disabled`}],dU=[11,12,13,14,15,16].map(e=>({value:String(e),label:`${e}px`})),fU=[2,4,8].map(e=>({value:String(e),label:String(e)})),pU=[{value:``,label:`Default`},{value:`chrome`,label:`Chrome`},{value:`firefox`,label:`Firefox`},{value:`edge`,label:`Edge`},{value:`brave`,label:`Brave`}],mU=[{value:`default`,label:`Default / System`},{value:`vscode`,label:`VS Code`},{value:`zed`,label:`Zed`},{value:`vim`,label:`Vim`},{value:`neovim`,label:`Neovim`}],hU=(0,W.memo)(function({repoName:e,branch:t,fileCount:n,additions:r,deletions:i,commentCount:a,planCount:o,pendingPlanCount:s,onOpenPlans:c,diffStyle:l,diffOptions:u,defaultTabSize:d,browser:f,theme:p,editorIDE:m,customMode:h,showMode:g,showCommitCount:_,lineDiffType:v,lineWrap:y,diffIndicators:b,showLineNumbers:x,hunkSeparators:S,lineHoverHighlight:C,fontSize:w,haptics:T,sounds:E,uiFont:D,monoFont:O,onDiffStyleChange:k,onDiffOptionsChange:A,onDefaultTabSizeChange:j,onBrowserChange:M,onOpenThemeModal:N,onEditorIDEChange:P,onLineDiffTypeChange:F,onLineWrapChange:I,onDiffIndicatorsChange:L,onShowLineNumbersChange:R,onHunkSeparatorsChange:z,onLineHoverHighlightChange:ee,onFontSizeChange:te,onHapticsChange:B,onSoundsChange:V,onOpenUiFontModal:H,onOpenMonoFontModal:ne,onOpenSearch:re,onCopyComments:ie,onSendToAgent:ae,agentWaiting:oe,sending:se,comments:ce,onEditComment:le,onDeleteComment:ue,sidebarCollapsed:U,onToggleSidebar:de}){let[fe,pe]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`,`||e.code===`Comma`)&&(e.preventDefault(),pe(e=>!e))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]),(0,G.jsxs)(`div`,{className:`toolbar`,children:[(0,G.jsxs)(`div`,{className:`toolbar-left`,children:[de&&(0,G.jsx)(`button`,{className:`toolbar-mobile-toggle`,onClick:de,"aria-label":`Toggle sidebar`,title:U?`Open sidebar`:`Close sidebar`,children:(0,G.jsx)(iO,{size:18})}),(0,G.jsx)(`h1`,{className:`toolbar-title`,children:e}),t&&(0,G.jsxs)(`span`,{className:`toolbar-branch`,children:[(0,G.jsx)(JD,{size:12}),t]}),(0,G.jsx)(`span`,{className:`toolbar-stat`,children:g?(0,G.jsxs)(G.Fragment,{children:[`showing`,` `,(0,G.jsx)(`strong`,{className:`toolbar-stat-count`,children:_}),` `,`commit`,_===1?``:`s`]}):(0,G.jsxs)(G.Fragment,{children:[n,` file`,n===1?``:`s`,` changed`,r>0&&(0,G.jsxs)(`span`,{className:`stat-additions`,children:[` +`,r]}),i>0&&(0,G.jsxs)(`span`,{className:`stat-deletions`,children:[` -`,i]})]})})]}),(0,G.jsxs)(`div`,{className:`toolbar-right`,children:[(0,G.jsxs)(`button`,{className:`btn btn-sm toolbar-search-btn`,onClick:re,title:`Search (⌘K)`,children:[(0,G.jsx)(xO,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{children:`Search`}),(0,G.jsx)(`kbd`,{className:`toolbar-search-kbd`,children:`⌘K`})]}),o>0&&(0,G.jsxs)(`button`,{className:`btn btn-sm toolbar-plans-btn ${s>0?`toolbar-plans-btn-pending`:``}`,onClick:c,title:s>0?`${s} plan${s===1?``:`s`} awaiting your review`:`Review agent plans`,children:[s>0&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),(0,G.jsx)(BD,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{children:`Plans`}),s>0&&(0,G.jsx)(`span`,{className:`toolbar-plans-badge`,children:s})]}),(0,G.jsx)(bk,{open:fe,onOpenChange:pe,ariaLabel:`Settings`,className:`settings-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn ${fe?`btn-active`:``}`,title:`Settings`,children:[(0,G.jsx)(SO,{size:14}),` `,(0,G.jsx)(`span`,{className:`btn-label`,children:`Settings`})]}),children:(0,G.jsxs)(`div`,{className:`popover-scroll settings-panel`,children:[!h&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Source`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:u.staged,onChange:e=>A({...u,staged:e.target.checked})}),`Show staged`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:u.untracked,onChange:e=>A({...u,untracked:e.target.checked})}),`Show untracked`]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Display`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Inline diff`}),(0,G.jsx)(NA,{value:v,onValueChange:e=>F(e),options:sU,ariaLabel:`Inline diff style`})]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>I(e.target.checked)}),`Wrap long lines`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Diff indicators`}),(0,G.jsx)(NA,{value:b,onValueChange:e=>L(e),options:cU,ariaLabel:`Diff indicators`})]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:x,onChange:e=>R(e.target.checked)}),`Show line numbers`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hunk separator`}),(0,G.jsx)(NA,{value:S,onValueChange:e=>z(e),options:lU,ariaLabel:`Hunk separator style`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hover highlight`}),(0,G.jsx)(NA,{value:C,onValueChange:e=>ee(e),options:uU,ariaLabel:`Hover highlight`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Font size`}),(0,G.jsx)(NA,{value:String(w),onValueChange:e=>te(Number(e)),options:dU,ariaLabel:`Font size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Default tab size`}),(0,G.jsx)(NA,{value:String(d),onValueChange:e=>j(Number(e)),options:fU,ariaLabel:`Default tab size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`UI font`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),H()},style:{display:`inline-flex`,alignItems:`center`},title:D??`Default (Geist Mono)`,children:[(0,G.jsx)(DO,{size:13,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{style:{maxWidth:`120px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:D??`Default…`})]})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Code font`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),ne()},style:{display:`inline-flex`,alignItems:`center`},title:O??`Default (JetBrains Mono)`,children:[(0,G.jsx)(DO,{size:13,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{style:{maxWidth:`120px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:O??`Default…`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`External tools`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Browser`}),(0,G.jsx)(NA,{value:f||``,onValueChange:M,options:pU,ariaLabel:`Browser`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Preferred IDE`}),(0,G.jsx)(NA,{value:m||`default`,onValueChange:P,options:mU,ariaLabel:`Preferred IDE`})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Review Options`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Diff style`}),(0,G.jsx)(NA,{value:l,onValueChange:e=>k(e),options:[{value:`split`,label:`Split`},{value:`unified`,label:`Unified`}],ariaLabel:`Diff style`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Theme`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{pe(!1),N()},style:{display:`inline-flex`,alignItems:`center`},children:[(0,G.jsx)(dO,{size:14,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{children:`Switch Theme...`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Feedback`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:T,onChange:e=>B(e.target.checked)}),`Haptic feedback`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:E,onChange:e=>V(e.target.checked)}),`Sound effects`]})]})}),(0,G.jsx)(aU,{comments:ce,onEditComment:le,onDeleteComment:ue,onSend:ae,sending:se,agentWaiting:oe,onCopyComments:ie})]})]})});function gU({commit:e,index:t,total:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(null);(0,W.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let c=async()=>{try{await navigator.clipboard.writeText(e.sha),i(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>i(!1),1500)}catch{}},l=e.body.trim().length>0,u=e.parents.length>1,d=n>1?`Commit ${t+1} of ${n}: ${e.subject}`:`Commit: ${e.subject}`;return(0,G.jsxs)(`section`,{className:`commit-banner`,"aria-label":d,children:[(0,G.jsxs)(`header`,{className:`commit-banner-header`,children:[(0,G.jsxs)(`div`,{className:`commit-banner-line`,children:[(0,G.jsx)(YD,{size:14,className:`commit-banner-icon`,"aria-hidden":`true`}),(0,G.jsxs)(`button`,{type:`button`,className:`commit-banner-sha`,onClick:c,title:r?`Copied full SHA`:`Click to copy full SHA`,"aria-label":`Copy full SHA ${e.sha}`,children:[(0,G.jsx)(`span`,{className:`commit-banner-sha-text`,children:e.shortSha}),r?(0,G.jsx)(jD,{size:12,className:`commit-banner-sha-icon`,"aria-hidden":`true`}):(0,G.jsx)(UD,{size:12,className:`commit-banner-sha-icon`,"aria-hidden":`true`})]}),u&&(0,G.jsx)(`span`,{className:`commit-banner-merge-badge`,title:`Merge commit with ${e.parents.length} parents`,children:`merge`}),(0,G.jsx)(`h2`,{className:`commit-banner-subject`,children:e.subject})]}),(0,G.jsxs)(`div`,{className:`commit-banner-meta`,children:[(0,G.jsxs)(`span`,{className:`commit-banner-author`,children:[(0,G.jsx)(`span`,{className:`commit-banner-author-name`,children:e.authorName}),(0,G.jsxs)(`span`,{className:`commit-banner-author-email`,children:[`<`,e.authorEmail,`>`]})]}),(0,G.jsx)(`span`,{className:`commit-banner-date`,title:e.authorDate,children:_U(e.authorDate)}),e.committerName!==e.authorName||e.committerEmail!==e.authorEmail?(0,G.jsxs)(`span`,{className:`commit-banner-committer`,title:`Committed by ${e.committerName} <${e.committerEmail}> at ${e.committerDate}`,children:[(0,G.jsx)(`span`,{className:`commit-banner-committer-label`,children:`committed by`}),` `,(0,G.jsx)(`span`,{children:e.committerName})]}):null]})]}),l&&(0,G.jsxs)(`div`,{className:`commit-banner-body`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`commit-banner-body-toggle`,onClick:()=>o(e=>!e),"aria-expanded":a,"aria-controls":`commit-banner-body-${e.shortSha}`,children:[a?(0,G.jsx)(MD,{size:14}):(0,G.jsx)(PD,{size:14}),(0,G.jsx)(qD,{size:13,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:a?`Hide message`:`Show message`})]}),a&&(0,G.jsx)(`pre`,{id:`commit-banner-body-${e.shortSha}`,className:`commit-banner-body-pre`,children:e.body})]})]})}function _U(e){try{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}var vU=W.createContext(void 0);function yU(e){let t=W.useContext(vU);if(e===!1&&t===void 0)throw Error(j_(27));return t}var bU={...yT,...lT},xU=W.forwardRef(function(e,t){let{render:n,className:r,forceRender:i=!1,...a}=e,{store:o}=yU(),s=o.useState(`open`),c=o.useState(`nested`),l=o.useState(`mounted`),u=o.useState(`transitionStatus`);return tS(`div`,e,{state:W.useMemo(()=>({open:s,transitionStatus:u}),[s,u]),ref:[o.context.backdropRef,t],stateAttributesMapping:bU,props:[{role:`presentation`,hidden:!l,style:{userSelect:`none`,WebkitUserSelect:`none`}},a],enabled:i||!c})}),SU=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),CU=function(e){return e[e.open=uT.open]=`open`,e[e.closed=uT.closed]=`closed`,e[e.startingStyle=uT.startingStyle]=`startingStyle`,e[e.endingStyle=uT.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),wU=W.createContext(void 0);function TU(){let e=W.useContext(wU);if(e===void 0)throw Error(j_(26));return e}var EU={...yT,...lT,nestedDialogOpen(e){return e?{[CU.nestedDialogOpen]:``}:null}},DU=W.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,...o}=e,{store:s}=yU(),c=s.useState(`descriptionElementId`),l=s.useState(`disablePointerDismissal`),u=s.useState(`floatingRootContext`),d=s.useState(`popupProps`),f=s.useState(`modal`),p=s.useState(`mounted`),m=s.useState(`nested`),h=s.useState(`nestedOpenDialogCount`),g=s.useState(`open`),_=s.useState(`openMethod`),v=s.useState(`titleElementId`),y=s.useState(`transitionStatus`),b=s.useState(`role`);TU(),hw({open:g,ref:s.context.popupRef,onComplete(){g&&s.context.onOpenChangeComplete?.(!0)}});function x(e){return e===`touch`?s.context.popupRef.current:!0}let S=i===void 0?x:i,C=h>0,w=tS(`div`,e,{state:W.useMemo(()=>({open:g,nested:m,transitionStatus:y,nestedDialogOpen:C}),[g,m,y,C]),props:[d,{"aria-labelledby":v??void 0,"aria-describedby":c??void 0,role:b,tabIndex:-1,hidden:!p,onKeyDown(e){hk.has(e.key)&&e.stopPropagation()},style:{[SU.nestedDialogs]:h}},o],ref:[t,s.context.popupRef,s.useStateSetter(`popupElement`)],stateAttributesMapping:EU});return(0,G.jsx)(xS,{context:u,openInteractionType:_,disabled:!p,closeOnFocusOut:!l,initialFocus:S,returnFocus:r,modal:f!==!1,restoreFocus:`popup`,children:w})}),OU=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=yU(),a=i.useState(`mounted`),o=i.useState(`modal`);return a||n?(0,G.jsx)(wU.Provider,{value:n,children:(0,G.jsxs)(uS,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(ak,{ref:i.context.internalBackdropRef,inert:ZT(!open)}),e.children]})}):null});function kU(e){let{store:t,parentContext:n,actionsRef:r}=e,i=t.useState(`open`),a=t.useState(`disablePointerDismissal`),o=t.useState(`modal`),s=t.useState(`popupElement`),{openMethod:c,triggerProps:l,reset:u}=GO(i);vw(t);let{forceUnmount:d}=yw(i,t,()=>{u()}),f=X(e=>{let n=ox(e);return n.preventUnmountOnClose=()=>{t.set(`preventUnmountingOnClose`,!0)},n}),p=W.useCallback(()=>{t.setOpen(!1,f(ix))},[t,f]);W.useImperativeHandle(r,()=>({unmount:d,close:p}),[d,p]);let m=Ew({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[h,g]=W.useState(0),_=h===0,v=Xw(m),y=LC(m,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=zv(e);if(_&&!a){let e=n;return o&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Rv(e,s)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:_});RO(i&&o===!0,s);let{getReferenceProps:b,getFloatingProps:x,getTriggerProps:S}=zw([v,y]);t.useContextCallback(`onNestedDialogOpen`,e=>{g(e+1)}),t.useContextCallback(`onNestedDialogClose`,()=>{g(0)}),W.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(h),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,h]);let C=W.useMemo(()=>b(l),[b,l]),w=W.useMemo(()=>S(l),[S,l]),T=W.useMemo(()=>x(),[x]);t.useSyncedValues({openMethod:c,activeTriggerProps:C,inactiveTriggerProps:w,popupProps:T,floatingRootContext:m,nestedOpenDialogCount:h})}var AU={...Cw,modal:Z(e=>e.modal),nested:Z(e=>e.nested),nestedOpenDialogCount:Z(e=>e.nestedOpenDialogCount),disablePointerDismissal:Z(e=>e.disablePointerDismissal),openMethod:Z(e=>e.openMethod),descriptionElementId:Z(e=>e.descriptionElementId),titleElementId:Z(e=>e.titleElementId),viewportElement:Z(e=>e.viewportElement),role:Z(e=>e.role)},jU=class extends uw{constructor(e){super(MU(e),{popupRef:W.createRef(),backdropRef:W.createRef(),internalBackdropRef:W.createRef(),triggerElements:new bw,onOpenChange:void 0,onOpenChangeComplete:void 0},AU)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;let n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit(`openchange`,n);let r={open:e},i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)}};function MU(e={}){return{...Sw(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:`dialog`,...e}}function NU(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=yU(!0),p=!!f,m=F_(()=>l?.store??new jU({open:n??r,activeTriggerId:u===void 0?d:u,modal:s,disablePointerDismissal:o,nested:p})).current;m.useControlledProp(`open`,n,r),m.useControlledProp(`activeTriggerId`,u,d),m.useSyncedValues({disablePointerDismissal:o,nested:p,modal:s}),m.useContextCallback(`onOpenChange`,i),m.useContextCallback(`onOpenChangeComplete`,a);let h=m.useState(`payload`);kU({store:m,actionsRef:c,parentContext:f?.store.context,onOpenChange:i,triggerIdProp:u});let g=W.useMemo(()=>({store:m}),[m]);return(0,G.jsx)(vU.Provider,{value:g,children:typeof t==`function`?t({payload:h}):t})}function PU({open:e,onClose:t,className:n,ariaLabel:r,initialFocus:i,onKeyDown:a,children:o}){return(0,G.jsx)(NU,{open:e,onOpenChange:e=>{e||t()},children:(0,G.jsxs)(OU,{children:[(0,G.jsx)(xU,{className:`ui-modal-backdrop`}),(0,G.jsx)(DU,{className:`ui-modal-popup ${n??``}`,"aria-label":r,initialFocus:i,onKeyDown:a,children:o})]})})}async function FU(e,t){let n=await fetch(`/api/file-text?path=${encodeURIComponent(e)}&version=${t}`);if(!n.ok){if(n.status===404)return null;throw Error(`HTTP ${n.status} fetching ${t} ${e}`)}let r=await n.json();if(r.missing)return null;if(r.error)throw Error(r.error);return r.content??``}function IU(e,t){let[n,r]=(0,W.useState)({loading:!1,error:null,oldContent:null,newContent:null});return(0,W.useEffect)(()=>{if(!t||!e)return;let n=!1;return r(e=>({...e,loading:!0,error:null})),Promise.all([FU(e,`old`),FU(e,`new`)]).then(([e,t])=>{n||r({loading:!1,error:null,oldContent:e,newContent:t})}).catch(e=>{n||r({loading:!1,error:e.message,oldContent:null,newContent:null})}),()=>{n=!0}},[e,t]),n}var LU=`diffing-draft-`,RU=10080*60*1e3;function zU(...e){return LU+e.join(`:`)}function BU(...e){try{let t=fD(zU(...e));if(!t)return null;let n=JSON.parse(t);return Date.now()-n.timestamp>RU?(_D(zU(...e)),null):n.body}catch{return null}}var VU={};function HU(e,...t){let n=zU(...t);VU[n]&&clearTimeout(VU[n]),VU[n]=setTimeout(()=>{UU(e,...t),delete VU[n]},500)}function UU(e,...t){let n=zU(...t);try{e.trim()?gD(n,JSON.stringify({body:e,timestamp:Date.now()})):_D(n)}catch{}}function WU(...e){try{_D(zU(...e))}catch{}}function GU(e){return e.replace(/@([^\s@]+)/g,(e,t)=>`[${t.split(`/`).pop()||t}](file-mention://${t})`)}function KU({initialBody:e,lineContent:t,draftKey:n,onSubmit:r,onCancel:i}){let{haptic:a,sound:o}=lD(),[s,c]=(0,W.useState)(()=>{if(n){let e=BU(n);if(e)return e}return e||``}),[l,u]=(0,W.useState)(`write`),d=(0,W.useRef)(null),f=(0,W.useRef)(null),p=XH(s,c);(0,W.useEffect)(()=>{l===`write`?d.current?.focus():f.current?.focus()},[l]),(0,W.useEffect)(()=>{n&&HU(s,n)},[s,n]);let m=()=>{let e=s.trim();e&&(n&&WU(n),a(`success`),o(`success`),r(e))},h=e=>{if(!p.handleKeyDown(e)&&(e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m()),e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),u(e=>e===`write`?`preview`:`write`)),e.key===`Escape`)){if(s.includes(`
|
|
1934
|
+
`))return;i()}},g=async e=>{let t=e.clipboardData.items,n=null;for(let e=0;e<t.length;e++){let r=t[e];if(r.kind===`file`&&r.type.startsWith(`image/`)){n=r.getAsFile();break}}if(!n)return;e.preventDefault();let r=d.current;if(!r)return;let i=r.selectionStart,a=r.selectionEnd,o=Math.random().toString(36).slice(2,8),s=`![Uploading image… ${o}]()`,l=r.value;c(l.slice(0,i)+s+l.slice(a));try{let e=new FormData;e.append(`file`,n,n.name||`pasted-${o}.png`);let t=await fetch(`/api/attachments`,{method:`POST`,body:e});if(!t.ok)throw Error(`HTTP ${t.status}`);let r=await t.json();if(!r.url)throw Error(r.error||`Upload failed`);let i=``;c(e=>e.replace(s,i))}catch(e){console.error(`Image upload failed:`,e),c(e=>e.replace(s,`![upload failed]()`))}};return(0,G.jsxs)(`div`,{className:`comment-form`,style:{padding:`16px`},role:`form`,"aria-label":`Comment form`,children:[(0,G.jsxs)(`div`,{className:`comment-form-tabs`,role:`tablist`,"aria-label":`Comment form mode`,children:[(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":l===`write`,"aria-controls":`comment-write-panel`,onClick:()=>u(`write`),onKeyDown:e=>{e.key===`ArrowRight`&&(e.preventDefault(),u(`preview`))},className:`comment-form-tab-btn ${l===`write`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Write`}),(0,G.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":l===`preview`,"aria-controls":`comment-preview-panel`,onClick:()=>u(`preview`),onKeyDown:e=>{e.key===`ArrowLeft`&&(e.preventDefault(),u(`write`))},className:`comment-form-tab-btn ${l===`preview`?`comment-form-tab-btn-active`:`comment-form-tab-btn-inactive`}`,children:`Preview`})]}),l===`write`?(0,G.jsxs)(`div`,{style:{position:`relative`},children:[(0,G.jsx)(`textarea`,{id:`comment-write-panel`,ref:e=>{d.current=e,p.setTextareaRef(e)},value:s,onChange:e=>c(e.target.value),onKeyDown:h,onPaste:g,placeholder:`Leave a review comment (supports Markdown and Pasting Clipboard Images)...`,rows:4,"aria-label":`Comment body`,style:{minHeight:`100px`}}),p.isOpen&&(0,G.jsx)(tU,{results:p.results,focusedIndex:p.focusedIndex,query:p.query,cursorTop:p.cursorTop,onSelect:p.onSelect,onHover:p.setFocusedIndex})]}):(0,G.jsxs)(`div`,{id:`comment-preview-panel`,ref:f,role:`tabpanel`,"aria-label":`Preview`,tabIndex:0,onKeyDown:e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(e.preventDefault(),u(`write`))},style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:[(()=>{let e=!!s.match(/```suggestion\n([\s\S]*?)```/);return s.replace(/```suggestion\n([\s\S]*?)```/g,``).trim().length>0||!e?(0,G.jsx)(`div`,{className:`comment-preview markdown-body`,style:{minHeight:`100px`,padding:`12px 16px`,border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,background:`var(--bg-primary)`,fontSize:`14px`,lineHeight:1.6,color:`var(--text-primary)`,overflowY:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,overflowWrap:`break-word`},children:s.trim()?(0,G.jsx)(JH,{content:GU(s)}):(0,G.jsx)(`span`,{style:{color:`var(--text-muted)`,fontStyle:`italic`},children:`Nothing to preview`})}):null})(),(()=>{let e=s.match(/```suggestion\n([\s\S]*?)```/),n=!!e,r=e?e[1].trimEnd():``;return n?(0,G.jsxs)(`div`,{className:`suggestion-card`,style:{border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,overflow:`hidden`,background:`var(--bg-primary)`,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsx)(`div`,{className:`suggestion-header`,style:{padding:`8px 12px`,background:`var(--bg-secondary)`,borderBottom:`1px solid var(--border-normal)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:`12px`,fontWeight:600},children:(0,G.jsx)(`span`,{style:{color:`var(--text-secondary)`},children:`Suggested Change Preview`})}),(0,G.jsxs)(`div`,{className:`suggestion-diff`,style:{display:`flex`,flexDirection:`column`,fontSize:`12px`,fontFamily:`var(--font-mono)`,overflowX:`auto`},children:[t&&(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-danger-bg)`,borderBottom:`1px dashed var(--border-color)`,color:`var(--feedback-danger-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`-`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:t})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-success-bg)`,color:`var(--feedback-success-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`+`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:r})]})]})]}):null})()]}),(0,G.jsxs)(`div`,{className:`comment-form-actions`,style:{display:`flex`,justifyContent:`flex-end`,gap:`8px`,marginTop:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:i,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:m,disabled:!s.trim(),children:e?`Save`:`Comment`})]})]})}function qU({role:e,size:t=16}){return e===`agent`?(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-agent`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(AD,{size:t,"aria-hidden":`true`})}):(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-user`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(kO,{size:t,"aria-hidden":`true`})})}function JU({comment:e,onDelete:t}){let[,n]=(0,W.useState)(0),{resolveComment:r,unresolveComment:i,addReply:a,removeReply:o,editReply:s,applySuggestion:c,editComment:l}=xE(),u=e.status===`resolved`,[d,f]=(0,W.useState)(u),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(null),x=(0,W.useRef)(null),S=e.body.replace(/```suggestion\n([\s\S]*?)```/g,``).trim().length>0;(0,W.useEffect)(()=>{f(e.status===`resolved`)},[e.status]),(0,W.useEffect)(()=>{let e=setInterval(()=>n(e=>e+1),3e4);return()=>clearInterval(e)},[]);let C=()=>r(e.id),w=()=>i(e.id),T=e=>{b(e)},E=t=>{o(e.id,t)};return u&&d?(0,G.jsxs)(`div`,{className:`comment-resolved-collapsed`,style:{padding:`12px 18px`,margin:`14px 20px`,background:`var(--bg-secondary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-md)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,opacity:.85,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,fontSize:`13px`,color:`var(--text-muted)`},children:[(0,G.jsx)(LD,{size:16,style:{color:`var(--success)`}}),(0,G.jsx)(`span`,{style:{fontWeight:600},children:`Conversation resolved`}),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`2px 6px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`2px 6px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]}),(0,G.jsx)(`span`,{children:`•`}),(0,G.jsx)(`span`,{children:e.replies?.length>0?`${e.replies.length+1} comments`:`1 comment`})]}),(0,G.jsx)(`button`,{style:{background:`none`,border:`none`,color:`var(--primary)`,fontSize:`12px`,fontWeight:600,cursor:`pointer`},onClick:()=>f(!1),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f(!1))},"aria-label":`Show resolved conversation`,children:`Show resolved`})]}):h?(0,G.jsx)(`div`,{className:`comment-bubble-canvas`,id:`comment-${e.id}`,role:`article`,"aria-label":`Edit comment`,children:(0,G.jsxs)(`div`,{className:`comment-node`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(qU,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`1px 5px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`1px 5px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]})]})]}),(0,G.jsx)(`div`,{style:{marginTop:`8px`},children:(0,G.jsx)(KU,{draftKey:`edit:${e.id}`,initialBody:e.body,lineContent:e.lineContent,onSubmit:t=>{l(e.id,t),g(!1)},onCancel:()=>g(!1)})})]})]})}):(0,G.jsxs)(`div`,{className:`comment-bubble-canvas ${u?`comment-bubble-canvas-resolved`:``}`,id:`comment-${e.id}`,role:`article`,"aria-label":e.lineNumber===0?`File-level comment`:`Comment by user on line ${e.lineNumber}`,children:[(0,G.jsxs)(`div`,{className:`comment-node ${u?`comment-node-resolved`:``}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(qU,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),e.lineNumber===0&&(0,G.jsx)(`span`,{style:{padding:`1px 5px`,background:`var(--accent-subtle)`,border:`1px solid var(--primary)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:700,color:`var(--primary)`,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`File Comment`}),e.startLineNumber&&e.startLineNumber!==e.lineNumber&&(0,G.jsxs)(`span`,{style:{padding:`1px 5px`,background:`var(--bg-primary)`,border:`1px solid var(--border-color)`,borderRadius:`var(--radius-sm)`,fontSize:`10px`,fontWeight:600,fontFamily:`var(--font-mono)`,color:`var(--text-secondary)`},children:[`L`,e.startLineNumber,`-`,e.lineNumber]})]}),u&&(0,G.jsxs)(`span`,{className:`comment-canvas-resolved-banner`,style:{marginLeft:`8px`},children:[(0,G.jsx)(LD,{size:13}),`Resolved`]}),!u&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{ref:x,className:`comment-node-btn`,onClick:()=>g(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(!0))},title:`Edit comment`,"aria-label":`Edit comment`,tabIndex:0,children:(0,G.jsx)(hO,{size:13,"aria-hidden":`true`})}),_?(0,G.jsxs)(`div`,{className:`comment-delete-confirm`,style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsxs)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>t(e.id),title:`Confirm delete`,"aria-label":`Confirm delete comment`,style:{color:`var(--danger)`,background:`var(--feedback-danger-bg)`,fontWeight:600,fontSize:`11px`,borderRadius:`var(--radius-sm)`,border:`1px solid var(--feedback-danger-border)`,padding:`2px 6px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`2px`,width:`auto`,height:`auto`},children:[(0,G.jsx)(EO,{size:11}),`Delete?`]}),(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>v(!1),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(!1))},title:`Cancel delete`,"aria-label":`Cancel delete`,style:{fontSize:`11px`,padding:`2px 6px`,width:`auto`,height:`auto`},children:`Cancel`})]}):(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>v(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(!0))},title:`Delete comment`,"aria-label":`Delete comment`,tabIndex:0,children:(0,G.jsx)(TO,{size:13,"aria-hidden":`true`})})]})]}),S&&(0,G.jsx)(JH,{content:e.body,className:`comment-node-body markdown-body ${u?`comment-resolved-line`:``}`}),(()=>{let t=e.body.match(/```suggestion\n([\s\S]*?)```/),n=!!t&&e.side===`additions`,r=t?t[1].trimEnd():``;return n?(0,G.jsxs)(`div`,{className:`suggestion-card`,style:{marginTop:`12px`,marginBottom:`4px`,border:`1px solid var(--border-normal)`,borderRadius:`var(--radius-md)`,overflow:`hidden`,background:`var(--bg-primary)`,boxShadow:`var(--shadow-sm)`},children:[(0,G.jsxs)(`div`,{className:`suggestion-header`,style:{padding:`8px 12px`,background:`var(--bg-secondary)`,borderBottom:`1px solid var(--border-normal)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:`12px`,fontWeight:600},children:[(0,G.jsx)(`span`,{style:{color:`var(--text-secondary)`},children:`Suggested Change`}),u?(0,G.jsxs)(`span`,{style:{color:`var(--feedback-success-text)`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsx)(LD,{size:12}),` Applied`]}):(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:async()=>{try{await c(e.id)}catch(e){alert(e.message)}},style:{fontSize:`11px`,padding:`2px 8px`,borderRadius:`var(--radius-sm)`,height:`24px`},children:`Apply Suggestion`})]}),(0,G.jsxs)(`div`,{className:`suggestion-diff`,style:{display:`flex`,flexDirection:`column`,fontSize:`12px`,fontFamily:`var(--font-mono)`,overflowX:`auto`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-danger-bg)`,borderBottom:`1px dashed var(--border-color)`,color:`var(--feedback-danger-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`-`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:e.lineContent})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,padding:`8px 12px`,background:`var(--feedback-success-bg)`,color:`var(--feedback-success-text)`,minWidth:`max-content`},children:[(0,G.jsx)(`span`,{style:{width:`20px`,userSelect:`none`,opacity:.5},children:`+`}),(0,G.jsx)(`span`,{style:{whiteSpace:`pre`},children:r})]})]})]}):null})()]})]}),e.replies?.length>0&&(0,G.jsx)(`div`,{className:`comment-replies`,role:`list`,"aria-label":`Replies`,children:e.replies.map((t,n)=>{let r=t.role===`agent`,i=y===t.id;return(0,G.jsxs)(`div`,{className:`comment-node ${r?`comment-node-agent`:`comment-node-user`} ${u?`comment-node-resolved`:``}`,role:`listitem`,"aria-label":`${r?`Agent`:`User`} reply ${n+1}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(qU,{role:r?`agent`:`user`,size:14})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:r?`Agent`:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge ${r?`comment-node-badge-agent`:`comment-node-badge-user`}`,children:r?`Agent`:`User`}),r&&t.model&&(0,G.jsx)(`span`,{style:{fontSize:`10px`,fontWeight:600,padding:`1px 5px`,borderRadius:`4px`,background:`var(--bg-tertiary)`,color:`var(--text-secondary)`,fontFamily:`var(--font-mono)`},children:t.model}),(0,G.jsx)(`span`,{className:`comment-node-time`,children:eE(t.createdAt)}),!u&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>T(t.id),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),T(t.id))},title:`Edit reply`,"aria-label":`Edit reply`,tabIndex:0,children:(0,G.jsx)(hO,{size:12,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>E(t.id),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),E(t.id))},title:`Delete reply`,"aria-label":`Delete reply`,tabIndex:0,children:(0,G.jsx)(TO,{size:12,"aria-hidden":`true`})})]})]}),i?(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`6px`},children:(0,G.jsx)(KU,{draftKey:`reply-edit:${e.id}:${t.id}`,initialBody:t.body,onSubmit:n=>{s(e.id,t.id,n),b(null)},onCancel:()=>b(null)})}):(0,G.jsx)(JH,{content:t.body,className:`comment-node-body markdown-body`})]})]},t.id)})}),(0,G.jsxs)(`div`,{className:`comment-canvas-footer`,children:[!p&&(0,G.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,G.jsxs)(`button`,{onClick:()=>m(!0),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),m(!0))},className:`comment-reply-trigger`,"aria-label":`Write a reply`,tabIndex:0,style:{width:`100%`,maxWidth:`320px`},children:[(0,G.jsx)(vO,{size:14,"aria-hidden":`true`}),`Reply...`]}),u?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,marginLeft:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:()=>f(!0),style:{fontSize:`12px`,padding:`4px 10px`},"aria-label":`Hide resolved conversation`,children:`Hide`}),(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:w,style:{fontSize:`12px`,padding:`4px 10px`},"aria-label":`Unresolve conversation`,children:`Unresolve`})]}):(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:C,style:{fontSize:`12px`,padding:`4px 10px`,marginLeft:`12px`},"aria-label":`Resolve conversation`,children:`Resolve conversation`})]}),p&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`4px`},children:(0,G.jsx)(KU,{draftKey:`reply:${e.id}`,onSubmit:t=>{a(e.id,t),m(!1)},onCancel:()=>{m(!1),x.current?.focus()}})})]})]})}var YU=(0,W.memo)(function({id:e,fileDiff:t,filePath:n,annotations:r,diffStyle:i,tabSize:a,viewed:o,theme:s,editorIDE:c,lineDiffType:l,lineWrap:u,diffIndicators:d,showLineNumbers:f,hunkSeparators:p,lineHoverHighlight:m,fontSize:h,monoFontFamily:g,expandContextByDefault:_,collapsedContextThreshold:v,expansionLineCount:y,onViewedChange:b,onAddComment:x,onDeleteComment:S}){let[C,w]=(0,W.useState)(null),[T,E]=(0,W.useState)(null),[D,O]=(0,W.useState)(0),[k,A]=(0,W.useState)(null),[j,M]=(0,W.useState)(!1),[N,P]=(0,W.useState)(o),[F,I]=(0,W.useState)(!1),[L,R]=(0,W.useState)(!1),[z,ee]=(0,W.useState)(_),[te,B]=(0,W.useState)(null),[V,H]=(0,W.useState)(null),[ne,re]=(0,W.useState)(null),ie=(0,W.useRef)(null),ae=e=>{e.stopPropagation(),!(typeof navigator>`u`||!navigator.clipboard)&&navigator.clipboard.writeText(n).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)},()=>{})},oe=async(e,t=!1)=>{if(te===null&&!(!t&&typeof window<`u`&&!window.confirm(`Revert hunk #${e+1} in ${n}? This rewrites the file via "git apply --reverse".`))){B(e),H(null);try{let t=await fetch(`/api/revert-hunk`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:n,hunkIndex:e})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`HTTP ${t.status}`)}}catch(e){H(e.message)}finally{B(null)}}},se=t.type===`change`||t.type===`rename-changed`,ce=!N&&se,{loading:le,oldContent:ue,newContent:U}=IU(n,z&&ce),de=z&&ue!==null&&U!==null,fe=t.prevName??n;(0,W.useEffect)(()=>{P(o)},[o]);let pe=nE[s]||nE.nord,me=(0,W.useMemo)(()=>ZU(a,h,g),[a,h,g]),he=(e,n,r)=>{let i=r&&r!==n?r:n,a=n,o=[];for(let n=i;n<=a;n++){let r=e===`additions`?t.additionLines:t.deletionLines,i=e===`additions`?`additionStart`:`deletionStart`,a=e===`additions`?`additionCount`:`deletionCount`,s=e===`additions`?`additionLineIndex`:`deletionLineIndex`,c=!1;for(let e of t.hunks){let t=e[i],l=e[a];if(n>=t&&n<t+l){let i=e[s]+(n-t);o.push(r[i]??``),c=!0;break}}c||o.push(``)}return o.join(`
|
|
1935
|
+
`)},ge=async e=>{if(e.stopPropagation(),t.type!==`deleted`){I(!0);try{await fetch(`/api/open-file`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:n,editor:c})})}catch(e){console.error(`Failed to open file in IDE editor:`,e)}finally{I(!1)}}},_e=()=>{switch(t.type){case`new`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-new`,children:`Added`});case`deleted`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-deleted`,children:`Deleted`});case`rename-pure`:case`rename-changed`:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-renamed`,children:`Renamed`});default:return(0,G.jsx)(`span`,{className:`diff-status-badge diff-status-modified`,children:`Modified`})}},ve=r.filter(e=>e.lineNumber===0),ye=r.filter(e=>e.lineNumber>0),be=e=>`_pending`in e.metadata?(0,G.jsx)(KU,{draftKey:`new:${n}:${C.side}:${C.startLineNumber||C.lineNumber}:${C.lineNumber}`,lineContent:he(C.side,C.lineNumber,C.startLineNumber),onSubmit:e=>{let t=he(C.side,C.lineNumber,C.startLineNumber);x(n,C.side,C.lineNumber,t,e,C.startLineNumber),w(null),E(null)},onCancel:()=>{w(null),E(null)}}):(0,G.jsx)(JU,{comment:e.metadata,onDelete:S}),xe=e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&w({side:t.side,lineNumber:t.lineNumber})},children:`+`}),Se=[...ye,...C?[{side:C.side,lineNumber:C.lineNumber,metadata:{_pending:!0}}]:[]];return(0,G.jsxs)(`div`,{ref:ie,className:`file-diff-card ${o?`file-diff-viewed`:``} ${N?`file-diff-collapsed`:``}`,id:e,children:[(0,G.jsxs)(`div`,{className:`file-diff-card-header`,onClick:()=>P(!N),children:[(0,G.jsxs)(`div`,{className:`file-diff-header-left`,children:[(0,G.jsx)(`span`,{className:`file-diff-collapse-indicator`,children:N?(0,G.jsx)(PD,{size:14}):(0,G.jsx)(MD,{size:14})}),(0,G.jsx)(`span`,{className:`file-diff-name`,title:n,children:n}),(0,G.jsx)(`button`,{className:`file-diff-copy-path-btn`,onClick:ae,title:`Copy file path to clipboard`,"aria-label":`Copy file path to clipboard`,children:j?(0,G.jsx)(jD,{size:12}):(0,G.jsx)(UD,{size:12})}),_e(),ye.length>0&&(0,G.jsxs)(`span`,{className:`file-diff-comment-badge`,title:`${ye.length} inline comment${ye.length===1?``:`s`}`,children:[(0,G.jsx)(cO,{size:10}),ye.length]}),D>0&&(0,G.jsxs)(`span`,{className:`file-diff-selection-badge`,"aria-live":`polite`,children:[D,` line`,D===1?``:`s`,` selected`]}),j&&(0,G.jsx)(`span`,{className:`file-diff-permalink-flash`,role:`status`,children:`Copied path`}),k&&(0,G.jsxs)(`span`,{className:`file-diff-permalink-flash`,role:`status`,children:[`Copied `,k]})]}),(0,G.jsxs)(`div`,{className:`file-diff-header-right`,onClick:e=>e.stopPropagation(),children:[ce&&(0,G.jsxs)(`button`,{className:`file-diff-edit-btn ${z?`btn-active`:``}`,onClick:()=>ee(e=>!e),disabled:le,title:z?`Hide unchanged context (use original patch render)`:`Load full file so unchanged context becomes expandable`,children:[le?(0,G.jsx)(nO,{size:11,className:`spin`}):(0,G.jsx)(rO,{size:11}),(0,G.jsx)(`span`,{children:le?`Loading…`:z?`Hide Context`:`Expand Context`})]}),t.type!==`deleted`&&(0,G.jsxs)(`button`,{className:`file-diff-edit-btn`,onClick:ge,disabled:F,title:`Open and edit full file locally`,children:[(0,G.jsx)(mO,{size:11}),(0,G.jsx)(`span`,{children:F?`Opening...`:`Edit File`})]}),(0,G.jsxs)(`button`,{className:`file-diff-edit-btn`,onClick:()=>{P(!1),R(!0)},title:`Comment on this entire file`,children:[(0,G.jsx)(cO,{size:11}),(0,G.jsx)(`span`,{children:`Add Comment`})]}),(0,G.jsxs)(`label`,{className:`viewed-label ${o?`viewed-checked`:``}`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>b(n,e.target.checked)}),`Viewed`]})]})]}),!N&&t.hunks.length>0&&(0,G.jsxs)(`div`,{className:`file-diff-hunk-actions`,onClick:e=>e.stopPropagation(),children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,G.jsx)(`span`,{className:`file-diff-hunk-actions-label`,style:{display:`inline-flex`,alignItems:`center`,gap:`4px`},children:`Selective Revert`}),(0,G.jsx)($T,{content:`Selective Revert lets you preview and undo specific blocks of changes (hunks) in this file using 'git apply --reverse'.`,side:`top`,children:(0,G.jsx)(RD,{size:12,style:{color:`var(--text-muted)`,cursor:`help`}})}),(0,G.jsx)(`span`,{style:{color:`var(--text-muted)`,fontSize:`11px`,margin:`0 4px`},children:`·`}),(0,G.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`11px`},children:[t.hunks.length,` block`,t.hunks.length===1?``:`s`,` available`]})]}),(0,G.jsx)(`div`,{className:`file-diff-hunk-actions-buttons`,children:t.hunks.map((e,t)=>(0,G.jsxs)(`button`,{type:`button`,className:`file-diff-hunk-revert-btn`,onClick:()=>re(t),disabled:te!==null,title:`Preview and revert hunk #${t+1} (lines @${e.additionStart}+${e.additionLines??e.additionCount})`,children:[te===t?(0,G.jsx)(nO,{size:10,className:`spin`}):(0,G.jsx)(OO,{size:10}),(0,G.jsxs)(`span`,{children:[`Hunk #`,t+1]})]},t))}),V&&(0,G.jsxs)(`span`,{className:`file-diff-hunk-error`,role:`alert`,children:[(0,G.jsx)(ID,{size:11}),V]})]}),ne!==null&&(()=>{let e=t.hunks[ne];if(!e)return null;let r=t.deletionLines.slice(e.deletionLineIndex,e.deletionLineIndex+(e.deletionCount??e.deletionLines??0)),i=t.additionLines.slice(e.additionLineIndex,e.additionLineIndex+(e.additionStart!==void 0&&e.additionLines!==void 0?e.additionLines:e.additionCount??0));return(0,G.jsxs)(PU,{open:ne!==null,onClose:()=>re(null),className:`hunk-revert-modal`,ariaLabel:`Selective Revert Preview Hunk #${ne+1}`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(OO,{size:18,className:`shortcuts-icon`}),(0,G.jsxs)(`h2`,{children:[`Revert Hunk #`,ne+1]})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:()=>re(null),"aria-label":`Close dialog`,children:(0,G.jsx)(AO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,children:[(0,G.jsxs)(`div`,{className:`hunk-preview-intro`,children:[`Reverting this hunk will restore the deleted (`,(0,G.jsx)(`span`,{style:{color:`var(--feedback-danger-text)`,fontWeight:600},children:`red`}),`) lines and remove the added (`,(0,G.jsx)(`span`,{style:{color:`var(--feedback-success-text)`,fontWeight:600},children:`green`}),`) lines from `,(0,G.jsx)(`strong`,{children:n.split(`/`).pop()}),`.`]}),(0,G.jsxs)(`div`,{className:`hunk-preview-container`,children:[(0,G.jsxs)(`div`,{className:`hunk-preview-header`,children:[(0,G.jsx)(`span`,{children:n}),(0,G.jsxs)(`span`,{children:[`Lines: @-`,e.deletionStart,`,`,e.deletionCount??e.deletionLines??0,` @+`,e.additionStart,`,`,e.additionLines??e.additionCount??0]})]}),(0,G.jsxs)(`div`,{className:`hunk-preview-code`,children:[r.map((e,t)=>(0,G.jsxs)(`div`,{className:`hunk-preview-line hunk-preview-line-deletion`,children:[(0,G.jsx)(`span`,{className:`hunk-preview-sign`,children:`-`}),(0,G.jsx)(`span`,{className:`hunk-preview-text`,children:e})]},`del-${t}`)),i.map((e,t)=>(0,G.jsxs)(`div`,{className:`hunk-preview-line hunk-preview-line-addition`,children:[(0,G.jsx)(`span`,{className:`hunk-preview-sign`,children:`+`}),(0,G.jsx)(`span`,{className:`hunk-preview-text`,children:e})]},`add-${t}`)),r.length===0&&i.length===0&&(0,G.jsx)(`div`,{className:`hunk-preview-line`,style:{fontStyle:`italic`,color:`var(--text-muted)`},children:`No changes in this hunk.`})]})]}),(0,G.jsx)(XU,{filePath:n,deletionStart:e.deletionStart,deletionCount:e.deletionCount??e.deletionLines??0})]}),(0,G.jsxs)(`div`,{className:`modal-footer`,children:[(0,G.jsx)(`button`,{className:`hunk-revert-btn-secondary`,onClick:()=>re(null),children:`Cancel`}),(0,G.jsx)(`button`,{className:`hunk-revert-btn-primary`,onClick:async()=>{let e=ne;re(null),await oe(e,!0)},children:`Revert Changes`})]})]})})(),!N&&(0,G.jsxs)(`div`,{className:`file-diff-card-body`,children:[(ve.length>0||L)&&(0,G.jsxs)(`div`,{className:`file-level-comments-section`,style:{margin:`16px 20px`,padding:`12px`,background:`rgba(255,255,255,0.02)`,border:`1px solid var(--border-color)`,borderRadius:`8px`,display:`flex`,flexDirection:`column`,gap:`12px`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,fontSize:`13px`,fontWeight:600,color:`var(--text-secondary)`},children:[(0,G.jsx)(cO,{size:14}),(0,G.jsxs)(`span`,{children:[`File-Level Comments (`,ve.length,`)`]})]}),ve.length>0&&(0,G.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:ve.map(e=>(0,G.jsx)(JU,{comment:e.metadata,onDelete:S},e.metadata.id))}),L&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`6px`,border:`1px solid var(--border-color)`},children:(0,G.jsx)(KU,{draftKey:`file-comment:${n}`,lineContent:``,onSubmit:e=>{x(n,`additions`,0,``,e),R(!1)},onCancel:()=>R(!1)})})]}),de?(0,G.jsx)(Xg,{oldFile:{name:fe,contents:ue??``},newFile:{name:n,contents:U??``},options:{diffStyle:i,enableGutterUtility:!0,enableLineSelection:!0,disableFileHeader:!0,lineDiffType:l,overflow:u?`wrap`:`scroll`,diffIndicators:d,disableLineNumbers:!f,hunkSeparators:p,lineHoverHighlight:m,expandUnchanged:!1,collapsedContextThreshold:v,expansionLineCount:y,onLineSelectionStart:()=>{E(null),O(0)},onLineSelectionChange:e=>{O(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{O(0),e&&(E(e),w({side:e.endSide||`additions`,lineNumber:e.end,startLineNumber:e.start}))},onLineNumberClick:e=>{let t=`${n}:${e.annotationSide===`deletions`?`-`:`+`}${e.lineNumber}`;navigator.clipboard?.writeText(t).then(()=>{A(t),setTimeout(()=>A(null),1600)},()=>{})},theme:{dark:pe.type===`dark`?pe.themeName:`nord`,light:pe.type===`light`?pe.themeName:`github-light`},themeType:pe.type,unsafeCSS:me},selectedLines:T,lineAnnotations:Se,renderHeaderMetadata:()=>null,renderAnnotation:be,renderGutterUtility:xe}):(0,G.jsx)(Yg,{fileDiff:t,options:{diffStyle:i,enableGutterUtility:!0,enableLineSelection:!0,disableFileHeader:!0,lineDiffType:l,overflow:u?`wrap`:`scroll`,diffIndicators:d,disableLineNumbers:!f,hunkSeparators:p,lineHoverHighlight:m,onLineSelectionStart:()=>{E(null),O(0)},onLineSelectionChange:e=>{O(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{O(0),e&&(E(e),w({side:e.endSide||`additions`,lineNumber:e.end,startLineNumber:e.start}))},onLineNumberClick:e=>{let t=`${n}:${e.annotationSide===`deletions`?`-`:`+`}${e.lineNumber}`;navigator.clipboard?.writeText(t).then(()=>{A(t),setTimeout(()=>A(null),1600)},()=>{})},theme:{dark:pe.type===`dark`?pe.themeName:`nord`,light:pe.type===`light`?pe.themeName:`github-light`},themeType:pe.type,unsafeCSS:me},selectedLines:T,lineAnnotations:Se,renderHeaderMetadata:()=>null,renderAnnotation:e=>`_pending`in e.metadata?(0,G.jsx)(KU,{draftKey:`new:${n}:${C.side}:${C.startLineNumber||C.lineNumber}:${C.lineNumber}`,lineContent:he(C.side,C.lineNumber,C.startLineNumber),onSubmit:e=>{let t=he(C.side,C.lineNumber,C.startLineNumber);x(n,C.side,C.lineNumber,t,e,C.startLineNumber),w(null),E(null)},onCancel:()=>{w(null),E(null)}}):(0,G.jsx)(JU,{comment:e.metadata,onDelete:S}),renderGutterUtility:e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&w({side:t.side,lineNumber:t.lineNumber})},children:`+`})})]})]})});function XU({filePath:e,deletionStart:t,deletionCount:n}){let[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(!1),[s,c]=(0,W.useState)(null);if((0,W.useEffect)(()=>{let r=!0;return(async()=>{o(!0),c(null);try{let a=new URLSearchParams({filePath:e,deletionStart:String(t),deletionCount:String(n)}),o=await fetch(`/api/hunk-history?${a}`);if(!o.ok)throw Error(`HTTP ${o.status}`);let s=await o.json();r&&i(s)}catch(e){r&&c(e.message||`Failed to fetch hunk history`)}finally{r&&o(!1)}})(),()=>{r=!1}},[e,t,n]),a)return(0,G.jsxs)(`div`,{className:`hunk-history-loading`,children:[(0,G.jsx)(nO,{size:14,className:`spin`,style:{marginRight:`8px`}}),(0,G.jsx)(`span`,{children:`Loading git history & origin blame…`})]});if(s)return(0,G.jsxs)(`div`,{className:`hunk-history-error`,children:[(0,G.jsx)(ID,{size:14,style:{color:`var(--feedback-danger-text)`,marginRight:`8px`}}),(0,G.jsxs)(`span`,{children:[`Failed to load git history: `,s]})]});if(!r)return null;let l=Array.from(new Map(r.blame.map(e=>[e.commit,e])).values());return(0,G.jsxs)(`div`,{className:`hunk-history-section`,children:[l.length>0&&(0,G.jsxs)(`div`,{className:`hunk-history-block`,children:[(0,G.jsx)(`h3`,{className:`hunk-history-title`,children:`Commit(s) introducing deleted lines`}),(0,G.jsx)(`div`,{className:`hunk-history-commits`,children:l.map(e=>(0,G.jsxs)(`div`,{className:`hunk-history-commit-card`,children:[(0,G.jsxs)(`div`,{className:`hunk-history-commit-header`,children:[(0,G.jsx)(`span`,{className:`hunk-history-commit-hash`,children:e.commit}),(0,G.jsxs)(`span`,{className:`hunk-history-commit-author`,children:[(0,G.jsx)(kO,{size:11}),(0,G.jsx)(`span`,{children:e.author})]}),(0,G.jsxs)(`span`,{className:`hunk-history-commit-date`,children:[(0,G.jsx)(VD,{size:11}),(0,G.jsx)(`span`,{children:e.date})]})]}),(0,G.jsx)(`div`,{className:`hunk-history-commit-msg`,children:e.summary})]},e.commit))})]}),r.recentCommits.length>0&&(0,G.jsxs)(`div`,{className:`hunk-history-block`,children:[(0,G.jsx)(`h3`,{className:`hunk-history-title`,children:`Recent File Modification History`}),(0,G.jsx)(`div`,{className:`hunk-history-log`,children:r.recentCommits.map(e=>(0,G.jsxs)(`div`,{className:`hunk-history-log-row`,children:[(0,G.jsx)(`span`,{className:`hunk-history-log-hash`,children:e.hash}),(0,G.jsx)(`span`,{className:`hunk-history-log-msg`,title:e.summary,children:e.summary}),(0,G.jsx)(`span`,{className:`hunk-history-log-author`,children:e.author}),(0,G.jsx)(`span`,{className:`hunk-history-log-date`,children:e.date})]},e.hash))})]})]})}function ZU(e,t,n){return`
|
|
1936
1936
|
:host {
|
|
1937
1937
|
--diffs-tab-size: ${e} !important;
|
|
1938
1938
|
--diffs-font-family: ${n} !important;
|
|
@@ -1994,7 +1994,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
1994
1994
|
overflow-wrap: break-word !important;
|
|
1995
1995
|
min-width: 0 !important;
|
|
1996
1996
|
}
|
|
1997
|
-
`}var
|
|
1997
|
+
`}var QU=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.bmp`,`.svg`,`.ico`,`.avif`]);function $U(e){let t=e.slice(e.lastIndexOf(`.`)).toLowerCase();return QU.has(t)}function eW({filePath:e,info:t,viewed:n,onViewedChange:r}){let i=$U(e);return(0,G.jsxs)(`div`,{className:`file-diff-card ${n?`file-diff-viewed`:``}`,id:`file-${e}`,children:[(0,G.jsxs)(`div`,{className:`binary-diff-header`,children:[(0,G.jsx)(`span`,{className:`binary-diff-name`,children:e}),(0,G.jsxs)(`label`,{className:`viewed-label`,onClick:e=>e.stopPropagation(),children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:n,onChange:t=>r(e,t.target.checked)}),`Viewed`]})]}),!n&&(0,G.jsx)(`div`,{className:`binary-diff-body`,children:i?(0,G.jsx)(tW,{filePath:e,changeType:t.type}):(0,G.jsxs)(`div`,{className:`binary-diff-message`,children:[`Binary file `,t.type===`added`?`added`:t.type===`untracked`?`untracked`:t.type===`deleted`?`deleted`:`changed`]})})]})}function tW({filePath:e,changeType:t}){let n=`/api/file-content?path=${encodeURIComponent(e)}&version=old`,r=`/api/file-content?path=${encodeURIComponent(e)}&version=new`;return t===`added`||t===`untracked`?(0,G.jsx)(`div`,{className:`image-preview`,children:(0,G.jsxs)(`div`,{className:`image-preview-panel`,children:[(0,G.jsx)(`div`,{className:`image-preview-label image-preview-label-added`,children:`Added`}),(0,G.jsx)(`img`,{src:r,alt:e,className:`image-preview-img`})]})}):t===`deleted`?(0,G.jsx)(`div`,{className:`image-preview`,children:(0,G.jsxs)(`div`,{className:`image-preview-panel`,children:[(0,G.jsx)(`div`,{className:`image-preview-label image-preview-label-deleted`,children:`Deleted`}),(0,G.jsx)(`img`,{src:n,alt:e,className:`image-preview-img image-preview-deleted`})]})}):(0,G.jsxs)(`div`,{className:`image-preview image-preview-compare`,children:[(0,G.jsxs)(`div`,{className:`image-preview-panel`,children:[(0,G.jsx)(`div`,{className:`image-preview-label`,children:`Before`}),(0,G.jsx)(`img`,{src:n,alt:`${e} (before)`,className:`image-preview-img`})]}),(0,G.jsxs)(`div`,{className:`image-preview-panel`,children:[(0,G.jsx)(`div`,{className:`image-preview-label`,children:`After`}),(0,G.jsx)(`img`,{src:r,alt:`${e} (after)`,className:`image-preview-img`})]})]})}var nW=[],rW=(0,W.memo)(function({files:e,diffStyle:t,tabSizeMap:n,defaultTabSize:r,viewedFiles:i,binaryFiles:a,theme:o,editorIDE:s,lineDiffType:c,lineWrap:l,diffIndicators:u,showLineNumbers:d,hunkSeparators:f,lineHoverHighlight:p,fontSize:m,monoFontFamily:h,expandContextByDefault:g,collapsedContextThreshold:_,expansionLineCount:v,onViewedChange:y,fileAnnotationsMap:b,onAddComment:x,onDeleteComment:S}){let C=(0,W.useMemo)(()=>[...e].sort((e,t)=>{let n=e.name.split(`/`),r=t.name.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=e<n.length-1;if(t!==e<r.length-1)return t?-1:1;let i=n[e].localeCompare(r[e]);if(i!==0)return i}return n.length-r.length}),[e]);return C.length===0?(0,G.jsx)(`div`,{className:`empty-state`,children:(0,G.jsx)(`p`,{children:`No changes found.`})}):(0,G.jsx)(`div`,{className:`diff-viewer`,children:C.map((e,C)=>{let w=e.name,T=a.get(w);return T?(0,G.jsx)(eW,{filePath:w,info:T,viewed:i.has(w),onViewedChange:y},`${w}-${C}`):(0,G.jsx)(YU,{id:`file-${w}`,fileDiff:e,filePath:w,annotations:b.get(w)??nW,diffStyle:t,tabSize:n[w]??r,viewed:i.has(w),theme:o,editorIDE:s,lineDiffType:c,lineWrap:l,diffIndicators:u,showLineNumbers:d,hunkSeparators:f,lineHoverHighlight:p,fontSize:m,monoFontFamily:h,expandContextByDefault:g,collapsedContextThreshold:_,expansionLineCount:v,onViewedChange:y,onAddComment:x,onDeleteComment:S},`${w}-${C}`)})})}),iW={current:{label:`Current`,icon:jD,title:`Keep the current/HEAD side`},incoming:{label:`Incoming`,icon:AO,title:`Keep the incoming side`},both:{label:`Both`,icon:gO,title:`Keep both sides (current then incoming)`}},aW=(0,W.memo)(function({filePath:e,theme:t,fontSize:n,monoFontFamily:r,tabSize:i,onSaved:a}){let o=nE[t]||nE.nord,[s,c]=(0,W.useState)({loading:!0,error:null,file:null}),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(0),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(!1),y=(0,W.useRef)(null);(0,W.useEffect)(()=>{let t=!1;return c({loading:!0,error:null,file:null}),u(null),f(0),v(!1),g(null),fetch(`/api/file-text?path=${encodeURIComponent(e)}&version=new`).then(e=>e.json()).then(n=>{if(!t){if(n.error){c({loading:!1,error:n.error,file:null});return}c({loading:!1,error:null,file:{name:e,contents:n.content??``}})}}).catch(e=>{t||c({loading:!1,error:e.message,file:null})}),()=>{t=!0}},[e]);let b=(e,t)=>{let n=y.current;if(!n)return;let r=n.resolveConflict(e,t);r&&r.file&&(u(r.file),f(e=>e+1))};return s.loading?(0,G.jsxs)(`div`,{className:`merge-conflict-card merge-conflict-card-loading`,children:[(0,G.jsx)(nO,{size:14,className:`spin`}),(0,G.jsxs)(`span`,{children:[`Loading `,e,`…`]})]}):s.error||!s.file?(0,G.jsxs)(`div`,{className:`merge-conflict-card merge-conflict-card-error`,children:[(0,G.jsx)(ID,{size:14}),(0,G.jsxs)(`span`,{children:[`Could not load `,e,`: `,s.error??`unknown error`]})]}):(0,G.jsxs)(`div`,{className:`merge-conflict-card`,children:[(0,G.jsxs)(`div`,{className:`merge-conflict-header`,children:[(0,G.jsxs)(`div`,{className:`merge-conflict-title`,children:[(0,G.jsx)(ZD,{size:14}),(0,G.jsx)(`span`,{className:`merge-conflict-name`,title:e,children:e})]}),(0,G.jsxs)(`div`,{className:`merge-conflict-actions`,children:[d>0&&(0,G.jsxs)(`span`,{className:`merge-conflict-status`,children:[d,` resolution`,d===1?``:`s`,` pending`]}),(0,G.jsxs)(`button`,{className:`file-diff-edit-btn`,onClick:async()=>{let t=l??s.file;if(t){m(!0),g(null);try{let n=await fetch(`/api/save-file`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({filePath:e,content:t.contents,gitAdd:!0})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`HTTP ${n.status}`)}v(!0),a()}catch(e){g(e.message)}finally{m(!1)}}},disabled:p||_,title:"Write the resolved file to disk and `git add` it",children:[p?(0,G.jsx)(nO,{size:11,className:`spin`}):_?(0,G.jsx)(LD,{size:11}):(0,G.jsx)(bO,{size:11}),(0,G.jsx)(`span`,{children:p?`Saving…`:_?`Saved + staged`:`Save & stage`})]})]})]}),h&&(0,G.jsxs)(`div`,{className:`merge-conflict-card-error`,role:`alert`,children:[(0,G.jsx)(ID,{size:14}),(0,G.jsx)(`span`,{children:h})]}),(0,G.jsx)(k_,{file:l??s.file,options:{disableFileHeader:!0,enableGutterUtility:!1,mergeConflictActionsType:`custom`,theme:{dark:o.type===`dark`?o.themeName:`nord`,light:o.type===`light`?o.themeName:`github-light`},themeType:o.type,unsafeCSS:`
|
|
1998
1998
|
:host {
|
|
1999
1999
|
--diffs-tab-size: ${i} !important;
|
|
2000
2000
|
--diffs-font-family: ${r} !important;
|
|
@@ -2007,7 +2007,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
2007
2007
|
font-variant-ligatures: common-ligatures !important;
|
|
2008
2008
|
font-feature-settings: "liga" on, "calt" on !important;
|
|
2009
2009
|
}
|
|
2010
|
-
`},renderMergeConflictUtility:(e,t)=>{let n=t();return n&&(y.current=n),(0,G.jsx)(`div`,{className:`merge-conflict-buttons`,children:[`current`,`incoming`,`both`].map(t=>{let{label:n,icon:r,title:i}=
|
|
2010
|
+
`},renderMergeConflictUtility:(e,t)=>{let n=t();return n&&(y.current=n),(0,G.jsx)(`div`,{className:`merge-conflict-buttons`,children:[`current`,`incoming`,`both`].map(t=>{let{label:n,icon:r,title:i}=iW[t];return(0,G.jsxs)(`button`,{type:`button`,className:`merge-conflict-btn merge-conflict-btn-${t}`,title:i,onClick:()=>b(e.conflictIndex,t),children:[(0,G.jsx)(r,{size:11}),(0,G.jsx)(`span`,{children:n})]},t)})})}})]})}),oW=`file-tree-container`,sW=`data-file-tree-style`,cW=`data-file-tree-unsafe-css`,lW=`data-file-tree-scrollbar-measure`,uW=`data-file-tree-scrollbar-gutter-measured`,dW=`--trees-scrollbar-gutter-measured`,fW=`header`,pW=`context-menu`,mW=`context-menu-trigger`,hW=typeof window>`u`?W.useEffect:W.useLayoutEffect;function gW(e,t,n){let r=e==null?null:(0,G.jsx)(`div`,{slot:fW,children:e}),i=t!=null&&n!=null?(0,G.jsx)(`div`,{slot:pW,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,G.jsxs)(G.Fragment,{children:[r,i]})}function _W(e,t){return typeof window>`u`&&t!=null?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,G.jsx)(G.Fragment,{children:e})}function vW(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement?!0:e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function yW(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function bW({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(null),u=(0,W.useRef)(n.getComposition()),d=(0,W.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,W.useCallback)(()=>{s(null)},[]),m=(0,W.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,W.useMemo)(()=>yW(h,e,f,p,m),[h,p,m,f,e]),_=(0,W.useCallback)(e=>{l(e)},[]);(0,W.useEffect)(()=>{f||s(null)},[f]),hW(()=>{n.setComposition(g)},[g,n]),hW(()=>{if(c!=null)return r!=null&&vW(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=_W(gW(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,G.jsx)(oW,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}var xW=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
2011
2011
|
<symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
|
|
2012
2012
|
<path d="M12.4697 5.46973C12.7626 5.17684 13.2374 5.17684 13.5303 5.46973C13.8232 5.76262 13.8232 6.23738 13.5303 6.53028L8.53028 11.5303C8.23738 11.8232 7.76262 11.8232 7.46973 11.5303L2.46973 6.53028C2.17684 6.23738 2.17684 5.76262 2.46973 5.46973C2.76262 5.17684 3.23738 5.17684 3.53028 5.46973L8 9.93946L12.4697 5.46973Z" fill="currentcolor"/>
|
|
2013
2013
|
</symbol>
|
|
@@ -2024,72 +2024,72 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
2024
2024
|
<symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
|
|
2025
2025
|
<path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
|
|
2026
2026
|
</symbol>
|
|
2027
|
-
</svg>`,
|
|
2027
|
+
</svg>`,SW=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
|
|
2028
2028
|
<path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
|
|
2029
2029
|
<path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
|
|
2030
|
-
</symbol>`,
|
|
2030
|
+
</symbol>`,CW=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
|
|
2031
2031
|
<path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
|
|
2032
|
-
</symbol>`,
|
|
2032
|
+
</symbol>`,wW=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
|
|
2033
2033
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
2034
2034
|
<path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
|
|
2035
|
-
</symbol>`,
|
|
2035
|
+
</symbol>`,TW=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
|
|
2036
2036
|
<path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
|
|
2037
|
-
</symbol>`,
|
|
2037
|
+
</symbol>`,EW=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
|
|
2038
2038
|
<path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
|
|
2039
2039
|
<path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
|
|
2040
|
-
</symbol>`,
|
|
2040
|
+
</symbol>`,DW=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
|
|
2041
2041
|
<path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
|
|
2042
2042
|
<path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
|
|
2043
2043
|
<path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
|
|
2044
|
-
</symbol>`,
|
|
2044
|
+
</symbol>`,OW=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
|
|
2045
2045
|
<path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
|
|
2046
|
-
</symbol>`,
|
|
2046
|
+
</symbol>`,kW=`<symbol id="file-tree-builtin-c" viewBox="0 0 16 16">
|
|
2047
2047
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
2048
|
-
</symbol>`,
|
|
2048
|
+
</symbol>`,AW=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
|
|
2049
2049
|
<path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
|
|
2050
|
-
</symbol>`,
|
|
2050
|
+
</symbol>`,jW=`<symbol id="file-tree-builtin-cpp" viewBox="0 0 16 16">
|
|
2051
2051
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1q.084 0 .166.021.098.023.186.075c1.055.624 4.22 2.486 5.277 3.11.085.05.15.112.209.192h-.002l.028.037a.5.5 0 0 1 .103.21q.031.102.033.21v6.29a.71.71 0 0 1-.347.616l-5.307 3.144a.68.68 0 0 1-.693 0l-5.307-3.144A.72.72 0 0 1 2 11.145V4.832a.71.71 0 0 1 .346-.612l5.288-3.126A.7.7 0 0 1 7.992 1zm2.901 4.349a3.75 3.75 0 1 0 0 5.302l-1.06-1.06a2.25 2.25 0 1 1 0-3.182z" clip-rule="evenodd"/>
|
|
2052
|
-
</symbol>`,
|
|
2052
|
+
</symbol>`,MW=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
|
|
2053
2053
|
<path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
|
|
2054
2054
|
<path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
|
|
2055
|
-
</symbol>`,
|
|
2055
|
+
</symbol>`,NW=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
|
|
2056
2056
|
<path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
|
|
2057
2057
|
<path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
|
|
2058
2058
|
<path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
|
|
2059
|
-
</symbol>`,
|
|
2059
|
+
</symbol>`,PW=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
|
|
2060
2060
|
<path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
|
|
2061
2061
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
2062
|
-
</symbol>`,
|
|
2062
|
+
</symbol>`,FW=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
|
|
2063
2063
|
<path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
|
|
2064
2064
|
<path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
|
|
2065
|
-
</symbol>`,
|
|
2065
|
+
</symbol>`,IW=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
|
|
2066
2066
|
<path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
|
|
2067
2067
|
<path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
|
|
2068
|
-
</symbol>`,
|
|
2068
|
+
</symbol>`,LW=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
|
|
2069
2069
|
<path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
|
|
2070
|
-
</symbol>`,
|
|
2070
|
+
</symbol>`,RW=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
|
|
2071
2071
|
<path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
|
|
2072
|
-
</symbol>`,
|
|
2072
|
+
</symbol>`,zW=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
|
|
2073
2073
|
<path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
|
|
2074
|
-
</symbol>`,
|
|
2074
|
+
</symbol>`,BW=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
|
|
2075
2075
|
<path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
|
|
2076
|
-
</symbol>`,
|
|
2076
|
+
</symbol>`,VW=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
|
|
2077
2077
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
2078
2078
|
<path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
|
|
2079
|
-
</symbol>`,
|
|
2079
|
+
</symbol>`,HW=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
|
|
2080
2080
|
<path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
|
|
2081
2081
|
<path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
|
|
2082
|
-
</symbol>`,
|
|
2082
|
+
</symbol>`,UW=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
|
|
2083
2083
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
2084
2084
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
|
|
2085
|
-
</symbol>`,
|
|
2085
|
+
</symbol>`,WW=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
|
|
2086
2086
|
<path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
|
|
2087
|
-
</symbol>`,
|
|
2087
|
+
</symbol>`,GW=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
|
|
2088
2088
|
<path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
|
|
2089
|
-
</symbol>`,
|
|
2089
|
+
</symbol>`,KW=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
|
|
2090
2090
|
<path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
|
|
2091
2091
|
<path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
|
|
2092
|
-
</symbol>`,
|
|
2092
|
+
</symbol>`,qW=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
|
|
2093
2093
|
<defs>
|
|
2094
2094
|
<linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
|
|
2095
2095
|
<stop stop-color="currentColor"/>
|
|
@@ -2099,82 +2099,82 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
2099
2099
|
<path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
|
|
2100
2100
|
<path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
|
|
2101
2101
|
<path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
|
|
2102
|
-
</symbol>`,
|
|
2102
|
+
</symbol>`,JW=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
|
|
2103
2103
|
<path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
|
|
2104
2104
|
<path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
|
|
2105
|
-
</symbol>`,
|
|
2105
|
+
</symbol>`,YW=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
|
|
2106
2106
|
<path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
|
|
2107
|
-
</symbol>`,
|
|
2107
|
+
</symbol>`,XW=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
|
|
2108
2108
|
<path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
|
|
2109
|
-
</symbol
|
|
2109
|
+
</symbol>`,ZW=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
|
|
2110
2110
|
<path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
|
|
2111
2111
|
<path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
|
|
2112
2112
|
<path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
|
|
2113
2113
|
<path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
|
|
2114
|
-
</symbol>`,
|
|
2114
|
+
</symbol>`,QW=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
|
|
2115
2115
|
<path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
|
|
2116
2116
|
<path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
|
|
2117
|
-
</symbol
|
|
2117
|
+
</symbol>`,$W=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
|
|
2118
2118
|
<path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
|
|
2119
2119
|
<path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
|
|
2120
|
-
</symbol>`,
|
|
2120
|
+
</symbol>`,eG=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
|
|
2121
2121
|
<path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
|
|
2122
|
-
</symbol>`,
|
|
2122
|
+
</symbol>`,tG=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
|
|
2123
2123
|
<path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
|
|
2124
|
-
</symbol>`,
|
|
2124
|
+
</symbol>`,nG=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
|
|
2125
2125
|
<path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
|
|
2126
|
-
</symbol>`,
|
|
2126
|
+
</symbol>`,rG=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
|
|
2127
2127
|
<path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
|
|
2128
2128
|
<path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
|
|
2129
|
-
</symbol>`,
|
|
2129
|
+
</symbol>`,iG=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
|
|
2130
2130
|
<path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
|
|
2131
|
-
</symbol>`,
|
|
2131
|
+
</symbol>`,aG=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
|
|
2132
2132
|
<path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
|
|
2133
2133
|
<path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
|
|
2134
|
-
</symbol>`,
|
|
2134
|
+
</symbol>`,oG=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
|
|
2135
2135
|
<path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
|
|
2136
2136
|
<path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
|
|
2137
|
-
</symbol>`,
|
|
2137
|
+
</symbol>`,sG=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
|
|
2138
2138
|
<path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
|
|
2139
|
-
</symbol>`,
|
|
2139
|
+
</symbol>`,cG=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
|
|
2140
2140
|
<path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
|
|
2141
2141
|
<path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
|
|
2142
|
-
</symbol>`,
|
|
2142
|
+
</symbol>`,lG=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
|
|
2143
2143
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
|
|
2144
|
-
</symbol>`,
|
|
2144
|
+
</symbol>`,uG=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
|
|
2145
2145
|
<path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
|
|
2146
|
-
</symbol>`,
|
|
2146
|
+
</symbol>`,dG=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
|
|
2147
2147
|
<path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
|
|
2148
2148
|
<path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
|
|
2149
|
-
</symbol>`,
|
|
2149
|
+
</symbol>`,fG=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
|
|
2150
2150
|
<path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
|
|
2151
2151
|
<path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
|
|
2152
|
-
</symbol>`,
|
|
2152
|
+
</symbol>`,pG=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
|
|
2153
2153
|
<path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
|
|
2154
|
-
</symbol>`,
|
|
2154
|
+
</symbol>`,mG=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
|
|
2155
2155
|
<path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
|
|
2156
2156
|
<path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
|
|
2157
2157
|
<path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
|
|
2158
|
-
</symbol>`,
|
|
2158
|
+
</symbol>`,hG=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
|
|
2159
2159
|
<path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
|
|
2160
2160
|
<path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
|
|
2161
|
-
</symbol>`,
|
|
2161
|
+
</symbol>`,gG=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
|
|
2162
2162
|
<path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
|
|
2163
2163
|
<path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
|
|
2164
2164
|
<path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
|
|
2165
|
-
</symbol>`,
|
|
2165
|
+
</symbol>`,_G=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
|
|
2166
2166
|
<path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
|
|
2167
2167
|
<path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
|
|
2168
|
-
</symbol>`,
|
|
2168
|
+
</symbol>`,vG=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
|
|
2169
2169
|
<path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
|
|
2170
|
-
</symbol>`,
|
|
2170
|
+
</symbol>`,yG=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
|
|
2171
2171
|
<path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
|
|
2172
2172
|
<path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
|
|
2173
|
-
</symbol>`,
|
|
2173
|
+
</symbol>`,bG=[wW,kW,jW,MW,NW,PW,LW,RW,zW,VW,HW,UW,WW,GW,KW,QW,eG,tG,sG,cG,dG,fG,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
|
|
2174
2174
|
<path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
|
|
2175
2175
|
<path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
|
|
2176
|
-
</symbol>`],
|
|
2177
|
-
`)}\n</svg>`)}var
|
|
2176
|
+
</symbol>`],xG=[SW,CW,TW,EW,DW,OW,AW,FW,IW,BW,qW,JW,YW,XW,ZW,$W,nG,rG,iG,aG,oG,lG,uG,pG,mG,hG,gG,_G,vG,yG];function SG(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
|
|
2177
|
+
`)}\n</svg>`)}var CG=SG(xW,bG),wG={minimal:xW,standard:CG,complete:SG(CG,xG)},TG={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},EG={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,c:`c`,cc:`cpp`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,cpp:`cpp`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,cxx:`cpp`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,h:`c`,hh:`cpp`,hpp:`cpp`,htm:`html`,html:`html`,hxx:`cpp`,icns:`image`,ico:`image`,ini:`text`,inl:`cpp`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mm:`cpp`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},DG={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},OG=new Set([`bash`,`c`,`cpp`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),kG=new Set([`complete`]);function AG(e){return wG[e===`none`?`minimal`:e]}function jG(e){return`file-tree-builtin-${e}`}function MG(e){return e!==`none`&&kG.has(e)}function NG(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=TG[t.toLowerCase()];if(i!=null&&(r||OG.has(i)))return i;for(let e of n){if(r){let t=DG[e];if(t!=null)return t}let t=EG[e];if(t!=null&&(r||OG.has(t)))return t}return`default`}function PG(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function FG(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(PG(e)?`none`:`complete`),colored:e.colored??!0}}var IG={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function LG(e,t){if(typeof e==`number`)return{itemHeight:t??IG.default.itemHeight,factor:e};let n=IG[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var RG=IG.default.itemHeight,zG=`@layer base, theme, unsafe;
|
|
2178
2178
|
|
|
2179
2179
|
@layer base {
|
|
2180
2180
|
:host {
|
|
@@ -3838,13 +3838,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
3840
|
}
|
|
3841
|
-
`,
|
|
3841
|
+
`,BG=`@layer base, unsafe;`;function VG(e){return`${BG}
|
|
3842
3842
|
@layer base {
|
|
3843
3843
|
${e}
|
|
3844
|
-
}`}function
|
|
3844
|
+
}`}function HG(e){return`${BG}
|
|
3845
3845
|
@layer unsafe {
|
|
3846
3846
|
${e}
|
|
3847
|
-
}`}var GG=new WeakMap;function KG(e){let t=GG.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(dW,`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(),GG.set(e,i),i}function qG(e,t){if(!e.isConnected)return;let n=KG(t);if(n==null)return;let r=t.querySelector(`style[${fW}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(fW,``),t.appendChild(i)),i.textContent=`:host { ${pW}: ${n}px; }`}var JG;function YG(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){JG??(JG=new CSSStyleSheet,JG.replaceSync(UG(VG)));let t=!1;try{e.adoptedStyleSheets=[JG],t=!0}catch{}if(t){e.querySelector(`style[${lW}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(lW,``),t.textContent=UG(VG),e.prepend(t)}}function XG(e,t){ZG(e,t),YG(t),qG(e,t)}function ZG(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`});XG(this,e)}}if(customElements.define(cW,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(cW)))e instanceof HTMLElement&&XG(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var QG=5,$G=1<<QG,eK=$G*4;function tK(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function nK(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function rK(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 iK(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 aK(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function oK(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 sK(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,dK(e,t)}function cK(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=iK(e).get(t);if(i===void 0)return;let a=i>>QG;e.childVisibleChunkSums[a]+=r}function lK(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=fK(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=$G}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 uK(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>QG;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<QG}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 dK(e,t){if(t.childIds.length<eK){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/$G),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>>QG]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function fK(e,t,n,r){let i=Math.min(t.childIds.length,n+$G),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 pK=7,mK=3,hK=1<<mK,gK=4;function _K(e,t,n=0){return e<<gK|n<<mK|t}function vK(e){return e.depthAndFlags>>>gK}function yK(e){return(e.depthAndFlags&hK)>>mK}function bK(e){return(e.depthAndFlags&hK)!==0}function xK(e){return e.depthAndFlags&pK}function SK(e,t){return(xK(e)&t)!==0}function CK(e,t){e.depthAndFlags|=t}function wK(e,t){e.depthAndFlags=_K(t,xK(e),yK(e))}var TK=Symbol(`benchmarkInstrumentation`);function EK(e,t){return t==null||Object.defineProperty(e,TK,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function DK(e){return e==null?null:e[TK]??null}function Q(e,t,n){return e==null?n():e.measurePhase(t,n)}function OK(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function kK(e){return e>=48&&e<=57}function AK(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!kK(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&&kK(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 jK(e){let t=e.toLowerCase();return{lowerValue:t,tokens:AK(t)}}function MK(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 NK(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=MK(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function PK(e,t,n){let r=NK(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function FK(e,t){return PK(e,t,jK)}function IK(e,t){return t===e.segments.length-1?e.isDirectory?1:0:1}function LK(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=IK(e,r);return a===IK(t,r)?FK(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 RK(e,t){return LK(e,t)}function zK(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=jK(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=IK(e,n);return o===IK(t,n)?PK(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 BK(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=jK(r);return e.sortKeyById[t]=i,i}function VK(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function HK(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 UK(e){let{hasTrailingSlash:t,segments:n}=HK(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function WK(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=HK(e);return{requiresDirectory:t,segments:n}}var GK=``;function KK(){let e=new Map;return e.set(GK,0),{idByValue:e,valueById:[GK],sortKeyById:[jK(GK)]}}function qK(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 JK(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var YK=Symbol(`pathStorePreparedInputKind`);function XK(e,t){return e[YK]=t,e}function ZK(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function QK(e,t,n){return n===`default`?RK(e,t):n(ZK(e),ZK(t))}function $K(){return{depthAndFlags:_K(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function eq(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 tq(e){return e.isDirectory?e.segments.length:e.segments.length-1}function nq(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 rq(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function iq(e,t={}){return uq(e,t).map(e=>e.path)}function aq(e,t={}){let n=uq(e,t);return XK({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function oq(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 XK({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function sq(e){let t=e,n=t.preparedPaths;if(t[YK]===`prepared`&&n!=null)return n;if(!nq(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function cq(e){let t=e;return t[YK]===`presorted`&&t.presortedPaths!=null||rq(t.presortedPaths)?t.presortedPaths:null}function lq(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function uq(e,t={}){let n=VK(t),r=DK(t);OK(r,`workload.inputFiles`,e.length);let i=Q(r,`store.preparePathEntries.parse`,()=>e.map(e=>UK(e)));return Q(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>QK(e,t,n.sort))),i}var dq=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[$K()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=KK();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=DK(e),this.options=VK(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,tK())}appendPaths(e){return Q(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>UK(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,Q(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return Q(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:_K(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:_K(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:_K(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=UK(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:_K(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:_K(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=UK(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(Q(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||Q(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`?zK(this.lastPreparedPath,e,this.segmentSortKeyCache):QK(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=tq(e),i=n==null?0:tq(n),a=n==null?0:eq(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=qK(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:_K(vK(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),aK(i,s),s}createFileChildUnchecked(e,t){let n=qK(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:_K(vK(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),aK(r,a),a}getOrCreateDirectoryChild(e,t){let n=qK(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&&!bK(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:_K(vK(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),aK(r,a),this.directories.set(a,tK()),a}createDirectoryChild(e,t){let n=qK(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:_K(vK(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),aK(r,a),this.directories.set(a,tK()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!bK(n))throw Error(`Path is not a directory: "${t}"`);if(SK(n,1))throw Error(`Duplicate path: "${t}"`);CK(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,nK());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(bK(a)){let t=nK();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;bK(n)&&this.directories.set(t,tK());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),aK(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!bK(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 sK(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function fq(e,t=`closed`,n=null){let r=mq(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 pq(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function mq(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 hq(e,t){return SK(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:vK(t)<=e.defaultExpansion}function gq(e,t,n=e.snapshot.nodes[t]){return n==null||!bK(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:hq(e,n)}function _q(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!bK(r))return;let i=hq(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 vq(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 yq(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function bq(e,t){let n=vq(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 xq(e,t){let n=vq(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function Sq(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 Cq(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function wq(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 Tq(e,t){e.directoryLoadInfoById.delete(t)}function Eq(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 Dq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Oq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function kq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Aq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function jq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Mq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Nq(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 Pq(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 Fq(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 Iq(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 Lq(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 Rq(e,t,n){return{...n,visibleCountDelta:Yq(e)-t}}function zq(e,t){let n=Yq(e),r=pq();e.transactionStack.push(r);try{t()}catch(t){throw Hq(e,r,!1),t}Hq(e,r,!0,Yq(e)-n)}function Bq(e,t){let n=e.instrumentation;if(n==null){Vq(e,t);return}Q(n,`store.events.record`,()=>Vq(e,t))}function Vq(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){qq(e,t);return}n.events.push(t),Kq(n,t)}function Hq(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?Gq(i,t):Q(n,`store.events.batch.merge`,()=>Gq(i,t));return}let a=Uq(t,r),o=e.instrumentation;if(o==null){qq(e,a);return}Q(o,`store.events.batch.commit`,()=>qq(e,a))}function Uq(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 Wq(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function Gq(e,t){for(let n of t.events)e.events.push(n);Wq(e,t)}function Kq(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function qq(e,t){let n=e.instrumentation;if(n==null){Jq(e,t);return}Q(n,`store.events.emit`,()=>Jq(e,t))}function Jq(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function Yq(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function Xq(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!bK(n)||SK(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||!bK(a)?null:i}function Zq(e,t){let n=t;for(;;){let t=Xq(e,n);if(t==null)return n;n=t}}function Qq(e,t){let n=[t],r=t;for(;;){let t=Xq(e,r);if(t==null)return n;n.push(t),r=t}}function $q(e,t){let n=t==null?e.snapshot.rootId:lJ(e,t);return n==null?[]:pJ(e,n)}function eJ(e,t){let n=UK(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=OJ(e,DJ(e,r)),{createdNodeIds:a,directoryId:o}=mJ(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=fJ(e,o);if(SK(n,1))throw Error(`Path already exists: "${t}"`);CK(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=gJ(e,o,n.basename),s.add(c);oJ(e,o);let l=OJ(e,o);return Dq({affectedAncestorIds:cJ(e,c),affectedNodeIds:[...s],path:t,projectionChanged:kJ(i,l)})}function tJ(e,t,n){let r=lJ(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=fJ(e,r);if(SK(i,2))throw Error(`The root node cannot be removed`);if(bK(i)&&dJ(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=OJ(e,a),s=TJ(e,r);yJ(e,a,r,i.nameId),EJ(e,a),oJ(e,a);let c=OJ(e,a);return Oq({affectedAncestorIds:cJ(e,a),affectedNodeIds:s,path:t,projectionChanged:kJ(o,c),recursive:n.recursive===!0})}function nJ(e,t,n,r){let i=lJ(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=fJ(e,i);if(SK(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=CJ(e,i,n),c=OJ(e,a.parentId),l=OJ(e,s.parentId),u=JK(e.snapshot.segmentTable,a.nameId),d=qK(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(bK(a)&&NJ(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=rK(e.snapshot.nodes,dJ(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&wJ(e,p,o,yK(a))===`skip`)return null;let m=a.parentId;yJ(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),MJ(e,i),vJ(e,s.parentId,i),EJ(e,m),e.pathCacheVersion++,oJ(e,m),s.parentId!==m&&oJ(e,s.parentId);let h=OJ(e,m),g=OJ(e,s.parentId);return kq({affectedAncestorIds:[...new Set([...cJ(e,m),...cJ(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:AJ([c,l],[h,g]),to:aJ(e,i)})}function rJ(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function iJ(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function aJ(e,t){let n=fJ(e,t),r=rJ(e,t);if(r!=null)return r;if(SK(n,2))return iJ(e,t,``);let i=aJ(e,n.parentId),a=JK(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return iJ(e,t,bK(n)?`${o}/`:o)}function oJ(e,t){let n=e.instrumentation;if(n==null){FJ(e,t);return}Q(n,`store.recomputeCountsUpwardFrom`,()=>FJ(e,t))}function sJ(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||!bK(o)){PJ(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){PJ(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function cJ(e,t){let n=[],r=t;for(;r!=null;){let t=fJ(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function lJ(e,t){if(t.length===0)return e.snapshot.rootId;let n=WK(t);return uJ(e,n.segments,n.requiresDirectory)}function uJ(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=dJ(e,r),a=rK(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=fJ(e,r);return n&&!bK(i)?null:r}function dJ(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 fJ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||SK(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function pJ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||SK(n,4))return[];if(!bK(n))return[aJ(e,t)];if(dJ(e,t).childIds.length===0)return SK(n,1)&&!SK(n,2)?[aJ(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||SK(n,4)){i.pop();continue}if(!bK(n)){r.push(aJ(e,t.nodeId)),i.pop();continue}let a=dJ(e,t.nodeId);if(a.childIds.length===0){SK(n,1)&&!SK(n,2)&&r.push(aJ(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 mJ(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=qK(e.snapshot.segmentTable,i),a=dJ(e,r),o=rK(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!bK(fJ(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=hJ(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function hJ(e,t,n){let r=fJ(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:_K(vK(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,tK()),vJ(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function gJ(e,t,n){let r=qK(e.snapshot.segmentTable,n),i=dJ(e,t);if(rK(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${LJ(e,t,n)}"`);let a=fJ(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:_K(vK(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),vJ(e,t,o),e.activeNodeCount++,o}function _J(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}bJ(e,n,o)<0?i=a:r=a+1}return r}function vJ(e,t,n){let r=dJ(e,t),i=fJ(e,n);rK(e.snapshot.nodes,r).set(i.nameId,n),cK(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=_J(e,r,n);r.childIds.splice(a,0,n),oK(r,a),dK(e.snapshot.nodes,r)}function yJ(e,t,n,r){let i=dJ(e,t),a=iK(i),o=a.get(n)??-1;rK(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&cK(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),oK(i,o),dK(e.snapshot.nodes,i))}function bJ(e,t,n){let r=e.snapshot.options.sort;return r===`default`?xJ(e,t,n):r(SJ(e,t),SJ(e,n))}function xJ(e,t,n){let r=fJ(e,t),i=fJ(e,n),a=bK(r);if(a!==bK(i))return a?-1:1;let o=NK(BK(e.snapshot.segmentTable,r.nameId),BK(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=JK(e.snapshot.segmentTable,r.nameId),c=JK(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function SJ(e,t){let n=fJ(e,t),r=aJ(e,t),i=bK(n),a=i?r.slice(0,-1):r;return{basename:JK(e.snapshot.segmentTable,n.nameId),depth:vK(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function CJ(e,t,n){let r=fJ(e,t),i=lJ(e,n);if(i!=null){let t=fJ(e,i);if(bK(t))return{basename:JK(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=WK(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=WK(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:uJ(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function wJ(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${aJ(e,t)}"`);let i=fJ(e,t);if(yK(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(bK(i)&&dJ(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return TJ(e,t),yJ(e,a,t,o),EJ(e,a),oJ(e,a),`handled`}function TJ(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=fJ(e,t.nodeId);if(t.visitedChildren||!bK(i)){bK(i)&&e.snapshot.directories.delete(t.nodeId),CK(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Tq(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=dJ(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 EJ(e,t){let n=t;for(;n!=null;){let t=fJ(e,n);if(!bK(t)||SK(t,2)||dJ(e,n).childIds.length>0)return;CK(t,1),n=t.parentId===n?null:t.parentId}}function DJ(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=rK(e.snapshot.nodes,dJ(e,n)).get(t);if(i==null||!bK(fJ(e,i)))break;n=i}return n}function OJ(e,t){let n=jJ(e,t);if(n==null)return null;let r=Zq(e,n),i=fJ(e,r),a=n===r?null:Qq(e,n).map(t=>aJ(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:dJ(e,r).childIds.length>0,path:aJ(e,r),terminalKind:yK(i)})}function kJ(e,t){return AJ([e],[t])}function AJ(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 jJ(e,t){let n=t;for(;n!=null;){let t=fJ(e,n);if(!bK(t)||SK(t,2))return null;if(!gq(e,n,t))return n;n=t.parentId}return null}function MJ(e,t){let n=fJ(e,t);if(wK(n,(t===e.snapshot.rootId?-1:vK(fJ(e,n.parentId)))+1),!bK(n))return;let r=dJ(e,t);for(let t of r.childIds)MJ(e,t)}function NJ(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=fJ(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function PJ(e,t,n=fJ(e,t),r=!1){let i=e.instrumentation;if(i==null){IJ(e,t,n,r);return}Q(i,`store.recomputeNodeCounts`,()=>IJ(e,t,n,r))}function FJ(e,t){let n=t;for(;n!=null;){let t=fJ(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(PJ(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&cK(dJ(e,s),n,a,o),n=s}}function IJ(e,t,n,r){if(!bK(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=dJ(e,t);if(r){let t=e.instrumentation;t==null?sK(e.snapshot.nodes,i):Q(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>sK(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,SK(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=Xq(e,t)==null?gq(e,t,n)?1+o:1:o}function LJ(e,t,n){let r=aJ(e,t);return r.length===0?n:`${r}${n}`}function RJ(e){return e!=null&&!SK(e,4)}function zJ(e,t){let n=e.snapshot.nodes[t];return!RJ(n)||!bK(n)||SK(n,2)?null:n}function BJ(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&RJ(e.snapshot.nodes[n])&&(t+=1);return t}function VJ(e){return Math.max(0,e.valueById.length-1)}function HJ(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:BJ(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:VJ(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function UJ(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 WJ(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)zJ(e,n)!=null&&t.push(aJ(e,n));for(let t of e.expandedDirectoryIds)zJ(e,t)!=null&&n.push(aJ(e,t));return{collapsedPaths:t,expandedPaths:n}}function GJ(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)zJ(e,n)==null||yq(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:aJ(e,n)});return t}function KJ(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=lJ(e,n);t!=null&&_q(e,t,!0,fJ(e,t))}for(let n of t.collapsedPaths){let t=lJ(e,n);t!=null&&_q(e,t,!1,fJ(e,t))}}function qJ(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=lJ(e,n.path);t!=null&&zJ(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function JJ(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function YJ(e){let t=e.snapshot.segmentTable,n=KK();for(let r of e.snapshot.nodes)if(RJ(r)){if(SK(r,2)){r.nameId=0;continue}r.nameId=qK(n,JK(t,r.nameId))}e.snapshot.segmentTable=n}function XJ(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!RJ(r)||!bK(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return RJ(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[fJ(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),sK(e.snapshot.nodes,n)}}function ZJ(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(RJ(n))break;--t}e.snapshot.nodes.length=t+1}function QJ(e){let t=WJ(e),n=GJ(e);Q(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>JJ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>YJ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>XJ(e)),Q(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>ZJ(e)),Q(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>KJ(e,t)),Q(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>qJ(e,n)),Q(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>sJ(e,e.snapshot.rootId))}function $J(e){let t=WJ(e),n=GJ(e),r=Q(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>$q(e)),i=EK({...e.snapshot.options},e.instrumentation),a=Q(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new dq(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,Q(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>KJ(e,t)),Q(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>qJ(e,n)),Q(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>sJ(e,e.snapshot.rootId))}function eY(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function tY(e,t){let n=HJ(e);t===`stable`?Q(e.instrumentation,`store.cleanup.stable`,()=>QJ(e)):Q(e.instrumentation,`store.cleanup.aggressive`,()=>$J(e));let r=HJ(e);return UJ(t,t===`stable`,n,r)}var nY=64;function rY(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 iY(e){return fJ(e,e.snapshot.rootId).visibleSubtreeCount}function aY(e,t,n,r){let i=fJ(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function oY(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:TY(e,t.cursor),setSize:t.setSize,subtreeEndIndex:aY(e,t.cursor,t.index,n)}}function sY(e,t,n,r,i,a){let o=dJ(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=lK(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return cY(e,u,l,r+c,i+1,s,o.childIds.length,a)}function cY(e,t,n,r,i,a,o,s){if(!bK(fJ(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=yY(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=fJ(e,c.terminalNodeId);if(!bK(l)||!gq(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return sY(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function lY(e,t){let n=iY(e);if(t<0||t>=n)return null;let r=sY(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>aJ(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=oY(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:TY(e,r.cursor),setSize:r.setSize,subtreeEndIndex:aY(e,r.cursor,r.index,n)}}function uY(e,t,n){let r=e.instrumentation,i=iY(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 wY(e,o+1);let t=[],n=gY(e,a);for(let r=a;r<=o&&n!=null;r++){let r=TY(e,n);t.push(r),n=xY(e,n)}return t}let s=[],c=0,l=0,u=Q(r,`store.getVisibleSlice.selectFirstRow`,()=>gY(e,a));for(let t=a;t<=o&&u!=null;t++){let t=Q(r,`store.getVisibleSlice.materializeRow`,()=>TY(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=Q(r,`store.getVisibleSlice.advanceCursor`,()=>xY(e,u))}return OK(r,`workload.visibleRowsRead`,s.length),OK(r,`workload.flattenedRowsRead`,c),OK(r,`workload.flattenedSegmentsRead`,l),s}function dY(e,t=iY(e)){let n=e.instrumentation;return n==null?CY(e,t):Q(n,`store.getVisibleTreeProjection`,()=>CY(e,t))}function fY(e){return SY(dY(e))}function pY(e,t){let n=lJ(e,t);if(n==null||n===e.snapshot.rootId||bK(fJ(e,n))&&Zq(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=fJ(e,i).parentId,n=dJ(e,t),s=iK(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=uK(a,n,s),t!==o){let n=fJ(e,t),a=Xq(e,t);if(!gq(e,t,n)&&a!==i)return null;Zq(e,t)===t&&(r+=1)}i=t}return r}function mY(e,t){let n=lJ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=fJ(e,n);if(!bK(r))throw Error(`Path is not a directory: "${t}"`);return gq(e,n,r)?null:(_q(e,n,!0,r),oJ(e,n),Aq({affectedAncestorIds:cJ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function hY(e,t){let n=lJ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=fJ(e,n);if(!bK(r))throw Error(`Path is not a directory: "${t}"`);return gq(e,n,r)?(_q(e,n,!1,r),oJ(e,n),jq({affectedAncestorIds:cJ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function gY(e,t){return t<0||t>=iY(e)?null:_Y(e,e.snapshot.rootId,t,-1)}function _Y(e,t,n,r){let i=dJ(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?lK(e.snapshot.nodes,i,n):Q(a,`store.getVisibleSlice.selectChildIndex`,()=>lK(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return vY(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function vY(e,t,n,r){if(!bK(fJ(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=yY(e,t,r);if(n===0)return i;let a=fJ(e,i.terminalNodeId);if(!bK(a)||!gq(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return _Y(e,i.terminalNodeId,n-1,i.visibleDepth)}function yY(e,t,n){return bK(fJ(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:Zq(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:Q(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>Zq(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function bY(e,t){let n=fJ(e,t);if(!bK(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:Xq(e,r)!==t}function xY(e,t){let n=fJ(e,t.terminalNodeId);if(bK(n)){let r=dJ(e,t.terminalNodeId);if(gq(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:vY(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=fJ(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=dJ(e,n),o=iK(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 vY(e,s,0,i);bY(e,r)&&i--,r=n}}function SY(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 CY(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(nY);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=rY(o,y);let x,S=_;if(bK(v))S=f?Zq(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:aJ(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&&bK(C)&&gq(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 wY(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(!bK(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:aJ(e,f)};continue}let h=l?Zq(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=TY(e,g);let _=i[h];_!=null&&bK(_)&&gq(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function TY(e,t){let n=fJ(e,t.terminalNodeId),r=bK(n)?EY(e,t):null,i=aJ(e,t.terminalNodeId),a=JK(e.snapshot.segmentTable,n.nameId),o=bK(n)&&dJ(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?Qq(e,t.headNodeId).map(n=>{let r=fJ(e,n);return{isTerminal:n===t.terminalNodeId,name:JK(e.snapshot.segmentTable,r.nameId),nodeId:n,path:aJ(e,n)}}):Q(c,`store.getVisibleSlice.flatten.collectSegments`,()=>Qq(e,t.headNodeId).map(n=>{let r=fJ(e,n);return{isTerminal:n===t.terminalNodeId,name:JK(e.snapshot.segmentTable,r.nameId),nodeId:n,path:aJ(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:bK(n)&&gq(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:bK(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function EY(e,t){if(t.headNodeId===t.terminalNodeId)return yq(e,t.terminalNodeId);let n=Qq(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=yq(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function DY(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||!bK(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&&dK(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&bK(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,dK(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function OY(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var kY=class e{#e;constructor(e={}){let t=DK(e),n=Q(t,`store.builder.create`,()=>new dq(e));if(e.preparedInput!=null){let t=cq(e.preparedInput);t==null?n.appendPreparedPaths(sq(e.preparedInput),!1):n.appendPresortedPaths(t,lq(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(Q(t,`store.preparePathEntries`,()=>uq(r,e)))}let r=Q(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=Q(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=Q(t,`store.state.create`,()=>fq(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:Q(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||OY(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&Q(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?Q(t,`store.state.initializeOpenVisibleCounts`,()=>DY(this.#e)):Q(t,`store.state.recomputeCounts`,()=>sJ(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return iq(e,t)}static prepareInput(e,t={}){return aq(e,t)}static preparePresortedInput(e){return oq(e)}list(e){return Q(this.#e.instrumentation,`store.list`,()=>$q(this.#e,e))}add(e){Q(this.#e.instrumentation,`store.add`,()=>{let t=iY(this.#e);Bq(this.#e,Rq(this.#e,t,eJ(this.#e,e)))})}remove(e,t={}){Q(this.#e.instrumentation,`store.remove`,()=>{let n=iY(this.#e);Bq(this.#e,Rq(this.#e,n,tJ(this.#e,e,t)))})}move(e,t,n={}){Q(this.#e.instrumentation,`store.move`,()=>{let r=iY(this.#e),i=nJ(this.#e,e,t,n);i!=null&&Bq(this.#e,Rq(this.#e,r,i))})}batch(e){zq(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return Q(this.#e.instrumentation,`store.getVisibleCount`,()=>iY(this.#e))}getVisibleSlice(e,t){return Q(this.#e.instrumentation,`store.getVisibleSlice`,()=>uY(this.#e,e,t))}getVisibleRowContext(e){return Q(this.#e.instrumentation,`store.getVisibleRowContext`,()=>lY(this.#e,e))}getVisibleTreeProjection(){return fY(this.#e)}getVisibleTreeProjectionData(e){return dY(this.#e,e)}getVisibleIndex(e){return Q(this.#e.instrumentation,`store.getVisibleIndex`,()=>pY(this.#e,e))}getPathInfo(e){return Q(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=lJ(this.#e,e);if(t==null)return null;let n=fJ(this.#e,t);return{depth:vK(n),kind:bK(n)?`directory`:`file`,path:aJ(this.#e,t)}})}isExpanded(e){return Q(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=fJ(this.#e,t);return gq(this.#e,t,n)})}expand(e){Q(this.#e.instrumentation,`store.expand`,()=>{let t=iY(this.#e),n=mY(this.#e,e);n!=null&&Bq(this.#e,Rq(this.#e,t,n))})}collapse(e){Q(this.#e.instrumentation,`store.collapse`,()=>{let t=iY(this.#e),n=hY(this.#e,e);n!=null&&Bq(this.#e,Rq(this.#e,t,n))})}on(e,t){return Eq(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return yq(this.#e,t)}markDirectoryUnloaded(e){Q(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(dJ(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=iY(this.#e);xq(this.#e,t),Bq(this.#e,Rq(this.#e,n,Mq({affectedAncestorIds:cJ(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return Q(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=iY(this.#e),r=bq(this.#e,t);return Bq(this.#e,Rq(this.#e,n,Nq({affectedAncestorIds:cJ(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return Q(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||yq(this.#e,n)!==`loading`||!Cq(this.#e,n,e.attemptId))return!1;let r=aJ(this.#e,n);this.validateChildPatch(r,t);let i=iY(this.#e),a=[];for(let e of t.operations){AY(r,e);let t=iY(this.#e);switch(e.type){case`add`:a.push(Rq(this.#e,t,eJ(this.#e,e.path)));break;case`remove`:a.push(Rq(this.#e,t,tJ(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=nJ(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(Rq(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return Bq(this.#e,Rq(this.#e,i,Pq({affectedAncestorIds:cJ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:aJ(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return Q(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=iY(this.#e),r=Sq(this.#e,t,e.attemptId);return Bq(this.#e,Rq(this.#e,n,Fq({affectedAncestorIds:cJ(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:aJ(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return Q(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=iY(this.#e),i=wq(this.#e,n,e.attemptId,t);return Bq(this.#e,Rq(this.#e,r,Iq({affectedAncestorIds:cJ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:aJ(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return Q(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(eY(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=iY(this.#e),n=tY(this.#e,e.mode??`stable`);return Bq(this.#e,Rq(this.#e,t,Lq({...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=dJ(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??jK(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=NK(BK(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(!bK(fJ(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=fJ(this.#e,n);gq(this.#e,n,i)||(_q(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=fJ(this.#e,e);if(!gq(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=lJ(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!bK(fJ(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!bK(fJ(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=fJ(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=fJ(this.#e,e),r=Xq(this.#e,e);if(!gq(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 AY(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var jY=e=>e.startsWith(`f::`)?e.slice(3):e;function MY(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function NY(e,t){return e===``?t:`${e}/${t}`}function PY({files:e,path:t,isFolder:n,nextBasename:r}){let i=jY(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}=MY(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=NY(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 FY(e){return e.endsWith(`/`)}function IY(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 LY(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 RY(e,t){return t.includes(e)?LY(t):[e]}function zY(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 BY(e,t){return{draggedPaths:e,target:t}}function VY(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(FY(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function HY(e,t){return t.kind===`root`||t.directoryPath==null?IY(e):t.directoryPath}function UY(e,t){let n=e.map(e=>{let n=HY(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 WY(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 GY(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(!WY(kY.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 KY(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function qY(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 JY(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function YY(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 JY(e,t.path)?n?e:null:e;case`move`:return qY(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=YY(r,e,n),r==null)return null;return r}}}function XY(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function ZY(e){switch(e.operation){case`add`:return{...XY(e),operation:`add`,path:e.path};case`remove`:return{...XY(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...XY(e),from:e.from,operation:`move`,to:e.to}}}function QY(e){return{...XY(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>ZY(e)),operation:`batch`}}function $Y(e){switch(e.operation){case`add`:case`remove`:case`move`:return ZY(e);case`batch`:return QY(e);default:return null}}function eX(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function tX(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 nX(e){return tX(e).at(-1)??null}function rX(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function iX(e){return e.endsWith(`/`)}var aX=e=>e.toLowerCase();function oX(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function sX(e){return e.endsWith(`/`)?e.slice(0,-1):e}function cX(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var lX=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},uX=Symbol(`FILE_TREE_RENAME_VIEW`),dX=512,fX=512;function pX(e){return e===`top`||e===`center`?e:`nearest`}function mX(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=tX(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 hX(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:mX(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var gX=class{#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=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=GY({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=nX(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:pX(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<=fX){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=RY(t,n);return this.#r.canDrag?.(r)===!1?!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=BY(t.draggedPaths,n);(VY(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}zY(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=BY(e.draggedPaths,t);if(VY(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=UY(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=iX(r),a=sX(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of tX(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=oX(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}[uX](){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}}#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,iX(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,iX(e)?{recursive:!0}:void 0);return}let t=iX(e),n=PY({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:sX(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(cX(n.sourcePath,t),cX(n.destinationPath,t))}#Y(e){this.#T==null||this.#E===e||(this.#E=e,this.#De())}resetPaths(e,t={}){let n=this.#H.list().length,r=this.#G,i=GY({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#le(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#z;this.#K?.(),this.#H=a,this.#d.clear(),this.#he();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!eX(this.#B,u);this.#B=new Set(u),d&&(this.#V+=1),this.#z=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(o,o!=null||u.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#G-r})}#X(e){this.#Ie();let t=nX(e),n=rX(e,t),r=null,i=null;for(let e of this.#be()){if(nX(e)!==t)continue;let a=rX(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=tX(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=!eX(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 kY({...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 tX(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(aX),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(aX),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 tX(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:lX(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 tX(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 tX(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=hX(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,dX)),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=YY(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=YY(this.#c,e,!0),r=[...this.#B].map(t=>YY(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=YY(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return eX(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&&KY(e)&&(this.#i=null);let t=KY(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=$Y(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},_X=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 vX(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 yX(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 bX(e,t){return t?`${e}/`:e}function xX(e,t=null){let n=_X(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set;for(let t of e??[]){let e=vX(t.path);if(e==null)continue;let n=bX(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of yX(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var SX=e=>e.trim().toLowerCase(),CX=e=>e.split(`/`).at(-1)??e,wX=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function TX(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function EX(e){let t=LG(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(SX(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let n=CX(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return TX(c,e);for(let[t,n]of a)if(s.includes(t))return TX(n,e);let l=wX(n);for(let t of l){let n=i.get(t);if(n!=null)return TX(n,e)}let u=FG(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:NG(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:TX(s,e)}}}var DX,OX,kX,AX,jX,MX,NX,PX,FX,IX,LX={},RX=[],zX=Array.isArray,BX=RX.slice,VX=Object.assign;function HX(e){e&&e.parentNode&&e.remove()}function UX(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?BX.call(arguments,2):n),WX(e,o,r,i,null)}function WX(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??++OX,__i:-1,__u:0};return i==null&&DX.vnode!=null&&DX.vnode(a),a}function GX(e){return e.children}function KX(e,t){this.props=e,this.context=t,this.__g=0}function qX(e,t){if(t==null)return e.__?qX(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`?qX(e):null}function JX(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 JX(e)}}function YX(e){(8&e.__g||!(e.__g|=8)||!kX.push(e)||jX++)&&AX==DX.debounceRendering||((AX=DX.debounceRendering)||queueMicrotask)(XX)}function XX(){for(var e,t,n,r,i,a,o,s,c=1;kX.length;)kX.length>c&&kX.sort(MX),e=kX.shift(),c=kX.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=VX({},r)).__v=r.__v+1,DX.vnode&&DX.vnode(n),iZ(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??qX(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,oZ(a,n,o),n.__e!=i&&JX(n)));jX=0}function ZX(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||RX,b=t.length;for(c=QX(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?LX:y[m.__i]||LX,m.__i=f,_=iZ(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&lZ(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=$X(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function QX(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?WX(null,o,null,null,null):zX(o)?WX(GX,{children:o},null,null,null):o.constructor==null&&o.__b>0?WX(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=eZ(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=qX(s)),uZ(s,s));return r}function $X(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=$X(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=qX(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function eZ(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>(u?1:0)){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 tZ(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function nZ(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||tZ(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||tZ(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(NX,`$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=PX,e.addEventListener(t,a?IX:FX,a)):e.removeEventListener(t,a?IX:FX,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 rZ(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=PX++;else if(t.u<n.l)return;return n(DX.event?DX.event(t):t)}}}function iZ(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=DX.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new M(v,x):(t.__c=f=new KX(v,x),f.constructor=M,f.render=dZ),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=VX({},f.__s)),VX(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=DX.__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=VX({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===GX&&d.key==null&&(E=sZ(d.props.children)),s=ZX(e,zX(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)HX(a[j]);aZ(t)}else t.__e=n.__e,t.__k=n.__k,e.then||aZ(t);DX.__e(e,t,n)}else s=t.__e=cZ(n.__e,t,n,r,i,a,o,c,l,u);return(d=DX.diffed)&&d(t),128&t.__u?void 0:s}function aZ(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(aZ)}function oZ(e,t,n){for(var r=0;r<n.length;r++)lZ(n[r],n[++r],n[++r]);DX.__c&&DX.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){DX.__e(e,t.__v)}})}function sZ(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:zX(e)?e.map(sZ):VX({},e)}function cZ(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&&=(DX.__m&&DX.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=BX.call(e.childNodes),v=n.props||LX,!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;nZ(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&&!_||nZ(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=``),ZX(b==`template`?e.content:e,zX(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&qX(n,0),s,c,l),a!=null)for(u=a.length;u--;)HX(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||nZ(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&nZ(e,u,g,v[u],i))}return e}function lZ(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){DX.__e(e,n)}}function uZ(e,t,n){var r,i;if(DX.unmount&&DX.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||lZ(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){DX.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&uZ(r[i],t,n||typeof e.type!=`function`);n||HX(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function dZ(e,t,n){return this.constructor(e,n)}function fZ(e,t){var n,r,i,a;t==document&&(t=document.documentElement),DX.__&&DX.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=UX(GX,null,[e]),i=[],a=[],iZ(t,e,r||LX,LX,t.namespaceURI,r?null:t.firstChild?BX.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),oZ(i,e,a)}function pZ(e,t){e.__u|=32,fZ(e,t)}DX={__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 jX=0,e}},OX=0,KX.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=VX({},this.state);typeof e==`function`&&(e=e(VX({},n),this.props)),e&&VX(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),YX(this))},KX.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),YX(this))},KX.prototype.render=GX,kX=[],jX=0,MX=function(e,t){return e.__v.__b-t.__v.__b},NX=/(PointerCapture)$|Capture$/i,PX=0,FX=rZ(!1),IX=rZ(!0);var mZ=0;Array.isArray;function $(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:--mZ,__i:-1,__u:0,__source:i,__self:a};return DX.vnode&&DX.vnode(l),l}var hZ=16,gZ=16,_Z={};function vZ({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}=_Z[e]??{width:hZ,height:gZ},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`,h=o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`};return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...h,viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var yZ=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},bZ=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},xZ=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)]},SZ=(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)]},CZ=(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)]},wZ=(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 TZ({children:e,marker:t,variant:n=`default`}){"use no memo";let r=n===`fade`;return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):r?$(`span`,{"data-truncate-fade":!0}):t})})}function EZ(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function DZ({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(EZ,{mode:t,children:e},`content`),o=$(TZ,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function OZ({children:e,...t}){"use no memo";return $(DZ,{mode:`truncate`,...t,children:e})}function kZ({children:e,...t}){"use no memo";return $(DZ,{mode:`fruncate`,...t,children:e})}function AZ({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=$(OZ,{...s,children:t[0]}),l=$(kZ,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?kZ:OZ,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=yZ:r===`extension`?t=bZ:r===`leaf-path`&&(t=xZ);else if(typeof r==`number`)t=SZ,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=CZ:e===`first`&&(t=wZ)}else typeof r==`function`&&(t=r);t??=yZ;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=$(OZ,{...s,..._,children:f}),l=$(kZ,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var jZ={endIndex:-1,startIndex:-1};function MZ(e,t,n){return Math.min(Math.max(e,t),n)}function NZ(e,t){return e<0||t<e?jZ:{endIndex:t,startIndex:e}}function PZ(e){return e.startIndex<0||e.endIndex<e.startIndex}function FZ(e,t){return PZ(e)?0:(e.endIndex-e.startIndex+1)*t}function IZ(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function LZ(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function RZ(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 zZ(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 BZ(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 VZ(e,t,n){if(e.length===0||t<=0)return[];let r=BZ(e),i=RZ(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=zZ(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 HZ(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=MZ(t.scrollTop,0,o),c=t.stickyRows??VZ(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=IZ(s,n,t.itemHeight),m=IZ(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?jZ:NZ(m,LZ(u+d,n,t.itemHeight)),y=g+1,b=PZ(v)?jZ:NZ(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=FZ(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:PZ(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var UZ={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},WZ={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},GZ=`Contains git status items`;function KZ(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 qZ(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return KZ({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 JZ(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 YZ(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 XZ(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 ZZ(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function QZ(e,t){return e!=null&&e>0?e:t}function $Z(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 eQ(e,t,n,r,i=0){let a=KZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function tQ(e,t,n,r,i,a,o=0){let s=qZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s==null?!1:(e.scrollTop=s,!0)}function nQ(e,t,n,r,i,a){let o=JZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function rQ(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function iQ(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function aQ({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`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 oQ(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 sQ(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 cQ,lQ,uQ,dQ,fQ=Object.is,pQ=0,mQ=[],hQ=DX,gQ=hQ.__b,_Q=hQ.__r,vQ=hQ.diffed,yQ=hQ.__c,bQ=hQ.unmount,xQ=hQ.__;function SQ(e,t){hQ.__h&&hQ.__h(lQ,e,pQ||t),pQ=0;var n=lQ.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function CQ(e){return pQ=1,wQ(IQ,e)}function wQ(e,t,n){var r=SQ(cQ++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):IQ(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);fQ(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=lQ,!lQ.__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,fQ(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};lQ.__f=!0;var a=lQ.shouldComponentUpdate,o=lQ.componentWillUpdate;lQ.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)},lQ.shouldComponentUpdate=i}return r.__N||r.__}function TQ(e,t){var n=SQ(cQ++,3);!hQ.__s&&FQ(n.__H,t)&&(n.__=e,n.u=t,lQ.__H.__h.push(n))}function EQ(e,t){var n=SQ(cQ++,4);!hQ.__s&&FQ(n.__H,t)&&(n.__=e,n.u=t,lQ.__h.push(n))}function DQ(e){return pQ=5,OQ(function(){return{current:e}},[])}function OQ(e,t){var n=SQ(cQ++,7);return FQ(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function kQ(e,t){return pQ=8,OQ(function(){return e},t)}function AQ(){for(var e;e=mQ.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(NQ),e.__H.__h.forEach(PQ),e.__H.__h=[]}catch(t){e.__H.__h=[],hQ.__e(t,e.__v)}}hQ.__b=function(e){lQ=null,gQ&&gQ(e)},hQ.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xQ&&xQ(e,t)},hQ.__r=function(e){_Q&&_Q(e),cQ=0;var t=(lQ=e.__c).__H;t&&(uQ===lQ?(t.__h=[],lQ.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(NQ),t.__h.forEach(PQ),t.__h=[],cQ=0)),uQ=lQ},hQ.diffed=function(e){vQ&&vQ(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(mQ.push(t)!==1&&dQ===hQ.requestAnimationFrame||((dQ=hQ.requestAnimationFrame)||MQ)(AQ)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),uQ=lQ=null},hQ.__c=function(e,t){t.some(function(e){try{e.__h.forEach(NQ),e.__h=e.__h.filter(function(e){return!e.__||PQ(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],hQ.__e(n,e.__v)}}),yQ&&yQ(e,t)},hQ.unmount=function(e){bQ&&bQ(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{NQ(e)}catch(e){t=e}}),n.__H=void 0,t&&hQ.__e(t,n.__v))};var jQ=typeof requestAnimationFrame==`function`;function MQ(e){var t,n=function(){clearTimeout(r),jQ&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);jQ&&(t=requestAnimationFrame(n))}function NQ(e){var t=lQ,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),lQ=t}function PQ(e){var t=lQ;e.__c=e.__(),lQ=t}function FQ(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!fQ(t,e[n])})}function IQ(e,t){return typeof t==`function`?t(e):t}function LQ(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(GX,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(OZ,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function RQ(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function zQ(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function BQ(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 VQ({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=HZ(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:BQ(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?BQ(u,1,t,o):i&&r<=0&&c.length>0?VZ(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 HQ=400,UQ=10,WQ=40,GQ=18;function KQ(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))?qQ(e,t,n):a instanceof HTMLElement?a:null}function qQ(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 JQ(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 YQ(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 XQ(){return navigator.vendor!==`Apple Computer, Inc.`}function ZQ(e,t){let n=e-t.top;if(n<WQ)return-Math.ceil((WQ-Math.max(0,n))/WQ*GQ);let r=t.bottom-e;return r<WQ?Math.ceil((WQ-Math.max(0,r))/WQ*GQ):0}function QQ(e,t){if(e!=null){let t=UZ[e];return t==null?null:{text:t,title:WZ[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:GZ}:null}function $Q(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 e$(e){return e!=null&&`toggle`in e}function t$(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function n$(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function r$(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function i$(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function a$(e,t){return t&&i$(e)||(e.ctrlKey||e.metaKey)&&t$(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var o$=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function s$(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 c$(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 l$(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function u$(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function d$(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function f$(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 p$(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 m$(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 h$(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=m$(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 g$(e,t){return{kind:e.kind,name:zQ(e),path:t}}function _$(e){return e==null?void 0:`${e}__tree`}function v$(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function y$(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function b$(e,t){if(e==null)return null;if(`text`in e)return $(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?y$(e.icon)?t(e.icon):{name:e.icon}:y$(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(vZ,{...n})})}function x$(e){e!=null&&YZ(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function S$(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=RQ(e);return $(GX,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(vZ,{...t(`file-tree-icon-chevron`)}):$(vZ,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?LQ(e,c,a):c??$(AZ,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:b$(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:b$(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(vZ,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function C$(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=RQ(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??$Q(t.ancestorPaths,v,y),ee=t.kind===`directory`&&(b?.has(P)??!1),te=A(t,P),B=QQ(z,ee),V=S&&w,H=te!=null||x||V,ne=V&&T===`always`,re=a.getPath()===P,ie=re?a.getValue():``,ae=R||!re?null:$(aQ,{ref:D,ariaLabel:`Rename ${zQ(t)}`,isFlattened:t.isFlattened,value:ie,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),oe=S$(t,k,{actionLaneEnabled:V,customDecoration:te,decorationLaneEnabled:H,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:B,gitLaneActive:x,renameInput:ae,showDecorativeActionAffordance:ne}),se={...oQ({ariaLabel:zQ(t),domId:t.isFocused?v$(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:V,contextMenuButtonVisibility:V?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:ee,effectiveGitStatus:z,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(P),j(t,P,{anchorRect:l$(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&re?$(`div`,{...se,children:oe}):$(`button`,{...se,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:oe})}function w$(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(RQ(e))).map((n,r)=>C$(e,n,t.start+r))}function T$({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=BG,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 _=DQ(null),v=DQ(null),y=DQ(!1),b=DQ(null),x=DQ(null),S=DQ(null),C=DQ(null),w=DQ(null),T=DQ(new Map),E=DQ(new Map),D=DQ(()=>{}),O=DQ(null),k=DQ(0),A=DQ(!1),j=DQ(null);j.current!==t&&(A.current=!1,j.current=t);let M=DQ(!1),N=DQ(null),P=DQ(null),F=DQ(!1),I=DQ(null),L=DQ(null),R=DQ(null),z=DQ(null),ee=DQ(null),te=DQ(null),B=DQ(null),V=DQ(null),H=DQ(!1),ne=DQ(null),re=DQ(null),ie=DQ(null),ae=DQ(null),oe=OQ(()=>new Map,[]),[,se]=CQ(0),[ce,le]=CQ(null),[ue,U]=CQ(null),[de,fe]=CQ(null),[pe,me]=CQ(null),[he,ge]=CQ(0),[_e,ve]=CQ(null),ye=DQ(_e);ye.current=_e;let be=DQ(null),xe=DQ(null),Se=DQ(null),Ce=DQ(null),we=DQ(null),Te=DQ(!1),Ee=()=>{xe.current=null,Se.current=null,Ce.current=null},De=(e,t)=>{xe.current=e,Se.current=null,Ce.current=t==null?null:{path:e,scrollTop:t}},Oe=(e,t)=>{xe.current=null,Se.current={path:e,viewportOffset:t},Ce.current=null},ke=DQ(d===`retain`&&t.isSearchOpen()),[Ae,je]=CQ(p);TQ(()=>{p||je(!1)},[p]);let Me=DQ(!1),Ne=kQ(()=>{Me.current=!0,je(e=>e&&!1)},[]),[Pe,Fe]=CQ(()=>VQ({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Ie,Le]=CQ(!1);TQ(()=>{Le(!0)},[]);let Re=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,ze=e?.contextMenu?.triggerMode??(Re?`right-click`:`both`),W=ze===`both`||ze===`button`,G=e?.contextMenu?.buttonVisibility??`when-needed`,Be=ze===`both`||ze===`right-click`;EQ(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;we.current=t,U(t),me(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Te.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 Ve=kQ((e,t)=>{d$(T.current,e,t)},[]),He=kQ((e,t)=>{d$(E.current,e,t)},[]),Ue=kQ(e=>{x.current=e},[]),We=kQ(e=>f$(e,E.current,T.current),[]),Ge=n!=null||r!=null||i!=null,{resolveIcon:Ke}=OQ(()=>EX(a),[a]),qe=t[uX](),Je=qe.getPath(),Ye=Je!=null,Xe=t.isSearchOpen(),Ze=t.getSearchValue(),Qe=t.getFocusedPath(),$e=t.getFocusedIndex(),et=t.getScrollRequest(),tt=t.isDragAndDropEnabled(),nt=t.getDragSession(),rt=OQ(()=>nt==null?null:new Set(nt.draggedPaths),[nt]),it=nt?.target??null,at=nt?.primaryPath??null,ot=_$(o),{overlayHeight:st,overlayRows:ct,snapshot:lt,visibleRows:ut}=Pe,dt=lt.physical.viewportHeight,ft=OQ(()=>({end:lt.window.endIndex,start:lt.window.startIndex}),[lt.window.endIndex,lt.window.startIndex]),pt=ct,mt=lt.sticky.rows,ht=lt.physical.totalHeight,gt=lt.sticky.height,_t=OQ(()=>new Set(mt.map(e=>RQ(e.row))),[mt]),vt=$e>=0&&$e>=ft.start&&$e<=ft.end,yt=kQ((e,t)=>u?.({item:g$(e,t),row:e})??null,[u]),bt=kQ(e=>YZ(e==null?null:T.current.get(e)??null)?!0:YZ(S.current),[]),xt=kQ(e=>{bt(t.focusNearestPath(e))},[t,bt]),St=DQ(xt);St.current=xt;let Ct=DQ(!0),wt=DQ(()=>{}),Tt=kQ((t=!0)=>{let n=ye.current;n!=null&&(Ct.current=Ct.current&&t,ve(null),e?.contextMenu?.onClose?.(),Ct.current&&xt(n.path))},[e?.contextMenu,xt]);wt.current=Tt;let Et=kQ(e=>{let t=e==null?null:u$(S.current,e);fe(e=>e===t?e:t)},[]),Dt=kQ((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=We(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;De(n,e?.scrollTop??null),M.current=!0,le(e=>e===n?e:n)}i.focus(),Et(a),Ct.current=!0,ve({anchorRect:r?.anchorRect??null,item:g$(e,n),path:n,source:r?.source??`keyboard`})},[t,We,Et]),Ot=kQ(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=ZZ(e,dt);I.current=$e<0||e==null?null:Math.max(0,Math.min($e*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(me(`focus`),se(e=>e+1))}},[t,$e,s,l,dt]),kt=kQ((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=ZZ(i,dt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:VQ({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,nQ(i,a,s,l,u,d),D.current(),be.current=n?e:null,!0},[t,s,c,dt,h]),At=()=>y.current===!0||ae.current!=null||H.current===!0,jt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Mt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Nt=()=>{z.current!=null&&(clearTimeout(z.current),z.current=null),R.current=null},K=()=>{te.current?.remove(),te.current=null},Pt=()=>{Mt(L.current),L.current=null,ee.current=null},Ft=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},It=()=>{V.current?.(),V.current=null,ae.current!=null&&(clearTimeout(ae.current),ae.current=null),H.current=!1,ne.current=null,ie.current=null,re.current!=null&&(re.current.setAttribute(`draggable`,`true`),re.current.style.removeProperty(`touch-action`),re.current=null),K(),Nt(),Pt(),B.current=null},Lt=(e,n)=>{let r=S.current?.getRootNode(),i=JQ(KQ(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Rt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Nt();return}let r=t.getItem(e.directoryPath),i=e$(r)?r:null;if(i==null||i.isExpanded()){Nt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;R.current!==a&&(Nt(),R.current=a,z.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},zt=()=>{L.current=null;let e=ee.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=ZQ(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()),Rt(Lt(e.clientX,e.clientY)),L.current=jt(zt)},Bt=(e,t)=>{ee.current={clientX:e,clientY:t},L.current??=jt(zt)},Vt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(It(),K(),Nt(),Pt(),t.startDrag(r)===!1){e.preventDefault();return}if(B.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),XQ())){let t=YQ(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ft(t),te.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ht=()=>{K(),Nt(),Pt(),B.current=null,t.cancelDrag()},Ut=(e,n,r)=>{if(ae.current!=null||H.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ie.current={clientX:i.clientX,clientY:i.clientY},re.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!H.current;ae.current!=null&&(clearTimeout(ae.current),ae.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),V.current===o&&(V.current=null),t&&(a.setAttribute(`draggable`,`true`),re.current===a&&(re.current=null),ie.current=null)},s=e=>{let t=e.touches[0],n=ie.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=UQ*UQ||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),V.current=o,ae.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),re.current===a&&(re.current=null),ie.current=null;return}H.current=!0,re.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),B.current=n;let e=a.getBoundingClientRect(),s=YQ(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`}),Ft(s),te.current=s,ne.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=ne.current;n!=null&&te.current!=null&&(te.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Rt(Lt(t.clientX,t.clientY)),Bt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Lt(n.clientX,n.clientY),t.completeDrag(),It()},u=()=>{t.cancelDrag(),It()};V.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)},HQ)},Wt=e=>{if(_e!=null){if(e.key===`Escape`){Tt(),e.preventDefault(),e.stopPropagation();return}o$.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(qe.isActive()){if(e.key===`Escape`)qe.cancel();else if(e.key===`Enter`)qe.commit();else return;me(`focus`),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Ot(Qe??void 0),e.preventDefault(),e.stopPropagation();return}if(Xe){if(e.key===`Escape`)F.current=!1,I.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=ZZ(n,dt);I.current=$e<0||n==null?null:Math.max(0,Math.min($e*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;me(`focus`),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&n$(e)){t.openSearch(e.key),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Re&&i$(e),r=a$(e,Re),i=r&&S.current!=null?XZ(S.current):null,a=r?new Set(p$(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Qe&&a.has(o)){let e=C.current;De(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=e$(p)?p:null,h=u!=null&&(_t.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=f$(u,E.current,T.current);e==null||n==null?y=!1:Dt(e,u)}else if((e.ctrlKey||e.metaKey)&&t$(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;me(`focus`);let b=t.getFocusedPath(),x=b!=null&&(_t.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))De(b,v?.scrollTop??null),M.current=!0,le(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Oe(b,h$(S.current,v,i,u,s,gt,dt)),M.current=!0,le(e=>e===b?e:b)):Ee()}se(e=>e+1),e.preventDefault(),e.stopPropagation()};EQ(()=>{if(!(!f||!Xe)){if(ke.current){ke.current=!1;return}YZ(w.current)}},[Xe,f]),EQ(()=>{let e=x.current;switch(iQ({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:Je})){case`reset`:P.current=null;return;case`reveal-canonical`:Je!=null&&kt(Je,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(be.current=null,P.current=Je,YZ(e),e.select());return}},[ft.end,ft.start,Je,kt,_t]),EQ(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=XZ(e)?.dataset.itemPath??null;le(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,XZ(e)!=null){r();return}M.current=!1,le(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,le(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;le(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),EQ(()=>{let e=S.current;e!=null&&(lt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[lt.physical.scrollTop]),EQ(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=ZZ(n,g);let a=()=>{let e=t.getVisibleCount(),r=QZ(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Fe(VQ({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=QZ(O.current,g),i=t.getVisibleRows(e,e)[0]??null;eQ(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=!1,l=t.subscribe(()=>{o?se(e=>e+1):o=!0,a()}),u=()=>{Te.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,ge(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||Te.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),ye.current!=null&&y.current&&wt.current(),Te.current===!0){y.current=!1;return}U(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:$Z(e[0]))??ZZ(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),EQ(()=>{Re||_e==null||Tt(!1)},[Tt,Re,_e]);let Gt=OQ(()=>_e==null?null:`${_e.path}::${_e.source}`,[_e]);EQ(()=>{if(Gt==null){m?.clearSlotContent(hW);return}let t=ye.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??c$(n.getBoundingClientRect()),close:e=>{wt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Ct.current&&St.current(ye.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(hW,i),e?.contextMenu?.onOpen?.(t.item,r),x$(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&x$(i)}),()=>{m?.clearSlotContent(hW)}},[Gt,e?.contextMenu,m]),EQ(()=>{_e!=null&&t.getItem(_e.path)==null&&Tt()},[Tt,_e,t]),EQ(()=>{if(_e==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(s$(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Tt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Tt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Tt,_e]),EQ(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=Qe;return}let r=Qe==null?null:T.current.get(Qe)??null,i=XZ(n),a=i?.dataset.itemPath??null,o=Ye&&x.current===i,c=f&&w.current===i,l=F.current&&!Xe,u=I.current??0,d=be.current,p=xe.current,m=Se.current,g=Ce.current,_=i!=null,v=M.current||_,y=N.current!==Qe,b=p!=null&&p===Qe&&Qe!=null,E=!1,O=!1;if(et!=null&&et.id!==k.current){k.current=et.id;let n=et.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,dt-s))):gt;E=!0,O=tQ(e,n,s,dt,ht,et.offset,t)}t.clearScrollRequest(et.id)}let A=!E&&l&&nQ(e,$e,s,dt,ht,u),j=!E&&d!=null&&d===Qe&&nQ(e,$e,s,dt,ht,gt),P=!E&&m!=null&&m.path===Qe&&nQ(e,$e,s,dt,ht,m.viewportOffset),L=!E&&g!=null&&g.path===Qe&&e.scrollTop!==g.scrollTop;if(L&&(e.scrollTop=g.scrollTop),(L||O||j||P||A||v&&y&&d!==Qe&&!b&&eQ(e,$e,s,dt,gt))&&D.current(),E){N.current=Qe;return}if(!v){N.current=Qe;return}if(o){N.current=Qe;return}if(c&&!l){N.current=Qe;return}if(r==null){l&&$e>=0&&(nQ(e,$e,s,dt,ht,u),D.current()),N.current=Qe;return}(y||l||d===Qe||p===Qe||m?.path===Qe||g?.path===Qe||a==null||a!==Qe)&&(YZ(r),d===Qe&&(be.current=null),p===Qe&&(xe.current=null),m?.path===Qe&&(Se.current=null),g?.path===Qe&&(Ce.current=null),F.current=!1,I.current=null),N.current=Qe},[t,$e,Qe,vt,s,Ye,Xe,ft,dt,f,et,h,gt,ht,ut]);let Kt=$e>=0&&$e>=lt.visible.startIndex&&$e<=lt.visible.endIndex,qt=Qe!=null&&pt.some(e=>RQ(e.row)===Qe),Jt=Kt||qt,Yt=W&&M.current===!0&&Jt?Qe:null,Xt=pe===`pointer`?ue:null,Zt=_e?.path??we.current??Xt??Yt??ue,Qt=_e?.source===`right-click`;EQ(()=>{y.current&&_e==null||Et(We(Zt))},[_e,We,ft,dt,he,pt,Zt,Et,ut]);let $t=kQ(e=>{if(y.current||s$(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&&me(e=>e===`pointer`?e:`pointer`),U(e=>e===i?e:i)},[]),en=kQ(()=>{U(null)},[]);EQ(()=>{if(!tt)return;let e=()=>{It(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),It(),t.cancelDrag()}},[t,tt]);let tn=e=>{if(!tt||t.getDragSession()==null||H.current)return;let n=JQ(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Rt(t.getDragSession()?.target??null),Bt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},nn=e=>{if(!tt||t.getDragSession()==null||H.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Nt(),Pt(),t.setDragTarget(null))},rn=e=>{!tt||t.getDragSession()==null||H.current||(e.preventDefault(),Lt(e.clientX,e.clientY),t.completeDrag(),K(),Nt(),Pt(),B.current=null)},an=lt.window.height,on=lt.window.offsetTop,sn=Math.min(0,dt-an),cn=Math.min(0,dt-an-gt),ln=ce===Qe||F.current,un=Qe!=null&&ln&&!vt&&$e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null,dn=un==null?null:rQ($e,s,ft,an),fn=B.current,pn=at!=null&&fn!=null&&fn.path===at&&fn.index>=ft.start&&fn.index<=ft.end,mn=at!=null&&fn!=null&&fn.path===at&&!pn&&fn.path!==un?.path?fn:null,hn=mn==null?null:rQ(mn.index,s,ft,an),gn=r$(($e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null)?.ancestorPaths.at(-1)??null),_n=Xe&&Qe!=null?v$(o,Qe,!vt):void 0,vn=_e?.path??(Xe?Qe:ce),yn=_e?.path??ue,bn=We(Zt),xn=Re&&W&&!Qt&&!Ye&&bn!=null&&de!=null&&Zt!=null,Sn=Re&&(xn||_e!=null),Cn=_e?.anchorRect,wn=Cn==null&&bn!=null&&de!=null&&(_e!=null||xn)?de:null,Tn=Cn==null?wn==null?void 0:{top:`${wn}px`}:{left:`${Cn.left}px`,position:`fixed`,right:`auto`,top:`${Cn.top}px`},En=Qt?{opacity:`0`}:void 0,Dn=kQ((e,n,r,i)=>{let a=sQ({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:Xe,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);break}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=lt.visible.startIndex&&n.index<=lt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,le(e=>e===c?e:c),me(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&kt(c,{targetOffset:`sticky-parents`})},[t,Xe,lt.visible.endIndex,lt.visible.startIndex,kt]),On=()=>{if(y.current||!W||Zt==null||bn==null)return;let e=t.getItem(Zt);e!=null&&(Et(bn),Ct.current=!0,ve({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:bn.getAttribute(`aria-label`)??Zt,path:e.getPath()},path:e.getPath(),source:`button`}))},kn={contextHoverPath:yn,contextMenuButtonTriggerEnabled:W,contextMenuButtonVisibility:G,contextMenuEnabled:Re,contextMenuRightClickEnabled:Be,contextMenuTriggerMode:ze,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:tt,draggedPathSet:rt,dragTarget:it,gitLaneActive:Ge,gitStatusByPath:n,handleRowDragEnd:Ht,handleRowDragStart:Vt,handleRowTouchStart:Ut,ignoredGitDirectories:r,ignoredInheritanceCache:oe,instanceId:o,itemHeight:s,onKeyDown:Wt,onRowClick:Dn,openContextMenuForRow:Dt,registerButton:Ve,registerRenameInput:Ue,renameView:qe,renderDecorationForRow:yt,resolveIcon:Ke,shouldSuppressContextMenu:At,visualFocusPath:vn},An={...kn,registerButton:He};return $(`div`,{ref:S,id:ot,"data-file-tree-context-menu-button-visibility":Re&&W?G:void 0,"data-file-tree-context-menu-trigger-mode":Re?ze:void 0,"data-file-tree-has-context-menu-action-lane":Re&&W?`true`:void 0,"data-file-tree-has-git-lane":Ge?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:tt?nn:void 0,onDragOver:tt?tn:void 0,onDrop:tt?rn:void 0,onKeyDown:Wt,onPointerLeave:Re?en:void 0,onPointerOver:Re?$t:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:gn}}),$(`slot`,{name:mW,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":Xe?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":_n,"aria-controls":ot,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ae?`true`:void 0,value:Ze,onBlur:()=>{d===`retain`&&!Me.current||t.closeSearch()},onFocus:Ne,onPointerDown:Ne,onInput:e=>{Ne();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Ie&&pt.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${st}px`},children:pt.map((e,t)=>C$(An,e.row,`sticky:${RQ(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${pt.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${ht}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${on}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${an}px`,top:`${sn}px`,bottom:`${cn}px`},children:[w$(kn,ft,_t),un!=null&&dn!=null?C$(kn,un,`parked:${un.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:at===un.path?`none`:void 0,position:`absolute`,right:`0`,top:`${dn}px`}}):null,mn!=null&&hn!=null?C$(kn,mn,`parked-drag:${mn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${hn}px`}}):null]})]})]}),Re?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Sn?`true`:`false`,style:Tn,children:[$(`button`,{ref:v,type:`button`,"data-type":gW,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":_e==null?`false`:`true`,"data-visible":xn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),_e!=null){Tt();return}On()},tabIndex:-1,style:En,children:$(vZ,{...Ke(`file-tree-icon-ellipsis`)})}),_e==null?null:$(`slot`,{name:hW})]}):null,_e==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Tt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Tt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var E$={hydrateRoot:(e,t)=>{pZ(UX(T$,t),e)},renderRoot:(e,t)=>{fZ(UX(T$,t),e)},unmountRoot:e=>{fZ(null,e)}};function D$(e,t){E$.renderRoot(e,t)}function O$(e,t){E$.hydrateRoot(e,t)}function k$(e){E$.unmountRoot(e)}var A$=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)}}},j$=`__c`,M$=`__k`,N$=`__d`,P$=`__s`,F$=/[\s\n\\/='"\0<>]/,I$=/^(xlink|xmlns|xml)([A-Z])/,L$=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,R$=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,z$=new Set([`draggable`,`spellcheck`]);function B$(e){e.__g===void 0?e[N$]=!0:e.__g|=8}function V$(e){e.__g===void 0?e[N$]=!1:e.__g&=-9}function H$(e){return e.__g===void 0?!0===e[N$]:!!(8&e.__g)}var U$=/["&<]/;function W$(e){if(e.length===0||!1===U$.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var G$={},K$=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),q$=/[A-Z]/g;function J$(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:G$[n]||(G$[n]=n.replace(q$,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||K$.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function Y$(){this.__d=!0}function X$(e,t){return{__v:e,context:t,props:e.props,setState:Y$,forceUpdate:Y$,__d:!0,__h:[]}}function Z$(e,t,n){if(!e.s){if(n instanceof Q$){if(!n.s)return void(n.o=Z$.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Z$.bind(null,e,t),Z$.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var Q$=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{Z$(r,1,a(this.v))}catch(e){Z$(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?Z$(r,1,t?t(i):i):n?Z$(r,1,n(i)):Z$(r,2,i)}catch(e){Z$(r,2,e)}},r},e}(),$$,e1,t1,n1,r1={},i1=Array.isArray,a1=Object.assign,o1=``,s1=`<!--$s-->`,c1=`<!--/$s-->`;function l1(e,t){var n,r=e.type,i=!0;return e[j$]?(i=!1,(n=e[j$]).state=n[P$]):n=new r(e.props,t),e[j$]=n,n.__v=e,n.props=e.props,n.context=t,B$(n),n.state??=r1,n[P$]??(n[P$]=n.state),r.getDerivedStateFromProps?n.state=a1({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[P$]===n.state?n.state:n[P$]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),t1&&t1(e),n.render(n.props,n.state,t)}function u1(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===o1)return o1;var s=typeof e;if(s!=`object`)return s==`function`?o1:s==`string`?W$(e):e+o1;if(i1(e)){var c,l=o1;i[M$]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=u1(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=o1,i1(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return o1;e.__=i,$$&&$$(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===GX){if(`tpl`in g){for(var x=o1,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!i1(C)?x+=C:x+=u1(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+W$(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=l1(e,b),y=e[j$];else{e[j$]=y=X$(e,b);for(var E=0;H$(y)&&E++<25;){V$(y),t1&&t1(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}B$(y)}if(y.getChildContext!=null&&(t=a1({},t,y.getChildContext())),T&&DX.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===GX&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return u1(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[P$]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,r1),H$(y)?(v=l1(e,t),(y=e[j$]).getChildContext!=null&&(t=a1({},t,y.getChildContext())),u1(v=v!=null&&v.type===GX&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):o1}finally{e1&&e1(e),n1&&n1(e)}}}v=v!=null&&v.type===GX&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=u1(v,t,n,r,e,a,o);return e1&&e1(e),DX.unmount&&DX.unmount(e),e._suspended?typeof D==`string`?s1+D+c1:i1(D)?(D.unshift(s1),D.push(c1),D):D.then(function(e){return s1+e+c1}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return u1(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=DX.__e;return k&&k(i,e),o1}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=u1(v,t,n,r,e,a,o);return e._suspended?s1+s+c1:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=o1;for(var N in g){var P=g[N];if(typeof(P=f1(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=J$(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(I$.test(N))N=N.replace(I$,`$1:$2`).toLowerCase();else{if(F$.test(N))continue;N[4]!==`-`&&!z$.has(N)||P==null?n?R$.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):L$.test(N)&&(N=N.toLowerCase()):P+=o1}}P!=null&&!1!==P&&(j=!0===P||P===o1?j+` `+N:j+` `+N+`="`+(typeof P==`string`?W$(P):P+o1)+`"`)}}if(F$.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=W$(A):A!=null&&!1!==A&&!0!==A&&(M=u1(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),e1&&e1(e),n1&&n1(e),!M&&d1.has(h))return j+`/>`;var F=`</`+h+`>`,I=j+`>`;return i1(M)?[I].concat(M,[F]):typeof M==`string`?I+M+F:[I,M,F]}var d1=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function f1(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var p1=0;function m1(e){return e!=null&&e.length>0?e:(p1+=1,`pst_ft_${p1}`)}function h1({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??BG)}function g1(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 _1(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 v1(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var y1=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new A$;#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=m1(a),this.#p=xX(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=zG(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new gX({...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&&(k$(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()}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)}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)}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),D$(t.wrapper,this.#w()))}setGitStatus(e){this.#p=xX(e,this.#p);let t=this.#T();t!=null&&D$(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),D$(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),O$(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),D$(r,this.#w())}#C(){return{initialViewportHeight:h1({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(mW,e());return}this.#l.setSlotHtml(mW,this.#e?.header?.html??null)}#k(e){let t=v1(e).find(e=>_1(e)),n=g1(MG(LG(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=v1(e),n=t.find(e=>_1(e)),r=t.filter(e=>e!==n),i=LG(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=g1(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=LG(this.#m);t.colored&&PG(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${uW}]`);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(uW,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=WG(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 XG(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 b1(e){let[t]=(0,W.useState)(()=>new y1(e)),n=(0,W.useRef)({timeout:null,model:t});return(0,W.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}var x1=(0,W.memo)(function({files:e,activeFile:t,commentCounts:n,viewedFiles:r,untrackedFiles:i,onFileClick:a,collapsed:o,onToggleCollapse:s}){let[c,l]=(0,W.useState)(``),u=(0,W.useMemo)(()=>e.map(e=>e.name),[e]),d=(0,W.useMemo)(()=>{let e=new Set;return u.forEach(t=>{let n=t.split(`/`);for(let t=1;t<n.length;t++)e.add(n.slice(0,t).join(`/`))}),Array.from(e)},[u]),f=(0,W.useMemo)(()=>e.map(e=>{let t=`modified`;if(i.has(e.name))t=`untracked`;else if(e.prevName)t=`renamed`;else{let n=e.prevObjectId,r=e.newObjectId;n===`0000000`||n===`0000000000000000000000000000000000000000`?t=`added`:(r===`0000000`||r===`0000000000000000000000000000000000000000`)&&(t=`deleted`)}return{path:e.name,status:t}}),[e,i]),p=(0,W.useRef)({commentCounts:n,viewedFiles:r});p.current={commentCounts:n,viewedFiles:r};let{model:m}=b1({paths:u,fileTreeSearchMode:`hide-non-matches`,gitStatus:f,renderRowDecoration:(0,W.useCallback)(e=>{let t=e.item.path,{commentCounts:n,viewedFiles:r}=p.current,i=r.has(t),a=n[t]??0;return i&&a>0?{text:`✓ 💬 ${a}`,title:`Viewed, ${a} comment${a>1?`s`:``}`}:i?{text:`✓`,title:`Viewed`}:a>0?{text:`💬 ${a}`,title:`${a} comment${a>1?`s`:``}`}:null},[]),initialSelectedPaths:t?[t]:[],initialExpandedPaths:d,onSelectionChange:e=>{e.length>0&&e[0]!==t&&a(e[0])}});return(0,W.useEffect)(()=>{m.resetPaths(u,{initialExpandedPaths:d})},[u,d,m]),(0,W.useEffect)(()=>{m.setGitStatus(f)},[f,n,r,m]),(0,W.useEffect)(()=>{if(t)try{m.focusPath(t),m.scrollToPath(t,{focus:!0,offset:`nearest`})}catch(e){console.error(`Failed to scroll to active file:`,e)}},[t,m]),(0,W.useEffect)(()=>{m.setSearch(c||null)},[c,m]),o?(0,G.jsx)(`div`,{className:`ft`,children:(0,G.jsx)(`div`,{className:`ft-search`,children:s&&(0,G.jsx)($T,{content:`Expand sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:s,"aria-label":`Expand sidebar`,children:(0,G.jsx)(hO,{size:16})})})})}):(0,G.jsxs)(`div`,{className:`ft`,style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,G.jsxs)(`div`,{className:`ft-search`,children:[s&&(0,G.jsx)($T,{content:`Collapse sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:s,"aria-label":`Collapse sidebar`,children:(0,G.jsx)(mO,{size:16})})}),(0,G.jsxs)(`div`,{className:`ft-search-wrapper`,children:[(0,G.jsx)(CO,{size:14,className:`ft-search-icon`}),(0,G.jsx)(`input`,{type:`text`,placeholder:`Filter files...`,value:c,onChange:e=>l(e.target.value),className:`ft-search-input`})]})]}),(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`auto`},children:(0,G.jsx)(SW,{model:m,className:`ft-pierre-tree`})})]})});function S1(e){return e.status===`resolved`?`resolved`:e.replies?.length?`replied`:`open`}var C1=[{key:`all`,label:`All`},{key:`open`,label:`Open`},{key:`replied`,label:`Replied`},{key:`resolved`,label:`Resolved`}];function w1({comments:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s}){let[c,l]=(0,W.useState)(`all`),u=(0,W.useMemo)(()=>{let t={all:e.length,open:0,replied:0,resolved:0};for(let n of e)t[S1(n)]++;return t},[e]),d=(0,W.useMemo)(()=>[...e].sort((e,t)=>t.createdAt-e.createdAt),[e]),f=(0,W.useMemo)(()=>c===`all`?d:d.filter(e=>S1(e)===c),[d,c]);return e.length===0?null:(0,G.jsxs)(`div`,{className:`cmt`,role:`complementary`,"aria-label":`Review comments`,children:[(0,G.jsxs)(`div`,{className:`cmt-head`,children:[(0,G.jsxs)(`div`,{className:`cmt-title`,children:[(0,G.jsx)(uO,{size:14,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:`Comments`}),(0,G.jsx)(`span`,{className:`cmt-total`,children:e.length})]}),(0,G.jsx)(`div`,{className:`cmt-filters`,role:`tablist`,"aria-label":`Filter comments`,children:C1.map(e=>(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":c===e.key,className:`cmt-filter ${c===e.key?`cmt-filter-active`:``}`,onClick:()=>l(e.key),disabled:e.key!==`all`&&u[e.key]===0,children:[e.label,(0,G.jsx)(`span`,{className:`cmt-filter-count`,children:u[e.key]})]},e.key))})]}),(0,G.jsx)(`ul`,{className:`cmt-list`,"aria-label":`Comment threads`,children:f.length===0?(0,G.jsxs)(`li`,{className:`cmt-empty`,children:[`No `,c,` comments`]}):f.map(e=>(0,G.jsx)(T1,{comment:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s},e.id))})]})}function T1({comment:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s}){let c=S1(e),l=e.status===`resolved`,u=e.replies?.length??0,{haptic:d,sound:f}=dD(),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(!1),x=(0,W.useCallback)(()=>{e.lineNumber>0?oE(e.filePath,e.lineNumber,e.side):document.getElementById(`file-${e.filePath}`)?.scrollIntoView({block:`start`})},[e.filePath,e.lineNumber,e.side]),S=e.lineNumber>0?`:${e.lineNumber}`:` · file`;return(0,G.jsxs)(`li`,{className:`cmt-card cmt-card-${c} ${l?`cmt-card-resolved`:``}`,children:[(0,G.jsxs)(`div`,{className:`cmt-card-top`,children:[(0,G.jsx)(`span`,{className:`cmt-dot cmt-dot-${c}`,"aria-hidden":`true`}),(0,G.jsxs)(`button`,{className:`cmt-loc`,onClick:x,title:`Jump to ${e.filePath}${S}`,children:[(0,G.jsx)(`span`,{className:`cmt-loc-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`cmt-loc-line`,children:S})]}),(0,G.jsx)(`span`,{className:`cmt-time`,children:eE(e.createdAt)})]}),e.lineContent?.trim()&&(0,G.jsx)(`button`,{className:`cmt-codeline`,onClick:x,title:`Jump to line`,children:(0,G.jsx)(`code`,{children:e.lineContent.trim().slice(0,160)})}),_?(0,G.jsx)(JU,{draftKey:`tracker-edit:${e.id}`,initialBody:e.body,onCancel:()=>v(!1),onSubmit:t=>{a(e.id,t),v(!1)}}):(0,G.jsx)(XH,{content:e.body,className:`cmt-body markdown-body`}),(0,G.jsxs)(`div`,{className:`cmt-actions`,children:[(0,G.jsxs)(`button`,{className:`cmt-act`,onClick:()=>{g(e=>!e),m(!0)},title:`Reply`,children:[(0,G.jsx)(KD,{size:13,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:`Reply`})]}),(0,G.jsx)(`button`,{className:`cmt-act`,onClick:()=>v(e=>!e),title:`Edit comment`,children:(0,G.jsx)(_O,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`cmt-act ${l?`cmt-act-resolved`:``}`,onClick:()=>{l?(n(e.id),d(`light`),f(`toggle`)):(t(e.id),d(`success`),f(`resolve`))},title:l?`Reopen`:`Resolve`,children:l?(0,G.jsx)(xO,{size:13,"aria-hidden":`true`}):(0,G.jsx)(ND,{size:13,"aria-hidden":`true`})}),y?(0,G.jsxs)(`span`,{className:`cmt-confirm`,children:[(0,G.jsx)(`button`,{className:`cmt-act cmt-act-danger`,onClick:()=>{r(e.id),d(`medium`),f(`remove`)},title:`Confirm delete`,children:`Delete?`}),(0,G.jsx)(`button`,{className:`cmt-act`,onClick:()=>b(!1),title:`Cancel`,children:(0,G.jsx)(MO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`cmt-act cmt-act-del`,onClick:()=>b(!0),title:`Delete comment`,children:(0,G.jsx)(DO,{size:13,"aria-hidden":`true`})})]}),u>0&&(0,G.jsxs)(`button`,{className:`cmt-thread-toggle`,onClick:()=>m(e=>!e),"aria-expanded":p,children:[(0,G.jsx)(ID,{size:12,className:`cmt-chev ${p?`cmt-chev-open`:``}`,"aria-hidden":`true`}),u,` `,u===1?`reply`:`replies`]}),p&&u>0&&(0,G.jsx)(`ul`,{className:`cmt-replies`,children:e.replies.map(t=>(0,G.jsx)(E1,{reply:t,onEdit:n=>o(e.id,t.id,n),onRemove:()=>s(e.id,t.id)},t.id))}),h&&(0,G.jsx)(JU,{draftKey:`reply:${e.id}`,onCancel:()=>g(!1),onSubmit:t=>{i(e.id,t),d(`light`),f(`success`),g(!1),m(!0)}})]})}function E1({reply:e,onEdit:t,onRemove:n}){let r=e.role===`agent`||e.role==null&&!!e.model,[i,a]=(0,W.useState)(!1);return(0,G.jsxs)(`li`,{className:`cmt-reply ${r?`cmt-reply-agent`:``}`,children:[(0,G.jsxs)(`div`,{className:`cmt-reply-head`,children:[(0,G.jsxs)(`span`,{className:`cmt-reply-who ${r?`cmt-reply-who-agent`:``}`,children:[r?(0,G.jsx)(MD,{size:11,"aria-hidden":`true`}):null,r?e.model||`Agent`:`You`]}),(0,G.jsx)(`span`,{className:`cmt-time`,children:eE(e.createdAt)}),!r&&(0,G.jsx)(`button`,{className:`cmt-reply-act`,onClick:()=>a(e=>!e),title:`Edit reply`,children:(0,G.jsx)(_O,{size:11,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`cmt-reply-act cmt-act-del`,onClick:n,title:`Delete reply`,children:(0,G.jsx)(DO,{size:11,"aria-hidden":`true`})})]}),i?(0,G.jsx)(JU,{draftKey:`tracker-reply-edit:${e.id}`,initialBody:e.body,onCancel:()=>a(!1),onSubmit:e=>{t(e),a(!1)}}):(0,G.jsx)(XH,{content:e.body,className:`cmt-reply-body markdown-body`})]})}function D1(e,t){let[n,r]=(0,W.useState)(e);return(0,W.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function O1(e){return e===`symbols`?2:e===`text`?1:0}function k1({scope:e,query:t,regex:n,changedOnly:r,changedPaths:i,open:a}){let o=D1(t,130).trim(),s=a&&o.length>=O1(e);return{...nt({queryKey:[`search`,e,o,e===`text`?n:!1,r,r?i:null],enabled:s,placeholderData:V,staleTime:5e3,queryFn:async({signal:t})=>{let a=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},signal:t,body:JSON.stringify({scope:e,query:o,regex:e===`text`?n:!1,changedPaths:r?i:void 0})});if(!a.ok)throw Error(`Search request failed (${a.status})`);return await a.json()}}),enabled:s,pending:t.trim()!==o,minLength:O1(e)}}function A1(e,t){fetch(`/api/search/track`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:e,path:t})}).catch(()=>{})}function j1(e){return nt({queryKey:[`file-text`,e],enabled:!!e,staleTime:300*1e3,queryFn:async({signal:t})=>{let n=await fetch(`/api/file-text?path=${encodeURIComponent(e)}&version=new`,{signal:t});if(n.status===415)return{content:null,missing:!1,binary:!0};if(!n.ok)throw Error(`Failed to load file (${n.status})`);let r=await n.json();if(r.error){if(/binary/i.test(r.error))return{content:null,missing:!1,binary:!0};throw Error(r.error)}return r.missing?{content:null,missing:!0,binary:!1}:{content:r.content??``,missing:!1,binary:!1}}})}var M1=[{pattern:/^\s*(?:export\s+)?(?:async\s+)?function\s+(\w[\w$]*)\s*[<(]/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=\s*(?:async\s*)?\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=\s*(?:async\s+)?function/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?class\s+(\w[\w$]*)/i,kind:`class`,nameGroup:1},{pattern:/^\s*(?:export\s+)?interface\s+(\w[\w$]*)/i,kind:`interface`,nameGroup:1},{pattern:/^\s*(?:export\s+)?type\s+(\w[\w$]*)\s*=/i,kind:`type`,nameGroup:1},{pattern:/^\s*(?:export\s+)?enum\s+(\w[\w$]*)/i,kind:`enum`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=/i,kind:`variable`,nameGroup:1},{pattern:/^\s*def\s+(\w[\w$]*)\s*\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?fn\s+(\w[\w$]*)\s*[<(]/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?struct\s+(\w[\w$]*)/i,kind:`struct`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?enum\s+(\w[\w$]*)/i,kind:`enum`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?impl\s+(\w[\w$]*)/i,kind:`impl`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?trait\s+(\w[\w$]*)/i,kind:`trait`,nameGroup:1},{pattern:/^\s*func\s+(\w[\w$]*)\s*\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:func\s+)?\((\w[\w$]*)\s+\*?\w+\)\s+(\w[\w$]*)\s*\(/i,kind:`method`,nameGroup:2}];function N1(e){for(let{pattern:t,kind:n,nameGroup:r}of M1){let i=t.exec(e);if(i){let e=i[r];if(e)return{name:e,kind:n}}}return null}function P1(e){return new Set(e.map(e=>e.name))}function F1(e){let t=new Set;for(let n of e)n.side===`additions`&&t.add(`${n.filePath}:${n.lineNumber}`);return t}function I1(e,t){return e.kind===`file`?t.diffFileSet.has(e.path)?{type:`scrollFile`,path:e.path}:{type:`preview`,path:e.path}:t.diffFileSet.has(e.path)?{type:`scrollLine`,path:e.path,line:e.line,side:`additions`,match:e.match}:{type:`preview`,path:e.path,line:e.line,match:e.match}}function L1(e,t){if(!t||t.length===0)return null;let n=!0;for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>127){n=!1;break}let r=n?e.length:z1(e),i=null;if(!n){i=Array(r+1).fill(-1);let t=0;for(let n=0;n<e.length;){i[t]=n;let r=e.codePointAt(n);n+=r>65535?2:1,t+=R1(r)}i[r]=e.length}let a=[];for(let e of t){let[t,o]=e;if(!(t==null||o==null||o<=t||t<0||o>r))if(n)a.push([t,o]);else{let e=i[t],n=i[o];e>=0&&n>=0&&a.push([e,n])}}return a.length?a:null}function R1(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function z1(e){let t=0;for(let n=0;n<e.length;){let r=e.codePointAt(n);t+=R1(r),n+=r>65535?2:1}return t}function B1(e,t,n){let r=((t?L1(e,t):null)??V1(e,n)).map(([t,n])=>[Math.max(0,t),Math.min(e.length,n)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),i=[];for(let[e,t]of r){let n=i[i.length-1];n&&e<=n[1]?n[1]=Math.max(n[1],t):i.push([e,t])}return i}function V1(e,t){let n=t.trim();if(!n)return[];let r=[],i=e.toLowerCase(),a=n.toLowerCase(),o=0;for(;r.length<50;){let e=i.indexOf(a,o);if(e===-1)break;r.push([e,e+a.length]),o=e+a.length}return r}function H1(e,t){let n=e.toLowerCase(),r=t.toLowerCase();if(!r)return 0;let i=0,a=0,o=-1;for(let e=0;e<n.length&&i<r.length;e++)n[e]===r[i]&&(a+=o>=0&&e-o===1?5:1,o=e,i++);return i===r.length?a-e.length*.01:null}function U1(e){let t=[],n=new Set;for(let r of e){if(r.side!==`additions`)continue;let e=N1(r.content);if(e){let i=`${r.filePath}:${r.lineNumber}:${e.name}`;if(n.has(i))continue;n.add(i);let a=r.content.indexOf(e.name),o=a>=0?[[a,a+e.name.length]]:[];t.push({name:e.name,kind:e.kind,path:r.filePath,fileName:r.filePath.split(`/`).pop()||``,line:r.lineNumber,content:r.content,matchRanges:o,gitStatus:``})}}return t}var W1=[{key:`all`,label:`All`,Icon:rO},{key:`files`,label:`Files`,Icon:YD},{key:`text`,label:`Text`,Icon:kO},{key:`symbols`,label:`Symbols`,Icon:WD}],G1={function:`ƒ`,method:`m`,class:`C`,variable:`v`,interface:`I`,type:`T`,enum:`E`,struct:`S`,impl:`i`,trait:`t`};function K1(e){switch(e){case`modified`:return{label:`M`,title:`modified`};case`untracked`:return{label:`U`,title:`untracked`};case`staged_new`:case`added`:return{label:`A`,title:`added`};case`deleted`:return{label:`D`,title:`deleted`};case`renamed`:return{label:`R`,title:`renamed`};case``:case`clean`:return null;default:return{label:e.charAt(0).toUpperCase(),title:e}}}function q1({text:e,ranges:t}){if(!t.length)return(0,G.jsx)(G.Fragment,{children:e});let n=[],r=0;return t.forEach(([t,i],a)=>{t>r&&n.push(e.slice(r,t)),n.push((0,G.jsx)(`mark`,{className:`searchpalette-mark`,children:e.slice(t,i)},a)),r=i}),r<e.length&&n.push(e.slice(r)),(0,G.jsx)(G.Fragment,{children:n})}function J1(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.toLowerCase(),i=[],a=0;for(let e=0;e<r.length&&a<n.length;e++)if(r[e]===n[a]){let t=i[i.length-1];t&&t[1]===e?t[1]=e+1:i.push([e,e+1]),a++}return a===n.length?i:[]}var Y1=e=>{let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t+1)};function X1(e,t){let n=e.length-e.trimStart().length,r=e.slice(n),i=n;if(r.length>400){let e=t.find(e=>e[0]>=n),a=e?Math.max(0,e[0]-n-24):0,o=a>0?`…`:``;r=o+r.slice(a,a+400),i=n+a-o.length}let a=t.map(([e,t])=>[e-i,t-i]).filter(([e,t])=>t>0&&e<r.length).map(([e,t])=>[Math.max(0,e),Math.min(r.length,t)]);return{text:r,ranges:a}}function Z1({isOpen:e,onClose:t,initialScope:n,files:r,changedEntries:i,customMode:a,staged:o,onNavigateFile:s,theme:c,fontSize:l,monoFontFamily:u,defaultTabSize:d,lineWrap:f,showLineNumbers:p,lineHoverHighlight:m}){let[h,g]=(0,W.useState)(``),[_,v]=(0,W.useState)(n),[y,b]=(0,W.useState)(!1),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(0),[T,E]=(0,W.useState)(null),D=(0,W.useRef)(null),O=(0,W.useRef)(null),k=(0,W.useMemo)(()=>P1(r),[r]),A=(0,W.useMemo)(()=>F1(i),[i]),j=k1({scope:_,query:h,regex:y,changedOnly:x,changedPaths:(0,W.useMemo)(()=>[...k],[k]),open:e}),M=j.data&&j.data.scope===_?j.data:void 0,N=M?.error,P=nt({queryKey:[`repo-files-fallback`],enabled:e&&_===`files`&&!!N,staleTime:6e4,queryFn:async()=>(await(await fetch(`/api/repo-files`)).json()).files??[]});(0,W.useEffect)(()=>{e&&(g(``),v(n),b(!1),S(!1),w(0),E(null))},[e,n]),(0,W.useEffect)(()=>{e&&D.current?.focus()},[e]),(0,W.useEffect)(()=>{w(0),E(null)},[h,_]);let F=(0,W.useMemo)(()=>{let e=h.trim(),t=e.toLowerCase(),n=[];if(_===`files`&&N&&P.data)n=P.data.map(e=>({path:e,score:t?H1(e,t):0})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score).slice(0,60).map(({path:e})=>({kind:`file`,key:e,hit:{path:e,fileName:tE(e),gitStatus:``,matchType:``,exact:!1},inDiff:k.has(e)}));else if(M)M.scope===`files`?n=M.items.map(e=>({kind:`file`,key:e.path,hit:e,inDiff:k.has(e.path)})):M.scope===`text`?n=M.items.map(e=>({kind:`text`,key:`${e.path}:${e.line}:${e.col}`,hit:e,inDiff:k.has(e.path)})):M.scope===`symbols`?n=M.items.map(e=>({kind:`symbol`,key:`${e.path}:${e.line}:${e.name}`,hit:e,inDiff:k.has(e.path)})):M.scope===`all`&&(n=M.items.map(e=>e.kind===`file`?{kind:`file`,key:`all:${e.hit.path}`,hit:e.hit,inDiff:k.has(e.hit.path)}:e.kind===`text`?{kind:`text`,key:`all:${e.hit.path}:${e.hit.line}:${e.hit.col}`,hit:e.hit,inDiff:k.has(e.hit.path)}:{kind:`symbol`,key:`all:${e.hit.path}:${e.hit.line}:${e.hit.name}`,hit:e.hit,inDiff:k.has(e.hit.path)}));else if(_===`symbols`&&e.length<2){let e=U1(i);n=(t?e.filter(e=>e.name.toLowerCase().includes(t)):e).map(e=>({kind:`symbol`,key:`local:${e.path}:${e.line}:${e.name}`,hit:e,inDiff:!0}))}let r=n.filter(e=>e.inDiff),a=n.filter(e=>!e.inDiff);return[...r,...a]},[M,N,P.data,_,k,h,i]);(0,W.useEffect)(()=>{C>=F.length&&w(0)},[F.length,C]),(0,W.useEffect)(()=>{(O.current?.querySelector(`[data-focused="true"]`))?.scrollIntoView({block:`nearest`})},[C,F]);let I=(0,W.useMemo)(()=>({diffFileSet:k,changedKeys:A,customMode:a,staged:o}),[k,A,a,o]),L=(0,W.useCallback)((e,n)=>{let r=F[e];if(!r)return;let i=r.hit.path,a=h.trim();if(A1(a,i),r.kind===`file`){if(n){E({path:i});return}I1({kind:`file`,path:i},I).type===`scrollFile`?(t(),requestAnimationFrame(()=>s(i))):E({path:i});return}let o=r.hit.line,c=r.kind===`symbol`?r.hit.name:a;if(n){E({path:i,line:o,match:c});return}let l=I1({kind:`line`,path:i,line:o,match:c},I);l.type===`scrollLine`?(t(),requestAnimationFrame(()=>oE(i,l.line,l.side,l.match))):E({path:i,line:o,match:c})},[F,h,I,t,s]),R=(0,W.useCallback)(e=>{v(t=>W1[(W1.findIndex(e=>e.key===t)+e+W1.length)%W1.length].key)},[]),z=(0,W.useCallback)(e=>{if(e.key===`PageDown`){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:150,behavior:`auto`});return}if(e.key===`PageUp`){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-150,behavior:`auto`});return}if(e.altKey&&(e.key===`ArrowDown`||e.key===`j`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:80,behavior:`auto`});return}if(e.altKey&&(e.key===`ArrowUp`||e.key===`k`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-80,behavior:`auto`});return}if(e.shiftKey&&(e.key===`ArrowDown`||e.key===`j`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:80,behavior:`auto`});return}if(e.shiftKey&&(e.key===`ArrowUp`||e.key===`k`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-80,behavior:`auto`});return}if(e.key===`Tab`){e.preventDefault(),R(e.shiftKey?-1:1);return}let t=e=>{F.length!==0&&w(t=>(t+e+F.length)%F.length)};e.key===`ArrowDown`||e.ctrlKey&&(e.key===`n`||e.key===`j`)?(e.preventDefault(),t(1)):e.key===`ArrowUp`||e.ctrlKey&&(e.key===`p`||e.key===`k`)?(e.preventDefault(),t(-1)):e.ctrlKey&&e.key===`d`?(e.preventDefault(),t(8)):e.ctrlKey&&e.key===`u`?(e.preventDefault(),t(-8)):e.key===`Enter`&&(e.preventDefault(),L(C,e.metaKey||e.ctrlKey))},[R,F.length,L,C]),ee=(0,W.useCallback)(()=>{T?E(null):t()},[T,t]),te=M?.total??F.length,B=(j.isFetching||j.pending)&&j.enabled,V=M?.indexing;return(0,G.jsxs)(IU,{open:e,onClose:ee,className:`searchpalette ui-modal--palette ${T?`searchpalette--split`:``}`,ariaLabel:`Search files, text and symbols`,initialFocus:D,onKeyDown:z,children:[(0,G.jsxs)(`div`,{className:`searchpalette-header`,children:[(0,G.jsxs)(`div`,{className:`searchpalette-input-row`,children:[(0,G.jsx)(CO,{size:15,className:`searchpalette-search-icon`}),(0,G.jsx)(`input`,{ref:D,type:`text`,className:`searchpalette-input`,placeholder:_===`all`?`Search files, text and symbols…`:_===`files`?`Search files in the repo…`:_===`text`?y?`Search by regular expression…`:`Search file contents…`:`Search symbol definitions…`,value:h,onChange:e=>g(e.target.value),role:`combobox`,"aria-expanded":F.length>0,"aria-controls":`searchpalette-list`,"aria-activedescendant":F[C]?`sp-row-${C}`:void 0,spellCheck:!1,autoComplete:`off`}),B&&(0,G.jsx)(iO,{size:14,className:`searchpalette-spinner spin`}),h&&(0,G.jsx)(`button`,{className:`searchpalette-clear`,onClick:()=>g(``),"aria-label":`Clear search`,children:(0,G.jsx)(MO,{size:14})}),(0,G.jsx)(`span`,{className:`searchpalette-count`,children:V?`indexing…`:M?`${F.length} of ${te}`:``})]}),(0,G.jsxs)(`div`,{className:`searchpalette-controls`,children:[(0,G.jsx)(`div`,{className:`searchpalette-scopes`,role:`tablist`,"aria-label":`Search scope`,children:W1.map(e=>(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":_===e.key,className:`searchpalette-scope ${_===e.key?`is-active`:``}`,onClick:()=>v(e.key),children:[(0,G.jsx)(e.Icon,{size:12}),e.label]},e.key))}),(0,G.jsxs)(`div`,{className:`searchpalette-toggles`,children:[_===`text`&&(0,G.jsx)(`button`,{className:`searchpalette-toggle ${y?`is-active`:``}`,onClick:()=>b(e=>!e),title:`Regular expression`,"aria-pressed":y,children:`.*`}),(0,G.jsxs)(`button`,{className:`searchpalette-toggle ${x?`is-active`:``}`,onClick:()=>S(e=>!e),title:`Limit to files in the current diff`,"aria-pressed":x,children:[(0,G.jsx)(QD,{size:12}),`Changed`]})]})]}),M?.regexError&&(0,G.jsx)(`div`,{className:`searchpalette-note`,children:`Invalid regex — showing literal matches`})]}),(0,G.jsxs)(`div`,{className:`searchpalette-body`,children:[(0,G.jsx)(`div`,{className:`searchpalette-list`,id:`searchpalette-list`,role:`listbox`,ref:O,children:(0,G.jsx)(Q1,{rows:F,scope:_,query:h,focusedIndex:C,engineError:N,isFetching:j.isFetching,enabled:j.enabled,minLength:j.minLength,regex:y,changedOnly:x,onHover:w,onActivate:(e,t)=>L(e,t?t.metaKey||t.ctrlKey:!1),onRetry:()=>j.refetch()})}),T&&(0,G.jsx)(i0,{preview:T,theme:c,fontSize:l,monoFontFamily:u,defaultTabSize:d,lineWrap:f,showLineNumbers:p,lineHoverHighlight:m,onClose:()=>E(null),inDiff:k.has(T.path),onGoToDiff:()=>{t(),T.line?requestAnimationFrame(()=>oE(T.path,T.line,`additions`,T.match)):requestAnimationFrame(()=>s(T.path))}},T.path)]}),(0,G.jsxs)(`div`,{className:`searchpalette-foot`,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`Tab`}),` scope`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`↑↓`}),` move`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`↵`}),` `,T&&k.has(T.path)?`view in diff`:`open`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`⌘↵`}),` peek`]}),T&&(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`⌥↑↓`}),` / `,(0,G.jsx)(`kbd`,{children:`⇧↑↓`}),` scroll preview`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`esc`}),` `,T?`back`:`close`]})]})]})}function Q1({rows:e,scope:t,query:n,focusedIndex:r,engineError:i,isFetching:a,enabled:o,minLength:s,regex:c,changedOnly:l,onHover:u,onActivate:d,onRetry:f}){return i&&t!==`files`?(0,G.jsxs)(`div`,{className:`searchpalette-state searchpalette-state--error`,children:[(0,G.jsx)(`p`,{children:`Search engine unavailable`}),(0,G.jsx)(`span`,{className:`searchpalette-state-detail`,children:i}),(0,G.jsx)(`button`,{className:`searchpalette-retry`,onClick:f,children:`Retry`})]}):e.length>0?(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,G.jsx)($1,{row:e,index:t,query:n,focused:t===r,onHover:u,onActivate:d},e.key))}):o?a?(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsx)(iO,{size:15,className:`spin`}),` Searching…`]}):(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsxs)(`p`,{children:[`No matches`,n.trim()?` for “${n.trim()}”`:``]}),(0,G.jsx)(`span`,{className:`searchpalette-state-detail`,children:l?`Searching only changed files — turn off Changed to search the whole repo`:t===`text`&&!c?`Try Tab to switch scope, or enable .* for regex`:`Try Tab to switch scope`})]}):(0,G.jsx)(`div`,{className:`searchpalette-state`,children:t===`symbols`?n.trim()?`No matching symbols in the current diff. Type at least 2 characters to search the whole repository.`:`No symbols found in the current diff. Type at least 2 characters to search the whole repository.`:t===`text`?`Type to search file contents`:`Type to filter — or browse all files`})}function $1({row:e,index:t,query:n,focused:r,onHover:i,onActivate:a}){let o=K1(e.hit.gitStatus);return(0,G.jsxs)(`div`,{id:`sp-row-${t}`,role:`option`,"aria-selected":r,"data-focused":r,className:`searchpalette-row ${r?`is-focused`:``} ${e.inDiff?`is-indiff`:``}`,onMouseEnter:()=>i(t),onClick:e=>a(t,e),children:[e.kind===`file`&&(0,G.jsx)(e0,{hit:e.hit,query:n}),e.kind===`text`&&(0,G.jsx)(t0,{hit:e.hit,query:n}),e.kind===`symbol`&&(0,G.jsx)(n0,{hit:e.hit}),(0,G.jsxs)(`div`,{className:`searchpalette-rail`,children:[e.inDiff&&(0,G.jsx)(`span`,{className:`searchpalette-pill searchpalette-pill--diff`,children:`diff`}),o&&(0,G.jsx)(`span`,{className:`searchpalette-git searchpalette-git--${o.title}`,title:o.title,children:o.label})]})]})}function e0({hit:e,query:t}){let n=e.fileName,r=J1(n,t);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--file`,children:(0,G.jsx)(YD,{size:13})}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsx)(`span`,{className:`searchpalette-primary`,children:(0,G.jsx)(q1,{text:n,ranges:r})}),(0,G.jsx)(`span`,{className:`searchpalette-secondary`,children:Y1(e.path)||`./`})]})]})}function t0({hit:e,query:t}){let n=B1(e.content,e.matchRanges,t),{text:r,ranges:i}=X1(e.content,n);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--text`,children:(0,G.jsx)(kO,{size:13})}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsx)(`span`,{className:`searchpalette-primary searchpalette-code`,children:(0,G.jsx)(q1,{text:r,ranges:i})}),(0,G.jsxs)(`span`,{className:`searchpalette-secondary`,children:[e.fileName,`:`,e.line,(0,G.jsx)(`span`,{className:`searchpalette-crumb`,children:Y1(e.path)})]})]})]})}function n0({hit:e}){let t=e.content.indexOf(e.name),n=t>=0?e.content.slice(t+e.name.length).trimEnd():``,r=B1(e.name,e.matchRanges.length?r0(e):void 0,e.name);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--symbol`,title:e.kind,children:G1[e.kind]??`?`}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsxs)(`span`,{className:`searchpalette-primary`,children:[(0,G.jsx)(q1,{text:e.name,ranges:r}),n&&(0,G.jsx)(`span`,{className:`searchpalette-sigtail`,children:n.slice(0,60)})]}),(0,G.jsxs)(`span`,{className:`searchpalette-secondary`,children:[e.fileName,`:`,e.line,(0,G.jsx)(`span`,{className:`searchpalette-crumb`,children:Y1(e.path)})]})]}),(0,G.jsx)(`span`,{className:`searchpalette-kind-badge`,children:e.kind})]})}function r0(e){let t=e.content.indexOf(e.name);if(t<0)return;let n=[];for(let[r,i]of e.matchRanges){let a=r-t,o=i-t;o>0&&a<e.name.length&&n.push([Math.max(0,a),Math.min(e.name.length,o)])}return n.length?n:void 0}function i0({preview:e,theme:t,fontSize:n,monoFontFamily:r,defaultTabSize:i,lineWrap:a,showLineNumbers:o,lineHoverHighlight:s,onClose:c,inDiff:l,onGoToDiff:u}){let d=nE[t]||nE.nord,{data:f,isLoading:p,error:m}=j1(e.path),h=(0,W.useRef)(null);return(0,W.useEffect)(()=>{!f?.content||!e.line||!h.current||aE(h.current,e.line,e.match)},[f?.content,e.line,e.match]),(0,G.jsxs)(`div`,{className:`searchpalette-preview`,children:[(0,G.jsxs)(`div`,{className:`searchpalette-preview-head`,children:[(0,G.jsx)(YD,{size:12}),(0,G.jsx)(`span`,{className:`searchpalette-preview-path`,children:e.path}),l&&(0,G.jsxs)(`button`,{className:`searchpalette-preview-diff-btn`,onClick:u,title:`Open this file and line in the main diff viewer (Enter)`,style:{padding:`2.5px 8px`,fontSize:`10.5px`,background:`var(--accent-subtle)`,border:`1px solid var(--accent)`,borderRadius:`4px`,color:`var(--text-primary)`,cursor:`pointer`,fontWeight:600,marginRight:`8px`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsx)(QD,{size:11}),`View in Diff`]}),(0,G.jsx)(`button`,{className:`searchpalette-clear`,onClick:c,"aria-label":`Close preview`,children:(0,G.jsx)(MO,{size:14})})]}),(0,G.jsx)(`div`,{className:`searchpalette-preview-body`,ref:h,children:p?(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsx)(iO,{size:15,className:`spin`}),` Loading `,e.path,`…`]}):m?(0,G.jsx)(`div`,{className:`searchpalette-state searchpalette-state--error`,children:m.message}):f?.binary?(0,G.jsx)(`div`,{className:`searchpalette-state`,children:`Binary file — no preview`}):f?.missing?(0,G.jsx)(`div`,{className:`searchpalette-state`,children:`File not present in the working tree`}):f?(0,G.jsx)(Bh,{file:{name:e.path,contents:f.content??``},options:{disableFileHeader:!0,overflow:a?`wrap`:`scroll`,disableLineNumbers:!o,lineHoverHighlight:s,theme:{dark:d.type===`dark`?d.themeName:`nord`,light:d.type===`light`?d.themeName:`github-light`},themeType:d.type,unsafeCSS:`
|
|
3847
|
+
}`}var UG=new WeakMap;function WG(e){let t=UG.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(lW,`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(),UG.set(e,i),i}function GG(e,t){if(!e.isConnected)return;let n=WG(t);if(n==null)return;let r=t.querySelector(`style[${uW}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(uW,``),t.appendChild(i)),i.textContent=`:host { ${dW}: ${n}px; }`}var KG;function qG(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){KG??(KG=new CSSStyleSheet,KG.replaceSync(VG(zG)));let t=!1;try{e.adoptedStyleSheets=[KG],t=!0}catch{}if(t){e.querySelector(`style[${sW}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(sW,``),t.textContent=VG(zG),e.prepend(t)}}function JG(e,t){YG(e,t),qG(t),GG(e,t)}function YG(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`});JG(this,e)}}if(customElements.define(oW,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(oW)))e instanceof HTMLElement&&JG(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var XG=5,ZG=1<<XG,QG=ZG*4;function $G(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function eK(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function tK(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 nK(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 rK(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function iK(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 aK(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,lK(e,t)}function oK(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=nK(e).get(t);if(i===void 0)return;let a=i>>XG;e.childVisibleChunkSums[a]+=r}function sK(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=uK(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=ZG}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 cK(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>XG;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<XG}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 lK(e,t){if(t.childIds.length<QG){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/ZG),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>>XG]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function uK(e,t,n,r){let i=Math.min(t.childIds.length,n+ZG),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 dK=7,fK=3,pK=1<<fK,mK=4;function hK(e,t,n=0){return e<<mK|n<<fK|t}function gK(e){return e.depthAndFlags>>>mK}function _K(e){return(e.depthAndFlags&pK)>>fK}function vK(e){return(e.depthAndFlags&pK)!==0}function yK(e){return e.depthAndFlags&dK}function bK(e,t){return(yK(e)&t)!==0}function xK(e,t){e.depthAndFlags|=t}function SK(e,t){e.depthAndFlags=hK(t,yK(e),_K(e))}var CK=Symbol(`benchmarkInstrumentation`);function wK(e,t){return t==null||Object.defineProperty(e,CK,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function TK(e){return e==null?null:e[CK]??null}function Q(e,t,n){return e==null?n():e.measurePhase(t,n)}function EK(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function DK(e){return e>=48&&e<=57}function OK(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!DK(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&&DK(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 kK(e){let t=e.toLowerCase();return{lowerValue:t,tokens:OK(t)}}function AK(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 jK(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=AK(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function MK(e,t,n){let r=jK(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function NK(e,t){return MK(e,t,kK)}function PK(e,t){return t===e.segments.length-1?e.isDirectory?1:0:1}function FK(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=PK(e,r);return a===PK(t,r)?NK(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 IK(e,t){return FK(e,t)}function LK(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=kK(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=PK(e,n);return o===PK(t,n)?MK(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 RK(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=kK(r);return e.sortKeyById[t]=i,i}function zK(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function BK(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 VK(e){let{hasTrailingSlash:t,segments:n}=BK(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function HK(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=BK(e);return{requiresDirectory:t,segments:n}}var UK=``;function WK(){let e=new Map;return e.set(UK,0),{idByValue:e,valueById:[UK],sortKeyById:[kK(UK)]}}function GK(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 KK(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var qK=Symbol(`pathStorePreparedInputKind`);function JK(e,t){return e[qK]=t,e}function YK(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function XK(e,t,n){return n===`default`?IK(e,t):n(YK(e),YK(t))}function ZK(){return{depthAndFlags:hK(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function QK(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 $K(e){return e.isDirectory?e.segments.length:e.segments.length-1}function eq(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 tq(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function nq(e,t={}){return cq(e,t).map(e=>e.path)}function rq(e,t={}){let n=cq(e,t);return JK({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function iq(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 JK({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function aq(e){let t=e,n=t.preparedPaths;if(t[qK]===`prepared`&&n!=null)return n;if(!eq(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function oq(e){let t=e;return t[qK]===`presorted`&&t.presortedPaths!=null||tq(t.presortedPaths)?t.presortedPaths:null}function sq(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function cq(e,t={}){let n=zK(t),r=TK(t);EK(r,`workload.inputFiles`,e.length);let i=Q(r,`store.preparePathEntries.parse`,()=>e.map(e=>VK(e)));return Q(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>XK(e,t,n.sort))),i}var lq=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[ZK()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=WK();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=TK(e),this.options=zK(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,$G())}appendPaths(e){return Q(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>VK(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,Q(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return Q(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:hK(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:hK(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:hK(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=VK(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:hK(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:hK(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=VK(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(Q(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||Q(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`?LK(this.lastPreparedPath,e,this.segmentSortKeyCache):XK(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=$K(e),i=n==null?0:$K(n),a=n==null?0:QK(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=GK(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:hK(gK(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),rK(i,s),s}createFileChildUnchecked(e,t){let n=GK(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:hK(gK(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),rK(r,a),a}getOrCreateDirectoryChild(e,t){let n=GK(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&&!vK(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:hK(gK(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),rK(r,a),this.directories.set(a,$G()),a}createDirectoryChild(e,t){let n=GK(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:hK(gK(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),rK(r,a),this.directories.set(a,$G()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!vK(n))throw Error(`Path is not a directory: "${t}"`);if(bK(n,1))throw Error(`Duplicate path: "${t}"`);xK(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,eK());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(vK(a)){let t=eK();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;vK(n)&&this.directories.set(t,$G());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),rK(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!vK(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 aK(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function uq(e,t=`closed`,n=null){let r=fq(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 dq(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function fq(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 pq(e,t){return bK(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion===`closed`?!1:gK(t)<=e.defaultExpansion}function mq(e,t,n=e.snapshot.nodes[t]){return n==null||!vK(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:pq(e,n)}function hq(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!vK(r))return;let i=pq(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 gq(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 _q(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function vq(e,t){let n=gq(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 yq(e,t){let n=gq(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function bq(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 xq(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function Sq(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 Cq(e,t){e.directoryLoadInfoById.delete(t)}function wq(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 Tq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function Eq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function Dq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function Oq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function kq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function Aq(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function jq(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 Mq(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 Nq(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 Pq(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 Fq(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 Iq(e,t,n){return{...n,visibleCountDelta:qq(e)-t}}function Lq(e,t){let n=qq(e),r=dq();e.transactionStack.push(r);try{t()}catch(t){throw Bq(e,r,!1),t}Bq(e,r,!0,qq(e)-n)}function Rq(e,t){let n=e.instrumentation;if(n==null){zq(e,t);return}Q(n,`store.events.record`,()=>zq(e,t))}function zq(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){Gq(e,t);return}n.events.push(t),Wq(n,t)}function Bq(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?Uq(i,t):Q(n,`store.events.batch.merge`,()=>Uq(i,t));return}let a=Vq(t,r),o=e.instrumentation;if(o==null){Gq(e,a);return}Q(o,`store.events.batch.commit`,()=>Gq(e,a))}function Vq(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 Hq(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function Uq(e,t){for(let n of t.events)e.events.push(n);Hq(e,t)}function Wq(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function Gq(e,t){let n=e.instrumentation;if(n==null){Kq(e,t);return}Q(n,`store.events.emit`,()=>Kq(e,t))}function Kq(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function qq(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function Jq(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!vK(n)||bK(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||!vK(a)?null:i}function Yq(e,t){let n=t;for(;;){let t=Jq(e,n);if(t==null)return n;n=t}}function Xq(e,t){let n=[t],r=t;for(;;){let t=Jq(e,r);if(t==null)return n;n.push(t),r=t}}function Zq(e,t){let n=t==null?e.snapshot.rootId:sJ(e,t);return n==null?[]:dJ(e,n)}function Qq(e,t){let n=VK(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=EJ(e,TJ(e,r)),{createdNodeIds:a,directoryId:o}=fJ(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=uJ(e,o);if(bK(n,1))throw Error(`Path already exists: "${t}"`);xK(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=mJ(e,o,n.basename),s.add(c);iJ(e,o);let l=EJ(e,o);return Tq({affectedAncestorIds:oJ(e,c),affectedNodeIds:[...s],path:t,projectionChanged:DJ(i,l)})}function $q(e,t,n){let r=sJ(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=uJ(e,r);if(bK(i,2))throw Error(`The root node cannot be removed`);if(vK(i)&&lJ(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=EJ(e,a),s=CJ(e,r);_J(e,a,r,i.nameId),wJ(e,a),iJ(e,a);let c=EJ(e,a);return Eq({affectedAncestorIds:oJ(e,a),affectedNodeIds:s,path:t,projectionChanged:DJ(o,c),recursive:n.recursive===!0})}function eJ(e,t,n,r){let i=sJ(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=uJ(e,i);if(bK(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=xJ(e,i,n),c=EJ(e,a.parentId),l=EJ(e,s.parentId),u=KK(e.snapshot.segmentTable,a.nameId),d=GK(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(vK(a)&&jJ(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=tK(e.snapshot.nodes,lJ(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&SJ(e,p,o,_K(a))===`skip`)return null;let m=a.parentId;_J(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),AJ(e,i),gJ(e,s.parentId,i),wJ(e,m),e.pathCacheVersion++,iJ(e,m),s.parentId!==m&&iJ(e,s.parentId);let h=EJ(e,m),g=EJ(e,s.parentId);return Dq({affectedAncestorIds:[...new Set([...oJ(e,m),...oJ(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:OJ([c,l],[h,g]),to:rJ(e,i)})}function tJ(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function nJ(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function rJ(e,t){let n=uJ(e,t),r=tJ(e,t);if(r!=null)return r;if(bK(n,2))return nJ(e,t,``);let i=rJ(e,n.parentId),a=KK(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return nJ(e,t,vK(n)?`${o}/`:o)}function iJ(e,t){let n=e.instrumentation;if(n==null){NJ(e,t);return}Q(n,`store.recomputeCountsUpwardFrom`,()=>NJ(e,t))}function aJ(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||!vK(o)){MJ(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){MJ(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function oJ(e,t){let n=[],r=t;for(;r!=null;){let t=uJ(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function sJ(e,t){if(t.length===0)return e.snapshot.rootId;let n=HK(t);return cJ(e,n.segments,n.requiresDirectory)}function cJ(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=lJ(e,r),a=tK(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=uJ(e,r);return n&&!vK(i)?null:r}function lJ(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 uJ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||bK(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function dJ(e,t){let n=e.snapshot.nodes[t];if(n===void 0||bK(n,4))return[];if(!vK(n))return[rJ(e,t)];if(lJ(e,t).childIds.length===0)return bK(n,1)&&!bK(n,2)?[rJ(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||bK(n,4)){i.pop();continue}if(!vK(n)){r.push(rJ(e,t.nodeId)),i.pop();continue}let a=lJ(e,t.nodeId);if(a.childIds.length===0){bK(n,1)&&!bK(n,2)&&r.push(rJ(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 fJ(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=GK(e.snapshot.segmentTable,i),a=lJ(e,r),o=tK(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!vK(uJ(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=pJ(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function pJ(e,t,n){let r=uJ(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:hK(gK(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,$G()),gJ(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function mJ(e,t,n){let r=GK(e.snapshot.segmentTable,n),i=lJ(e,t);if(tK(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${FJ(e,t,n)}"`);let a=uJ(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:hK(gK(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),gJ(e,t,o),e.activeNodeCount++,o}function hJ(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}vJ(e,n,o)<0?i=a:r=a+1}return r}function gJ(e,t,n){let r=lJ(e,t),i=uJ(e,n);tK(e.snapshot.nodes,r).set(i.nameId,n),oK(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=hJ(e,r,n);r.childIds.splice(a,0,n),iK(r,a),lK(e.snapshot.nodes,r)}function _J(e,t,n,r){let i=lJ(e,t),a=nK(i),o=a.get(n)??-1;tK(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&oK(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),iK(i,o),lK(e.snapshot.nodes,i))}function vJ(e,t,n){let r=e.snapshot.options.sort;return r===`default`?yJ(e,t,n):r(bJ(e,t),bJ(e,n))}function yJ(e,t,n){let r=uJ(e,t),i=uJ(e,n),a=vK(r);if(a!==vK(i))return a?-1:1;let o=jK(RK(e.snapshot.segmentTable,r.nameId),RK(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=KK(e.snapshot.segmentTable,r.nameId),c=KK(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function bJ(e,t){let n=uJ(e,t),r=rJ(e,t),i=vK(n),a=i?r.slice(0,-1):r;return{basename:KK(e.snapshot.segmentTable,n.nameId),depth:gK(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function xJ(e,t,n){let r=uJ(e,t),i=sJ(e,n);if(i!=null){let t=uJ(e,i);if(vK(t))return{basename:KK(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=HK(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=HK(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:cJ(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function SJ(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${rJ(e,t)}"`);let i=uJ(e,t);if(_K(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(vK(i)&&lJ(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return CJ(e,t),_J(e,a,t,o),wJ(e,a),iJ(e,a),`handled`}function CJ(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=uJ(e,t.nodeId);if(t.visitedChildren||!vK(i)){vK(i)&&e.snapshot.directories.delete(t.nodeId),xK(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),Cq(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=lJ(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 wJ(e,t){let n=t;for(;n!=null;){let t=uJ(e,n);if(!vK(t)||bK(t,2)||lJ(e,n).childIds.length>0)return;xK(t,1),n=t.parentId===n?null:t.parentId}}function TJ(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=tK(e.snapshot.nodes,lJ(e,n)).get(t);if(i==null||!vK(uJ(e,i)))break;n=i}return n}function EJ(e,t){let n=kJ(e,t);if(n==null)return null;let r=Yq(e,n),i=uJ(e,r),a=n===r?null:Xq(e,n).map(t=>rJ(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:lJ(e,r).childIds.length>0,path:rJ(e,r),terminalKind:_K(i)})}function DJ(e,t){return OJ([e],[t])}function OJ(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 kJ(e,t){let n=t;for(;n!=null;){let t=uJ(e,n);if(!vK(t)||bK(t,2))return null;if(!mq(e,n,t))return n;n=t.parentId}return null}function AJ(e,t){let n=uJ(e,t);if(SK(n,(t===e.snapshot.rootId?-1:gK(uJ(e,n.parentId)))+1),!vK(n))return;let r=lJ(e,t);for(let t of r.childIds)AJ(e,t)}function jJ(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=uJ(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function MJ(e,t,n=uJ(e,t),r=!1){let i=e.instrumentation;if(i==null){PJ(e,t,n,r);return}Q(i,`store.recomputeNodeCounts`,()=>PJ(e,t,n,r))}function NJ(e,t){let n=t;for(;n!=null;){let t=uJ(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(MJ(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&oK(lJ(e,s),n,a,o),n=s}}function PJ(e,t,n,r){if(!vK(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=lJ(e,t);if(r){let t=e.instrumentation;t==null?aK(e.snapshot.nodes,i):Q(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>aK(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,bK(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=Jq(e,t)==null?mq(e,t,n)?1+o:1:o}function FJ(e,t,n){let r=rJ(e,t);return r.length===0?n:`${r}${n}`}function IJ(e){return e!=null&&!bK(e,4)}function LJ(e,t){let n=e.snapshot.nodes[t];return!IJ(n)||!vK(n)||bK(n,2)?null:n}function RJ(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&IJ(e.snapshot.nodes[n])&&(t+=1);return t}function zJ(e){return Math.max(0,e.valueById.length-1)}function BJ(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:RJ(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:zJ(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function VJ(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 HJ(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)LJ(e,n)!=null&&t.push(rJ(e,n));for(let t of e.expandedDirectoryIds)LJ(e,t)!=null&&n.push(rJ(e,t));return{collapsedPaths:t,expandedPaths:n}}function UJ(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)LJ(e,n)==null||_q(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:rJ(e,n)});return t}function WJ(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=sJ(e,n);t!=null&&hq(e,t,!0,uJ(e,t))}for(let n of t.collapsedPaths){let t=sJ(e,n);t!=null&&hq(e,t,!1,uJ(e,t))}}function GJ(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=sJ(e,n.path);t!=null&&LJ(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function KJ(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function qJ(e){let t=e.snapshot.segmentTable,n=WK();for(let r of e.snapshot.nodes)if(IJ(r)){if(bK(r,2)){r.nameId=0;continue}r.nameId=GK(n,KK(t,r.nameId))}e.snapshot.segmentTable=n}function JJ(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!IJ(r)||!vK(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return IJ(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[uJ(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),aK(e.snapshot.nodes,n)}}function YJ(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(IJ(n))break;--t}e.snapshot.nodes.length=t+1}function XJ(e){let t=HJ(e),n=UJ(e);Q(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>KJ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>qJ(e)),Q(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>JJ(e)),Q(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>YJ(e)),Q(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>WJ(e,t)),Q(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>GJ(e,n)),Q(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>aJ(e,e.snapshot.rootId))}function ZJ(e){let t=HJ(e),n=UJ(e),r=Q(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>Zq(e)),i=wK({...e.snapshot.options},e.instrumentation),a=Q(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new lq(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,Q(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>WJ(e,t)),Q(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>GJ(e,n)),Q(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>aJ(e,e.snapshot.rootId))}function QJ(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function $J(e,t){let n=BJ(e);t===`stable`?Q(e.instrumentation,`store.cleanup.stable`,()=>XJ(e)):Q(e.instrumentation,`store.cleanup.aggressive`,()=>ZJ(e));let r=BJ(e);return VJ(t,t===`stable`,n,r)}var eY=64;function tY(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 nY(e){return uJ(e,e.snapshot.rootId).visibleSubtreeCount}function rY(e,t,n,r){let i=uJ(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function iY(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:CY(e,t.cursor),setSize:t.setSize,subtreeEndIndex:rY(e,t.cursor,t.index,n)}}function aY(e,t,n,r,i,a){let o=lJ(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=sK(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return oY(e,u,l,r+c,i+1,s,o.childIds.length,a)}function oY(e,t,n,r,i,a,o,s){if(!vK(uJ(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=_Y(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=uJ(e,c.terminalNodeId);if(!vK(l)||!mq(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return aY(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function sY(e,t){let n=nY(e);if(t<0||t>=n)return null;let r=aY(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>rJ(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=iY(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:CY(e,r.cursor),setSize:r.setSize,subtreeEndIndex:rY(e,r.cursor,r.index,n)}}function cY(e,t,n){let r=e.instrumentation,i=nY(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 SY(e,o+1);let t=[],n=mY(e,a);for(let r=a;r<=o&&n!=null;r++){let r=CY(e,n);t.push(r),n=yY(e,n)}return t}let s=[],c=0,l=0,u=Q(r,`store.getVisibleSlice.selectFirstRow`,()=>mY(e,a));for(let t=a;t<=o&&u!=null;t++){let t=Q(r,`store.getVisibleSlice.materializeRow`,()=>CY(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=Q(r,`store.getVisibleSlice.advanceCursor`,()=>yY(e,u))}return EK(r,`workload.visibleRowsRead`,s.length),EK(r,`workload.flattenedRowsRead`,c),EK(r,`workload.flattenedSegmentsRead`,l),s}function lY(e,t=nY(e)){let n=e.instrumentation;return n==null?xY(e,t):Q(n,`store.getVisibleTreeProjection`,()=>xY(e,t))}function uY(e){return bY(lY(e))}function dY(e,t){let n=sJ(e,t);if(n==null||n===e.snapshot.rootId||vK(uJ(e,n))&&Yq(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=uJ(e,i).parentId,n=lJ(e,t),s=nK(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=cK(a,n,s),t!==o){let n=uJ(e,t),a=Jq(e,t);if(!mq(e,t,n)&&a!==i)return null;Yq(e,t)===t&&(r+=1)}i=t}return r}function fY(e,t){let n=sJ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=uJ(e,n);if(!vK(r))throw Error(`Path is not a directory: "${t}"`);return mq(e,n,r)?null:(hq(e,n,!0,r),iJ(e,n),Oq({affectedAncestorIds:oJ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function pY(e,t){let n=sJ(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=uJ(e,n);if(!vK(r))throw Error(`Path is not a directory: "${t}"`);return mq(e,n,r)?(hq(e,n,!1,r),iJ(e,n),kq({affectedAncestorIds:oJ(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function mY(e,t){return t<0||t>=nY(e)?null:hY(e,e.snapshot.rootId,t,-1)}function hY(e,t,n,r){let i=lJ(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?sK(e.snapshot.nodes,i,n):Q(a,`store.getVisibleSlice.selectChildIndex`,()=>sK(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return gY(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function gY(e,t,n,r){if(!vK(uJ(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=_Y(e,t,r);if(n===0)return i;let a=uJ(e,i.terminalNodeId);if(!vK(a)||!mq(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return hY(e,i.terminalNodeId,n-1,i.visibleDepth)}function _Y(e,t,n){return vK(uJ(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:Yq(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:Q(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>Yq(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function vY(e,t){let n=uJ(e,t);if(!vK(n))return!0;let r=n.parentId;return r===e.snapshot.rootId?!0:Jq(e,r)!==t}function yY(e,t){let n=uJ(e,t.terminalNodeId);if(vK(n)){let r=lJ(e,t.terminalNodeId);if(mq(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:gY(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=uJ(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=lJ(e,n),o=nK(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 gY(e,s,0,i);vY(e,r)&&i--,r=n}}function bY(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 xY(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(eY);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=tY(o,y);let x,S=_;if(vK(v))S=f?Yq(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:rJ(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&&vK(C)&&mq(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 SY(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(!vK(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:rJ(e,f)};continue}let h=l?Yq(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=CY(e,g);let _=i[h];_!=null&&vK(_)&&mq(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function CY(e,t){let n=uJ(e,t.terminalNodeId),r=vK(n)?wY(e,t):null,i=rJ(e,t.terminalNodeId),a=KK(e.snapshot.segmentTable,n.nameId),o=vK(n)&&lJ(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?Xq(e,t.headNodeId).map(n=>{let r=uJ(e,n);return{isTerminal:n===t.terminalNodeId,name:KK(e.snapshot.segmentTable,r.nameId),nodeId:n,path:rJ(e,n)}}):Q(c,`store.getVisibleSlice.flatten.collectSegments`,()=>Xq(e,t.headNodeId).map(n=>{let r=uJ(e,n);return{isTerminal:n===t.terminalNodeId,name:KK(e.snapshot.segmentTable,r.nameId),nodeId:n,path:rJ(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:vK(n)&&mq(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:vK(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function wY(e,t){if(t.headNodeId===t.terminalNodeId)return _q(e,t.terminalNodeId);let n=Xq(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=_q(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function TY(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||!vK(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&&lK(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&vK(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,lK(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function EY(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var DY=class e{#e;constructor(e={}){let t=TK(e),n=Q(t,`store.builder.create`,()=>new lq(e));if(e.preparedInput!=null){let t=oq(e.preparedInput);t==null?n.appendPreparedPaths(aq(e.preparedInput),!1):n.appendPresortedPaths(t,sq(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(Q(t,`store.preparePathEntries`,()=>cq(r,e)))}let r=Q(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=Q(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=Q(t,`store.state.create`,()=>uq(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:Q(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||EY(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&Q(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?Q(t,`store.state.initializeOpenVisibleCounts`,()=>TY(this.#e)):Q(t,`store.state.recomputeCounts`,()=>aJ(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return nq(e,t)}static prepareInput(e,t={}){return rq(e,t)}static preparePresortedInput(e){return iq(e)}list(e){return Q(this.#e.instrumentation,`store.list`,()=>Zq(this.#e,e))}add(e){Q(this.#e.instrumentation,`store.add`,()=>{let t=nY(this.#e);Rq(this.#e,Iq(this.#e,t,Qq(this.#e,e)))})}remove(e,t={}){Q(this.#e.instrumentation,`store.remove`,()=>{let n=nY(this.#e);Rq(this.#e,Iq(this.#e,n,$q(this.#e,e,t)))})}move(e,t,n={}){Q(this.#e.instrumentation,`store.move`,()=>{let r=nY(this.#e),i=eJ(this.#e,e,t,n);i!=null&&Rq(this.#e,Iq(this.#e,r,i))})}batch(e){Lq(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return Q(this.#e.instrumentation,`store.getVisibleCount`,()=>nY(this.#e))}getVisibleSlice(e,t){return Q(this.#e.instrumentation,`store.getVisibleSlice`,()=>cY(this.#e,e,t))}getVisibleRowContext(e){return Q(this.#e.instrumentation,`store.getVisibleRowContext`,()=>sY(this.#e,e))}getVisibleTreeProjection(){return uY(this.#e)}getVisibleTreeProjectionData(e){return lY(this.#e,e)}getVisibleIndex(e){return Q(this.#e.instrumentation,`store.getVisibleIndex`,()=>dY(this.#e,e))}getPathInfo(e){return Q(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=sJ(this.#e,e);if(t==null)return null;let n=uJ(this.#e,t);return{depth:gK(n),kind:vK(n)?`directory`:`file`,path:rJ(this.#e,t)}})}isExpanded(e){return Q(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=uJ(this.#e,t);return mq(this.#e,t,n)})}expand(e){Q(this.#e.instrumentation,`store.expand`,()=>{let t=nY(this.#e),n=fY(this.#e,e);n!=null&&Rq(this.#e,Iq(this.#e,t,n))})}collapse(e){Q(this.#e.instrumentation,`store.collapse`,()=>{let t=nY(this.#e),n=pY(this.#e,e);n!=null&&Rq(this.#e,Iq(this.#e,t,n))})}on(e,t){return wq(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return _q(this.#e,t)}markDirectoryUnloaded(e){Q(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(lJ(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=nY(this.#e);yq(this.#e,t),Rq(this.#e,Iq(this.#e,n,Aq({affectedAncestorIds:oJ(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return Q(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=nY(this.#e),r=vq(this.#e,t);return Rq(this.#e,Iq(this.#e,n,jq({affectedAncestorIds:oJ(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return Q(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||_q(this.#e,n)!==`loading`||!xq(this.#e,n,e.attemptId))return!1;let r=rJ(this.#e,n);this.validateChildPatch(r,t);let i=nY(this.#e),a=[];for(let e of t.operations){OY(r,e);let t=nY(this.#e);switch(e.type){case`add`:a.push(Iq(this.#e,t,Qq(this.#e,e.path)));break;case`remove`:a.push(Iq(this.#e,t,$q(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=eJ(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(Iq(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return Rq(this.#e,Iq(this.#e,i,Mq({affectedAncestorIds:oJ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:rJ(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return Q(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=nY(this.#e),r=bq(this.#e,t,e.attemptId);return Rq(this.#e,Iq(this.#e,n,Nq({affectedAncestorIds:oJ(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:rJ(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return Q(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=nY(this.#e),i=Sq(this.#e,n,e.attemptId,t);return Rq(this.#e,Iq(this.#e,r,Pq({affectedAncestorIds:oJ(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:rJ(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return Q(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(QJ(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=nY(this.#e),n=$J(this.#e,e.mode??`stable`);return Rq(this.#e,Iq(this.#e,t,Fq({...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=lJ(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??kK(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=jK(RK(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(!vK(uJ(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=uJ(this.#e,n);mq(this.#e,n,i)||(hq(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=uJ(this.#e,e);if(!mq(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=sJ(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!vK(uJ(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!vK(uJ(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=uJ(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=uJ(this.#e,e),r=Jq(this.#e,e);if(!mq(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 OY(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var kY=e=>e.startsWith(`f::`)?e.slice(3):e;function AY(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function jY(e,t){return e===``?t:`${e}/${t}`}function MY({files:e,path:t,isFolder:n,nextBasename:r}){let i=kY(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}=AY(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=jY(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 NY(e){return e.endsWith(`/`)}function PY(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 FY(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 IY(e,t){return t.includes(e)?FY(t):[e]}function LY(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 RY(e,t){return{draggedPaths:e,target:t}}function zY(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(NY(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function BY(e,t){return t.kind===`root`||t.directoryPath==null?PY(e):t.directoryPath}function VY(e,t){let n=e.map(e=>{let n=BY(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 HY(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 UY(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(!HY(DY.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 WY(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}function GY(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 KY(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function qY(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 KY(e,t.path)?n?e:null:e;case`move`:return GY(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=qY(r,e,n),r==null)return null;return r}}}function JY(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function YY(e){switch(e.operation){case`add`:return{...JY(e),operation:`add`,path:e.path};case`remove`:return{...JY(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...JY(e),from:e.from,operation:`move`,to:e.to}}}function XY(e){return{...JY(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>YY(e)),operation:`batch`}}function ZY(e){switch(e.operation){case`add`:case`remove`:case`move`:return YY(e);case`batch`:return XY(e);default:return null}}function QY(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function $Y(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 eX(e){return $Y(e).at(-1)??null}function tX(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}function nX(e){return e.endsWith(`/`)}var rX=e=>e.toLowerCase();function iX(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function aX(e){return e.endsWith(`/`)?e.slice(0,-1):e}function oX(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}var sX=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},cX=Symbol(`FILE_TREE_RENAME_VIEW`),lX=512,uX=512;function dX(e){return e===`top`||e===`center`?e:`nearest`}function fX(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=$Y(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 pX(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:fX(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var mX=class{#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=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=UY({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=eX(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:dX(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<=uX){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=IY(t,n);return this.#r.canDrag?.(r)===!1?!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=RY(t.draggedPaths,n);(zY(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}LY(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=RY(e.draggedPaths,t);if(zY(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#De(),!1;let r=VY(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=nX(r),a=aX(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of $Y(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=iX(r),this.#D=t.removeIfCanceled??!1,this.#De(),!0}[cX](){return{cancel:()=>{this.#q()},commit:()=>{this.#J()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#Y(e)}}}#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,nX(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,nX(e)?{recursive:!0}:void 0);return}let t=nX(e),n=MY({files:this.#H.list(),isFolder:t,nextBasename:this.#E,path:aX(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(oX(n.sourcePath,t),oX(n.destinationPath,t))}#Y(e){this.#T==null||this.#E===e||(this.#E=e,this.#De())}resetPaths(e,t={}){let n=this.#H.list().length,r=this.#G,i=UY({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#le(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#z;this.#K?.(),this.#H=a,this.#d.clear(),this.#he();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!QY(this.#B,u);this.#B=new Set(u),d&&(this.#V+=1),this.#z=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#je(o,o!=null||u.length>0||this.#z!=null),this.#K=this.#Re(),this.#De(),this.#Oe({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#G-r})}#X(e){this.#Ie();let t=eX(e),n=tX(e,t),r=null,i=null;for(let e of this.#be()){if(eX(e)!==t)continue;let a=tX(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=$Y(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=!QY(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 DY({...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 $Y(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#fe(){return this.#g??=this.#ue().map(rX),this.#g}#pe(){return this.#f??=this.#de().filter(e=>e.endsWith(`/`)),this.#f}#me(){return this.#p??=this.#pe().map(rX),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 $Y(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:sX(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 $Y(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 $Y(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=pX(this.#H.getVisibleTreeProjectionData(t?void 0:Math.min(n,lX)),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=qY(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=qY(this.#c,e,!0),r=[...this.#B].map(t=>qY(t,e)).filter(e=>e!=null).map(e=>this.#H.getPathInfo(e)?.path??null).filter(e=>e!=null),i=qY(this.#z,e),a=i==null?null:this.#H.getPathInfo(i)?.path??null,o=[...new Set(r)];return QY(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&&WY(e)&&(this.#i=null);let t=WY(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=ZY(e);i!=null&&this.#Oe(i)})}#ze(e){if(this.#H.isExpanded(e)){this.#ie(e);return}this.#ke(e)}},hX=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 gX(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 _X(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 vX(e,t){return t?`${e}/`:e}function yX(e,t=null){let n=hX(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set;for(let t of e??[]){let e=gX(t.path);if(e==null)continue;let n=vX(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of _X(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var bX=e=>e.trim().toLowerCase(),xX=e=>e.split(`/`).at(-1)??e,SX=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function CX(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function wX(e){let t=FG(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(bX(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let n=xX(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return CX(c,e);for(let[t,n]of a)if(s.includes(t))return CX(n,e);let l=SX(n);for(let t of l){let n=i.get(t);if(n!=null)return CX(n,e)}let u=NG(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:jG(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:CX(s,e)}}}var TX,EX,DX,OX,kX,AX,jX,MX,NX,PX,FX={},IX=[],LX=Array.isArray,RX=IX.slice,zX=Object.assign;function BX(e){e&&e.parentNode&&e.remove()}function VX(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?RX.call(arguments,2):n),HX(e,o,r,i,null)}function HX(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??++EX,__i:-1,__u:0};return i==null&&TX.vnode!=null&&TX.vnode(a),a}function UX(e){return e.children}function WX(e,t){this.props=e,this.context=t,this.__g=0}function GX(e,t){if(t==null)return e.__?GX(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`?GX(e):null}function KX(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 KX(e)}}function qX(e){(8&e.__g||!(e.__g|=8)||!DX.push(e)||kX++)&&OX==TX.debounceRendering||((OX=TX.debounceRendering)||queueMicrotask)(JX)}function JX(){for(var e,t,n,r,i,a,o,s,c=1;DX.length;)DX.length>c&&DX.sort(AX),e=DX.shift(),c=DX.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=zX({},r)).__v=r.__v+1,TX.vnode&&TX.vnode(n),nZ(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??GX(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,iZ(a,n,o),n.__e!=i&&KX(n)));kX=0}function YX(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||IX,b=t.length;for(c=XX(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?FX:y[m.__i]||FX,m.__i=f,_=nZ(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&sZ(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=ZX(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function XX(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?HX(null,o,null,null,null):LX(o)?HX(UX,{children:o},null,null,null):o.constructor==null&&o.__b>0?HX(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=QX(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=GX(s)),cZ(s,s));return r}function ZX(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=ZX(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=GX(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function QX(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>(u?1:0)){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 $X(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function eZ(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||$X(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||$X(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(jX,`$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=MX,e.addEventListener(t,a?PX:NX,a)):e.removeEventListener(t,a?PX:NX,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 tZ(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=MX++;else if(t.u<n.l)return;return n(TX.event?TX.event(t):t)}}}function nZ(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=TX.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new M(v,x):(t.__c=f=new WX(v,x),f.constructor=M,f.render=lZ),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=zX({},f.__s)),zX(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=TX.__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=zX({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===UX&&d.key==null&&(E=aZ(d.props.children)),s=YX(e,LX(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)BX(a[j]);rZ(t)}else t.__e=n.__e,t.__k=n.__k,e.then||rZ(t);TX.__e(e,t,n)}else s=t.__e=oZ(n.__e,t,n,r,i,a,o,c,l,u);return(d=TX.diffed)&&d(t),128&t.__u?void 0:s}function rZ(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(rZ)}function iZ(e,t,n){for(var r=0;r<n.length;r++)sZ(n[r],n[++r],n[++r]);TX.__c&&TX.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){TX.__e(e,t.__v)}})}function aZ(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:LX(e)?e.map(aZ):zX({},e)}function oZ(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&&=(TX.__m&&TX.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=RX.call(e.childNodes),v=n.props||FX,!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;eZ(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&&!_||eZ(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=``),YX(b==`template`?e.content:e,LX(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&GX(n,0),s,c,l),a!=null)for(u=a.length;u--;)BX(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||eZ(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&eZ(e,u,g,v[u],i))}return e}function sZ(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){TX.__e(e,n)}}function cZ(e,t,n){var r,i;if(TX.unmount&&TX.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||sZ(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){TX.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&cZ(r[i],t,n||typeof e.type!=`function`);n||BX(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function lZ(e,t,n){return this.constructor(e,n)}function uZ(e,t){var n,r,i,a;t==document&&(t=document.documentElement),TX.__&&TX.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=VX(UX,null,[e]),i=[],a=[],nZ(t,e,r||FX,FX,t.namespaceURI,r?null:t.firstChild?RX.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),iZ(i,e,a)}function dZ(e,t){e.__u|=32,uZ(e,t)}TX={__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 kX=0,e}},EX=0,WX.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=zX({},this.state);typeof e==`function`&&(e=e(zX({},n),this.props)),e&&zX(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),qX(this))},WX.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),qX(this))},WX.prototype.render=UX,DX=[],kX=0,AX=function(e,t){return e.__v.__b-t.__v.__b},jX=/(PointerCapture)$|Capture$/i,MX=0,NX=tZ(!1),PX=tZ(!0);var fZ=0;Array.isArray;function $(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:--fZ,__i:-1,__u:0,__source:i,__self:a};return TX.vnode&&TX.vnode(l),l}var pZ=16,mZ=16,hZ={};function gZ({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}=hZ[e]??{width:pZ,height:mZ},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`,h=o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`};return $(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...h,viewBox:m,width:f,height:p,children:$(`use`,{href:c})})}var _Z=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},vZ=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},yZ=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)]},bZ=(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)]},xZ=(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)]},SZ=(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 CZ({children:e,marker:t,variant:n=`default`}){"use no memo";let r=n===`fade`;return $(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:$(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):r?$(`span`,{"data-truncate-fade":!0}):t})})}function wZ(e){"use no memo";let{mode:t,children:n}=e;return $(`div`,{children:[$(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?$(`span`,{children:n}):n}),$(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?$(`span`,{children:n}):n})]})}function TZ({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=$(wZ,{mode:t,children:e},`content`),o=$(CZ,{marker:n,mode:t,variant:r},`marker`),s=$(`div`,{"data-truncate-fill":!0},`fill`);return $(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:$(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function EZ({children:e,...t}){"use no memo";return $(TZ,{mode:`truncate`,...t,children:e})}function DZ({children:e,...t}){"use no memo";return $(TZ,{mode:`fruncate`,...t,children:e})}function OZ({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=$(EZ,{...s,children:t[0]}),l=$(DZ,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return $(`div`,{className:a,style:o});if(e.length<i)return $(n===`end`?DZ:EZ,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=_Z:r===`extension`?t=vZ:r===`leaf-path`&&(t=yZ);else if(typeof r==`number`)t=bZ,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=xZ:e===`first`&&(t=SZ)}else typeof r==`function`&&(t=r);t??=_Z;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=$(EZ,{...s,..._,children:f}),l=$(DZ,{...s,...v,children:p})}return $(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[$(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),$(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var kZ={endIndex:-1,startIndex:-1};function AZ(e,t,n){return Math.min(Math.max(e,t),n)}function jZ(e,t){return e<0||t<e?kZ:{endIndex:t,startIndex:e}}function MZ(e){return e.startIndex<0||e.endIndex<e.startIndex}function NZ(e,t){return MZ(e)?0:(e.endIndex-e.startIndex+1)*t}function PZ(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function FZ(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function IZ(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 LZ(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 RZ(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 zZ(e,t,n){if(e.length===0||t<=0)return[];let r=RZ(e),i=IZ(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=LZ(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 BZ(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=AZ(t.scrollTop,0,o),c=t.stickyRows??zZ(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=PZ(s,n,t.itemHeight),m=PZ(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?kZ:jZ(m,FZ(u+d,n,t.itemHeight)),y=g+1,b=MZ(v)?kZ:jZ(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=NZ(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:MZ(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var VZ={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},HZ={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},UZ=`Contains git status items`;function WZ(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 GZ(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,offset:i,topInset:a=0,totalHeight:o,viewportHeight:s}=e;if(i===`nearest`)return WZ({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 KZ(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 qZ(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 JZ(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 YZ(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function XZ(e,t){return e!=null&&e>0?e:t}function ZZ(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 QZ(e,t,n,r,i=0){let a=WZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function $Z(e,t,n,r,i,a,o=0){let s=GZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,offset:a,topInset:o,totalHeight:i,viewportHeight:r});return s==null?!1:(e.scrollTop=s,!0)}function eQ(e,t,n,r,i,a){let o=KZ({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function tQ(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function nQ(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function rQ({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return $(`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 iQ(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 aQ(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 oQ,sQ,cQ,lQ,uQ=Object.is,dQ=0,fQ=[],pQ=TX,mQ=pQ.__b,hQ=pQ.__r,gQ=pQ.diffed,_Q=pQ.__c,vQ=pQ.unmount,yQ=pQ.__;function bQ(e,t){pQ.__h&&pQ.__h(sQ,e,dQ||t),dQ=0;var n=sQ.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function xQ(e){return dQ=1,SQ(PQ,e)}function SQ(e,t,n){var r=bQ(oQ++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):PQ(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);uQ(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=sQ,!sQ.__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,uQ(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};sQ.__f=!0;var a=sQ.shouldComponentUpdate,o=sQ.componentWillUpdate;sQ.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)},sQ.shouldComponentUpdate=i}return r.__N||r.__}function CQ(e,t){var n=bQ(oQ++,3);!pQ.__s&&NQ(n.__H,t)&&(n.__=e,n.u=t,sQ.__H.__h.push(n))}function wQ(e,t){var n=bQ(oQ++,4);!pQ.__s&&NQ(n.__H,t)&&(n.__=e,n.u=t,sQ.__h.push(n))}function TQ(e){return dQ=5,EQ(function(){return{current:e}},[])}function EQ(e,t){var n=bQ(oQ++,7);return NQ(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function DQ(e,t){return dQ=8,EQ(function(){return e},t)}function OQ(){for(var e;e=fQ.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(jQ),e.__H.__h.forEach(MQ),e.__H.__h=[]}catch(t){e.__H.__h=[],pQ.__e(t,e.__v)}}pQ.__b=function(e){sQ=null,mQ&&mQ(e)},pQ.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),yQ&&yQ(e,t)},pQ.__r=function(e){hQ&&hQ(e),oQ=0;var t=(sQ=e.__c).__H;t&&(cQ===sQ?(t.__h=[],sQ.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(jQ),t.__h.forEach(MQ),t.__h=[],oQ=0)),cQ=sQ},pQ.diffed=function(e){gQ&&gQ(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fQ.push(t)!==1&&lQ===pQ.requestAnimationFrame||((lQ=pQ.requestAnimationFrame)||AQ)(OQ)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),cQ=sQ=null},pQ.__c=function(e,t){t.some(function(e){try{e.__h.forEach(jQ),e.__h=e.__h.filter(function(e){return!e.__||MQ(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],pQ.__e(n,e.__v)}}),_Q&&_Q(e,t)},pQ.unmount=function(e){vQ&&vQ(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{jQ(e)}catch(e){t=e}}),n.__H=void 0,t&&pQ.__e(t,n.__v))};var kQ=typeof requestAnimationFrame==`function`;function AQ(e){var t,n=function(){clearTimeout(r),kQ&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);kQ&&(t=requestAnimationFrame(n))}function jQ(e){var t=sQ,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),sQ=t}function MQ(e){var t=sQ;e.__c=e.__(),sQ=t}function NQ(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!uQ(t,e[n])})}function PQ(e,t){return typeof t==`function`?t(e):t}function FQ(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:$(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return $(UX,{children:[$(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:$(EZ,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function IQ(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function LQ(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function RQ(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 zQ({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=BZ(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:RQ(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?RQ(u,1,t,o):i&&r<=0&&c.length>0?zZ(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 BQ=400,VQ=10,HQ=40,UQ=18;function WQ(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))?GQ(e,t,n):a instanceof HTMLElement?a:null}function GQ(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 KQ(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 qQ(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 JQ(){return navigator.vendor!==`Apple Computer, Inc.`}function YQ(e,t){let n=e-t.top;if(n<HQ)return-Math.ceil((HQ-Math.max(0,n))/HQ*UQ);let r=t.bottom-e;return r<HQ?Math.ceil((HQ-Math.max(0,r))/HQ*UQ):0}function XQ(e,t){if(e!=null){let t=VZ[e];return t==null?null:{text:t,title:HZ[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:UZ}:null}function ZQ(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 QQ(e){return e!=null&&`toggle`in e}function $Q(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function e$(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function t$(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function n$(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function r$(e,t){return t&&n$(e)||(e.ctrlKey||e.metaKey)&&$Q(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var i$=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function a$(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 o$(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 s$(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function c$(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function l$(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function u$(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 d$(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 f$(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 p$(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=f$(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 m$(e,t){return{kind:e.kind,name:LQ(e),path:t}}function h$(e){return e==null?void 0:`${e}__tree`}function g$(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function _$(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function v$(e,t){if(e==null)return null;if(`text`in e)return $(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?_$(e.icon)?t(e.icon):{name:e.icon}:_$(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return $(`span`,{title:e.title,children:$(gZ,{...n})})}function y$(e){e!=null&&qZ(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function b$(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=IQ(e);return $(UX,{children:[e.depth>0?$(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>$(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,$(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?$(gZ,{...t(`file-tree-icon-chevron`)}):$(gZ,{...t(`file-tree-icon-file`,u)})}),$(`div`,{"data-item-section":`content`,children:e.isFlattened?FQ(e,c,a):c??$(OZ,{minimumLength:5,split:`extension`,children:e.name})}),i?$(`div`,{"data-item-section":`decoration`,children:r==null?null:v$(r,t)}):null,s?$(`div`,{"data-item-section":`git`,children:v$(o,t)}):null,n?$(`div`,{"data-item-section":`action`,children:l?$(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:$(gZ,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function x$(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=IQ(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,R=I===`sticky`,z=_?.get(P)??null??ZQ(t.ancestorPaths,v,y),ee=t.kind===`directory`&&(b?.has(P)??!1),te=A(t,P),B=XQ(z,ee),V=S&&w,H=te!=null||x||V,ne=V&&T===`always`,re=a.getPath()===P,ie=re?a.getValue():``,ae=R||!re?null:$(rQ,{ref:D,ariaLabel:`Rename ${LQ(t)}`,isFlattened:t.isFlattened,value:ie,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),oe=b$(t,k,{actionLaneEnabled:V,customDecoration:te,decorationLaneEnabled:H,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:B,gitLaneActive:x,renameInput:ae,showDecorativeActionAffordance:ne}),se={...iQ({ariaLabel:LQ(t),domId:t.isFocused?g$(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:V,contextMenuButtonVisibility:V?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:ee,effectiveGitStatus:z,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusMountedPathFromInput(P),j(t,P,{anchorRect:s$(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:R?void 0:()=>{i.focusMountedPathFromInput(P)},onKeyDown:R?void 0:N,ref:e=>{O(P,e)}};return!R&&re?$(`div`,{...se,children:oe}):$(`button`,{...se,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(R){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:oe})}function S$(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(IQ(e))).map((n,r)=>x$(e,n,t.start+r))}function C$({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=RG,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 _=TQ(null),v=TQ(null),y=TQ(!1),b=TQ(null),x=TQ(null),S=TQ(null),C=TQ(null),w=TQ(null),T=TQ(new Map),E=TQ(new Map),D=TQ(()=>{}),O=TQ(null),k=TQ(0),A=TQ(!1),j=TQ(null);j.current!==t&&(A.current=!1,j.current=t);let M=TQ(!1),N=TQ(null),P=TQ(null),F=TQ(!1),I=TQ(null),L=TQ(null),R=TQ(null),z=TQ(null),ee=TQ(null),te=TQ(null),B=TQ(null),V=TQ(null),H=TQ(!1),ne=TQ(null),re=TQ(null),ie=TQ(null),ae=TQ(null),oe=EQ(()=>new Map,[]),[,se]=xQ(0),[ce,le]=xQ(null),[ue,U]=xQ(null),[de,fe]=xQ(null),[pe,me]=xQ(null),[he,ge]=xQ(0),[_e,ve]=xQ(null),ye=TQ(_e);ye.current=_e;let be=TQ(null),xe=TQ(null),Se=TQ(null),Ce=TQ(null),we=TQ(null),Te=TQ(!1),Ee=()=>{xe.current=null,Se.current=null,Ce.current=null},De=(e,t)=>{xe.current=e,Se.current=null,Ce.current=t==null?null:{path:e,scrollTop:t}},Oe=(e,t)=>{xe.current=null,Se.current={path:e,viewportOffset:t},Ce.current=null},ke=TQ(d===`retain`&&t.isSearchOpen()),[Ae,je]=xQ(p);CQ(()=>{p||je(!1)},[p]);let Me=TQ(!1),Ne=DQ(()=>{Me.current=!0,je(e=>e&&!1)},[]),[Pe,Fe]=xQ(()=>zQ({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Ie,Le]=xQ(!1);CQ(()=>{Le(!0)},[]);let Re=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,ze=e?.contextMenu?.triggerMode??(Re?`right-click`:`both`),W=ze===`both`||ze===`button`,G=e?.contextMenu?.buttonVisibility??`when-needed`,Be=ze===`both`||ze===`right-click`;wQ(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;we.current=t,U(t),me(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Te.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 Ve=DQ((e,t)=>{l$(T.current,e,t)},[]),He=DQ((e,t)=>{l$(E.current,e,t)},[]),Ue=DQ(e=>{x.current=e},[]),We=DQ(e=>u$(e,E.current,T.current),[]),Ge=n!=null||r!=null||i!=null,{resolveIcon:Ke}=EQ(()=>wX(a),[a]),qe=t[cX](),Je=qe.getPath(),Ye=Je!=null,Xe=t.isSearchOpen(),Ze=t.getSearchValue(),Qe=t.getFocusedPath(),$e=t.getFocusedIndex(),et=t.getScrollRequest(),tt=t.isDragAndDropEnabled(),nt=t.getDragSession(),rt=EQ(()=>nt==null?null:new Set(nt.draggedPaths),[nt]),it=nt?.target??null,at=nt?.primaryPath??null,ot=h$(o),{overlayHeight:st,overlayRows:ct,snapshot:lt,visibleRows:ut}=Pe,dt=lt.physical.viewportHeight,ft=EQ(()=>({end:lt.window.endIndex,start:lt.window.startIndex}),[lt.window.endIndex,lt.window.startIndex]),pt=ct,mt=lt.sticky.rows,ht=lt.physical.totalHeight,gt=lt.sticky.height,_t=EQ(()=>new Set(mt.map(e=>IQ(e.row))),[mt]),vt=$e>=0&&$e>=ft.start&&$e<=ft.end,yt=DQ((e,t)=>u?.({item:m$(e,t),row:e})??null,[u]),bt=DQ(e=>qZ(e==null?null:T.current.get(e)??null)?!0:qZ(S.current),[]),xt=DQ(e=>{bt(t.focusNearestPath(e))},[t,bt]),St=TQ(xt);St.current=xt;let Ct=TQ(!0),wt=TQ(()=>{}),Tt=DQ((t=!0)=>{let n=ye.current;n!=null&&(Ct.current=Ct.current&&t,ve(null),e?.contextMenu?.onClose?.(),Ct.current&&xt(n.path))},[e?.contextMenu,xt]);wt.current=Tt;let Et=DQ(e=>{let t=e==null?null:c$(S.current,e);fe(e=>e===t?e:t)},[]),Dt=DQ((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=We(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;De(n,e?.scrollTop??null),M.current=!0,le(e=>e===n?e:n)}i.focus(),Et(a),Ct.current=!0,ve({anchorRect:r?.anchorRect??null,item:m$(e,n),path:n,source:r?.source??`keyboard`})},[t,We,Et]),Ot=DQ(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=YZ(e,dt);I.current=$e<0||e==null?null:Math.max(0,Math.min($e*s-e.scrollTop,Math.max(0,t-s))),F.current=!0}t.startRenaming(e)!==!1&&(me(`focus`),se(e=>e+1))}},[t,$e,s,l,dt]),kt=DQ((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=YZ(i,dt),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:zQ({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return M.current=!0,eQ(i,a,s,l,u,d),D.current(),be.current=n?e:null,!0},[t,s,c,dt,h]),At=()=>y.current===!0||ae.current!=null||H.current===!0,jt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Mt=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},Nt=()=>{z.current!=null&&(clearTimeout(z.current),z.current=null),R.current=null},K=()=>{te.current?.remove(),te.current=null},Pt=()=>{Mt(L.current),L.current=null,ee.current=null},Ft=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},It=()=>{V.current?.(),V.current=null,ae.current!=null&&(clearTimeout(ae.current),ae.current=null),H.current=!1,ne.current=null,ie.current=null,re.current!=null&&(re.current.setAttribute(`draggable`,`true`),re.current.style.removeProperty(`touch-action`),re.current=null),K(),Nt(),Pt(),B.current=null},Lt=(e,n)=>{let r=S.current?.getRootNode(),i=KQ(WQ(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Rt=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){Nt();return}let r=t.getItem(e.directoryPath),i=QQ(r)?r:null;if(i==null||i.isExpanded()){Nt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;R.current!==a&&(Nt(),R.current=a,z.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},zt=()=>{L.current=null;let e=ee.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=YQ(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()),Rt(Lt(e.clientX,e.clientY)),L.current=jt(zt)},Bt=(e,t)=>{ee.current={clientX:e,clientY:t},L.current??=jt(zt)},Vt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(It(),K(),Nt(),Pt(),t.startDrag(r)===!1){e.preventDefault();return}if(B.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),JQ())){let t=qQ(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Ft(t),te.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},Ht=()=>{K(),Nt(),Pt(),B.current=null,t.cancelDrag()},Ut=(e,n,r)=>{if(ae.current!=null||H.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ie.current={clientX:i.clientX,clientY:i.clientY},re.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!H.current;ae.current!=null&&(clearTimeout(ae.current),ae.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),V.current===o&&(V.current=null),t&&(a.setAttribute(`draggable`,`true`),re.current===a&&(re.current=null),ie.current=null)},s=e=>{let t=e.touches[0],n=ie.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=VQ*VQ||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),V.current=o,ae.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),re.current===a&&(re.current=null),ie.current=null;return}H.current=!0,re.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),B.current=n;let e=a.getBoundingClientRect(),s=qQ(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`}),Ft(s),te.current=s,ne.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=ne.current;n!=null&&te.current!=null&&(te.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Rt(Lt(t.clientX,t.clientY)),Bt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Lt(n.clientX,n.clientY),t.completeDrag(),It()},u=()=>{t.cancelDrag(),It()};V.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)},BQ)},Wt=e=>{if(_e!=null){if(e.key===`Escape`){Tt(),e.preventDefault(),e.stopPropagation();return}i$.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(qe.isActive()){if(e.key===`Escape`)qe.cancel();else if(e.key===`Enter`)qe.commit();else return;me(`focus`),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){Ot(Qe??void 0),e.preventDefault(),e.stopPropagation();return}if(Xe){if(e.key===`Escape`)F.current=!1,I.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=YZ(n,dt);I.current=$e<0||n==null?null:Math.max(0,Math.min($e*s-n.scrollTop,Math.max(0,r-s))),F.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;me(`focus`),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&e$(e)){t.openSearch(e.key),se(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Re&&n$(e),r=r$(e,Re),i=r&&S.current!=null?JZ(S.current):null,a=r?new Set(d$(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==Qe&&a.has(o)){let e=C.current;De(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=QQ(p)?p:null,h=u!=null&&(_t.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=u$(u,E.current,T.current);e==null||n==null?y=!1:Dt(e,u)}else if((e.ctrlKey||e.metaKey)&&$Q(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;me(`focus`);let b=t.getFocusedPath(),x=b!=null&&(_t.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))De(b,v?.scrollTop??null),M.current=!0,le(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Oe(b,p$(S.current,v,i,u,s,gt,dt)),M.current=!0,le(e=>e===b?e:b)):Ee()}se(e=>e+1),e.preventDefault(),e.stopPropagation()};wQ(()=>{if(!(!f||!Xe)){if(ke.current){ke.current=!1;return}qZ(w.current)}},[Xe,f]),wQ(()=>{let e=x.current;switch(nQ({hasRenderedInput:e!=null,previousRenamingPath:P.current,renamingPath:Je})){case`reset`:P.current=null;return;case`reveal-canonical`:Je!=null&&kt(Je,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(be.current=null,P.current=Je,qZ(e),e.select());return}},[ft.end,ft.start,Je,kt,_t]),wQ(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=JZ(e)?.dataset.itemPath??null;le(e=>e===t?e:t)},i=()=>{n(),M.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,JZ(e)!=null){r();return}M.current=!1,le(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),M.current=!1,le(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;le(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),wQ(()=>{let e=S.current;e!=null&&(lt.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[lt.physical.scrollTop]),wQ(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=YZ(n,g);let a=()=>{let e=t.getVisibleCount(),r=XZ(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),Fe(zQ({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=XZ(O.current,g),i=t.getVisibleRows(e,e)[0]??null;QZ(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=!1,l=t.subscribe(()=>{o?se(e=>e+1):o=!0,a()}),u=()=>{Te.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,ge(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||Te.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),ye.current!=null&&y.current&&wt.current(),Te.current===!0){y.current=!1;return}U(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:ZZ(e[0]))??YZ(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),wQ(()=>{Re||_e==null||Tt(!1)},[Tt,Re,_e]);let Gt=EQ(()=>_e==null?null:`${_e.path}::${_e.source}`,[_e]);wQ(()=>{if(Gt==null){m?.clearSlotContent(pW);return}let t=ye.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??o$(n.getBoundingClientRect()),close:e=>{wt.current(e?.restoreFocus??!0)},restoreFocus:()=>{Ct.current&&St.current(ye.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(pW,i),e?.contextMenu?.onOpen?.(t.item,r),y$(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&y$(i)}),()=>{m?.clearSlotContent(pW)}},[Gt,e?.contextMenu,m]),wQ(()=>{_e!=null&&t.getItem(_e.path)==null&&Tt()},[Tt,_e,t]),wQ(()=>{if(_e==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(a$(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&Tt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Tt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[Tt,_e]),wQ(()=>{let e=C.current,n=S.current;if(e==null||n==null){N.current=Qe;return}let r=Qe==null?null:T.current.get(Qe)??null,i=JZ(n),a=i?.dataset.itemPath??null,o=Ye&&x.current===i,c=f&&w.current===i,l=F.current&&!Xe,u=I.current??0,d=be.current,p=xe.current,m=Se.current,g=Ce.current,_=i!=null,v=M.current||_,y=N.current!==Qe,b=p!=null&&p===Qe&&Qe!=null,E=!1,O=!1;if(et!=null&&et.id!==k.current){k.current=et.id;let n=et.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,dt-s))):gt;E=!0,O=$Z(e,n,s,dt,ht,et.offset,t)}t.clearScrollRequest(et.id)}let A=!E&&l&&eQ(e,$e,s,dt,ht,u),j=!E&&d!=null&&d===Qe&&eQ(e,$e,s,dt,ht,gt),P=!E&&m!=null&&m.path===Qe&&eQ(e,$e,s,dt,ht,m.viewportOffset),L=!E&&g!=null&&g.path===Qe&&e.scrollTop!==g.scrollTop;if(L&&(e.scrollTop=g.scrollTop),(L||O||j||P||A||v&&y&&d!==Qe&&!b&&QZ(e,$e,s,dt,gt))&&D.current(),E){N.current=Qe;return}if(!v){N.current=Qe;return}if(o){N.current=Qe;return}if(c&&!l){N.current=Qe;return}if(r==null){l&&$e>=0&&(eQ(e,$e,s,dt,ht,u),D.current()),N.current=Qe;return}(y||l||d===Qe||p===Qe||m?.path===Qe||g?.path===Qe||a==null||a!==Qe)&&(qZ(r),d===Qe&&(be.current=null),p===Qe&&(xe.current=null),m?.path===Qe&&(Se.current=null),g?.path===Qe&&(Ce.current=null),F.current=!1,I.current=null),N.current=Qe},[t,$e,Qe,vt,s,Ye,Xe,ft,dt,f,et,h,gt,ht,ut]);let Kt=$e>=0&&$e>=lt.visible.startIndex&&$e<=lt.visible.endIndex,qt=Qe!=null&&pt.some(e=>IQ(e.row)===Qe),Jt=Kt||qt,Yt=W&&M.current===!0&&Jt?Qe:null,Xt=pe===`pointer`?ue:null,Zt=_e?.path??we.current??Xt??Yt??ue,Qt=_e?.source===`right-click`;wQ(()=>{y.current&&_e==null||Et(We(Zt))},[_e,We,ft,dt,he,pt,Zt,Et,ut]);let $t=DQ(e=>{if(y.current||a$(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&&me(e=>e===`pointer`?e:`pointer`),U(e=>e===i?e:i)},[]),en=DQ(()=>{U(null)},[]);wQ(()=>{if(!tt)return;let e=()=>{It(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),It(),t.cancelDrag()}},[t,tt]);let tn=e=>{if(!tt||t.getDragSession()==null||H.current)return;let n=KQ(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Rt(t.getDragSession()?.target??null),Bt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},nn=e=>{if(!tt||t.getDragSession()==null||H.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(Nt(),Pt(),t.setDragTarget(null))},rn=e=>{!tt||t.getDragSession()==null||H.current||(e.preventDefault(),Lt(e.clientX,e.clientY),t.completeDrag(),K(),Nt(),Pt(),B.current=null)},an=lt.window.height,on=lt.window.offsetTop,sn=Math.min(0,dt-an),cn=Math.min(0,dt-an-gt),ln=ce===Qe||F.current,un=Qe!=null&&ln&&!vt&&$e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null,dn=un==null?null:tQ($e,s,ft,an),fn=B.current,pn=at!=null&&fn!=null&&fn.path===at&&fn.index>=ft.start&&fn.index<=ft.end,mn=at!=null&&fn!=null&&fn.path===at&&!pn&&fn.path!==un?.path?fn:null,hn=mn==null?null:tQ(mn.index,s,ft,an),gn=t$(($e>=0?ut[$e]??t.getVisibleRows($e,$e)[0]??null:null)?.ancestorPaths.at(-1)??null),_n=Xe&&Qe!=null?g$(o,Qe,!vt):void 0,vn=_e?.path??(Xe?Qe:ce),yn=_e?.path??ue,bn=We(Zt),xn=Re&&W&&!Qt&&!Ye&&bn!=null&&de!=null&&Zt!=null,Sn=Re&&(xn||_e!=null),Cn=_e?.anchorRect,wn=Cn==null&&bn!=null&&de!=null&&(_e!=null||xn)?de:null,Tn=Cn==null?wn==null?void 0:{top:`${wn}px`}:{left:`${Cn.left}px`,position:`fixed`,right:`auto`,top:`${Cn.top}px`},En=Qt?{opacity:`0`}:void 0,Dn=DQ((e,n,r,i)=>{let a=aQ({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:Xe,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);break}let l=e.currentTarget instanceof HTMLElement?e.currentTarget:null,u=n.index>=lt.visible.startIndex&&n.index<=lt.visible.endIndex,d=i===`flow`&&u&&l!=null&&l.dataset.itemParked!==`true`;t.focusMountedPathFromInput(c),d&&(M.current=!0,le(e=>e===c?e:c),me(`focus`)),o&&t.toggleMountedDirectoryFromInput(c),a.closeSearch&&t.closeSearch(),a.revealCanonical&&kt(c,{targetOffset:`sticky-parents`})},[t,Xe,lt.visible.endIndex,lt.visible.startIndex,kt]),On=()=>{if(y.current||!W||Zt==null||bn==null)return;let e=t.getItem(Zt);e!=null&&(Et(bn),Ct.current=!0,ve({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:bn.getAttribute(`aria-label`)??Zt,path:e.getPath()},path:e.getPath(),source:`button`}))},kn={contextHoverPath:yn,contextMenuButtonTriggerEnabled:W,contextMenuButtonVisibility:G,contextMenuEnabled:Re,contextMenuRightClickEnabled:Be,contextMenuTriggerMode:ze,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:tt,draggedPathSet:rt,dragTarget:it,gitLaneActive:Ge,gitStatusByPath:n,handleRowDragEnd:Ht,handleRowDragStart:Vt,handleRowTouchStart:Ut,ignoredGitDirectories:r,ignoredInheritanceCache:oe,instanceId:o,itemHeight:s,onKeyDown:Wt,onRowClick:Dn,openContextMenuForRow:Dt,registerButton:Ve,registerRenameInput:Ue,renameView:qe,renderDecorationForRow:yt,resolveIcon:Ke,shouldSuppressContextMenu:At,visualFocusPath:vn},An={...kn,registerButton:He};return $(`div`,{ref:S,id:ot,"data-file-tree-context-menu-button-visibility":Re&&W?G:void 0,"data-file-tree-context-menu-trigger-mode":Re?ze:void 0,"data-file-tree-has-context-menu-action-lane":Re&&W?`true`:void 0,"data-file-tree-has-git-lane":Ge?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:tt?nn:void 0,onDragOver:tt?tn:void 0,onDrop:tt?rn:void 0,onKeyDown:Wt,onPointerLeave:Re?en:void 0,onPointerOver:Re?$t:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[$(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:gn}}),$(`slot`,{name:fW,"data-type":`header-slot`}),f?$(`div`,{"data-file-tree-search-container":!0,"data-open":Xe?`true`:`false`,children:$(`input`,{ref:w,"aria-activedescendant":_n,"aria-controls":ot,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":Ae?`true`:void 0,value:Ze,onBlur:()=>{d===`retain`&&!Me.current||t.closeSearch()},onFocus:Ne,onPointerDown:Ne,onInput:e=>{Ne();let n=e.currentTarget;t.setSearch(n.value)}})}):null,$(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Ie&&pt.length>0?$(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:$(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${st}px`},children:pt.map((e,t)=>x$(An,e.row,`sticky:${IQ(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${pt.length-t}`}}))})}):null,$(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${ht}px`},children:[$(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${on}px`}}),$(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${an}px`,top:`${sn}px`,bottom:`${cn}px`},children:[S$(kn,ft,_t),un!=null&&dn!=null?x$(kn,un,`parked:${un.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:at===un.path?`none`:void 0,position:`absolute`,right:`0`,top:`${dn}px`}}):null,mn!=null&&hn!=null?x$(kn,mn,`parked-drag:${mn.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${hn}px`}}):null]})]})]}),Re?$(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":Sn?`true`:`false`,style:Tn,children:[$(`button`,{ref:v,type:`button`,"data-type":mW,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":_e==null?`false`:`true`,"data-visible":xn?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),_e!=null){Tt();return}On()},tabIndex:-1,style:En,children:$(gZ,{...Ke(`file-tree-icon-ellipsis`)})}),_e==null?null:$(`slot`,{name:pW})]}):null,_e==null?null:$(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),Tt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),Tt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var w$={hydrateRoot:(e,t)=>{dZ(VX(C$,t),e)},renderRoot:(e,t)=>{uZ(VX(C$,t),e)},unmountRoot:e=>{uZ(null,e)}};function T$(e,t){w$.renderRoot(e,t)}function E$(e,t){w$.hydrateRoot(e,t)}function D$(e){w$.unmountRoot(e)}var O$=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)}}},k$=`__c`,A$=`__k`,j$=`__d`,M$=`__s`,N$=/[\s\n\\/='"\0<>]/,P$=/^(xlink|xmlns|xml)([A-Z])/,F$=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,I$=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,L$=new Set([`draggable`,`spellcheck`]);function R$(e){e.__g===void 0?e[j$]=!0:e.__g|=8}function z$(e){e.__g===void 0?e[j$]=!1:e.__g&=-9}function B$(e){return e.__g===void 0?!0===e[j$]:!!(8&e.__g)}var V$=/["&<]/;function H$(e){if(e.length===0||!1===V$.test(e))return e;for(var t=0,n=0,r=``,i=``;n<e.length;n++){switch(e.charCodeAt(n)){case 34:i=`"`;break;case 38:i=`&`;break;case 60:i=`<`;break;default:continue}n!==t&&(r+=e.slice(t,n)),r+=i,t=n+1}return n!==t&&(r+=e.slice(t,n)),r}var U$={},W$=new Set(`animation-iteration-count.border-image-outset.border-image-slice.border-image-width.box-flex.box-flex-group.box-ordinal-group.column-count.fill-opacity.flex.flex-grow.flex-negative.flex-order.flex-positive.flex-shrink.flood-opacity.font-weight.grid-column.grid-row.line-clamp.line-height.opacity.order.orphans.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-miterlimit.stroke-opacity.stroke-width.tab-size.widows.z-index.zoom`.split(`.`)),G$=/[A-Z]/g;function K$(e){var t=``;for(var n in e){var r=e[n];if(r!=null&&r!==``){var i=n[0]==`-`?n:U$[n]||(U$[n]=n.replace(G$,`-$&`).toLowerCase()),a=`;`;typeof r!=`number`||i.startsWith(`--`)||W$.has(i)||(a=`px;`),t=t+i+`:`+r+a}}return t||void 0}function q$(){this.__d=!0}function J$(e,t){return{__v:e,context:t,props:e.props,setState:q$,forceUpdate:q$,__d:!0,__h:[]}}function Y$(e,t,n){if(!e.s){if(n instanceof X$){if(!n.s)return void(n.o=Y$.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Y$.bind(null,e,t),Y$.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}var X$=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{Y$(r,1,a(this.v))}catch(e){Y$(r,2,e)}return r}return this}return this.o=function(e){try{var i=e.v;1&e.s?Y$(r,1,t?t(i):i):n?Y$(r,1,n(i)):Y$(r,2,i)}catch(e){Y$(r,2,e)}},r},e}(),Z$,Q$,$$,e1,t1={},n1=Array.isArray,r1=Object.assign,i1=``,a1=`<!--$s-->`,o1=`<!--/$s-->`;function s1(e,t){var n,r=e.type,i=!0;return e[k$]?(i=!1,(n=e[k$]).state=n[M$]):n=new r(e.props,t),e[k$]=n,n.__v=e,n.props=e.props,n.context=t,R$(n),n.state??=t1,n[M$]??(n[M$]=n.state),r.getDerivedStateFromProps?n.state=r1({},n.state,r.getDerivedStateFromProps(n.props,n.state)):i&&n.componentWillMount?(n.componentWillMount(),n.state=n[M$]===n.state?n.state:n[M$]):!i&&n.componentWillUpdate&&n.componentWillUpdate(),$$&&$$(e),n.render(n.props,n.state,t)}function c1(e,t,n,r,i,a,o){if(e==null||!0===e||!1===e||e===i1)return i1;var s=typeof e;if(s!=`object`)return s==`function`?i1:s==`string`?H$(e):e+i1;if(n1(e)){var c,l=i1;i[A$]=e;for(var u=e.length,d=0;d<u;d++){var f=e[d];if(f!=null&&typeof f!=`boolean`){var p,m=c1(f,t,n,r,i,a,o);typeof m==`string`?l+=m:(c||=Array(u),l&&c.push(l),l=i1,n1(m)?(p=c).push.apply(p,m):c.push(m))}}return c?(l&&c.push(l),c):l}if(e.constructor!==void 0)return i1;e.__=i,Z$&&Z$(e);var h=e.type,g=e.props;if(typeof h==`function`){var _,v,y,b=t;if(h===UX){if(`tpl`in g){for(var x=i1,S=0;S<g.tpl.length;S++)if(x+=g.tpl[S],g.exprs&&S<g.exprs.length){var C=g.exprs[S];if(C==null)continue;typeof C!=`object`||C.constructor!==void 0&&!n1(C)?x+=C:x+=c1(C,t,n,r,e,a,o)}return x}if(`UNSTABLE_comment`in g)return`<!--`+H$(g.UNSTABLE_comment)+`-->`;v=g.children}else{if((_=h.contextType)!=null){var w=t[_.__c];b=w?w.props.value:_.__}var T=h.prototype&&typeof h.prototype.render==`function`;if(T)v=s1(e,b),y=e[k$];else{e[k$]=y=J$(e,b);for(var E=0;B$(y)&&E++<25;){z$(y),$$&&$$(e);try{v=h.call(y,g,b)}catch(t){throw a&&t&&typeof t.then==`function`&&(e._suspended=!0),t}}R$(y)}if(y.getChildContext!=null&&(t=r1({},t,y.getChildContext())),T&&TX.errorBoundaries&&(h.getDerivedStateFromError||y.componentDidCatch)){v=v!=null&&v.type===UX&&v.key==null&&v.props.tpl==null?v.props.children:v;try{return c1(v,t,n,r,e,a,!1)}catch(i){return h.getDerivedStateFromError&&(y[M$]=h.getDerivedStateFromError(i)),y.componentDidCatch&&y.componentDidCatch(i,t1),B$(y)?(v=s1(e,t),(y=e[k$]).getChildContext!=null&&(t=r1({},t,y.getChildContext())),c1(v=v!=null&&v.type===UX&&v.key==null&&v.props.tpl==null?v.props.children:v,t,n,r,e,a,o)):i1}finally{Q$&&Q$(e),e1&&e1(e)}}}v=v!=null&&v.type===UX&&v.key==null&&v.props.tpl==null?v.props.children:v;try{var D=c1(v,t,n,r,e,a,o);return Q$&&Q$(e),TX.unmount&&TX.unmount(e),e._suspended?typeof D==`string`?a1+D+o1:n1(D)?(D.unshift(a1),D.push(o1),D):D.then(function(e){return a1+e+o1}):D}catch(i){if(!a&&o&&o.onError){var O=function i(s){return o.onError(s,e,function(e,s){try{return c1(e,t,n,r,s,a,o)}catch(e){return i(e)}})}(i);if(O!==void 0)return O;var k=TX.__e;return k&&k(i,e),i1}if(!a||!i||typeof i.then!=`function`)throw i;return i.then(function i(){try{var s=c1(v,t,n,r,e,a,o);return e._suspended?a1+s+o1:s}catch(e){if(!e||typeof e.then!=`function`)throw e;return e.then(i)}})}}var A,j=`<`+h,M=i1;for(var N in g){var P=g[N];if(typeof(P=u1(P)?P.value:P)!=`function`||N===`class`||N===`className`){switch(N){case`children`:A=P;continue;case`key`:case`ref`:case`__self`:case`__source`:continue;case`htmlFor`:if(`for`in g)continue;N=`for`;break;case`className`:if(`class`in g)continue;N=`class`;break;case`defaultChecked`:N=`checked`;break;case`defaultSelected`:N=`selected`;break;case`defaultValue`:case`value`:switch(N=`value`,h){case`textarea`:A=P;continue;case`select`:r=P;continue;case`option`:r!=P||`selected`in g||(j+=` selected`)}break;case`dangerouslySetInnerHTML`:M=P&&P.__html;continue;case`style`:typeof P==`object`&&(P=K$(P));break;case`acceptCharset`:N=`accept-charset`;break;case`httpEquiv`:N=`http-equiv`;break;default:if(P$.test(N))N=N.replace(P$,`$1:$2`).toLowerCase();else{if(N$.test(N))continue;N[4]!==`-`&&!L$.has(N)||P==null?n?I$.test(N)&&(N=N===`panose1`?`panose-1`:N.replace(/([A-Z])/g,`-$1`).toLowerCase()):F$.test(N)&&(N=N.toLowerCase()):P+=i1}}P!=null&&!1!==P&&(j=!0===P||P===i1?j+` `+N:j+` `+N+`="`+(typeof P==`string`?H$(P):P+i1)+`"`)}}if(N$.test(h))throw Error(h+` is not a valid HTML tag name in `+j+`>`);if(M||(typeof A==`string`?M=H$(A):A!=null&&!1!==A&&!0!==A&&(M=c1(A,t,h===`svg`||h!==`foreignObject`&&n,r,e,a,o))),Q$&&Q$(e),e1&&e1(e),!M&&l1.has(h))return j+`/>`;var F=`</`+h+`>`,I=j+`>`;return n1(M)?[I].concat(M,[F]):typeof M==`string`?I+M+F:[I,M,F]}var l1=new Set([`area`,`base`,`br`,`col`,`command`,`embed`,`hr`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`]);function u1(e){return typeof e==`object`&&!!e&&typeof e.peek==`function`&&`value`in e}var d1=0;function f1(e){return e!=null&&e.length>0?e:(d1+=1,`pst_ft_${d1}`)}function p1({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??RG)}function m1(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 h1(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 g1(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var _1=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new O$;#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=f1(a),this.#p=yX(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=LG(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new mX({...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&&(D$(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()}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)}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)}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),T$(t.wrapper,this.#w()))}setGitStatus(e){this.#p=yX(e,this.#p);let t=this.#T();t!=null&&T$(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),T$(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),E$(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),T$(r,this.#w())}#C(){return{initialViewportHeight:p1({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(fW,e());return}this.#l.setSlotHtml(fW,this.#e?.header?.html??null)}#k(e){let t=g1(e).find(e=>h1(e)),n=m1(AG(FG(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=g1(e),n=t.find(e=>h1(e)),r=t.filter(e=>e!==n),i=FG(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=m1(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=FG(this.#m);t.colored&&MG(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${cW}]`);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(cW,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=HG(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 JG(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 v1(e){let[t]=(0,W.useState)(()=>new _1(e)),n=(0,W.useRef)({timeout:null,model:t});return(0,W.useEffect)(()=>{let{current:e}=n;return e.timeout!=null&&(clearTimeout(e.timeout),e.timeout=null),()=>{e.timeout=setTimeout(()=>e.model.cleanUp(),1)}},[]),{model:t}}var y1=(0,W.memo)(function({files:e,activeFile:t,commentCounts:n,viewedFiles:r,untrackedFiles:i,onFileClick:a,collapsed:o,onToggleCollapse:s}){let[c,l]=(0,W.useState)(``),u=(0,W.useMemo)(()=>e.map(e=>e.name),[e]),d=(0,W.useMemo)(()=>{let e=new Set;return u.forEach(t=>{let n=t.split(`/`);for(let t=1;t<n.length;t++)e.add(n.slice(0,t).join(`/`))}),Array.from(e)},[u]),f=(0,W.useMemo)(()=>e.map(e=>{let t=`modified`;if(i.has(e.name))t=`untracked`;else if(e.prevName)t=`renamed`;else{let n=e.prevObjectId,r=e.newObjectId;n===`0000000`||n===`0000000000000000000000000000000000000000`?t=`added`:(r===`0000000`||r===`0000000000000000000000000000000000000000`)&&(t=`deleted`)}return{path:e.name,status:t}}),[e,i]),p=(0,W.useRef)({commentCounts:n,viewedFiles:r});p.current={commentCounts:n,viewedFiles:r};let{model:m}=v1({paths:u,fileTreeSearchMode:`hide-non-matches`,gitStatus:f,renderRowDecoration:(0,W.useCallback)(e=>{let t=e.item.path,{commentCounts:n,viewedFiles:r}=p.current,i=r.has(t),a=n[t]??0;return i&&a>0?{text:`✓ 💬 ${a}`,title:`Viewed, ${a} comment${a>1?`s`:``}`}:i?{text:`✓`,title:`Viewed`}:a>0?{text:`💬 ${a}`,title:`${a} comment${a>1?`s`:``}`}:null},[]),initialSelectedPaths:t?[t]:[],initialExpandedPaths:d,onSelectionChange:e=>{e.length>0&&e[0]!==t&&a(e[0])}});return(0,W.useEffect)(()=>{m.resetPaths(u,{initialExpandedPaths:d})},[u,d,m]),(0,W.useEffect)(()=>{m.setGitStatus(f)},[f,n,r,m]),(0,W.useEffect)(()=>{if(t)try{m.focusPath(t),m.scrollToPath(t,{focus:!0,offset:`nearest`})}catch(e){console.error(`Failed to scroll to active file:`,e)}},[t,m]),(0,W.useEffect)(()=>{m.setSearch(c||null)},[c,m]),o?(0,G.jsx)(`div`,{className:`ft`,children:(0,G.jsx)(`div`,{className:`ft-search`,children:s&&(0,G.jsx)($T,{content:`Expand sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:s,"aria-label":`Expand sidebar`,children:(0,G.jsx)(pO,{size:16})})})})}):(0,G.jsxs)(`div`,{className:`ft`,style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,G.jsxs)(`div`,{className:`ft-search`,children:[s&&(0,G.jsx)($T,{content:`Collapse sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:s,"aria-label":`Collapse sidebar`,children:(0,G.jsx)(fO,{size:16})})}),(0,G.jsxs)(`div`,{className:`ft-search-wrapper`,children:[(0,G.jsx)(xO,{size:14,className:`ft-search-icon`}),(0,G.jsx)(`input`,{type:`text`,placeholder:`Filter files...`,value:c,onChange:e=>l(e.target.value),className:`ft-search-input`})]})]}),(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`auto`},children:(0,G.jsx)(bW,{model:m,className:`ft-pierre-tree`})})]})});function b1(e){return e.status===`resolved`?`resolved`:e.replies?.length?`replied`:`open`}var x1=[{key:`all`,label:`All`},{key:`open`,label:`Open`},{key:`replied`,label:`Replied`},{key:`resolved`,label:`Resolved`}];function S1({comments:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s}){let[c,l]=(0,W.useState)(`all`),u=(0,W.useMemo)(()=>{let t={all:e.length,open:0,replied:0,resolved:0};for(let n of e)t[b1(n)]++;return t},[e]),d=(0,W.useMemo)(()=>[...e].sort((e,t)=>t.createdAt-e.createdAt),[e]),f=(0,W.useMemo)(()=>c===`all`?d:d.filter(e=>b1(e)===c),[d,c]);return e.length===0?null:(0,G.jsxs)(`div`,{className:`cmt`,role:`complementary`,"aria-label":`Review comments`,children:[(0,G.jsxs)(`div`,{className:`cmt-head`,children:[(0,G.jsxs)(`div`,{className:`cmt-title`,children:[(0,G.jsx)(cO,{size:14,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:`Comments`}),(0,G.jsx)(`span`,{className:`cmt-total`,children:e.length})]}),(0,G.jsx)(`div`,{className:`cmt-filters`,role:`tablist`,"aria-label":`Filter comments`,children:x1.map(e=>(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":c===e.key,className:`cmt-filter ${c===e.key?`cmt-filter-active`:``}`,onClick:()=>l(e.key),disabled:e.key!==`all`&&u[e.key]===0,children:[e.label,(0,G.jsx)(`span`,{className:`cmt-filter-count`,children:u[e.key]})]},e.key))})]}),(0,G.jsx)(`ul`,{className:`cmt-list`,"aria-label":`Comment threads`,children:f.length===0?(0,G.jsxs)(`li`,{className:`cmt-empty`,children:[`No `,c,` comments`]}):f.map(e=>(0,G.jsx)(C1,{comment:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s},e.id))})]})}function C1({comment:e,resolveComment:t,unresolveComment:n,removeComment:r,addReply:i,editComment:a,editReply:o,removeReply:s}){let c=b1(e),l=e.status===`resolved`,u=e.replies?.length??0,{haptic:d,sound:f}=lD(),[p,m]=(0,W.useState)(!1),[h,g]=(0,W.useState)(!1),[_,v]=(0,W.useState)(!1),[y,b]=(0,W.useState)(!1),x=(0,W.useCallback)(()=>{e.lineNumber>0?oE(e.filePath,e.lineNumber,e.side):document.getElementById(`file-${e.filePath}`)?.scrollIntoView({block:`start`})},[e.filePath,e.lineNumber,e.side]),S=e.lineNumber>0?`:${e.lineNumber}`:` · file`;return(0,G.jsxs)(`li`,{className:`cmt-card cmt-card-${c} ${l?`cmt-card-resolved`:``}`,children:[(0,G.jsxs)(`div`,{className:`cmt-card-top`,children:[(0,G.jsx)(`span`,{className:`cmt-dot cmt-dot-${c}`,"aria-hidden":`true`}),(0,G.jsxs)(`button`,{className:`cmt-loc`,onClick:x,title:`Jump to ${e.filePath}${S}`,children:[(0,G.jsx)(`span`,{className:`cmt-loc-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`cmt-loc-line`,children:S})]}),(0,G.jsx)(`span`,{className:`cmt-time`,children:eE(e.createdAt)})]}),e.lineContent?.trim()&&(0,G.jsx)(`button`,{className:`cmt-codeline`,onClick:x,title:`Jump to line`,children:(0,G.jsx)(`code`,{children:e.lineContent.trim().slice(0,160)})}),_?(0,G.jsx)(KU,{draftKey:`tracker-edit:${e.id}`,initialBody:e.body,onCancel:()=>v(!1),onSubmit:t=>{a(e.id,t),v(!1)}}):(0,G.jsx)(JH,{content:e.body,className:`cmt-body markdown-body`}),(0,G.jsxs)(`div`,{className:`cmt-actions`,children:[(0,G.jsxs)(`button`,{className:`cmt-act`,onClick:()=>{g(e=>!e),m(!0)},title:`Reply`,children:[(0,G.jsx)(WD,{size:13,"aria-hidden":`true`}),(0,G.jsx)(`span`,{children:`Reply`})]}),(0,G.jsx)(`button`,{className:`cmt-act`,onClick:()=>v(e=>!e),title:`Edit comment`,children:(0,G.jsx)(hO,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`cmt-act ${l?`cmt-act-resolved`:``}`,onClick:()=>{l?(n(e.id),d(`light`),f(`toggle`)):(t(e.id),d(`success`),f(`resolve`))},title:l?`Reopen`:`Resolve`,children:l?(0,G.jsx)(yO,{size:13,"aria-hidden":`true`}):(0,G.jsx)(jD,{size:13,"aria-hidden":`true`})}),y?(0,G.jsxs)(`span`,{className:`cmt-confirm`,children:[(0,G.jsx)(`button`,{className:`cmt-act cmt-act-danger`,onClick:()=>{r(e.id),d(`medium`),f(`remove`)},title:`Confirm delete`,children:`Delete?`}),(0,G.jsx)(`button`,{className:`cmt-act`,onClick:()=>b(!1),title:`Cancel`,children:(0,G.jsx)(AO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`cmt-act cmt-act-del`,onClick:()=>b(!0),title:`Delete comment`,children:(0,G.jsx)(TO,{size:13,"aria-hidden":`true`})})]}),u>0&&(0,G.jsxs)(`button`,{className:`cmt-thread-toggle`,onClick:()=>m(e=>!e),"aria-expanded":p,children:[(0,G.jsx)(PD,{size:12,className:`cmt-chev ${p?`cmt-chev-open`:``}`,"aria-hidden":`true`}),u,` `,u===1?`reply`:`replies`]}),p&&u>0&&(0,G.jsx)(`ul`,{className:`cmt-replies`,children:e.replies.map(t=>(0,G.jsx)(w1,{reply:t,onEdit:n=>o(e.id,t.id,n),onRemove:()=>s(e.id,t.id)},t.id))}),h&&(0,G.jsx)(KU,{draftKey:`reply:${e.id}`,onCancel:()=>g(!1),onSubmit:t=>{i(e.id,t),d(`light`),f(`success`),g(!1),m(!0)}})]})}function w1({reply:e,onEdit:t,onRemove:n}){let r=e.role===`agent`||e.role==null&&!!e.model,[i,a]=(0,W.useState)(!1);return(0,G.jsxs)(`li`,{className:`cmt-reply ${r?`cmt-reply-agent`:``}`,children:[(0,G.jsxs)(`div`,{className:`cmt-reply-head`,children:[(0,G.jsxs)(`span`,{className:`cmt-reply-who ${r?`cmt-reply-who-agent`:``}`,children:[r?(0,G.jsx)(AD,{size:11,"aria-hidden":`true`}):null,r?e.model||`Agent`:`You`]}),(0,G.jsx)(`span`,{className:`cmt-time`,children:eE(e.createdAt)}),!r&&(0,G.jsx)(`button`,{className:`cmt-reply-act`,onClick:()=>a(e=>!e),title:`Edit reply`,children:(0,G.jsx)(hO,{size:11,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`cmt-reply-act cmt-act-del`,onClick:n,title:`Delete reply`,children:(0,G.jsx)(TO,{size:11,"aria-hidden":`true`})})]}),i?(0,G.jsx)(KU,{draftKey:`tracker-reply-edit:${e.id}`,initialBody:e.body,onCancel:()=>a(!1),onSubmit:e=>{t(e),a(!1)}}):(0,G.jsx)(JH,{content:e.body,className:`cmt-reply-body markdown-body`})]})}function T1(e,t){let[n,r]=(0,W.useState)(e);return(0,W.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function E1(e){return e===`symbols`?2:e===`text`?1:0}function D1({scope:e,query:t,regex:n,changedOnly:r,changedPaths:i,open:a}){let o=T1(t,130).trim(),s=a&&o.length>=E1(e);return{...nt({queryKey:[`search`,e,o,e===`text`?n:!1,r,r?i:null],enabled:s,placeholderData:V,staleTime:5e3,queryFn:async({signal:t})=>{let a=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},signal:t,body:JSON.stringify({scope:e,query:o,regex:e===`text`?n:!1,changedPaths:r?i:void 0})});if(!a.ok)throw Error(`Search request failed (${a.status})`);return await a.json()}}),enabled:s,pending:t.trim()!==o,minLength:E1(e)}}function O1(e,t){fetch(`/api/search/track`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:e,path:t})}).catch(()=>{})}function k1(e){return nt({queryKey:[`file-text`,e],enabled:!!e,staleTime:300*1e3,queryFn:async({signal:t})=>{let n=await fetch(`/api/file-text?path=${encodeURIComponent(e)}&version=new`,{signal:t});if(n.status===415)return{content:null,missing:!1,binary:!0};if(!n.ok)throw Error(`Failed to load file (${n.status})`);let r=await n.json();if(r.error){if(/binary/i.test(r.error))return{content:null,missing:!1,binary:!0};throw Error(r.error)}return r.missing?{content:null,missing:!0,binary:!1}:{content:r.content??``,missing:!1,binary:!1}}})}var A1=[{pattern:/^\s*(?:export\s+)?(?:async\s+)?function\s+(\w[\w$]*)\s*[<(]/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=\s*(?:async\s*)?\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=\s*(?:async\s+)?function/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:export\s+)?class\s+(\w[\w$]*)/i,kind:`class`,nameGroup:1},{pattern:/^\s*(?:export\s+)?interface\s+(\w[\w$]*)/i,kind:`interface`,nameGroup:1},{pattern:/^\s*(?:export\s+)?type\s+(\w[\w$]*)\s*=/i,kind:`type`,nameGroup:1},{pattern:/^\s*(?:export\s+)?enum\s+(\w[\w$]*)/i,kind:`enum`,nameGroup:1},{pattern:/^\s*(?:export\s+)?(?:const|let|var)\s+(\w[\w$]*)\s*=/i,kind:`variable`,nameGroup:1},{pattern:/^\s*def\s+(\w[\w$]*)\s*\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?fn\s+(\w[\w$]*)\s*[<(]/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?struct\s+(\w[\w$]*)/i,kind:`struct`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?enum\s+(\w[\w$]*)/i,kind:`enum`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?impl\s+(\w[\w$]*)/i,kind:`impl`,nameGroup:1},{pattern:/^\s*(?:pub(?:\s*\(\w+\))?\s+)?trait\s+(\w[\w$]*)/i,kind:`trait`,nameGroup:1},{pattern:/^\s*func\s+(\w[\w$]*)\s*\(/i,kind:`function`,nameGroup:1},{pattern:/^\s*(?:func\s+)?\((\w[\w$]*)\s+\*?\w+\)\s+(\w[\w$]*)\s*\(/i,kind:`method`,nameGroup:2}];function j1(e){for(let{pattern:t,kind:n,nameGroup:r}of A1){let i=t.exec(e);if(i){let e=i[r];if(e)return{name:e,kind:n}}}return null}function M1(e){return new Set(e.map(e=>e.name))}function N1(e){let t=new Set;for(let n of e)n.side===`additions`&&t.add(`${n.filePath}:${n.lineNumber}`);return t}function P1(e,t){return e.kind===`file`?t.diffFileSet.has(e.path)?{type:`scrollFile`,path:e.path}:{type:`preview`,path:e.path}:t.diffFileSet.has(e.path)?{type:`scrollLine`,path:e.path,line:e.line,side:`additions`,match:e.match}:{type:`preview`,path:e.path,line:e.line,match:e.match}}function F1(e,t){if(!t||t.length===0)return null;let n=!0;for(let t=0;t<e.length;t++)if(e.charCodeAt(t)>127){n=!1;break}let r=n?e.length:L1(e),i=null;if(!n){i=Array(r+1).fill(-1);let t=0;for(let n=0;n<e.length;){i[t]=n;let r=e.codePointAt(n);n+=r>65535?2:1,t+=I1(r)}i[r]=e.length}let a=[];for(let e of t){let[t,o]=e;if(!(t==null||o==null||o<=t||t<0||o>r))if(n)a.push([t,o]);else{let e=i[t],n=i[o];e>=0&&n>=0&&a.push([e,n])}}return a.length?a:null}function I1(e){return e<=127?1:e<=2047?2:e<=65535?3:4}function L1(e){let t=0;for(let n=0;n<e.length;){let r=e.codePointAt(n);t+=I1(r),n+=r>65535?2:1}return t}function R1(e,t,n){let r=((t?F1(e,t):null)??z1(e,n)).map(([t,n])=>[Math.max(0,t),Math.min(e.length,n)]).filter(([e,t])=>t>e).sort((e,t)=>e[0]-t[0]),i=[];for(let[e,t]of r){let n=i[i.length-1];n&&e<=n[1]?n[1]=Math.max(n[1],t):i.push([e,t])}return i}function z1(e,t){let n=t.trim();if(!n)return[];let r=[],i=e.toLowerCase(),a=n.toLowerCase(),o=0;for(;r.length<50;){let e=i.indexOf(a,o);if(e===-1)break;r.push([e,e+a.length]),o=e+a.length}return r}function B1(e,t){let n=e.toLowerCase(),r=t.toLowerCase();if(!r)return 0;let i=0,a=0,o=-1;for(let e=0;e<n.length&&i<r.length;e++)n[e]===r[i]&&(a+=o>=0&&e-o===1?5:1,o=e,i++);return i===r.length?a-e.length*.01:null}function V1(e){let t=[],n=new Set;for(let r of e){if(r.side!==`additions`)continue;let e=j1(r.content);if(e){let i=`${r.filePath}:${r.lineNumber}:${e.name}`;if(n.has(i))continue;n.add(i);let a=r.content.indexOf(e.name),o=a>=0?[[a,a+e.name.length]]:[];t.push({name:e.name,kind:e.kind,path:r.filePath,fileName:r.filePath.split(`/`).pop()||``,line:r.lineNumber,content:r.content,matchRanges:o,gitStatus:``})}}return t}var H1=[{key:`all`,label:`All`,Icon:tO},{key:`files`,label:`Files`,Icon:qD},{key:`text`,label:`Text`,Icon:DO},{key:`symbols`,label:`Symbols`,Icon:HD}],U1={function:`ƒ`,method:`m`,class:`C`,variable:`v`,interface:`I`,type:`T`,enum:`E`,struct:`S`,impl:`i`,trait:`t`};function W1(e){switch(e){case`modified`:return{label:`M`,title:`modified`};case`untracked`:return{label:`U`,title:`untracked`};case`staged_new`:case`added`:return{label:`A`,title:`added`};case`deleted`:return{label:`D`,title:`deleted`};case`renamed`:return{label:`R`,title:`renamed`};case``:case`clean`:return null;default:return{label:e.charAt(0).toUpperCase(),title:e}}}function G1({text:e,ranges:t}){if(!t.length)return(0,G.jsx)(G.Fragment,{children:e});let n=[],r=0;return t.forEach(([t,i],a)=>{t>r&&n.push(e.slice(r,t)),n.push((0,G.jsx)(`mark`,{className:`searchpalette-mark`,children:e.slice(t,i)},a)),r=i}),r<e.length&&n.push(e.slice(r)),(0,G.jsx)(G.Fragment,{children:n})}function K1(e,t){let n=t.trim().toLowerCase();if(!n)return[];let r=e.toLowerCase(),i=[],a=0;for(let e=0;e<r.length&&a<n.length;e++)if(r[e]===n[a]){let t=i[i.length-1];t&&t[1]===e?t[1]=e+1:i.push([e,e+1]),a++}return a===n.length?i:[]}var q1=e=>{let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t+1)};function J1(e,t){let n=e.length-e.trimStart().length,r=e.slice(n),i=n;if(r.length>400){let e=t.find(e=>e[0]>=n),a=e?Math.max(0,e[0]-n-24):0,o=a>0?`…`:``;r=o+r.slice(a,a+400),i=n+a-o.length}let a=t.map(([e,t])=>[e-i,t-i]).filter(([e,t])=>t>0&&e<r.length).map(([e,t])=>[Math.max(0,e),Math.min(r.length,t)]);return{text:r,ranges:a}}function Y1({isOpen:e,onClose:t,initialScope:n,files:r,changedEntries:i,customMode:a,staged:o,onNavigateFile:s,theme:c,fontSize:l,monoFontFamily:u,defaultTabSize:d,lineWrap:f,showLineNumbers:p,lineHoverHighlight:m}){let[h,g]=(0,W.useState)(``),[_,v]=(0,W.useState)(n),[y,b]=(0,W.useState)(!1),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(0),[T,E]=(0,W.useState)(null),D=(0,W.useRef)(null),O=(0,W.useRef)(null),k=(0,W.useMemo)(()=>M1(r),[r]),A=(0,W.useMemo)(()=>N1(i),[i]),j=D1({scope:_,query:h,regex:y,changedOnly:x,changedPaths:(0,W.useMemo)(()=>[...k],[k]),open:e}),M=j.data&&j.data.scope===_?j.data:void 0,N=M?.error,P=nt({queryKey:[`repo-files-fallback`],enabled:e&&_===`files`&&!!N,staleTime:6e4,queryFn:async()=>(await(await fetch(`/api/repo-files`)).json()).files??[]});(0,W.useEffect)(()=>{e&&(g(``),v(n),b(!1),S(!1),w(0),E(null))},[e,n]),(0,W.useEffect)(()=>{e&&D.current?.focus()},[e]),(0,W.useEffect)(()=>{w(0),E(null)},[h,_]);let F=(0,W.useMemo)(()=>{let e=h.trim(),t=e.toLowerCase(),n=[];if(_===`files`&&N&&P.data)n=P.data.map(e=>({path:e,score:t?B1(e,t):0})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score).slice(0,60).map(({path:e})=>({kind:`file`,key:e,hit:{path:e,fileName:tE(e),gitStatus:``,matchType:``,exact:!1},inDiff:k.has(e)}));else if(M)M.scope===`files`?n=M.items.map(e=>({kind:`file`,key:e.path,hit:e,inDiff:k.has(e.path)})):M.scope===`text`?n=M.items.map(e=>({kind:`text`,key:`${e.path}:${e.line}:${e.col}`,hit:e,inDiff:k.has(e.path)})):M.scope===`symbols`?n=M.items.map(e=>({kind:`symbol`,key:`${e.path}:${e.line}:${e.name}`,hit:e,inDiff:k.has(e.path)})):M.scope===`all`&&(n=M.items.map(e=>e.kind===`file`?{kind:`file`,key:`all:${e.hit.path}`,hit:e.hit,inDiff:k.has(e.hit.path)}:e.kind===`text`?{kind:`text`,key:`all:${e.hit.path}:${e.hit.line}:${e.hit.col}`,hit:e.hit,inDiff:k.has(e.hit.path)}:{kind:`symbol`,key:`all:${e.hit.path}:${e.hit.line}:${e.hit.name}`,hit:e.hit,inDiff:k.has(e.hit.path)}));else if(_===`symbols`&&e.length<2){let e=V1(i);n=(t?e.filter(e=>e.name.toLowerCase().includes(t)):e).map(e=>({kind:`symbol`,key:`local:${e.path}:${e.line}:${e.name}`,hit:e,inDiff:!0}))}let r=n.filter(e=>e.inDiff),a=n.filter(e=>!e.inDiff);return[...r,...a]},[M,N,P.data,_,k,h,i]);(0,W.useEffect)(()=>{C>=F.length&&w(0)},[F.length,C]),(0,W.useEffect)(()=>{(O.current?.querySelector(`[data-focused="true"]`))?.scrollIntoView({block:`nearest`})},[C,F]);let I=(0,W.useMemo)(()=>({diffFileSet:k,changedKeys:A,customMode:a,staged:o}),[k,A,a,o]),L=(0,W.useCallback)((e,n)=>{let r=F[e];if(!r)return;let i=r.hit.path,a=h.trim();if(O1(a,i),r.kind===`file`){if(n){E({path:i});return}P1({kind:`file`,path:i},I).type===`scrollFile`?(t(),requestAnimationFrame(()=>s(i))):E({path:i});return}let o=r.hit.line,c=r.kind===`symbol`?r.hit.name:a;if(n){E({path:i,line:o,match:c});return}let l=P1({kind:`line`,path:i,line:o,match:c},I);l.type===`scrollLine`?(t(),requestAnimationFrame(()=>oE(i,l.line,l.side,l.match))):E({path:i,line:o,match:c})},[F,h,I,t,s]),R=(0,W.useCallback)(e=>{v(t=>H1[(H1.findIndex(e=>e.key===t)+e+H1.length)%H1.length].key)},[]),z=(0,W.useCallback)(e=>{if(e.key===`PageDown`){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:150,behavior:`auto`});return}if(e.key===`PageUp`){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-150,behavior:`auto`});return}if(e.altKey&&(e.key===`ArrowDown`||e.key===`j`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:80,behavior:`auto`});return}if(e.altKey&&(e.key===`ArrowUp`||e.key===`k`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-80,behavior:`auto`});return}if(e.shiftKey&&(e.key===`ArrowDown`||e.key===`j`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:80,behavior:`auto`});return}if(e.shiftKey&&(e.key===`ArrowUp`||e.key===`k`)){e.preventDefault(),document.querySelector(`.searchpalette-preview-body`)?.scrollBy({top:-80,behavior:`auto`});return}if(e.key===`Tab`){e.preventDefault(),R(e.shiftKey?-1:1);return}let t=e=>{F.length!==0&&w(t=>(t+e+F.length)%F.length)};e.key===`ArrowDown`||e.ctrlKey&&(e.key===`n`||e.key===`j`)?(e.preventDefault(),t(1)):e.key===`ArrowUp`||e.ctrlKey&&(e.key===`p`||e.key===`k`)?(e.preventDefault(),t(-1)):e.ctrlKey&&e.key===`d`?(e.preventDefault(),t(8)):e.ctrlKey&&e.key===`u`?(e.preventDefault(),t(-8)):e.key===`Enter`&&(e.preventDefault(),L(C,e.metaKey||e.ctrlKey))},[R,F.length,L,C]),ee=(0,W.useCallback)(()=>{T?E(null):t()},[T,t]),te=M?.total??F.length,B=(j.isFetching||j.pending)&&j.enabled,V=M?.indexing;return(0,G.jsxs)(PU,{open:e,onClose:ee,className:`searchpalette ui-modal--palette ${T?`searchpalette--split`:``}`,ariaLabel:`Search files, text and symbols`,initialFocus:D,onKeyDown:z,children:[(0,G.jsxs)(`div`,{className:`searchpalette-header`,children:[(0,G.jsxs)(`div`,{className:`searchpalette-input-row`,children:[(0,G.jsx)(xO,{size:15,className:`searchpalette-search-icon`}),(0,G.jsx)(`input`,{ref:D,type:`text`,className:`searchpalette-input`,placeholder:_===`all`?`Search files, text and symbols…`:_===`files`?`Search files in the repo…`:_===`text`?y?`Search by regular expression…`:`Search file contents…`:`Search symbol definitions…`,value:h,onChange:e=>g(e.target.value),role:`combobox`,"aria-expanded":F.length>0,"aria-controls":`searchpalette-list`,"aria-activedescendant":F[C]?`sp-row-${C}`:void 0,spellCheck:!1,autoComplete:`off`}),B&&(0,G.jsx)(nO,{size:14,className:`searchpalette-spinner spin`}),h&&(0,G.jsx)(`button`,{className:`searchpalette-clear`,onClick:()=>g(``),"aria-label":`Clear search`,children:(0,G.jsx)(AO,{size:14})}),(0,G.jsx)(`span`,{className:`searchpalette-count`,children:V?`indexing…`:M?`${F.length} of ${te}`:``})]}),(0,G.jsxs)(`div`,{className:`searchpalette-controls`,children:[(0,G.jsx)(`div`,{className:`searchpalette-scopes`,role:`tablist`,"aria-label":`Search scope`,children:H1.map(e=>(0,G.jsxs)(`button`,{role:`tab`,"aria-selected":_===e.key,className:`searchpalette-scope ${_===e.key?`is-active`:``}`,onClick:()=>v(e.key),children:[(0,G.jsx)(e.Icon,{size:12}),e.label]},e.key))}),(0,G.jsxs)(`div`,{className:`searchpalette-toggles`,children:[_===`text`&&(0,G.jsx)(`button`,{className:`searchpalette-toggle ${y?`is-active`:``}`,onClick:()=>b(e=>!e),title:`Regular expression`,"aria-pressed":y,children:`.*`}),(0,G.jsxs)(`button`,{className:`searchpalette-toggle ${x?`is-active`:``}`,onClick:()=>S(e=>!e),title:`Limit to files in the current diff`,"aria-pressed":x,children:[(0,G.jsx)(XD,{size:12}),`Changed`]})]})]}),M?.regexError&&(0,G.jsx)(`div`,{className:`searchpalette-note`,children:`Invalid regex — showing literal matches`})]}),(0,G.jsxs)(`div`,{className:`searchpalette-body`,children:[(0,G.jsx)(`div`,{className:`searchpalette-list`,id:`searchpalette-list`,role:`listbox`,ref:O,children:(0,G.jsx)(X1,{rows:F,scope:_,query:h,focusedIndex:C,engineError:N,isFetching:j.isFetching,enabled:j.enabled,minLength:j.minLength,regex:y,changedOnly:x,onHover:w,onActivate:(e,t)=>L(e,t?t.metaKey||t.ctrlKey:!1),onRetry:()=>j.refetch()})}),T&&(0,G.jsx)(n0,{preview:T,theme:c,fontSize:l,monoFontFamily:u,defaultTabSize:d,lineWrap:f,showLineNumbers:p,lineHoverHighlight:m,onClose:()=>E(null),inDiff:k.has(T.path),onGoToDiff:()=>{t(),T.line?requestAnimationFrame(()=>oE(T.path,T.line,`additions`,T.match)):requestAnimationFrame(()=>s(T.path))}},T.path)]}),(0,G.jsxs)(`div`,{className:`searchpalette-foot`,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`Tab`}),` scope`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`↑↓`}),` move`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`↵`}),` `,T&&k.has(T.path)?`view in diff`:`open`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`⌘↵`}),` peek`]}),T&&(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`⌥↑↓`}),` / `,(0,G.jsx)(`kbd`,{children:`⇧↑↓`}),` scroll preview`]}),(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{children:`esc`}),` `,T?`back`:`close`]})]})]})}function X1({rows:e,scope:t,query:n,focusedIndex:r,engineError:i,isFetching:a,enabled:o,minLength:s,regex:c,changedOnly:l,onHover:u,onActivate:d,onRetry:f}){return i&&t!==`files`?(0,G.jsxs)(`div`,{className:`searchpalette-state searchpalette-state--error`,children:[(0,G.jsx)(`p`,{children:`Search engine unavailable`}),(0,G.jsx)(`span`,{className:`searchpalette-state-detail`,children:i}),(0,G.jsx)(`button`,{className:`searchpalette-retry`,onClick:f,children:`Retry`})]}):e.length>0?(0,G.jsx)(G.Fragment,{children:e.map((e,t)=>(0,G.jsx)(Z1,{row:e,index:t,query:n,focused:t===r,onHover:u,onActivate:d},e.key))}):o?a?(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsx)(nO,{size:15,className:`spin`}),` Searching…`]}):(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsxs)(`p`,{children:[`No matches`,n.trim()?` for “${n.trim()}”`:``]}),(0,G.jsx)(`span`,{className:`searchpalette-state-detail`,children:l?`Searching only changed files — turn off Changed to search the whole repo`:t===`text`&&!c?`Try Tab to switch scope, or enable .* for regex`:`Try Tab to switch scope`})]}):(0,G.jsx)(`div`,{className:`searchpalette-state`,children:t===`symbols`?n.trim()?`No matching symbols in the current diff. Type at least 2 characters to search the whole repository.`:`No symbols found in the current diff. Type at least 2 characters to search the whole repository.`:t===`text`?`Type to search file contents`:`Type to filter — or browse all files`})}function Z1({row:e,index:t,query:n,focused:r,onHover:i,onActivate:a}){let o=W1(e.hit.gitStatus);return(0,G.jsxs)(`div`,{id:`sp-row-${t}`,role:`option`,"aria-selected":r,"data-focused":r,className:`searchpalette-row ${r?`is-focused`:``} ${e.inDiff?`is-indiff`:``}`,onMouseEnter:()=>i(t),onClick:e=>a(t,e),children:[e.kind===`file`&&(0,G.jsx)(Q1,{hit:e.hit,query:n}),e.kind===`text`&&(0,G.jsx)($1,{hit:e.hit,query:n}),e.kind===`symbol`&&(0,G.jsx)(e0,{hit:e.hit}),(0,G.jsxs)(`div`,{className:`searchpalette-rail`,children:[e.inDiff&&(0,G.jsx)(`span`,{className:`searchpalette-pill searchpalette-pill--diff`,children:`diff`}),o&&(0,G.jsx)(`span`,{className:`searchpalette-git searchpalette-git--${o.title}`,title:o.title,children:o.label})]})]})}function Q1({hit:e,query:t}){let n=e.fileName,r=K1(n,t);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--file`,children:(0,G.jsx)(qD,{size:13})}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsx)(`span`,{className:`searchpalette-primary`,children:(0,G.jsx)(G1,{text:n,ranges:r})}),(0,G.jsx)(`span`,{className:`searchpalette-secondary`,children:q1(e.path)||`./`})]})]})}function $1({hit:e,query:t}){let n=R1(e.content,e.matchRanges,t),{text:r,ranges:i}=J1(e.content,n);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--text`,children:(0,G.jsx)(DO,{size:13})}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsx)(`span`,{className:`searchpalette-primary searchpalette-code`,children:(0,G.jsx)(G1,{text:r,ranges:i})}),(0,G.jsxs)(`span`,{className:`searchpalette-secondary`,children:[e.fileName,`:`,e.line,(0,G.jsx)(`span`,{className:`searchpalette-crumb`,children:q1(e.path)})]})]})]})}function e0({hit:e}){let t=e.content.indexOf(e.name),n=t>=0?e.content.slice(t+e.name.length).trimEnd():``,r=R1(e.name,e.matchRanges.length?t0(e):void 0,e.name);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`searchpalette-tile searchpalette-tile--symbol`,title:e.kind,children:U1[e.kind]??`?`}),(0,G.jsxs)(`div`,{className:`searchpalette-info`,children:[(0,G.jsxs)(`span`,{className:`searchpalette-primary`,children:[(0,G.jsx)(G1,{text:e.name,ranges:r}),n&&(0,G.jsx)(`span`,{className:`searchpalette-sigtail`,children:n.slice(0,60)})]}),(0,G.jsxs)(`span`,{className:`searchpalette-secondary`,children:[e.fileName,`:`,e.line,(0,G.jsx)(`span`,{className:`searchpalette-crumb`,children:q1(e.path)})]})]}),(0,G.jsx)(`span`,{className:`searchpalette-kind-badge`,children:e.kind})]})}function t0(e){let t=e.content.indexOf(e.name);if(t<0)return;let n=[];for(let[r,i]of e.matchRanges){let a=r-t,o=i-t;o>0&&a<e.name.length&&n.push([Math.max(0,a),Math.min(e.name.length,o)])}return n.length?n:void 0}function n0({preview:e,theme:t,fontSize:n,monoFontFamily:r,defaultTabSize:i,lineWrap:a,showLineNumbers:o,lineHoverHighlight:s,onClose:c,inDiff:l,onGoToDiff:u}){let d=nE[t]||nE.nord,{data:f,isLoading:p,error:m}=k1(e.path),h=(0,W.useRef)(null);return(0,W.useEffect)(()=>{!f?.content||!e.line||!h.current||aE(h.current,e.line,e.match)},[f?.content,e.line,e.match]),(0,G.jsxs)(`div`,{className:`searchpalette-preview`,children:[(0,G.jsxs)(`div`,{className:`searchpalette-preview-head`,children:[(0,G.jsx)(qD,{size:12}),(0,G.jsx)(`span`,{className:`searchpalette-preview-path`,children:e.path}),l&&(0,G.jsxs)(`button`,{className:`searchpalette-preview-diff-btn`,onClick:u,title:`Open this file and line in the main diff viewer (Enter)`,style:{padding:`2.5px 8px`,fontSize:`10.5px`,background:`var(--accent-subtle)`,border:`1px solid var(--accent)`,borderRadius:`4px`,color:`var(--text-primary)`,cursor:`pointer`,fontWeight:600,marginRight:`8px`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsx)(XD,{size:11}),`View in Diff`]}),(0,G.jsx)(`button`,{className:`searchpalette-clear`,onClick:c,"aria-label":`Close preview`,children:(0,G.jsx)(AO,{size:14})})]}),(0,G.jsx)(`div`,{className:`searchpalette-preview-body`,ref:h,children:p?(0,G.jsxs)(`div`,{className:`searchpalette-state`,children:[(0,G.jsx)(nO,{size:15,className:`spin`}),` Loading `,e.path,`…`]}):m?(0,G.jsx)(`div`,{className:`searchpalette-state searchpalette-state--error`,children:m.message}):f?.binary?(0,G.jsx)(`div`,{className:`searchpalette-state`,children:`Binary file — no preview`}):f?.missing?(0,G.jsx)(`div`,{className:`searchpalette-state`,children:`File not present in the working tree`}):f?(0,G.jsx)(Bh,{file:{name:e.path,contents:f.content??``},options:{disableFileHeader:!0,overflow:a?`wrap`:`scroll`,disableLineNumbers:!o,lineHoverHighlight:s,theme:{dark:d.type===`dark`?d.themeName:`nord`,light:d.type===`light`?d.themeName:`github-light`},themeType:d.type,unsafeCSS:`
|
|
3848
3848
|
:host {
|
|
3849
3849
|
--diffs-tab-size: ${i} !important;
|
|
3850
3850
|
--diffs-font-family: ${r} !important;
|
|
@@ -3857,11 +3857,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
3857
3857
|
font-variant-ligatures: common-ligatures !important;
|
|
3858
3858
|
font-feature-settings: "liga" on, "calt" on !important;
|
|
3859
3859
|
}
|
|
3860
|
-
`}}):null})]})}var a0=(0,W.memo)(function({activeFile:e,onShowHelp:t,placeholder:n=`No active file (J/K to jump)`}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{let e=()=>{let e=document.activeElement;if(e){let t=e.tagName.toLowerCase();i(t===`input`||t===`textarea`||e.hasAttribute(`contenteditable`))}else i(!1)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,e);let t=setInterval(e,400);return()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,e),clearInterval(t)}},[]),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`b`&&(e.preventDefault(),o(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let c=e?e.split(`/`).pop():null,l=e&&e.includes(`/`)?e.split(`/`).slice(0,-1).join(`/`)+`/`:``,u=(0,W.useCallback)(e=>{e?.stopPropagation(),o(e=>!e)},[]);return(0,G.jsxs)(`div`,{className:`vim-status-bar ${a?`vim-status-collapsed`:``}`,children:[(0,G.jsx)(`div`,{className:`vim-mode-badge ${r?`vim-mode-insert`:`vim-mode-normal`}`,children:r?`INSERT`:`NORMAL`}),!a&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`vim-status-content`,children:[(0,G.jsx)(EO,{size:12,className:`vim-status-icon`}),e?(0,G.jsxs)(`span`,{className:`vim-status-file`,title:e,children:[(0,G.jsx)(`span`,{className:`vim-file-dir`,children:l}),(0,G.jsx)(`strong`,{className:`vim-file-name`,children:c})]}):(0,G.jsx)(`span`,{className:`vim-status-placeholder`,children:n})]}),(0,G.jsxs)(`button`,{className:`vim-status-help-btn`,onClick:t,title:`View Keyboard Shortcuts (?)`,children:[(0,G.jsx)(BD,{size:13}),(0,G.jsx)(`span`,{children:`Shortcuts`}),(0,G.jsx)(`kbd`,{className:`vim-kbd-small`,children:`?`})]})]}),(0,G.jsx)(`button`,{ref:s,className:`vim-status-toggle`,onClick:u,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),u(e))},title:a?`Expand status bar (⌘B)`:`Collapse status bar (⌘B)`,"aria-label":a?`Expand status bar`:`Collapse status bar`,tabIndex:0,children:a?(0,G.jsx)(ID,{size:12}):(0,G.jsx)(FD,{size:12})})]})}),o0=(0,W.memo)(function({isOpen:e,onClose:t,mode:n=`diff`}){let r=n===`plan`?[{title:`Scrolling & Content`,icon:(0,G.jsx)(fO,{size:15}),items:[{keys:[`j`],description:`Scroll Down slightly`},{keys:[`k`],description:`Scroll Up slightly`},{keys:[`Ctrl`,`d`],description:`Scroll Down half page`},{keys:[`Ctrl`,`u`],description:`Scroll Up half page`},{keys:[`Ctrl`,`o`],description:`Jump Back in scroll history`},{keys:[`Ctrl`,`i`],description:`Jump Forward in scroll history`},{keys:[`g`,`g`],description:`Scroll to Top of plan`},{keys:[`G`],description:`Scroll to Bottom of plan`}]},{title:`Plan Navigation`,icon:(0,G.jsx)(nO,{size:15}),items:[{keys:[`J`],description:`Jump to Next Plan in list`},{keys:[`K`],description:`Jump to Previous Plan in list`},{keys:[`b`],description:`Toggle Plans Sidebar Panel collapse`}]},{title:`Search & Dialogs`,icon:(0,G.jsx)(JD,{size:15}),items:[{keys:[`g`,`t`],description:`Open Theme Selection Modal`},{keys:[`?`],description:`Toggle Keyboard Shortcuts Guide`},{keys:[`Esc`],description:`Close preview / dialog`}]},{title:`Views & Formatting`,icon:(0,G.jsx)(uO,{size:15}),items:[{keys:[`m`],description:`Toggle View Mode (Source / Rendered)`},{keys:[`t`],description:`Cycle Tab Indentation Size (2 → 4 → 8)`},{keys:[`w`],description:`Toggle Soft-Wrap Long Lines`},{keys:[`n`],description:`Toggle Line Numbers`},{keys:[`⌘`,`Shift`,`P`],description:`Toggle Preview Mode in Comments`}]}]:[{title:`Scrolling & Diffs`,icon:(0,G.jsx)(fO,{size:15}),items:[{keys:[`j`],description:`Scroll Down slightly`},{keys:[`k`],description:`Scroll Up slightly`},{keys:[`Ctrl`,`d`],description:`Scroll Down half page`},{keys:[`Ctrl`,`u`],description:`Scroll Up half page`},{keys:[`Ctrl`,`o`],description:`Jump Back in scroll history`},{keys:[`Ctrl`,`i`],description:`Jump Forward in scroll history`},{keys:[`g`,`g`],description:`Scroll to Top of diffs`},{keys:[`G`],description:`Scroll to Bottom of diffs`}]},{title:`File Navigation`,icon:(0,G.jsx)(nO,{size:15}),items:[{keys:[`J`],description:`Jump to Next File Diff`},{keys:[`K`],description:`Jump to Previous File Diff`},{keys:[`v`],description:`Toggle Viewed state for Active File`},{keys:[`b`],description:`Toggle Sidebar Panel collapse`}]},{title:`Search & Dialogs`,icon:(0,G.jsx)(JD,{size:15}),items:[{keys:[`⌘`,`K`],description:`Open Search Palette (files · text · symbols)`},{keys:[`/`],description:`Search file contents (Text scope)`},{keys:[`g`,`f`],description:`Search files (Files scope)`},{keys:[`s`],description:`Search symbols (or "g s")`},{keys:[`g`,`v`],description:`Browse any file in the repo`},{keys:[`g`,`t`],description:`Open Theme Selection Modal`},{keys:[`Tab`],description:`Cycle search scope while open`},{keys:[`⌘`,`↵`],description:`Peek a result in the preview pane`},{keys:[`?`],description:`Toggle Keyboard Shortcuts Guide`},{keys:[`Esc`],description:`Close preview / dialog`}]},{title:`Views & Formatting`,icon:(0,G.jsx)(uO,{size:15}),items:[{keys:[`m`],description:`Toggle Diff Style (Split / Unified)`},{keys:[`t`],description:`Cycle Tab Indentation Size (2 → 4 → 8)`},{keys:[`w`],description:`Toggle Soft-Wrap Long Lines`},{keys:[`n`],description:`Toggle Line Numbers`},{keys:[`i`],description:`Cycle Diff Indicator Style (+/− → bars → none)`},{keys:[`Shift`,`I`],description:`Cycle Inline Diff Style (word → char → none)`},{keys:[`⌘`,`Shift`,`P`],description:`Toggle Preview Mode in Comments`}]}];return(0,G.jsxs)(IU,{open:e,onClose:t,className:`shortcuts-modal`,ariaLabel:`Keyboard shortcuts`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(nO,{size:18,className:`shortcuts-icon`}),(0,G.jsx)(`h2`,{children:`Developer Keyboard Shortcuts`})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:t,"aria-label":`Close dialog`,children:(0,G.jsx)(MO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,children:[(0,G.jsx)(`div`,{className:`shortcuts-intro`,children:`Vim-style keybindings are enabled! Navigate and review plans entirely from your home keys.`}),(0,G.jsx)(`div`,{className:`shortcuts-grid`,children:r.map((e,t)=>(0,G.jsxs)(`div`,{className:`shortcuts-section`,children:[(0,G.jsxs)(`h3`,{className:`shortcuts-section-title`,children:[e.icon,(0,G.jsx)(`span`,{children:e.title})]}),(0,G.jsx)(`div`,{className:`shortcuts-list`,children:e.items.map((e,t)=>(0,G.jsxs)(`div`,{className:`shortcuts-row`,children:[(0,G.jsx)(`span`,{className:`shortcuts-desc`,children:e.description}),(0,G.jsx)(`div`,{className:`shortcuts-keys`,children:e.keys.map((t,n)=>(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`vim-kbd`,children:t}),n<e.keys.length-1&&(0,G.jsx)(`span`,{className:`kbd-plus`,children:`+`})]},n))})]},t))})]},t))})]}),(0,G.jsxs)(`div`,{className:`shortcuts-footer`,children:[`Press `,(0,G.jsx)(`kbd`,{className:`vim-kbd-small`,children:`?`}),` to dismiss this menu at any time.`]})]})});function s0({activity:e,onDismiss:t,onJump:n}){if((0,W.useEffect)(()=>{if(!e)return;let n=setTimeout(t,8e3);return()=>clearTimeout(n)},[e,t]),!e)return null;let r=e.body.length>120?`${e.body.slice(0,120)}…`:e.body;return(0,G.jsxs)(`div`,{className:`agent-toast`,role:`status`,"aria-live":`polite`,children:[(0,G.jsxs)(`button`,{className:`agent-toast-body`,onClick:()=>{n(e.filePath),t()},title:`Jump to the file`,children:[(0,G.jsx)(`span`,{className:`agent-toast-icon`,children:(0,G.jsx)(MD,{size:16})}),(0,G.jsxs)(`span`,{className:`agent-toast-text`,children:[(0,G.jsxs)(`span`,{className:`agent-toast-title`,children:[`Agent replied`,e.model?` · ${e.model}`:``]}),(0,G.jsx)(`span`,{className:`agent-toast-file`,children:e.filePath}),(0,G.jsx)(`span`,{className:`agent-toast-preview`,children:r})]})]}),(0,G.jsx)(`button`,{className:`agent-toast-close`,onClick:t,"aria-label":`Dismiss`,children:(0,G.jsx)(MO,{size:14})})]})}var c0=[{id:`nord`,name:`Nord (Main)`,type:`dark`,colors:{bg:`#2e3440`,secondary:`#242933`,accent:`#88c0d0`}},{id:`github-dark`,name:`GitHub Dark`,type:`dark`,colors:{bg:`#0d1117`,secondary:`#161b22`,accent:`#58a6ff`}},{id:`github-dark-dimmed`,name:`GitHub Dark Dimmed`,type:`dark`,colors:{bg:`#22272e`,secondary:`#1c2128`,accent:`#539bf5`}},{id:`github-dark-high-contrast`,name:`GitHub Dark HC`,type:`dark`,colors:{bg:`#0a0c10`,secondary:`#010409`,accent:`#409eff`}},{id:`github-light`,name:`GitHub Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f6f8fa`,accent:`#0969da`}},{id:`github-light-high-contrast`,name:`GitHub Light HC`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f6f8fa`,accent:`#0969da`}},{id:`dracula`,name:`Dracula`,type:`dark`,colors:{bg:`#282a36`,secondary:`#1e1f29`,accent:`#bd93f9`}},{id:`one-dark`,name:`One Dark`,type:`dark`,colors:{bg:`#282c34`,secondary:`#21252b`,accent:`#61afef`}},{id:`synthwave-84`,name:`Synthwave '84`,type:`dark`,colors:{bg:`#2b213a`,secondary:`#241b2f`,accent:`#f92aad`}},{id:`tokyo-night`,name:`Tokyo Night`,type:`dark`,colors:{bg:`#1a1b26`,secondary:`#16161e`,accent:`#7aa2f7`}},{id:`catppuccin-mocha`,name:`Catppuccin Mocha`,type:`dark`,colors:{bg:`#1e1e2e`,secondary:`#181825`,accent:`#cba6f7`}},{id:`catppuccin-frappe`,name:`Catppuccin Frappé`,type:`dark`,colors:{bg:`#303446`,secondary:`#292c3c`,accent:`#ca9ee6`}},{id:`catppuccin-macchiato`,name:`Catppuccin Macchiato`,type:`dark`,colors:{bg:`#24273a`,secondary:`#1e2030`,accent:`#c6a0f6`}},{id:`catppuccin-latte`,name:`Catppuccin Latte`,type:`light`,colors:{bg:`#eff1f5`,secondary:`#e6e9ef`,accent:`#8839ef`}},{id:`solarized-dark`,name:`Solarized Dark`,type:`dark`,colors:{bg:`#002b36`,secondary:`#073642`,accent:`#268bd2`}},{id:`solarized-light`,name:`Solarized Light`,type:`light`,colors:{bg:`#fdf6e3`,secondary:`#eee8d5`,accent:`#268bd2`}},{id:`monokai`,name:`Monokai`,type:`dark`,colors:{bg:`#272822`,secondary:`#1d1e19`,accent:`#f92672`}},{id:`ayu-dark`,name:`Ayu Dark`,type:`dark`,colors:{bg:`#0a0e14`,secondary:`#0d1117`,accent:`#e6b450`}},{id:`ayu-light`,name:`Ayu Light`,type:`light`,colors:{bg:`#fafafa`,secondary:`#f3f3f3`,accent:`#ff9900`}},{id:`nightfox`,name:`Nightfox`,type:`dark`,colors:{bg:`#192330`,secondary:`#131a24`,accent:`#719cd6`}},{id:`nordfox`,name:`Nordfox`,type:`dark`,colors:{bg:`#2e3440`,secondary:`#232831`,accent:`#81a1c1`}},{id:`duskfox`,name:`Duskfox`,type:`dark`,colors:{bg:`#232136`,secondary:`#1d1b2d`,accent:`#86b3b3`}},{id:`terafox`,name:`Terafox`,type:`dark`,colors:{bg:`#152528`,secondary:`#0f1c1e`,accent:`#5a93aa`}},{id:`carbonfox`,name:`Carbonfox`,type:`dark`,colors:{bg:`#161616`,secondary:`#111111`,accent:`#78a9ff`}},{id:`dayfox`,name:`Dayfox`,type:`light`,colors:{bg:`#f6f2ee`,secondary:`#ebe5df`,accent:`#2848a9`}},{id:`dawnfox`,name:`Dawnfox`,type:`light`,colors:{bg:`#eae5e5`,secondary:`#e0d8d8`,accent:`#614d85`}},{id:`andromeeda`,name:`Andromeeda`,type:`dark`,colors:{bg:`#090b10`,secondary:`#0e1117`,accent:`#00e8c6`}},{id:`aurora-x`,name:`Aurora X`,type:`dark`,colors:{bg:`#07090f`,secondary:`#0c0e15`,accent:`#2eb5e5`}},{id:`dark-plus`,name:`Dark+ (VS Code)`,type:`dark`,colors:{bg:`#1e1e1e`,secondary:`#252526`,accent:`#0e639c`}},{id:`light-plus`,name:`Light+ (VS Code)`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f3f3f3`,accent:`#007acc`}},{id:`houston`,name:`Houston (Astro)`,type:`dark`,colors:{bg:`#131415`,secondary:`#17191e`,accent:`#ff5d01`}},{id:`laserwave`,name:`Laserwave`,type:`dark`,colors:{bg:`#1b1d28`,secondary:`#181a23`,accent:`#ffe261`}},{id:`material-theme`,name:`Material Theme`,type:`dark`,colors:{bg:`#263238`,secondary:`#1e272c`,accent:`#80cbd8`}},{id:`material-theme-darker`,name:`Material Darker`,type:`dark`,colors:{bg:`#212121`,secondary:`#1a1a1a`,accent:`#80cbd8`}},{id:`material-theme-lighter`,name:`Material Lighter`,type:`light`,colors:{bg:`#fafafa`,secondary:`#eeeded`,accent:`#80cbd8`}},{id:`material-theme-ocean`,name:`Material Ocean`,type:`dark`,colors:{bg:`#0f111a`,secondary:`#090b10`,accent:`#80cbd8`}},{id:`material-theme-palenight`,name:`Material Palenight`,type:`dark`,colors:{bg:`#292d3e`,secondary:`#202331`,accent:`#80cbd8`}},{id:`min-dark`,name:`Min Dark`,type:`dark`,colors:{bg:`#1f1f1f`,secondary:`#181818`,accent:`#ffffff`}},{id:`min-light`,name:`Min Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f5f5f5`,accent:`#111111`}},{id:`night-owl`,name:`Night Owl`,type:`dark`,colors:{bg:`#011627`,secondary:`#0b2942`,accent:`#7fdbca`}},{id:`one-light`,name:`One Light`,type:`light`,colors:{bg:`#fafafa`,secondary:`#f0f0f0`,accent:`#40a9ff`}},{id:`plastic`,name:`Plastic`,type:`dark`,colors:{bg:`#21252b`,secondary:`#1b1d23`,accent:`#61afef`}},{id:`poimandres`,name:`Poimandres`,type:`dark`,colors:{bg:`#1b1e28`,secondary:`#171922`,accent:`#50cad2`}},{id:`rose-pine`,name:`Rosé Pine`,type:`dark`,colors:{bg:`#191724`,secondary:`#1f1d2e`,accent:`#c4a7e7`}},{id:`rose-pine-moon`,name:`Rosé Pine Moon`,type:`dark`,colors:{bg:`#232136`,secondary:`#2a283e`,accent:`#c4a7e7`}},{id:`rose-pine-dawn`,name:`Rosé Pine Dawn`,type:`light`,colors:{bg:`#faf4ed`,secondary:`#f2e9e1`,accent:`#907aa9`}},{id:`slack-dark`,name:`Slack Dark`,type:`dark`,colors:{bg:`#1a1d21`,secondary:`#222529`,accent:`#36c5f0`}},{id:`slack-ochre`,name:`Slack Ochre`,type:`dark`,colors:{bg:`#222222`,secondary:`#2b2b2b`,accent:`#e8912d`}},{id:`vesper`,name:`Vesper`,type:`dark`,colors:{bg:`#101010`,secondary:`#161616`,accent:`#ffc600`}},{id:`vitesse-black`,name:`Vitesse Black`,type:`dark`,colors:{bg:`#000000`,secondary:`#0b0b0b`,accent:`#4d9375`}},{id:`vitesse-dark`,name:`Vitesse Dark`,type:`dark`,colors:{bg:`#121212`,secondary:`#181818`,accent:`#4d9375`}},{id:`vitesse-light`,name:`Vitesse Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#fafafa`,accent:`#1b655f`}}];function l0({open:e,activeTheme:t,onThemeChange:n,onClose:r}){let[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(`all`),[c,l]=(0,W.useState)(0),u=(0,W.useRef)(null),d=(0,W.useRef)(null),f=(0,W.useRef)([]);(0,W.useEffect)(()=>{e&&(a(``),s(`all`),l(0),setTimeout(()=>{u.current?.focus()},50))},[e]);let p=(0,W.useMemo)(()=>{let e=i.toLowerCase().trim();return c0.filter(t=>{let n=t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e),r=o===`all`||t.type===o;return n&&r})},[i,o]);return(0,W.useEffect)(()=>{c>=p.length&&l(Math.max(0,p.length-1))},[p,c]),(0,W.useEffect)(()=>{e&&f.current[c]&&f.current[c]?.scrollIntoView({block:`nearest`,behavior:`smooth`})},[c,e]),(0,G.jsx)(IU,{open:e,onClose:r,className:`theme-modal`,ariaLabel:`Theme Selector Modal`,children:(0,G.jsxs)(`div`,{className:`theme-modal-content`,onKeyDown:e=>{let t=p.length;if(e.key===`Escape`){e.preventDefault(),r();return}if(t!==0)switch(e.key){case`ArrowRight`:e.preventDefault(),l(e=>Math.min(e+1,t-1));break;case`ArrowLeft`:e.preventDefault(),l(e=>Math.max(e-1,0));break;case`ArrowDown`:e.preventDefault(),c+2<t?l(c+2):l(t-1);break;case`ArrowUp`:e.preventDefault(),c-2>=0&&l(c-2);break;case`Enter`:e.preventDefault(),p[c]&&(n(p[c].id),r());break;default:break}},children:[(0,G.jsxs)(`div`,{className:`theme-modal-header`,children:[(0,G.jsxs)(`div`,{className:`theme-modal-title-row`,children:[(0,G.jsx)(`h2`,{className:`theme-modal-title`,children:`Select Color Theme`}),(0,G.jsx)(`button`,{className:`theme-modal-close-btn`,onClick:r,"aria-label":`Close`,children:(0,G.jsx)(MO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-search-wrapper`,children:[(0,G.jsx)(CO,{className:`theme-modal-search-icon`,size:16}),(0,G.jsx)(`input`,{ref:u,type:`text`,className:`theme-modal-search-input`,placeholder:`Search themes... (e.g. nordfox, github)`,value:i,onChange:e=>{a(e.target.value),l(0)}}),i&&(0,G.jsx)(`button`,{className:`theme-modal-clear-btn`,onClick:()=>{a(``),l(0),u.current?.focus()},children:(0,G.jsx)(MO,{size:14})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-filters`,children:[(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`all`?`active`:``}`,onClick:()=>{s(`all`),l(0),u.current?.focus()},children:[`All Themes (`,c0.length,`)`]}),(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`dark`?`active`:``}`,onClick:()=>{s(`dark`),l(0),u.current?.focus()},children:[(0,G.jsx)(dO,{size:12,style:{marginRight:`6px`}}),`Dark (`,c0.filter(e=>e.type===`dark`).length,`)`]}),(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`light`?`active`:``}`,onClick:()=>{s(`light`),l(0),u.current?.focus()},children:[(0,G.jsx)(TO,{size:12,style:{marginRight:`6px`}}),`Light (`,c0.filter(e=>e.type===`light`).length,`)`]})]})]}),(0,G.jsx)(`div`,{ref:d,className:`theme-modal-list`,children:p.length===0?(0,G.jsxs)(`div`,{className:`theme-modal-empty`,children:[(0,G.jsxs)(`p`,{className:`theme-modal-empty-text`,children:[`No themes matching "`,i,`"`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>{a(``),s(`all`),l(0),u.current?.focus()},children:`Reset Search`})]}):(0,G.jsx)(`div`,{className:`theme-modal-grid`,children:p.map((e,i)=>{let a=t===e.id;return(0,G.jsxs)(`button`,{ref:e=>{f.current[i]=e},type:`button`,className:`theme-modal-card ${a?`active`:``} ${c===i?`focused`:``}`,onClick:()=>{n(e.id),r()},onMouseEnter:()=>l(i),children:[(0,G.jsxs)(`div`,{className:`theme-card-info`,children:[(0,G.jsx)(`span`,{className:`theme-card-name`,children:e.name}),(0,G.jsx)(`span`,{className:`theme-card-meta`,children:e.type===`dark`?(0,G.jsx)(`span`,{className:`theme-meta-tag dark-tag`,children:`Dark`}):(0,G.jsx)(`span`,{className:`theme-meta-tag light-tag`,children:`Light`})})]}),(0,G.jsxs)(`div`,{className:`theme-card-right`,children:[(0,G.jsxs)(`span`,{className:`theme-swatches`,children:[(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.bg},title:`Background`}),(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.secondary},title:`Secondary`}),(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.accent},title:`Accent`})]}),(0,G.jsx)(`span`,{className:`theme-card-status`,children:a&&(0,G.jsx)(ND,{size:14,className:`theme-check-icon`})})]})]},e.id)})})}),(0,G.jsxs)(`div`,{className:`theme-modal-footer`,children:[(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`↑`}),` `,(0,G.jsx)(`kbd`,{children:`↓`}),` `,(0,G.jsx)(`kbd`,{children:`←`}),` `,(0,G.jsx)(`kbd`,{children:`→`}),` Navigate`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`Enter`}),` Select`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`ESC`}),` Close`]})]})]})})}var u0=`Cascadia Code.Cascadia Mono.Consolas.Courier New.Dank Mono.Fantasque Sans Mono.Fira Code.Fira Mono.Geist Mono.Hack.IBM Plex Mono.Inconsolata.Input Mono.JetBrains Mono.Maple Mono.Menlo.Monaco.Monoid.Monaspace Argon.Monaspace Krypton.Monaspace Neon.Monaspace Radon.Monaspace Xenon.Noto Sans Mono.Operator Mono.Roboto Mono.SF Mono.Source Code Pro.Space Mono.Ubuntu Mono.Victor Mono`.split(`.`);async function d0(){if(`queryLocalFonts`in window)try{let e=await window.queryLocalFonts();return[...new Set(e.map(e=>e.family))].sort((e,t)=>e.localeCompare(t))}catch{}return u0}function f0({open:e,title:t,defaultLabel:n,activeFont:r,onFontChange:i,onClose:a}){let[o,s]=(0,W.useState)(``),[c,l]=(0,W.useState)([]),[u,d]=(0,W.useState)(!1),[f,p]=(0,W.useState)(0),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)([]);(0,W.useEffect)(()=>{e&&(s(``),p(0),setTimeout(()=>m.current?.focus(),50),!(c.length>0)&&(d(!0),d0().then(e=>{l(e),d(!1)})))},[e]);let _=(0,W.useMemo)(()=>{let e=o.toLowerCase().trim();return e?c.filter(t=>t.toLowerCase().includes(e)):c},[c,o]),v=_.length+1;(0,W.useEffect)(()=>{f>=v&&p(Math.max(0,v-1))},[v,f]),(0,W.useEffect)(()=>{e&&(f===0?g.current[0]:g.current[f])?.scrollIntoView({block:`nearest`,behavior:`smooth`})},[f,e]);let y=e=>{i(e),a()},b=e=>{if(e.key===`Escape`){e.preventDefault(),a();return}if(v!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),p(e=>Math.min(e+1,v-1));break;case`ArrowUp`:e.preventDefault(),p(e=>Math.max(e-1,0));break;case`Enter`:e.preventDefault(),f===0?y(null):_[f-1]&&y(_[f-1]);break}},x=!r;return(0,G.jsx)(IU,{open:e,onClose:a,className:`theme-modal`,ariaLabel:`${t} Modal`,children:(0,G.jsxs)(`div`,{className:`theme-modal-content`,onKeyDown:b,children:[(0,G.jsxs)(`div`,{className:`theme-modal-header`,children:[(0,G.jsxs)(`div`,{className:`theme-modal-title-row`,children:[(0,G.jsx)(`h2`,{className:`theme-modal-title`,children:t}),(0,G.jsx)(`button`,{className:`theme-modal-close-btn`,onClick:a,"aria-label":`Close`,children:(0,G.jsx)(MO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-search-wrapper`,children:[(0,G.jsx)(CO,{className:`theme-modal-search-icon`,size:16}),(0,G.jsx)(`input`,{ref:m,type:`text`,className:`theme-modal-search-input`,placeholder:`Search fonts...`,value:o,onChange:e=>{s(e.target.value),p(0)}}),o&&(0,G.jsx)(`button`,{className:`theme-modal-clear-btn`,onClick:()=>{s(``),p(0),m.current?.focus()},children:(0,G.jsx)(MO,{size:14})})]})]}),(0,G.jsx)(`div`,{ref:h,className:`theme-modal-list`,children:u?(0,G.jsx)(`div`,{className:`theme-modal-empty`,children:(0,G.jsx)(`p`,{className:`theme-modal-empty-text`,children:`Loading fonts…`})}):(0,G.jsxs)(`div`,{className:`font-picker-list`,children:[(0,G.jsxs)(`button`,{ref:e=>{g.current[0]=e},type:`button`,className:`font-picker-item ${x?`active`:``} ${f===0?`focused`:``}`,onClick:()=>y(null),onMouseEnter:()=>p(0),children:[(0,G.jsxs)(`span`,{className:`font-picker-name font-picker-default-name`,children:[(0,G.jsx)(kO,{size:13,style:{marginRight:`6px`,opacity:.6}}),n]}),(0,G.jsx)(`span`,{className:`font-picker-status`,children:x&&(0,G.jsx)(ND,{size:14,className:`theme-check-icon`})})]},`__default__`),_.length===0&&o?(0,G.jsxs)(`div`,{className:`theme-modal-empty`,style:{paddingTop:`16px`},children:[(0,G.jsxs)(`p`,{className:`theme-modal-empty-text`,children:[`No fonts matching "`,o,`"`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>{s(``),p(0),m.current?.focus()},children:`Reset Search`})]}):_.map((e,t)=>{let n=r===e,i=f===t+1;return(0,G.jsxs)(`button`,{ref:e=>{g.current[t+1]=e},type:`button`,className:`font-picker-item ${n?`active`:``} ${i?`focused`:``}`,onClick:()=>y(e),onMouseEnter:()=>p(t+1),children:[(0,G.jsx)(`span`,{className:`font-picker-name`,style:{fontFamily:`"${e}", ui-monospace, monospace`},children:e}),(0,G.jsx)(`span`,{className:`font-picker-status`,children:n&&(0,G.jsx)(ND,{size:14,className:`theme-check-icon`})})]},e)})]})}),(0,G.jsxs)(`div`,{className:`theme-modal-footer`,children:[(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`↑`}),` `,(0,G.jsx)(`kbd`,{children:`↓`}),` Navigate`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`Enter`}),` Select`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`ESC`}),` Close`]})]})]})})}function p0(){let e=Am(),{settings:t,loaded:n,updateSettings:r}=IE(),[,i]=(0,W.useTransition)(),{patch:a,repoName:o,branch:s,customMode:c,showMode:l,commits:u,truncated:d,binaryFiles:f,tabSizeMap:p,untrackedFiles:m,loading:h,refreshing:g,error:_}=gE({staged:t.staged,untracked:t.untracked},!0),{comments:v,addComment:y,removeComment:b,resolveComment:x,unresolveComment:S,addReply:C,editComment:w,editReply:T,removeReply:E,copyAllComments:D,agentActivity:O,clearAgentActivity:k,sendToAgent:A,sending:j,agentWaiting:M}=xE(),{plans:N}=wE(),P=(0,W.useMemo)(()=>N.filter(e=>e.decision===`pending`).length,[N]),{status:F,refresh:I}=ME(a),[L,R]=(0,W.useState)(null),[z,ee]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[te,B]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}}),V=(0,W.useRef)(te);V.current=te;let H=(0,W.useRef)(null),ne=(0,W.useRef)(null),re=(0,W.useRef)(null),ie=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=V.current,r=ne.current,i=re.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),B(o);try{vD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),[ae,oe]=(0,W.useState)({open:!1,scope:`files`}),se=(0,W.useCallback)(e=>oe({open:!0,scope:e}),[]),ce=(0,W.useCallback)(()=>oe(e=>({...e,open:!1})),[]),[le,ue]=(0,W.useState)(!1),[U,de]=(0,W.useState)(!1),[fe,pe]=(0,W.useState)(!1),[me,he]=(0,W.useState)(!1),[ge,_e]=(0,W.useState)(()=>{try{let e=mD(`diffing-comment-panel-height`);return e?Number(e):220}catch{return 220}}),{jumpList:ve,jumpListIndex:ye,addToJumpList:be,goBack:xe,goForward:Se}=HE(),Ce=(0,W.useRef)(ge);Ce.current=ge;let we=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientY,n=Ce.current,r=H.current,i=n,a=0,o=()=>{a=0,r?.style.setProperty(`--comment-panel-height`,`${i}px`)},s=e=>{let r=t-e.clientY;i=Math.max(100,Math.min(600,n+r)),a||=requestAnimationFrame(o)},c=()=>{a&&cancelAnimationFrame(a),_e(i);try{vD(`diffing-comment-panel-height`,String(i))}catch{}document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c),document.body.style.cursor=`row-resize`,document.body.style.userSelect=`none`},[]);(0,W.useEffect)(()=>{try{vD(`diffing-comment-panel-height`,String(ge))}catch{}},[ge]);let{viewedFiles:Te,setViewed:Ee}=BE(),De=(0,W.useRef)(null);un([`G`,`S`],()=>se(`symbols`)),un([`G`,`F`],()=>se(`all`)),un([`G`,`V`],()=>se(`files`)),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`k`||e.key===`K`)&&(e.preventDefault(),oe(e=>e.open?{...e,open:!1}:{open:!0,scope:`all`}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,W.useEffect)(()=>{try{vD(`diffing-sidebar-collapsed`,String(z))}catch{}},[z]);let Oe=(0,W.useMemo)(()=>new Set(m),[m]),ke=(0,W.useRef)([]),Ae=(0,W.useMemo)(()=>{if(!a)return[];try{let e=Pg(a).flatMap(e=>e.files),t=new Set(e.map(e=>e.name));for(let n of f)if(!t.has(n.path)){let t={name:n.path,type:n.type===`added`||n.type===`untracked`?`new`:n.type===`deleted`?`deleted`:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:!0,deletionLines:[],additionLines:[]};e.push(t)}let n=e.map(e=>{let t=ke.current.find(t=>t.name===e.name);return t&&t.type===e.type&&t.isPartial===e.isPartial&&t.deletionLines.length===e.deletionLines.length&&t.additionLines.length===e.additionLines.length&&JSON.stringify(t.hunks)===JSON.stringify(e.hunks)?t:e});return ke.current=n,n}catch{return[]}},[a,f]),je=bD(Ae),Me=(0,W.useMemo)(()=>{if(!a)return{additions:0,deletions:0};let e=0,t=0,n=0,r=a.length;for(;n<r;){let i=a.indexOf(`
|
|
3861
|
-
`,n);i===-1&&(i=r);let o=a.charCodeAt(n);o===43?n+2<r&&a.charCodeAt(n+1)===43&&a.charCodeAt(n+2)===43||e++:o===45&&(n+2<r&&a.charCodeAt(n+1)===45&&a.charCodeAt(n+2)===45||t++),n=i+1}return{additions:e,deletions:t}},[a]),Ne=(0,W.useMemo)(()=>{let e=new Map;for(let t of f)e.set(t.path,t);return e},[f]),Pe=(0,W.useMemo)(()=>{let e={};for(let t of v)e[t.filePath]=(e[t.filePath]??0)+1;return e},[v]),Fe=(0,W.useRef)(new Map),Ie=(0,W.useMemo)(()=>{let e=new Map,t=new Map;for(let e of v){let n=t.get(e.filePath);n||(n=[],t.set(e.filePath,n)),n.push(e)}for(let[n,r]of t){let t=r.map(e=>({side:e.side,lineNumber:e.lineNumber,metadata:e})),i=Fe.current.get(n);i&&JSON.stringify(i)===JSON.stringify(t)?e.set(n,i):e.set(n,t)}return Fe.current=e,e},[v]),Le=(0,W.useCallback)(e=>{R(e);let t=document.getElementById(`file-${e}`);t&&t.scrollIntoView({block:`start`})},[]),Re=(0,W.useCallback)((e,t)=>{Ee(e,t)},[Ee]),ze=(0,W.useCallback)(e=>{i(()=>{r({diffStyle:e})})},[r]),Be=(0,W.useCallback)(e=>{i(()=>{r(e)})},[r]),Ve=(0,W.useCallback)(e=>{i(()=>{r({defaultTabSize:e})})},[r]),He=(0,W.useCallback)(e=>{i(()=>{r({browser:e})})},[r]),Ue=(0,W.useCallback)(e=>{i(()=>{r({theme:e})})},[r]),We=(0,W.useCallback)(e=>{i(()=>{r({editorIDE:e})})},[r]),Ge=(0,W.useCallback)(e=>{i(()=>{r({lineDiffType:e})})},[r]),Ke=(0,W.useCallback)(e=>{i(()=>{r({lineWrap:e})})},[r]),qe=(0,W.useCallback)(e=>{i(()=>{r({diffIndicators:e})})},[r]),Je=(0,W.useCallback)(e=>{i(()=>{r({showLineNumbers:e})})},[r]),Ye=(0,W.useCallback)(e=>{i(()=>{r({hunkSeparators:e})})},[r]),Xe=(0,W.useCallback)(e=>{i(()=>{r({lineHoverHighlight:e})})},[r]),Ze=(0,W.useCallback)(e=>{i(()=>{r({fontSize:e})})},[r]),Qe=(0,W.useCallback)(e=>{r({haptics:e})},[r]),$e=(0,W.useCallback)(e=>{r({sounds:e})},[r]),et=(0,W.useCallback)(e=>{r({uiFont:e})},[r]),tt=(0,W.useCallback)(e=>{r({monoFont:e})},[r]),nt=(0,W.useCallback)(()=>{Ke(!t.lineWrap)},[t.lineWrap,Ke]),rt=(0,W.useCallback)(()=>{Je(!t.showLineNumbers)},[t.showLineNumbers,Je]),it=(0,W.useCallback)(()=>{let e=[`classic`,`bars`,`none`],n=t.diffIndicators||`classic`,r=e[(e.indexOf(n)+1)%e.length];qe(r)},[t.diffIndicators,qe]),at=(0,W.useCallback)(()=>{let e=[`word`,`word-alt`,`char`,`none`],n=t.lineDiffType||`word`,r=e[(e.indexOf(n)+1)%e.length];Ge(r)},[t.lineDiffType,Ge]),ot=(0,W.useCallback)(()=>{ee(e=>!e)},[]),st=(0,W.useCallback)(e=>{if(Ae.length===0)return;let t=0;if(L){let n=Ae.findIndex(e=>e.name===L);n!==-1&&(t=e===`next`?Math.min(n+1,Ae.length-1):Math.max(n-1,0))}let n=Ae[t].name;R(n);let r=document.getElementById(`file-${n}`);r&&r.scrollIntoView({block:`start`})},[Ae,L,R]),ct=(0,W.useCallback)(()=>{L&&Ee(L,!Te.has(L))},[L,Te,Ee]),lt=(0,W.useCallback)(()=>{ze(t.diffStyle===`split`?`unified`:`split`)},[t.diffStyle,ze]),ut=(0,W.useCallback)(()=>{let e=[2,4,8],n=t.defaultTabSize||4;Ve(e[(e.indexOf(n)+1)%e.length])},[t.defaultTabSize,Ve]),dt=(0,W.useCallback)(()=>{ot()},[ot]);(0,W.useEffect)(()=>{let e=``,t,n=0,r=r=>{let i=document.activeElement;if(i){let e=i.tagName.toLowerCase();if(e===`input`||e===`textarea`||i.hasAttribute(`contenteditable`))return}clearTimeout(t);let a=r.key;if(r.ctrlKey){if(a===`d`)r.preventDefault(),be(window.scrollY),window.scrollBy({top:window.innerHeight/2,behavior:`auto`}),lD(`selection`,`navigate`),e=``;else if(a===`u`)r.preventDefault(),be(window.scrollY),window.scrollBy({top:-window.innerHeight/2,behavior:`auto`}),lD(`selection`,`navigate`),e=``;else if(a===`o`){r.preventDefault();let t=xe();t&&(window.scrollTo({top:t.scrollY,behavior:`auto`}),lD(`selection`,`navigate`)),e=``}else if(a===`i`){r.preventDefault();let t=Se();t&&(window.scrollTo({top:t.scrollY,behavior:`auto`}),lD(`selection`,`navigate`)),e=``}return}if(!(a.length>1&&a!==`Escape`&&a!==`Enter`))if(e+=a,t=setTimeout(()=>{e=``},800),e===`j`){r.preventDefault(),be(window.scrollY),window.scrollBy({top:100,behavior:`auto`});let t=Date.now();t-n>80&&(sD(`navigate`),n=t),e=``}else if(e===`k`){r.preventDefault(),be(window.scrollY),window.scrollBy({top:-100,behavior:`auto`});let t=Date.now();t-n>80&&(sD(`navigate`),n=t),e=``}else e===`gg`?(r.preventDefault(),be(window.scrollY),window.scrollTo({top:0,behavior:`auto`}),lD(`selection`,`navigate`),e=``):e===`G`?(r.preventDefault(),be(window.scrollY),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`auto`}),lD(`selection`,`navigate`),e=``):e===`J`?(r.preventDefault(),be(window.scrollY,L??void 0),st(`next`),lD(`selection`,`navigate`),e=``):e===`K`?(r.preventDefault(),be(window.scrollY,L??void 0),st(`prev`),lD(`selection`,`navigate`),e=``):e===`v`?(r.preventDefault(),ct(),lD(`selection`,`toggle`),e=``):e===`m`?(r.preventDefault(),lt(),lD(`selection`,`toggle`),e=``):e===`t`?(r.preventDefault(),ut(),lD(`selection`,`toggle`),e=``):e===`b`?(r.preventDefault(),dt(),lD(`selection`,`toggle`),e=``):e===`w`?(r.preventDefault(),nt(),lD(`selection`,`toggle`),e=``):e===`n`?(r.preventDefault(),rt(),lD(`selection`,`toggle`),e=``):e===`i`?(r.preventDefault(),it(),lD(`selection`,`toggle`),e=``):e===`I`?(r.preventDefault(),at(),lD(`selection`,`toggle`),e=``):e===`/`?(r.preventDefault(),se(`text`),lD(`medium`,`open`),e=``):e===`s`?(r.preventDefault(),se(`symbols`),lD(`medium`,`open`),e=``):e===`gv`?(r.preventDefault(),se(`files`),lD(`medium`,`open`),e=``):e===`gt`?(r.preventDefault(),de(!0),lD(`medium`,`open`),e=``):e===`?`?(r.preventDefault(),ue(!0),lD(`medium`,`open`),e=``):e.length>=2&&(e=``)};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),clearTimeout(t)}},[Ae,L,Te,t.diffStyle,t.defaultTabSize,st,ct,lt,ut,dt,nt,rt,it,at,de,ve,ye,be,xe,Se]);let ft=(0,W.useMemo)(()=>({staged:t.staged,untracked:t.untracked}),[t.staged,t.untracked]);(0,W.useEffect)(()=>{let e=t.theme||`nord`,n=document.documentElement;n.classList.add(`theme-switching`),n.setAttribute(`data-theme`,e);let r=requestAnimationFrame(()=>{requestAnimationFrame(()=>n.classList.remove(`theme-switching`))});return()=>cancelAnimationFrame(r)},[t.theme]),LE(n,t.uiFont,t.monoFont);let pt=(0,W.useMemo)(()=>FE(t.monoFont),[t.monoFont]),mt=(0,W.useMemo)(()=>nE[t.theme||`nord`]||nE.nord,[t.theme]);return(0,W.useEffect)(()=>{e&&e.setRenderOptions({theme:{dark:mt.type===`dark`?mt.themeName:`nord`,light:mt.type===`light`?mt.themeName:`github-light`}}).catch(e=>{console.error(`Failed to set worker pool render options:`,e)})},[e,mt]),(0,W.useEffect)(()=>{let e=mt.type===`dark`?mt.themeName:`nord`,t=mt.type===`light`?mt.themeName:`github-light`;Uf({themes:Array.from(new Set([e,t])),langs:[]}).catch(()=>{})},[mt]),h?(0,G.jsxs)(`div`,{className:`app skeleton-app`,style:{"--sidebar-width":`${te}px`,"--comment-panel-height":`${ge}px`},children:[(0,G.jsxs)(`header`,{className:`skeleton-toolbar`,children:[(0,G.jsx)(`div`,{className:`skeleton-item skeleton-logo`}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-stats`}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-actions`})]}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{className:`sidebar skeleton-sidebar ${z?`sidebar-collapsed`:``}`,children:!z&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`skeleton-search`}),(0,G.jsx)(`div`,{className:`skeleton-tree-nodes`,children:Array.from({length:8}).map((e,t)=>(0,G.jsxs)(`div`,{className:`skeleton-tree-node`,style:{paddingLeft:`${t%3*16+16}px`},children:[(0,G.jsx)(`div`,{className:`skeleton-node-icon`}),(0,G.jsx)(`div`,{className:`skeleton-node-text`,style:{width:`${60+t*12%60}px`}})]},t))})]})}),!z&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,style:{cursor:`default`}}),(0,G.jsx)(`main`,{className:`main skeleton-main`,children:(0,G.jsx)(`div`,{className:`diff-viewer`,children:Array.from({length:3}).map((e,t)=>(0,G.jsxs)(`div`,{className:`file-diff-card skeleton-card`,children:[(0,G.jsxs)(`div`,{className:`skeleton-card-header`,children:[(0,G.jsx)(`div`,{className:`skeleton-card-title`,style:{width:`${120+t*45%150}px`}}),(0,G.jsx)(`div`,{className:`skeleton-card-badge`})]}),(0,G.jsx)(`div`,{className:`skeleton-card-body`,children:Array.from({length:5}).map((e,t)=>(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`${50+t*15%45}%`}},t))})]},t))})})]})]}):_?(0,G.jsx)(`div`,{className:`error`,children:(0,G.jsxs)(`p`,{children:[`Error: `,_]})}):(0,G.jsx)(uD,{enabled:t.haptics??!0,soundsEnabled:t.sounds??!0,children:(0,G.jsxs)(`div`,{className:`app`,ref:H,style:{"--sidebar-width":`${te}px`,"--comment-panel-height":`${ge}px`},children:[g&&(0,G.jsx)(`div`,{className:`refresh-bar`,role:`status`,"aria-label":`Refreshing diff`}),(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:re,"aria-hidden":`true`}),(0,G.jsx)(_U,{repoName:o,branch:s,fileCount:Ae.length,additions:Me.additions,deletions:Me.deletions,commentCount:v.length,planCount:N.length,pendingPlanCount:P,onOpenPlans:()=>DE(`/plan`),diffStyle:t.diffStyle,diffOptions:ft,defaultTabSize:t.defaultTabSize,browser:t.browser,theme:t.theme||`nord`,editorIDE:t.editorIDE,customMode:c,showMode:l,showCommitCount:u.length,lineDiffType:t.lineDiffType,lineWrap:t.lineWrap,diffIndicators:t.diffIndicators,showLineNumbers:t.showLineNumbers,hunkSeparators:t.hunkSeparators,lineHoverHighlight:t.lineHoverHighlight,fontSize:t.fontSize,haptics:t.haptics??!0,sounds:t.sounds??!0,uiFont:t.uiFont,monoFont:t.monoFont,sidebarCollapsed:z,onToggleSidebar:ot,onDiffStyleChange:ze,onDiffOptionsChange:Be,onDefaultTabSizeChange:Ve,onBrowserChange:He,onOpenThemeModal:()=>de(!0),onEditorIDEChange:We,onLineDiffTypeChange:Ge,onLineWrapChange:Ke,onDiffIndicatorsChange:qe,onShowLineNumbersChange:Je,onHunkSeparatorsChange:Ye,onLineHoverHighlightChange:Xe,onFontSizeChange:Ze,onHapticsChange:Qe,onSoundsChange:$e,onOpenUiFontModal:()=>pe(!0),onOpenMonoFontModal:()=>he(!0),onOpenSearch:()=>se(`all`),onCopyComments:D,onSendToAgent:A,agentWaiting:M,sending:j,comments:v,onEditComment:w,onDeleteComment:b}),!z&&(0,G.jsx)(`div`,{className:`sidebar-mobile-backdrop`,onClick:ot,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsxs)(`aside`,{ref:ne,className:`sidebar ${z?`sidebar-collapsed`:``}`,children:[(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`hidden`},children:(0,G.jsx)(x1,{files:Ae,activeFile:L,commentCounts:Pe,viewedFiles:Te,untrackedFiles:Oe,onFileClick:Le,collapsed:z,onToggleCollapse:ot})}),!z&&v.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`ct-resize-handle`,onMouseDown:we,role:`separator`,"aria-label":`Resize comments panel`,"aria-orientation":`horizontal`,tabIndex:0}),(0,G.jsx)(`div`,{className:`ct-wrapper`,style:{flexShrink:0},children:(0,G.jsx)(w1,{comments:v,resolveComment:x,unresolveComment:S,removeComment:b,addReply:C,editComment:w,editReply:T,removeReply:E})})]})]}),!z&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:ie,role:`separator`,"aria-label":`Resize sidebar`,"aria-orientation":`vertical`,tabIndex:0}),(0,G.jsxs)(`main`,{className:`main`,ref:De,children:[l&&u.length>0&&(0,G.jsxs)(`div`,{className:`commit-banner-stack`,role:`list`,children:[u.map((e,t)=>(0,G.jsx)(vU,{commit:e,index:t,total:u.length},e.sha)),d>0&&(0,G.jsxs)(`div`,{className:`commit-banner-truncated`,role:`status`,children:[`+ `,d,` more commit`,d===1?``:`s`,` not shown`]})]}),F.inMerge&&F.conflicts.length>0&&(0,G.jsxs)(`div`,{className:`merge-conflict-banner`,children:[(0,G.jsx)(`strong`,{children:`Merge in progress`}),(0,G.jsxs)(`span`,{children:[F.conflicts.length,` unresolved file`,F.conflicts.length===1?``:`s`,` below. Use the inline buttons to accept current/incoming/both, then "Save & stage".`]})]}),F.conflicts.map(e=>(0,G.jsx)(sW,{filePath:e,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:pt,tabSize:p[e]??t.defaultTabSize,onSaved:()=>{I()}},e)),(0,G.jsx)(aW,{files:Ae,diffStyle:t.diffStyle,tabSizeMap:p,defaultTabSize:t.defaultTabSize,viewedFiles:Te,binaryFiles:Ne,theme:t.theme||`nord`,editorIDE:t.editorIDE,lineDiffType:t.lineDiffType,lineWrap:t.lineWrap,diffIndicators:t.diffIndicators,showLineNumbers:t.showLineNumbers,hunkSeparators:t.hunkSeparators,lineHoverHighlight:t.lineHoverHighlight,fontSize:t.fontSize,monoFontFamily:pt,expandContextByDefault:t.expandContextByDefault,collapsedContextThreshold:t.collapsedContextThreshold,expansionLineCount:t.expansionLineCount,onViewedChange:Re,fileAnnotationsMap:Ie,onAddComment:y,onDeleteComment:b})]})]}),(0,G.jsx)(Z1,{isOpen:ae.open,onClose:ce,initialScope:ae.scope,files:Ae,changedEntries:je,customMode:c,staged:t.staged,onNavigateFile:Le,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:pt,defaultTabSize:t.defaultTabSize,lineWrap:t.lineWrap,showLineNumbers:t.showLineNumbers,lineHoverHighlight:t.lineHoverHighlight}),(0,G.jsx)(a0,{activeFile:L,onShowHelp:()=>ue(!0)}),(0,G.jsx)(o0,{isOpen:le,onClose:()=>ue(!1)}),(0,G.jsx)(l0,{open:U,activeTheme:t.theme||`nord`,onThemeChange:Ue,onClose:()=>de(!1)}),(0,G.jsx)(f0,{open:fe,title:`Select UI Font`,defaultLabel:`Default (Geist Mono, from CDN)`,activeFont:t.uiFont,onFontChange:et,onClose:()=>pe(!1)}),(0,G.jsx)(f0,{open:me,title:`Select Code Font`,defaultLabel:`Default (JetBrains Mono, from CDN)`,activeFont:t.monoFont,onFontChange:tt,onClose:()=>he(!1)}),(0,G.jsx)(s0,{activity:O,onDismiss:k,onJump:Le})]})})}function m0(e,t){if(t<1)return;let n=e.split(`
|
|
3862
|
-
`),r=Math.min(t,n.length);for(let e=r-1;e>=0;e--){let t=/^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(n[e]);if(t)return t[2].trim()}}function
|
|
3860
|
+
`}}):null})]})}var r0=(0,W.memo)(function({activeFile:e,onShowHelp:t,placeholder:n=`No active file (J/K to jump)`}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(!1),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{let e=()=>{let e=document.activeElement;if(e){let t=e.tagName.toLowerCase();i(t===`input`||t===`textarea`||e.hasAttribute(`contenteditable`))}else i(!1)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,e);let t=setInterval(e,400);return()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,e),clearInterval(t)}},[]),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`b`&&(e.preventDefault(),o(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let c=e?e.split(`/`).pop():null,l=e&&e.includes(`/`)?e.split(`/`).slice(0,-1).join(`/`)+`/`:``,u=(0,W.useCallback)(e=>{e?.stopPropagation(),o(e=>!e)},[]);return(0,G.jsxs)(`div`,{className:`vim-status-bar ${a?`vim-status-collapsed`:``}`,children:[(0,G.jsx)(`div`,{className:`vim-mode-badge ${r?`vim-mode-insert`:`vim-mode-normal`}`,children:r?`INSERT`:`NORMAL`}),!a&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`div`,{className:`vim-status-content`,children:[(0,G.jsx)(wO,{size:12,className:`vim-status-icon`}),e?(0,G.jsxs)(`span`,{className:`vim-status-file`,title:e,children:[(0,G.jsx)(`span`,{className:`vim-file-dir`,children:l}),(0,G.jsx)(`strong`,{className:`vim-file-name`,children:c})]}):(0,G.jsx)(`span`,{className:`vim-status-placeholder`,children:n})]}),(0,G.jsxs)(`button`,{className:`vim-status-help-btn`,onClick:t,title:`View Keyboard Shortcuts (?)`,children:[(0,G.jsx)(RD,{size:13}),(0,G.jsx)(`span`,{children:`Shortcuts`}),(0,G.jsx)(`kbd`,{className:`vim-kbd-small`,children:`?`})]})]}),(0,G.jsx)(`button`,{ref:s,className:`vim-status-toggle`,onClick:u,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),u(e))},title:a?`Expand status bar (⌘B)`:`Collapse status bar (⌘B)`,"aria-label":a?`Expand status bar`:`Collapse status bar`,tabIndex:0,children:a?(0,G.jsx)(PD,{size:12}):(0,G.jsx)(ND,{size:12})})]})}),i0=(0,W.memo)(function({isOpen:e,onClose:t,mode:n=`diff`}){let r=n===`plan`?[{title:`Scrolling & Content`,icon:(0,G.jsx)(uO,{size:15}),items:[{keys:[`j`],description:`Scroll Down slightly`},{keys:[`k`],description:`Scroll Up slightly`},{keys:[`Ctrl`,`d`],description:`Scroll Down half page`},{keys:[`Ctrl`,`u`],description:`Scroll Up half page`},{keys:[`g`,`g`],description:`Scroll to Top of plan`},{keys:[`G`],description:`Scroll to Bottom of plan`}]},{title:`Plan Navigation`,icon:(0,G.jsx)(eO,{size:15}),items:[{keys:[`J`],description:`Jump to Next Plan in list`},{keys:[`K`],description:`Jump to Previous Plan in list`},{keys:[`b`],description:`Toggle Plans Sidebar Panel collapse`}]},{title:`Search & Dialogs`,icon:(0,G.jsx)(KD,{size:15}),items:[{keys:[`g`,`t`],description:`Open Theme Selection Modal`},{keys:[`?`],description:`Toggle Keyboard Shortcuts Guide`},{keys:[`Esc`],description:`Close preview / dialog`}]},{title:`Views & Formatting`,icon:(0,G.jsx)(cO,{size:15}),items:[{keys:[`m`],description:`Toggle View Mode (Source / Rendered)`},{keys:[`t`],description:`Cycle Tab Indentation Size (2 → 4 → 8)`},{keys:[`w`],description:`Toggle Soft-Wrap Long Lines`},{keys:[`n`],description:`Toggle Line Numbers`},{keys:[`⌘`,`Shift`,`P`],description:`Toggle Preview Mode in Comments`}]}]:[{title:`Scrolling & Diffs`,icon:(0,G.jsx)(uO,{size:15}),items:[{keys:[`j`],description:`Scroll Down slightly`},{keys:[`k`],description:`Scroll Up slightly`},{keys:[`Ctrl`,`d`],description:`Scroll Down half page`},{keys:[`Ctrl`,`u`],description:`Scroll Up half page`},{keys:[`g`,`g`],description:`Scroll to Top of diffs`},{keys:[`G`],description:`Scroll to Bottom of diffs`}]},{title:`File Navigation`,icon:(0,G.jsx)(eO,{size:15}),items:[{keys:[`J`],description:`Jump to Next File Diff`},{keys:[`K`],description:`Jump to Previous File Diff`},{keys:[`v`],description:`Toggle Viewed state for Active File`},{keys:[`b`],description:`Toggle Sidebar Panel collapse`}]},{title:`Search & Dialogs`,icon:(0,G.jsx)(KD,{size:15}),items:[{keys:[`⌘`,`K`],description:`Open Search Palette (files · text · symbols)`},{keys:[`/`],description:`Search file contents (Text scope)`},{keys:[`g`,`f`],description:`Search files (Files scope)`},{keys:[`s`],description:`Search symbols (or "g s")`},{keys:[`g`,`v`],description:`Browse any file in the repo`},{keys:[`g`,`t`],description:`Open Theme Selection Modal`},{keys:[`Tab`],description:`Cycle search scope while open`},{keys:[`⌘`,`↵`],description:`Peek a result in the preview pane`},{keys:[`?`],description:`Toggle Keyboard Shortcuts Guide`},{keys:[`Esc`],description:`Close preview / dialog`}]},{title:`Views & Formatting`,icon:(0,G.jsx)(cO,{size:15}),items:[{keys:[`m`],description:`Toggle Diff Style (Split / Unified)`},{keys:[`t`],description:`Cycle Tab Indentation Size (2 → 4 → 8)`},{keys:[`w`],description:`Toggle Soft-Wrap Long Lines`},{keys:[`n`],description:`Toggle Line Numbers`},{keys:[`i`],description:`Cycle Diff Indicator Style (+/− → bars → none)`},{keys:[`Shift`,`I`],description:`Cycle Inline Diff Style (word → char → none)`},{keys:[`⌘`,`Shift`,`P`],description:`Toggle Preview Mode in Comments`}]}];return(0,G.jsxs)(PU,{open:e,onClose:t,className:`shortcuts-modal`,ariaLabel:`Keyboard shortcuts`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(eO,{size:18,className:`shortcuts-icon`}),(0,G.jsx)(`h2`,{children:`Developer Keyboard Shortcuts`})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:t,"aria-label":`Close dialog`,children:(0,G.jsx)(AO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,children:[(0,G.jsx)(`div`,{className:`shortcuts-intro`,children:`Vim-style keybindings are enabled! Navigate and review plans entirely from your home keys.`}),(0,G.jsx)(`div`,{className:`shortcuts-grid`,children:r.map((e,t)=>(0,G.jsxs)(`div`,{className:`shortcuts-section`,children:[(0,G.jsxs)(`h3`,{className:`shortcuts-section-title`,children:[e.icon,(0,G.jsx)(`span`,{children:e.title})]}),(0,G.jsx)(`div`,{className:`shortcuts-list`,children:e.items.map((e,t)=>(0,G.jsxs)(`div`,{className:`shortcuts-row`,children:[(0,G.jsx)(`span`,{className:`shortcuts-desc`,children:e.description}),(0,G.jsx)(`div`,{className:`shortcuts-keys`,children:e.keys.map((t,n)=>(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`kbd`,{className:`vim-kbd`,children:t}),n<e.keys.length-1&&(0,G.jsx)(`span`,{className:`kbd-plus`,children:`+`})]},n))})]},t))})]},t))})]}),(0,G.jsxs)(`div`,{className:`shortcuts-footer`,children:[`Press `,(0,G.jsx)(`kbd`,{className:`vim-kbd-small`,children:`?`}),` to dismiss this menu at any time.`]})]})});function a0({activity:e,onDismiss:t,onJump:n}){if((0,W.useEffect)(()=>{if(!e)return;let n=setTimeout(t,8e3);return()=>clearTimeout(n)},[e,t]),!e)return null;let r=e.body.length>120?`${e.body.slice(0,120)}…`:e.body;return(0,G.jsxs)(`div`,{className:`agent-toast`,role:`status`,"aria-live":`polite`,children:[(0,G.jsxs)(`button`,{className:`agent-toast-body`,onClick:()=>{n(e.filePath),t()},title:`Jump to the file`,children:[(0,G.jsx)(`span`,{className:`agent-toast-icon`,children:(0,G.jsx)(AD,{size:16})}),(0,G.jsxs)(`span`,{className:`agent-toast-text`,children:[(0,G.jsxs)(`span`,{className:`agent-toast-title`,children:[`Agent replied`,e.model?` · ${e.model}`:``]}),(0,G.jsx)(`span`,{className:`agent-toast-file`,children:e.filePath}),(0,G.jsx)(`span`,{className:`agent-toast-preview`,children:r})]})]}),(0,G.jsx)(`button`,{className:`agent-toast-close`,onClick:t,"aria-label":`Dismiss`,children:(0,G.jsx)(AO,{size:14})})]})}var o0=[{id:`nord`,name:`Nord (Main)`,type:`dark`,colors:{bg:`#2e3440`,secondary:`#242933`,accent:`#88c0d0`}},{id:`github-dark`,name:`GitHub Dark`,type:`dark`,colors:{bg:`#0d1117`,secondary:`#161b22`,accent:`#58a6ff`}},{id:`github-dark-dimmed`,name:`GitHub Dark Dimmed`,type:`dark`,colors:{bg:`#22272e`,secondary:`#1c2128`,accent:`#539bf5`}},{id:`github-dark-high-contrast`,name:`GitHub Dark HC`,type:`dark`,colors:{bg:`#0a0c10`,secondary:`#010409`,accent:`#409eff`}},{id:`github-light`,name:`GitHub Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f6f8fa`,accent:`#0969da`}},{id:`github-light-high-contrast`,name:`GitHub Light HC`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f6f8fa`,accent:`#0969da`}},{id:`dracula`,name:`Dracula`,type:`dark`,colors:{bg:`#282a36`,secondary:`#1e1f29`,accent:`#bd93f9`}},{id:`one-dark`,name:`One Dark`,type:`dark`,colors:{bg:`#282c34`,secondary:`#21252b`,accent:`#61afef`}},{id:`synthwave-84`,name:`Synthwave '84`,type:`dark`,colors:{bg:`#2b213a`,secondary:`#241b2f`,accent:`#f92aad`}},{id:`tokyo-night`,name:`Tokyo Night`,type:`dark`,colors:{bg:`#1a1b26`,secondary:`#16161e`,accent:`#7aa2f7`}},{id:`catppuccin-mocha`,name:`Catppuccin Mocha`,type:`dark`,colors:{bg:`#1e1e2e`,secondary:`#181825`,accent:`#cba6f7`}},{id:`catppuccin-frappe`,name:`Catppuccin Frappé`,type:`dark`,colors:{bg:`#303446`,secondary:`#292c3c`,accent:`#ca9ee6`}},{id:`catppuccin-macchiato`,name:`Catppuccin Macchiato`,type:`dark`,colors:{bg:`#24273a`,secondary:`#1e2030`,accent:`#c6a0f6`}},{id:`catppuccin-latte`,name:`Catppuccin Latte`,type:`light`,colors:{bg:`#eff1f5`,secondary:`#e6e9ef`,accent:`#8839ef`}},{id:`solarized-dark`,name:`Solarized Dark`,type:`dark`,colors:{bg:`#002b36`,secondary:`#073642`,accent:`#268bd2`}},{id:`solarized-light`,name:`Solarized Light`,type:`light`,colors:{bg:`#fdf6e3`,secondary:`#eee8d5`,accent:`#268bd2`}},{id:`monokai`,name:`Monokai`,type:`dark`,colors:{bg:`#272822`,secondary:`#1d1e19`,accent:`#f92672`}},{id:`ayu-dark`,name:`Ayu Dark`,type:`dark`,colors:{bg:`#0a0e14`,secondary:`#0d1117`,accent:`#e6b450`}},{id:`ayu-light`,name:`Ayu Light`,type:`light`,colors:{bg:`#fafafa`,secondary:`#f3f3f3`,accent:`#ff9900`}},{id:`nightfox`,name:`Nightfox`,type:`dark`,colors:{bg:`#192330`,secondary:`#131a24`,accent:`#719cd6`}},{id:`nordfox`,name:`Nordfox`,type:`dark`,colors:{bg:`#2e3440`,secondary:`#232831`,accent:`#81a1c1`}},{id:`duskfox`,name:`Duskfox`,type:`dark`,colors:{bg:`#232136`,secondary:`#1d1b2d`,accent:`#86b3b3`}},{id:`terafox`,name:`Terafox`,type:`dark`,colors:{bg:`#152528`,secondary:`#0f1c1e`,accent:`#5a93aa`}},{id:`carbonfox`,name:`Carbonfox`,type:`dark`,colors:{bg:`#161616`,secondary:`#111111`,accent:`#78a9ff`}},{id:`dayfox`,name:`Dayfox`,type:`light`,colors:{bg:`#f6f2ee`,secondary:`#ebe5df`,accent:`#2848a9`}},{id:`dawnfox`,name:`Dawnfox`,type:`light`,colors:{bg:`#eae5e5`,secondary:`#e0d8d8`,accent:`#614d85`}},{id:`andromeeda`,name:`Andromeeda`,type:`dark`,colors:{bg:`#090b10`,secondary:`#0e1117`,accent:`#00e8c6`}},{id:`aurora-x`,name:`Aurora X`,type:`dark`,colors:{bg:`#07090f`,secondary:`#0c0e15`,accent:`#2eb5e5`}},{id:`dark-plus`,name:`Dark+ (VS Code)`,type:`dark`,colors:{bg:`#1e1e1e`,secondary:`#252526`,accent:`#0e639c`}},{id:`light-plus`,name:`Light+ (VS Code)`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f3f3f3`,accent:`#007acc`}},{id:`houston`,name:`Houston (Astro)`,type:`dark`,colors:{bg:`#131415`,secondary:`#17191e`,accent:`#ff5d01`}},{id:`laserwave`,name:`Laserwave`,type:`dark`,colors:{bg:`#1b1d28`,secondary:`#181a23`,accent:`#ffe261`}},{id:`material-theme`,name:`Material Theme`,type:`dark`,colors:{bg:`#263238`,secondary:`#1e272c`,accent:`#80cbd8`}},{id:`material-theme-darker`,name:`Material Darker`,type:`dark`,colors:{bg:`#212121`,secondary:`#1a1a1a`,accent:`#80cbd8`}},{id:`material-theme-lighter`,name:`Material Lighter`,type:`light`,colors:{bg:`#fafafa`,secondary:`#eeeded`,accent:`#80cbd8`}},{id:`material-theme-ocean`,name:`Material Ocean`,type:`dark`,colors:{bg:`#0f111a`,secondary:`#090b10`,accent:`#80cbd8`}},{id:`material-theme-palenight`,name:`Material Palenight`,type:`dark`,colors:{bg:`#292d3e`,secondary:`#202331`,accent:`#80cbd8`}},{id:`min-dark`,name:`Min Dark`,type:`dark`,colors:{bg:`#1f1f1f`,secondary:`#181818`,accent:`#ffffff`}},{id:`min-light`,name:`Min Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#f5f5f5`,accent:`#111111`}},{id:`night-owl`,name:`Night Owl`,type:`dark`,colors:{bg:`#011627`,secondary:`#0b2942`,accent:`#7fdbca`}},{id:`one-light`,name:`One Light`,type:`light`,colors:{bg:`#fafafa`,secondary:`#f0f0f0`,accent:`#40a9ff`}},{id:`plastic`,name:`Plastic`,type:`dark`,colors:{bg:`#21252b`,secondary:`#1b1d23`,accent:`#61afef`}},{id:`poimandres`,name:`Poimandres`,type:`dark`,colors:{bg:`#1b1e28`,secondary:`#171922`,accent:`#50cad2`}},{id:`rose-pine`,name:`Rosé Pine`,type:`dark`,colors:{bg:`#191724`,secondary:`#1f1d2e`,accent:`#c4a7e7`}},{id:`rose-pine-moon`,name:`Rosé Pine Moon`,type:`dark`,colors:{bg:`#232136`,secondary:`#2a283e`,accent:`#c4a7e7`}},{id:`rose-pine-dawn`,name:`Rosé Pine Dawn`,type:`light`,colors:{bg:`#faf4ed`,secondary:`#f2e9e1`,accent:`#907aa9`}},{id:`slack-dark`,name:`Slack Dark`,type:`dark`,colors:{bg:`#1a1d21`,secondary:`#222529`,accent:`#36c5f0`}},{id:`slack-ochre`,name:`Slack Ochre`,type:`dark`,colors:{bg:`#222222`,secondary:`#2b2b2b`,accent:`#e8912d`}},{id:`vesper`,name:`Vesper`,type:`dark`,colors:{bg:`#101010`,secondary:`#161616`,accent:`#ffc600`}},{id:`vitesse-black`,name:`Vitesse Black`,type:`dark`,colors:{bg:`#000000`,secondary:`#0b0b0b`,accent:`#4d9375`}},{id:`vitesse-dark`,name:`Vitesse Dark`,type:`dark`,colors:{bg:`#121212`,secondary:`#181818`,accent:`#4d9375`}},{id:`vitesse-light`,name:`Vitesse Light`,type:`light`,colors:{bg:`#ffffff`,secondary:`#fafafa`,accent:`#1b655f`}}];function s0({open:e,activeTheme:t,onThemeChange:n,onClose:r}){let[i,a]=(0,W.useState)(``),[o,s]=(0,W.useState)(`all`),[c,l]=(0,W.useState)(0),u=(0,W.useRef)(null),d=(0,W.useRef)(null),f=(0,W.useRef)([]);(0,W.useEffect)(()=>{e&&(a(``),s(`all`),l(0),setTimeout(()=>{u.current?.focus()},50))},[e]);let p=(0,W.useMemo)(()=>{let e=i.toLowerCase().trim();return o0.filter(t=>{let n=t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e),r=o===`all`||t.type===o;return n&&r})},[i,o]);return(0,W.useEffect)(()=>{c>=p.length&&l(Math.max(0,p.length-1))},[p,c]),(0,W.useEffect)(()=>{e&&f.current[c]&&f.current[c]?.scrollIntoView({block:`nearest`,behavior:`smooth`})},[c,e]),(0,G.jsx)(PU,{open:e,onClose:r,className:`theme-modal`,ariaLabel:`Theme Selector Modal`,children:(0,G.jsxs)(`div`,{className:`theme-modal-content`,onKeyDown:e=>{let t=p.length;if(e.key===`Escape`){e.preventDefault(),r();return}if(t!==0)switch(e.key){case`ArrowRight`:e.preventDefault(),l(e=>Math.min(e+1,t-1));break;case`ArrowLeft`:e.preventDefault(),l(e=>Math.max(e-1,0));break;case`ArrowDown`:e.preventDefault(),c+2<t?l(c+2):l(t-1);break;case`ArrowUp`:e.preventDefault(),c-2>=0&&l(c-2);break;case`Enter`:e.preventDefault(),p[c]&&(n(p[c].id),r());break;default:break}},children:[(0,G.jsxs)(`div`,{className:`theme-modal-header`,children:[(0,G.jsxs)(`div`,{className:`theme-modal-title-row`,children:[(0,G.jsx)(`h2`,{className:`theme-modal-title`,children:`Select Color Theme`}),(0,G.jsx)(`button`,{className:`theme-modal-close-btn`,onClick:r,"aria-label":`Close`,children:(0,G.jsx)(AO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-search-wrapper`,children:[(0,G.jsx)(xO,{className:`theme-modal-search-icon`,size:16}),(0,G.jsx)(`input`,{ref:u,type:`text`,className:`theme-modal-search-input`,placeholder:`Search themes... (e.g. nordfox, github)`,value:i,onChange:e=>{a(e.target.value),l(0)}}),i&&(0,G.jsx)(`button`,{className:`theme-modal-clear-btn`,onClick:()=>{a(``),l(0),u.current?.focus()},children:(0,G.jsx)(AO,{size:14})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-filters`,children:[(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`all`?`active`:``}`,onClick:()=>{s(`all`),l(0),u.current?.focus()},children:[`All Themes (`,o0.length,`)`]}),(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`dark`?`active`:``}`,onClick:()=>{s(`dark`),l(0),u.current?.focus()},children:[(0,G.jsx)(lO,{size:12,style:{marginRight:`6px`}}),`Dark (`,o0.filter(e=>e.type===`dark`).length,`)`]}),(0,G.jsxs)(`button`,{className:`theme-filter-tab ${o===`light`?`active`:``}`,onClick:()=>{s(`light`),l(0),u.current?.focus()},children:[(0,G.jsx)(CO,{size:12,style:{marginRight:`6px`}}),`Light (`,o0.filter(e=>e.type===`light`).length,`)`]})]})]}),(0,G.jsx)(`div`,{ref:d,className:`theme-modal-list`,children:p.length===0?(0,G.jsxs)(`div`,{className:`theme-modal-empty`,children:[(0,G.jsxs)(`p`,{className:`theme-modal-empty-text`,children:[`No themes matching "`,i,`"`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>{a(``),s(`all`),l(0),u.current?.focus()},children:`Reset Search`})]}):(0,G.jsx)(`div`,{className:`theme-modal-grid`,children:p.map((e,i)=>{let a=t===e.id;return(0,G.jsxs)(`button`,{ref:e=>{f.current[i]=e},type:`button`,className:`theme-modal-card ${a?`active`:``} ${c===i?`focused`:``}`,onClick:()=>{n(e.id),r()},onMouseEnter:()=>l(i),children:[(0,G.jsxs)(`div`,{className:`theme-card-info`,children:[(0,G.jsx)(`span`,{className:`theme-card-name`,children:e.name}),(0,G.jsx)(`span`,{className:`theme-card-meta`,children:e.type===`dark`?(0,G.jsx)(`span`,{className:`theme-meta-tag dark-tag`,children:`Dark`}):(0,G.jsx)(`span`,{className:`theme-meta-tag light-tag`,children:`Light`})})]}),(0,G.jsxs)(`div`,{className:`theme-card-right`,children:[(0,G.jsxs)(`span`,{className:`theme-swatches`,children:[(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.bg},title:`Background`}),(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.secondary},title:`Secondary`}),(0,G.jsx)(`span`,{className:`theme-swatch`,style:{background:e.colors.accent},title:`Accent`})]}),(0,G.jsx)(`span`,{className:`theme-card-status`,children:a&&(0,G.jsx)(jD,{size:14,className:`theme-check-icon`})})]})]},e.id)})})}),(0,G.jsxs)(`div`,{className:`theme-modal-footer`,children:[(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`↑`}),` `,(0,G.jsx)(`kbd`,{children:`↓`}),` `,(0,G.jsx)(`kbd`,{children:`←`}),` `,(0,G.jsx)(`kbd`,{children:`→`}),` Navigate`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`Enter`}),` Select`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`ESC`}),` Close`]})]})]})})}var c0=`Cascadia Code.Cascadia Mono.Consolas.Courier New.Dank Mono.Fantasque Sans Mono.Fira Code.Fira Mono.Geist Mono.Hack.IBM Plex Mono.Inconsolata.Input Mono.JetBrains Mono.Maple Mono.Menlo.Monaco.Monoid.Monaspace Argon.Monaspace Krypton.Monaspace Neon.Monaspace Radon.Monaspace Xenon.Noto Sans Mono.Operator Mono.Roboto Mono.SF Mono.Source Code Pro.Space Mono.Ubuntu Mono.Victor Mono`.split(`.`);async function l0(){if(`queryLocalFonts`in window)try{let e=await window.queryLocalFonts();return[...new Set(e.map(e=>e.family))].sort((e,t)=>e.localeCompare(t))}catch{}return c0}function u0({open:e,title:t,defaultLabel:n,activeFont:r,onFontChange:i,onClose:a}){let[o,s]=(0,W.useState)(``),[c,l]=(0,W.useState)([]),[u,d]=(0,W.useState)(!1),[f,p]=(0,W.useState)(0),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)([]);(0,W.useEffect)(()=>{e&&(s(``),p(0),setTimeout(()=>m.current?.focus(),50),!(c.length>0)&&(d(!0),l0().then(e=>{l(e),d(!1)})))},[e]);let _=(0,W.useMemo)(()=>{let e=o.toLowerCase().trim();return e?c.filter(t=>t.toLowerCase().includes(e)):c},[c,o]),v=_.length+1;(0,W.useEffect)(()=>{f>=v&&p(Math.max(0,v-1))},[v,f]),(0,W.useEffect)(()=>{e&&(f===0?g.current[0]:g.current[f])?.scrollIntoView({block:`nearest`,behavior:`smooth`})},[f,e]);let y=e=>{i(e),a()},b=e=>{if(e.key===`Escape`){e.preventDefault(),a();return}if(v!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),p(e=>Math.min(e+1,v-1));break;case`ArrowUp`:e.preventDefault(),p(e=>Math.max(e-1,0));break;case`Enter`:e.preventDefault(),f===0?y(null):_[f-1]&&y(_[f-1]);break}},x=!r;return(0,G.jsx)(PU,{open:e,onClose:a,className:`theme-modal`,ariaLabel:`${t} Modal`,children:(0,G.jsxs)(`div`,{className:`theme-modal-content`,onKeyDown:b,children:[(0,G.jsxs)(`div`,{className:`theme-modal-header`,children:[(0,G.jsxs)(`div`,{className:`theme-modal-title-row`,children:[(0,G.jsx)(`h2`,{className:`theme-modal-title`,children:t}),(0,G.jsx)(`button`,{className:`theme-modal-close-btn`,onClick:a,"aria-label":`Close`,children:(0,G.jsx)(AO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`theme-modal-search-wrapper`,children:[(0,G.jsx)(xO,{className:`theme-modal-search-icon`,size:16}),(0,G.jsx)(`input`,{ref:m,type:`text`,className:`theme-modal-search-input`,placeholder:`Search fonts...`,value:o,onChange:e=>{s(e.target.value),p(0)}}),o&&(0,G.jsx)(`button`,{className:`theme-modal-clear-btn`,onClick:()=>{s(``),p(0),m.current?.focus()},children:(0,G.jsx)(AO,{size:14})})]})]}),(0,G.jsx)(`div`,{ref:h,className:`theme-modal-list`,children:u?(0,G.jsx)(`div`,{className:`theme-modal-empty`,children:(0,G.jsx)(`p`,{className:`theme-modal-empty-text`,children:`Loading fonts…`})}):(0,G.jsxs)(`div`,{className:`font-picker-list`,children:[(0,G.jsxs)(`button`,{ref:e=>{g.current[0]=e},type:`button`,className:`font-picker-item ${x?`active`:``} ${f===0?`focused`:``}`,onClick:()=>y(null),onMouseEnter:()=>p(0),children:[(0,G.jsxs)(`span`,{className:`font-picker-name font-picker-default-name`,children:[(0,G.jsx)(DO,{size:13,style:{marginRight:`6px`,opacity:.6}}),n]}),(0,G.jsx)(`span`,{className:`font-picker-status`,children:x&&(0,G.jsx)(jD,{size:14,className:`theme-check-icon`})})]},`__default__`),_.length===0&&o?(0,G.jsxs)(`div`,{className:`theme-modal-empty`,style:{paddingTop:`16px`},children:[(0,G.jsxs)(`p`,{className:`theme-modal-empty-text`,children:[`No fonts matching "`,o,`"`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>{s(``),p(0),m.current?.focus()},children:`Reset Search`})]}):_.map((e,t)=>{let n=r===e,i=f===t+1;return(0,G.jsxs)(`button`,{ref:e=>{g.current[t+1]=e},type:`button`,className:`font-picker-item ${n?`active`:``} ${i?`focused`:``}`,onClick:()=>y(e),onMouseEnter:()=>p(t+1),children:[(0,G.jsx)(`span`,{className:`font-picker-name`,style:{fontFamily:`"${e}", ui-monospace, monospace`},children:e}),(0,G.jsx)(`span`,{className:`font-picker-status`,children:n&&(0,G.jsx)(jD,{size:14,className:`theme-check-icon`})})]},e)})]})}),(0,G.jsxs)(`div`,{className:`theme-modal-footer`,children:[(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`↑`}),` `,(0,G.jsx)(`kbd`,{children:`↓`}),` Navigate`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`Enter`}),` Select`]}),(0,G.jsxs)(`span`,{className:`theme-footer-item`,children:[(0,G.jsx)(`kbd`,{children:`ESC`}),` Close`]})]})]})})}function d0(){let e=Am(),{settings:t,loaded:n,updateSettings:r}=IE(),[,i]=(0,W.useTransition)(),{patch:a,repoName:o,branch:s,customMode:c,showMode:l,commits:u,truncated:d,binaryFiles:f,tabSizeMap:p,untrackedFiles:m,loading:h,refreshing:g,error:_}=gE({staged:t.staged,untracked:t.untracked},!0),{comments:v,addComment:y,removeComment:b,resolveComment:x,unresolveComment:S,addReply:C,editComment:w,editReply:T,removeReply:E,copyAllComments:D,agentActivity:O,clearAgentActivity:k,sendToAgent:A,sending:j,agentWaiting:M}=xE(),{plans:N}=wE(),P=(0,W.useMemo)(()=>N.filter(e=>e.decision===`pending`).length,[N]),{status:F,refresh:I}=ME(a),[L,R]=(0,W.useState)(null),[z,ee]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[te,B]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}}),V=(0,W.useRef)(te);V.current=te;let H=(0,W.useRef)(null),ne=(0,W.useRef)(null),re=(0,W.useRef)(null),ie=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=V.current,r=ne.current,i=re.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),B(o);try{gD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),[ae,oe]=(0,W.useState)({open:!1,scope:`files`}),se=(0,W.useCallback)(e=>oe({open:!0,scope:e}),[]),ce=(0,W.useCallback)(()=>oe(e=>({...e,open:!1})),[]),[le,ue]=(0,W.useState)(!1),[U,de]=(0,W.useState)(!1),[fe,pe]=(0,W.useState)(!1),[me,he]=(0,W.useState)(!1),[ge,_e]=(0,W.useState)(()=>{try{let e=fD(`diffing-comment-panel-height`);return e?Number(e):220}catch{return 220}}),ve=(0,W.useRef)(ge);ve.current=ge;let ye=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientY,n=ve.current,r=H.current,i=n,a=0,o=()=>{a=0,r?.style.setProperty(`--comment-panel-height`,`${i}px`)},s=e=>{let r=t-e.clientY;i=Math.max(100,Math.min(600,n+r)),a||=requestAnimationFrame(o)},c=()=>{a&&cancelAnimationFrame(a),_e(i);try{gD(`diffing-comment-panel-height`,String(i))}catch{}document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c),document.body.style.cursor=`row-resize`,document.body.style.userSelect=`none`},[]);(0,W.useEffect)(()=>{try{gD(`diffing-comment-panel-height`,String(ge))}catch{}},[ge]);let{viewedFiles:be,setViewed:xe}=BE(),Se=(0,W.useRef)(null);un([`G`,`S`],()=>se(`symbols`)),un([`G`,`F`],()=>se(`all`)),un([`G`,`V`],()=>se(`files`)),(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`k`||e.key===`K`)&&(e.preventDefault(),oe(e=>e.open?{...e,open:!1}:{open:!0,scope:`all`}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,W.useEffect)(()=>{try{gD(`diffing-sidebar-collapsed`,String(z))}catch{}},[z]);let Ce=(0,W.useMemo)(()=>new Set(m),[m]),we=(0,W.useRef)([]),Te=(0,W.useMemo)(()=>{if(!a)return[];try{let e=Pg(a).flatMap(e=>e.files),t=new Set(e.map(e=>e.name));for(let n of f)if(!t.has(n.path)){let t={name:n.path,type:n.type===`added`||n.type===`untracked`?`new`:n.type===`deleted`?`deleted`:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:!0,deletionLines:[],additionLines:[]};e.push(t)}let n=e.map(e=>{let t=we.current.find(t=>t.name===e.name);return t&&t.type===e.type&&t.isPartial===e.isPartial&&t.deletionLines.length===e.deletionLines.length&&t.additionLines.length===e.additionLines.length&&JSON.stringify(t.hunks)===JSON.stringify(e.hunks)?t:e});return we.current=n,n}catch{return[]}},[a,f]),Ee=vD(Te),De=(0,W.useMemo)(()=>{if(!a)return{additions:0,deletions:0};let e=0,t=0,n=0,r=a.length;for(;n<r;){let i=a.indexOf(`
|
|
3861
|
+
`,n);i===-1&&(i=r);let o=a.charCodeAt(n);o===43?n+2<r&&a.charCodeAt(n+1)===43&&a.charCodeAt(n+2)===43||e++:o===45&&(n+2<r&&a.charCodeAt(n+1)===45&&a.charCodeAt(n+2)===45||t++),n=i+1}return{additions:e,deletions:t}},[a]),Oe=(0,W.useMemo)(()=>{let e=new Map;for(let t of f)e.set(t.path,t);return e},[f]),ke=(0,W.useMemo)(()=>{let e={};for(let t of v)e[t.filePath]=(e[t.filePath]??0)+1;return e},[v]),Ae=(0,W.useRef)(new Map),je=(0,W.useMemo)(()=>{let e=new Map,t=new Map;for(let e of v){let n=t.get(e.filePath);n||(n=[],t.set(e.filePath,n)),n.push(e)}for(let[n,r]of t){let t=r.map(e=>({side:e.side,lineNumber:e.lineNumber,metadata:e})),i=Ae.current.get(n);i&&JSON.stringify(i)===JSON.stringify(t)?e.set(n,i):e.set(n,t)}return Ae.current=e,e},[v]),Me=(0,W.useCallback)(e=>{R(e);let t=document.getElementById(`file-${e}`);t&&t.scrollIntoView({block:`start`})},[]),Ne=(0,W.useCallback)((e,t)=>{xe(e,t)},[xe]),Pe=(0,W.useCallback)(e=>{i(()=>{r({diffStyle:e})})},[r]),Fe=(0,W.useCallback)(e=>{i(()=>{r(e)})},[r]),Ie=(0,W.useCallback)(e=>{i(()=>{r({defaultTabSize:e})})},[r]),Le=(0,W.useCallback)(e=>{i(()=>{r({browser:e})})},[r]),Re=(0,W.useCallback)(e=>{i(()=>{r({theme:e})})},[r]),ze=(0,W.useCallback)(e=>{i(()=>{r({editorIDE:e})})},[r]),Be=(0,W.useCallback)(e=>{i(()=>{r({lineDiffType:e})})},[r]),Ve=(0,W.useCallback)(e=>{i(()=>{r({lineWrap:e})})},[r]),He=(0,W.useCallback)(e=>{i(()=>{r({diffIndicators:e})})},[r]),Ue=(0,W.useCallback)(e=>{i(()=>{r({showLineNumbers:e})})},[r]),We=(0,W.useCallback)(e=>{i(()=>{r({hunkSeparators:e})})},[r]),Ge=(0,W.useCallback)(e=>{i(()=>{r({lineHoverHighlight:e})})},[r]),Ke=(0,W.useCallback)(e=>{i(()=>{r({fontSize:e})})},[r]),qe=(0,W.useCallback)(e=>{r({haptics:e})},[r]),Je=(0,W.useCallback)(e=>{r({sounds:e})},[r]),Ye=(0,W.useCallback)(e=>{r({uiFont:e})},[r]),Xe=(0,W.useCallback)(e=>{r({monoFont:e})},[r]),Ze=(0,W.useCallback)(()=>{Ve(!t.lineWrap)},[t.lineWrap,Ve]),Qe=(0,W.useCallback)(()=>{Ue(!t.showLineNumbers)},[t.showLineNumbers,Ue]),$e=(0,W.useCallback)(()=>{let e=[`classic`,`bars`,`none`],n=t.diffIndicators||`classic`,r=e[(e.indexOf(n)+1)%e.length];He(r)},[t.diffIndicators,He]),et=(0,W.useCallback)(()=>{let e=[`word`,`word-alt`,`char`,`none`],n=t.lineDiffType||`word`,r=e[(e.indexOf(n)+1)%e.length];Be(r)},[t.lineDiffType,Be]),tt=(0,W.useCallback)(()=>{ee(e=>!e)},[]),nt=(0,W.useCallback)(e=>{if(Te.length===0)return;let t=0;if(L){let n=Te.findIndex(e=>e.name===L);n!==-1&&(t=e===`next`?Math.min(n+1,Te.length-1):Math.max(n-1,0))}let n=Te[t].name;R(n);let r=document.getElementById(`file-${n}`);r&&r.scrollIntoView({block:`start`})},[Te,L,R]),rt=(0,W.useCallback)(()=>{L&&xe(L,!be.has(L))},[L,be,xe]),it=(0,W.useCallback)(()=>{Pe(t.diffStyle===`split`?`unified`:`split`)},[t.diffStyle,Pe]),at=(0,W.useCallback)(()=>{let e=[2,4,8],n=t.defaultTabSize||4;Ie(e[(e.indexOf(n)+1)%e.length])},[t.defaultTabSize,Ie]),ot=(0,W.useCallback)(()=>{tt()},[tt]);(0,W.useEffect)(()=>{let e=``,t,n=0,r=r=>{let i=document.activeElement;if(i){let e=i.tagName.toLowerCase();if(e===`input`||e===`textarea`||i.hasAttribute(`contenteditable`))return}clearTimeout(t);let a=r.key;if(r.ctrlKey){a===`d`?(r.preventDefault(),window.scrollBy({top:window.innerHeight/2,behavior:`auto`}),sD(`selection`,`navigate`),e=``):a===`u`&&(r.preventDefault(),window.scrollBy({top:-window.innerHeight/2,behavior:`auto`}),sD(`selection`,`navigate`),e=``);return}if(!(a.length>1&&a!==`Escape`&&a!==`Enter`))if(e+=a,t=setTimeout(()=>{e=``},800),e===`j`){r.preventDefault(),window.scrollBy({top:100,behavior:`auto`});let t=Date.now();t-n>80&&(aD(`navigate`),n=t),e=``}else if(e===`k`){r.preventDefault(),window.scrollBy({top:-100,behavior:`auto`});let t=Date.now();t-n>80&&(aD(`navigate`),n=t),e=``}else e===`gg`?(r.preventDefault(),window.scrollTo({top:0,behavior:`auto`}),sD(`selection`,`navigate`),e=``):e===`G`?(r.preventDefault(),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`auto`}),sD(`selection`,`navigate`),e=``):e===`J`?(r.preventDefault(),nt(`next`),sD(`selection`,`navigate`),e=``):e===`K`?(r.preventDefault(),nt(`prev`),sD(`selection`,`navigate`),e=``):e===`v`?(r.preventDefault(),rt(),sD(`selection`,`toggle`),e=``):e===`m`?(r.preventDefault(),it(),sD(`selection`,`toggle`),e=``):e===`t`?(r.preventDefault(),at(),sD(`selection`,`toggle`),e=``):e===`b`?(r.preventDefault(),ot(),sD(`selection`,`toggle`),e=``):e===`w`?(r.preventDefault(),Ze(),sD(`selection`,`toggle`),e=``):e===`n`?(r.preventDefault(),Qe(),sD(`selection`,`toggle`),e=``):e===`i`?(r.preventDefault(),$e(),sD(`selection`,`toggle`),e=``):e===`I`?(r.preventDefault(),et(),sD(`selection`,`toggle`),e=``):e===`/`?(r.preventDefault(),se(`text`),sD(`medium`,`open`),e=``):e===`s`?(r.preventDefault(),se(`symbols`),sD(`medium`,`open`),e=``):e===`gv`?(r.preventDefault(),se(`files`),sD(`medium`,`open`),e=``):e===`gt`?(r.preventDefault(),de(!0),sD(`medium`,`open`),e=``):e===`?`?(r.preventDefault(),ue(!0),sD(`medium`,`open`),e=``):e.length>=2&&(e=``)};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r),clearTimeout(t)}},[Te,L,be,t.diffStyle,t.defaultTabSize,nt,rt,it,at,ot,Ze,Qe,$e,et,de]);let st=(0,W.useMemo)(()=>({staged:t.staged,untracked:t.untracked}),[t.staged,t.untracked]);(0,W.useEffect)(()=>{let e=t.theme||`nord`,n=document.documentElement;n.classList.add(`theme-switching`),n.setAttribute(`data-theme`,e);let r=requestAnimationFrame(()=>{requestAnimationFrame(()=>n.classList.remove(`theme-switching`))});return()=>cancelAnimationFrame(r)},[t.theme]),LE(n,t.uiFont,t.monoFont);let ct=(0,W.useMemo)(()=>FE(t.monoFont),[t.monoFont]),lt=(0,W.useMemo)(()=>nE[t.theme||`nord`]||nE.nord,[t.theme]);return(0,W.useEffect)(()=>{e&&e.setRenderOptions({theme:{dark:lt.type===`dark`?lt.themeName:`nord`,light:lt.type===`light`?lt.themeName:`github-light`}}).catch(e=>{console.error(`Failed to set worker pool render options:`,e)})},[e,lt]),(0,W.useEffect)(()=>{let e=lt.type===`dark`?lt.themeName:`nord`,t=lt.type===`light`?lt.themeName:`github-light`;Uf({themes:Array.from(new Set([e,t])),langs:[]}).catch(()=>{})},[lt]),h?(0,G.jsxs)(`div`,{className:`app skeleton-app`,style:{"--sidebar-width":`${te}px`,"--comment-panel-height":`${ge}px`},children:[(0,G.jsxs)(`header`,{className:`skeleton-toolbar`,children:[(0,G.jsx)(`div`,{className:`skeleton-item skeleton-logo`}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-stats`}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-actions`})]}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{className:`sidebar skeleton-sidebar ${z?`sidebar-collapsed`:``}`,children:!z&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`skeleton-search`}),(0,G.jsx)(`div`,{className:`skeleton-tree-nodes`,children:Array.from({length:8}).map((e,t)=>(0,G.jsxs)(`div`,{className:`skeleton-tree-node`,style:{paddingLeft:`${t%3*16+16}px`},children:[(0,G.jsx)(`div`,{className:`skeleton-node-icon`}),(0,G.jsx)(`div`,{className:`skeleton-node-text`,style:{width:`${60+t*12%60}px`}})]},t))})]})}),!z&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,style:{cursor:`default`}}),(0,G.jsx)(`main`,{className:`main skeleton-main`,children:(0,G.jsx)(`div`,{className:`diff-viewer`,children:Array.from({length:3}).map((e,t)=>(0,G.jsxs)(`div`,{className:`file-diff-card skeleton-card`,children:[(0,G.jsxs)(`div`,{className:`skeleton-card-header`,children:[(0,G.jsx)(`div`,{className:`skeleton-card-title`,style:{width:`${120+t*45%150}px`}}),(0,G.jsx)(`div`,{className:`skeleton-card-badge`})]}),(0,G.jsx)(`div`,{className:`skeleton-card-body`,children:Array.from({length:5}).map((e,t)=>(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`${50+t*15%45}%`}},t))})]},t))})})]})]}):_?(0,G.jsx)(`div`,{className:`error`,children:(0,G.jsxs)(`p`,{children:[`Error: `,_]})}):(0,G.jsx)(cD,{enabled:t.haptics??!0,soundsEnabled:t.sounds??!0,children:(0,G.jsxs)(`div`,{className:`app`,ref:H,style:{"--sidebar-width":`${te}px`,"--comment-panel-height":`${ge}px`},children:[g&&(0,G.jsx)(`div`,{className:`refresh-bar`,role:`status`,"aria-label":`Refreshing diff`}),(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:re,"aria-hidden":`true`}),(0,G.jsx)(hU,{repoName:o,branch:s,fileCount:Te.length,additions:De.additions,deletions:De.deletions,commentCount:v.length,planCount:N.length,pendingPlanCount:P,onOpenPlans:()=>DE(`/plan`),diffStyle:t.diffStyle,diffOptions:st,defaultTabSize:t.defaultTabSize,browser:t.browser,theme:t.theme||`nord`,editorIDE:t.editorIDE,customMode:c,showMode:l,showCommitCount:u.length,lineDiffType:t.lineDiffType,lineWrap:t.lineWrap,diffIndicators:t.diffIndicators,showLineNumbers:t.showLineNumbers,hunkSeparators:t.hunkSeparators,lineHoverHighlight:t.lineHoverHighlight,fontSize:t.fontSize,haptics:t.haptics??!0,sounds:t.sounds??!0,uiFont:t.uiFont,monoFont:t.monoFont,sidebarCollapsed:z,onToggleSidebar:tt,onDiffStyleChange:Pe,onDiffOptionsChange:Fe,onDefaultTabSizeChange:Ie,onBrowserChange:Le,onOpenThemeModal:()=>de(!0),onEditorIDEChange:ze,onLineDiffTypeChange:Be,onLineWrapChange:Ve,onDiffIndicatorsChange:He,onShowLineNumbersChange:Ue,onHunkSeparatorsChange:We,onLineHoverHighlightChange:Ge,onFontSizeChange:Ke,onHapticsChange:qe,onSoundsChange:Je,onOpenUiFontModal:()=>pe(!0),onOpenMonoFontModal:()=>he(!0),onOpenSearch:()=>se(`all`),onCopyComments:D,onSendToAgent:A,agentWaiting:M,sending:j,comments:v,onEditComment:w,onDeleteComment:b}),!z&&(0,G.jsx)(`div`,{className:`sidebar-mobile-backdrop`,onClick:tt,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsxs)(`aside`,{ref:ne,className:`sidebar ${z?`sidebar-collapsed`:``}`,children:[(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`hidden`},children:(0,G.jsx)(y1,{files:Te,activeFile:L,commentCounts:ke,viewedFiles:be,untrackedFiles:Ce,onFileClick:Me,collapsed:z,onToggleCollapse:tt})}),!z&&v.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`ct-resize-handle`,onMouseDown:ye,role:`separator`,"aria-label":`Resize comments panel`,"aria-orientation":`horizontal`,tabIndex:0}),(0,G.jsx)(`div`,{className:`ct-wrapper`,style:{flexShrink:0},children:(0,G.jsx)(S1,{comments:v,resolveComment:x,unresolveComment:S,removeComment:b,addReply:C,editComment:w,editReply:T,removeReply:E})})]})]}),!z&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:ie,role:`separator`,"aria-label":`Resize sidebar`,"aria-orientation":`vertical`,tabIndex:0}),(0,G.jsxs)(`main`,{className:`main`,ref:Se,children:[l&&u.length>0&&(0,G.jsxs)(`div`,{className:`commit-banner-stack`,role:`list`,children:[u.map((e,t)=>(0,G.jsx)(gU,{commit:e,index:t,total:u.length},e.sha)),d>0&&(0,G.jsxs)(`div`,{className:`commit-banner-truncated`,role:`status`,children:[`+ `,d,` more commit`,d===1?``:`s`,` not shown`]})]}),F.inMerge&&F.conflicts.length>0&&(0,G.jsxs)(`div`,{className:`merge-conflict-banner`,children:[(0,G.jsx)(`strong`,{children:`Merge in progress`}),(0,G.jsxs)(`span`,{children:[F.conflicts.length,` unresolved file`,F.conflicts.length===1?``:`s`,` below. Use the inline buttons to accept current/incoming/both, then "Save & stage".`]})]}),F.conflicts.map(e=>(0,G.jsx)(aW,{filePath:e,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:ct,tabSize:p[e]??t.defaultTabSize,onSaved:()=>{I()}},e)),(0,G.jsx)(rW,{files:Te,diffStyle:t.diffStyle,tabSizeMap:p,defaultTabSize:t.defaultTabSize,viewedFiles:be,binaryFiles:Oe,theme:t.theme||`nord`,editorIDE:t.editorIDE,lineDiffType:t.lineDiffType,lineWrap:t.lineWrap,diffIndicators:t.diffIndicators,showLineNumbers:t.showLineNumbers,hunkSeparators:t.hunkSeparators,lineHoverHighlight:t.lineHoverHighlight,fontSize:t.fontSize,monoFontFamily:ct,expandContextByDefault:t.expandContextByDefault,collapsedContextThreshold:t.collapsedContextThreshold,expansionLineCount:t.expansionLineCount,onViewedChange:Ne,fileAnnotationsMap:je,onAddComment:y,onDeleteComment:b})]})]}),(0,G.jsx)(Y1,{isOpen:ae.open,onClose:ce,initialScope:ae.scope,files:Te,changedEntries:Ee,customMode:c,staged:t.staged,onNavigateFile:Me,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:ct,defaultTabSize:t.defaultTabSize,lineWrap:t.lineWrap,showLineNumbers:t.showLineNumbers,lineHoverHighlight:t.lineHoverHighlight}),(0,G.jsx)(r0,{activeFile:L,onShowHelp:()=>ue(!0)}),(0,G.jsx)(i0,{isOpen:le,onClose:()=>ue(!1)}),(0,G.jsx)(s0,{open:U,activeTheme:t.theme||`nord`,onThemeChange:Re,onClose:()=>de(!1)}),(0,G.jsx)(u0,{open:fe,title:`Select UI Font`,defaultLabel:`Default (Geist Mono, from CDN)`,activeFont:t.uiFont,onFontChange:Ye,onClose:()=>pe(!1)}),(0,G.jsx)(u0,{open:me,title:`Select Code Font`,defaultLabel:`Default (JetBrains Mono, from CDN)`,activeFont:t.monoFont,onFontChange:Xe,onClose:()=>he(!1)}),(0,G.jsx)(a0,{activity:O,onDismiss:k,onJump:Me})]})})}function f0(e,t){if(t<1)return;let n=e.split(`
|
|
3862
|
+
`),r=Math.min(t,n.length);for(let e=r-1;e>=0;e--){let t=/^\s{0,3}(#{1,6})\s+(.*?)\s*#*\s*$/.exec(n[e]);if(t)return t[2].trim()}}function p0(e,t,n){if(t<1)return``;let r=e.split(`
|
|
3863
3863
|
`),i=Math.max(1,t),a=Math.min(n,r.length);return a<i?``:r.slice(i-1,a).join(`
|
|
3864
|
-
`)}function g0({role:e,size:t=16}){return e===`agent`?(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-agent`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(MD,{size:t,"aria-hidden":`true`})}):(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-user`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(jO,{size:t,"aria-hidden":`true`})})}function _0({comment:e,onResolve:t,onUnresolve:n,onDelete:r,onEdit:i,onReply:a,onEditReply:o,onDeleteReply:s}){let[,c]=(0,W.useState)(0),l=e.status===`resolved`,[u,d]=(0,W.useState)(l),[f,p]=(0,W.useState)(!1),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(null);(0,W.useEffect)(()=>d(e.status===`resolved`),[e.status]),(0,W.useEffect)(()=>{let e=setInterval(()=>c(e=>e+1),3e4);return()=>clearInterval(e)},[]);let b=e.lineNumber===0,x=e.startLineNumber&&e.startLineNumber!==e.lineNumber,S=(0,G.jsxs)(G.Fragment,{children:[e.sectionTitle&&(0,G.jsxs)(`span`,{className:`plan-comment-section-chip`,title:`Section: ${e.sectionTitle}`,children:[`§\xA0`,e.sectionTitle]}),b?(0,G.jsx)(`span`,{className:`plan-comment-line-chip plan-comment-line-chip-general`,children:`Whole plan`}):(0,G.jsx)(`span`,{className:`plan-comment-line-chip`,children:x?`L${e.startLineNumber}-${e.lineNumber}`:`L${e.lineNumber}`})]});return l&&u?(0,G.jsxs)(`div`,{className:`comment-resolved-collapsed plan-comment-resolved-collapsed`,children:[(0,G.jsxs)(`div`,{className:`plan-comment-resolved-left`,children:[(0,G.jsx)(zD,{size:15,style:{color:`var(--success)`}}),(0,G.jsx)(`span`,{style:{fontWeight:600},children:`Resolved`}),S,(0,G.jsx)(`span`,{children:`•`}),(0,G.jsx)(`span`,{children:e.replies?.length?`${e.replies.length+1} comments`:`1 comment`})]}),(0,G.jsx)(`button`,{className:`plan-comment-show-resolved`,onClick:()=>d(!1),children:`Show`})]}):(0,G.jsxs)(`div`,{className:`comment-bubble-canvas ${l?`comment-bubble-canvas-resolved`:``}`,id:`plan-comment-${e.id}`,role:`article`,children:[(0,G.jsxs)(`div`,{className:`comment-node ${l?`comment-node-resolved`:``}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(g0,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),S]}),l&&(0,G.jsxs)(`span`,{className:`comment-canvas-resolved-banner`,style:{marginLeft:`8px`},children:[(0,G.jsx)(zD,{size:13}),`Resolved`]}),!l&&!m&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>h(!0),title:`Edit comment`,"aria-label":`Edit comment`,children:(0,G.jsx)(_O,{size:13,"aria-hidden":`true`})}),g?(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsxs)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:r,title:`Confirm delete`,style:{color:`var(--danger)`,background:`var(--feedback-danger-bg)`,fontWeight:600,fontSize:`11px`,border:`1px solid var(--feedback-danger-border)`,padding:`2px 6px`,width:`auto`,height:`auto`,display:`flex`,alignItems:`center`,gap:`2px`},children:[(0,G.jsx)(OO,{size:11}),`Delete?`]}),(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>_(!1),title:`Cancel delete`,style:{fontSize:`11px`,padding:`2px 6px`,width:`auto`,height:`auto`},children:`Cancel`})]}):(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>_(!0),title:`Delete comment`,"aria-label":`Delete comment`,children:(0,G.jsx)(DO,{size:13,"aria-hidden":`true`})})]})]}),m?(0,G.jsx)(`div`,{style:{marginTop:`8px`},children:(0,G.jsx)(JU,{draftKey:`plan-edit:${e.id}`,initialBody:e.body,lineContent:e.lineContent,onSubmit:e=>{i(e),h(!1)},onCancel:()=>h(!1)})}):(0,G.jsx)(XH,{content:e.body,className:`comment-node-body markdown-body ${l?`comment-resolved-line`:``}`})]})]}),e.replies?.length>0&&(0,G.jsx)(`div`,{className:`comment-replies`,role:`list`,"aria-label":`Replies`,children:e.replies.map((t,n)=>{let r=t.role===`agent`,i=v===t.id;return(0,G.jsxs)(`div`,{className:`comment-node ${r?`comment-node-agent`:`comment-node-user`} ${l?`comment-node-resolved`:``}`,role:`listitem`,"aria-label":`${r?`Agent`:`User`} reply ${n+1}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(g0,{role:r?`agent`:`user`,size:14})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:r?`Agent`:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge ${r?`comment-node-badge-agent`:`comment-node-badge-user`}`,children:r?`Agent`:`User`}),r&&t.model&&(0,G.jsx)(`span`,{style:{fontSize:`10px`,fontWeight:600,padding:`1px 5px`,borderRadius:`4px`,background:`var(--bg-tertiary)`,color:`var(--text-secondary)`,fontFamily:`var(--font-mono)`},children:t.model}),(0,G.jsx)(`span`,{className:`comment-node-time`,children:eE(t.createdAt)}),!l&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>y(t.id),title:`Edit reply`,"aria-label":`Edit reply`,children:(0,G.jsx)(_O,{size:12,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>s(t.id),title:`Delete reply`,"aria-label":`Delete reply`,children:(0,G.jsx)(DO,{size:12,"aria-hidden":`true`})})]})]}),i?(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`6px`},children:(0,G.jsx)(JU,{draftKey:`plan-reply-edit:${e.id}:${t.id}`,initialBody:t.body,onSubmit:e=>{o(t.id,e),y(null)},onCancel:()=>y(null)})}):(0,G.jsx)(XH,{content:t.body,className:`comment-node-body markdown-body`})]})]},t.id)})}),(0,G.jsxs)(`div`,{className:`comment-canvas-footer`,children:[!f&&(0,G.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,G.jsxs)(`button`,{onClick:()=>p(!0),className:`comment-reply-trigger`,style:{width:`100%`,maxWidth:`320px`},children:[(0,G.jsx)(bO,{size:14,"aria-hidden":`true`}),`Reply...`]}),l?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,marginLeft:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:()=>d(!0),style:{fontSize:`12px`,padding:`4px 10px`},children:`Hide`}),(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:n,style:{fontSize:`12px`,padding:`4px 10px`},children:`Unresolve`})]}):(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:t,style:{fontSize:`12px`,padding:`4px 10px`,marginLeft:`12px`},children:`Resolve`})]}),f&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`4px`},children:(0,G.jsx)(JU,{draftKey:`plan-reply:${e.id}`,onSubmit:e=>{a(e),p(!1)},onCancel:()=>p(!1)})})]})]})}var v0=(0,W.memo)(function({isOpen:e,filePath:t,onClose:n}){let{data:r,isLoading:i,error:a}=j1(t),o=t?t.split(`/`).pop():``;return(0,G.jsxs)(IU,{open:e,onClose:n,className:`shortcuts-modal file-preview-modal`,ariaLabel:`File preview`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(YD,{size:18,className:`shortcuts-icon`}),(0,G.jsxs)(`h2`,{children:[`Preview: `,o]}),(0,G.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--text-muted)`,marginLeft:`8px`},children:t})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:n,"aria-label":`Close dialog`,children:(0,G.jsx)(MO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,style:{maxHeight:`60vh`,display:`flex`,flexDirection:`column`},children:[i&&(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`40px`,gap:`8px`,color:`var(--text-muted)`},children:[(0,G.jsx)(iO,{size:16,className:`spin`}),(0,G.jsx)(`span`,{children:`Loading file content...`})]}),a&&(0,G.jsxs)(`div`,{style:{padding:`20px`,color:`var(--danger)`,background:`var(--feedback-danger-bg)`,borderRadius:`6px`},children:[`Failed to load file: `,a.message||String(a)]}),r&&(0,G.jsx)(`div`,{style:{flex:1,overflow:`auto`,background:`var(--bg-secondary)`,borderRadius:`6px`,border:`1px solid var(--border-normal)`},children:r.binary?(0,G.jsx)(`div`,{style:{padding:`40px`,textAlign:`center`,color:`var(--text-muted)`},children:`Binary file cannot be previewed.`}):r.missing?(0,G.jsx)(`div`,{style:{padding:`40px`,textAlign:`center`,color:`var(--text-muted)`},children:`File does not exist or has been deleted.`}):(0,G.jsx)(`pre`,{style:{margin:0,padding:`16px`,fontFamily:`var(--font-mono)`,fontSize:`13px`,lineHeight:`1.6`,overflowX:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-all`},children:(0,G.jsx)(`code`,{children:r.content})})})]}),(0,G.jsx)(`div`,{className:`shortcuts-footer`,style:{justifyContent:`flex-end`},children:(0,G.jsx)(`button`,{className:`btn btn-sm btn-primary`,onClick:n,children:`Close Preview`})})]})}),y0={pending:{label:`Pending review`,className:`plan-badge-pending`,icon:UD},approved:{label:`Approved`,className:`plan-badge-approved`,icon:ND},"changes-requested":{label:`Changes requested`,className:`plan-badge-changes`,icon:lO},rejected:{label:`Rejected`,className:`plan-badge-rejected`,icon:MO},"comment-only":{label:`Comment only`,className:`plan-badge-comment-only`,icon:uO}};function b0({plan:e,theme:t,fontSize:n,monoFontFamily:r,defaultTabSize:i,lineWrap:a,showLineNumbers:o,lineHoverHighlight:s,viewMode:c}){let{addPlanComment:l,editPlanComment:u,resolvePlanComment:d,unresolvePlanComment:f,removePlanComment:p,addPlanReply:m,editPlanReply:h,removePlanReply:g,submitDecision:_,submitting:v,agentWaiting:y}=wE(),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(null),[w,T]=(0,W.useState)(0),[E,D]=(0,W.useState)(null),O=e.versions??[],[k,A]=(0,W.useState)(e.version),[j,M]=(0,W.useState)(e.body),[N,P]=(0,W.useState)(e.title),F=(0,W.useRef)(e.version);(0,W.useEffect)(()=>{let t=k===F.current;e.version!==F.current&&t&&A(e.version),F.current=e.version},[e.version,k]),(0,W.useEffect)(()=>{let t=!1;if(k===e.version){M(e.body),P(e.title);return}let n=O.find(e=>e.version===k);if(n){M(n.body),P(n.title);return}return fetch(`/api/plans/${e.id}/versions/${k}`).then(e=>e.ok?e.json():null).then(e=>{t||!e?.version||(M(e.version.body),P(e.version.title))}).catch(()=>{}),()=>{t=!0}},[k,e.version,e.body,e.title,e.id,O]),(0,W.useEffect)(()=>{C(null),T(0),x(null)},[k]);let I=k!==e.version,L=(0,W.useMemo)(()=>O.map(t=>({value:String(t.version),label:t.version===e.version?`v${t.version} (current)`:`v${t.version}`})),[O,e.version]),R=e=>{let t=e.target.closest(`a`);if(t){let n=t.getAttribute(`href`);n&&n.startsWith(`file:///`)&&(e.preventDefault(),D(n.replace(`file://`,``)))}},z=nE[t]||nE.nord,ee=(0,W.useMemo)(()=>x0(i,n,r),[i,n,r]),te=e.comments??[],B=I?te.filter(e=>e.createdAtPlanVersion===k):te,V=B.filter(e=>e.lineNumber>0),H=B.filter(e=>e.lineNumber===0);B.filter(e=>e.status===`open`).length;let ne=te.length,re=(e,t)=>h0(j,e??t,t),ie=(t,n)=>{l({planId:e.id,lineNumber:t.lineNumber,startLineNumber:t.startLineNumber,lineContent:re(t.startLineNumber,t.lineNumber),sectionTitle:m0(j,t.startLineNumber??t.lineNumber),body:n,createdAtPlanVersion:k}),x(null),C(null)},ae=(0,W.useMemo)(()=>{let e=V.map(e=>({lineNumber:e.lineNumber,metadata:e}));return b&&e.push({lineNumber:b.lineNumber,metadata:{_pending:!0}}),e},[V,b]),oe=t=>{let n=t.metadata;if(!n)return null;if(`_pending`in n){let t=b;return(0,G.jsx)(JU,{draftKey:`plan-new:${e.id}:${t.startLineNumber??t.lineNumber}:${t.lineNumber}`,lineContent:re(t.startLineNumber,t.lineNumber),onSubmit:e=>ie(t,e),onCancel:()=>{x(null),C(null)}})}let r=n;return(0,G.jsx)(_0,{comment:r,onResolve:()=>d(e.id,r.id),onUnresolve:()=>f(e.id,r.id),onDelete:()=>p(e.id,r.id),onEdit:t=>u(e.id,r.id,t),onReply:t=>m(e.id,r.id,t),onEditReply:(t,n)=>h(e.id,r.id,t,n),onDeleteReply:t=>g(e.id,r.id,t)})},se=y0[e.decision],ce=se.icon;return(0,G.jsxs)(`div`,{className:`plan-review`,children:[(0,G.jsx)(`div`,{className:`plan-review-head`,children:(0,G.jsxs)(`div`,{className:`plan-review-head-main`,children:[(0,G.jsxs)(`h2`,{className:`plan-review-title`,title:N,children:[N,I&&N!==e.title&&(0,G.jsxs)(`span`,{className:`plan-review-title-historical`,title:`Currently submitted title: ${e.title}`,children:[` `,`(current: `,e.title,`)`]})]}),(0,G.jsxs)(`div`,{className:`plan-review-meta`,children:[(0,G.jsxs)(`span`,{className:`plan-badge ${se.className}`,children:[(0,G.jsx)(ce,{size:12,"aria-hidden":`true`}),se.label]}),(0,G.jsxs)(`span`,{className:`plan-review-chip`,children:[`v`,k,O.length>1?` / ${O.length}`:``]}),O.length>1&&(0,G.jsxs)(`div`,{className:`plan-review-version-switcher`,children:[(0,G.jsx)(tO,{size:12,"aria-hidden":`true`,className:`plan-review-version-switcher-icon`}),(0,G.jsx)(FA,{value:String(k),onValueChange:e=>A(Number(e)),options:L,ariaLabel:`Plan version`}),I&&(0,G.jsxs)(`button`,{type:`button`,className:`plan-review-version-back`,onClick:()=>A(e.version),title:`Back to current v${e.version}`,children:[(0,G.jsx)(jD,{size:11,"aria-hidden":`true`}),`Back to v`,e.version]}),I&&(0,G.jsx)(`span`,{className:`plan-review-version-current-dot`,title:`This is v${k} of ${e.version}`,"aria-label":`Viewing historical version ${k}`})]}),e.source&&(0,G.jsx)(`span`,{className:`plan-review-chip`,children:e.source}),e.model&&(0,G.jsxs)(`span`,{className:`plan-review-chip plan-review-chip-model`,children:[(0,G.jsx)(MD,{size:11,"aria-hidden":`true`}),e.model]}),V.length+H.length>0&&(0,G.jsxs)(`span`,{className:`plan-review-chip`,children:[B.length,` comment`,B.length===1?``:`s`,I&&ne!==B.length&&(0,G.jsxs)(`span`,{className:`plan-review-chip-sub`,children:[` of `,ne]})]}),w>0&&(0,G.jsxs)(`span`,{className:`plan-review-chip plan-review-chip-selection`,"aria-live":`polite`,children:[w,` line`,w===1?``:`s`,` selected`]})]})]})}),I&&(0,G.jsxs)(`div`,{className:`plan-review-historical-banner`,role:`status`,children:[(0,G.jsx)(tO,{size:14,"aria-hidden":`true`}),(0,G.jsxs)(`span`,{children:[`Viewing `,(0,G.jsxs)(`strong`,{children:[`v`,k]}),` of this plan (current is `,(0,G.jsxs)(`strong`,{children:[`v`,e.version]}),`).`,` `,`Comments and line anchors reflect v`,k,`.`]}),(0,G.jsxs)(`button`,{type:`button`,className:`plan-review-historical-banner-back`,onClick:()=>A(e.version),children:[(0,G.jsx)(jD,{size:11,"aria-hidden":`true`}),`Back to current`]})]}),e.decision!==`pending`&&(0,G.jsxs)(`div`,{className:`plan-decision-banner ${se.className}`,children:[(0,G.jsx)(ce,{size:15,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`plan-decision-banner-text`,children:[(0,G.jsx)(`strong`,{children:se.label}),e.decisionComment&&(0,G.jsx)(XH,{content:e.decisionComment,className:`plan-decision-banner-note markdown-body`})]})]}),H.length>0&&(0,G.jsxs)(`div`,{className:`plan-general-section`,children:[(0,G.jsxs)(`div`,{className:`plan-general-header`,children:[(0,G.jsx)(cO,{size:14}),(0,G.jsxs)(`span`,{children:[`General comments (`,H.length,`)`]})]}),H.map(t=>(0,G.jsx)(_0,{comment:t,onResolve:()=>d(e.id,t.id),onUnresolve:()=>f(e.id,t.id),onDelete:()=>p(e.id,t.id),onEdit:n=>u(e.id,t.id,n),onReply:n=>m(e.id,t.id,n),onEditReply:(n,r)=>h(e.id,t.id,n,r),onDeleteReply:n=>g(e.id,t.id,n)},t.id))]}),c===`rendered`?(0,G.jsx)(`div`,{className:`markdown-body plan-rendered`,onClick:R,children:(0,G.jsx)(XH,{content:j})}):(0,G.jsx)(`div`,{className:`plan-file`,children:(0,G.jsx)(Bh,{file:{name:`PLAN.md`,contents:j,lang:`markdown`},options:{disableFileHeader:!0,enableGutterUtility:!0,enableLineSelection:!0,overflow:a?`wrap`:`scroll`,disableLineNumbers:!o,lineHoverHighlight:s,onLineSelectionStart:()=>{C(null),T(0)},onLineSelectionChange:e=>{T(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{T(0),e&&(C(e),x({lineNumber:e.end,startLineNumber:e.start}))},theme:{dark:z.type===`dark`?z.themeName:`nord`,light:z.type===`light`?z.themeName:`github-light`},themeType:z.type,unsafeCSS:ee},selectedLines:S,lineAnnotations:ae,renderAnnotation:oe,renderGutterUtility:e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&x({lineNumber:t.lineNumber})},children:`+`})})}),(0,G.jsx)(v0,{isOpen:!!E,filePath:E,onClose:()=>D(null)})]})}function x0(e,t,n){return`
|
|
3864
|
+
`)}function m0({role:e,size:t=16}){return e===`agent`?(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-agent`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(AD,{size:t,"aria-hidden":`true`})}):(0,G.jsx)(`div`,{className:`comment-avatar-circle comment-avatar-user`,style:{width:`${t*2}px`,height:`${t*2}px`},children:(0,G.jsx)(kO,{size:t,"aria-hidden":`true`})})}function h0({comment:e,onResolve:t,onUnresolve:n,onDelete:r,onEdit:i,onReply:a,onEditReply:o,onDeleteReply:s}){let[,c]=(0,W.useState)(0),l=e.status===`resolved`,[u,d]=(0,W.useState)(l),[f,p]=(0,W.useState)(!1),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(null);(0,W.useEffect)(()=>d(e.status===`resolved`),[e.status]),(0,W.useEffect)(()=>{let e=setInterval(()=>c(e=>e+1),3e4);return()=>clearInterval(e)},[]);let b=e.lineNumber===0,x=e.startLineNumber&&e.startLineNumber!==e.lineNumber,S=(0,G.jsxs)(G.Fragment,{children:[e.sectionTitle&&(0,G.jsxs)(`span`,{className:`plan-comment-section-chip`,title:`Section: ${e.sectionTitle}`,children:[`§\xA0`,e.sectionTitle]}),b?(0,G.jsx)(`span`,{className:`plan-comment-line-chip plan-comment-line-chip-general`,children:`Whole plan`}):(0,G.jsx)(`span`,{className:`plan-comment-line-chip`,children:x?`L${e.startLineNumber}-${e.lineNumber}`:`L${e.lineNumber}`})]});return l&&u?(0,G.jsxs)(`div`,{className:`comment-resolved-collapsed plan-comment-resolved-collapsed`,children:[(0,G.jsxs)(`div`,{className:`plan-comment-resolved-left`,children:[(0,G.jsx)(LD,{size:15,style:{color:`var(--success)`}}),(0,G.jsx)(`span`,{style:{fontWeight:600},children:`Resolved`}),S,(0,G.jsx)(`span`,{children:`•`}),(0,G.jsx)(`span`,{children:e.replies?.length?`${e.replies.length+1} comments`:`1 comment`})]}),(0,G.jsx)(`button`,{className:`plan-comment-show-resolved`,onClick:()=>d(!1),children:`Show`})]}):(0,G.jsxs)(`div`,{className:`comment-bubble-canvas ${l?`comment-bubble-canvas-resolved`:``}`,id:`plan-comment-${e.id}`,role:`article`,children:[(0,G.jsxs)(`div`,{className:`comment-node ${l?`comment-node-resolved`:``}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(m0,{role:`user`,size:16})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge comment-node-badge-user`,children:`User`}),(0,G.jsxs)(`span`,{className:`comment-node-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[eE(e.createdAt),S]}),l&&(0,G.jsxs)(`span`,{className:`comment-canvas-resolved-banner`,style:{marginLeft:`8px`},children:[(0,G.jsx)(LD,{size:13}),`Resolved`]}),!l&&!m&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>h(!0),title:`Edit comment`,"aria-label":`Edit comment`,children:(0,G.jsx)(hO,{size:13,"aria-hidden":`true`})}),g?(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,G.jsxs)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:r,title:`Confirm delete`,style:{color:`var(--danger)`,background:`var(--feedback-danger-bg)`,fontWeight:600,fontSize:`11px`,border:`1px solid var(--feedback-danger-border)`,padding:`2px 6px`,width:`auto`,height:`auto`,display:`flex`,alignItems:`center`,gap:`2px`},children:[(0,G.jsx)(EO,{size:11}),`Delete?`]}),(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>_(!1),title:`Cancel delete`,style:{fontSize:`11px`,padding:`2px 6px`,width:`auto`,height:`auto`},children:`Cancel`})]}):(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>_(!0),title:`Delete comment`,"aria-label":`Delete comment`,children:(0,G.jsx)(TO,{size:13,"aria-hidden":`true`})})]})]}),m?(0,G.jsx)(`div`,{style:{marginTop:`8px`},children:(0,G.jsx)(KU,{draftKey:`plan-edit:${e.id}`,initialBody:e.body,lineContent:e.lineContent,onSubmit:e=>{i(e),h(!1)},onCancel:()=>h(!1)})}):(0,G.jsx)(JH,{content:e.body,className:`comment-node-body markdown-body ${l?`comment-resolved-line`:``}`})]})]}),e.replies?.length>0&&(0,G.jsx)(`div`,{className:`comment-replies`,role:`list`,"aria-label":`Replies`,children:e.replies.map((t,n)=>{let r=t.role===`agent`,i=v===t.id;return(0,G.jsxs)(`div`,{className:`comment-node ${r?`comment-node-agent`:`comment-node-user`} ${l?`comment-node-resolved`:``}`,role:`listitem`,"aria-label":`${r?`Agent`:`User`} reply ${n+1}`,children:[(0,G.jsx)(`div`,{className:`comment-avatar-col`,children:(0,G.jsx)(m0,{role:r?`agent`:`user`,size:14})}),(0,G.jsxs)(`div`,{className:`comment-content-col`,children:[(0,G.jsxs)(`div`,{className:`comment-node-header`,children:[(0,G.jsx)(`span`,{className:`comment-node-author`,children:r?`Agent`:`User`}),(0,G.jsx)(`span`,{className:`comment-node-badge ${r?`comment-node-badge-agent`:`comment-node-badge-user`}`,children:r?`Agent`:`User`}),r&&t.model&&(0,G.jsx)(`span`,{style:{fontSize:`10px`,fontWeight:600,padding:`1px 5px`,borderRadius:`4px`,background:`var(--bg-tertiary)`,color:`var(--text-secondary)`,fontFamily:`var(--font-mono)`},children:t.model}),(0,G.jsx)(`span`,{className:`comment-node-time`,children:eE(t.createdAt)}),!l&&(0,G.jsxs)(`div`,{className:`comment-node-actions`,children:[(0,G.jsx)(`button`,{className:`comment-node-btn`,onClick:()=>y(t.id),title:`Edit reply`,"aria-label":`Edit reply`,children:(0,G.jsx)(hO,{size:12,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`comment-node-btn comment-node-btn-delete`,onClick:()=>s(t.id),title:`Delete reply`,"aria-label":`Delete reply`,children:(0,G.jsx)(TO,{size:12,"aria-hidden":`true`})})]})]}),i?(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`6px`},children:(0,G.jsx)(KU,{draftKey:`plan-reply-edit:${e.id}:${t.id}`,initialBody:t.body,onSubmit:e=>{o(t.id,e),y(null)},onCancel:()=>y(null)})}):(0,G.jsx)(JH,{content:t.body,className:`comment-node-body markdown-body`})]})]},t.id)})}),(0,G.jsxs)(`div`,{className:`comment-canvas-footer`,children:[!f&&(0,G.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,G.jsxs)(`button`,{onClick:()=>p(!0),className:`comment-reply-trigger`,style:{width:`100%`,maxWidth:`320px`},children:[(0,G.jsx)(vO,{size:14,"aria-hidden":`true`}),`Reply...`]}),l?(0,G.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,marginLeft:`12px`},children:[(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:()=>d(!0),style:{fontSize:`12px`,padding:`4px 10px`},children:`Hide`}),(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:n,style:{fontSize:`12px`,padding:`4px 10px`},children:`Unresolve`})]}):(0,G.jsx)(`button`,{className:`btn btn-secondary btn-sm`,onClick:t,style:{fontSize:`12px`,padding:`4px 10px`,marginLeft:`12px`},children:`Resolve`})]}),f&&(0,G.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`var(--radius-md)`,border:`1px solid var(--border-color)`,marginTop:`4px`},children:(0,G.jsx)(KU,{draftKey:`plan-reply:${e.id}`,onSubmit:e=>{a(e),p(!1)},onCancel:()=>p(!1)})})]})]})}var g0=(0,W.memo)(function({isOpen:e,filePath:t,onClose:n}){let{data:r,isLoading:i,error:a}=k1(t),o=t?t.split(`/`).pop():``;return(0,G.jsxs)(PU,{open:e,onClose:n,className:`shortcuts-modal file-preview-modal`,ariaLabel:`File preview`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header`,children:[(0,G.jsxs)(`div`,{className:`shortcuts-header-title`,children:[(0,G.jsx)(qD,{size:18,className:`shortcuts-icon`}),(0,G.jsxs)(`h2`,{children:[`Preview: `,o]}),(0,G.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--text-muted)`,marginLeft:`8px`},children:t})]}),(0,G.jsx)(`button`,{className:`shortcuts-close-btn`,onClick:n,"aria-label":`Close dialog`,children:(0,G.jsx)(AO,{size:16})})]}),(0,G.jsxs)(`div`,{className:`shortcuts-body`,style:{maxHeight:`60vh`,display:`flex`,flexDirection:`column`},children:[i&&(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`40px`,gap:`8px`,color:`var(--text-muted)`},children:[(0,G.jsx)(nO,{size:16,className:`spin`}),(0,G.jsx)(`span`,{children:`Loading file content...`})]}),a&&(0,G.jsxs)(`div`,{style:{padding:`20px`,color:`var(--danger)`,background:`var(--feedback-danger-bg)`,borderRadius:`6px`},children:[`Failed to load file: `,a.message||String(a)]}),r&&(0,G.jsx)(`div`,{style:{flex:1,overflow:`auto`,background:`var(--bg-secondary)`,borderRadius:`6px`,border:`1px solid var(--border-normal)`},children:r.binary?(0,G.jsx)(`div`,{style:{padding:`40px`,textAlign:`center`,color:`var(--text-muted)`},children:`Binary file cannot be previewed.`}):r.missing?(0,G.jsx)(`div`,{style:{padding:`40px`,textAlign:`center`,color:`var(--text-muted)`},children:`File does not exist or has been deleted.`}):(0,G.jsx)(`pre`,{style:{margin:0,padding:`16px`,fontFamily:`var(--font-mono)`,fontSize:`13px`,lineHeight:`1.6`,overflowX:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-all`},children:(0,G.jsx)(`code`,{children:r.content})})})]}),(0,G.jsx)(`div`,{className:`shortcuts-footer`,style:{justifyContent:`flex-end`},children:(0,G.jsx)(`button`,{className:`btn btn-sm btn-primary`,onClick:n,children:`Close Preview`})})]})}),_0={pending:{label:`Pending review`,className:`plan-badge-pending`,icon:VD},approved:{label:`Approved`,className:`plan-badge-approved`,icon:jD},"changes-requested":{label:`Changes requested`,className:`plan-badge-changes`,icon:sO},rejected:{label:`Rejected`,className:`plan-badge-rejected`,icon:AO},"comment-only":{label:`Comment only`,className:`plan-badge-comment-only`,icon:cO}};function v0({plan:e,theme:t,fontSize:n,monoFontFamily:r,defaultTabSize:i,lineWrap:a,showLineNumbers:o,lineHoverHighlight:s,viewMode:c}){let{addPlanComment:l,editPlanComment:u,resolvePlanComment:d,unresolvePlanComment:f,removePlanComment:p,addPlanReply:m,editPlanReply:h,removePlanReply:g,submitDecision:_,submitting:v,agentWaiting:y}=wE(),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(null),[w,T]=(0,W.useState)(0),[E,D]=(0,W.useState)(null),O=e.versions??[],[k,A]=(0,W.useState)(e.version),[j,M]=(0,W.useState)(e.body),[N,P]=(0,W.useState)(e.title),F=(0,W.useRef)(e.version);(0,W.useEffect)(()=>{let t=k===F.current;e.version!==F.current&&t&&A(e.version),F.current=e.version},[e.version,k]),(0,W.useEffect)(()=>{let t=!1;if(k===e.version){M(e.body),P(e.title);return}let n=O.find(e=>e.version===k);if(n){M(n.body),P(n.title);return}return fetch(`/api/plans/${e.id}/versions/${k}`).then(e=>e.ok?e.json():null).then(e=>{t||!e?.version||(M(e.version.body),P(e.version.title))}).catch(()=>{}),()=>{t=!0}},[k,e.version,e.body,e.title,e.id,O]),(0,W.useEffect)(()=>{C(null),T(0),x(null)},[k]);let I=k!==e.version,L=(0,W.useMemo)(()=>O.map(t=>({value:String(t.version),label:t.version===e.version?`v${t.version} (current)`:`v${t.version}`})),[O,e.version]),R=e=>{let t=e.target.closest(`a`);if(t){let n=t.getAttribute(`href`);n&&n.startsWith(`file:///`)&&(e.preventDefault(),D(n.replace(`file://`,``)))}},z=nE[t]||nE.nord,ee=(0,W.useMemo)(()=>y0(i,n,r),[i,n,r]),te=e.comments??[],B=I?te.filter(e=>e.createdAtPlanVersion===k):te,V=B.filter(e=>e.lineNumber>0),H=B.filter(e=>e.lineNumber===0);B.filter(e=>e.status===`open`).length;let ne=te.length,re=(e,t)=>p0(j,e??t,t),ie=(t,n)=>{l({planId:e.id,lineNumber:t.lineNumber,startLineNumber:t.startLineNumber,lineContent:re(t.startLineNumber,t.lineNumber),sectionTitle:f0(j,t.startLineNumber??t.lineNumber),body:n,createdAtPlanVersion:k}),x(null),C(null)},ae=(0,W.useMemo)(()=>{let e=V.map(e=>({lineNumber:e.lineNumber,metadata:e}));return b&&e.push({lineNumber:b.lineNumber,metadata:{_pending:!0}}),e},[V,b]),oe=t=>{let n=t.metadata;if(!n)return null;if(`_pending`in n){let t=b;return(0,G.jsx)(KU,{draftKey:`plan-new:${e.id}:${t.startLineNumber??t.lineNumber}:${t.lineNumber}`,lineContent:re(t.startLineNumber,t.lineNumber),onSubmit:e=>ie(t,e),onCancel:()=>{x(null),C(null)}})}let r=n;return(0,G.jsx)(h0,{comment:r,onResolve:()=>d(e.id,r.id),onUnresolve:()=>f(e.id,r.id),onDelete:()=>p(e.id,r.id),onEdit:t=>u(e.id,r.id,t),onReply:t=>m(e.id,r.id,t),onEditReply:(t,n)=>h(e.id,r.id,t,n),onDeleteReply:t=>g(e.id,r.id,t)})},se=_0[e.decision],ce=se.icon;return(0,G.jsxs)(`div`,{className:`plan-review`,children:[(0,G.jsx)(`div`,{className:`plan-review-head`,children:(0,G.jsxs)(`div`,{className:`plan-review-head-main`,children:[(0,G.jsxs)(`h2`,{className:`plan-review-title`,title:N,children:[N,I&&N!==e.title&&(0,G.jsxs)(`span`,{className:`plan-review-title-historical`,title:`Currently submitted title: ${e.title}`,children:[` `,`(current: `,e.title,`)`]})]}),(0,G.jsxs)(`div`,{className:`plan-review-meta`,children:[(0,G.jsxs)(`span`,{className:`plan-badge ${se.className}`,children:[(0,G.jsx)(ce,{size:12,"aria-hidden":`true`}),se.label]}),(0,G.jsxs)(`span`,{className:`plan-review-chip`,children:[`v`,k,O.length>1?` / ${O.length}`:``]}),O.length>1&&(0,G.jsxs)(`div`,{className:`plan-review-version-switcher`,children:[(0,G.jsx)($D,{size:12,"aria-hidden":`true`,className:`plan-review-version-switcher-icon`}),(0,G.jsx)(NA,{value:String(k),onValueChange:e=>A(Number(e)),options:L,ariaLabel:`Plan version`}),I&&(0,G.jsxs)(`button`,{type:`button`,className:`plan-review-version-back`,onClick:()=>A(e.version),title:`Back to current v${e.version}`,children:[(0,G.jsx)(kD,{size:11,"aria-hidden":`true`}),`Back to v`,e.version]}),I&&(0,G.jsx)(`span`,{className:`plan-review-version-current-dot`,title:`This is v${k} of ${e.version}`,"aria-label":`Viewing historical version ${k}`})]}),e.source&&(0,G.jsx)(`span`,{className:`plan-review-chip`,children:e.source}),e.model&&(0,G.jsxs)(`span`,{className:`plan-review-chip plan-review-chip-model`,children:[(0,G.jsx)(AD,{size:11,"aria-hidden":`true`}),e.model]}),V.length+H.length>0&&(0,G.jsxs)(`span`,{className:`plan-review-chip`,children:[B.length,` comment`,B.length===1?``:`s`,I&&ne!==B.length&&(0,G.jsxs)(`span`,{className:`plan-review-chip-sub`,children:[` of `,ne]})]}),w>0&&(0,G.jsxs)(`span`,{className:`plan-review-chip plan-review-chip-selection`,"aria-live":`polite`,children:[w,` line`,w===1?``:`s`,` selected`]})]})]})}),I&&(0,G.jsxs)(`div`,{className:`plan-review-historical-banner`,role:`status`,children:[(0,G.jsx)($D,{size:14,"aria-hidden":`true`}),(0,G.jsxs)(`span`,{children:[`Viewing `,(0,G.jsxs)(`strong`,{children:[`v`,k]}),` of this plan (current is `,(0,G.jsxs)(`strong`,{children:[`v`,e.version]}),`).`,` `,`Comments and line anchors reflect v`,k,`.`]}),(0,G.jsxs)(`button`,{type:`button`,className:`plan-review-historical-banner-back`,onClick:()=>A(e.version),children:[(0,G.jsx)(kD,{size:11,"aria-hidden":`true`}),`Back to current`]})]}),e.decision!==`pending`&&(0,G.jsxs)(`div`,{className:`plan-decision-banner ${se.className}`,children:[(0,G.jsx)(ce,{size:15,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`plan-decision-banner-text`,children:[(0,G.jsx)(`strong`,{children:se.label}),e.decisionComment&&(0,G.jsx)(JH,{content:e.decisionComment,className:`plan-decision-banner-note markdown-body`})]})]}),H.length>0&&(0,G.jsxs)(`div`,{className:`plan-general-section`,children:[(0,G.jsxs)(`div`,{className:`plan-general-header`,children:[(0,G.jsx)(oO,{size:14}),(0,G.jsxs)(`span`,{children:[`General comments (`,H.length,`)`]})]}),H.map(t=>(0,G.jsx)(h0,{comment:t,onResolve:()=>d(e.id,t.id),onUnresolve:()=>f(e.id,t.id),onDelete:()=>p(e.id,t.id),onEdit:n=>u(e.id,t.id,n),onReply:n=>m(e.id,t.id,n),onEditReply:(n,r)=>h(e.id,t.id,n,r),onDeleteReply:n=>g(e.id,t.id,n)},t.id))]}),c===`rendered`?(0,G.jsx)(`div`,{className:`markdown-body plan-rendered`,onClick:R,children:(0,G.jsx)(JH,{content:j})}):(0,G.jsx)(`div`,{className:`plan-file`,children:(0,G.jsx)(Bh,{file:{name:`PLAN.md`,contents:j,lang:`markdown`},options:{disableFileHeader:!0,enableGutterUtility:!0,enableLineSelection:!0,overflow:a?`wrap`:`scroll`,disableLineNumbers:!o,lineHoverHighlight:s,onLineSelectionStart:()=>{C(null),T(0)},onLineSelectionChange:e=>{T(e?Math.abs(e.end-e.start)+1:0)},onLineSelectionEnd:e=>{T(0),e&&(C(e),x({lineNumber:e.end,startLineNumber:e.start}))},theme:{dark:z.type===`dark`?z.themeName:`nord`,light:z.type===`light`?z.themeName:`github-light`},themeType:z.type,unsafeCSS:ee},selectedLines:S,lineAnnotations:ae,renderAnnotation:oe,renderGutterUtility:e=>(0,G.jsx)(`button`,{className:`gutter-add-btn`,onClick:()=>{let t=e();t&&x({lineNumber:t.lineNumber})},children:`+`})})}),(0,G.jsx)(g0,{isOpen:!!E,filePath:E,onClose:()=>D(null)})]})}function y0(e,t,n){return`
|
|
3865
3865
|
:host {
|
|
3866
3866
|
--diffs-tab-size: ${e} !important;
|
|
3867
3867
|
--diffs-font-family: ${n} !important;
|
|
@@ -3914,9 +3914,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(
|
|
|
3914
3914
|
overflow-wrap: break-word !important;
|
|
3915
3915
|
min-width: 0 !important;
|
|
3916
3916
|
}
|
|
3917
|
-
`}var S0={pending:{icon:UD,className:`plan-badge-pending`,label:`Pending`},approved:{icon:ND,className:`plan-badge-approved`,label:`Approved`},"changes-requested":{icon:lO,className:`plan-badge-changes`,label:`Changes`},rejected:{icon:MO,className:`plan-badge-rejected`,label:`Rejected`},"comment-only":{icon:uO,className:`plan-badge-comment-only`,label:`Comment only`}};function C0({plans:e,activeId:t,onSelect:n,onDelete:r,collapsed:i,onToggleCollapse:a}){let[o,s]=(0,W.useState)(``),c=(0,W.useMemo)(()=>[...e].sort((e,t)=>t.createdAt-e.createdAt),[e]),l=(0,W.useMemo)(()=>c.filter(e=>e.title.toLowerCase().includes(o.toLowerCase())),[c,o]);return i?(0,G.jsx)(`div`,{className:`ft`,children:(0,G.jsx)(`div`,{className:`ft-search`,children:a&&(0,G.jsx)($T,{content:`Expand sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:a,"aria-label":`Expand sidebar`,children:(0,G.jsx)(hO,{size:16})})})})}):(0,G.jsxs)(`div`,{className:`ft`,style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,G.jsxs)(`div`,{className:`ft-search`,children:[a&&(0,G.jsx)($T,{content:`Collapse sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:a,"aria-label":`Collapse sidebar`,children:(0,G.jsx)(mO,{size:16})})}),(0,G.jsxs)(`div`,{className:`ft-search-wrapper`,children:[(0,G.jsx)(CO,{size:14,className:`ft-search-icon`}),(0,G.jsx)(`input`,{type:`text`,placeholder:`Filter plans...`,value:o,onChange:e=>s(e.target.value),className:`ft-search-input`})]})]}),(0,G.jsxs)(`div`,{className:`plan-list-scroll`,style:{flex:1,minHeight:0,overflow:`auto`},children:[(0,G.jsxs)(`div`,{className:`plan-list-header`,children:[`Plans (`,l.length,`)`]}),l.length===0&&(0,G.jsx)(`div`,{className:`plan-list-empty`,children:o?`No matching plans found.`:`No plans submitted yet.`}),l.map(e=>{let i=S0[e.decision],a=i.icon,o=(e.comments??[]).filter(e=>e.status===`open`).length;return(0,G.jsxs)(`div`,{className:`plan-list-item ${e.id===t?`plan-list-item-active`:``}`,onClick:()=>n(e.id),role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e.id))},children:[(0,G.jsxs)(`div`,{className:`plan-list-item-top`,children:[(0,G.jsx)(`span`,{className:`plan-badge plan-badge-dot ${i.className}`,title:i.label,children:(0,G.jsx)(a,{size:11,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`plan-list-item-title`,title:e.title,children:e.title}),(0,G.jsx)(`button`,{className:`plan-list-delete`,title:`Delete plan`,onClick:t=>{t.stopPropagation(),r(e.id)},children:(0,G.jsx)(DO,{size:12,"aria-hidden":`true`})})]}),(0,G.jsxs)(`div`,{className:`plan-list-item-sub`,children:[(0,G.jsxs)(`span`,{children:[`v`,e.version]}),o>0&&(0,G.jsxs)(`span`,{children:[`· `,o,` open`]}),e.model&&(0,G.jsxs)(`span`,{className:`plan-list-item-model`,children:[`· `,(0,G.jsx)(MD,{size:10,"aria-hidden":`true`}),` `,e.model]}),(0,G.jsxs)(`span`,{className:`plan-list-item-time`,children:[`· `,eE(e.createdAt)]})]})]},e.id)})]})]})}var w0=[{value:`approved`,label:`Approve`,description:`The plan looks good — the agent should proceed.`,icon:ND,className:`plan-verdict-approve`},{value:`changes-requested`,label:`Request changes`,description:`The agent should revise the plan and resubmit it.`,icon:lO,className:`plan-verdict-changes`},{value:`rejected`,label:`Reject`,description:`Don't proceed — the approach needs rethinking.`,icon:MO,className:`plan-verdict-reject`},{value:`comment-only`,label:`Comment only`,description:`Agent must NOT edit files — only reply to comments. General note goes to chat.`,icon:uO,className:`plan-verdict-comment-only`}];function T0({openCommentCount:e,onSubmit:t,submitting:n,agentWaiting:r,currentDecision:i}){let{haptic:a,sound:o}=dD(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(``),p=async()=>{l&&(a(`heavy`),o(`send`),await t(l,d,l===`comment-only`?`comment-only`:`standard`),f(``),u(null),c(!1))},m=i!==`pending`;return(0,G.jsx)(Sk,{open:s,onOpenChange:c,ariaLabel:`Submit plan review`,className:`submit-plan-review-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:n,title:r?`An agent is connected and waiting for your verdict`:`Submit your verdict on this plan`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[r&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),m?(0,G.jsx)(yO,{size:14}):(0,G.jsx)(VD,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:n?`Submitting…`:m?`Update review`:`Submit review`})]}),children:(0,G.jsxs)(`div`,{className:`srp`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[m?(0,G.jsx)(yO,{size:15,"aria-hidden":`true`}):(0,G.jsx)(VD,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:m?`Update plan review`:`Submit plan review`}),e>0&&(0,G.jsxs)(`span`,{className:`srp-count`,children:[e,` open comment`,e===1?``:`s`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:w0.map(e=>{let t=e.icon,n=l===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>u(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`plan-decision-comment`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(aU,{id:`plan-decision-comment`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the agent that applies to the whole plan…`,rows:3,ariaLabel:`Overall plan review comment`,onSubmitShortcut:p})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>c(!1),disabled:n,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:p,disabled:!l||n,children:n?`Submitting…`:`Submit review`})]})]})})}var E0=[11,12,13,14,15,16].map(e=>({value:String(e),label:`${e}px`})),D0=[2,4,8].map(e=>({value:String(e),label:String(e)})),O0=[{value:`both`,label:`Both`},{value:`line`,label:`Line only`},{value:`number`,label:`Number only`},{value:`disabled`,label:`Disabled`}];function k0(){let e=Am(),{settings:t,loaded:n,updateSettings:r}=IE();LE(n,t.uiFont,t.monoFont);let{plans:i,getPlan:a,removePlan:o,agentActivity:s,clearAgentActivity:c,submitDecision:l,submitting:u,agentWaiting:d,isLoading:f}=wE(),p=jE(),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`,`||e.code===`Comma`)&&(e.preventDefault(),_(e=>!e))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]);let[b,x]=(0,W.useState)(()=>{try{return mD(`diffing-plan-view-mode`)===`rendered`?`rendered`:`source`}catch{return`source`}}),S=(0,W.useCallback)(e=>{x(e);try{vD(`diffing-plan-view-mode`,e)}catch{}},[]),C=(0,W.useMemo)(()=>{let e=/^\/plan\/([^/]+)/.exec(p);return e?decodeURIComponent(e[1]):null},[p]),w=(0,W.useMemo)(()=>C?a(C):i.length===0?null:[...i].reverse().find(e=>e.decision===`pending`)??i[i.length-1],[C,i,a]),T=(0,W.useMemo)(()=>nE[t.theme||`nord`]||nE.nord,[t.theme]);(0,W.useEffect)(()=>{let e=t.theme||`nord`,n=document.documentElement;n.classList.add(`theme-switching`),n.setAttribute(`data-theme`,e);let r=requestAnimationFrame(()=>{requestAnimationFrame(()=>n.classList.remove(`theme-switching`))});return()=>cancelAnimationFrame(r)},[t.theme]),(0,W.useEffect)(()=>{e&&e.setRenderOptions({theme:{dark:T.type===`dark`?T.themeName:`nord`,light:T.type===`light`?T.themeName:`github-light`}}).catch(e=>console.error(`Failed to set worker pool render options:`,e))},[e,T]),(0,W.useEffect)(()=>{let e=T.type===`dark`?T.themeName:`nord`,t=T.type===`light`?T.themeName:`github-light`;Uf({themes:Array.from(new Set([e,t])),langs:[]}).catch(()=>{})},[T]);let[E,D]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[O,k]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}});(0,W.useEffect)(()=>{try{vD(`diffing-sidebar-collapsed`,String(E))}catch{}},[E]);let A=(0,W.useRef)(O);A.current=O;let j=(0,W.useRef)(null),M=(0,W.useRef)(null),N=(0,W.useRef)(null),P=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=A.current,r=M.current,i=N.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),k(o);try{vD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),F=(0,W.useCallback)(()=>{D(e=>!e)},[]),I=(0,W.useCallback)(()=>{r({lineWrap:!t.lineWrap})},[t.lineWrap,r]),L=(0,W.useCallback)(()=>{r({showLineNumbers:!t.showLineNumbers})},[t.showLineNumbers,r]),R=(0,W.useCallback)(()=>{S(b===`source`?`rendered`:`source`)},[b,S]),z=(0,W.useCallback)(()=>{let e=[2,4,8],n=t.defaultTabSize||4;r({defaultTabSize:e[(e.indexOf(n)+1)%e.length]})},[t.defaultTabSize,r]),ee=(0,W.useCallback)(e=>{if(i.length===0)return;let t=[...i].sort((e,t)=>t.createdAt-e.createdAt),n=0;if(w){let r=t.findIndex(e=>e.id===w.id);r!==-1&&(n=e===`next`?Math.min(r+1,t.length-1):Math.max(r-1,0))}let r=t[n];DE(`/plan/${r.id}`)},[i,w]);(0,W.useEffect)(()=>{let e=``,t,n=0,r=r=>{let i=document.activeElement;if(i){let e=i.tagName.toLowerCase();if(e===`input`||e===`textarea`||i.hasAttribute(`contenteditable`))return}clearTimeout(t);let a=r.key;if(r.ctrlKey){a===`d`?(r.preventDefault(),window.scrollBy({top:window.innerHeight/2,behavior:`auto`}),lD(`selection`,`navigate`),e=``):a===`u`&&(r.preventDefault(),window.scrollBy({top:-window.innerHeight/2,behavior:`auto`}),lD(`selection`,`navigate`),e=``);return}if(!(a.length>1&&a!==`Escape`&&a!==`Enter`))if(e+=a,t=setTimeout(()=>{e=``},800),e===`j`){r.preventDefault(),window.scrollBy({top:100,behavior:`auto`});let t=Date.now();t-n>80&&(sD(`navigate`),n=t),e=``}else if(e===`k`){r.preventDefault(),window.scrollBy({top:-100,behavior:`auto`});let t=Date.now();t-n>80&&(sD(`navigate`),n=t),e=``}else e===`gg`?(r.preventDefault(),window.scrollTo({top:0,behavior:`auto`}),lD(`selection`,`navigate`),e=``):e===`G`?(r.preventDefault(),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`auto`}),lD(`selection`,`navigate`),e=``):e===`J`?(r.preventDefault(),ee(`next`),lD(`selection`,`navigate`),e=``):e===`K`?(r.preventDefault(),ee(`prev`),lD(`selection`,`navigate`),e=``):e===`m`?(r.preventDefault(),R(),lD(`selection`,`toggle`),e=``):e===`t`?(r.preventDefault(),z(),lD(`selection`,`toggle`),e=``):e===`b`?(r.preventDefault(),F(),lD(`selection`,`toggle`),e=``):e===`w`?(r.preventDefault(),I(),lD(`selection`,`toggle`),e=``):e===`n`?(r.preventDefault(),L(),lD(`selection`,`toggle`),e=``):e===`gt`?(r.preventDefault(),h(!0),lD(`medium`,`open`),e=``):e===`?`?(r.preventDefault(),y(!0),lD(`medium`,`open`),e=``):e.length>=2&&(e=``)};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r)}},[F,I,L,R,z,ee]);let te=(0,W.useMemo)(()=>w?(w.comments??[]).filter(e=>e.status===`open`).length:0,[w]);return f||!n?(0,G.jsxs)(`div`,{className:`app plan-app skeleton-app`,style:{"--sidebar-width":`${O}px`},children:[(0,G.jsxs)(`header`,{className:`skeleton-toolbar`,children:[(0,G.jsx)(`div`,{className:`skeleton-item skeleton-logo`,style:{width:`140px`}}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-stats`,style:{width:`80px`,marginLeft:`20px`}}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-actions`,style:{width:`220px`}})]}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{className:`sidebar plan-sidebar skeleton-sidebar ${E?`sidebar-collapsed`:``}`,children:!E&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`skeleton-search`,style:{height:`32px`,margin:`0 16px 16px 16px`}}),(0,G.jsx)(`div`,{className:`skeleton-tree-nodes`,children:Array.from({length:4}).map((e,t)=>(0,G.jsxs)(`div`,{className:`skeleton-tree-node`,style:{paddingLeft:`16px`,height:`40px`,borderBottom:`1px solid var(--border-weak)`},children:[(0,G.jsx)(`div`,{className:`skeleton-node-icon`,style:{width:`20px`,height:`20px`,borderRadius:`50%`}}),(0,G.jsx)(`div`,{className:`skeleton-node-text`,style:{width:`${80+t*30%90}px`,height:`14px`}})]},t))})]})}),!E&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,style:{cursor:`default`}}),(0,G.jsx)(`main`,{className:`main plan-main skeleton-main`,children:(0,G.jsxs)(`div`,{className:`file-diff-card skeleton-card`,style:{border:`1px solid var(--border-color)`,borderRadius:`8px`},children:[(0,G.jsxs)(`div`,{className:`skeleton-card-header`,style:{padding:`16px 20px`},children:[(0,G.jsx)(`div`,{className:`skeleton-card-title`,style:{width:`250px`,height:`20px`}}),(0,G.jsx)(`div`,{className:`skeleton-card-badge`,style:{width:`100px`,height:`24px`}})]}),(0,G.jsxs)(`div`,{className:`skeleton-card-body`,style:{padding:`24px`,background:`var(--bg-secondary)`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`90%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`75%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`85%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`40%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`60%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`80%`,height:`16px`}})]})]})})]})]}):(0,G.jsx)(uD,{enabled:t.haptics??!0,soundsEnabled:t.sounds??!0,children:(0,G.jsxs)(`div`,{className:`app plan-app`,ref:j,style:{"--sidebar-width":`${O}px`},children:[(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:N,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`toolbar plan-app-toolbar`,children:[(0,G.jsxs)(`div`,{className:`toolbar-left`,children:[(0,G.jsx)(`button`,{className:`toolbar-mobile-toggle`,onClick:()=>D(!E),"aria-label":`Toggle sidebar`,title:E?`Open sidebar`:`Close sidebar`,children:(0,G.jsx)(oO,{size:18})}),(0,G.jsxs)(`button`,{className:`btn btn-sm`,onClick:()=>DE(`/`),title:`Back to the diff review`,children:[(0,G.jsx)(jD,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Diff`})]}),(0,G.jsxs)(`h1`,{className:`toolbar-title plan-app-title`,children:[(0,G.jsx)(HD,{size:16,style:{marginRight:`6px`}}),`Plan review`]}),(0,G.jsxs)(`span`,{className:`toolbar-stat`,children:[i.length,` plan`,i.length===1?``:`s`]})]}),(0,G.jsxs)(`div`,{className:`toolbar-right`,children:[(0,G.jsx)(Sk,{open:g,onOpenChange:_,ariaLabel:`Settings`,className:`settings-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn ${g?`btn-active`:``}`,title:`Settings`,children:[(0,G.jsx)(wO,{size:14}),` `,(0,G.jsx)(`span`,{className:`btn-label`,children:`Settings`})]}),children:(0,G.jsxs)(`div`,{className:`popover-scroll settings-panel`,children:[(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Review Options`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`View mode`}),(0,G.jsx)(FA,{value:b,onValueChange:e=>S(e),options:[{value:`source`,label:`Source (commentable)`},{value:`rendered`,label:`Rendered (markdown)`}],ariaLabel:`Plan view mode`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Theme`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{_(!1),h(!0)},style:{display:`inline-flex`,alignItems:`center`},children:[(0,G.jsx)(pO,{size:14,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{children:`Switch Theme...`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Display`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:t.lineWrap,onChange:e=>r({lineWrap:e.target.checked})}),`Wrap long lines`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:t.showLineNumbers,onChange:e=>r({showLineNumbers:e.target.checked})}),`Show line numbers`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hover highlight`}),(0,G.jsx)(FA,{value:t.lineHoverHighlight,onValueChange:e=>r({lineHoverHighlight:e}),options:O0,ariaLabel:`Hover highlight`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Font size`}),(0,G.jsx)(FA,{value:String(t.fontSize),onValueChange:e=>r({fontSize:Number(e)}),options:E0,ariaLabel:`Font size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Default tab size`}),(0,G.jsx)(FA,{value:String(t.defaultTabSize),onValueChange:e=>r({defaultTabSize:Number(e)}),options:D0,ariaLabel:`Default tab size`})]})]})}),w&&(0,G.jsx)(T0,{openCommentCount:te,onSubmit:(e,t)=>l(w.id,e,t),submitting:u,agentWaiting:d,currentDecision:w.decision})]})]}),!E&&(0,G.jsx)(`div`,{className:`sidebar-mobile-backdrop`,onClick:()=>D(!0),"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{ref:M,className:`sidebar plan-sidebar ${E?`sidebar-collapsed`:``}`,children:(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`hidden`},children:(0,G.jsx)(C0,{plans:i,activeId:w?.id??null,onSelect:e=>DE(`/plan/${e}`),onDelete:e=>{o(e),w?.id===e&&DE(`/plan`)},collapsed:E,onToggleCollapse:()=>D(!E)})})}),!E&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:P,role:`separator`,"aria-label":`Resize sidebar`,"aria-orientation":`vertical`,tabIndex:0}),(0,G.jsx)(`main`,{className:`main plan-main`,children:w?(0,G.jsx)(b0,{plan:w,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:FE(t.monoFont),defaultTabSize:t.defaultTabSize,lineWrap:t.lineWrap,showLineNumbers:t.showLineNumbers,lineHoverHighlight:t.lineHoverHighlight,viewMode:b},w.id):(0,G.jsx)(A0,{hasPlans:i.length>0,notFound:!!C})})]}),(0,G.jsx)(l0,{open:m,activeTheme:t.theme||`nord`,onThemeChange:e=>r({theme:e}),onClose:()=>h(!1)}),(0,G.jsx)(s0,{activity:s?{at:s.at,commentId:s.commentId,filePath:`plan comment`,model:s.model,body:s.body}:null,onDismiss:c,onJump:()=>{s&&DE(`/plan/${s.planId}`)}}),(0,G.jsx)(a0,{activeFile:w?w.title:null,onShowHelp:()=>y(!0),placeholder:`No active plan (J/K to jump)`}),(0,G.jsx)(o0,{isOpen:v,onClose:()=>y(!1),mode:`plan`})]})})}function A0({hasPlans:e,notFound:t}){return(0,G.jsxs)(`div`,{className:`plan-empty-state`,children:[(0,G.jsx)(HD,{size:40,style:{opacity:.4}}),t?(0,G.jsx)(`p`,{children:`That plan no longer exists. Pick one from the list, or submit a new plan.`}):e?(0,G.jsx)(`p`,{children:`Select a plan from the list to review it.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{children:`No plans have been submitted for review yet.`}),(0,G.jsxs)(`p`,{className:`plan-empty-hint`,children:[`An agent can submit one with`,` `,(0,G.jsx)(`code`,{children:`diffing plan submit PLAN.md`}),` (or the `,(0,G.jsx)(`code`,{children:`submit_plan`}),` MCP tool), then block on`,` `,(0,G.jsx)(`code`,{children:`diffing plan await`}),` until you approve, reject, or request changes here.`]})]})]})}var j0=[`pr-session`];function M0(){let e=Ve(),{data:t,isLoading:n,error:r}=nt({queryKey:j0,queryFn:async()=>{let e=await fetch(`/api/gh/session`);if(e.status===404)return null;if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()},retry:!1});return(0,W.useEffect)(()=>fE(`pr-session`,()=>{e.invalidateQueries({queryKey:j0})}),[e]),{session:t,loaded:!n,error:r}}var N0=[`pr-comments`];function P0(e){let t=Ve(),{data:n=[]}=nt({queryKey:N0,queryFn:async()=>{let e=await fetch(`/api/gh/pr-session/comments`);if(e.status===404)return[];if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()},enabled:e});(0,W.useEffect)(()=>fE(`pr-session`,()=>{t.invalidateQueries({queryKey:N0})}),[t]);let r=rt({mutationFn:async e=>(await fetch(`/api/gh/pr-session/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json(),onSuccess:e=>{t.setQueryData(N0,(t=[])=>[...t,e])}}),i=rt({mutationFn:async e=>(await fetch(`/api/gh/pr-session/comments/${e}`,{method:`DELETE`}),e),onSuccess:e=>{t.setQueryData(N0,(t=[])=>t.filter(t=>t.id!==e))}}),a=rt({mutationFn:async({id:e,body:t,status:n})=>(await fetch(`/api/gh/pr-session/comments/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,status:n})})).json(),onSuccess:e=>{t.setQueryData(N0,(t=[])=>t.map(t=>t.id===e.id?e:t))}}),o=rt({mutationFn:async({id:e,body:t})=>(await fetch(`/api/gh/pr-session/comments/${e}/replies`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,role:`user`})})).json(),onSuccess:e=>{t.setQueryData(N0,(t=[])=>t.map(t=>t.id===e.id?e:t))}});return{comments:n,addComment:r.mutate,removeComment:i.mutate,updateComment:a.mutate,addReply:o.mutate}}function F0(){return rt({mutationFn:async e=>{let t=await fetch(`/api/gh/submit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({decision:e.decision,body:e.body,dryRun:e.dryRun})}),n=await t.json();if(!t.ok)throw Error(n.error||`HTTP ${t.status}`);return n}})}function I0(){let e=Ve();return rt({mutationFn:async()=>{let e=await fetch(`/api/gh/pr/refresh`,{method:`POST`}),t=await e.json();if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);return t},onSuccess:()=>{e.invalidateQueries({queryKey:j0})}})}function L0({session:e,comments:t,onEditComment:n,onDeleteComment:r}){let{haptic:i,sound:a}=dD(),o=F0(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(``),p=t.length,m=(0,W.useMemo)(()=>[...t].sort((e,t)=>e.createdAt-t.createdAt),[t]),h=!!e.submittedAt,g=async()=>{if(l){i(`heavy`),a(`send`);try{await o.mutateAsync({decision:l,body:d}),f(``),u(null),c(!1)}catch{}}};return(0,G.jsx)(Sk,{open:s,onOpenChange:c,ariaLabel:`Submit your review to GitHub`,className:`srp`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:o.isPending,title:h?`Already submitted`:`Submit your review to the PR on GitHub`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[(0,G.jsx)(eO,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:o.isPending?`Submitting…`:h?`Submitted ✓`:p>0?`Submit to GitHub (${p})`:`Submit to GitHub`})]}),children:(0,G.jsxs)(`div`,{className:`srp-inner`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[(0,G.jsx)(eO,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:`Submit review to GitHub`}),(0,G.jsxs)(`span`,{className:`srp-count`,children:[p,` comment`,p===1?``:`s`]})]}),h&&(0,G.jsxs)(`div`,{className:`srp-already-submitted`,children:[(0,G.jsx)(ND,{size:13}),(0,G.jsxs)(`span`,{children:[`Already submitted as`,` `,e.submittedReviewUrl?(0,G.jsxs)(`a`,{href:e.submittedReviewUrl,target:`_blank`,rel:`noreferrer`,children:[`review #`,e.submittedReviewId,` `,(0,G.jsx)(qD,{size:11})]}):`review #${e.submittedReviewId}`,`. Re-submitting will post a new review on the same PR.`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:R0.map(e=>{let t=e.icon,n=l===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>u(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),p>0?(0,G.jsx)(`ul`,{className:`srp-list`,"aria-label":`Comments to send`,children:m.map(e=>(0,G.jsx)(z0,{comment:e,onEdit:n,onDelete:r},e.id))}):(0,G.jsx)(`p`,{className:`srp-empty`,children:`No inline comments — your verdict and overall note will be sent on their own.`}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`srp-gh-general-input`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(aU,{id:`srp-gh-general-input`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the PR that applies to the whole review…`,rows:3,ariaLabel:`Overall PR review comment`,onSubmitShortcut:g})]}),o.isError&&(0,G.jsxs)(`div`,{className:`srp-error`,role:`alert`,children:[(0,G.jsx)(RD,{size:13}),(0,G.jsx)(`span`,{children:o.error?.message??`Submit failed`})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>c(!1),disabled:o.isPending,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:g,disabled:!l||o.isPending,children:o.isPending?`Submitting…`:`Submit review`})]})]})})}var R0=[{value:`approve`,label:`Approve`,description:`The PR is good — submit an APPROVE review.`,icon:ND,className:`plan-verdict-approve`},{value:`comment`,label:`Comment`,description:`Leave neutral feedback (no approve / no request changes).`,icon:lO,className:`plan-verdict-changes`},{value:`request-changes`,label:`Request changes`,description:`The author must address the comments before merging.`,icon:MO,className:`plan-verdict-reject`}];function z0({comment:e,onEdit:t,onDelete:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(e.body),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{r&&(s.current?.focus(),s.current?.select())},[r]);let c=e.lineNumber>0?e.startLineNumber&&e.startLineNumber!==e.lineNumber?`:${e.startLineNumber}-${e.lineNumber}`:`:${e.lineNumber}`:` · file`,l=()=>{let n=a.trim();n&&n!==e.body&&t(e.id,n),i(!1)};return(0,G.jsxs)(`li`,{className:`srp-item`,children:[(0,G.jsxs)(`div`,{className:`srp-item-top`,children:[(0,G.jsxs)(`span`,{className:`srp-item-loc`,children:[(0,G.jsx)(`span`,{className:`srp-item-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`srp-item-line`,children:c})]}),e.status===`resolved`&&(0,G.jsx)(`span`,{className:`srp-item-resolved`,children:`resolved`}),(0,G.jsxs)(`span`,{className:`srp-item-actions`,children:[r?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:l,title:`Save edit`,children:(0,G.jsx)(ND,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>{o(e.body),i(!1)},title:`Cancel edit`,children:(0,G.jsx)(MO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>i(!0),title:`Edit comment`,children:(0,G.jsx)(_O,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn srp-icon-btn-danger`,onClick:()=>n(e.id),title:`Remove from review`,children:(0,G.jsx)(DO,{size:13,"aria-hidden":`true`})})]})]}),e.lineContent?.trim()&&(0,G.jsx)(`code`,{className:`srp-item-code`,children:e.lineContent.trim().slice(0,160)}),r?(0,G.jsx)(`textarea`,{ref:s,className:`srp-item-edit`,value:a,rows:2,onChange:e=>o(e.target.value),onKeyDown:t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),l()):t.key===`Escape`&&(t.preventDefault(),o(e.body),i(!1))}}):(0,G.jsx)(`p`,{className:`srp-item-body`,children:e.body})]})}function B0({session:e}){let[t,n]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{n(!1)},[e.submittedAt]),t?null:(0,G.jsxs)(`div`,{className:`pr-submitted-toast`,role:`status`,children:[(0,G.jsx)(zD,{size:16,className:`pr-submitted-icon`}),(0,G.jsxs)(`div`,{className:`pr-submitted-text`,children:[(0,G.jsx)(`strong`,{children:`Review submitted to GitHub.`}),e.submittedReviewUrl&&(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsxs)(`a`,{href:e.submittedReviewUrl,target:`_blank`,rel:`noreferrer`,children:[`Open review on GitHub `,(0,G.jsx)(qD,{size:11})]})]}),e.authSource&&(0,G.jsxs)(`span`,{className:`pr-submitted-auth`,children:[`via `,e.authSource]})]}),(0,G.jsx)(`button`,{className:`pr-submitted-dismiss`,onClick:()=>n(!0),title:`Dismiss`,"aria-label":`Dismiss`,children:`×`})]})}function V0(){Am();let{settings:e,loaded:t}=IE();LE(t,e.uiFont,e.monoFont);let{session:n,loaded:r}=M0(),i=I0(),{comments:a,addComment:o,removeComment:s,updateComment:c,addReply:l}=P0(r&&!!n),{patch:u,loading:d,error:f}=gE({staged:!1,untracked:!1},r&&!!n),{viewedFiles:p,setViewed:m}=BE();(0,W.useEffect)(()=>{Uf().catch(()=>{})},[]);let[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[y,b]=(0,W.useState)(()=>{try{let e=mD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}}),x=(0,W.useRef)(y);x.current=y;let S=(0,W.useRef)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null);(0,W.useEffect)(()=>{try{vD(`diffing-sidebar-collapsed`,String(_))}catch{}},[_]);let T=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=x.current,r=C.current,i=w.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),b(o);try{vD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),E=(0,W.useMemo)(()=>{if(!u)return[];try{return Pg(u).flatMap(e=>e.files)}catch{return[]}},[u]),D=(0,W.useMemo)(()=>{let e=new Map;if(!n)return e;for(let t of n.existingComments??[]){let n=e.get(t.path)??[];n.push(t),e.set(t.path,n)}return e},[n]),O=(0,W.useMemo)(()=>{let e=new Map;for(let t of a){let n=e.get(t.filePath)??[];n.push({side:t.side,lineNumber:t.lineNumber,metadata:t}),e.set(t.filePath,n)}return e},[a]),k=n?.existingComments?.length??0;return r&&!n?(0,G.jsxs)(`div`,{className:`pr-app-empty`,children:[(0,G.jsx)(eO,{size:32}),(0,G.jsx)(`h2`,{children:`No active PR session`}),(0,G.jsxs)(`p`,{children:[`Start one with `,(0,G.jsx)(`code`,{children:`diffing "gh pr 1234"`}),` or`,` `,(0,G.jsx)(`code`,{children:`diffing --gh-pr 1234`}),` from inside the repo.`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>DE(`/`),children:`Back to local review`})]}):n?(0,G.jsxs)(`div`,{ref:S,className:`app pr-app`,"data-pr-mode":`true`,children:[(0,G.jsxs)(`header`,{className:`pr-header`,children:[(0,G.jsxs)(`div`,{className:`pr-header-left`,children:[(0,G.jsx)(eO,{size:16,"aria-hidden":`true`}),(0,G.jsxs)(`strong`,{className:`pr-header-ref`,children:[n.owner,`/`,n.repo,`#`,n.pullNumber]}),(0,G.jsx)(`span`,{className:`pr-header-title`,children:n.title})]}),(0,G.jsxs)(`div`,{className:`pr-header-right`,children:[(0,G.jsxs)(`span`,{className:`pr-header-stat`,title:`+${n.additions} -${n.deletions} across ${n.changedFiles} files`,children:[`+`,n.additions,` −`,n.deletions,` · `,n.changedFiles,` files`]}),(0,G.jsxs)(`button`,{className:`btn btn-sm pr-header-copy`,onClick:async()=>{await navigator.clipboard.writeText(vE(a))},disabled:a.length===0,title:`Copy new comments as Markdown`,children:[(0,G.jsx)(GD,{size:12}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Copy`})]}),(0,G.jsxs)(`button`,{className:`btn btn-sm pr-header-refresh`,onClick:()=>i.mutate(),disabled:i.isPending,title:`Re-fetch PR metadata from GitHub`,children:[(0,G.jsx)(yO,{size:12,className:i.isPending?`spinning`:``}),(0,G.jsx)(`span`,{className:`btn-label`,children:i.isPending?`Refreshing…`:`Refresh`})]}),(0,G.jsxs)(`a`,{className:`btn btn-sm pr-header-link`,href:n.url,target:`_blank`,rel:`noreferrer`,title:`Open on GitHub`,children:[(0,G.jsx)(qD,{size:12}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Open`})]}),(0,G.jsx)(L0,{session:n,comments:a,onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s})]})]}),k>0&&(0,G.jsxs)(`div`,{className:`pr-existing-summary`,children:[(0,G.jsx)(sO,{size:12}),(0,G.jsxs)(`span`,{children:[k,` existing review comment`,k===1?``:`s`,` on this PR (read-only context, only your new comments will be posted).`]})]}),f&&(0,G.jsxs)(`div`,{className:`pr-error`,children:[`Failed to load the PR diff: `,f]}),(0,G.jsxs)(`div`,{className:`app-body`,style:{gridTemplateColumns:_?`0 1fr`:`${y}px 1fr`},children:[(0,G.jsxs)(`aside`,{ref:C,className:`sidebar ${_?`sidebar-collapsed`:``}`,style:_?{width:0,display:`none`}:{width:y},children:[(0,G.jsx)(x1,{files:E,activeFile:h,setActiveFile:g,commentCounts:{},existingCommentCounts:Object.fromEntries([...D.entries()].map(([e,t])=>[e,t.length]))}),(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:T,title:`Drag to resize`})]}),(0,G.jsx)(`main`,{className:`main`,children:d&&!u?(0,G.jsx)(`div`,{className:`pr-app-loading`,children:`Loading PR diff…`}):E.length===0?(0,G.jsx)(`div`,{className:`empty-state`,children:(0,G.jsx)(`p`,{children:`No changes found in this PR.`})}):(0,G.jsx)(H0,{files:E,fileAnnotations:O,existingCommentsByFile:D,viewedFiles:p,settings:e,onAddComment:e=>o({filePath:e.filePath,side:e.side,lineNumber:e.lineNumber,startLineNumber:e.startLineNumber,lineContent:e.lineContent,body:e.body}),onReplyComment:(e,t)=>l({id:e,body:t}),onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s,onViewedChange:m})})]}),(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:w,"aria-hidden":`true`}),(0,G.jsx)(w1,{comments:a,files:E,activeFile:h,onSetActiveFile:g,onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s,onAddReply:(e,t)=>l({id:e,body:t}),collapsed:!1,onToggleCollapsed:()=>{}}),n.submittedAt&&(0,G.jsx)(B0,{session:n}),(0,G.jsxs)(`button`,{className:`pr-back-button`,onClick:()=>DE(`/`),title:`Back to local review`,children:[(0,G.jsx)(jD,{size:14}),(0,G.jsx)(`span`,{children:`Back to local`})]})]}):(0,G.jsx)(`div`,{className:`pr-app-empty`,children:(0,G.jsx)(`span`,{children:`Loading PR session…`})})}function H0({files:e,fileAnnotations:t,existingCommentsByFile:n,viewedFiles:r,settings:i,onAddComment:a,onReplyComment:o,onEditComment:s,onDeleteComment:c,onViewedChange:l}){return(0,G.jsx)(`div`,{className:`pr-diff-surface`,children:e.map((e,o)=>{let s=e.name,u=n.get(s)??[];return(0,G.jsxs)(`div`,{className:`pr-file-block`,children:[(0,G.jsx)(aW,{files:[e],diffStyle:`unified`,tabSizeMap:{},defaultTabSize:4,viewedFiles:r,binaryFiles:new Map,theme:i.theme??`github-dark`,lineDiffType:`none`,lineWrap:!1,diffIndicators:`none`,showLineNumbers:!0,hunkSeparators:`line-numbers`,lineHoverHighlight:`none`,fontSize:i.fontSize??13,monoFontFamily:i.monoFont??`ui-monospace, SFMono-Regular, Menlo, monospace`,expandContextByDefault:!1,collapsedContextThreshold:2**53-1,expansionLineCount:0,onViewedChange:l,fileAnnotationsMap:new Map([[s,t.get(s)??[]]]),onAddComment:(...e)=>{let[t,n,r,i,o,s]=e;a({filePath:t,side:n,lineNumber:r,lineContent:i,body:o,startLineNumber:s})},onDeleteComment:c}),u.length>0&&(0,G.jsxs)(`div`,{className:`pr-existing-strip`,children:[(0,G.jsxs)(`div`,{className:`pr-existing-strip-head`,children:[(0,G.jsx)(sO,{size:11}),(0,G.jsxs)(`span`,{children:[u.length,` existing comment`,u.length===1?``:`s`,` on this file`]})]}),(0,G.jsx)(`ul`,{className:`pr-existing-strip-list`,children:u.map(e=>(0,G.jsxs)(`li`,{className:`pr-existing-strip-item`,children:[(0,G.jsxs)(`div`,{className:`pr-existing-strip-meta`,children:[(0,G.jsxs)(`strong`,{children:[`@`,e.author?.login??`unknown`]}),(0,G.jsx)(`span`,{className:`pr-existing-strip-line`,children:e.line==null?`· file`:`:${e.line}`}),e.state&&(0,G.jsx)(`span`,{className:`pr-existing-strip-state pr-state-${e.state.toLowerCase()}`,children:e.state.toLowerCase().replace(`_`,` `)}),e.replies.length>0&&(0,G.jsxs)(`span`,{className:`pr-existing-strip-replies`,children:[`+`,e.replies.length,` repl`,e.replies.length===1?`y`:`ies`]})]}),(0,G.jsx)(`p`,{className:`pr-existing-strip-body`,children:e.body})]},e.id))})]})]},`${s}-${o}`)})})}function U0(){let e=jE(),[t,n]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{pD().then(()=>{n(!0)})},[]),t?e===`/plan`||e.startsWith(`/plan/`)?(0,G.jsx)(k0,{}):e===`/gh/pr`||e.startsWith(`/gh/pr/`)?(0,G.jsx)(V0,{}):(0,G.jsx)(p0,{}):(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,width:`100vw`,background:`#0d1117`,color:`#c9d1d9`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`},children:[(0,G.jsx)(`div`,{style:{width:`32px`,height:`32px`,border:`3px solid rgba(139, 148, 158, 0.15)`,borderTop:`3px solid #58a6ff`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`,marginBottom:`16px`}}),(0,G.jsx)(`span`,{style:{fontSize:`13px`,fontWeight:500,opacity:.75,letterSpacing:`0.3px`},children:`Loading review session...`}),(0,G.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`
|
|
3917
|
+
`}var b0={pending:{icon:VD,className:`plan-badge-pending`,label:`Pending`},approved:{icon:jD,className:`plan-badge-approved`,label:`Approved`},"changes-requested":{icon:sO,className:`plan-badge-changes`,label:`Changes`},rejected:{icon:AO,className:`plan-badge-rejected`,label:`Rejected`},"comment-only":{icon:cO,className:`plan-badge-comment-only`,label:`Comment only`}};function x0({plans:e,activeId:t,onSelect:n,onDelete:r,collapsed:i,onToggleCollapse:a}){let[o,s]=(0,W.useState)(``),c=(0,W.useMemo)(()=>[...e].sort((e,t)=>t.createdAt-e.createdAt),[e]),l=(0,W.useMemo)(()=>c.filter(e=>e.title.toLowerCase().includes(o.toLowerCase())),[c,o]);return i?(0,G.jsx)(`div`,{className:`ft`,children:(0,G.jsx)(`div`,{className:`ft-search`,children:a&&(0,G.jsx)($T,{content:`Expand sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:a,"aria-label":`Expand sidebar`,children:(0,G.jsx)(pO,{size:16})})})})}):(0,G.jsxs)(`div`,{className:`ft`,style:{display:`flex`,flexDirection:`column`,height:`100%`},children:[(0,G.jsxs)(`div`,{className:`ft-search`,children:[a&&(0,G.jsx)($T,{content:`Collapse sidebar`,side:`right`,children:(0,G.jsx)(`button`,{className:`sidebar-toggle`,onClick:a,"aria-label":`Collapse sidebar`,children:(0,G.jsx)(fO,{size:16})})}),(0,G.jsxs)(`div`,{className:`ft-search-wrapper`,children:[(0,G.jsx)(xO,{size:14,className:`ft-search-icon`}),(0,G.jsx)(`input`,{type:`text`,placeholder:`Filter plans...`,value:o,onChange:e=>s(e.target.value),className:`ft-search-input`})]})]}),(0,G.jsxs)(`div`,{className:`plan-list-scroll`,style:{flex:1,minHeight:0,overflow:`auto`},children:[(0,G.jsxs)(`div`,{className:`plan-list-header`,children:[`Plans (`,l.length,`)`]}),l.length===0&&(0,G.jsx)(`div`,{className:`plan-list-empty`,children:o?`No matching plans found.`:`No plans submitted yet.`}),l.map(e=>{let i=b0[e.decision],a=i.icon,o=(e.comments??[]).filter(e=>e.status===`open`).length;return(0,G.jsxs)(`div`,{className:`plan-list-item ${e.id===t?`plan-list-item-active`:``}`,onClick:()=>n(e.id),role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e.id))},children:[(0,G.jsxs)(`div`,{className:`plan-list-item-top`,children:[(0,G.jsx)(`span`,{className:`plan-badge plan-badge-dot ${i.className}`,title:i.label,children:(0,G.jsx)(a,{size:11,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`plan-list-item-title`,title:e.title,children:e.title}),(0,G.jsx)(`button`,{className:`plan-list-delete`,title:`Delete plan`,onClick:t=>{t.stopPropagation(),r(e.id)},children:(0,G.jsx)(TO,{size:12,"aria-hidden":`true`})})]}),(0,G.jsxs)(`div`,{className:`plan-list-item-sub`,children:[(0,G.jsxs)(`span`,{children:[`v`,e.version]}),o>0&&(0,G.jsxs)(`span`,{children:[`· `,o,` open`]}),e.model&&(0,G.jsxs)(`span`,{className:`plan-list-item-model`,children:[`· `,(0,G.jsx)(AD,{size:10,"aria-hidden":`true`}),` `,e.model]}),(0,G.jsxs)(`span`,{className:`plan-list-item-time`,children:[`· `,eE(e.createdAt)]})]})]},e.id)})]})]})}var S0=[{value:`approved`,label:`Approve`,description:`The plan looks good — the agent should proceed.`,icon:jD,className:`plan-verdict-approve`},{value:`changes-requested`,label:`Request changes`,description:`The agent should revise the plan and resubmit it.`,icon:sO,className:`plan-verdict-changes`},{value:`rejected`,label:`Reject`,description:`Don't proceed — the approach needs rethinking.`,icon:AO,className:`plan-verdict-reject`},{value:`comment-only`,label:`Comment only`,description:`Agent must NOT edit files — only reply to comments. General note goes to chat.`,icon:cO,className:`plan-verdict-comment-only`}];function C0({openCommentCount:e,onSubmit:t,submitting:n,agentWaiting:r,currentDecision:i}){let{haptic:a,sound:o}=lD(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(``),p=async()=>{l&&(a(`heavy`),o(`send`),await t(l,d,l===`comment-only`?`comment-only`:`standard`),f(``),u(null),c(!1))},m=i!==`pending`;return(0,G.jsx)(bk,{open:s,onOpenChange:c,ariaLabel:`Submit plan review`,className:`submit-plan-review-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:n,title:r?`An agent is connected and waiting for your verdict`:`Submit your verdict on this plan`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[r&&(0,G.jsx)(`span`,{className:`agent-waiting-dot`,"aria-hidden":`true`}),m?(0,G.jsx)(_O,{size:14}):(0,G.jsx)(zD,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:n?`Submitting…`:m?`Update review`:`Submit review`})]}),children:(0,G.jsxs)(`div`,{className:`srp`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[m?(0,G.jsx)(_O,{size:15,"aria-hidden":`true`}):(0,G.jsx)(zD,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:m?`Update plan review`:`Submit plan review`}),e>0&&(0,G.jsxs)(`span`,{className:`srp-count`,children:[e,` open comment`,e===1?``:`s`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:S0.map(e=>{let t=e.icon,n=l===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>u(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`plan-decision-comment`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(rU,{id:`plan-decision-comment`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the agent that applies to the whole plan…`,rows:3,ariaLabel:`Overall plan review comment`,onSubmitShortcut:p})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>c(!1),disabled:n,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:p,disabled:!l||n,children:n?`Submitting…`:`Submit review`})]})]})})}var w0=[11,12,13,14,15,16].map(e=>({value:String(e),label:`${e}px`})),T0=[2,4,8].map(e=>({value:String(e),label:String(e)})),E0=[{value:`both`,label:`Both`},{value:`line`,label:`Line only`},{value:`number`,label:`Number only`},{value:`disabled`,label:`Disabled`}];function D0(){let e=Am(),{settings:t,loaded:n,updateSettings:r}=IE();LE(n,t.uiFont,t.monoFont);let{plans:i,getPlan:a,removePlan:o,agentActivity:s,clearAgentActivity:c,submitDecision:l,submitting:u,agentWaiting:d,isLoading:f}=wE(),p=jE(),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`,`||e.code===`Comma`)&&(e.preventDefault(),_(e=>!e))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[]);let[b,x]=(0,W.useState)(()=>{try{return fD(`diffing-plan-view-mode`)===`rendered`?`rendered`:`source`}catch{return`source`}}),S=(0,W.useCallback)(e=>{x(e);try{gD(`diffing-plan-view-mode`,e)}catch{}},[]),C=(0,W.useMemo)(()=>{let e=/^\/plan\/([^/]+)/.exec(p);return e?decodeURIComponent(e[1]):null},[p]),w=(0,W.useMemo)(()=>C?a(C):i.length===0?null:[...i].reverse().find(e=>e.decision===`pending`)??i[i.length-1],[C,i,a]),T=(0,W.useMemo)(()=>nE[t.theme||`nord`]||nE.nord,[t.theme]);(0,W.useEffect)(()=>{let e=t.theme||`nord`,n=document.documentElement;n.classList.add(`theme-switching`),n.setAttribute(`data-theme`,e);let r=requestAnimationFrame(()=>{requestAnimationFrame(()=>n.classList.remove(`theme-switching`))});return()=>cancelAnimationFrame(r)},[t.theme]),(0,W.useEffect)(()=>{e&&e.setRenderOptions({theme:{dark:T.type===`dark`?T.themeName:`nord`,light:T.type===`light`?T.themeName:`github-light`}}).catch(e=>console.error(`Failed to set worker pool render options:`,e))},[e,T]),(0,W.useEffect)(()=>{let e=T.type===`dark`?T.themeName:`nord`,t=T.type===`light`?T.themeName:`github-light`;Uf({themes:Array.from(new Set([e,t])),langs:[]}).catch(()=>{})},[T]);let[E,D]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[O,k]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}});(0,W.useEffect)(()=>{try{gD(`diffing-sidebar-collapsed`,String(E))}catch{}},[E]);let A=(0,W.useRef)(O);A.current=O;let j=(0,W.useRef)(null),M=(0,W.useRef)(null),N=(0,W.useRef)(null),P=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=A.current,r=M.current,i=N.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),k(o);try{gD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),F=(0,W.useCallback)(()=>{D(e=>!e)},[]),I=(0,W.useCallback)(()=>{r({lineWrap:!t.lineWrap})},[t.lineWrap,r]),L=(0,W.useCallback)(()=>{r({showLineNumbers:!t.showLineNumbers})},[t.showLineNumbers,r]),R=(0,W.useCallback)(()=>{S(b===`source`?`rendered`:`source`)},[b,S]),z=(0,W.useCallback)(()=>{let e=[2,4,8],n=t.defaultTabSize||4;r({defaultTabSize:e[(e.indexOf(n)+1)%e.length]})},[t.defaultTabSize,r]),ee=(0,W.useCallback)(e=>{if(i.length===0)return;let t=[...i].sort((e,t)=>t.createdAt-e.createdAt),n=0;if(w){let r=t.findIndex(e=>e.id===w.id);r!==-1&&(n=e===`next`?Math.min(r+1,t.length-1):Math.max(r-1,0))}let r=t[n];DE(`/plan/${r.id}`)},[i,w]);(0,W.useEffect)(()=>{let e=``,t,n=0,r=r=>{let i=document.activeElement;if(i){let e=i.tagName.toLowerCase();if(e===`input`||e===`textarea`||i.hasAttribute(`contenteditable`))return}clearTimeout(t);let a=r.key;if(r.ctrlKey){a===`d`?(r.preventDefault(),window.scrollBy({top:window.innerHeight/2,behavior:`auto`}),sD(`selection`,`navigate`),e=``):a===`u`&&(r.preventDefault(),window.scrollBy({top:-window.innerHeight/2,behavior:`auto`}),sD(`selection`,`navigate`),e=``);return}if(!(a.length>1&&a!==`Escape`&&a!==`Enter`))if(e+=a,t=setTimeout(()=>{e=``},800),e===`j`){r.preventDefault(),window.scrollBy({top:100,behavior:`auto`});let t=Date.now();t-n>80&&(aD(`navigate`),n=t),e=``}else if(e===`k`){r.preventDefault(),window.scrollBy({top:-100,behavior:`auto`});let t=Date.now();t-n>80&&(aD(`navigate`),n=t),e=``}else e===`gg`?(r.preventDefault(),window.scrollTo({top:0,behavior:`auto`}),sD(`selection`,`navigate`),e=``):e===`G`?(r.preventDefault(),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`auto`}),sD(`selection`,`navigate`),e=``):e===`J`?(r.preventDefault(),ee(`next`),sD(`selection`,`navigate`),e=``):e===`K`?(r.preventDefault(),ee(`prev`),sD(`selection`,`navigate`),e=``):e===`m`?(r.preventDefault(),R(),sD(`selection`,`toggle`),e=``):e===`t`?(r.preventDefault(),z(),sD(`selection`,`toggle`),e=``):e===`b`?(r.preventDefault(),F(),sD(`selection`,`toggle`),e=``):e===`w`?(r.preventDefault(),I(),sD(`selection`,`toggle`),e=``):e===`n`?(r.preventDefault(),L(),sD(`selection`,`toggle`),e=``):e===`gt`?(r.preventDefault(),h(!0),sD(`medium`,`open`),e=``):e===`?`?(r.preventDefault(),y(!0),sD(`medium`,`open`),e=``):e.length>=2&&(e=``)};return window.addEventListener(`keydown`,r),()=>{window.removeEventListener(`keydown`,r)}},[F,I,L,R,z,ee]);let te=(0,W.useMemo)(()=>w?(w.comments??[]).filter(e=>e.status===`open`).length:0,[w]);return f||!n?(0,G.jsxs)(`div`,{className:`app plan-app skeleton-app`,style:{"--sidebar-width":`${O}px`},children:[(0,G.jsxs)(`header`,{className:`skeleton-toolbar`,children:[(0,G.jsx)(`div`,{className:`skeleton-item skeleton-logo`,style:{width:`140px`}}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-stats`,style:{width:`80px`,marginLeft:`20px`}}),(0,G.jsx)(`div`,{className:`skeleton-item skeleton-actions`,style:{width:`220px`}})]}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{className:`sidebar plan-sidebar skeleton-sidebar ${E?`sidebar-collapsed`:``}`,children:!E&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`skeleton-search`,style:{height:`32px`,margin:`0 16px 16px 16px`}}),(0,G.jsx)(`div`,{className:`skeleton-tree-nodes`,children:Array.from({length:4}).map((e,t)=>(0,G.jsxs)(`div`,{className:`skeleton-tree-node`,style:{paddingLeft:`16px`,height:`40px`,borderBottom:`1px solid var(--border-weak)`},children:[(0,G.jsx)(`div`,{className:`skeleton-node-icon`,style:{width:`20px`,height:`20px`,borderRadius:`50%`}}),(0,G.jsx)(`div`,{className:`skeleton-node-text`,style:{width:`${80+t*30%90}px`,height:`14px`}})]},t))})]})}),!E&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,style:{cursor:`default`}}),(0,G.jsx)(`main`,{className:`main plan-main skeleton-main`,children:(0,G.jsxs)(`div`,{className:`file-diff-card skeleton-card`,style:{border:`1px solid var(--border-color)`,borderRadius:`8px`},children:[(0,G.jsxs)(`div`,{className:`skeleton-card-header`,style:{padding:`16px 20px`},children:[(0,G.jsx)(`div`,{className:`skeleton-card-title`,style:{width:`250px`,height:`20px`}}),(0,G.jsx)(`div`,{className:`skeleton-card-badge`,style:{width:`100px`,height:`24px`}})]}),(0,G.jsxs)(`div`,{className:`skeleton-card-body`,style:{padding:`24px`,background:`var(--bg-secondary)`,display:`flex`,flexDirection:`column`,gap:`16px`},children:[(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`90%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`75%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`85%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`40%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`60%`,height:`16px`}}),(0,G.jsx)(`div`,{className:`skeleton-code-line`,style:{width:`80%`,height:`16px`}})]})]})})]})]}):(0,G.jsx)(cD,{enabled:t.haptics??!0,soundsEnabled:t.sounds??!0,children:(0,G.jsxs)(`div`,{className:`app plan-app`,ref:j,style:{"--sidebar-width":`${O}px`},children:[(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:N,"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`toolbar plan-app-toolbar`,children:[(0,G.jsxs)(`div`,{className:`toolbar-left`,children:[(0,G.jsx)(`button`,{className:`toolbar-mobile-toggle`,onClick:()=>D(!E),"aria-label":`Toggle sidebar`,title:E?`Open sidebar`:`Close sidebar`,children:(0,G.jsx)(iO,{size:18})}),(0,G.jsxs)(`button`,{className:`btn btn-sm`,onClick:()=>DE(`/`),title:`Back to the diff review`,children:[(0,G.jsx)(kD,{size:14,style:{marginRight:`6px`}}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Diff`})]}),(0,G.jsxs)(`h1`,{className:`toolbar-title plan-app-title`,children:[(0,G.jsx)(BD,{size:16,style:{marginRight:`6px`}}),`Plan review`]}),(0,G.jsxs)(`span`,{className:`toolbar-stat`,children:[i.length,` plan`,i.length===1?``:`s`]})]}),(0,G.jsxs)(`div`,{className:`toolbar-right`,children:[(0,G.jsx)(bk,{open:g,onOpenChange:_,ariaLabel:`Settings`,className:`settings-popover`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn ${g?`btn-active`:``}`,title:`Settings`,children:[(0,G.jsx)(SO,{size:14}),` `,(0,G.jsx)(`span`,{className:`btn-label`,children:`Settings`})]}),children:(0,G.jsxs)(`div`,{className:`popover-scroll settings-panel`,children:[(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Review Options`}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`View mode`}),(0,G.jsx)(NA,{value:b,onValueChange:e=>S(e),options:[{value:`source`,label:`Source (commentable)`},{value:`rendered`,label:`Rendered (markdown)`}],ariaLabel:`Plan view mode`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Theme`}),(0,G.jsxs)(`button`,{className:`btn btn-sm settings-btn`,onClick:()=>{_(!1),h(!0)},style:{display:`inline-flex`,alignItems:`center`},children:[(0,G.jsx)(dO,{size:14,style:{marginRight:`4px`}}),(0,G.jsx)(`span`,{children:`Switch Theme...`})]})]}),(0,G.jsx)(`div`,{className:`settings-section-label`,children:`Display`}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:t.lineWrap,onChange:e=>r({lineWrap:e.target.checked})}),`Wrap long lines`]}),(0,G.jsxs)(`label`,{className:`settings-item`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:t.showLineNumbers,onChange:e=>r({showLineNumbers:e.target.checked})}),`Show line numbers`]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Hover highlight`}),(0,G.jsx)(NA,{value:t.lineHoverHighlight,onValueChange:e=>r({lineHoverHighlight:e}),options:E0,ariaLabel:`Hover highlight`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Font size`}),(0,G.jsx)(NA,{value:String(t.fontSize),onValueChange:e=>r({fontSize:Number(e)}),options:w0,ariaLabel:`Font size`})]}),(0,G.jsxs)(`div`,{className:`settings-item settings-item-spaced`,children:[(0,G.jsx)(`span`,{children:`Default tab size`}),(0,G.jsx)(NA,{value:String(t.defaultTabSize),onValueChange:e=>r({defaultTabSize:Number(e)}),options:T0,ariaLabel:`Default tab size`})]})]})}),w&&(0,G.jsx)(C0,{openCommentCount:te,onSubmit:(e,t)=>l(w.id,e,t),submitting:u,agentWaiting:d,currentDecision:w.decision})]})]}),!E&&(0,G.jsx)(`div`,{className:`sidebar-mobile-backdrop`,onClick:()=>D(!0),"aria-hidden":`true`}),(0,G.jsxs)(`div`,{className:`app-body`,children:[(0,G.jsx)(`aside`,{ref:M,className:`sidebar plan-sidebar ${E?`sidebar-collapsed`:``}`,children:(0,G.jsx)(`div`,{style:{flex:1,minHeight:0,overflow:`hidden`},children:(0,G.jsx)(x0,{plans:i,activeId:w?.id??null,onSelect:e=>DE(`/plan/${e}`),onDelete:e=>{o(e),w?.id===e&&DE(`/plan`)},collapsed:E,onToggleCollapse:()=>D(!E)})})}),!E&&(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:P,role:`separator`,"aria-label":`Resize sidebar`,"aria-orientation":`vertical`,tabIndex:0}),(0,G.jsx)(`main`,{className:`main plan-main`,children:w?(0,G.jsx)(v0,{plan:w,theme:t.theme||`nord`,fontSize:t.fontSize,monoFontFamily:FE(t.monoFont),defaultTabSize:t.defaultTabSize,lineWrap:t.lineWrap,showLineNumbers:t.showLineNumbers,lineHoverHighlight:t.lineHoverHighlight,viewMode:b},w.id):(0,G.jsx)(O0,{hasPlans:i.length>0,notFound:!!C})})]}),(0,G.jsx)(s0,{open:m,activeTheme:t.theme||`nord`,onThemeChange:e=>r({theme:e}),onClose:()=>h(!1)}),(0,G.jsx)(a0,{activity:s?{at:s.at,commentId:s.commentId,filePath:`plan comment`,model:s.model,body:s.body}:null,onDismiss:c,onJump:()=>{s&&DE(`/plan/${s.planId}`)}}),(0,G.jsx)(r0,{activeFile:w?w.title:null,onShowHelp:()=>y(!0),placeholder:`No active plan (J/K to jump)`}),(0,G.jsx)(i0,{isOpen:v,onClose:()=>y(!1),mode:`plan`})]})})}function O0({hasPlans:e,notFound:t}){return(0,G.jsxs)(`div`,{className:`plan-empty-state`,children:[(0,G.jsx)(BD,{size:40,style:{opacity:.4}}),t?(0,G.jsx)(`p`,{children:`That plan no longer exists. Pick one from the list, or submit a new plan.`}):e?(0,G.jsx)(`p`,{children:`Select a plan from the list to review it.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`p`,{children:`No plans have been submitted for review yet.`}),(0,G.jsxs)(`p`,{className:`plan-empty-hint`,children:[`An agent can submit one with`,` `,(0,G.jsx)(`code`,{children:`diffing plan submit PLAN.md`}),` (or the `,(0,G.jsx)(`code`,{children:`submit_plan`}),` MCP tool), then block on`,` `,(0,G.jsx)(`code`,{children:`diffing plan await`}),` until you approve, reject, or request changes here.`]})]})]})}var k0=[`pr-session`];function A0(){let e=Ve(),{data:t,isLoading:n,error:r}=nt({queryKey:k0,queryFn:async()=>{let e=await fetch(`/api/gh/session`);if(e.status===404)return null;if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()},retry:!1});return(0,W.useEffect)(()=>fE(`pr-session`,()=>{e.invalidateQueries({queryKey:k0})}),[e]),{session:t,loaded:!n,error:r}}var j0=[`pr-comments`];function M0(e){let t=Ve(),{data:n=[]}=nt({queryKey:j0,queryFn:async()=>{let e=await fetch(`/api/gh/pr-session/comments`);if(e.status===404)return[];if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()},enabled:e});(0,W.useEffect)(()=>fE(`pr-session`,()=>{t.invalidateQueries({queryKey:j0})}),[t]);let r=rt({mutationFn:async e=>(await fetch(`/api/gh/pr-session/comments`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).json(),onSuccess:e=>{t.setQueryData(j0,(t=[])=>[...t,e])}}),i=rt({mutationFn:async e=>(await fetch(`/api/gh/pr-session/comments/${e}`,{method:`DELETE`}),e),onSuccess:e=>{t.setQueryData(j0,(t=[])=>t.filter(t=>t.id!==e))}}),a=rt({mutationFn:async({id:e,body:t,status:n})=>(await fetch(`/api/gh/pr-session/comments/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,status:n})})).json(),onSuccess:e=>{t.setQueryData(j0,(t=[])=>t.map(t=>t.id===e.id?e:t))}}),o=rt({mutationFn:async({id:e,body:t})=>(await fetch(`/api/gh/pr-session/comments/${e}/replies`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({body:t,role:`user`})})).json(),onSuccess:e=>{t.setQueryData(j0,(t=[])=>t.map(t=>t.id===e.id?e:t))}});return{comments:n,addComment:r.mutate,removeComment:i.mutate,updateComment:a.mutate,addReply:o.mutate}}function N0(){return rt({mutationFn:async e=>{let t=await fetch(`/api/gh/submit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({decision:e.decision,body:e.body,dryRun:e.dryRun})}),n=await t.json();if(!t.ok)throw Error(n.error||`HTTP ${t.status}`);return n}})}function P0(){let e=Ve();return rt({mutationFn:async()=>{let e=await fetch(`/api/gh/pr/refresh`,{method:`POST`}),t=await e.json();if(!e.ok)throw Error(t.error||`HTTP ${e.status}`);return t},onSuccess:()=>{e.invalidateQueries({queryKey:k0})}})}function F0({session:e,comments:t,onEditComment:n,onDeleteComment:r}){let{haptic:i,sound:a}=lD(),o=N0(),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(``),p=t.length,m=(0,W.useMemo)(()=>[...t].sort((e,t)=>e.createdAt-t.createdAt),[t]),h=!!e.submittedAt,g=async()=>{if(l){i(`heavy`),a(`send`);try{await o.mutateAsync({decision:l,body:d}),f(``),u(null),c(!1)}catch{}}};return(0,G.jsx)(bk,{open:s,onOpenChange:c,ariaLabel:`Submit your review to GitHub`,className:`srp`,trigger:(0,G.jsxs)(`button`,{className:`btn btn-primary btn-sm send-review-btn`,disabled:o.isPending,title:h?`Already submitted`:`Submit your review to the PR on GitHub`,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[(0,G.jsx)(QD,{size:14}),(0,G.jsx)(`span`,{className:`btn-label`,children:o.isPending?`Submitting…`:h?`Submitted ✓`:p>0?`Submit to GitHub (${p})`:`Submit to GitHub`})]}),children:(0,G.jsxs)(`div`,{className:`srp-inner`,children:[(0,G.jsxs)(`div`,{className:`srp-head`,children:[(0,G.jsx)(QD,{size:15,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`srp-title`,children:`Submit review to GitHub`}),(0,G.jsxs)(`span`,{className:`srp-count`,children:[p,` comment`,p===1?``:`s`]})]}),h&&(0,G.jsxs)(`div`,{className:`srp-already-submitted`,children:[(0,G.jsx)(jD,{size:13}),(0,G.jsxs)(`span`,{children:[`Already submitted as`,` `,e.submittedReviewUrl?(0,G.jsxs)(`a`,{href:e.submittedReviewUrl,target:`_blank`,rel:`noreferrer`,children:[`review #`,e.submittedReviewId,` `,(0,G.jsx)(GD,{size:11})]}):`review #${e.submittedReviewId}`,`. Re-submitting will post a new review on the same PR.`]})]}),(0,G.jsx)(`div`,{className:`plan-verdict-options`,role:`radiogroup`,"aria-label":`Verdict`,children:I0.map(e=>{let t=e.icon,n=l===e.value;return(0,G.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`plan-verdict-option ${e.className} ${n?`plan-verdict-option-selected`:``}`,onClick:()=>u(e.value),children:[(0,G.jsx)(`span`,{className:`plan-verdict-icon`,children:(0,G.jsx)(t,{size:15,"aria-hidden":`true`})}),(0,G.jsxs)(`span`,{className:`plan-verdict-text`,children:[(0,G.jsx)(`span`,{className:`plan-verdict-label`,children:e.label}),(0,G.jsx)(`span`,{className:`plan-verdict-desc`,children:e.description})]}),(0,G.jsx)(`span`,{className:`plan-verdict-radio`,"aria-hidden":`true`})]},e.value)})}),p>0?(0,G.jsx)(`ul`,{className:`srp-list`,"aria-label":`Comments to send`,children:m.map(e=>(0,G.jsx)(L0,{comment:e,onEdit:n,onDelete:r},e.id))}):(0,G.jsx)(`p`,{className:`srp-empty`,children:`No inline comments — your verdict and overall note will be sent on their own.`}),(0,G.jsxs)(`div`,{className:`srp-general`,children:[(0,G.jsxs)(`label`,{className:`srp-general-label`,htmlFor:`srp-gh-general-input`,children:[`Overall comment `,(0,G.jsx)(`span`,{className:`srp-optional`,children:`(optional · Markdown)`})]}),(0,G.jsx)(rU,{id:`srp-gh-general-input`,value:d,onChange:f,textareaClassName:`srp-general-input`,placeholder:`Add an overall note for the PR that applies to the whole review…`,rows:3,ariaLabel:`Overall PR review comment`,onSubmitShortcut:g})]}),o.isError&&(0,G.jsxs)(`div`,{className:`srp-error`,role:`alert`,children:[(0,G.jsx)(ID,{size:13}),(0,G.jsx)(`span`,{children:o.error?.message??`Submit failed`})]}),(0,G.jsxs)(`div`,{className:`srp-footer`,children:[(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>c(!1),disabled:o.isPending,children:`Cancel`}),(0,G.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:g,disabled:!l||o.isPending,children:o.isPending?`Submitting…`:`Submit review`})]})]})})}var I0=[{value:`approve`,label:`Approve`,description:`The PR is good — submit an APPROVE review.`,icon:jD,className:`plan-verdict-approve`},{value:`comment`,label:`Comment`,description:`Leave neutral feedback (no approve / no request changes).`,icon:sO,className:`plan-verdict-changes`},{value:`request-changes`,label:`Request changes`,description:`The author must address the comments before merging.`,icon:AO,className:`plan-verdict-reject`}];function L0({comment:e,onEdit:t,onDelete:n}){let[r,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(e.body),s=(0,W.useRef)(null);(0,W.useEffect)(()=>{r&&(s.current?.focus(),s.current?.select())},[r]);let c=e.lineNumber>0?e.startLineNumber&&e.startLineNumber!==e.lineNumber?`:${e.startLineNumber}-${e.lineNumber}`:`:${e.lineNumber}`:` · file`,l=()=>{let n=a.trim();n&&n!==e.body&&t(e.id,n),i(!1)};return(0,G.jsxs)(`li`,{className:`srp-item`,children:[(0,G.jsxs)(`div`,{className:`srp-item-top`,children:[(0,G.jsxs)(`span`,{className:`srp-item-loc`,children:[(0,G.jsx)(`span`,{className:`srp-item-file`,children:tE(e.filePath)}),(0,G.jsx)(`span`,{className:`srp-item-line`,children:c})]}),e.status===`resolved`&&(0,G.jsx)(`span`,{className:`srp-item-resolved`,children:`resolved`}),(0,G.jsxs)(`span`,{className:`srp-item-actions`,children:[r?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:l,title:`Save edit`,children:(0,G.jsx)(jD,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>{o(e.body),i(!1)},title:`Cancel edit`,children:(0,G.jsx)(AO,{size:13,"aria-hidden":`true`})})]}):(0,G.jsx)(`button`,{className:`srp-icon-btn`,onClick:()=>i(!0),title:`Edit comment`,children:(0,G.jsx)(hO,{size:13,"aria-hidden":`true`})}),(0,G.jsx)(`button`,{className:`srp-icon-btn srp-icon-btn-danger`,onClick:()=>n(e.id),title:`Remove from review`,children:(0,G.jsx)(TO,{size:13,"aria-hidden":`true`})})]})]}),e.lineContent?.trim()&&(0,G.jsx)(`code`,{className:`srp-item-code`,children:e.lineContent.trim().slice(0,160)}),r?(0,G.jsx)(`textarea`,{ref:s,className:`srp-item-edit`,value:a,rows:2,onChange:e=>o(e.target.value),onKeyDown:t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),l()):t.key===`Escape`&&(t.preventDefault(),o(e.body),i(!1))}}):(0,G.jsx)(`p`,{className:`srp-item-body`,children:e.body})]})}function R0({session:e}){let[t,n]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{n(!1)},[e.submittedAt]),t?null:(0,G.jsxs)(`div`,{className:`pr-submitted-toast`,role:`status`,children:[(0,G.jsx)(LD,{size:16,className:`pr-submitted-icon`}),(0,G.jsxs)(`div`,{className:`pr-submitted-text`,children:[(0,G.jsx)(`strong`,{children:`Review submitted to GitHub.`}),e.submittedReviewUrl&&(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsxs)(`a`,{href:e.submittedReviewUrl,target:`_blank`,rel:`noreferrer`,children:[`Open review on GitHub `,(0,G.jsx)(GD,{size:11})]})]}),e.authSource&&(0,G.jsxs)(`span`,{className:`pr-submitted-auth`,children:[`via `,e.authSource]})]}),(0,G.jsx)(`button`,{className:`pr-submitted-dismiss`,onClick:()=>n(!0),title:`Dismiss`,"aria-label":`Dismiss`,children:`×`})]})}function z0(){Am();let{settings:e,loaded:t}=IE();LE(t,e.uiFont,e.monoFont);let{session:n,loaded:r}=A0(),i=P0(),{comments:a,addComment:o,removeComment:s,updateComment:c,addReply:l}=M0(r&&!!n),{patch:u,loading:d,error:f}=gE({staged:!1,untracked:!1},r&&!!n),{viewedFiles:p,setViewed:m}=BE();(0,W.useEffect)(()=>{Uf().catch(()=>{})},[]);let[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-collapsed`);if(e!=null)return e===`true`}catch{}return typeof window<`u`&&window.innerWidth<=768}),[y,b]=(0,W.useState)(()=>{try{let e=fD(`diffing-sidebar-width`);return e?Number(e):320}catch{return 320}}),x=(0,W.useRef)(y);x.current=y;let S=(0,W.useRef)(null),C=(0,W.useRef)(null),w=(0,W.useRef)(null);(0,W.useEffect)(()=>{try{gD(`diffing-sidebar-collapsed`,String(_))}catch{}},[_]);let T=(0,W.useCallback)(e=>{e.preventDefault();let t=e.clientX,n=x.current,r=C.current,i=w.current,a=r?r.getBoundingClientRect().left:0,o=n,s=0,c=()=>{s=0,i&&(i.style.transform=`translateX(${a+o}px)`)};i&&(i.style.transform=`translateX(${a+n}px)`,i.classList.add(`sidebar-resize-guide-active`));let l=e=>{let r=e.clientX-t;o=Math.max(240,Math.min(640,n+r)),s||=requestAnimationFrame(c)},u=()=>{s&&cancelAnimationFrame(s),i&&i.classList.remove(`sidebar-resize-guide-active`),b(o);try{gD(`diffing-sidebar-width`,String(o))}catch{}document.removeEventListener(`mousemove`,l),document.removeEventListener(`mouseup`,u),document.body.style.cursor=``,document.body.style.userSelect=``};document.addEventListener(`mousemove`,l),document.addEventListener(`mouseup`,u),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`},[]),E=(0,W.useMemo)(()=>{if(!u)return[];try{return Pg(u).flatMap(e=>e.files)}catch{return[]}},[u]),D=(0,W.useMemo)(()=>{let e=new Map;if(!n)return e;for(let t of n.existingComments??[]){let n=e.get(t.path)??[];n.push(t),e.set(t.path,n)}return e},[n]),O=(0,W.useMemo)(()=>{let e=new Map;for(let t of a){let n=e.get(t.filePath)??[];n.push({side:t.side,lineNumber:t.lineNumber,metadata:t}),e.set(t.filePath,n)}return e},[a]),k=n?.existingComments?.length??0;return r&&!n?(0,G.jsxs)(`div`,{className:`pr-app-empty`,children:[(0,G.jsx)(QD,{size:32}),(0,G.jsx)(`h2`,{children:`No active PR session`}),(0,G.jsxs)(`p`,{children:[`Start one with `,(0,G.jsx)(`code`,{children:`diffing "gh pr 1234"`}),` or`,` `,(0,G.jsx)(`code`,{children:`diffing --gh-pr 1234`}),` from inside the repo.`]}),(0,G.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>DE(`/`),children:`Back to local review`})]}):n?(0,G.jsxs)(`div`,{ref:S,className:`app pr-app`,"data-pr-mode":`true`,children:[(0,G.jsxs)(`header`,{className:`pr-header`,children:[(0,G.jsxs)(`div`,{className:`pr-header-left`,children:[(0,G.jsx)(QD,{size:16,"aria-hidden":`true`}),(0,G.jsxs)(`strong`,{className:`pr-header-ref`,children:[n.owner,`/`,n.repo,`#`,n.pullNumber]}),(0,G.jsx)(`span`,{className:`pr-header-title`,children:n.title})]}),(0,G.jsxs)(`div`,{className:`pr-header-right`,children:[(0,G.jsxs)(`span`,{className:`pr-header-stat`,title:`+${n.additions} -${n.deletions} across ${n.changedFiles} files`,children:[`+`,n.additions,` −`,n.deletions,` · `,n.changedFiles,` files`]}),(0,G.jsxs)(`button`,{className:`btn btn-sm pr-header-copy`,onClick:async()=>{await navigator.clipboard.writeText(vE(a))},disabled:a.length===0,title:`Copy new comments as Markdown`,children:[(0,G.jsx)(UD,{size:12}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Copy`})]}),(0,G.jsxs)(`button`,{className:`btn btn-sm pr-header-refresh`,onClick:()=>i.mutate(),disabled:i.isPending,title:`Re-fetch PR metadata from GitHub`,children:[(0,G.jsx)(_O,{size:12,className:i.isPending?`spinning`:``}),(0,G.jsx)(`span`,{className:`btn-label`,children:i.isPending?`Refreshing…`:`Refresh`})]}),(0,G.jsxs)(`a`,{className:`btn btn-sm pr-header-link`,href:n.url,target:`_blank`,rel:`noreferrer`,title:`Open on GitHub`,children:[(0,G.jsx)(GD,{size:12}),(0,G.jsx)(`span`,{className:`btn-label`,children:`Open`})]}),(0,G.jsx)(F0,{session:n,comments:a,onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s})]})]}),k>0&&(0,G.jsxs)(`div`,{className:`pr-existing-summary`,children:[(0,G.jsx)(aO,{size:12}),(0,G.jsxs)(`span`,{children:[k,` existing review comment`,k===1?``:`s`,` on this PR (read-only context, only your new comments will be posted).`]})]}),f&&(0,G.jsxs)(`div`,{className:`pr-error`,children:[`Failed to load the PR diff: `,f]}),(0,G.jsxs)(`div`,{className:`app-body`,style:{gridTemplateColumns:_?`0 1fr`:`${y}px 1fr`},children:[(0,G.jsxs)(`aside`,{ref:C,className:`sidebar ${_?`sidebar-collapsed`:``}`,style:_?{width:0,display:`none`}:{width:y},children:[(0,G.jsx)(y1,{files:E,activeFile:h,setActiveFile:g,commentCounts:{},existingCommentCounts:Object.fromEntries([...D.entries()].map(([e,t])=>[e,t.length]))}),(0,G.jsx)(`div`,{className:`sidebar-resize-handle`,onMouseDown:T,title:`Drag to resize`})]}),(0,G.jsx)(`main`,{className:`main`,children:d&&!u?(0,G.jsx)(`div`,{className:`pr-app-loading`,children:`Loading PR diff…`}):E.length===0?(0,G.jsx)(`div`,{className:`empty-state`,children:(0,G.jsx)(`p`,{children:`No changes found in this PR.`})}):(0,G.jsx)(B0,{files:E,fileAnnotations:O,existingCommentsByFile:D,viewedFiles:p,settings:e,onAddComment:e=>o({filePath:e.filePath,side:e.side,lineNumber:e.lineNumber,startLineNumber:e.startLineNumber,lineContent:e.lineContent,body:e.body}),onReplyComment:(e,t)=>l({id:e,body:t}),onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s,onViewedChange:m})})]}),(0,G.jsx)(`div`,{className:`sidebar-resize-guide`,ref:w,"aria-hidden":`true`}),(0,G.jsx)(S1,{comments:a,files:E,activeFile:h,onSetActiveFile:g,onEditComment:(e,t)=>c({id:e,body:t}),onDeleteComment:s,onAddReply:(e,t)=>l({id:e,body:t}),collapsed:!1,onToggleCollapsed:()=>{}}),n.submittedAt&&(0,G.jsx)(R0,{session:n}),(0,G.jsxs)(`button`,{className:`pr-back-button`,onClick:()=>DE(`/`),title:`Back to local review`,children:[(0,G.jsx)(kD,{size:14}),(0,G.jsx)(`span`,{children:`Back to local`})]})]}):(0,G.jsx)(`div`,{className:`pr-app-empty`,children:(0,G.jsx)(`span`,{children:`Loading PR session…`})})}function B0({files:e,fileAnnotations:t,existingCommentsByFile:n,viewedFiles:r,settings:i,onAddComment:a,onReplyComment:o,onEditComment:s,onDeleteComment:c,onViewedChange:l}){return(0,G.jsx)(`div`,{className:`pr-diff-surface`,children:e.map((e,o)=>{let s=e.name,u=n.get(s)??[];return(0,G.jsxs)(`div`,{className:`pr-file-block`,children:[(0,G.jsx)(rW,{files:[e],diffStyle:`unified`,tabSizeMap:{},defaultTabSize:4,viewedFiles:r,binaryFiles:new Map,theme:i.theme??`github-dark`,lineDiffType:`none`,lineWrap:!1,diffIndicators:`none`,showLineNumbers:!0,hunkSeparators:`line-numbers`,lineHoverHighlight:`none`,fontSize:i.fontSize??13,monoFontFamily:i.monoFont??`ui-monospace, SFMono-Regular, Menlo, monospace`,expandContextByDefault:!1,collapsedContextThreshold:2**53-1,expansionLineCount:0,onViewedChange:l,fileAnnotationsMap:new Map([[s,t.get(s)??[]]]),onAddComment:(...e)=>{let[t,n,r,i,o,s]=e;a({filePath:t,side:n,lineNumber:r,lineContent:i,body:o,startLineNumber:s})},onDeleteComment:c}),u.length>0&&(0,G.jsxs)(`div`,{className:`pr-existing-strip`,children:[(0,G.jsxs)(`div`,{className:`pr-existing-strip-head`,children:[(0,G.jsx)(aO,{size:11}),(0,G.jsxs)(`span`,{children:[u.length,` existing comment`,u.length===1?``:`s`,` on this file`]})]}),(0,G.jsx)(`ul`,{className:`pr-existing-strip-list`,children:u.map(e=>(0,G.jsxs)(`li`,{className:`pr-existing-strip-item`,children:[(0,G.jsxs)(`div`,{className:`pr-existing-strip-meta`,children:[(0,G.jsxs)(`strong`,{children:[`@`,e.author?.login??`unknown`]}),(0,G.jsx)(`span`,{className:`pr-existing-strip-line`,children:e.line==null?`· file`:`:${e.line}`}),e.state&&(0,G.jsx)(`span`,{className:`pr-existing-strip-state pr-state-${e.state.toLowerCase()}`,children:e.state.toLowerCase().replace(`_`,` `)}),e.replies.length>0&&(0,G.jsxs)(`span`,{className:`pr-existing-strip-replies`,children:[`+`,e.replies.length,` repl`,e.replies.length===1?`y`:`ies`]})]}),(0,G.jsx)(`p`,{className:`pr-existing-strip-body`,children:e.body})]},e.id))})]})]},`${s}-${o}`)})})}function V0(){let e=jE(),[t,n]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{dD().then(()=>{n(!0)})},[]),t?e===`/plan`||e.startsWith(`/plan/`)?(0,G.jsx)(D0,{}):e===`/gh/pr`||e.startsWith(`/gh/pr/`)?(0,G.jsx)(z0,{}):(0,G.jsx)(d0,{}):(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100vh`,width:`100vw`,background:`#0d1117`,color:`#c9d1d9`,fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`},children:[(0,G.jsx)(`div`,{style:{width:`32px`,height:`32px`,border:`3px solid rgba(139, 148, 158, 0.15)`,borderTop:`3px solid #58a6ff`,borderRadius:`50%`,animation:`spin 0.8s linear infinite`,marginBottom:`16px`}}),(0,G.jsx)(`span`,{style:{fontSize:`13px`,fontWeight:500,opacity:.75,letterSpacing:`0.3px`},children:`Loading review session...`}),(0,G.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`
|
|
3918
3918
|
@keyframes spin {
|
|
3919
3919
|
0% { transform: rotate(0deg); }
|
|
3920
3920
|
100% { transform: rotate(360deg); }
|
|
3921
3921
|
}
|
|
3922
|
-
`}})]})}var
|
|
3922
|
+
`}})]})}var H0=new Le;(0,mn.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(He,{client:H0,children:(0,G.jsx)(ot,{children:(0,G.jsx)(km,{poolOptions:{workerFactory:()=>new A_,poolSize:Math.max(1,Math.min(4,navigator.hardwareConcurrency||2))},highlighterOptions:{theme:{dark:`nord`,light:`github-light`}},children:(0,G.jsx)(QT,{children:(0,G.jsx)(V0,{})})})})}));export{l as i,o as n,s as r,J as t};
|