@knpkv/control-center 0.9.4 → 0.9.5
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/client/.vite/manifest.json +406 -406
- package/dist/client/assets/ActiveWorkPage-CeWw2uZl.js +2 -0
- package/dist/client/assets/ActiveWorkPage-CeWw2uZl.js.map +1 -0
- package/dist/client/assets/{AgentPage-YiYORLod.js → AgentPage-BAy7IgjJ.js} +3 -3
- package/dist/client/assets/AgentPage-BAy7IgjJ.js.map +1 -0
- package/dist/client/assets/{AtlassianOAuthCallbackPage-PfsrTytb.js → AtlassianOAuthCallbackPage-DDCTmcmB.js} +2 -2
- package/dist/client/assets/AtlassianOAuthCallbackPage-DDCTmcmB.js.map +1 -0
- package/dist/client/assets/{AuthorizedSharePage-BCwnILXF.js → AuthorizedSharePage-BZPfotuK.js} +2 -2
- package/dist/client/assets/AuthorizedSharePage-BZPfotuK.js.map +1 -0
- package/dist/client/assets/{BrowserSessionHydrator-BAb76EvO.js → BrowserSessionHydrator-B3yI9F2z.js} +2 -2
- package/dist/client/assets/{BrowserSessionHydrator-BAb76EvO.js.map → BrowserSessionHydrator-B3yI9F2z.js.map} +1 -1
- package/dist/client/assets/{CommandSearch-BSVXQfjF.js → CommandSearch-BrwiVFBI.js} +2 -2
- package/dist/client/assets/{CommandSearch-BSVXQfjF.js.map → CommandSearch-BrwiVFBI.js.map} +1 -1
- package/dist/client/assets/Domain-DH_T_LJ8.js.map +1 -1
- package/dist/client/assets/{ItemsPage-BzinDuxs.js → ItemsPage-CYmo7Dkm.js} +2 -2
- package/dist/client/assets/ItemsPage-CYmo7Dkm.js.map +1 -0
- package/dist/client/assets/{OpenPullRequestPage-BABGk9v2.js → OpenPullRequestPage-BcwTerpY.js} +2 -2
- package/dist/client/assets/OpenPullRequestPage-BcwTerpY.js.map +1 -0
- package/dist/client/assets/{Pages-Bfn7_LhJ.js → Pages-Cj24BSjm.js} +2 -2
- package/dist/client/assets/{Pages-Bfn7_LhJ.js.map → Pages-Cj24BSjm.js.map} +1 -1
- package/dist/client/assets/{PairPage-4meDmW_A.js → PairPage-JhivkRf1.js} +2 -2
- package/dist/client/assets/PairPage-JhivkRf1.js.map +1 -0
- package/dist/client/assets/PortfolioOverview-C0RZCx6V.js +2 -0
- package/dist/client/assets/PortfolioOverview-C0RZCx6V.js.map +1 -0
- package/dist/client/assets/{PullRequestReviewPanel-68vgbLzs.js → PullRequestReviewPanel-BeYAld4m.js} +4 -4
- package/dist/client/assets/{PullRequestReviewPanel-68vgbLzs.js.map → PullRequestReviewPanel-BeYAld4m.js.map} +1 -1
- package/dist/client/assets/ReleaseRoute-1bUQCSJi.js +2 -0
- package/dist/client/assets/ReleaseRoute-1bUQCSJi.js.map +1 -0
- package/dist/client/assets/{ReleaseWorkset-DcI6qwPE.js → ReleaseWorkset-DGufwIFe.js} +2 -2
- package/dist/client/assets/ReleaseWorkset-DGufwIFe.js.map +1 -0
- package/dist/client/assets/{ReviewSuggestionOverview-kNqjbwKQ.js → ReviewSuggestionOverview-CfU-Ynzq.js} +2 -2
- package/dist/client/assets/{ReviewSuggestionOverview-kNqjbwKQ.js.map → ReviewSuggestionOverview-CfU-Ynzq.js.map} +1 -1
- package/dist/client/assets/{ReviewSuggestionPublicationSurface-BtoYEprT.js → ReviewSuggestionPublicationSurface-DA-3PPs_.js} +2 -2
- package/dist/client/assets/ReviewSuggestionPublicationSurface-DA-3PPs_.js.map +1 -0
- package/dist/client/assets/{ServicesPage-DihUx1kr.js → ServicesPage-6G9OTRDn.js} +2 -2
- package/dist/client/assets/ServicesPage-6G9OTRDn.js.map +1 -0
- package/dist/client/assets/{TimelinePage-DyluBeEt.js → TimelinePage-D6YUtggO.js} +2 -2
- package/dist/client/assets/TimelinePage-D6YUtggO.js.map +1 -0
- package/dist/client/assets/{WorkspaceEntityLink-DjonIGqM.js → WorkspaceEntityLink-BqUurz8P.js} +2 -2
- package/dist/client/assets/{WorkspaceEntityLink-DjonIGqM.js.map → WorkspaceEntityLink-BqUurz8P.js.map} +1 -1
- package/dist/client/assets/{WorkspaceEntityRoute-DUVwW5WN.js → WorkspaceEntityRoute-CfupCFGN.js} +4 -4
- package/dist/client/assets/{WorkspaceEntityRoute-DUVwW5WN.js.map → WorkspaceEntityRoute-CfupCFGN.js.map} +1 -1
- package/dist/client/assets/{WorkspaceHomeLink-DSGM8jZK.js → WorkspaceHomeLink-DkAnxFk1.js} +2 -2
- package/dist/client/assets/{WorkspaceHomeLink-DSGM8jZK.js.map → WorkspaceHomeLink-DkAnxFk1.js.map} +1 -1
- package/dist/client/assets/{WorkspacePullRequestDetails-Z3MfihsH.js → WorkspacePullRequestDetails-SexYOZUB.js} +3 -3
- package/dist/client/assets/{WorkspacePullRequestDetails-Z3MfihsH.js.map → WorkspacePullRequestDetails-SexYOZUB.js.map} +1 -1
- package/dist/client/assets/{WorkspaceReleaseLayout-S6XHWEwh.js → WorkspaceReleaseLayout-J_IWrKc9.js} +2 -2
- package/dist/client/assets/{WorkspaceReleaseLayout-S6XHWEwh.js.map → WorkspaceReleaseLayout-J_IWrKc9.js.map} +1 -1
- package/dist/client/assets/{WorkspaceSettingsPage-Dn_eDC3m.js → WorkspaceSettingsPage-CFB0X_Oz.js} +2 -2
- package/dist/client/assets/WorkspaceSettingsPage-CFB0X_Oz.js.map +1 -0
- package/dist/client/assets/{angular-html-B-gwpVlh-DEM_d4RI.js → angular-html-B-gwpVlh-BHk2rITT.js} +2 -2
- package/dist/client/assets/{angular-html-B-gwpVlh-DEM_d4RI.js.map → angular-html-B-gwpVlh-BHk2rITT.js.map} +1 -1
- package/dist/client/assets/{angular-ts-BdaH9qH_-6UMLodBB.js → angular-ts-BdaH9qH_-DDpR3-gU.js} +2 -2
- package/dist/client/assets/{angular-ts-BdaH9qH_-6UMLodBB.js.map → angular-ts-BdaH9qH_-DDpR3-gU.js.map} +1 -1
- package/dist/client/assets/{apl-BLTDDucx-DIkkahEc.js → apl-BLTDDucx-C5lAAuBL.js} +2 -2
- package/dist/client/assets/{apl-BLTDDucx-DIkkahEc.js.map → apl-BLTDDucx-C5lAAuBL.js.map} +1 -1
- package/dist/client/assets/{astro-CM3EIsEH-D5DYxAYu.js → astro-CM3EIsEH-C-4mMpDY.js} +2 -2
- package/dist/client/assets/{astro-CM3EIsEH-D5DYxAYu.js.map → astro-CM3EIsEH-C-4mMpDY.js.map} +1 -1
- package/dist/client/assets/{blade-BuLZ1b4i-CBKkB_Nt.js → blade-BuLZ1b4i-Bo26Vrie.js} +2 -2
- package/dist/client/assets/{blade-BuLZ1b4i-CBKkB_Nt.js.map → blade-BuLZ1b4i-Bo26Vrie.js.map} +1 -1
- package/dist/client/assets/{c-BOe7FNWg-C15nlYFX.js → c-BOe7FNWg-Bn-hh2gC.js} +2 -2
- package/dist/client/assets/{c-BOe7FNWg-C15nlYFX.js.map → c-BOe7FNWg-Bn-hh2gC.js.map} +1 -1
- package/dist/client/assets/{chapel-DS426I0C-DoL0pgIr.js → chapel-DS426I0C-DZfMl2AF.js} +2 -2
- package/dist/client/assets/{chapel-DS426I0C-DoL0pgIr.js.map → chapel-DS426I0C-DZfMl2AF.js.map} +1 -1
- package/dist/client/assets/{cobol-D88xw2SU-DlPiznQQ.js → cobol-D88xw2SU-Dszzocsd.js} +2 -2
- package/dist/client/assets/{cobol-D88xw2SU-DlPiznQQ.js.map → cobol-D88xw2SU-Dszzocsd.js.map} +1 -1
- package/dist/client/assets/{coffee-9O-pYXz5-QB78c27T.js → coffee-9O-pYXz5-B-EAY7Cr.js} +2 -2
- package/dist/client/assets/{coffee-9O-pYXz5-QB78c27T.js.map → coffee-9O-pYXz5-B-EAY7Cr.js.map} +1 -1
- package/dist/client/assets/{controlCenterRelayDock-CDyCPu8u.js → controlCenterRelayDock-Bq4z8Xad.js} +3 -3
- package/dist/client/assets/{controlCenterRelayDock-CDyCPu8u.js.map → controlCenterRelayDock-Bq4z8Xad.js.map} +1 -1
- package/dist/client/assets/{controlCenterRelayDockChrome-BWLgzJhc.js → controlCenterRelayDockChrome-M45VQcSE.js} +2 -2
- package/dist/client/assets/{controlCenterRelayDockChrome-BWLgzJhc.js.map → controlCenterRelayDockChrome-M45VQcSE.js.map} +1 -1
- package/dist/client/assets/{cpp-CPk7VU6o-XEasjJQb.js → cpp-CPk7VU6o-B1PTCDWN.js} +2 -2
- package/dist/client/assets/{cpp-CPk7VU6o-XEasjJQb.js.map → cpp-CPk7VU6o-B1PTCDWN.js.map} +1 -1
- package/dist/client/assets/{crystal-CRftOMVe-Cl7VOKqv.js → crystal-CRftOMVe-3NFSGC4Y.js} +2 -2
- package/dist/client/assets/{crystal-CRftOMVe-Cl7VOKqv.js.map → crystal-CRftOMVe-3NFSGC4Y.js.map} +1 -1
- package/dist/client/assets/{css-DKjIhbA_-BqYkMclh.js → css-DKjIhbA_-BZzy1gno.js} +2 -2
- package/dist/client/assets/{css-DKjIhbA_-BqYkMclh.js.map → css-DKjIhbA_-BZzy1gno.js.map} +1 -1
- package/dist/client/assets/{diff-c2VIds2u.js → diff-CuvBMVEl.js} +3 -3
- package/dist/client/assets/{diff-c2VIds2u.js.map → diff-CuvBMVEl.js.map} +1 -1
- package/dist/client/assets/{edge-CZci3foK-CcvbLJND.js → edge-CZci3foK-BdZTWeOq.js} +2 -2
- package/dist/client/assets/{edge-CZci3foK-CcvbLJND.js.map → edge-CZci3foK-BdZTWeOq.js.map} +1 -1
- package/dist/client/assets/{elixir-BFbWRTPN-DCo1tsYk.js → elixir-BFbWRTPN-BSsfSNAc.js} +2 -2
- package/dist/client/assets/{elixir-BFbWRTPN-DCo1tsYk.js.map → elixir-BFbWRTPN-BSsfSNAc.js.map} +1 -1
- package/dist/client/assets/{elm-BFCSOEGh-KAuEEkOS.js → elm-BFCSOEGh-B7etdM00.js} +2 -2
- package/dist/client/assets/{elm-BFCSOEGh-KAuEEkOS.js.map → elm-BFCSOEGh-B7etdM00.js.map} +1 -1
- package/dist/client/assets/{erb-C0EkZJvn-3O5TlDRJ.js → erb-C0EkZJvn-BUpElafA.js} +2 -2
- package/dist/client/assets/{erb-C0EkZJvn-3O5TlDRJ.js.map → erb-C0EkZJvn-BUpElafA.js.map} +1 -1
- package/dist/client/assets/{git-rebase-DBDs07B2-BKfziPiX.js → git-rebase-DBDs07B2-3YW7dddl.js} +2 -2
- package/dist/client/assets/{git-rebase-DBDs07B2-BKfziPiX.js.map → git-rebase-DBDs07B2-3YW7dddl.js.map} +1 -1
- package/dist/client/assets/{glimmer-js-oqYt1Bty-oOPiIwDh.js → glimmer-js-oqYt1Bty-Q18N5198.js} +2 -2
- package/dist/client/assets/{glimmer-js-oqYt1Bty-oOPiIwDh.js.map → glimmer-js-oqYt1Bty-Q18N5198.js.map} +1 -1
- package/dist/client/assets/{glimmer-ts-CjmgbZTn-C8gjUbKN.js → glimmer-ts-CjmgbZTn-DflPUBBN.js} +2 -2
- package/dist/client/assets/{glimmer-ts-CjmgbZTn-C8gjUbKN.js.map → glimmer-ts-CjmgbZTn-DflPUBBN.js.map} +1 -1
- package/dist/client/assets/{glsl-BqUMGrwT-5PoVKbXD.js → glsl-BqUMGrwT-DZSnNyRQ.js} +2 -2
- package/dist/client/assets/{glsl-BqUMGrwT-5PoVKbXD.js.map → glsl-BqUMGrwT-DZSnNyRQ.js.map} +1 -1
- package/dist/client/assets/{graphql-CEJryLGF-Bx3HP-fV.js → graphql-CEJryLGF-BxoDC-bv.js} +2 -2
- package/dist/client/assets/{graphql-CEJryLGF-Bx3HP-fV.js.map → graphql-CEJryLGF-BxoDC-bv.js.map} +1 -1
- package/dist/client/assets/{hack-DwBIwaGr-C2bRI1k_.js → hack-DwBIwaGr-BD9UbS9V.js} +2 -2
- package/dist/client/assets/{hack-DwBIwaGr-C2bRI1k_.js.map → hack-DwBIwaGr-BD9UbS9V.js.map} +1 -1
- package/dist/client/assets/{haml-BgD6GFV2-C-E92qmq.js → haml-BgD6GFV2-tYRnxnkA.js} +2 -2
- package/dist/client/assets/{haml-BgD6GFV2-C-E92qmq.js.map → haml-BgD6GFV2-tYRnxnkA.js.map} +1 -1
- package/dist/client/assets/{handlebars-DAEAtsmp-B3Qkz-fG.js → handlebars-DAEAtsmp-CzuHoTaP.js} +2 -2
- package/dist/client/assets/{handlebars-DAEAtsmp-B3Qkz-fG.js.map → handlebars-DAEAtsmp-CzuHoTaP.js.map} +1 -1
- package/dist/client/assets/{html-B63qAdeQ-mzUq7RfB.js → html-B63qAdeQ-BvgXBi7v.js} +2 -2
- package/dist/client/assets/{html-B63qAdeQ-mzUq7RfB.js.map → html-B63qAdeQ-BvgXBi7v.js.map} +1 -1
- package/dist/client/assets/{html-derivative-DliF0Izh-DKttJgx1.js → html-derivative-DliF0Izh-BdazZa_A.js} +2 -2
- package/dist/client/assets/{html-derivative-DliF0Izh-DKttJgx1.js.map → html-derivative-DliF0Izh-BdazZa_A.js.map} +1 -1
- package/dist/client/assets/{http-BPdteiK2-BzL978Ty.js → http-BPdteiK2-DscIPq9Z.js} +2 -2
- package/dist/client/assets/{http-BPdteiK2-BzL978Ty.js.map → http-BPdteiK2-DscIPq9Z.js.map} +1 -1
- package/dist/client/assets/{hurl-y6bQoMbn-VmDIgNNg.js → hurl-y6bQoMbn-BniTWOKW.js} +2 -2
- package/dist/client/assets/{hurl-y6bQoMbn-VmDIgNNg.js.map → hurl-y6bQoMbn-BniTWOKW.js.map} +1 -1
- package/dist/client/assets/{index-BHQ_NP1r.js → index-DlDEYM2e.js} +3 -3
- package/dist/client/assets/{index-BHQ_NP1r.js.map → index-DlDEYM2e.js.map} +1 -1
- package/dist/client/assets/index-vGJLpF-N.css +1 -0
- package/dist/client/assets/{java-HDTZqoJ--r_CiLO3G.js → java-HDTZqoJ--DonfC-m-.js} +2 -2
- package/dist/client/assets/{java-HDTZqoJ--r_CiLO3G.js.map → java-HDTZqoJ--DonfC-m-.js.map} +1 -1
- package/dist/client/assets/{javascript-B8-PXjxO-D8IL8RVw.js → javascript-B8-PXjxO-DrojTnjU.js} +2 -2
- package/dist/client/assets/{javascript-B8-PXjxO-D8IL8RVw.js.map → javascript-B8-PXjxO-DrojTnjU.js.map} +1 -1
- package/dist/client/assets/{jinja-Li2helwk-iQ5WpNSs.js → jinja-Li2helwk-Bn7ViII1.js} +2 -2
- package/dist/client/assets/{jinja-Li2helwk-iQ5WpNSs.js.map → jinja-Li2helwk-Bn7ViII1.js.map} +1 -1
- package/dist/client/assets/{jison-D4pd2L4r-CnB2TCTC.js → jison-D4pd2L4r-CURwtPm2.js} +2 -2
- package/dist/client/assets/{jison-D4pd2L4r-CnB2TCTC.js.map → jison-D4pd2L4r-CURwtPm2.js.map} +1 -1
- package/dist/client/assets/{json-CHeq_08V-BzfhDAQG.js → json-CHeq_08V-DGJ-08B3.js} +2 -2
- package/dist/client/assets/{json-CHeq_08V-BzfhDAQG.js.map → json-CHeq_08V-DGJ-08B3.js.map} +1 -1
- package/dist/client/assets/{jsx-CTDAtxCE-BHaCLB5C.js → jsx-CTDAtxCE-B7AjYoF3.js} +2 -2
- package/dist/client/assets/{jsx-CTDAtxCE-BHaCLB5C.js.map → jsx-CTDAtxCE-B7AjYoF3.js.map} +1 -1
- package/dist/client/assets/{julia-B8HGxjvO-DUNXU97h.js → julia-B8HGxjvO-CX2HXF0x.js} +2 -2
- package/dist/client/assets/{julia-B8HGxjvO-DUNXU97h.js.map → julia-B8HGxjvO-CX2HXF0x.js.map} +1 -1
- package/dist/client/assets/{just-C1IY8eCo-CwcMki68.js → just-C1IY8eCo-194MeSWx.js} +2 -2
- package/dist/client/assets/{just-C1IY8eCo-CwcMki68.js.map → just-C1IY8eCo-194MeSWx.js.map} +1 -1
- package/dist/client/assets/{latex-CWjLpLhK-C2bYvB1V.js → latex-CWjLpLhK-CJV_bAR4.js} +2 -2
- package/dist/client/assets/{latex-CWjLpLhK-C2bYvB1V.js.map → latex-CWjLpLhK-CJV_bAR4.js.map} +1 -1
- package/dist/client/assets/{liquid-DO0vm52w-5ftSWtSQ.js → liquid-DO0vm52w-C-oH3gBH.js} +2 -2
- package/dist/client/assets/{liquid-DO0vm52w-5ftSWtSQ.js.map → liquid-DO0vm52w-C-oH3gBH.js.map} +1 -1
- package/dist/client/assets/{lua-rOZn354j-BFEal9UY.js → lua-rOZn354j-CWNr0VLI.js} +2 -2
- package/dist/client/assets/{lua-rOZn354j-BFEal9UY.js.map → lua-rOZn354j-CWNr0VLI.js.map} +1 -1
- package/dist/client/assets/{marko-CiZdnOV9-VE4QpTYR.js → marko-CiZdnOV9-D1oeBgJ5.js} +2 -2
- package/dist/client/assets/{marko-CiZdnOV9-VE4QpTYR.js.map → marko-CiZdnOV9-D1oeBgJ5.js.map} +1 -1
- package/dist/client/assets/{mdc-D1ADfxGi-DASKK9_I.js → mdc-D1ADfxGi-DDe8MjBS.js} +2 -2
- package/dist/client/assets/{mdc-D1ADfxGi-DASKK9_I.js.map → mdc-D1ADfxGi-DDe8MjBS.js.map} +1 -1
- package/dist/client/assets/{nginx-8KXIzHX2-OWn8Z957.js → nginx-8KXIzHX2-76JDQPWv.js} +2 -2
- package/dist/client/assets/{nginx-8KXIzHX2-OWn8Z957.js.map → nginx-8KXIzHX2-76JDQPWv.js.map} +1 -1
- package/dist/client/assets/{nim-CbBDSJf5-DzS23snq.js → nim-CbBDSJf5-Bg0Tpvlj.js} +2 -2
- package/dist/client/assets/{nim-CbBDSJf5-DzS23snq.js.map → nim-CbBDSJf5-Bg0Tpvlj.js.map} +1 -1
- package/dist/client/assets/{org-BlnOvN6p-mzfee9SX.js → org-BlnOvN6p-CpQvn0Ms.js} +2 -2
- package/dist/client/assets/{org-BlnOvN6p-mzfee9SX.js.map → org-BlnOvN6p-CpQvn0Ms.js.map} +1 -1
- package/dist/client/assets/patterns-CJ4c7F5A.js +2 -0
- package/dist/client/assets/patterns-CJ4c7F5A.js.map +1 -0
- package/dist/client/assets/{perl-CntHWu4k-C3Q6THHX.js → perl-CntHWu4k-R8g6ivQx.js} +2 -2
- package/dist/client/assets/{perl-CntHWu4k-C3Q6THHX.js.map → perl-CntHWu4k-R8g6ivQx.js.map} +1 -1
- package/dist/client/assets/{php-VF06KE26-uqmHEtRE.js → php-VF06KE26-qz2OohxQ.js} +2 -2
- package/dist/client/assets/{php-VF06KE26-uqmHEtRE.js.map → php-VF06KE26-qz2OohxQ.js.map} +1 -1
- package/dist/client/assets/primitives-Dj-qYrUZ-BIf5RLs4.js +2 -0
- package/dist/client/assets/primitives-Dj-qYrUZ-BIf5RLs4.js.map +1 -0
- package/dist/client/assets/{pug-DeZwH1tK-Dy2R8X_Z.js → pug-DeZwH1tK-hE7p1XRn.js} +2 -2
- package/dist/client/assets/{pug-DeZwH1tK-Dy2R8X_Z.js.map → pug-DeZwH1tK-hE7p1XRn.js.map} +1 -1
- package/dist/client/assets/{pullRequestReviewThreadReplay-Dhslqjta.js → pullRequestReviewThreadReplay-D-FuOlQ0.js} +2 -2
- package/dist/client/assets/{pullRequestReviewThreadReplay-Dhslqjta.js.map → pullRequestReviewThreadReplay-D-FuOlQ0.js.map} +1 -1
- package/dist/client/assets/{qml-CQhAR2tt-CkperL57.js → qml-CQhAR2tt-Blcerr_b.js} +2 -2
- package/dist/client/assets/{qml-CQhAR2tt-CkperL57.js.map → qml-CQhAR2tt-Blcerr_b.js.map} +1 -1
- package/dist/client/assets/{r-CGShpgkr-BeuwoEHJ.js → r-CGShpgkr-Bu3ifplH.js} +2 -2
- package/dist/client/assets/{r-CGShpgkr-BeuwoEHJ.js.map → r-CGShpgkr-Bu3ifplH.js.map} +1 -1
- package/dist/client/assets/{razor-CgB2QCs6-C9kZAmAY.js → razor-CgB2QCs6-C0YckD9e.js} +2 -2
- package/dist/client/assets/{razor-CgB2QCs6-C9kZAmAY.js.map → razor-CgB2QCs6-C0YckD9e.js.map} +1 -1
- package/dist/client/assets/{regexp-go_CdRjx-BvThUXwF.js → regexp-go_CdRjx-FwuQxSe1.js} +2 -2
- package/dist/client/assets/{regexp-go_CdRjx-BvThUXwF.js.map → regexp-go_CdRjx-FwuQxSe1.js.map} +1 -1
- package/dist/client/assets/{releaseRoutes-D04aOk03.js → releaseRoutes-Bpw_kfZI.js} +2 -2
- package/dist/client/assets/{releaseRoutes-D04aOk03.js.map → releaseRoutes-Bpw_kfZI.js.map} +1 -1
- package/dist/client/assets/{rst-CbWMI8ou-B_CNFtWj.js → rst-CbWMI8ou-_a-jzVR0.js} +2 -2
- package/dist/client/assets/{rst-CbWMI8ou-B_CNFtWj.js.map → rst-CbWMI8ou-_a-jzVR0.js.map} +1 -1
- package/dist/client/assets/{ruby-DsGwIs06-BNNoCsny.js → ruby-DsGwIs06-CvuKCvaN.js} +2 -2
- package/dist/client/assets/{ruby-DsGwIs06-BNNoCsny.js.map → ruby-DsGwIs06-CvuKCvaN.js.map} +1 -1
- package/dist/client/assets/{sas-DjxN8J4Z-DQwiaVY0.js → sas-DjxN8J4Z-6vMiHBWz.js} +2 -2
- package/dist/client/assets/{sas-DjxN8J4Z-DQwiaVY0.js.map → sas-DjxN8J4Z-6vMiHBWz.js.map} +1 -1
- package/dist/client/assets/{scss-bkiiULjK-BdNohiDl.js → scss-bkiiULjK-RWkdLi31.js} +2 -2
- package/dist/client/assets/{scss-bkiiULjK-BdNohiDl.js.map → scss-bkiiULjK-RWkdLi31.js.map} +1 -1
- package/dist/client/assets/{shellscript-Cuh1SIPr-CH9Y9Zzx.js → shellscript-Cuh1SIPr-xep8lhFb.js} +2 -2
- package/dist/client/assets/{shellscript-Cuh1SIPr-CH9Y9Zzx.js.map → shellscript-Cuh1SIPr-xep8lhFb.js.map} +1 -1
- package/dist/client/assets/{shellsession-C4UOwxb7-BVPXZqFb.js → shellsession-C4UOwxb7-B2Mjt8G4.js} +2 -2
- package/dist/client/assets/{shellsession-C4UOwxb7-BVPXZqFb.js.map → shellsession-C4UOwxb7-B2Mjt8G4.js.map} +1 -1
- package/dist/client/assets/{soy-CeGFXpLT-bVeC_qdu.js → soy-CeGFXpLT-DB96q8ji.js} +2 -2
- package/dist/client/assets/{soy-CeGFXpLT-bVeC_qdu.js.map → soy-CeGFXpLT-DB96q8ji.js.map} +1 -1
- package/dist/client/assets/{sql-qDYmMTO1-DRMw6L4F.js → sql-qDYmMTO1-Dp7sA9Pq.js} +2 -2
- package/dist/client/assets/{sql-qDYmMTO1-DRMw6L4F.js.map → sql-qDYmMTO1-Dp7sA9Pq.js.map} +1 -1
- package/dist/client/assets/{stata-Dzus_rwP-DcGzBrZt.js → stata-Dzus_rwP-Bk81H3oK.js} +2 -2
- package/dist/client/assets/{stata-Dzus_rwP-DcGzBrZt.js.map → stata-Dzus_rwP-Bk81H3oK.js.map} +1 -1
- package/dist/client/assets/{surrealql-DmTrf8uR-BGVhamzy.js → surrealql-DmTrf8uR-BAVDL68E.js} +2 -2
- package/dist/client/assets/{surrealql-DmTrf8uR-BGVhamzy.js.map → surrealql-DmTrf8uR-BAVDL68E.js.map} +1 -1
- package/dist/client/assets/{svelte-CWlRonoS-d0HsRKWL.js → svelte-CWlRonoS-g4MbXmCf.js} +2 -2
- package/dist/client/assets/{svelte-CWlRonoS-d0HsRKWL.js.map → svelte-CWlRonoS-g4MbXmCf.js.map} +1 -1
- package/dist/client/assets/{templ-EuFg1gKs-BBJ25IwK.js → templ-EuFg1gKs-B9lc3TqB.js} +2 -2
- package/dist/client/assets/{templ-EuFg1gKs-BBJ25IwK.js.map → templ-EuFg1gKs-B9lc3TqB.js.map} +1 -1
- package/dist/client/assets/{tex-Cbbx1SXS-Dh8M7x1F.js → tex-Cbbx1SXS-DPEKlVuI.js} +2 -2
- package/dist/client/assets/{tex-Cbbx1SXS-Dh8M7x1F.js.map → tex-Cbbx1SXS-DPEKlVuI.js.map} +1 -1
- package/dist/client/assets/{ts-tags-DOHpIWV2-DXabLRoX.js → ts-tags-DOHpIWV2-DN6mmSGx.js} +2 -2
- package/dist/client/assets/{ts-tags-DOHpIWV2-DXabLRoX.js.map → ts-tags-DOHpIWV2-DN6mmSGx.js.map} +1 -1
- package/dist/client/assets/{tsx-DmRL3u_2-Cn0tVC2C.js → tsx-DmRL3u_2-DulNQGwe.js} +2 -2
- package/dist/client/assets/{tsx-DmRL3u_2-Cn0tVC2C.js.map → tsx-DmRL3u_2-DulNQGwe.js.map} +1 -1
- package/dist/client/assets/{twig-BzcHspK1-BW8kSayf.js → twig-BzcHspK1-j95wbDo4.js} +2 -2
- package/dist/client/assets/{twig-BzcHspK1-BW8kSayf.js.map → twig-BzcHspK1-j95wbDo4.js.map} +1 -1
- package/dist/client/assets/{typescript-BYTx4UxO-XIX20smz.js → typescript-BYTx4UxO-C2eU2nTQ.js} +2 -2
- package/dist/client/assets/{typescript-BYTx4UxO-XIX20smz.js.map → typescript-BYTx4UxO-C2eU2nTQ.js.map} +1 -1
- package/dist/client/assets/{typst-BrfC91e7-BTQczO73.js → typst-BrfC91e7-Bry73qoG.js} +2 -2
- package/dist/client/assets/{typst-BrfC91e7-BTQczO73.js.map → typst-BrfC91e7-Bry73qoG.js.map} +1 -1
- package/dist/client/assets/{useWorkspaceDefaultLanding-DygvrKuK.js → useWorkspaceDefaultLanding-DPM3tzSI.js} +2 -2
- package/dist/client/assets/{useWorkspaceDefaultLanding-DygvrKuK.js.map → useWorkspaceDefaultLanding-DPM3tzSI.js.map} +1 -1
- package/dist/client/assets/{vue-B92PIQFm-Bo7Ratnf.js → vue-B92PIQFm-_KBJBFm9.js} +2 -2
- package/dist/client/assets/{vue-B92PIQFm-Bo7Ratnf.js.map → vue-B92PIQFm-_KBJBFm9.js.map} +1 -1
- package/dist/client/assets/{vue-html-EDHI-aeE-DZaGT8SW.js → vue-html-EDHI-aeE-Cx5Qo046.js} +2 -2
- package/dist/client/assets/{vue-html-EDHI-aeE-DZaGT8SW.js.map → vue-html-EDHI-aeE-Cx5Qo046.js.map} +1 -1
- package/dist/client/assets/{vue-vine-CmMdgoEY-D5tBNukX.js → vue-vine-CmMdgoEY-CDgVVhf3.js} +2 -2
- package/dist/client/assets/{vue-vine-CmMdgoEY-D5tBNukX.js.map → vue-vine-CmMdgoEY-CDgVVhf3.js.map} +1 -1
- package/dist/client/assets/{workspaceEntityRoutes-FAiial9O.js → workspaceEntityRoutes-Cc_RtLvy.js} +2 -2
- package/dist/client/assets/{workspaceEntityRoutes-FAiial9O.js.map → workspaceEntityRoutes-Cc_RtLvy.js.map} +1 -1
- package/dist/client/assets/{workspaceScrollCapture-AJpPgzgz.js → workspaceScrollCapture-Dg3Pebh8.js} +2 -2
- package/dist/client/assets/{workspaceScrollCapture-AJpPgzgz.js.map → workspaceScrollCapture-Dg3Pebh8.js.map} +1 -1
- package/dist/client/assets/{xml-Bz9Nzp99-Bj4-GEHY.js → xml-Bz9Nzp99-bfRaCa2x.js} +2 -2
- package/dist/client/assets/{xml-Bz9Nzp99-Bj4-GEHY.js.map → xml-Bz9Nzp99-bfRaCa2x.js.map} +1 -1
- package/dist/client/assets/{xsl-D0pOnfMq-9186FOf_.js → xsl-D0pOnfMq-BaQuui65.js} +2 -2
- package/dist/client/assets/{xsl-D0pOnfMq-9186FOf_.js.map → xsl-D0pOnfMq-BaQuui65.js.map} +1 -1
- package/dist/client/assets/{yaml-DKDHNCIP-ISipY-zA.js → yaml-DKDHNCIP-B5ot5BQr.js} +2 -2
- package/dist/client/assets/{yaml-DKDHNCIP-ISipY-zA.js.map → yaml-DKDHNCIP-B5ot5BQr.js.map} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/assets/controlCenterApi-CIz0g85O.js.map +1 -1
- package/package.json +8 -8
- package/dist/client/assets/ActiveWorkPage-BxSGZWS_.js +0 -2
- package/dist/client/assets/ActiveWorkPage-BxSGZWS_.js.map +0 -1
- package/dist/client/assets/AgentPage-YiYORLod.js.map +0 -1
- package/dist/client/assets/AtlassianOAuthCallbackPage-PfsrTytb.js.map +0 -1
- package/dist/client/assets/AuthorizedSharePage-BCwnILXF.js.map +0 -1
- package/dist/client/assets/ItemsPage-BzinDuxs.js.map +0 -1
- package/dist/client/assets/OpenPullRequestPage-BABGk9v2.js.map +0 -1
- package/dist/client/assets/PairPage-4meDmW_A.js.map +0 -1
- package/dist/client/assets/PortfolioOverview-BRB_qe4T.js +0 -2
- package/dist/client/assets/PortfolioOverview-BRB_qe4T.js.map +0 -1
- package/dist/client/assets/ReleaseRoute-D1srSd83.js +0 -2
- package/dist/client/assets/ReleaseRoute-D1srSd83.js.map +0 -1
- package/dist/client/assets/ReleaseWorkset-DcI6qwPE.js.map +0 -1
- package/dist/client/assets/ReviewSuggestionPublicationSurface-BtoYEprT.js.map +0 -1
- package/dist/client/assets/ServicesPage-DihUx1kr.js.map +0 -1
- package/dist/client/assets/TimelinePage-DyluBeEt.js.map +0 -1
- package/dist/client/assets/WorkspaceSettingsPage-Dn_eDC3m.js.map +0 -1
- package/dist/client/assets/index-BZ52pCV1.css +0 -1
- package/dist/client/assets/patterns-D0U0WCQS.js +0 -2
- package/dist/client/assets/patterns-D0U0WCQS.js.map +0 -1
- package/dist/client/assets/primitives-CjQX0eVM-BPKvllZ_.js +0 -2
- package/dist/client/assets/primitives-CjQX0eVM-BPKvllZ_.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-B-gwpVlh-
|
|
2
|
-
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-Cvdyeg_0.js";import{i as r}from"./loader-circle-CUNkyj3b.js";import{D as i,S as a,w as o}from"./Dialog-_t9OodCK-CzkLh9VB.js";import{t as s}from"./jsx-runtime-NZYk81nU.js";import{O as c}from"./index-BHQ_NP1r.js";import{n as l,r as u,t as d}from"./WorkspacePullRequestDetails-Z3MfihsH.js";var f=Object.create,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,v=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),y=(e,t)=>{let n={};for(var r in e)p(n,r,{get:e[r],enumerable:!0});return t||p(n,Symbol.toStringTag,{value:`Module`}),n},b=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=h(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_.call(e,s)&&s!==n&&p(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=m(t,s))||r.enumerable});return e},x=(e,t,n)=>(n=e==null?{}:f(g(e)),b(t||!e||!e.__esModule||!_.call(e,`default`)?p(n,`default`,{value:e,enumerable:!0}):n,e)),S=e({DiffCodeView:()=>Ob,DiffFileTree:()=>d,DiffFinding:()=>jb,DiffHeader:()=>u,DiffWorkbench:()=>l,DiffWorkerProvider:()=>yb,RLY_DIFF_THEMES:()=>cb,createDiffWorkerFactory:()=>hb,normalizeDiffWorkerPoolSize:()=>mb}),C=t(n(),1),w=s(),T=t(r(),1),E={root:`rly_DiffCodeView-module__root`,viewer:`rly_DiffCodeView-module__viewer`,annotation:`rly_DiffCodeView-module__annotation`,empty:`rly_DiffCodeView-module__empty`,fallbackNotice:`rly_DiffCodeView-module__fallbackNotice`},ee={root:`rly_DiffFinding-module__root`,header:`rly_DiffFinding-module__header`,avatar:`rly_DiffFinding-module__avatar`,human:`rly_DiffFinding-module__human`,agent:`rly_DiffFinding-module__agent`,identity:`rly_DiffFinding-module__identity`,body:`rly_DiffFinding-module__body`,state:`rly_DiffFinding-module__state`,severity:`rly_DiffFinding-module__severity`,anchorDetails:`rly_DiffFinding-module__anchorDetails`,stale:`rly_DiffFinding-module__stale`,prevention:`rly_DiffFinding-module__prevention`,preventionSummary:`rly_DiffFinding-module__preventionSummary`,preventionIndicator:`rly_DiffFinding-module__preventionIndicator`,preventionCopy:`rly_DiffFinding-module__preventionCopy`,rationale:`rly_DiffFinding-module__rationale`,footer:`rly_DiffFinding-module__footer`};function D(e){let t=(0,C.useRef)(e);return(0,C.useInsertionEffect)(()=>void(t.current=e)),(0,C.useCallback)((...e)=>t.current(...e),[])}var O=(0,C.createContext)(void 0);function te(){return(0,C.useContext)(O)}var ne={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},k={display:`contents`},re=`diffs-container`,ie=(()=>{try{return!1}catch{return!1}})(),ae=/(?=^diff --git)/gm,oe=/(?<=\n)/,se=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ce=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,le=`header-prefix`,ue=`header-filename-suffix`,de=`header-metadata`,fe=`header-custom`,A={dark:`pierre-dark`,light:`pierre-light`},pe=`data-theme-css`,me=`data-unsafe-css`,he=`data-diffs-scrollbar-measure`,ge=`data-diffs-code-view-header`,_e=`data-diffs-code-view-footer`,ve=`--diffs-scrollbar-gutter-measured`,ye=1e5,be={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},xe={...be,hunkLineCount:1},Se={paddingTop:8,paddingBottom:8,gap:8},Ce={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},we=Object.freeze({fromStart:0,fromEnd:0}),Te={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ee={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function De(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Oe({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function ke(e,t){return e-(t===0?0:1)}function j(e,t){return ke(e,t)+t}function Ae(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:je(n,e.startContentIndex)}}function je(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function Me({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=De}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,w.jsxs)(w.Fragment,{children:[p==null?(0,w.jsxs)(w.Fragment,{children:[m!=null&&(0,w.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,w.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,w.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,w.jsx)(`div`,{slot:fe,children:p}),o!=null&&l?.map((e,t)=>(0,w.jsx)(`div`,{slot:f(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=Ne(t,e);return(0,w.jsx)(`div`,{slot:n,style:k,children:c(t,d)},n)}),s!=null&&(0,w.jsx)(`div`,{slot:`gutter-utility-slot`,style:ne,children:s(u)})]})}function Ne(e,t){let n=Ae(e,t);return n==null?void 0:Oe({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function Pe({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,lineAnnotations:o,renderGutterUtility:s,getHoveredLine:c,getAnnotationSlotName:l=De}){let u=t?.(e),d=n?.(e),f=r?.(e),p=i?.(e);return(0,w.jsxs)(w.Fragment,{children:[u==null?(0,w.jsxs)(w.Fragment,{children:[d!=null&&(0,w.jsx)(`div`,{slot:`header-prefix`,children:d}),f!=null&&(0,w.jsx)(`div`,{slot:`header-filename-suffix`,children:f}),p!=null&&(0,w.jsx)(`div`,{slot:`header-metadata`,children:p})]}):(0,w.jsx)(`div`,{slot:fe,children:u}),a!=null&&o?.map((e,t)=>(0,w.jsx)(`div`,{slot:l(e),children:a(e)},t)),s!=null&&(0,w.jsx)(`div`,{slot:`gutter-utility-slot`,style:ne,children:s(c)})]})}var Fe=new Map,Ie=new Map,Le=new Map,Re=new Set;function ze(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Re.has(t))return!1;return!0}function Be(e=A){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var Ve=new Set;function He(e){let t=[],n=new Set;for(let r of Ue(e.themes)){let e=Ke(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return He({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return He({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Ue(e){return We(e)?[e]:e}function We(e){return Ke(e)||Ge(e)}function Ge(e){return typeof e.name==`string`&&typeof e.load==`function`}function Ke(e){return typeof e.getThemes==`function`}function qe(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Je=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Ye=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Xe=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Ze(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Je(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new Ye(i));let c=r,l=s().then(e=>{let a=qe(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Xe(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var Qe=Ze();function $e(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Qe.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Qe.getResolvedTheme(n)??Qe.seedResolvedTheme(n,e);Ve.has(n)||(Ve.add(n),t.loadThemeSync(e))}}function et(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Re.has(n.name))continue;let e=Fe.get(n.name);e??(e=n,Fe.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Re.add(e.name)}}function tt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var nt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,it=Object.getOwnPropertyNames,at=Object.prototype.hasOwnProperty,ot=(e,t)=>{let n={};for(var r in e)nt(n,r,{get:e[r],enumerable:!0});return t||nt(n,Symbol.toStringTag,{value:`Module`}),n},st=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=it(t),a=0,o=i.length,s;a<o;a++)s=i[a],!at.call(e,s)&&s!==n&&nt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=rt(t,s))||r.enumerable});return e},ct=(e,t,n)=>(st(e,t,`default`),n&&st(n,t,`default`)),lt=[{id:`abap`,name:`ABAP`,import:(()=>c(()=>import(`./abap-DF4NaQCD-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>c(()=>import(`./actionscript-3-O89o1DyQ-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>c(()=>import(`./ada-UiOHRbSd-X3Y2mlq2.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>c(()=>import(`./ahk-7eXkLipS-DwADkxyd.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>c(()=>import(`./ahk2-BRygvKjG-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>c(()=>import(`./angular-html-B-gwpVlh-DEM_d4RI.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>c(()=>import(`./angular-ts-BdaH9qH_-6UMLodBB.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>c(()=>import(`./apache-zsgjHeYU-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>c(()=>import(`./apex-DvIWVZE0-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>c(()=>import(`./apl-BLTDDucx-DIkkahEc.js`),__vite__mapDeps([7,3,2,4,1,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>c(()=>import(`./applescript-D_ETOzPj-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>c(()=>import(`./ara-CXdsJbD3-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>c(()=>import(`./asciidoc-CpqrUCBV-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>c(()=>import(`./asm-DLrPCi7c-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>c(()=>import(`./astro-CM3EIsEH-D5DYxAYu.js`),__vite__mapDeps([11,3,2,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>c(()=>import(`./awk-452npsTH-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>c(()=>import(`./ballerina-8wA0eHgr-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>c(()=>import(`./bat-D5zNUOf1-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>c(()=>import(`./beancount-BXtNUIgX-C2IN4Vk8.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>c(()=>import(`./berry-oDXeVIfk-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>c(()=>import(`./bibtex-CAeObnSR-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>c(()=>import(`./bicep-udSZHxea-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>c(()=>import(`./bird2-CeHO9zcD-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>c(()=>import(`./blade-BuLZ1b4i-CBKkB_Nt.js`),__vite__mapDeps([15,3,2,4,1,8,9,10,16,17])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>c(()=>import(`./bsl-1RMgW0z0-DFQGmQVW.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>c(()=>import(`./c-BOe7FNWg-C15nlYFX.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([20,2])))},{id:`c3`,name:`C3`,import:(()=>c(()=>import(`./c3-CWnhEhIf-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>c(()=>import(`./cadence-C2DNIpxD-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>c(()=>import(`./cairo-BAyCDmXl-Cbs4_8uo.js`),__vite__mapDeps([21,22])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>c(()=>import(`./chapel-DS426I0C-DoL0pgIr.js`),__vite__mapDeps([23,20,2])))},{id:`clarity`,name:`Clarity`,import:(()=>c(()=>import(`./clarity-CYwjxkRS-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>c(()=>import(`./clojure-g5hblQ59-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>c(()=>import(`./cmake-D30WusUY-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>c(()=>import(`./cobol-D88xw2SU-DlPiznQQ.js`),__vite__mapDeps([24,1,2,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>c(()=>import(`./codeowners-a_Z0p9_y-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>c(()=>import(`./codeql-BkSUw1F6-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>c(()=>import(`./coffee-9O-pYXz5-QB78c27T.js`),__vite__mapDeps([25,3,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>c(()=>import(`./common-lisp-D2PkvS4V-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>c(()=>import(`./coq-BLTGLocz-CGaSfhwR.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>c(()=>import(`./cpp-CPk7VU6o-XEasjJQb.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([26,2,27,28,20])))},{id:`crystal`,name:`Crystal`,import:(()=>c(()=>import(`./crystal-CRftOMVe-Cl7VOKqv.js`),__vite__mapDeps([29,3,2,4,1,17,20,30])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>c(()=>import(`./csharp--dn-Xz3x-dmMxLVLW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>c(()=>import(`./css-DKjIhbA_-BqYkMclh.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([4,2])))},{id:`csv`,name:`CSV`,import:(()=>c(()=>import(`./csv-DFU5sVkH-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>c(()=>import(`./cue-cdFZcSz0-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>c(()=>import(`./cypher-DRjO_s97-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>c(()=>import(`./d-BTgKsJ9x-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>c(()=>import(`./dart-D4omMRdb-CHZY9Xhz.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>c(()=>import(`./dax-DMzovUnU-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>c(()=>import(`./desktop-0YG2NeB2-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>c(()=>import(`./diff-D0WgTNQn-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>c(()=>import(`./docker-DMpUQ2UE-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>c(()=>import(`./dotenv-BSNpOEA3-CuH5my32.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>c(()=>import(`./dream-maker-Br_aTy0D-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>c(()=>import(`./edge-CZci3foK-CcvbLJND.js`),__vite__mapDeps([31,1,2,3,4,12,16])))},{id:`elixir`,name:`Elixir`,import:(()=>c(()=>import(`./elixir-BFbWRTPN-DCo1tsYk.js`),__vite__mapDeps([32,1,2,3,4])))},{id:`elm`,name:`Elm`,import:(()=>c(()=>import(`./elm-BFCSOEGh-KAuEEkOS.js`),__vite__mapDeps([33,28,2,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>c(()=>import(`./emacs-lisp-CaNYORYC-DR2vtWaj.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>c(()=>import(`./erb-C0EkZJvn-3O5TlDRJ.js`),__vite__mapDeps([34,1,2,3,4,35,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>c(()=>import(`./erlang-CKCtKigl-D6qyvpDS.js`),__vite__mapDeps([41,42])))},{id:`fennel`,name:`Fennel`,import:(()=>c(()=>import(`./fennel-XqmdNU54-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>c(()=>import(`./fish-DnIfDEl--BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>c(()=>import(`./fluent-Dv7iXi9Q-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>c(()=>import(`./fortran-fixed-form-csBK12UK-D0dbVYWO.js`),__vite__mapDeps([43,44])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>c(()=>import(`./fortran-free-form-B6CnEX04-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>c(()=>import(`./fsharp-Dg-CO_Nk-1bXdaR5c.js`),__vite__mapDeps([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>c(()=>import(`./gdresource-Wnu01jfQ-DgGvr_X3.js`),__vite__mapDeps([46,47,48])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>c(()=>import(`./gdscript-DZvGV2HF-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>c(()=>import(`./gdshader-C-YpNGc4-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>c(()=>import(`./genie-eGJU5Fha-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>c(()=>import(`./gherkin-DPafK1RH-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>c(()=>import(`./git-commit-CGBOesZY-CBrK0IBQ.js`),__vite__mapDeps([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>c(()=>import(`./git-rebase-DBDs07B2-BKfziPiX.js`),__vite__mapDeps([51,30,2])))},{id:`gleam`,name:`Gleam`,import:(()=>c(()=>import(`./gleam-DDi89CaZ-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>c(()=>import(`./glimmer-js-oqYt1Bty-oOPiIwDh.js`),__vite__mapDeps([52,3,2,4,1,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>c(()=>import(`./glimmer-ts-CjmgbZTn-C8gjUbKN.js`),__vite__mapDeps([53,3,2,4,1,12])))},{id:`glsl`,name:`GLSL`,import:(()=>c(()=>import(`./glsl-BqUMGrwT-5PoVKbXD.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([28,2,20])))},{id:`gn`,name:`GN`,import:(()=>c(()=>import(`./gn-DMs_IqO4-CAXYAgV-.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>c(()=>import(`./gnuplot-Dwu09Wsa-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>c(()=>import(`./go-BEdBk4fh-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>c(()=>import(`./graphql-CEJryLGF-Bx3HP-fV.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([37,2,3,12,14,38])))},{id:`groovy`,name:`Groovy`,import:(()=>c(()=>import(`./groovy-CmZ205Qh-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>c(()=>import(`./hack-DwBIwaGr-C2bRI1k_.js`),__vite__mapDeps([54,1,2,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>c(()=>import(`./haml-BgD6GFV2-C-E92qmq.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([36,2,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>c(()=>import(`./handlebars-DAEAtsmp-B3Qkz-fG.js`),__vite__mapDeps([55,3,2,4,1,40])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>c(()=>import(`./haskell-DSSJ-2AO-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>c(()=>import(`./haxe-DrA0Xrjd-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>c(()=>import(`./hcl-BxX70ue--Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>c(()=>import(`./hjson-Znrrrv1t-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>c(()=>import(`./hlsl-D-dP8z1U-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>c(()=>import(`./html-B63qAdeQ-mzUq7RfB.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([1,2,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>c(()=>import(`./html-derivative-DliF0Izh-DKttJgx1.js`),__vite__mapDeps([16,1,2,3,4])))},{id:`http`,name:`HTTP`,import:(()=>c(()=>import(`./http-BPdteiK2-BzL978Ty.js`),__vite__mapDeps([56,8,2,9,10,30,37,3,12,14,38])))},{id:`hurl`,name:`Hurl`,import:(()=>c(()=>import(`./hurl-y6bQoMbn-VmDIgNNg.js`),__vite__mapDeps([57,8,2,9,58,37,3,12,14,38])))},{id:`hxml`,name:`HXML`,import:(()=>c(()=>import(`./hxml-DTNXYROp-BVmu-PtK.js`),__vite__mapDeps([59,60])))},{id:`hy`,name:`Hy`,import:(()=>c(()=>import(`./hy-Cd4h6N3W-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>c(()=>import(`./imba-DdhTsO9l-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>c(()=>import(`./ini-CmgEGOBJ-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>c(()=>import(`./java-HDTZqoJ--r_CiLO3G.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([9,2])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>c(()=>import(`./javascript-B8-PXjxO-D8IL8RVw.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([3,2])))},{id:`jinja`,name:`Jinja`,import:(()=>c(()=>import(`./jinja-Li2helwk-iQ5WpNSs.js`),__vite__mapDeps([61,1,2,3,4])))},{id:`jison`,name:`Jison`,import:(()=>c(()=>import(`./jison-D4pd2L4r-CnB2TCTC.js`),__vite__mapDeps([62,3,2])))},{id:`json`,name:`JSON`,import:(()=>c(()=>import(`./json-CHeq_08V-BzfhDAQG.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([10,2])))},{id:`json5`,name:`JSON5`,import:(()=>c(()=>import(`./json5-D2Eltym1-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>c(()=>import(`./jsonc-BPIJyZ7u-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>c(()=>import(`./jsonl-BGkjXns2-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>c(()=>import(`./jsonnet-DsRfEVPr-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>c(()=>import(`./jssm-DP2pbfxn-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>c(()=>import(`./jsx-CTDAtxCE-BHaCLB5C.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([38,2])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>c(()=>import(`./julia-B8HGxjvO-DUNXU97h.js`),__vite__mapDeps([63,3,2,17,22,26,27,28,20,64])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>c(()=>import(`./just-C1IY8eCo-CwcMki68.js`),__vite__mapDeps([65,3,2,12,22,30,35,4,1,8,9,17,20,26,27,28,36,37,14,38,39,40,66])))},{id:`kdl`,name:`KDL`,import:(()=>c(()=>import(`./kdl-BdIUXyK8-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>c(()=>import(`./kotlin-CQsNEM2o-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>c(()=>import(`./kusto-UWPUoeE5-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>c(()=>import(`./latex-CWjLpLhK-C2bYvB1V.js`),__vite__mapDeps([67,68,2,64])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>c(()=>import(`./lean-D3P_r_z_-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>c(()=>import(`./less-9LYkHheD-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>c(()=>import(`./liquid-DO0vm52w-5ftSWtSQ.js`),__vite__mapDeps([69,3,2,4,1,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>c(()=>import(`./llvm-eWADufTp-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>c(()=>import(`./log-DvQMOE69-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>c(()=>import(`./logo-Cl5E_QyH-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>c(()=>import(`./lua-rOZn354j-BFEal9UY.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([39,2,20])))},{id:`luau`,name:`Luau`,import:(()=>c(()=>import(`./luau-7dQCidxK-VGWVLoqX.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>c(()=>import(`./make-CE9Hryyp-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>c(()=>import(`./markdown-nUtTZkU8-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>c(()=>import(`./marko-CiZdnOV9-VE4QpTYR.js`),__vite__mapDeps([70,4,2,6,12,71])))},{id:`matlab`,name:`MATLAB`,import:(()=>c(()=>import(`./matlab-fM7rwTZt-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>c(()=>import(`./mdc-D1ADfxGi-DASKK9_I.js`),__vite__mapDeps([72,16,1,2,3,4,40,42])))},{id:`mdx`,name:`MDX`,import:(()=>c(()=>import(`./mdx-DswfiFg4-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>c(()=>import(`./mermaid-CAl3BhSL-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>c(()=>import(`./mipsasm-DbPELTlh-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>c(()=>import(`./mojo-B8iEg1Sv-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>c(()=>import(`./moonbit-BR88EIMx-D9W784E_.js`),[]))},{id:`move`,name:`Move`,import:(()=>c(()=>import(`./move-CpCLo8d1-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>c(()=>import(`./narrat-9pGDjQTI-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>c(()=>import(`./nextflow-NdqbbodA-DL3HHGkn.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>c(()=>import(`./nextflow-groovy-Cvo9WVFK-D7IRt6Pp.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>c(()=>import(`./nginx-8KXIzHX2-OWn8Z957.js`),__vite__mapDeps([75,39,2,20])))},{id:`nim`,name:`Nim`,import:(()=>c(()=>import(`./nim-CbBDSJf5-DzS23snq.js`),__vite__mapDeps([76,3,2,4,1,8,9,20,28,42])))},{id:`nix`,name:`Nix`,import:(()=>c(()=>import(`./nix-CwcLdFnB-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>c(()=>import(`./nsis-Dn88_Onr-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>c(()=>import(`./nushell-DDaptVCJ--0fT3PI1.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>c(()=>import(`./objective-c-DK-EKgyd-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>c(()=>import(`./objective-cpp-CXtEgxjw-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>c(()=>import(`./ocaml-BO-0Wjtk-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>c(()=>import(`./odin-BDNmOx6H-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>c(()=>import(`./openscad-B8gTrm-E-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>c(()=>import(`./org-BlnOvN6p-mzfee9SX.js`),__vite__mapDeps([77,3,2,4,1,6,9,8,10,12,14,17,20,22,78,25,27,26,28,30,79,80,50,81,32,39,40,35,36,37,38,42,41,49,51,82,83,84,64,66,67,68,71,85,76,86,87,88,89,90,91,92,93,94])))},{id:`pascal`,name:`Pascal`,import:(()=>c(()=>import(`./pascal-CRtegPzh-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>c(()=>import(`./perl-CntHWu4k-C3Q6THHX.js`),__vite__mapDeps([66,3,2,4,1,8,9,17])))},{id:`php`,name:`PHP`,import:(()=>c(()=>import(`./php-VF06KE26-uqmHEtRE.js`),__vite__mapDeps([88,3,2,4,1,8,9,10,17])))},{id:`pkl`,name:`Pkl`,import:(()=>c(()=>import(`./pkl-C53Sb050-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>c(()=>import(`./plsql-Bx7tup_v-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>c(()=>import(`./po-DSTB2Mz9-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>c(()=>import(`./polar-E3hAEXm5-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>c(()=>import(`./postcss-BZib8l4b-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>c(()=>import(`./powerquery-CJblX2B2-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>c(()=>import(`./powershell-jc6OXU_u-QtSnmXcu.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>c(()=>import(`./prisma-CBAWJppo-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>c(()=>import(`./prolog-Ce1YjgEP-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>c(()=>import(`./proto-DGLklcji-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>c(()=>import(`./pug-DeZwH1tK-Dy2R8X_Z.js`),__vite__mapDeps([95,3,2,4,1])))},{id:`puppet`,name:`Puppet`,import:(()=>c(()=>import(`./puppet-B2qoEJs2-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>c(()=>import(`./purescript-Cq_6EhvO-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>c(()=>import(`./python-D0AaDoWC-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>c(()=>import(`./qml-CQhAR2tt-CkperL57.js`),__vite__mapDeps([96,3,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>c(()=>import(`./qmldir-BSWsNKCW-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>c(()=>import(`./qss-CT2jsqXX-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>c(()=>import(`./r-CGShpgkr-BeuwoEHJ.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([64,2])))},{id:`racket`,name:`Racket`,import:(()=>c(()=>import(`./racket-B0_wXtli-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>c(()=>import(`./raku-DKDZy5Ck-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>c(()=>import(`./razor-CgB2QCs6-C9kZAmAY.js`),__vite__mapDeps([97,1,2,3,4,79])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>c(()=>import(`./rbs-DvNU-OQ_-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>c(()=>import(`./reg-D6txjqBF-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>c(()=>import(`./regexp-go_CdRjx-BvThUXwF.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([27,2])))},{id:`rel`,name:`Rel`,import:(()=>c(()=>import(`./rel-CY3GbSca-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>c(()=>import(`./riscv-BKjM5F1V-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>c(()=>import(`./ron-DJgcWJZU-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>c(()=>import(`./rosmsg-BTByjkSH-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>c(()=>import(`./rst-CbWMI8ou-B_CNFtWj.js`),__vite__mapDeps([98,3,2,16,1,4,22,99,26,27,28,20,30,40,35,8,9,17,36,37,12,14,38,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>c(()=>import(`./ruby-DsGwIs06-BNNoCsny.js`),__vite__mapDeps([35,3,2,4,1,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>c(()=>import(`./rust-Dj2n2rl0-DpiIf5JO.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>c(()=>import(`./sas-DjxN8J4Z-DQwiaVY0.js`),__vite__mapDeps([100,17,2])))},{id:`sass`,name:`Sass`,import:(()=>c(()=>import(`./sass-CL6GLiPQ-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>c(()=>import(`./scala-D9AnhX7I-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>c(()=>import(`./scheme-BksZ4zIw-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>c(()=>import(`./scss-bkiiULjK-BdNohiDl.js`).then(e=>e.n),__vite__mapDeps([6,4,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>c(()=>import(`./sdbl-CLOIgNSF-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>c(()=>import(`./shaderlab-DyAWSLCO-BOY3qbOD.js`),__vite__mapDeps([101,102])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>c(()=>import(`./shellscript-Cuh1SIPr-CH9Y9Zzx.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([30,2])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>c(()=>import(`./shellsession-C4UOwxb7-BVPXZqFb.js`),__vite__mapDeps([103,30,2])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>c(()=>import(`./smalltalk-OVt5uEUD-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>c(()=>import(`./smithy-CseSvY8s-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>c(()=>import(`./solidity-CXjfwKeT-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>c(()=>import(`./soy-CeGFXpLT-bVeC_qdu.js`),__vite__mapDeps([104,1,2,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>c(()=>import(`./sparql-D1WLv7TG-1uHbDNxU.js`),__vite__mapDeps([105,106])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>c(()=>import(`./splunk-MGILMmew-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>c(()=>import(`./sql-qDYmMTO1-DRMw6L4F.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([17,2])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>c(()=>import(`./ssh-config-CFmUyPR7-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>c(()=>import(`./stata-Dzus_rwP-DcGzBrZt.js`),__vite__mapDeps([107,17,2])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>c(()=>import(`./stylus-Kh83dApl-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>c(()=>import(`./surrealql-DmTrf8uR-BGVhamzy.js`),__vite__mapDeps([108,3,2])))},{id:`svelte`,name:`Svelte`,import:(()=>c(()=>import(`./svelte-CWlRonoS-d0HsRKWL.js`),__vite__mapDeps([109,3,2,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>c(()=>import(`./swift-B7Z-rXzN-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>c(()=>import(`./system-verilog-CQoMYllC-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>c(()=>import(`./systemd-ArfzIYBi-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>c(()=>import(`./talonscript-SIE54PtE-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>c(()=>import(`./tasl-Ck4PO08m-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>c(()=>import(`./tcl-DfkVwqLO-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>c(()=>import(`./templ-EuFg1gKs-BBJ25IwK.js`),__vite__mapDeps([110,3,2,4,82])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>c(()=>import(`./terraform-DccThf6s-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>c(()=>import(`./tex-Cbbx1SXS-Dh8M7x1F.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([68,2,64])))},{id:`toml`,name:`TOML`,import:(()=>c(()=>import(`./toml-CIQJnU5u-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>c(()=>import(`./ts-tags-DOHpIWV2-DXabLRoX.js`),__vite__mapDeps([111,3,2,4,1,8,9,12,17,28,20])))},{id:`tsv`,name:`TSV`,import:(()=>c(()=>import(`./tsv-AfvsdcL--sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>c(()=>import(`./tsx-DmRL3u_2-Cn0tVC2C.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([14,2])))},{id:`turtle`,name:`Turtle`,import:(()=>c(()=>import(`./turtle-D1NNZBgy-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>c(()=>import(`./twig-BzcHspK1-BW8kSayf.js`),__vite__mapDeps([112,3,2,4,6,22,35,1,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40,88,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>c(()=>import(`./typescript-BYTx4UxO-XIX20smz.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([12,2])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>c(()=>import(`./typespec-M_tZhO7D-BGhR2SqG.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>c(()=>import(`./typst-BrfC91e7-BTQczO73.js`),__vite__mapDeps([113,3,2,4,1,6,9,8,10,12,14,114,115,17,20,22,78,25,27,26,28,30,79,80,50,81,32,39,40,35,36,37,38,42,41,45,49,51,82,83,55,84,116,64,63,66,67,68,71,117,85,86,88,89,90,91,92,94,118,95,119,120,112,121])))},{id:`v`,name:`V`,import:(()=>c(()=>import(`./v-DbYZLS97-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>c(()=>import(`./vala-i5OYwFuH-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>c(()=>import(`./vb-DRaXf86R-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>c(()=>import(`./verilog-Dl3uFuBh-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>c(()=>import(`./vhdl-UepOATuw-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>c(()=>import(`./viml-DgaHry3T-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>c(()=>import(`./vue-B92PIQFm-Bo7Ratnf.js`),__vite__mapDeps([122,3,2,4,1,10,12,16])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>c(()=>import(`./vue-html-EDHI-aeE-DZaGT8SW.js`),__vite__mapDeps([123,3,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>c(()=>import(`./vue-vine-CmMdgoEY-D5tBNukX.js`),__vite__mapDeps([124,3,2,4,6,13,71,125])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>c(()=>import(`./vyper-BiyGiCmH-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>c(()=>import(`./wasm-DXa1gtBd-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>c(()=>import(`./wenyan-Ke6AN0BI-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>c(()=>import(`./wgsl-Vcm3Lg52-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>c(()=>import(`./wikitext-C4uDiSA9-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>c(()=>import(`./wit-hbIPZwZR-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>c(()=>import(`./wolfram-DGFnG0I5-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>c(()=>import(`./xml-Bz9Nzp99-Bj4-GEHY.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([8,2,9])))},{id:`xsl`,name:`XSL`,import:(()=>c(()=>import(`./xsl-D0pOnfMq-9186FOf_.js`),__vite__mapDeps([94,8,2,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>c(()=>import(`./yaml-DKDHNCIP-ISipY-zA.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([40,2])))},{id:`zenscript`,name:`ZenScript`,import:(()=>c(()=>import(`./zenscript-BtXHY1aa-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>c(()=>import(`./zig-BaU1vZRj-CMLA9XwU.js`),[]))}],ut=Object.fromEntries(lt.map(e=>[e.id,e.import])),dt=Object.fromEntries(lt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ft={...ut,...dt},pt=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>c(()=>import(`./andromeeda-Bq1qfra0-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>c(()=>import(`./aurora-x-D_5cXlQq-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>c(()=>import(`./ayu-dark-W_m_DJ0O-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>c(()=>import(`./ayu-light-CR7ok7CK-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>c(()=>import(`./ayu-mirage-Bc_-BBPv-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-frappe-UU2Ypik4-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>c(()=>import(`./catppuccin-latte-Bh0sJ7Io-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-macchiato-CD3xCHWG-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-mocha-DbkhwdAd-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>c(()=>import(`./dark-plus-Czj9cyI8-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>c(()=>import(`./dracula-pLOfOGe2-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>c(()=>import(`./dracula-soft-CcPsYoZy-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>c(()=>import(`./everforest-dark-BWPMa2al-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>c(()=>import(`./everforest-light-CpstfLiC-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>c(()=>import(`./github-dark-DSDQ9Z5x-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>c(()=>import(`./github-dark-default-Ba0C144H-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>c(()=>import(`./github-dark-dimmed-BjqxmwYE-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>c(()=>import(`./github-dark-high-contrast-2Gl6bihm-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>c(()=>import(`./github-light-Dqk4CmHj-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>c(()=>import(`./github-light-default-BfbpqKOb-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>c(()=>import(`./github-light-high-contrast-Cxng4wGz-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-hard-CnaC6FgW-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-medium-DZ4gSoW4-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-soft-C2g9RXr0-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-hard-BA8YgpQf-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-medium-DwpyGngr-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-soft-NwbQPGmf-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>c(()=>import(`./horizon-XH-o5y3k-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>c(()=>import(`./horizon-bright-DS5w1sCx-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>c(()=>import(`./houston-CY83otqf-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>c(()=>import(`./kanagawa-dragon-DqNbNCdk-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>c(()=>import(`./kanagawa-lotus-B714rE-r-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>c(()=>import(`./kanagawa-wave-BpBHVF-m-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>c(()=>import(`./laserwave-BhcwZ0U8-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>c(()=>import(`./light-plus-C660oB0t-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>c(()=>import(`./material-theme-BCyY8Q5A-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>c(()=>import(`./material-theme-darker-b0q3yIYR-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>c(()=>import(`./material-theme-lighter-9CAlUddq-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>c(()=>import(`./material-theme-ocean-CGud8msl-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>c(()=>import(`./material-theme-palenight-CO5GI6OC-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>c(()=>import(`./min-dark-DeR7u5NC-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>c(()=>import(`./min-light-BXKBa8Zh-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>c(()=>import(`./monokai-B8gtewAU-BscAjiQZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>c(()=>import(`./night-owl-CSH9sESZ-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>c(()=>import(`./night-owl-light-D07sHQMN-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>c(()=>import(`./nord-COFoDEeB-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>c(()=>import(`./one-dark-pro-BWDUAAL--C6YyR8OD.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>c(()=>import(`./one-light-BU9t1Uvd-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>c(()=>import(`./plastic-C906q1W9-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>c(()=>import(`./poimandres-Dajy9qLx-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>c(()=>import(`./red-9mZYydjL-CYlAq2b0.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>c(()=>import(`./rose-pine-C9Si_UxR-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>c(()=>import(`./rose-pine-dawn-DfBO76oo-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>c(()=>import(`./rose-pine-moon-skDyLG87-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>c(()=>import(`./slack-dark-BFOZNtLZ-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>c(()=>import(`./slack-ochin-AgfAW_XU-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>c(()=>import(`./snazzy-light-Bfawczud-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>c(()=>import(`./solarized-dark-B_SSF9Fn-b97czJOk.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>c(()=>import(`./solarized-light-D3w6j0BH-DFPxpIYQ.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>c(()=>import(`./synthwave-84-DrmN3D2y-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>c(()=>import(`./tokyo-night-CznCTlOh-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>c(()=>import(`./vesper-Cc2bbb38-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>c(()=>import(`./vitesse-black-CFBaq1zJ-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>c(()=>import(`./vitesse-dark-DIapdvJS-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>c(()=>import(`./vitesse-light-DMAGa52j-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),mt=y({createOnigurumaEngine:()=>Bt,getDefaultWasmLoader:()=>zt,loadWasm:()=>Nt,setDefaultWasmLoader:()=>Rt}),ht=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function gt(){return 2147483648}function _t(){return typeof performance<`u`?performance.now():Date.now()}var vt=(e,t)=>e+(t-e%t)%t;async function yt(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=gt();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,vt(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:_t,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 bt=Object.defineProperty,xt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>xt(e,typeof t==`symbol`?t:t+``,n),N=null;function St(e){throw new ht(e.UTF8ToString(e.getLastOnigError()))}var Ct=class e{constructor(t){M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16Value`),M(this,`utf8Value`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},wt=class e{constructor(t){if(M(this,`id`,++e.LAST_ID),M(this,`_onigBinding`),M(this,`content`),M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`),M(this,`ptr`),!N)throw new ht(`Must invoke loadWasm first.`);this._onigBinding=N,this.content=t;let n=new Ct(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=N.omalloc(1e4),e._sharedPtrInUse=!0,N.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(N)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};M(wt,`LAST_ID`,0),M(wt,`_sharedPtr`,0),M(wt,`_sharedPtrInUse`,!1);var Tt=wt,Et=class{constructor(e){if(M(this,`_onigBinding`),M(this,`_ptr`),!N)throw new ht(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ct(e[r]);t[r]=i.createString(N),n[r]=i.utf8Length}let r=N.omalloc(4*e.length);N.HEAPU32.set(t,r/4);let i=N.omalloc(4*e.length);N.HEAPU32.set(n,i/4);let a=N.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)N.ofree(t[n]);N.ofree(i),N.ofree(r),a===0&&St(N),this._onigBinding=N,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Tt(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 Dt(e){return typeof e.instantiator==`function`}function Ot(e){return typeof e.default==`function`}function kt(e){return e.data!==void 0}function At(e){return typeof Response<`u`&&e instanceof Response}function jt(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 Mt;function Nt(e){if(Mt)return Mt;async function t(){N=await yt(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Dt(n)?n=await n.instantiator(t):Ot(n)?n=await n.default(t):(kt(n)&&(n=n.data),At(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Ft(n)(t):await It(n)(t):jt(n)||n instanceof WebAssembly.Module?n=await Pt(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Pt(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Mt=t(),Mt}function Pt(e){return t=>WebAssembly.instantiate(e,t)}function Ft(e){return t=>WebAssembly.instantiateStreaming(e,t)}function It(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Lt;function Rt(e){Lt=e}function zt(){return Lt}async function Bt(e){return e&&await Nt(e),{createScanner(e){return new Et(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Tt(e)}}}var Vt=ot({});ct(Vt,mt);var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ht(e){return Ut(e)}function Ut(e){return Array.isArray(e)?Wt(e):e instanceof RegExp?e:typeof e==`object`?Gt(e):e}function Wt(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ut(e[n]);return t}function Gt(e){let t={};for(let n in e)t[n]=Ut(e[n]);return t}function Kt(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function qt(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?qt(e.substring(0,e.length-1)):e.substr(~t+1)}var Jt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yt=class{static hasCaptures(e){return e!==null&&(Jt.lastIndex=0,Jt.test(e))}static replaceCaptures(e,t,n){return e.replace(Jt,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Xt(e,t){return e<t?-1:+(e>t)}function Zt(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Xt(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Qt(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function $t(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var en=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},tn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(sn(e),t)}static createFromParsedTheme(e,t){return ln(e,t)}_cachedMatchRoot=new en(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>rn(e.parent,t.parentScopes));return n?new on(n.fontStyle,n.foreground,n.background):null}},nn=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function rn(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!an(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function an(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var on=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function sn(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Qt(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Qt(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new cn(l,u,e,o,s,c)}}return n}var cn=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function ln(e,t){e.sort((e,t)=>{let n=Xt(e.scope,t.scope);return n!==0||(n=Zt(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new un(t),o=new on(n,a.getId(r),a.getId(i)),s=new pn(new fn(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new tn(a,o,s)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},dn=Object.freeze([]),fn=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||dn,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},pn=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),fn.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Zt(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new fn(e,t,n,r,i))}},mn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=gn(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function hn(e){return e}function gn(e){return e}function _n(e,t){let n=[],r=yn(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(vn(i)){let e=[];do e.push(i),i=r.next();while(vn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function yn(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function bn(e){typeof e.dispose==`function`&&e.dispose()}var xn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Sn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Cn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},wn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Cn;for(let n of e)Tn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof xn){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Tn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof xn?Dn({baseGrammar:a,selfGrammar:i},r):En(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new xn(e))}function En(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];On([r],t,n)}}function Dn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&On(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&On(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function On(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Kt({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&On(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Pn(i);switch(a.kind){case 0:Dn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Dn(t,n);break;case 2:En(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?En(a.ruleName,i,n):Dn(i,n)}else a.kind===4?n.add(new Sn(a.scopeName,a.ruleName)):n.add(new xn(a.scopeName))}}}var kn=class{kind=0},An=class{kind=1},jn=class{constructor(e){this.ruleName=e}kind=2},Mn=class{constructor(e){this.scopeName=e}kind=3},Nn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Pn(e){if(e===`$base`)return new kn;if(e===`$self`)return new An;let t=e.indexOf(`#`);return t===-1?new Mn(e):t===0?new jn(e.substring(1)):new Nn(e.substring(0,t),e.substring(t+1))}var Fn=/\\(\d+)/,In=/\\(\d+)/g,Ln=-1,Rn=-2;function zn(e){return e}function Bn(e){return e}var Vn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Yt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Yt.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${qt(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Yt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yt.replaceCaptures(this._contentName,e,t)}},Hn=class extends Vn{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Un=class extends Vn{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Jn(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Wn=class extends Vn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Gn=class extends Vn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Jn(i,this.id),this.beginCaptures=a,this._end=new Jn(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Kn=class extends Vn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Jn(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Jn(o,Rn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Yn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},qn=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Hn(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Un(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Kt({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Wn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Kn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Gn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Pn(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Wn||e instanceof Gn||e instanceof Kn)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Jn=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Fn.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return In.lastIndex=0,this.source.replace(In,(e,t)=>$t(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Yn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Xn(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Xn(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Xn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-B-gwpVlh-BHk2rITT.js","assets/html-B63qAdeQ-BvgXBi7v.js","assets/rolldown-runtime-hePW80VL.js","assets/javascript-B8-PXjxO-DrojTnjU.js","assets/css-DKjIhbA_-BZzy1gno.js","assets/angular-ts-BdaH9qH_-DDpR3-gU.js","assets/scss-bkiiULjK-RWkdLi31.js","assets/apl-BLTDDucx-C5lAAuBL.js","assets/xml-Bz9Nzp99-bfRaCa2x.js","assets/java-HDTZqoJ--DonfC-m-.js","assets/json-CHeq_08V-DGJ-08B3.js","assets/astro-CM3EIsEH-C-4mMpDY.js","assets/typescript-BYTx4UxO-C2eU2nTQ.js","assets/postcss-BZib8l4b-BXeXVLqQ.js","assets/tsx-DmRL3u_2-DulNQGwe.js","assets/blade-BuLZ1b4i-Bo26Vrie.js","assets/html-derivative-DliF0Izh-BdazZa_A.js","assets/sql-qDYmMTO1-Dp7sA9Pq.js","assets/bsl-1RMgW0z0-DFQGmQVW.js","assets/sdbl-CLOIgNSF-bTVj8UrX.js","assets/c-BOe7FNWg-Bn-hh2gC.js","assets/cairo-BAyCDmXl-Cbs4_8uo.js","assets/python-D0AaDoWC-gzcpVVnB.js","assets/chapel-DS426I0C-DZfMl2AF.js","assets/cobol-D88xw2SU-Dszzocsd.js","assets/coffee-9O-pYXz5-B-EAY7Cr.js","assets/cpp-CPk7VU6o-B1PTCDWN.js","assets/regexp-go_CdRjx-FwuQxSe1.js","assets/glsl-BqUMGrwT-DZSnNyRQ.js","assets/crystal-CRftOMVe-3NFSGC4Y.js","assets/shellscript-Cuh1SIPr-xep8lhFb.js","assets/edge-CZci3foK-BdZTWeOq.js","assets/elixir-BFbWRTPN-BSsfSNAc.js","assets/elm-BFCSOEGh-B7etdM00.js","assets/erb-C0EkZJvn-BUpElafA.js","assets/ruby-DsGwIs06-CvuKCvaN.js","assets/haml-BgD6GFV2-tYRnxnkA.js","assets/graphql-CEJryLGF-BxoDC-bv.js","assets/jsx-CTDAtxCE-B7AjYoF3.js","assets/lua-rOZn354j-CWNr0VLI.js","assets/yaml-DKDHNCIP-B5ot5BQr.js","assets/erlang-CKCtKigl-D6qyvpDS.js","assets/markdown-nUtTZkU8-BYOwaDjH.js","assets/fortran-fixed-form-csBK12UK-D0dbVYWO.js","assets/fortran-free-form-B6CnEX04-CYNrtFtB.js","assets/fsharp-Dg-CO_Nk-1bXdaR5c.js","assets/gdresource-Wnu01jfQ-DgGvr_X3.js","assets/gdshader-C-YpNGc4-CBce3t8t.js","assets/gdscript-DZvGV2HF-DYvRD3hg.js","assets/git-commit-CGBOesZY-CBrK0IBQ.js","assets/diff-D0WgTNQn-woXpYk--.js","assets/git-rebase-DBDs07B2-3YW7dddl.js","assets/glimmer-js-oqYt1Bty-Q18N5198.js","assets/glimmer-ts-CjmgbZTn-DflPUBBN.js","assets/hack-DwBIwaGr-BD9UbS9V.js","assets/handlebars-DAEAtsmp-CzuHoTaP.js","assets/http-BPdteiK2-DscIPq9Z.js","assets/hurl-y6bQoMbn-BniTWOKW.js","assets/csv-DFU5sVkH-Dx-8-gkx.js","assets/hxml-DTNXYROp-BVmu-PtK.js","assets/haxe-DrA0Xrjd-C8oCnwJJ.js","assets/jinja-Li2helwk-Bn7ViII1.js","assets/jison-D4pd2L4r-CURwtPm2.js","assets/julia-B8HGxjvO-CX2HXF0x.js","assets/r-CGShpgkr-Bu3ifplH.js","assets/just-C1IY8eCo-194MeSWx.js","assets/perl-CntHWu4k-R8g6ivQx.js","assets/latex-CWjLpLhK-CJV_bAR4.js","assets/tex-Cbbx1SXS-DPEKlVuI.js","assets/liquid-DO0vm52w-C-oH3gBH.js","assets/marko-CiZdnOV9-D1oeBgJ5.js","assets/less-9LYkHheD-DVTAwKKz.js","assets/mdc-D1ADfxGi-DDe8MjBS.js","assets/nextflow-NdqbbodA-DL3HHGkn.js","assets/nextflow-groovy-Cvo9WVFK-D7IRt6Pp.js","assets/nginx-8KXIzHX2-76JDQPWv.js","assets/nim-CbBDSJf5-Bg0Tpvlj.js","assets/org-BlnOvN6p-CpQvn0Ms.js","assets/clojure-g5hblQ59-DqKBuwfJ.js","assets/csharp--dn-Xz3x-dmMxLVLW.js","assets/dart-D4omMRdb-CHZY9Xhz.js","assets/docker-DMpUQ2UE-IyjqRm3v.js","assets/go-BEdBk4fh-rLFTqkRN.js","assets/groovy-CmZ205Qh-CacY0gHj.js","assets/ini-CmgEGOBJ-B5eOa1yu.js","assets/make-CE9Hryyp-Dixweg8N.js","assets/objective-c-DK-EKgyd-D1A_Heim.js","assets/ocaml-BO-0Wjtk-O90oeIOV.js","assets/php-VF06KE26-qz2OohxQ.js","assets/vb-DRaXf86R-DOwzaHZ0.js","assets/raku-DKDZy5Ck-B3gFvitq.js","assets/rust-Dj2n2rl0-DpiIf5JO.js","assets/scala-D9AnhX7I-BiFt_7mu.js","assets/zig-BaU1vZRj-CMLA9XwU.js","assets/xsl-D0pOnfMq-BaQuui65.js","assets/pug-DeZwH1tK-hE7p1XRn.js","assets/qml-CQhAR2tt-Blcerr_b.js","assets/razor-CgB2QCs6-C0YckD9e.js","assets/rst-CbWMI8ou-_a-jzVR0.js","assets/cmake-D30WusUY-Bj61d0ZC.js","assets/sas-DjxN8J4Z-6vMiHBWz.js","assets/shaderlab-DyAWSLCO-BOY3qbOD.js","assets/hlsl-D-dP8z1U-Cvrh5tZx.js","assets/shellsession-C4UOwxb7-B2Mjt8G4.js","assets/soy-CeGFXpLT-DB96q8ji.js","assets/sparql-D1WLv7TG-1uHbDNxU.js","assets/turtle-D1NNZBgy-ByJddavk.js","assets/stata-Dzus_rwP-Bk81H3oK.js","assets/surrealql-DmTrf8uR-BAVDL68E.js","assets/svelte-CWlRonoS-g4MbXmCf.js","assets/templ-EuFg1gKs-B9lc3TqB.js","assets/ts-tags-DOHpIWV2-DN6mmSGx.js","assets/twig-BzcHspK1-j95wbDo4.js","assets/typst-BrfC91e7-Bry73qoG.js","assets/bat-D5zNUOf1-qdxAdBWQ.js","assets/bibtex-CAeObnSR-Ci_nEsc7.js","assets/jsonc-BPIJyZ7u-CYpm1nAK.js","assets/log-DvQMOE69-BNLmms1o.js","assets/powershell-jc6OXU_u-QtSnmXcu.js","assets/swift-B7Z-rXzN-CyEgAFGc.js","assets/system-verilog-CQoMYllC-Dh5ihWbf.js","assets/verilog-Dl3uFuBh-B2gwz-sJ.js","assets/vue-B92PIQFm-_KBJBFm9.js","assets/vue-html-EDHI-aeE-Cx5Qo046.js","assets/vue-vine-CmMdgoEY-CDgVVhf3.js","assets/stylus-Kh83dApl-B6D30XZt.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{t as n}from"./react-Cvdyeg_0.js";import{i as r}from"./loader-circle-CUNkyj3b.js";import{D as i,S as a,w as o}from"./Dialog-_t9OodCK-CzkLh9VB.js";import{t as s}from"./jsx-runtime-NZYk81nU.js";import{O as c}from"./index-DlDEYM2e.js";import{n as l,r as u,t as d}from"./WorkspacePullRequestDetails-SexYOZUB.js";var f=Object.create,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,v=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),y=(e,t)=>{let n={};for(var r in e)p(n,r,{get:e[r],enumerable:!0});return t||p(n,Symbol.toStringTag,{value:`Module`}),n},b=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=h(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_.call(e,s)&&s!==n&&p(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=m(t,s))||r.enumerable});return e},x=(e,t,n)=>(n=e==null?{}:f(g(e)),b(t||!e||!e.__esModule||!_.call(e,`default`)?p(n,`default`,{value:e,enumerable:!0}):n,e)),S=e({DiffCodeView:()=>Ob,DiffFileTree:()=>d,DiffFinding:()=>jb,DiffHeader:()=>u,DiffWorkbench:()=>l,DiffWorkerProvider:()=>yb,RLY_DIFF_THEMES:()=>cb,createDiffWorkerFactory:()=>hb,normalizeDiffWorkerPoolSize:()=>mb}),C=t(n(),1),w=s(),T=t(r(),1),E={root:`rly_DiffCodeView-module__root`,viewer:`rly_DiffCodeView-module__viewer`,annotation:`rly_DiffCodeView-module__annotation`,empty:`rly_DiffCodeView-module__empty`,fallbackNotice:`rly_DiffCodeView-module__fallbackNotice`},ee={root:`rly_DiffFinding-module__root`,header:`rly_DiffFinding-module__header`,avatar:`rly_DiffFinding-module__avatar`,human:`rly_DiffFinding-module__human`,agent:`rly_DiffFinding-module__agent`,identity:`rly_DiffFinding-module__identity`,body:`rly_DiffFinding-module__body`,state:`rly_DiffFinding-module__state`,severity:`rly_DiffFinding-module__severity`,anchorDetails:`rly_DiffFinding-module__anchorDetails`,stale:`rly_DiffFinding-module__stale`,prevention:`rly_DiffFinding-module__prevention`,preventionSummary:`rly_DiffFinding-module__preventionSummary`,preventionIndicator:`rly_DiffFinding-module__preventionIndicator`,preventionCopy:`rly_DiffFinding-module__preventionCopy`,rationale:`rly_DiffFinding-module__rationale`,footer:`rly_DiffFinding-module__footer`};function D(e){let t=(0,C.useRef)(e);return(0,C.useInsertionEffect)(()=>void(t.current=e)),(0,C.useCallback)((...e)=>t.current(...e),[])}var O=(0,C.createContext)(void 0);function te(){return(0,C.useContext)(O)}var ne={position:`absolute`,top:0,bottom:0,textAlign:`center`,whiteSpace:`normal`,touchAction:`none`},k={display:`contents`},re=`diffs-container`,ie=(()=>{try{return!1}catch{return!1}})(),ae=/(?=^diff --git)/gm,oe=/(?<=\n)/,se=/^(---|\+\+\+)\s+([^\t\r\n]+)/,ce=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,le=`header-prefix`,ue=`header-filename-suffix`,de=`header-metadata`,fe=`header-custom`,A={dark:`pierre-dark`,light:`pierre-light`},pe=`data-theme-css`,me=`data-unsafe-css`,he=`data-diffs-scrollbar-measure`,ge=`data-diffs-code-view-header`,_e=`data-diffs-code-view-footer`,ve=`--diffs-scrollbar-gutter-measured`,ye=1e5,be={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},xe={...be,hunkLineCount:1},Se={paddingTop:8,paddingBottom:8,gap:8},Ce={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},we=Object.freeze({fromStart:0,fromEnd:0}),Te={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ee={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function De(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Oe({hunkIndex:e,lineIndex:t,conflictIndex:n}){return`merge-conflict-action-${e}-${t}-${n}`}function ke(e,t){return e-(t===0?0:1)}function j(e,t){return ke(e,t)+t}function Ae(e,t){let n=t.hunks[e.hunkIndex];if(n!=null)return{hunkIndex:e.hunkIndex,lineIndex:je(n,e.startContentIndex)}}function je(e,t){let n=e.unifiedLineStart;for(let r=0;r<t;r++){let t=e.hunkContent[r];n+=t.type===`context`?t.lines:t.deletions+t.additions}return n}function Me({fileDiff:e,actions:t,renderCustomHeader:n,renderHeaderPrefix:r,renderHeaderFilenameSuffix:i,renderHeaderMetadata:a,renderAnnotation:o,renderGutterUtility:s,renderMergeConflictUtility:c,lineAnnotations:l,getHoveredLine:u,getInstance:d,getAnnotationSlotName:f=De}){let p=n?.(e),m=r?.(e),h=i?.(e),g=a?.(e);return(0,w.jsxs)(w.Fragment,{children:[p==null?(0,w.jsxs)(w.Fragment,{children:[m!=null&&(0,w.jsx)(`div`,{slot:`header-prefix`,children:m}),h!=null&&(0,w.jsx)(`div`,{slot:`header-filename-suffix`,children:h}),g!=null&&(0,w.jsx)(`div`,{slot:`header-metadata`,children:g})]}):(0,w.jsx)(`div`,{slot:fe,children:p}),o!=null&&l?.map((e,t)=>(0,w.jsx)(`div`,{slot:f(e),children:o(e)},t)),t!=null&&c!=null&&d!=null&&t.map(t=>{if(t==null)return;let n=Ne(t,e);return(0,w.jsx)(`div`,{slot:n,style:k,children:c(t,d)},n)}),s!=null&&(0,w.jsx)(`div`,{slot:`gutter-utility-slot`,style:ne,children:s(u)})]})}function Ne(e,t){let n=Ae(e,t);return n==null?void 0:Oe({hunkIndex:n.hunkIndex,lineIndex:n.lineIndex,conflictIndex:e.conflictIndex})}function Pe({file:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,lineAnnotations:o,renderGutterUtility:s,getHoveredLine:c,getAnnotationSlotName:l=De}){let u=t?.(e),d=n?.(e),f=r?.(e),p=i?.(e);return(0,w.jsxs)(w.Fragment,{children:[u==null?(0,w.jsxs)(w.Fragment,{children:[d!=null&&(0,w.jsx)(`div`,{slot:`header-prefix`,children:d}),f!=null&&(0,w.jsx)(`div`,{slot:`header-filename-suffix`,children:f}),p!=null&&(0,w.jsx)(`div`,{slot:`header-metadata`,children:p})]}):(0,w.jsx)(`div`,{slot:fe,children:u}),a!=null&&o?.map((e,t)=>(0,w.jsx)(`div`,{slot:l(e),children:a(e)},t)),s!=null&&(0,w.jsx)(`div`,{slot:`gutter-utility-slot`,style:ne,children:s(c)})]})}var Fe=new Map,Ie=new Map,Le=new Map,Re=new Set;function ze(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Re.has(t))return!1;return!0}function Be(e=A){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}var Ve=new Set;function He(e){let t=[],n=new Set;for(let r of Ue(e.themes)){let e=Ke(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return He({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return He({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function Ue(e){return We(e)?[e]:e}function We(e){return Ke(e)||Ge(e)}function Ge(e){return typeof e.name==`string`&&typeof e.load==`function`}function Ke(e){return typeof e.getThemes==`function`}function qe(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Je=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},Ye=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Xe=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Ze(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Je(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new Ye(i));let c=r,l=s().then(e=>{let a=qe(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Xe(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var Qe=Ze();function $e(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=Qe.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,Qe.getResolvedTheme(n)??Qe.seedResolvedTheme(n,e);Ve.has(n)||(Ve.add(n),t.loadThemeSync(e))}}function et(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Re.has(n.name))continue;let e=Fe.get(n.name);e??(e=n,Fe.set(n.name,e));let r=e.data.find(t=>t.name===e.name||t.aliases?.includes(e.name)===!0);if(r==null)throw Error(`attachResolvedLanguages: No returned grammar declares "${e.name}" as its name or an alias.`);t.loadLanguageSync(e.data);try{t.getLanguage(e.name)}catch{throw Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${e.name}". Load the alias first or give the grammar a unique name.`)}Re.add(e.name)}}function tt(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var nt=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,it=Object.getOwnPropertyNames,at=Object.prototype.hasOwnProperty,ot=(e,t)=>{let n={};for(var r in e)nt(n,r,{get:e[r],enumerable:!0});return t||nt(n,Symbol.toStringTag,{value:`Module`}),n},st=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=it(t),a=0,o=i.length,s;a<o;a++)s=i[a],!at.call(e,s)&&s!==n&&nt(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=rt(t,s))||r.enumerable});return e},ct=(e,t,n)=>(st(e,t,`default`),n&&st(n,t,`default`)),lt=[{id:`abap`,name:`ABAP`,import:(()=>c(()=>import(`./abap-DF4NaQCD-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>c(()=>import(`./actionscript-3-O89o1DyQ-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>c(()=>import(`./ada-UiOHRbSd-X3Y2mlq2.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>c(()=>import(`./ahk-7eXkLipS-DwADkxyd.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>c(()=>import(`./ahk2-BRygvKjG-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>c(()=>import(`./angular-html-B-gwpVlh-BHk2rITT.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>c(()=>import(`./angular-ts-BdaH9qH_-DDpR3-gU.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>c(()=>import(`./apache-zsgjHeYU-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>c(()=>import(`./apex-DvIWVZE0-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>c(()=>import(`./apl-BLTDDucx-C5lAAuBL.js`),__vite__mapDeps([7,3,2,4,1,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>c(()=>import(`./applescript-D_ETOzPj-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>c(()=>import(`./ara-CXdsJbD3-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>c(()=>import(`./asciidoc-CpqrUCBV-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>c(()=>import(`./asm-DLrPCi7c-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>c(()=>import(`./astro-CM3EIsEH-C-4mMpDY.js`),__vite__mapDeps([11,3,2,4,10,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>c(()=>import(`./awk-452npsTH-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>c(()=>import(`./ballerina-8wA0eHgr-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>c(()=>import(`./bat-D5zNUOf1-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>c(()=>import(`./beancount-BXtNUIgX-C2IN4Vk8.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>c(()=>import(`./berry-oDXeVIfk-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>c(()=>import(`./bibtex-CAeObnSR-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>c(()=>import(`./bicep-udSZHxea-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>c(()=>import(`./bird2-CeHO9zcD-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>c(()=>import(`./blade-BuLZ1b4i-Bo26Vrie.js`),__vite__mapDeps([15,3,2,4,1,8,9,10,16,17])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>c(()=>import(`./bsl-1RMgW0z0-DFQGmQVW.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>c(()=>import(`./c-BOe7FNWg-Bn-hh2gC.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([20,2])))},{id:`c3`,name:`C3`,import:(()=>c(()=>import(`./c3-CWnhEhIf-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>c(()=>import(`./cadence-C2DNIpxD-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>c(()=>import(`./cairo-BAyCDmXl-Cbs4_8uo.js`),__vite__mapDeps([21,22])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>c(()=>import(`./chapel-DS426I0C-DZfMl2AF.js`),__vite__mapDeps([23,20,2])))},{id:`clarity`,name:`Clarity`,import:(()=>c(()=>import(`./clarity-CYwjxkRS-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>c(()=>import(`./clojure-g5hblQ59-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>c(()=>import(`./cmake-D30WusUY-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>c(()=>import(`./cobol-D88xw2SU-Dszzocsd.js`),__vite__mapDeps([24,1,2,3,4,9])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>c(()=>import(`./codeowners-a_Z0p9_y-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>c(()=>import(`./codeql-BkSUw1F6-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>c(()=>import(`./coffee-9O-pYXz5-B-EAY7Cr.js`),__vite__mapDeps([25,3,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>c(()=>import(`./common-lisp-D2PkvS4V-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>c(()=>import(`./coq-BLTGLocz-CGaSfhwR.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>c(()=>import(`./cpp-CPk7VU6o-B1PTCDWN.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([26,2,27,28,20])))},{id:`crystal`,name:`Crystal`,import:(()=>c(()=>import(`./crystal-CRftOMVe-3NFSGC4Y.js`),__vite__mapDeps([29,3,2,4,1,17,20,30])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>c(()=>import(`./csharp--dn-Xz3x-dmMxLVLW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>c(()=>import(`./css-DKjIhbA_-BZzy1gno.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([4,2])))},{id:`csv`,name:`CSV`,import:(()=>c(()=>import(`./csv-DFU5sVkH-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>c(()=>import(`./cue-cdFZcSz0-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>c(()=>import(`./cypher-DRjO_s97-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>c(()=>import(`./d-BTgKsJ9x-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>c(()=>import(`./dart-D4omMRdb-CHZY9Xhz.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>c(()=>import(`./dax-DMzovUnU-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>c(()=>import(`./desktop-0YG2NeB2-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>c(()=>import(`./diff-D0WgTNQn-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>c(()=>import(`./docker-DMpUQ2UE-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>c(()=>import(`./dotenv-BSNpOEA3-CuH5my32.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>c(()=>import(`./dream-maker-Br_aTy0D-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>c(()=>import(`./edge-CZci3foK-BdZTWeOq.js`),__vite__mapDeps([31,1,2,3,4,12,16])))},{id:`elixir`,name:`Elixir`,import:(()=>c(()=>import(`./elixir-BFbWRTPN-BSsfSNAc.js`),__vite__mapDeps([32,1,2,3,4])))},{id:`elm`,name:`Elm`,import:(()=>c(()=>import(`./elm-BFCSOEGh-B7etdM00.js`),__vite__mapDeps([33,28,2,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>c(()=>import(`./emacs-lisp-CaNYORYC-DR2vtWaj.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>c(()=>import(`./erb-C0EkZJvn-BUpElafA.js`),__vite__mapDeps([34,1,2,3,4,35,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>c(()=>import(`./erlang-CKCtKigl-D6qyvpDS.js`),__vite__mapDeps([41,42])))},{id:`fennel`,name:`Fennel`,import:(()=>c(()=>import(`./fennel-XqmdNU54-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>c(()=>import(`./fish-DnIfDEl--BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>c(()=>import(`./fluent-Dv7iXi9Q-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>c(()=>import(`./fortran-fixed-form-csBK12UK-D0dbVYWO.js`),__vite__mapDeps([43,44])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>c(()=>import(`./fortran-free-form-B6CnEX04-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>c(()=>import(`./fsharp-Dg-CO_Nk-1bXdaR5c.js`),__vite__mapDeps([45,42])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>c(()=>import(`./gdresource-Wnu01jfQ-DgGvr_X3.js`),__vite__mapDeps([46,47,48])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>c(()=>import(`./gdscript-DZvGV2HF-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>c(()=>import(`./gdshader-C-YpNGc4-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>c(()=>import(`./genie-eGJU5Fha-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>c(()=>import(`./gherkin-DPafK1RH-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>c(()=>import(`./git-commit-CGBOesZY-CBrK0IBQ.js`),__vite__mapDeps([49,50])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>c(()=>import(`./git-rebase-DBDs07B2-3YW7dddl.js`),__vite__mapDeps([51,30,2])))},{id:`gleam`,name:`Gleam`,import:(()=>c(()=>import(`./gleam-DDi89CaZ-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>c(()=>import(`./glimmer-js-oqYt1Bty-Q18N5198.js`),__vite__mapDeps([52,3,2,4,1,12])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>c(()=>import(`./glimmer-ts-CjmgbZTn-DflPUBBN.js`),__vite__mapDeps([53,3,2,4,1,12])))},{id:`glsl`,name:`GLSL`,import:(()=>c(()=>import(`./glsl-BqUMGrwT-DZSnNyRQ.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([28,2,20])))},{id:`gn`,name:`GN`,import:(()=>c(()=>import(`./gn-DMs_IqO4-CAXYAgV-.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>c(()=>import(`./gnuplot-Dwu09Wsa-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>c(()=>import(`./go-BEdBk4fh-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>c(()=>import(`./graphql-CEJryLGF-BxoDC-bv.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([37,2,3,12,14,38])))},{id:`groovy`,name:`Groovy`,import:(()=>c(()=>import(`./groovy-CmZ205Qh-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>c(()=>import(`./hack-DwBIwaGr-BD9UbS9V.js`),__vite__mapDeps([54,1,2,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>c(()=>import(`./haml-BgD6GFV2-tYRnxnkA.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([36,2,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>c(()=>import(`./handlebars-DAEAtsmp-CzuHoTaP.js`),__vite__mapDeps([55,3,2,4,1,40])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>c(()=>import(`./haskell-DSSJ-2AO-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>c(()=>import(`./haxe-DrA0Xrjd-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>c(()=>import(`./hcl-BxX70ue--Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>c(()=>import(`./hjson-Znrrrv1t-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>c(()=>import(`./hlsl-D-dP8z1U-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>c(()=>import(`./html-B63qAdeQ-BvgXBi7v.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([1,2,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>c(()=>import(`./html-derivative-DliF0Izh-BdazZa_A.js`),__vite__mapDeps([16,1,2,3,4])))},{id:`http`,name:`HTTP`,import:(()=>c(()=>import(`./http-BPdteiK2-DscIPq9Z.js`),__vite__mapDeps([56,8,2,9,10,30,37,3,12,14,38])))},{id:`hurl`,name:`Hurl`,import:(()=>c(()=>import(`./hurl-y6bQoMbn-BniTWOKW.js`),__vite__mapDeps([57,8,2,9,58,37,3,12,14,38])))},{id:`hxml`,name:`HXML`,import:(()=>c(()=>import(`./hxml-DTNXYROp-BVmu-PtK.js`),__vite__mapDeps([59,60])))},{id:`hy`,name:`Hy`,import:(()=>c(()=>import(`./hy-Cd4h6N3W-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>c(()=>import(`./imba-DdhTsO9l-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>c(()=>import(`./ini-CmgEGOBJ-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>c(()=>import(`./java-HDTZqoJ--DonfC-m-.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([9,2])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>c(()=>import(`./javascript-B8-PXjxO-DrojTnjU.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([3,2])))},{id:`jinja`,name:`Jinja`,import:(()=>c(()=>import(`./jinja-Li2helwk-Bn7ViII1.js`),__vite__mapDeps([61,1,2,3,4])))},{id:`jison`,name:`Jison`,import:(()=>c(()=>import(`./jison-D4pd2L4r-CURwtPm2.js`),__vite__mapDeps([62,3,2])))},{id:`json`,name:`JSON`,import:(()=>c(()=>import(`./json-CHeq_08V-DGJ-08B3.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([10,2])))},{id:`json5`,name:`JSON5`,import:(()=>c(()=>import(`./json5-D2Eltym1-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>c(()=>import(`./jsonc-BPIJyZ7u-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>c(()=>import(`./jsonl-BGkjXns2-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>c(()=>import(`./jsonnet-DsRfEVPr-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>c(()=>import(`./jssm-DP2pbfxn-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>c(()=>import(`./jsx-CTDAtxCE-B7AjYoF3.js`).then(e=>e.t).then(e=>e.n),__vite__mapDeps([38,2])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>c(()=>import(`./julia-B8HGxjvO-CX2HXF0x.js`),__vite__mapDeps([63,3,2,17,22,26,27,28,20,64])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>c(()=>import(`./just-C1IY8eCo-194MeSWx.js`),__vite__mapDeps([65,3,2,12,22,30,35,4,1,8,9,17,20,26,27,28,36,37,14,38,39,40,66])))},{id:`kdl`,name:`KDL`,import:(()=>c(()=>import(`./kdl-BdIUXyK8-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>c(()=>import(`./kotlin-CQsNEM2o-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>c(()=>import(`./kusto-UWPUoeE5-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>c(()=>import(`./latex-CWjLpLhK-CJV_bAR4.js`),__vite__mapDeps([67,68,2,64])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>c(()=>import(`./lean-D3P_r_z_-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>c(()=>import(`./less-9LYkHheD-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>c(()=>import(`./liquid-DO0vm52w-C-oH3gBH.js`),__vite__mapDeps([69,3,2,4,1,10])))},{id:`llvm`,name:`LLVM IR`,import:(()=>c(()=>import(`./llvm-eWADufTp-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>c(()=>import(`./log-DvQMOE69-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>c(()=>import(`./logo-Cl5E_QyH-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>c(()=>import(`./lua-rOZn354j-CWNr0VLI.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([39,2,20])))},{id:`luau`,name:`Luau`,import:(()=>c(()=>import(`./luau-7dQCidxK-VGWVLoqX.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>c(()=>import(`./make-CE9Hryyp-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>c(()=>import(`./markdown-nUtTZkU8-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>c(()=>import(`./marko-CiZdnOV9-D1oeBgJ5.js`),__vite__mapDeps([70,4,2,6,12,71])))},{id:`matlab`,name:`MATLAB`,import:(()=>c(()=>import(`./matlab-fM7rwTZt-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>c(()=>import(`./mdc-D1ADfxGi-DDe8MjBS.js`),__vite__mapDeps([72,16,1,2,3,4,40,42])))},{id:`mdx`,name:`MDX`,import:(()=>c(()=>import(`./mdx-DswfiFg4-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>c(()=>import(`./mermaid-CAl3BhSL-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>c(()=>import(`./mipsasm-DbPELTlh-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>c(()=>import(`./mojo-B8iEg1Sv-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>c(()=>import(`./moonbit-BR88EIMx-D9W784E_.js`),[]))},{id:`move`,name:`Move`,import:(()=>c(()=>import(`./move-CpCLo8d1-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>c(()=>import(`./narrat-9pGDjQTI-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>c(()=>import(`./nextflow-NdqbbodA-DL3HHGkn.js`),__vite__mapDeps([73,74])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>c(()=>import(`./nextflow-groovy-Cvo9WVFK-D7IRt6Pp.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>c(()=>import(`./nginx-8KXIzHX2-76JDQPWv.js`),__vite__mapDeps([75,39,2,20])))},{id:`nim`,name:`Nim`,import:(()=>c(()=>import(`./nim-CbBDSJf5-Bg0Tpvlj.js`),__vite__mapDeps([76,3,2,4,1,8,9,20,28,42])))},{id:`nix`,name:`Nix`,import:(()=>c(()=>import(`./nix-CwcLdFnB-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>c(()=>import(`./nsis-Dn88_Onr-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>c(()=>import(`./nushell-DDaptVCJ--0fT3PI1.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>c(()=>import(`./objective-c-DK-EKgyd-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>c(()=>import(`./objective-cpp-CXtEgxjw-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>c(()=>import(`./ocaml-BO-0Wjtk-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>c(()=>import(`./odin-BDNmOx6H-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>c(()=>import(`./openscad-B8gTrm-E-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>c(()=>import(`./org-BlnOvN6p-CpQvn0Ms.js`),__vite__mapDeps([77,3,2,4,1,6,9,8,10,12,14,17,20,22,78,25,27,26,28,30,79,80,50,81,32,39,40,35,36,37,38,42,41,49,51,82,83,84,64,66,67,68,71,85,76,86,87,88,89,90,91,92,93,94])))},{id:`pascal`,name:`Pascal`,import:(()=>c(()=>import(`./pascal-CRtegPzh-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>c(()=>import(`./perl-CntHWu4k-R8g6ivQx.js`),__vite__mapDeps([66,3,2,4,1,8,9,17])))},{id:`php`,name:`PHP`,import:(()=>c(()=>import(`./php-VF06KE26-qz2OohxQ.js`),__vite__mapDeps([88,3,2,4,1,8,9,10,17])))},{id:`pkl`,name:`Pkl`,import:(()=>c(()=>import(`./pkl-C53Sb050-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>c(()=>import(`./plsql-Bx7tup_v-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>c(()=>import(`./po-DSTB2Mz9-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>c(()=>import(`./polar-E3hAEXm5-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>c(()=>import(`./postcss-BZib8l4b-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>c(()=>import(`./powerquery-CJblX2B2-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>c(()=>import(`./powershell-jc6OXU_u-QtSnmXcu.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>c(()=>import(`./prisma-CBAWJppo-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>c(()=>import(`./prolog-Ce1YjgEP-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>c(()=>import(`./proto-DGLklcji-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>c(()=>import(`./pug-DeZwH1tK-hE7p1XRn.js`),__vite__mapDeps([95,3,2,4,1])))},{id:`puppet`,name:`Puppet`,import:(()=>c(()=>import(`./puppet-B2qoEJs2-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>c(()=>import(`./purescript-Cq_6EhvO-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>c(()=>import(`./python-D0AaDoWC-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>c(()=>import(`./qml-CQhAR2tt-Blcerr_b.js`),__vite__mapDeps([96,3,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>c(()=>import(`./qmldir-BSWsNKCW-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>c(()=>import(`./qss-CT2jsqXX-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>c(()=>import(`./r-CGShpgkr-Bu3ifplH.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([64,2])))},{id:`racket`,name:`Racket`,import:(()=>c(()=>import(`./racket-B0_wXtli-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>c(()=>import(`./raku-DKDZy5Ck-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>c(()=>import(`./razor-CgB2QCs6-C0YckD9e.js`),__vite__mapDeps([97,1,2,3,4,79])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>c(()=>import(`./rbs-DvNU-OQ_-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>c(()=>import(`./reg-D6txjqBF-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>c(()=>import(`./regexp-go_CdRjx-FwuQxSe1.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([27,2])))},{id:`rel`,name:`Rel`,import:(()=>c(()=>import(`./rel-CY3GbSca-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>c(()=>import(`./riscv-BKjM5F1V-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>c(()=>import(`./ron-DJgcWJZU-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>c(()=>import(`./rosmsg-BTByjkSH-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>c(()=>import(`./rst-CbWMI8ou-_a-jzVR0.js`),__vite__mapDeps([98,3,2,16,1,4,22,99,26,27,28,20,30,40,35,8,9,17,36,37,12,14,38,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>c(()=>import(`./ruby-DsGwIs06-CvuKCvaN.js`),__vite__mapDeps([35,3,2,4,1,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>c(()=>import(`./rust-Dj2n2rl0-DpiIf5JO.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>c(()=>import(`./sas-DjxN8J4Z-6vMiHBWz.js`),__vite__mapDeps([100,17,2])))},{id:`sass`,name:`Sass`,import:(()=>c(()=>import(`./sass-CL6GLiPQ-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>c(()=>import(`./scala-D9AnhX7I-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>c(()=>import(`./scheme-BksZ4zIw-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>c(()=>import(`./scss-bkiiULjK-RWkdLi31.js`).then(e=>e.n),__vite__mapDeps([6,4,2])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>c(()=>import(`./sdbl-CLOIgNSF-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>c(()=>import(`./shaderlab-DyAWSLCO-BOY3qbOD.js`),__vite__mapDeps([101,102])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>c(()=>import(`./shellscript-Cuh1SIPr-xep8lhFb.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([30,2])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>c(()=>import(`./shellsession-C4UOwxb7-B2Mjt8G4.js`),__vite__mapDeps([103,30,2])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>c(()=>import(`./smalltalk-OVt5uEUD-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>c(()=>import(`./smithy-CseSvY8s-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>c(()=>import(`./solidity-CXjfwKeT-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>c(()=>import(`./soy-CeGFXpLT-DB96q8ji.js`),__vite__mapDeps([104,1,2,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>c(()=>import(`./sparql-D1WLv7TG-1uHbDNxU.js`),__vite__mapDeps([105,106])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>c(()=>import(`./splunk-MGILMmew-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>c(()=>import(`./sql-qDYmMTO1-Dp7sA9Pq.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([17,2])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>c(()=>import(`./ssh-config-CFmUyPR7-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>c(()=>import(`./stata-Dzus_rwP-Bk81H3oK.js`),__vite__mapDeps([107,17,2])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>c(()=>import(`./stylus-Kh83dApl-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>c(()=>import(`./surrealql-DmTrf8uR-BAVDL68E.js`),__vite__mapDeps([108,3,2])))},{id:`svelte`,name:`Svelte`,import:(()=>c(()=>import(`./svelte-CWlRonoS-g4MbXmCf.js`),__vite__mapDeps([109,3,2,4,12,13])))},{id:`swift`,name:`Swift`,import:(()=>c(()=>import(`./swift-B7Z-rXzN-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>c(()=>import(`./system-verilog-CQoMYllC-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>c(()=>import(`./systemd-ArfzIYBi-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>c(()=>import(`./talonscript-SIE54PtE-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>c(()=>import(`./tasl-Ck4PO08m-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>c(()=>import(`./tcl-DfkVwqLO-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>c(()=>import(`./templ-EuFg1gKs-B9lc3TqB.js`),__vite__mapDeps([110,3,2,4,82])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>c(()=>import(`./terraform-DccThf6s-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>c(()=>import(`./tex-Cbbx1SXS-DPEKlVuI.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([68,2,64])))},{id:`toml`,name:`TOML`,import:(()=>c(()=>import(`./toml-CIQJnU5u-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>c(()=>import(`./ts-tags-DOHpIWV2-DN6mmSGx.js`),__vite__mapDeps([111,3,2,4,1,8,9,12,17,28,20])))},{id:`tsv`,name:`TSV`,import:(()=>c(()=>import(`./tsv-AfvsdcL--sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>c(()=>import(`./tsx-DmRL3u_2-DulNQGwe.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([14,2])))},{id:`turtle`,name:`Turtle`,import:(()=>c(()=>import(`./turtle-D1NNZBgy-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>c(()=>import(`./twig-BzcHspK1-j95wbDo4.js`),__vite__mapDeps([112,3,2,4,6,22,35,1,8,9,17,20,26,27,28,30,36,37,12,14,38,39,40,88,10])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>c(()=>import(`./typescript-BYTx4UxO-C2eU2nTQ.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([12,2])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>c(()=>import(`./typespec-M_tZhO7D-BGhR2SqG.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>c(()=>import(`./typst-BrfC91e7-Bry73qoG.js`),__vite__mapDeps([113,3,2,4,1,6,9,8,10,12,14,114,115,17,20,22,78,25,27,26,28,30,79,80,50,81,32,39,40,35,36,37,38,42,41,45,49,51,82,83,55,84,116,64,63,66,67,68,71,117,85,86,88,89,90,91,92,94,118,95,119,120,112,121])))},{id:`v`,name:`V`,import:(()=>c(()=>import(`./v-DbYZLS97-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>c(()=>import(`./vala-i5OYwFuH-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>c(()=>import(`./vb-DRaXf86R-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>c(()=>import(`./verilog-Dl3uFuBh-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>c(()=>import(`./vhdl-UepOATuw-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>c(()=>import(`./viml-DgaHry3T-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>c(()=>import(`./vue-B92PIQFm-_KBJBFm9.js`),__vite__mapDeps([122,3,2,4,1,10,12,16])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>c(()=>import(`./vue-html-EDHI-aeE-Cx5Qo046.js`),__vite__mapDeps([123,3,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>c(()=>import(`./vue-vine-CmMdgoEY-CDgVVhf3.js`),__vite__mapDeps([124,3,2,4,6,13,71,125])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>c(()=>import(`./vyper-BiyGiCmH-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>c(()=>import(`./wasm-DXa1gtBd-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>c(()=>import(`./wenyan-Ke6AN0BI-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>c(()=>import(`./wgsl-Vcm3Lg52-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>c(()=>import(`./wikitext-C4uDiSA9-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>c(()=>import(`./wit-hbIPZwZR-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>c(()=>import(`./wolfram-DGFnG0I5-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>c(()=>import(`./xml-Bz9Nzp99-bfRaCa2x.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([8,2,9])))},{id:`xsl`,name:`XSL`,import:(()=>c(()=>import(`./xsl-D0pOnfMq-BaQuui65.js`),__vite__mapDeps([94,8,2,9])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>c(()=>import(`./yaml-DKDHNCIP-B5ot5BQr.js`).then(e=>e.n).then(e=>e.n),__vite__mapDeps([40,2])))},{id:`zenscript`,name:`ZenScript`,import:(()=>c(()=>import(`./zenscript-BtXHY1aa-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>c(()=>import(`./zig-BaU1vZRj-CMLA9XwU.js`),[]))}],ut=Object.fromEntries(lt.map(e=>[e.id,e.import])),dt=Object.fromEntries(lt.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ft={...ut,...dt},pt=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>c(()=>import(`./andromeeda-Bq1qfra0-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>c(()=>import(`./aurora-x-D_5cXlQq-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>c(()=>import(`./ayu-dark-W_m_DJ0O-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>c(()=>import(`./ayu-light-CR7ok7CK-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>c(()=>import(`./ayu-mirage-Bc_-BBPv-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-frappe-UU2Ypik4-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>c(()=>import(`./catppuccin-latte-Bh0sJ7Io-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-macchiato-CD3xCHWG-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>c(()=>import(`./catppuccin-mocha-DbkhwdAd-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>c(()=>import(`./dark-plus-Czj9cyI8-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>c(()=>import(`./dracula-pLOfOGe2-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>c(()=>import(`./dracula-soft-CcPsYoZy-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>c(()=>import(`./everforest-dark-BWPMa2al-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>c(()=>import(`./everforest-light-CpstfLiC-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>c(()=>import(`./github-dark-DSDQ9Z5x-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>c(()=>import(`./github-dark-default-Ba0C144H-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>c(()=>import(`./github-dark-dimmed-BjqxmwYE-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>c(()=>import(`./github-dark-high-contrast-2Gl6bihm-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>c(()=>import(`./github-light-Dqk4CmHj-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>c(()=>import(`./github-light-default-BfbpqKOb-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>c(()=>import(`./github-light-high-contrast-Cxng4wGz-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-hard-CnaC6FgW-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-medium-DZ4gSoW4-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>c(()=>import(`./gruvbox-dark-soft-C2g9RXr0-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-hard-BA8YgpQf-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-medium-DwpyGngr-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>c(()=>import(`./gruvbox-light-soft-NwbQPGmf-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>c(()=>import(`./horizon-XH-o5y3k-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>c(()=>import(`./horizon-bright-DS5w1sCx-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>c(()=>import(`./houston-CY83otqf-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>c(()=>import(`./kanagawa-dragon-DqNbNCdk-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>c(()=>import(`./kanagawa-lotus-B714rE-r-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>c(()=>import(`./kanagawa-wave-BpBHVF-m-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>c(()=>import(`./laserwave-BhcwZ0U8-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>c(()=>import(`./light-plus-C660oB0t-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>c(()=>import(`./material-theme-BCyY8Q5A-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>c(()=>import(`./material-theme-darker-b0q3yIYR-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>c(()=>import(`./material-theme-lighter-9CAlUddq-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>c(()=>import(`./material-theme-ocean-CGud8msl-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>c(()=>import(`./material-theme-palenight-CO5GI6OC-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>c(()=>import(`./min-dark-DeR7u5NC-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>c(()=>import(`./min-light-BXKBa8Zh-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>c(()=>import(`./monokai-B8gtewAU-BscAjiQZ.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>c(()=>import(`./night-owl-CSH9sESZ-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>c(()=>import(`./night-owl-light-D07sHQMN-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>c(()=>import(`./nord-COFoDEeB-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>c(()=>import(`./one-dark-pro-BWDUAAL--C6YyR8OD.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>c(()=>import(`./one-light-BU9t1Uvd-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>c(()=>import(`./plastic-C906q1W9-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>c(()=>import(`./poimandres-Dajy9qLx-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>c(()=>import(`./red-9mZYydjL-CYlAq2b0.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>c(()=>import(`./rose-pine-C9Si_UxR-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>c(()=>import(`./rose-pine-dawn-DfBO76oo-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>c(()=>import(`./rose-pine-moon-skDyLG87-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>c(()=>import(`./slack-dark-BFOZNtLZ-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>c(()=>import(`./slack-ochin-AgfAW_XU-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>c(()=>import(`./snazzy-light-Bfawczud-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>c(()=>import(`./solarized-dark-B_SSF9Fn-b97czJOk.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>c(()=>import(`./solarized-light-D3w6j0BH-DFPxpIYQ.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>c(()=>import(`./synthwave-84-DrmN3D2y-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>c(()=>import(`./tokyo-night-CznCTlOh-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>c(()=>import(`./vesper-Cc2bbb38-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>c(()=>import(`./vitesse-black-CFBaq1zJ-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>c(()=>import(`./vitesse-dark-DIapdvJS-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>c(()=>import(`./vitesse-light-DMAGa52j-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),mt=y({createOnigurumaEngine:()=>Bt,getDefaultWasmLoader:()=>zt,loadWasm:()=>Nt,setDefaultWasmLoader:()=>Rt}),ht=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function gt(){return 2147483648}function _t(){return typeof performance<`u`?performance.now():Date.now()}var vt=(e,t)=>e+(t-e%t)%t;async function yt(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=gt();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,vt(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:_t,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 bt=Object.defineProperty,xt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>xt(e,typeof t==`symbol`?t:t+``,n),N=null;function St(e){throw new ht(e.UTF8ToString(e.getLastOnigError()))}var Ct=class e{constructor(t){M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16Value`),M(this,`utf8Value`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},wt=class e{constructor(t){if(M(this,`id`,++e.LAST_ID),M(this,`_onigBinding`),M(this,`content`),M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`),M(this,`ptr`),!N)throw new ht(`Must invoke loadWasm first.`);this._onigBinding=N,this.content=t;let n=new Ct(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=N.omalloc(1e4),e._sharedPtrInUse=!0,N.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(N)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};M(wt,`LAST_ID`,0),M(wt,`_sharedPtr`,0),M(wt,`_sharedPtrInUse`,!1);var Tt=wt,Et=class{constructor(e){if(M(this,`_onigBinding`),M(this,`_ptr`),!N)throw new ht(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Ct(e[r]);t[r]=i.createString(N),n[r]=i.utf8Length}let r=N.omalloc(4*e.length);N.HEAPU32.set(t,r/4);let i=N.omalloc(4*e.length);N.HEAPU32.set(n,i/4);let a=N.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)N.ofree(t[n]);N.ofree(i),N.ofree(r),a===0&&St(N),this._onigBinding=N,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Tt(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 Dt(e){return typeof e.instantiator==`function`}function Ot(e){return typeof e.default==`function`}function kt(e){return e.data!==void 0}function At(e){return typeof Response<`u`&&e instanceof Response}function jt(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 Mt;function Nt(e){if(Mt)return Mt;async function t(){N=await yt(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Dt(n)?n=await n.instantiator(t):Ot(n)?n=await n.default(t):(kt(n)&&(n=n.data),At(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Ft(n)(t):await It(n)(t):jt(n)||n instanceof WebAssembly.Module?n=await Pt(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Pt(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Mt=t(),Mt}function Pt(e){return t=>WebAssembly.instantiate(e,t)}function Ft(e){return t=>WebAssembly.instantiateStreaming(e,t)}function It(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Lt;function Rt(e){Lt=e}function zt(){return Lt}async function Bt(e){return e&&await Nt(e),{createScanner(e){return new Et(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Tt(e)}}}var Vt=ot({});ct(Vt,mt);var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Ht(e){return Ut(e)}function Ut(e){return Array.isArray(e)?Wt(e):e instanceof RegExp?e:typeof e==`object`?Gt(e):e}function Wt(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ut(e[n]);return t}function Gt(e){let t={};for(let n in e)t[n]=Ut(e[n]);return t}function Kt(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function qt(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?qt(e.substring(0,e.length-1)):e.substr(~t+1)}var Jt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yt=class{static hasCaptures(e){return e!==null&&(Jt.lastIndex=0,Jt.test(e))}static replaceCaptures(e,t,n){return e.replace(Jt,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Xt(e,t){return e<t?-1:+(e>t)}function Zt(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Xt(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Qt(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function $t(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var en=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},tn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(sn(e),t)}static createFromParsedTheme(e,t){return ln(e,t)}_cachedMatchRoot=new en(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>rn(e.parent,t.parentScopes));return n?new on(n.fontStyle,n.foreground,n.background):null}},nn=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function rn(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!an(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function an(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var on=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function sn(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Qt(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Qt(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new cn(l,u,e,o,s,c)}}return n}var cn=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function ln(e,t){e.sort((e,t)=>{let n=Xt(e.scope,t.scope);return n!==0||(n=Zt(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new un(t),o=new on(n,a.getId(r),a.getId(i)),s=new pn(new fn(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new tn(a,o,s)}var un=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},dn=Object.freeze([]),fn=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||dn,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},pn=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),fn.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Zt(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new fn(e,t,n,r,i))}},mn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=gn(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function hn(e){return e}function gn(e){return e}function _n(e,t){let n=[],r=yn(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(vn(i)){let e=[];do e.push(i),i=r.next();while(vn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function vn(e){return!!e&&!!e.match(/[\w\.:]+/)}function yn(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function bn(e){typeof e.dispose==`function`&&e.dispose()}var xn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Sn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Cn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},wn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Cn;for(let n of e)Tn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof xn){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Tn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof xn?Dn({baseGrammar:a,selfGrammar:i},r):En(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new xn(e))}function En(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];On([r],t,n)}}function Dn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&On(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&On(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function On(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Kt({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&On(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Pn(i);switch(a.kind){case 0:Dn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Dn(t,n);break;case 2:En(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?En(a.ruleName,i,n):Dn(i,n)}else a.kind===4?n.add(new Sn(a.scopeName,a.ruleName)):n.add(new xn(a.scopeName))}}}var kn=class{kind=0},An=class{kind=1},jn=class{constructor(e){this.ruleName=e}kind=2},Mn=class{constructor(e){this.scopeName=e}kind=3},Nn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Pn(e){if(e===`$base`)return new kn;if(e===`$self`)return new An;let t=e.indexOf(`#`);return t===-1?new Mn(e):t===0?new jn(e.substring(1)):new Nn(e.substring(0,t),e.substring(t+1))}var Fn=/\\(\d+)/,In=/\\(\d+)/g,Ln=-1,Rn=-2;function zn(e){return e}function Bn(e){return e}var Vn=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Yt.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Yt.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${qt(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Yt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yt.replaceCaptures(this._contentName,e,t)}},Hn=class extends Vn{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Un=class extends Vn{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Jn(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Wn=class extends Vn{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Gn=class extends Vn{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Jn(i,this.id),this.beginCaptures=a,this._end=new Jn(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Kn=class extends Vn{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Jn(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Jn(o,Rn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Yn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},qn=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Hn(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Un(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Kt({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Wn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Kn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Gn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Pn(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Wn||e instanceof Gn||e instanceof Kn)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Jn=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Fn.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return In.lastIndex=0,this.source.replace(In,(e,t)=>$t(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Yn=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Xn(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Xn(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Xn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Zn=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Qn=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Zn(e,8),this._embeddedLanguagesMatcher=new $n(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Zn(0,0);_getBasicScopeAttributes=new en(e=>new Zn(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},$n=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>$t(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var er=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function tr(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=nr(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new er(i,!0);f()}return new er(i,!1);function f(){let o=rr(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Ln){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),cr(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Gn){let r=o;cr(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Kn){let r=o;cr(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(cr(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function nr(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Kn&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=sr(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Rn){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),cr(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function rr(e,t,n,r,i,a){let o=ir(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=ar(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function ir(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=or(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ar(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=or(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function or(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function sr(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function cr(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));tr(e,p,n&&d.start===0,d.start,f,i,!1,0),bn(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new lr(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var lr=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ur(e,t,n,r,i,a,o,s){return new mr(e,t,n,r,i,a,o,s)}function dr(e,t,n,r,i){let a=_n(t,fr),o=qn.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function fr(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(pr(t[r],e))return n=r+1,!0;return!1})}function pr(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var mr=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Qn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=hr(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=_n(e,fr);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)dr(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&dr(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(zn(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Bn(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=hr(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=qn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===_r.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=mn.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?gr.createRootAndLookUpScopeName(a,r,this):gr.createRoot(`unknown`,r),t=new _r(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
4
|
`;let a=this.createOnigString(e),o=a.content.length,s=new yr(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=tr(this,a,i,0,t,s,!0,r);return bn(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function hr(e,t){return e=Ht(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var gr=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=nn.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new nn(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new nn(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),mn.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},_r=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?gr.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Bn(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=gr.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,zn(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,gr.fromExtension(r,n.contentNameScopesList))}},vr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):_n(e,fr).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>_n(e,fr).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},yr=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=mn.set(n,0,hn(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=mn.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},br=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,ur(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},xr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new br(tn.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(tn.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new vr(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new wn(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Sr=_r.NULL;function Cr(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 wr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Tr(e){return Array.isArray(e)?e:[e]}async function Er(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Dr(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Or(e){return e===`ansi`||Dr(e)}function kr(e){return e===`none`}function Ar(e){return kr(e)}var jr=/(\r?\n)/g;function Mr(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(jr),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Nr={light:`#333333`,dark:`#bbbbbb`},Pr={light:`#fffffe`,dark:`#1e1e1e`},Fr=`__shiki_resolved`;function Ir(e){if(e?.[Fr])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`?Nr.light:Nr.dark,n||=t.type===`light`?Pr.light:Pr.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,Fr,{enumerable:!1,writable:!1,value:!0}),t}async function Lr(e){return[...new Set((await Promise.all(e.filter(e=>!Or(e)).map(async e=>await Er(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Rr(e){return(await Promise.all(e.map(async e=>Ar(e)?null:Ir(await Er(e))))).filter(e=>!!e)}function zr(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 P(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Br=class extends xr{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Ir(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=tn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=zr(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._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new P(`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))}},Vr=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).includes(e.scopeName)||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}},Hr=0;function Ur(e){Hr+=1,e.warnings!==!1&&Hr>=10&&Hr%10==0&&console.warn(`[Shiki] ${Hr} 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 P("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Ir),i=new Br(new Vr(e.engine,n),r,n,e.langAlias),a;function o(t){return zr(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new P(`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 P(`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 Lr(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Rr(e))}function g(){if(t)throw new P(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Hr)}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 Wr(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Rr(e.themes||[]),Lr(e.langs||[]),e.engine]);return Ur({...e,themes:t,langs:n,engine:r})}var Gr=new WeakMap;function Kr(e,t){Gr.set(e,t)}function qr(e){return Gr.get(e)}var Jr=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(Tr(n).map(e=>[e,Sr])),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 Yr(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Yr(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 Xr(e,t){if(!(e instanceof Jr))throw new P(`Invalid grammar state`);return e.getInternalStack(t)}var Zr=/,/,Qr=/ /;function $r(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Dr(e.resolveLangAlias(n.lang||`text`))||kr(r))return Mr(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ti(t,o,i,a,n)}function ei(...e){if(e.length===2)return qr(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Dr(i)||kr(a))throw new P(`Plain language does not have grammar state`);if(i===`ansi`)throw new P(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Jr(ni(n,c,o,s,r).stateStack,c.name,o.name)}function ti(e,t,n,r,i){let a=ni(e,t,n,r,i),o=new Jr(a.stateStack,t.name,n.name);return Kr(a.tokens,o),a.tokens}function ni(e,t,n,r,i){let a=Cr(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Mr(e),u=i.grammarState?Xr(i.grammarState,n.name)??Sr:i.grammarContextCode==null?Sr:ni(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=wr(r[mn.getForeground(s)],a),u=mn.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=mn.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Zr).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Qr))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?ri(t.scopes):ii(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function ri(e){return e.map(e=>({scopeName:e}))}function ii(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:si(e,i,t.slice(0,r))}}return n}function ai(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function oi(e,t,n){if(!ai(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ai(e[r],n[i])&&--r,--i;return r===-1}function si(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(oi(e,t,n)){r.push(a);break}return r}function ci(e,t,n,r=$r){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:qr(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=li(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Jr(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Kr(s,c),s}function li(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var ui=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],di=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};di.prototype.normal={},di.prototype.property={},di.prototype.space=void 0;function fi(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new di(n,r,t)}function pi(e){return e.toLowerCase()}var I=class{constructor(e,t){this.attribute=t,this.property=e}};I.prototype.attribute=``,I.prototype.booleanish=!1,I.prototype.boolean=!1,I.prototype.commaOrSpaceSeparated=!1,I.prototype.commaSeparated=!1,I.prototype.defined=!1,I.prototype.mustUseProperty=!1,I.prototype.number=!1,I.prototype.overloadedBoolean=!1,I.prototype.property=``,I.prototype.spaceSeparated=!1,I.prototype.space=void 0;var mi=y({boolean:()=>L,booleanish:()=>R,commaOrSpaceSeparated:()=>vi,commaSeparated:()=>_i,number:()=>z,overloadedBoolean:()=>gi,spaceSeparated:()=>B}),hi=0,L=yi(),R=yi(),gi=yi(),z=yi(),B=yi(),_i=yi(),vi=yi();function yi(){return 2**++hi}var bi=Object.keys(mi),xi=class extends I{constructor(e,t,n,r){let i=-1;if(super(e,t),Si(this,`space`,r),typeof n==`number`)for(;++i<bi.length;){let e=bi[i];Si(this,bi[i],(n&mi[e])===mi[e])}}};xi.prototype.defined=!0;function Si(e,t,n){n&&(e[t]=n)}function Ci(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new xi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pi(r)]=r,n[pi(a.attribute)]=r}return new di(t,n,e.space)}var wi=Ci({properties:{ariaActiveDescendant:null,ariaAtomic:R,ariaAutoComplete:null,ariaBusy:R,ariaChecked:R,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:B,ariaCurrent:null,ariaDescribedBy:B,ariaDetails:null,ariaDisabled:R,ariaDropEffect:B,ariaErrorMessage:null,ariaExpanded:R,ariaFlowTo:B,ariaGrabbed:R,ariaHasPopup:null,ariaHidden:R,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:B,ariaLevel:z,ariaLive:null,ariaModal:R,ariaMultiLine:R,ariaMultiSelectable:R,ariaOrientation:null,ariaOwns:B,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:R,ariaReadOnly:R,ariaRelevant:null,ariaRequired:R,ariaRoleDescription:B,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:R,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ti(e,t){return t in e?e[t]:t}function Ei(e,t){return Ti(e,t.toLowerCase())}var Di=Ci({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:_i,acceptCharset:B,accessKey:B,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alpha:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:B,autoFocus:L,autoPlay:L,blocking:B,capture:null,charSet:null,checked:L,cite:null,className:B,closedBy:null,colorSpace:null,cols:z,colSpan:z,command:null,commandFor:null,content:null,contentEditable:R,controls:L,controlsList:B,coords:z|_i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:gi,draggable:R,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:B,height:z,hidden:gi,high:z,href:null,hrefLang:null,htmlFor:B,httpEquiv:B,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:B,itemRef:B,itemScope:L,itemType:B,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:L,optimum:z,pattern:null,ping:B,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:B,required:L,reversed:L,rows:z,rowSpan:z,sandbox:B,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootCustomElementRegistry:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shadowRootSerializable:L,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:R,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:R,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:B,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:R,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:L,disablePictureInPicture:L,disableRemotePlayback:L,exportParts:_i,part:B,prefix:null,property:null,results:z,security:null,unselectable:null},space:`html`,transform:Ei}),Oi=Ci({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:vi,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:B,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_i,g2:_i,glyphName:_i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:vi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:B,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vi,rev:vi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vi,requiredFeatures:vi,requiredFonts:vi,requiredFormats:vi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:vi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vi,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ti}),ki=Ci({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ai=Ci({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ei}),ji=Ci({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Mi=/[A-Z]/g,Ni=/-[a-z]/g,Pi=/^data[-\w.:]+$/i;function Fi(e,t){let n=pi(t),r=t,i=I;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Pi.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ni,Li);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ni.test(e)){let n=e.replace(Mi,Ii);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=xi}return new i(r,t)}function Ii(e){return`-`+e.toLowerCase()}function Li(e){return e.charAt(1).toUpperCase()}var Ri=fi([wi,Di,ki,Ai,ji],`html`),zi=fi([wi,Oi,ki,Ai,ji],`svg`),Bi={}.hasOwnProperty;function Vi(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Bi.call(t,e)){let n=String(t[e]);i=Bi.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Hi=/["&'<>`]/g,Ui=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gi=/[|\\{}()[\]^$+*?.]/g,Ki=new WeakMap;function qi(e,t){return e=e.replace(t.subset?Ji(t.subset):Hi,r),t.subset||t.escapeOnly?e:e.replace(Ui,n).replace(Wi,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Ji(e){let t=Ki.get(e);return t||(t=Yi(e),Ki.set(e,t)),t}function Yi(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Gi,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Xi=/[\dA-Fa-f]/;function Zi(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Xi.test(String.fromCharCode(t))?r:r+`;`}var Qi=/\d/;function $i(e,t,n){let r=`&#`+String(e);return n&&t&&!Qi.test(String.fromCharCode(t))?r:r+`;`}var ea=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),ta={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},na=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],ra={}.hasOwnProperty,ia={},aa;for(aa in ta)ra.call(ta,aa)&&(ia[ta[aa]]=aa);var oa=/[^\dA-Za-z]/;function sa(e,t,n,r){let i=String.fromCharCode(e);if(ra.call(ia,i)){let e=ia[i],a=`&`+e;return n&&ea.includes(e)&&!na.includes(e)&&(!r||t&&t!==61&&oa.test(String.fromCharCode(t)))?a:a+`;`}return``}function ca(e,t,n){let r=Zi(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=sa(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=$i(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function la(e,t){return qi(e,Object.assign({format:ca},t))}var ua=/^>|^->|<!--|-->|--!>|<!-$/g,da=[`>`],fa=[`<`,`>`];function pa(e,t,n,r){return r.settings.bogusComments?`<?`+la(e.value,Object.assign({},r.settings.characterReferences,{subset:da}))+`>`:`<!--`+e.value.replace(ua,i)+`-->`;function i(e){return la(e,Object.assign({},r.settings.characterReferences,{subset:fa}))}}function ma(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function ha(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ga(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function _a(e){return e.join(` `).trim()}var va=/[ \t\n\f\r]/g;function ya(e){return typeof e==`object`?e.type===`text`&&ba(e.value):ba(e)}function ba(e){return e.replace(va,``)===``}var V=Ca(1),xa=Ca(-1),Sa=[];function Ca(e){return t;function t(t,n,r){let i=t?t.children:Sa,a=(n||0)+e,o=i[a];if(!r)for(;o&&ya(o);)a+=e,o=i[a];return o}}var wa={}.hasOwnProperty;function Ta(e){return t;function t(t,n,r){return wa.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Ea=Ta({body:ka,caption:Da,colgroup:Da,dd:Na,dt:Ma,head:Da,html:Oa,li:ja,optgroup:Fa,option:Ia,p:Aa,rp:Pa,rt:Pa,tbody:Ra,td:Va,tfoot:za,th:Va,thead:La,tr:Ba});function Da(e,t,n){let r=V(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&ya(r.value.charAt(0)))}function Oa(e,t,n){let r=V(n,t);return!r||r.type!==`comment`}function ka(e,t,n){let r=V(n,t);return!r||r.type!==`comment`}function Aa(e,t,n){let r=V(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function ja(e,t,n){let r=V(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ma(e,t,n){let r=V(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Na(e,t,n){let r=V(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Pa(e,t,n){let r=V(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Fa(e,t,n){let r=V(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Ia(e,t,n){let r=V(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function La(e,t,n){let r=V(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Ra(e,t,n){let r=V(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function za(e,t,n){return!V(n,t)}function Ba(e,t,n){let r=V(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Va(e,t,n){let r=V(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Ha=Ta({body:Ga,colgroup:Ka,head:Wa,html:Ua,tbody:qa});function Ua(e){let t=V(e,-1);return!t||t.type!==`comment`}function Wa(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Ga(e){let t=V(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&ya(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Ka(e,t,n){let r=xa(n,t),i=V(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Ea(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function qa(e,t,n){let r=xa(n,t),i=V(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Ea(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ja={name:[[`
|
|
5
5
|
\f\r &/=>`.split(``),`
|
|
@@ -302,4 +302,4 @@ XID_Start XIDS`.split(/\s/).map(e=>[Zc(e),e])),Ul=new Map([[`s`,U(383)],[U(383),
|
|
|
302
302
|
`:t)}function l_(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var u_=`/dev/null`;function d_(e,t,n,r=!1){if(e===null&&t===null)throw Error(`parseDiffFromFile: You must pass oldFile, newFile, or both`);let i=e??f_(),a=t??f_(),o=Jg(Op(i.name,a.name,i.contents,a.contents,i.header,a.header,n),{cacheKey:(()=>{let n=e?.cacheKey,r=t?.cacheKey;return n!=null&&r!=null?vg(`diff`,n,r):void 0})(),oldFile:i,newFile:a,throwOnError:r});if(o==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);e===null?(o.type=`new`,o.prevName=void 0):t===null&&(o.type=`deleted`,o.prevName=void 0);let s=t?.lang??(t===null?e?.lang:void 0);return s!=null&&(o.lang=s),o}function f_(){return{name:u_,contents:``}}var p_=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function m_(e,t){let n=d_({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t);return{hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,additionLines:n.additionLines,deletionLines:n.deletionLines,type:n.type}}function h_(e,t){let n=Math.max(e,1),r=Array.from({length:n},(e,t)=>`${` `.repeat(t+1)}\n`).join(``);return r===t&&(r=Array.from({length:n},(e,t)=>`\u0000${` `.repeat(t)}\n`).join(``)),r}function g_(e){for(let t of e)if(t.trim().length>0)return!1;return!0}function __(e,t){return t.length>0&&t.length<e.deletionLines.length&&g_(t)}function v_(e,t,n){let r=e.deletionLines.join(``),i=h_(t.length,r),a=d_({name:e.prevName??e.name,contents:r},{name:e.name,contents:i,lang:e.lang},n);return{hunks:a.hunks,splitLineCount:a.splitLineCount,unifiedLineCount:a.unifiedLineCount,additionLines:t,deletionLines:a.deletionLines,type:a.type}}function y_(e,t){return v_(e,[``],t)}function b_(e,t){if(e.additionLines.length===0)return y_(e,t);if(__(e,e.additionLines))return v_(e,e.additionLines,t);let n=e.additionLines,r=m_(e,t);return S_(r,n),r}function x_(e){return e.length>1&&e.at(-1)===``}function S_(e,t){if(!x_(t))return;let n=t.length-e.additionLines.length;if(n<=0)return;let r=e.additionLines.length,i=e.hunks.at(-1);if(i!=null&&j(i.additionStart,i.additionCount)===r){for(let a of i.hunkContent)if(a.type===`change`&&a.additions<a.deletions&&a.additionLineIndex+a.additions===r){e.additionLines=t,a.additions+=n,i.additionCount+=n,i.additionLines+=n,M_(e);return}}}function C_(e,t,n){if(e.isPartial||e.deletionLines.length!==e.additionLines.length)return w_(e,m_(e,n));let r=Array.from(t);if(r.length===0)return w_(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type});for(let t of r){let r=e.additionLines[t],i=e.deletionLines[t];if(r==null||i==null||Zf(r)===Zf(i))return w_(e,m_(e,n))}let i=T_(e,r);if(i.size===0)return w_(e,m_(e,n));for(let t of i)if(!D_(e,t,n))return w_(e,m_(e,n));return M_(e),Nf(e)?w_(e,m_(e,n)):w_(e,{hunks:e.hunks,splitLineCount:e.splitLineCount,unifiedLineCount:e.unifiedLineCount,type:e.type})}function w_(e,t){return Object.assign(e,t),t}function T_(e,t){let n=new Set;for(let r of t){let t=E_(e,r);if(t==null)return new Set;n.add(t)}return n}function E_(e,t){for(let[n,r]of e.hunks.entries()){let e=r.additionLineIndex+r.additionCount;if(t>=r.additionLineIndex&&t<e)return n}}function D_(e,t,n){let r=e.hunks[t];if(r==null)return!1;let i=e.deletionLines.slice(r.deletionLineIndex,r.deletionLineIndex+r.deletionCount),a=e.additionLines.slice(r.additionLineIndex,r.additionLineIndex+r.additionCount),o=d_({name:e.prevName??e.name,contents:i.join(``)},{name:e.name,contents:a.join(``),lang:e.lang},{...n,context:0}),s=o.hunks[0];return s==null||o.hunks.length!==1?!1:(k_(r,s),O_(e,t),!0)}function O_(e,t){let n=e.hunks[t];if(n==null)return;if(t!==e.hunks.length-1){n.noEOFCRAdditions=!1,n.noEOFCRDeletions=!1;return}let r=e.additionLines.at(-1),i=e.deletionLines.at(-1);n.noEOFCRAdditions=r!=null&&r!==``&&!r.endsWith(`
|
|
303
303
|
`),n.noEOFCRDeletions=i!=null&&i!==``&&!i.endsWith(`
|
|
304
304
|
`)}function k_(e,t){let n=e.additionLineIndex,r=e.deletionLineIndex;e.hunkContent=t.hunkContent.map(e=>A_(e,n,r)),e.additionLineIndex=n+t.additionLineIndex,e.additionStart+=t.additionLineIndex,e.additionCount=t.additionCount,e.additionLines=t.additionLines,t.deletionLineIndex>=0&&(e.deletionLineIndex=r+t.deletionLineIndex,e.deletionStart+=t.deletionLineIndex),e.deletionCount=t.deletionCount,e.deletionLines=t.deletionLines,e.noEOFCRAdditions=t.noEOFCRAdditions,e.noEOFCRDeletions=t.noEOFCRDeletions,j_(e)}function A_(e,t,n){return{...e,additionLineIndex:e.additionLineIndex+t,deletionLineIndex:e.deletionLineIndex+n}}function j_(e){let t=0,n=0;for(let r of e.hunkContent)r.type===`context`?(t+=r.lines,n+=r.lines):(t+=Math.max(r.additions,r.deletions),n+=r.additions+r.deletions);e.splitLineCount=t,e.unifiedLineCount=n}function M_(e){let t=0,n=0,r=0;for(let i of e.hunks)i.collapsedBefore=Math.max(ke(i.additionStart,i.additionCount)-r,0),i.splitLineStart=t+i.collapsedBefore,i.unifiedLineStart=n+i.collapsedBefore,j_(i),t+=i.collapsedBefore+i.splitLineCount,n+=i.collapsedBefore+i.unifiedLineCount,r=j(i.additionStart,i.additionCount);if(e.hunks.length>0){let r=e.hunks[e.hunks.length-1],i=Math.max(e.additionLines.length-j(r.additionStart,r.additionCount),0);t+=i,n+=i}e.splitLineCount=t,e.unifiedLineCount=n}var N_=new WeakMap;function P_(e){return e.length>1&&e[e.length-1]===``?e.slice(0,-1):e}function F_(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r++;let i=e.length,a=t.length;for(;i>r&&a>r&&e[i-1]===t[a-1];)i--,a--;if(r!==i||r!==a)return{start:r,deletionEnd:i,additionEnd:a}}function I_(e,t,n){let r=e.hunks,i=e.additionLines,a=P_(i),o=a===i?e:{...e,additionLines:a},s=q_(r,G_(o,t,n),e.deletionLines.length),c=X_(o,s);if(e.additionLines=a,e.hunks=c,e.editSessionDirty=!0,ov(e),S_(e,i),$_(r,e.hunks))return{regions:s.map(e=>e.previousSpan)}}function L_(e,t,n,r){let i=new Set(t),a=Array.from(i).filter(t=>t>=0&&t<e.additionLines.length).sort((e,t)=>e-t);if(a.length===0)return;let o=t=>i.has(t)?r?.get(t):e.additionLines[t],{hunks:s}=e,c,l=0;for(let t of a){for(;l<s.length;){let e=s[l];if(t<nv(e)+e.additionCount)break;l++}let r=s[l],i=r==null?void 0:nv(r);if(i==null||t<i||c!=null&&c!==l)return I_(e,n,o);c=l}if(c!=null){if(R_(e,a,c,r,n)){e.editSessionDirty=!0;return}return I_(e,n,o)}}function R_(e,t,n,r,i){if(r==null||i?.ignoreWhitespace===!0||i?.stripTrailingCr===!0)return!1;let a=z_(e),o=e.hunks[n];if(o.hunkContent.some(B_))return!1;for(let n of t){let t=r.get(n),i=e.additionLines[n];if(t==null||i==null||a.has(t)||a.has(i))return!1;let s=!1;for(let e of o.hunkContent)if(e.type===`change`&&e.additions===e.deletions&&n>=e.additionLineIndex&&n<e.additionLineIndex+e.additions){s=!0;break}if(!s)return!1}return!0}function z_(e){let t=N_.get(e);if(t?.lines===e.deletionLines)return t.set;let n=new Set(e.deletionLines);return N_.set(e,{lines:e.deletionLines,set:n}),n}function B_(e){return e?.type===`change`&&(e.additions===0||e.deletions===0)}function V_(e,t){let n=new Map,{regions:r}=t;for(let t=0;t<=r.length;t++){let i=r[t-1],a=r[t],o=t===0?e.get(0):i==null?void 0:e.get(i.lastIndex+1),s=a==null?void 0:e.get(a.firstIndex),c=o?.fromStart??0,l=s?.fromEnd??0;(c>0||l>0)&&n.set(t,{fromStart:c,fromEnd:l})}return n}function H_(e,t,n){let r=[];if(e.isPartial)return r;for(let[i,a]of e.hunks.entries()){let o=Mf({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:t,hunkIndex:i,collapsedContextThreshold:n});if(o.rangeSize<=n)continue;let s=rv(a),c=s-o.rangeSize;o.fromStart>0&&r.push([c,c+o.fromStart]),o.fromEnd>0&&r.push([s-o.fromEnd,s])}let i=Ff({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`captureExpansionAnchors`});if(i!=null&&i.fromStart>0&&i.rangeSize>n){let t=e.hunks[e.hunks.length-1],n=rv(t)+t.deletionCount;r.push([n,n+i.fromStart])}return r}function U_(e,t){let n=new Map;if(t.length===0)return n;let r=(e,r,i)=>{if(i<=r)return;let a=0,o=0;for(let[e,n]of t)n<=r||e>=i||(e<=r&&(a=Math.max(a,Math.min(n,i)-r)),n>=i&&(o=Math.max(o,i-Math.max(e,r))));(a>0||o>0)&&n.set(e,{fromStart:a,fromEnd:o})};for(let[t,n]of e.hunks.entries()){let e=rv(n);r(t,e-Math.max(n.collapsedBefore,0),e)}let i=e.hunks[e.hunks.length-1];return i!=null&&!e.isPartial&&e.deletionLines.length>0&&r(e.hunks.length,rv(i)+i.deletionCount,e.deletionLines.length),n}function W_(e,t){return e.editSessionDirty===!0&&(delete e.editSessionDirty,Object.assign(e,e.additionLines.length<=1&&e.additionLines.join(``)===``?m_(e,t):b_(e,t)),!0)}function G_(e,t,n){if(F_(e.deletionLines,e.additionLines)==null)return[];let r=d_({name:e.prevName??e.name,contents:e.deletionLines.join(``)},{name:e.name,contents:e.additionLines.join(``),lang:e.lang},t),i,a=(t,a)=>{i??=K_(e.hunks);for(let e=0;e<=a;e++){let o=i.get(t.deletionLineIndex-e);if(o!=null&&o.additions===t.additions&&o.deletions===t.deletions){if(t.additions>0&&n!=null){for(let e=0;e<t.additions;e++)if(n(o.additionLineIndex+e)!==r.additionLines[t.additionLineIndex+e])return a}return e}}return a},o=[],s=0,c=0;for(let e of r.hunks){Hg(e,r,a);let t=e.additionCount>0?e.additionLineIndex-s:e.deletionLineIndex-c;s+=t,c+=t;for(let t of e.hunkContent){if(t.type===`context`){s+=t.lines,c+=t.lines;continue}let e=A_(t,0,0);e.additions===0&&(e.additionLineIndex=s),e.deletions===0&&(e.deletionLineIndex=c),o.push(e),s+=e.additions,c+=e.deletions}}return o}function K_(e){let t=new Map;for(let n of e)for(let e of n.hunkContent)e.type===`change`&&(e.additions===0||e.deletions===0)&&t.set(e.deletionLineIndex,e);return t}function q_(e,t,n){let r=e.map((e,t)=>{let n=rv(e);return{deletionStart:n,deletionEnd:n+e.deletionCount,blocks:[],previousSpan:{firstIndex:t,lastIndex:t}}}),i=[],a=0;for(let e of t){let t=e.deletionLineIndex,o=t+e.deletions;for(;a<r.length&&r[a].deletionEnd<t;)i.push(r[a]),a++;let s=i.length>0&&J_(t,o,i[i.length-1])?i.pop():void 0;for(;a<r.length&&r[a].deletionStart<=o;)s=Y_(s,r[a]),a++;if(s==null){let c=t,l=o;if((e.deletions===0||e.additions===0)&&n>e.deletions){let e=i[i.length-1]?.deletionEnd??0,s=r[a]?.deletionStart??n;t>e?c--:o<s&&l++}s={deletionStart:c,deletionEnd:l,blocks:[],previousSpan:void 0}}s.deletionStart=Math.min(s.deletionStart,t),s.deletionEnd=Math.max(s.deletionEnd,o),s.blocks.push(e),i.push(s)}for(;a<r.length;)i.push(r[a]),a++;return i}function J_(e,t,n){return e<=n.deletionEnd&&t>=n.deletionStart}function Y_(e,t){return e==null?t:(e.deletionStart=Math.min(e.deletionStart,t.deletionStart),e.deletionEnd=Math.max(e.deletionEnd,t.deletionEnd),e.blocks.push(...t.blocks),t.previousSpan!=null&&(e.previousSpan??={...t.previousSpan},e.previousSpan.firstIndex=Math.min(e.previousSpan.firstIndex,t.previousSpan.firstIndex),e.previousSpan.lastIndex=Math.max(e.previousSpan.lastIndex,t.previousSpan.lastIndex)),e)}function X_(e,t){let n=[],r=0,i=0;for(let a of t){let t=a.deletionStart-r;if(t<0)throw Error(`buildRegionHunks: overlapping old-side regions`);r+=t,i+=t;let o=i,s=[];for(let e of a.blocks){let t=e.deletionLineIndex-r,n=e.additionLineIndex-i;if(t<0||t!==n)throw Error(`buildRegionHunks: canonical block context mismatch`);Q_(s,t,i,r),r+=t,i+=n,s.push({...e}),r+=e.deletions,i+=e.additions}let c=a.deletionEnd-r;if(c<0)throw Error(`buildRegionHunks: block exceeds its old-side region`);Q_(s,c,i,r),r+=c,i+=c,n.push(Z_(e,{additionStart:o,additionEnd:i,deletionStart:a.deletionStart,deletionEnd:a.deletionEnd},s))}if(e.deletionLines.length-r!==e.additionLines.length-i)throw Error(`buildRegionHunks: trailing context mismatch`);return n}function Z_(e,t,n){let r=t.additionEnd-t.additionStart,i=t.deletionEnd-t.deletionStart,a=0,o=0;for(let e of n)e.type===`change`&&(a+=e.additions,o+=e.deletions);let s={collapsedBefore:0,additionStart:iv(t.additionStart,r),additionCount:r,additionLines:a,additionLineIndex:av(t.additionStart,r),deletionStart:iv(t.deletionStart,i),deletionCount:i,deletionLines:o,deletionLineIndex:av(t.deletionStart,i),hunkContent:n,hunkSpecs:`@@ -${iv(t.deletionStart,i)},${i} +${iv(t.additionStart,r)},${r} @@`,splitLineStart:0,splitLineCount:0,unifiedLineStart:0,unifiedLineCount:0,noEOFCRAdditions:!1,noEOFCRDeletions:!1};return j_(s),s}function Q_(e,t,n,r){t>0&&e.push({type:`context`,lines:t,additionLineIndex:n,deletionLineIndex:r})}function $_(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(rv(r)!==rv(i)||r.deletionCount!==i.deletionCount||nv(r)!==nv(i)||r.additionCount!==i.additionCount||r.splitLineCount!==i.splitLineCount||!ev(r,i))return!0}return!1}function ev(e,t){let n=tv(e),r=tv(t);for(;;){let e=n.next(),t=r.next();if(e.done===!0||t.done===!0)return e.done===t.done;if(e.value[0]!==t.value[0]||e.value[1]!==t.value[1])return!1}}function*tv(e){for(let t of e.hunkContent){if(t.type===`context`){for(let e=0;e<t.lines;e++)yield[t.deletionLineIndex+e,t.additionLineIndex+e];continue}let e=Math.max(t.deletions,t.additions);for(let n=0;n<e;n++)yield[n<t.deletions?t.deletionLineIndex+n:void 0,n<t.additions?t.additionLineIndex+n:void 0]}}function nv(e){return ke(e.additionStart,e.additionCount)}function rv(e){return ke(e.deletionStart,e.deletionCount)}function iv(e,t){return t===0?e:e+1}function av(e,t){return t===0?e-1:e}function ov(e){M_(e);for(let t=0;t<e.hunks.length;t++)O_(e,t)}function sv(e){return q({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function cv(e){return q({tagName:`div`,children:[q({tagName:`span`,children:[Bd(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function lv(e){return q({tagName:`div`,children:[Vd({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function uv({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(q({tagName:`div`,children:[Bd(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(lv(`up`)),s++),o||(e.push(lv(`down`)),s++)):(e.push(lv(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(q({tagName:`div`,children:[q({tagName:`span`,children:[Bd(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(q({tagName:`div`,children:[Bd(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(q({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(q({tagName:`slot`,properties:{name:i}})),q({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function dv(e,t){return`hunk-separator-${e}-${t}`}function fv(e){let t=e.at(-1);return t==null?0:Math.max(j(t.additionStart,t.additionCount),j(t.deletionStart,t.deletionCount))}var pv=-1,mv=class{options;annotationSlotName;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++pv}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLangs=[`text`];renderCache;pendingHighlightResult;pendingStructuralRows;editSessionActive=!1;constructor(e={theme:A},t=De,n,r){this.options=e,this.annotationSlotName=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=qu(e.theme??A)?xd():void 0)}cleanUp(){this.endEditSession(),this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.editSessionActive?(this.renderCache!=null&&(this.renderCache.renderRange=void 0),this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0):this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}beginEditSession(e,t){let{editSessionActive:n}=this;this.editSessionActive=!0,n||(this.pendingHighlightResult=void 0),this.diff=e,n&&this.renderCache!=null&&this.renderCache.diff!==e&&this.clearRenderCache();let{renderCache:r}=this;if(!e.isPartial&&e.additionLines.length===0){Object.assign(e,y_(e,this.options.parseDiffOptions)),this.markEditSessionPass(e),this.clearRenderCache();return}if(r==null||n&&r.diff===e)return;let{options:i}=this.getRenderOptions(e),a=r.diff===e,o=t!=null&&Y(r.diff,t),{result:s}=r;if(!r.highlighted||s==null||!X(r.options,i)||!a&&!o){this.clearRenderCache();return}a||(this.renderCache={diff:e,options:i,highlighted:!0,result:{...s,code:{...s.code,additionLines:[...s.code.additionLines]}},renderRange:r.renderRange})}endEditSession(){this.editSessionActive=!1,this.pendingHighlightResult=void 0,this.diff??this.clearRenderCache()}editorRenderReady(){return this.renderCache?.options.useTokenTransformer===!0&&this.renderCache.highlighted&&this.renderCache.result!=null}refreshHighlightedResult(){let{diff:e,renderCache:t,workerManager:n}=this;return e==null||t==null||!Y(t.diff,e)||Tf(e)||Dv(e,this.getTokenizeMaxLength())?Promise.resolve():!this.editSessionActive&&n?.isWorkingPool()===!0&&e.cacheKey!=null?(n.evictDiffFromCache(e.cacheKey),n.primeDiffHighlightCache(e).then(()=>{this.applyRefreshedResult(e,n.getDiffResultCache(e))}).catch(e=>this.onHighlightError(e))):this.asyncHighlight(e).then(t=>this.applyRefreshedResult(e,t)).catch(e=>this.onHighlightError(e))}applyRefreshedResult(e,t){let{diff:n,renderCache:r}=this;if(t==null||n==null||r==null||!Y(n,e)||!Y(r.diff,e)||this.editSessionActive)return;let{options:i}=this.getRenderOptions(n);X(i,t.options)&&(this.pendingHighlightResult={diff:n,options:t.options,highlighted:!0,result:t.result},this.onRenderUpdate?.())}get diffCache(){return this.renderCache?.diff??this.diff}clearRenderCache(){this.renderCache=void 0,this.pendingHighlightResult=void 0,this.pendingStructuralRows=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??we}getExpandedHunksMap(){return this.expandedHunks}setExpandedHunksMap(e){this.expandedHunks=e}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}updateRenderCache(e,t,n=!1){this.pendingStructuralRows=void 0;let{renderCache:r}=this;if(r==null)return!1;let{result:i,diff:a}=r;if(i==null)return!1;if(a.isPartial)throw Error(`Could not update render cache for partial diff`);let o=i.code.additionLines,s=this.pendingStructuralRows=n?new Map:void 0,c=[],l=new Map;for(let[t,n]of e){let e=o[t]?.properties??{},r=n.map(e=>e[2]).join(``),i=t<a.additionLines.length,u=i?a.additionLines[t]??``:``,d=Zf(u);s==null&&i&&(a.additionLines[t]=eh(u,r),d!==r&&(c.push(t),l.set(t,u)));let f={type:`element`,tagName:`div`,properties:{"data-line":e[`data-line`]??t+1,"data-line-index":e[`data-line-index`]??t,"data-line-type":e[`data-line-type`]??`context`},children:n.map(([e,t,n])=>e===0&&t===``?n===``?{type:`element`,tagName:`br`,properties:{},children:[]}:{type:`text`,value:n}:{type:`element`,tagName:`span`,properties:{"data-char":e,style:`color:${t};`},children:[{type:`text`,value:n}]})};s==null?o[t]=f:s.set(t,f)}let u=!1;if(c.length>0){if(this.editSessionActive){if(a.additionLines.length<=1&&a.additionLines.join(``)===``)this.applyRecomputePreservingSessionType(a,y_(a,this.options.parseDiffOptions)),u=!0;else if(__(a,a.additionLines))this.applyRecomputePreservingSessionType(a,v_(a,a.additionLines,this.options.parseDiffOptions)),u=!0;else{let e=L_(a,c,this.options.parseDiffOptions,l);this.applyExpansionRemap(e),u=e!=null}}else Object.assign(a,C_(a,c,this.options.parseDiffOptions))}return i.baseThemeType=t,r.isDirty=!0,u}applyExpansionRemap(e){e!=null&&(this.expandedHunks=V_(this.expandedHunks,e))}applyDocumentChange(e){let{pendingStructuralRows:t,renderCache:n}=this;this.pendingStructuralRows=void 0;let r=this.diff??n?.diff;if(r==null)return;let i=n?.result;if(r.isPartial)throw Error(`Could not apply document change for partial diff`);let{additionLines:a}=r;if(r.additionLines=Tv(e),i!=null&&(i.code.additionLines=Cv(a,r.additionLines,i.code.additionLines,e)),r.additionLines.length<=1&&r.additionLines.join(``)===``?(this.applyRecomputePreservingSessionType(r,y_(r,this.options.parseDiffOptions)),i!=null&&(i.code.additionLines[0]=wv(0,e.getLineText(0)))):this.editSessionActive?this.applySessionDocumentChange(r,a):Object.assign(r,b_(r,this.options.parseDiffOptions)),t!=null&&i!=null)for(let[e,n]of t)e<i.code.additionLines.length&&(i.code.additionLines[e]=n);n!=null&&(n.isDirty=!0)}applySessionDocumentChange(e,t){let{parseDiffOptions:n}=this.options,r=e.additionLines;if(__(e,r)){this.applyRecomputePreservingSessionType(e,v_(e,r,n));return}this.applyExpansionRemap(I_(e,n,e=>t[e]))}applyRecomputePreservingSessionType(e,t){let n=this.editSessionActive?e.type:void 0;Object.assign(e,t),n!=null&&(e.type=n),this.markEditSessionPass(e)}markEditSessionPass(e){this.editSessionActive&&(e.editSessionDirty=!0)}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e,contentProperties:{"data-line-type":e}}}getSplitLineDecoration({side:e,type:t}){let n=t===`change`?e===`deletions`?`change-deletion`:`change-addition`:t;return{gutterLineType:n,contentProperties:{"data-line-type":n}}}createAnnotationElement=e=>th(e);getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=A,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=ye,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await yd(lh(this.computedLangs,{theme:this.getLocalHighlightTheme(),preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter})),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=Dv(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!X(t,r.options)&&(r=void 0),this.renderCache??={diff:e,hydrated:!0,highlighted:!n&&!Tf(e),options:t,result:n?void 0:r?.result,renderRange:void 0},!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLangs=Ev(e),this.initializeHighlighter())}getLocalHighlightTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??A}getEffectiveCodeOptions(){let e=this.workerManager?.isWorkingPool()===!0?this.workerManager.getDiffRenderOptions():void 0;return{theme:this.getLocalHighlightTheme(),tokenizeMaxLineLength:e?.tokenizeMaxLineLength??this.options.tokenizeMaxLineLength}}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0){let e=this.workerManager.getDiffRenderOptions();return this.editSessionActive&&e.useTokenTransformer!==!0?{...e,useTokenTransformer:!0}:e}let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:this.editSessionActive||this.options.useTokenTransformer===!0,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!Y(e,n.diff)||!X(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getDiffForNextRender(e){let{options:t}=this.getRenderOptions(e);if(this.getReadyRenderResult(e,t)!=null||this.renderCache==null)return e;if(Y(this.renderCache.diff,e))return this.renderCache.diff;let n=!(e.additionLines.length>0||e.deletionLines.length>0)||Tf(e)||Dv(e,this.getTokenizeMaxLength());return this.canRenderDiff(e,t,n)?e:this.renderCache.diff}canRenderDiff(e,t,n){let{renderCache:r}=this;return r==null||Y(r.diff,e)?!0:n?r.result==null&&r.hydrated!==!0||this.workerManager?.isWorkingPool()===!0||this.highlighter!=null&&qu(t.theme):r.result==null&&r.hydrated!==!0?!0:!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0?!r.highlighted:this.highlighter!=null&&qu(t.theme)}renderDiff(e=this.diff,t=Te){if(this.diff=e,e==null){this.pendingHighlightResult=void 0;return}let{expandUnchanged:n,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getReadyRenderResult(e,i);this.pendingHighlightResult=void 0,o!=null&&(this.renderCache={...o,diff:e,renderRange:void 0},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||Tf(e)||Dv(e,this.getTokenizeMaxLength()),l=this.canRenderDiff(e,i,c),u=!Y(e,this.renderCache.diff),d=!$m(this.renderCache.renderRange,t);if(!this.editSessionActive&&this.workerManager?.isWorkingPool()===!0){let o=this.renderCache.result==null&&this.renderCache.highlighted&&!c&&!u&&uh(t);l&&!o&&(c||this.renderCache.result==null||!this.renderCache.highlighted&&(u||d))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||u||d||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,uh(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e)}else{this.computedLangs=Ev(e),this.highlighter??=xd();let t=this.highlighter!=null&&qu(i.theme),n=this.highlighter!=null&&ze(this.computedLangs),r=!c&&n;if(l&&this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.applyHighlightResult(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=Te){this.diff=e;let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return sh({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=Dv(e,this.getTokenizeMaxLength());this.computedLangs=t?[`text`]:Ev(e);let n=this.highlighter!=null&&qu(this.getLocalHighlightTheme()),r=t||this.highlighter!=null&&ze(this.computedLangs);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults(),a=Np(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i});if(this.editSessionActive&&e.additionLines.length===1&&e.additionLines[0]===``&&a.code.additionLines[0]==null){let t;if(Wf({diff:e,diffStyle:`both`,expandedHunks:n?!0:void 0,collapsedContextThreshold:i,callback:({additionLine:e})=>{if(e?.lineIndex===0)return t=e,!0}}),t==null)throw Error(`DiffHunksRenderer: missing empty addition line`);a.code.additionLines[0]=wv(0,``,t.unifiedLineIndex,t.splitLineIndex)}return{result:a,options:r}}onHighlightSuccess(e,t,n,r=!0){this.editSessionActive||this.applyHighlightResult(e,t,n,r)}applyHighlightResult(e,t,n,r=!0){let{diff:i,renderCache:a}=this;i!=null&&a!=null&&Y(i,e)&&X(n,this.getRenderOptions(i).options)&&(a.result!=null&&a.highlighted&&X(a.options,n)&&Y(a.diff,i)||(this.pendingHighlightResult={diff:i,options:n,highlighted:r,result:t},this.onRenderUpdate?.()))}getMatchingWorkerResultCache(e,t){if(this.editSessionActive)return;let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&X(t,n.options))return n}getReadyRenderResult(e,t){let{pendingHighlightResult:n}=this;if(n!=null&&Y(n.diff,e)&&X(n.options,t))return n;let r=this.getMatchingWorkerResultCache(e,t);if(!(r==null||this.hasHighlightedRenderCache(e,t)))return{diff:e,highlighted:!0,...r}}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Y(e,n.diff)&&X(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults(),d=this.renderCache?.isDirty??!1,f=a===`unified`,p=Ov(e,this.options.loadDiffFiles!=null),m=!e.isPartial||p,h=[],g=[],_=[],v=[],{additionLines:y,deletionLines:b}=n,x={rowCount:0,hunkSeparators:u,additionsContentAST:h,deletionsContentAST:g,unifiedContentAST:_,unifiedGutterAST:Ud(),deletionsGutterAST:Ud(),additionsGutterAST:Ud(),expansionLineCount:c,hunkData:v,incrementRowCount(e=1){x.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:x.unifiedGutterAST.children.push(t);break;case`deletions`:x.deletionsGutterAST.children.push(t);break;case`additions`:x.additionsGutterAST.children.push(t)}}},S=Pf({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),C={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(x.pushToGutter(`additions`,Gd(void 0,`buffer`,this.size)),h?.push(sv(this.size))):(x.pushToGutter(`deletions`,Gd(void 0,`buffer`,this.size)),g?.push(sv(this.size))),this.size=0,this.side=void 0}}},w=(e,t,n,r,i)=>{x.pushToGutter(e,Wd(t,n,r,i))};function T(e){C.flush(),a===`unified`?bv(`unified`,e,x):(bv(`deletions`,e,x),bv(`additions`,e,x))}this.pushFileLevelAnnotations(e,a,t,x),Wf({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,f=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&C.flush(),r>0&&T({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:m});let h=a===`unified`?f:l,g={type:c,hunkIndex:t,lineIndex:h,unifiedLineIndex:f,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(g);n?.before!=null&&_v(n.before,x);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});w(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${f},${l}`,u.gutterProperties),i==null?r!=null&&(r=xv(r,u.contentProperties,d&&s!=null?{"data-line":s.lineNumber,"data-line-index":`${f},${l}`}:void 0)):i=xv(i,u.contentProperties,d&&o!=null?{"data-line":o.lineNumber,"data-line-index":`${f},${l}`}:void 0),yv({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,h),createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&_v(n.after,x)}else{let n=this.getSplitInjectedRowsForLine?.(g);n?.before!=null&&vv(n.before,x,C);let r=s==null?void 0:b[s.lineIndex],i=o==null?void 0:y[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let f=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();f==null?c===`change`&&C.flush():(C.side!=null&&C.side!==f&&C.flush(),C.side=f,C.increment());let p=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,h);if(p!=null&&C.size>0&&C.flush(),s!=null){let e=xv(r,a.contentProperties,d?{"data-line":s.lineNumber,"data-line-index":`${s.unifiedLineIndex},${l}`}:void 0);w(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=xv(i,u.contentProperties,d?{"data-line":o.lineNumber,"data-line-index":`${o.unifiedLineIndex},${l}`}:void 0);w(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}yv({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...p,createAnnotationElement:e=>this.createAnnotationElement(e),context:x}),n?.after!=null&&vv(n.after,x,C)}let _=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,v=t===e.hunks.length-1&&n!=null&&(a===`split`?l===n.splitLineStart+n.splitLineCount-1:f===n.unifiedLineStart+n.unifiedLineCount-1),E=_?n.noEOFCRDeletions:!1,ee=_?n.noEOFCRAdditions:!1,D=(s?.noEOFCR??!1)||E,O=(o?.noEOFCR??!1)||ee;if(O||D){if(a===`split`&&C.flush(),D){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(x.unifiedContentAST.push(cv(e)),x.pushToGutter(`unified`,Gd(e,`metadata`,1))):(x.deletionsContentAST.push(cv(e)),x.pushToGutter(`deletions`,Gd(e,`metadata`,1)),O||(x.pushToGutter(`additions`,Gd(void 0,`buffer`,1)),x.additionsContentAST.push(sv(1))))}if(O){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(x.unifiedContentAST.push(cv(e)),x.pushToGutter(`unified`,Gd(e,`metadata`,1))):(x.additionsContentAST.push(cv(e)),x.pushToGutter(`additions`,Gd(e,`metadata`,1)),D||(x.pushToGutter(`deletions`,Gd(void 0,`buffer`,1)),x.deletionsContentAST.push(sv(1))))}x.incrementRowCount(1)}u!==`simple`&&u!==`metadata`&&(i>0||v&&p)&&T({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:v&&p?`unknown`:i,rangeSize:S,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:m}),x.incrementRowCount(1)}}),a===`split`&&C.flush();let E=Math.max(fv(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),ee=t.bufferBefore>0||t.bufferAfter>0,D=!f&&e.type!==`deleted`,O=!f&&e.type!==`new`,te=x.rowCount>0||ee;h=D&&te?h:void 0,g=O&&te?g:void 0,_=f&&te?_:void 0;let ne=this.createPreElement(g!=null&&h!=null,E);return{fileDiff:e,unifiedGutterAST:f&&te?x.unifiedGutterAST.children:void 0,unifiedContentAST:_,deletionsGutterAST:O&&te?x.deletionsGutterAST.children:void 0,deletionsContentAST:g,additionsGutterAST:D&&te?x.additionsGutterAST.children:void 0,additionsContentAST:h,hunkData:v,preNode:ne,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(e),totalLines:E,rowCount:x.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=Ud(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,nh(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(q({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(q({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(q({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return co(this.renderFullAST(e,t))}renderPartialHTML(e,t){return co(t==null?e:q({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}pushFileLevelAnnotations(e,t,n,r){if(!bm(n))return;let i=e.type===`new`?[]:this.getAnnotationNames(ym(this.deletionAnnotations)),a=e.type===`deleted`?[]:this.getAnnotationNames(ym(this.additionAnnotations));if(i.length===0&&a.length===0)return;let{createAnnotationElement:o}=this;if(t===`unified`){yv({diffStyle:t,type:`context`,unifiedSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i.concat(a)},createAnnotationElement:o,context:r});return}yv({diffStyle:t,type:`context`,deletionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:i},additionSpan:{type:`annotation`,hunkIndex:-1,lineIndex:-1,annotations:a},createAnnotationElement:o,context:r})}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(this.annotationSlotName(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(this.annotationSlotName(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}getAnnotationNames(e){return e?.map(e=>this.annotationSlotName(e))??[]}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return ih({fileOrDiff:e,mode:t,stickyHeader:n})}},hv=new Intl.PluralRules(`en-US`);function gv(e){return`${e} unmodified line${hv.select(e)===`one`?``:`s`}`}function _v(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function vv(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function yv({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,Gd(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,Gd(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,Gd(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function bv(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(typeof n==`number`&&n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,uv({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(uv({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,uv({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(uv({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=dv(e,t),d=r>c.expansionLineCount,f=s?t:void 0,p=typeof n==`number`?gv(n):`More unchanged context may be available`;c.pushToGutter(e,uv({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(uv({type:c.hunkSeparators,content:p,expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:typeof n==`number`?n:0,lineCountKnown:typeof n==`number`,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function xv(e,t,n){return e==null||e.type!==`element`||t==null&&n==null?e:{...e,properties:{...e.properties,...t,...n}}}function Sv(e){return e.length>0&&e[e.length-1]===``?e.length-1:e.length}function Cv(e,t,n,r){let i=Sv(e),a=Sv(t),o=Math.min(i,a),s=0;for(;s<o&&e[s]===t[s];)s++;let c=0;for(;c<o-s&&e[i-1-c]===t[a-1-c];)c++;let l=Array(t.length);for(let e=0;e<s;e++)l[e]=n[e];for(let e=0;e<c;e++)l[a-1-e]=n[i-1-e];i<e.length&&a<t.length&&(l[t.length-1]=n[e.length-1]);for(let e=s;e<t.length;e++)l[e]??=wv(e,r.getLineText(e));return l}function wv(e,t,n=e,r=e){return{type:`element`,tagName:`div`,properties:{"data-line":e+1,"data-line-index":`${n},${r}`,"data-line-type":`context`},children:[{type:`element`,tagName:`span`,properties:{"data-char":0},children:[{type:`text`,value:t}]}]}}function Tv(e){let t=[];for(let n=0;n<e.lineCount;n++)t.push(e.getLineText(n,!0));return t}function Ev(e){if(e.lang!=null)return[e.lang];let t=K(e.prevName??e.name),n=K(e.name);return t===n?[n]:[t,n]}function Dv(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Ov(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function kv(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Av(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.lineCountKnown===t.lineCountKnown&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function jv(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:Rh(e),tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,loadDiffFiles:e?.loadDiffFiles,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function Mv(e){return e.isPartial&&(e.type===`change`||e.type===`rename-changed`||e.type===`rename-pure`)}function Nv(e){let t={...e};return delete t.cacheKey,t}function Pv(e,t){if(e.isPartial||t.isPartial)throw Error(`FileDiff.shouldResetEditorForExternalDiff: diffs must be fully hydrated`);let n=e.lang??K(e.name),r=t.lang??K(t.name),i=e.type!==`new`,a=t.type!==`new`;return e.name!==t.name||n!==r||i!==a||e.deletionLines.length!==t.deletionLines.length||e.deletionLines.some((e,n)=>e!==t.deletionLines[n])}function Fv(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Iv(e,t){let{oldFile:n}=e;return n==null?t.type===`new`:t.type!==`new`&&n.name===(t.prevName??t.name)&&Fv(n.lines,t.deletionLines)}var Lv=-1,Rv=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++Lv}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerFilenameSuffix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;editSession;renderedDiff;renderRange;pendingFiles;appliedPreAttributes;headerCache={lastRenderedHTML:void 0,html:void 0,fileDiff:void 0};lastRowCount;mounted=!1;enabled=!0;editor;refreshViewTimeout;lineStateRefreshPending=!1;deferredSelectedLines;deferredEditorActiveLine;constructor(e={theme:A},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Gm,this.scrollSyncManager=new p_,this.interactionManager=new wm(`diff`,Tm(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getTheme(){return this.workerManager?.getDiffRenderOptions().theme??this.options.theme??A}getHunksRendererOptions(e){return jv(e)}createHunksRenderer(e){return new mv(this.getHunksRendererOptions(e),this.getAnnotationSlotName,this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>this.getLineIndexForDiff(this.getDiffForLineIndex(),e,t);getDiffForLineIndex(){return this.getRenderedDiff()}getLineIndexForDiff(e,t,n){if(e==null)return;let r=e.hunks.at(-1),i,a;hunkIterator:for(let o of e.hunks){let e=n===`deletions`?o.deletionStart:o.additionStart,s=n===`deletions`?o.deletionCount:o.additionCount,c=ke(e,s)+1,l=o.splitLineStart,u=o.unifiedLineStart;if(t<c){let e=c-t;i=Math.max(u-e,0),a=Math.max(l-e,0);break hunkIterator}if(t>=c+s){if(o===r){let e=t-(c+s);i=u+o.unifiedLineCount+e,a=l+o.splitLineCount+e;break hunkIterator}continue}for(let e of o.hunkContent)if(e.type===`context`){if(t<c+e.lines){let e=t-c;a=l+e,i=u+e;break hunkIterator}c+=e.lines,l+=e.lines,u+=e.lines}else{let r=n===`deletions`?e.deletions:e.additions;if(t<c+r){let r=t-c;i=u+(n===`additions`?e.deletions:0)+r,a=l+r;break hunkIterator}c+=r,l+=Math.max(e.deletions,e.additions),u+=e.deletions+e.additions}break hunkIterator}if(i!=null&&a!=null)return[i,a]}setOptions(e){e!=null&&(this.options=e,this.clearReusableHeader(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(Tm(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!wd(this.appliedThemeCSS.theme,this.getTheme())}getHoveredLine=()=>this.interactionManager.getHoveredLine();getAnnotationSlotName=e=>Lh(this.editSession?.annotations,e,De);getLatestAnnotations(){return this.editSession?.annotations?.current??this.lineAnnotations}isNewAnnotations(e){let t=this.editSession?.annotations;return e===this.lineAnnotations?!1:t==null||e!==t.provided&&e!==t.current}setLineAnnotations(e){let t=this.editSession?.annotations;if(t==null){this.lineAnnotations=e;return}this.isNewAnnotations(e)&&(this.lineAnnotations=e,Ih(t,e,De))}syncEditSessionAnnotationsFromEditor(e){let t=this.editSession?.annotations;return t==null||e===t.current?!1:(t.current=e,this.hunksRenderer.setLineAnnotations(e),this.renderAnnotations(),!0)}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.lineStateRefreshPending?this.deferredSelectedLines=[e,t]:this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.lineStateRefreshPending?this.deferredEditorActiveLine=[e,t]:this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??`additions`})}flushDeferredLineState(){let{deferredEditorActiveLine:e,deferredSelectedLines:t}=this;this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,e!=null&&this.setEditorActiveLine(...e),t!=null&&this.interactionManager.setSelection(...t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:t===`wrap`,columnVariables:this.shouldApplyColumnVariables(t)?`apply`:`measure`}),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}shouldApplyColumnVariables(e){return typeof this.options.hunkSeparators==`function`||e===`scroll`&&(this.getLatestAnnotations().length>0||this.pre?.hasAttribute(`data-has-merge-conflict`)===!0)}getCodeScrollLeft(){return Math.max(this.codeUnified?.scrollLeft??0,this.codeDeletions?.scrollLeft??0,this.codeAdditions?.scrollLeft??0)}setCodeScrollLeft(e){this.codeUnified!=null&&(this.codeUnified.scrollLeft=e),this.codeAdditions!=null&&(this.codeAdditions.scrollLeft=e),this.codeDeletions!=null&&(this.codeDeletions.scrollLeft=e)}__getEffectiveCodeOptions(){return{...this.options,...this.hunksRenderer.getEffectiveCodeOptions()}}cleanUp(e=!1){let{editor:t}=this;lm(this.handleEditSessionRender),this.emitPostRender(!0),t?.cleanUp(e?`recycle`:`discard`),e||(this.editor=void 0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,e||(this.pendingFiles=void 0),this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.headerCache.lastRenderedHTML=void 0,e||this.clearReusableHeader(),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.editSession=void 0,this.renderedDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!1,this.deferredEditorActiveLine=void 0,this.deferredSelectedLines=void 0,this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate({fileContainer:e,prerenderedHTML:t,preventEmit:n=!1,lineAnnotations:r,fileDiff:i,...a}){if(!this.enabled)throw Error(`FileDiff.hydrate: attempting to call hydrate after cleaned up`);if(this.fileContainer!=null)throw Error(`FileDiff.hydrate: hydrate can only be called before the instance has rendered or hydrated`);let o=mg(a,`FileDiff.hydrate`),s=o?.oldFile,c=o?.newFile;this.hydrateElements(e,t);let l=this.editor!=null;l||Uv(this.pre,Vv({fileDiff:i,oldFile:s,newFile:c}),this.options.collapsed)||Wv(this.headerElement,Hv({fileDiff:i,oldFile:s,newFile:c}),this.options.disableFileHeader)?this.render({...a,fileContainer:e,lineAnnotations:r,fileDiff:i,forceRender:l||a.forceRender,preventEmit:!0}):this.hydrationSetup({fileDiff:i,lineAnnotations:r,...o}),n||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Xh(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!==void 0&&n!==void 0?d_(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderedDiff=this.fileDiff,this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.loadFilesIfNecessary(),this.hunksRenderer.expandHunk(e,t,n),this.rerender()};loadFilesIfNecessary(){let{fileDiff:e,options:{loadDiffFiles:t}}=this;if(e==null||!Mv(e)||this.pendingFiles?.fileDiff===e)return;if(t==null)throw Error(`FileDiff: loadDiffFiles is required to load full files for a partial diff`);let n=this.loadFilesForDiff(e,t),r=this.pendingFiles={fileDiff:e,promise:n};r.promise=n.finally(()=>{this.pendingFiles===r&&(this.pendingFiles=void 0)})}__canAttachEditor(){return this.fileDiff!=null&&!this.fileDiff.isPartial}async prepareForEditing(){if(this.__canAttachEditor())return;let e=this.__prepareForEditing();if(e==null)throw this.fileDiff?.isPartial===!0&&!Mv(this.fileDiff)?Error(`FileDiff.prepareForEditing: this partial diff cannot be hydrated; provide a complete diff`):Error(`FileDiff.prepareForEditing: a partial diff requires loadDiffFiles`);if(await e,!this.__canAttachEditor())throw Error(`FileDiff.prepareForEditing: the diff did not finish loading`)}__prepareForEditing(){if(!this.__canAttachEditor()){if(this.fileDiff?.isPartial===!0&&!Mv(this.fileDiff))throw Error(`FileDiff: this partial diff cannot be hydrated; provide a complete diff to edit`);return this.loadFilesIfNecessary(),this.pendingFiles?.promise}}async loadFilesForDiff(e,t){try{let n=await t(e);if(this.fileDiff!==e)return;await this.handleFilesLoaded(e,n)}catch(e){if(this.options.disableErrorHandling===!0)throw e;console.error(e)}}async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(bg(`merge`,e,t),this.setHydratedState(t),this.installHydratedSessionDiff(e)){this.rerender();return}await ug(()=>this.primeHighlightCache(e)),this.enabled&&this.fileDiff===e&&this.rerender()}}installHydratedSessionDiff(e){if(e.isPartial)throw Error(`FileDiff.installHydratedSessionDiff: diffs cannot be partial for editing`);return this.fileDiff===e&&this.editSession?.outgoingDiff!=null&&(this.installEditSession(e),!0)}updateExternalDiff(e,t){if(Y(this.fileDiff,e))return!1;let n=this.editSession?.outgoingDiff??this.editSession?.diff;return this.fileDiff=e,n!=null&&(e.isPartial?this.loadFilesIfNecessary():this.installEditSession(e),this.editSession!=null&&(this.editSession.outgoingDiff=n)),this.editSession?.annotations!=null&&t!=null&&(this.lineAnnotations=t,this.editSession.annotations=Fh(t,De,this.editSession.annotations)),!0}installEditSession(e,t,n){let r=e.additionLines.join(``),i=t==null?void 0:yg(t.contents),a=n!=null&&Iv(n,e);if(n!=null&&!a)throw Error(`FileDiff: retained session cannot resume against a different old file`);if(t!=null&&t.contents!==r&&!a)throw Error(`FileDiff: retained edits are missing their diff session state`);let o=t==null||t.name===e.name&&t.lang===e.lang&&t.contents===r,s=Nv(e);t!=null&&i!=null&&!o&&(s.name=t.name,s.lang=t.lang),a&&n!=null&&i!=null&&(s.additionLines=i,s.type=n.type,s.hunks=n.hunks,s.editSessionDirty=!0,M_(s)),this.editSession={diff:s,annotations:this.editSession?.annotations??Fh(this.lineAnnotations,De),outgoingDiff:this.editSession?.outgoingDiff},this.hunksRenderer.beginEditSession(s,o&&!a?e:void 0)}setHydratedState(e){this.deletionFile=e.oldFile,this.additionFile=e.newFile,this.workerManager?.cleanUpTasks(this.hunksRenderer),this.hunksRenderer.clearRenderCache()}render({fileDiff:e,deferManagers:t=!1,forceRender:n=!1,preventEmit:r=!1,lineAnnotations:i,fileContainer:a,containerWrapper:o,renderRange:s,...c}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let l=mg(c,`FileDiff.render`),u=l?.oldFile,d=l?.newFile;this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:f=!1,themeType:p=`system`,expandUnchanged:m=!1}=this.options,h=f?void 0:s,g=this.hasThemeChanged(),_=l!=null,v=_&&(!Bv(u,this.deletionFile)||!Bv(d,this.additionFile)),y=e!=null&&!Y(e,this.fileDiff),b=i!=null&&(i.length>0||this.getLatestAnnotations().length>0)&&this.isNewAnnotations(i);if(!f&&$m(h,this.renderRange)&&!n&&!b&&!g&&(e!=null&&!y||e==null&&!v)){let e=this.applyCachedThemeState(p);return e&&this.finalizeRender(),e}let x;e==null&&_&&(v||this.fileDiff==null)&&(x=d_(l.oldFile,l.newFile,this.options.parseDiffOptions));let{renderRange:S}=this;this.renderRange=h,_?(this.deletionFile=u,this.additionFile=d):e!=null&&(this.deletionFile=void 0,this.additionFile=void 0),e!=null&&y?this.updateExternalDiff(e,i):x!=null&&(y=!0,this.updateExternalDiff(x,i)),y&&this.clearReusableHeader(),i!=null&&this.setLineAnnotations(i);let C=this.getLatestDiff();if(C==null)return!1;C.editSessionDirty===!0&&this.shouldSelfHealEditSession()&&(W_(C,this.options.parseDiffOptions),this.hunksRenderer.refreshHighlightedResult()),m&&this.loadFilesIfNecessary(),this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.getLatestAnnotations());let{disableErrorHandling:w=!1,disableFileHeader:T=!1}=this.options;if(T&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.headerCache.lastRenderedHTML=void 0),this.clearHeaderSlots()),a=this.getOrCreateFileContainer(a,o),this.applyCachedThemeState(p),f){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(C,Ee);e!=null&&this.applyThemeState(a,e.themeStyles,p,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,a,e.fileDiff),this.renderSeparators([]),this.renderedDiff=e?.fileDiff??C,this.injectUnsafeCSS()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return this.finalizeRender(),r||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(a);if(!(this.canPartiallyRender(n,b,v||y||g||!Y(this.renderedDiff,C))&&this.applyPartialRender({fileDiff:C,previousRenderRange:S,renderRange:h}))){let t=this.hunksRenderer.renderDiff(C,h);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.isWorkingPool()&&this.workerManager.initialize().catch(()=>{}).then(()=>this.rerender()),!1;this.applyThemeState(a,t.themeStyles,p,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,a,t.fileDiff),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData),this.renderedDiff=t.fileDiff}this.applyBuffers(e,h),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,t||this.flushManagers(),this.finalizeRender(),this.editor!=null&&this.syncRenderViewToEditor()}catch(e){if(w)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,a)}return r||this.emitPostRender(),!0}finalizeRender(){}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}getLatestDiff(e=this.fileDiff){return this.editSession?.diff??e}getRenderedDiff(){return this.renderedDiff}syncRenderViewToEditor(){let{editor:e,fileContainer:t}=this,n=this.getLatestAnnotations(),r=this.computeEditorRenderRange(this.renderRange),i=this.getLatestDiff();if(e==null||t==null||i==null||i.isPartial)return;let a=a=>{if(!this.enabled||this.editor!==e||this.fileContainer!==t||this.getLatestDiff()!==i)return;let o=this.editSession?.outgoingDiff,{fileDiff:s}=this,c=o!=null&&s!=null&&o!==i,l=c&&o!=null&&s!=null?Pv(o,s):!1;e.__syncRenderView({highlighter:a,fileContainer:t,fileDiff:i,lineAnnotations:n,renderRange:r,externalDocument:c,resetHistory:l})},o=this.getTheme(),s=i.lang??K(i.name),c=xd({theme:o,lang:s});c==null?yd({themes:Be(o),langs:[`text`,s],preferredHighlighter:this.workerManager?.getPreferredHighlighter()??this.options.preferredHighlighter}).then(a):a(c)}computeEditorRenderRange(e){let t=this.getLatestDiff();if(e==null||t==null||uh(e))return e;let{diffStyle:n=`split`,expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a,o;return Wf({diff:t,diffStyle:n,startingLine:e.startingLine,totalLines:e.totalLines,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({additionLine:e})=>{e!=null&&(a??=e.lineNumber,o=e.lineNumber)}}),a==null||o==null?{...e,startingLine:0,totalLines:0}:{...e,startingLine:a-1,totalLines:o-a+1}}__acknowledgeDocumentUpdate(){this.editSession!=null&&(this.editSession.outgoingDiff=void 0)}__acceptEditorChange(e){let{lineAnnotations:t}=e;t!=null&&this.syncEditSessionAnnotationsFromEditor(t)}emitEditChange(e){let{onEditChange:t}=this.options;t?.(e)}__captureDocumentSessionState(e=!0){let{fileDiff:t,editSession:{diff:n,outgoingDiff:r}={}}=this;if(r!=null&&t!=null){if(!t.isPartial&&Pv(r,t))return;n=r}if(!(n==null||n.isPartial))return{diffSession:{oldFile:n.type===`new`?null:{name:n.prevName??n.name,lines:e?[...n.deletionLines]:n.deletionLines},type:n.type,hunks:e?hg(n.hunks):n.hunks},hasChanges:n.editSessionDirty===!0}}__attachEditor(e){if(this.type!==`file-diff`)throw Error(`FileDiff.__attachEditor: cannot attach an editor to a "${this.type}" diff`);if(this.editor!=null)throw Error(`FileDiff.__attachEditor: an editor is already attached`);if(!this.__canAttachEditor())throw Error(`FileDiff.__attachEditor: a complete diff is required before editing`);let t=()=>{this.editor=void 0,this.finishEditSession()};try{return this.resumeEditorRendering(e),t}catch(e){throw t(),e}}__resumeEditor(e){if(this.editor!==e)throw Error(`FileDiff.__resumeEditor: editor association changed`);this.resumeEditorRendering(e)}resumeEditorRendering(e){let{fileDiff:t}=this,n=this.editSession?.outgoingDiff;n!=null&&t!=null&&!t.isPartial&&this.editSession?.diff===n&&this.installEditSession(t);let r=this.editSession==null&&t!=null&&!t.isPartial?t:void 0;r==null?this.editSession!=null&&this.hunksRenderer.beginEditSession(this.editSession.diff):this.installEditSession(r,e.__getDocumentContents(zv(r)),e.__getDocumentSessionState()),this.editor=e,this.fileDiff?.isPartial===!0&&this.loadFilesIfNecessary();let i=this.editSession?.diff;this.hunksRenderer.editorRenderReady()?(i!=null&&this.hunksRenderer.diffCache===i&&(this.renderedDiff=i),this.syncRenderViewToEditor()):this.rerender()}finishEditSession(){this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks()}__completeEditSession(e,t){this.settleEditSession(t===`install`,e)}settleEditSession(e,t){let{editSession:n,fileDiff:r,lineAnnotations:i}=this;if(n==null||r==null)return;let{diff:a,annotations:o}=n;if(this.editor!=null)throw Error(`FileDiff.__completeEditSession: detach the editor before completing the session`);this.hunksRenderer.endEditSession(),this.finalizeEditSessionHunks();let s=o?.current,c,l=null,u=null,d=!1,f;if(t==null)throw Error(`FileDiff.__completeEditSession: editor is required for completion`);let p=gg(a),m={name:p.name,contents:p.additionLines.join(``)};p.lang!=null&&(m.lang=p.lang);let h={fileDiff:p,editor:t,originalFileDiff:r,oldFile:p.type===`new`?null:{name:p.prevName??p.name,contents:p.deletionLines.join(``)},newFile:m,lineAnnotations:s,originalLineAnnotations:i};Object.freeze(h);try{if(t.__emitEditComplete(h),this.options.onEditComplete?.(h)===`accept`){if(p.cacheKey!=null&&p.cacheKey===r.cacheKey)throw Error(`FileDiff.__completeEditSession: an accepted diff must not reuse the replaced diff cacheKey`);c=p,l=h.oldFile,u=h.newFile}}catch(e){d=!0,f=e}if(e&&c!=null&&(this.fileDiff=c,this.additionFile!=null&&(this.deletionFile=l,this.additionFile=u),s!=null&&(this.lineAnnotations=s)),this.editSession=void 0,e&&this.fileContainer!=null&&this.rerender(),d)throw f}finalizeEditSessionHunks(){let e=this.getLatestDiff();if(e==null||e.editSessionDirty!==!0)return!1;let{collapsedContextThreshold:t=1}=this.options,n=H_(e,this.hunksRenderer.getExpandedHunksMap(),t);return W_(e,this.options.parseDiffOptions),this.hunksRenderer.setExpandedHunksMap(U_(e,n)),this.hunksRenderer.refreshHighlightedResult(),this.escalateEditSessionRender(),!0}applyDocumentChange(e,t){let n=this.editSession?.diff;if(n==null)throw Error(`FileDiff.applyDocumentChange: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(n),this.hunksRenderer.applyDocumentChange(e),t!=null&&this.syncEditSessionAnnotationsFromEditor(t),this.rerender(),this.interactionManager.setSelectionDirty()}applySuspendedDocumentChange(e,t){this.applyDocumentChange(e,t),this.hunksRenderer.clearRenderCache()}updateRenderCache(e,t,n={}){let r=this.editSession?.diff;if(r==null)throw Error(`FileDiff.updateRenderCache: requires an active edit session`);this.detachAdditionLines(),this.hunksRenderer.beginEditSession(r);let{shouldRefreshDiffsView:i,lineCountChangeInFlight:a}=n;if(this.hunksRenderer.updateRenderCache(e,t,a)){this.refreshViewTimeout!=null&&(clearTimeout(this.refreshViewTimeout),this.refreshViewTimeout=void 0),this.lineStateRefreshPending=!0,this.escalateEditSessionRender();return}i===!0&&(this.refreshViewTimeout!=null&&clearTimeout(this.refreshViewTimeout),this.lineStateRefreshPending=!0,this.refreshViewTimeout=setTimeout(()=>{this.refreshViewTimeout=void 0,this.options.diffStyle===`split`?this.refreshSplitDiffView():this.refreshUnifiedDiffView(),this.flushDeferredLineState()},150))}detachAdditionLines(){let e=this.editSession?.diff,{fileDiff:t}=this;e!=null&&(e.additionLines===t?.additionLines||e.additionLines===e.deletionLines)&&(e.additionLines=[...e.additionLines])}isLineRenderable(e){let t=this.getRenderedDiff();if(t==null)return!0;let{expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options;return If({fileDiff:t,lineNumber:e,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r})}getNearestRenderableLine(e,t){let n=this.getRenderedDiff();if(n==null)return e;let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options;return Lf({fileDiff:n,lineNumber:e,direction:t,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i})}revealLine(e){let t=this.getRenderedDiff(),{expandUnchanged:n=!1,collapsedContextThreshold:r=1,expansionLineCount:i=100}=this.options;if(t==null||t.isPartial||n)return!1;let a=this.hunksRenderer.getExpandedHunksMap();for(let[n,o]of t.hunks.entries()){let[s,c]=jf(o);if(e<s){let c=Mf({isPartial:t.isPartial,rangeSize:o.collapsedBefore,expandedHunks:a,hunkIndex:n,collapsedContextThreshold:r}),l=s-c.rangeSize;if(c.renderAll||e<l+c.fromStart||e>=s-c.fromEnd)return!1;let u=e-(l+c.fromStart)+1,d=s-c.fromEnd-e;return u<=d?this.expandHunk(n,`up`,u+i):this.expandHunk(n,`down`,d+i),!0}if(e<c)return!1}let o=Ff({fileDiff:t,hunkIndex:t.hunks.length-1,expandedHunks:a,collapsedContextThreshold:r,errorPrefix:`FileDiff.revealLine`});if(o==null||o.renderAll)return!1;let s=t.hunks[t.hunks.length-1],[,c]=jf(s);return e<c+o.fromStart||e>=c+o.rangeSize?!1:(this.expandHunk(t.hunks.length,`up`,e-(c+o.fromStart)+1+i),!0)}shouldSelfHealEditSession(){return this.editor==null}escalateEditSessionRender(){cm(this.handleEditSessionRender)}handleEditSessionRender=()=>{this.rerender(),this.flushDeferredLineState()};removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.setPlaceholderHeight(e)}setPlaceholderHeight(e){return this.placeHolder!=null&&(this.placeHolder.style.setProperty(`height`,`${e}px`),!0)}async primeHighlightCache(e=this.fileDiff){let{workerManager:t}=this;if(e==null||t==null||!t.isWorkingPool()||e.cacheKey==null||Tf(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||await t.primeDiffHighlightCache(e).catch(e=>{console.error(e)})}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.headerCache.lastRenderedHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!Av(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options,n=this.getLatestAnnotations();if(t!=null&&n.length>0)for(let[r,i]of n.entries()){let n=this.getAnnotationSlotName(i),a=`${r}-${n}`,o=this.annotationCache.get(a);if(o==null||!kv(i,o.annotation)){o?.element.remove();let e=t(i);if(e==null)continue;o={element:bh(n),annotation:i},o.element.appendChild(e),this.fileContainer.appendChild(o.element),this.annotationCache.set(a,o)}e.delete(a)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=xh();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return n!=null&&i&&this.editor?.__captureFocusForDOMReplacement(),i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.headerCache.lastRenderedHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:mm(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):mm(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=hh;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t,n){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{headerCache:{fileDiff:r,html:i,lastRenderedHTML:a}}=this,o=(n!==this.editSession?.diff&&Y(r,n)?i:void 0)??co(e);if(this.headerCache.html=o,this.headerCache.fileDiff=n,o!==a){let e=document.createElement(`div`);e.innerHTML=o;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.headerCache.lastRenderedHTML=o}if(this.isContainerManaged)return;let{renderCustomHeader:s,renderHeaderPrefix:c,renderHeaderFilenameSuffix:l,renderHeaderMetadata:u}=this.options;if(s!=null){let e=s(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,fe,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0;return}let d=c?.(n)??void 0,f=l?.(n)??void 0,p=u?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,le,d),this.headerFilenameSuffix=this.upsertHeaderSlotElement(t,this.headerFilenameSuffix,ue,f),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,de,p),this.headerCustom?.remove(),this.headerCustom=void 0}clearReusableHeader(){this.headerCache.html=void 0,this.headerCache.fileDiff=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=Sh(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=kh(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.getTheme(),s=typeof o==`string`?o:{...o},c=wh(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=Kh({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:Ah(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=jh(this.themeCSSStyle.textContent??``,wh(e)))}shouldGuardRebuildScroll(){return this.editor!=null&&Yh()}applyHunksToDOM(e,t){this.shouldGuardRebuildScroll()?Vh(e,()=>this.replaceCodeColumns(e,t)):this.replaceCodeColumns(e,t)}applyCodeColumnsInPlace(e,t,n){let r=this.getColumnPair(e);if(r==null)return!1;let i=Gv(t[0]),a=Gv(t[1]);return i==null||a==null?!1:(r.gutter.innerHTML=co(i),r.content.innerHTML=co(a),n!==this.lastRowCount&&(r.gutter.style.setProperty(`grid-row`,`span ${n}`),r.content.style.setProperty(`grid-row`,`span ${n}`)),!0)}replaceCodeColumns(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);this.editor?.__captureFocusForDOMReplacement(),s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Bh({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeDeletions,c,t.rowCount)||(this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c)),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Bh({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeAdditions,l,t.rowCount)||(this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l)),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Bh({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.applyCodeColumnsInPlace(this.codeUnified,s,t.rowCount)||(this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s)),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({fileDiff:e,previousRenderRange:t,renderRange:n}){let{pre:r,codeUnified:i,codeAdditions:a,codeDeletions:o,options:{diffStyle:s=`split`}}=this;if(r==null||t==null||n==null||!Number.isFinite(t.totalLines)||!Number.isFinite(n.totalLines)||this.lastRowCount==null)return!1;let c=this.getCodeColumns(s,i,o,a);if(c==null)return!1;let l=t.startingLine,u=n.startingLine,d=l+t.totalLines,f=u+n.totalLines,p=Math.max(l,u),m=Math.min(d,f);if(m<=p)return!1;let h=Math.max(0,p-l),g=Math.max(0,d-m),_=this.trimColumns({columns:c,trimStart:h,trimEnd:g,previousStart:l,overlapStart:p,overlapEnd:m,diffStyle:s});if(_<0)throw Error(`FileDiff.applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<_)throw Error(`FileDiff.applyPartialRender: trimmed beyond DOM row count`);let v=this.lastRowCount-_,y=(t,n)=>{if(!(n<=0))return this.hunksRenderer.renderDiff(e,{startingLine:t,totalLines:n,bufferBefore:0,bufferAfter:0})},b=y(u,Math.max(p-u,0));if(b==null&&u<p)return!1;let x=y(m,Math.max(f-m,0));if(x==null&&f>m)return!1;let S=(e,t)=>{if(e!=null){if(s===`unified`&&!Array.isArray(c))this.insertPartialHTML(s,c,e,t);else if(s===`split`&&Array.isArray(c))this.insertPartialHTML(s,c,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);v+=e.rowCount,this.renderedDiff=e.fileDiff}};return this.cleanupErrorWrapper(),S(b,`afterbegin`),S(x,`beforeend`),this.lastRowCount!==v&&(this.applyRowSpan(s,c,v),this.lastRowCount=v),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}refreshSplitDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`split`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`split`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(!Array.isArray(n))return;let r=(e,n)=>{if(n==null)return;let r=this.hunksRenderer.renderCodeAST(e,t),i=Gv(r?.[0]),a=Gv(r?.[1]);for(let[e,t]of[[n.gutter,i],[n.content,a]])if(t!=null&&e.childElementCount===t.length)for(let n=0;n<t.length;n++){let r=e.children[n],i=t[n].properties[`data-line-type`];i!=null&&r.dataset.lineType!==i&&(r.dataset.lineType=i)}};r(`deletions`,n[0]),r(`additions`,n[1]),this.renderedDiff=t.fileDiff}refreshUnifiedDiffView(){let e=this.getLatestDiff();if(this.options.diffStyle!==`unified`||e==null)return;let t=this.hunksRenderer.renderDiff(e,this.renderRange);if(t==null)return;let n=this.getCodeColumns(`unified`,this.codeUnified,this.codeDeletions,this.codeAdditions);if(n==null||Array.isArray(n))return;let r=this.hunksRenderer.renderCodeAST(`unified`,t),i=Gv(r?.[0]),a=Gv(r?.[1]),o=()=>{for(let[e,t]of[[n.gutter,i],[n.content,a]])t!=null&&(e.innerHTML=co(t));t.rowCount!==this.lastRowCount&&(this.applyRowSpan(`unified`,n,t.rowCount),this.lastRowCount=t.rowCount),this.renderedDiff=t.fileDiff};this.shouldGuardRebuildScroll()?Vh(this.pre,o):o(),this.renderSeparators(t.hunkData),this.managersDirty=!0,this.flushManagers(),this.syncRenderViewToEditor()}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=Gv(t[0]),i=Gv(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getColumnPair(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}getCodeColumns(e,t,n,r){if(e===`unified`)return this.getColumnPair(t);{let e=this.getColumnPair(n),t=this.getColumnPair(r);return e!=null||t!=null?[e,t]:void 0}}updateBuffers(e){this.pre!=null&&this.applyBuffers(this.pre,e)}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};_h(u,this.appliedPreAttributes)||(Zh(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function zv(e){return{name:e.name,lang:e.lang,contents:e.additionLines.join(``)}}function Bv(e,t){return e==null||t==null?e==null&&t==null:wf(e,t)}function Vv({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function Hv({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function Uv(e,t,n=!1){return!n&&e==null&&t}function Wv(e,t,n=!1){return e==null&&t&&!n}function Gv(e){if(e!=null&&e.type===`element`)return e.children??[]}var Kv=3e3,qv=new Map,Jv=-1,Yv=class extends Rv{__id=`little-virtualized-file-diff:${++Jv}`;renderType=`virtualized`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0,ghostTextRows:qv,ghostTextRowsByIndex:new Map};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;pendingHydratedDiff;pendingExpansions;pendingRender;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=Ef(n)}setMetrics(e,t=!1){let n=Ef(e);(t||!rm(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&(this.forceRenderOverride=!0)}syncLineAnnotations(e){return e==null||!this.isNewAnnotations(e)||e.length===0&&this.getLatestAnnotations().length===0?!1:(super.setLineAnnotations(e),!0)}syncEditSessionAnnotationsFromEditor(e){return super.syncEditSessionAnnotationsFromEditor(e)?(this.forceRenderOverride=!0,!0):!1}setFileAnnotationHeight(e){let t=this.cache.fileAnnotationHeight;return e!==t&&(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e){let t=this.getLatestAnnotations();return vm(t)?t.some(t=>t.lineNumber===0?e.type===`new`?t.side===`additions`:e.type!==`deleted`||t.side===`deletions`:!1):!1}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!im(t,e),r=n&&ry(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:iy(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1,resetRenderRange:n=!0}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal=0,this.cache.ghostTextRows=qv,this.cache.ghostTextRowsByIndex.size>0&&this.cache.ghostTextRowsByIndex.clear(),this.invalidateDerivedLayoutCache(t,n),e&&this.isSimpleMode()&&this.computeApproximateSize()}invalidateDerivedLayoutCache(e,t=!0){this.layoutDirty=!0,this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),e&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&t&&(this.renderRange=void 0)}applyGhostTextRows(e,t){let{cache:{heightDeltas:n,ghostTextRows:r,ghostTextRowsByIndex:i},metrics:{lineHeight:a}}=this;if(r===t)return!1;let o=this.getDiffStyle(),s=new Map;for(let[n,r]of t){let t=this.getLineIndexForDiff(e,n+1,`additions`);t!=null&&s.set(o===`split`?t[1]:t[0],r)}let c=!1;for(let e of new Set([...i.keys(),...s.keys()])){let t=((s.get(e)??0)-(i.get(e)??0))*a;if(t===0)continue;let r=(n.get(e)??0)+t;r===0?n.delete(e):n.set(e,r),this.cache.measuredHeightDeltaTotal+=t,c=!0}return this.cache.ghostTextRows=t,this.cache.ghostTextRowsByIndex=s,c}reconcileHeights(){let e=!1,{options:{overflow:t=`scroll`},metrics:{lineHeight:n}}=this,r=this.placeHolder==null?this.getRenderedDiff():this.getLayoutDiff();if(this.fileContainer==null||r==null)return this.height!==0&&(e=!0),this.height=0,e;this.top=this.getVirtualizedTop(),e=this.applyGhostTextRows(r,this.editor?.__getGhostTextRows()??qv);let{ghostTextRowsByIndex:i}=this.cache,a=t!==`scroll`||this.getLatestAnnotations().length>0||this.isResizeDebuggingEnabled();if(this.placeHolder!=null||!a&&this.cache.heightDeltas.size===0&&this.cache.fileAnnotationHeight===0)return e&&(this.computeApproximateSize(!0),this.setPlaceholderHeight(this.height)),e;let o=this.getDiffStyle(),s=o===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];if(this.renderRange!=null&&bm(this.renderRange)){let t=Xv(s)??0;this.setFileAnnotationHeight(t)&&(e=!0)}for(let t of s){if(t==null)continue;let r=t.children[1];if(!(r instanceof HTMLElement))continue;let s=o===`split`&&t===this.codeDeletions;for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let c=cy(r,o),l=i.get(c)??0;if(s&&l>0)continue;let u=this.cache.heightDeltas.get(c)??0;if(!a&&u===l*n)continue;let d=t.getBoundingClientRect().height+l*n,f=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(f=!0),d+=t.nextElementSibling.getBoundingClientRect().height);let p=this.getEstimatedLineHeight(f),m=d-p;m!==u&&(e=!0,this.cache.measuredHeightDeltaTotal+=m-u,m===0?this.cache.heightDeltas.delete(c):this.cache.heightDeltas.set(c,m))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());flushManagers(){super.flushManagers(),this.lineStateRefreshPending&&this.flushDeferredLineState()}updateCodeViewLayout(e,t,n,r){let i=!1,a=!1,{pendingExpansions:o,pendingHydratedDiff:s,options:{collapsed:c=!1}}=this;if(s!=null&&(this.pendingHydratedDiff=void 0,s.expectedDiff===e&&(Object.assign(e,s.nextDiff),this.setHydratedState(s.files),this.installHydratedSessionDiff(e),this.forceRenderOverride=!0,i=!0,a=!0)),o!=null){this.pendingExpansions=void 0;for(let{hunkIndex:e,direction:t,expansionLineCountOverride:n}of o)this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,a=!0}let l=this.updateExternalDiff(e,r),{pendingRenderDiff:u,layoutDiffChanged:d,renderedDiffChanged:f,annotationsChanged:p}=this.updatePendingRender(e,r);return!this.forceRenderOverride&&(l||f||p)&&(this.forceRenderOverride=!0),(n?.resetDiffLayoutCache===!0||d)&&(i=!0),(d||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights)&&(a=!0),n?.metrics!=null&&(this.metrics=Ef(n.metrics),i=!0,a=!0),this.currentCollapsed!==c&&(this.currentCollapsed=c,i=!0),i?this.resetLayoutCache({includeEstimatedHeights:a}):a&&this.invalidateDerivedLayoutCache(!0),this.top=t,this.computeApproximateSize(!1,u),this.height}getLinePosition(e,t=`additions`){let n=this.getLayoutDiff();if(n==null||e<1)return;let r=this.getLineIndexForDiff(n,e,t);if(r==null)return;let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,c=this.getDiffStyle(),l=this.getHunkSeparatorType(),u=c===`split`?r[1]:r[0];this.approximateLayoutCheckpoints(n);let d=Df(this.metrics,i),f=this.getLayoutCheckpointBeforeLineIndex(u),p=f?.top??d+this.cache.fileAnnotationHeight;if(o)return{top:d,height:0};let m;return Wf({diff:n,diffStyle:c,startingLine:f?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=c===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=Hf({type:l,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(p+=r.gapBefore,u>=o-n&&u<o)return m={top:p,height:r.height},!0;p+=r.height+r.gapAfter}}let s=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===u)return m={top:p,height:s},!0;if(p+=s,r>0){let e=Uf({type:l,metrics:this.metrics});if(e!=null){if(u>o&&u<=o+r)return m={top:p+e.gapBefore,height:e.height},!0;p+=e.totalHeight}}return!1}}),m}getEditorViewport(){return this.virtualizer.type===`simple`?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){let t=this.getLayoutDiff();if(t==null)return;let{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:i=!1,collapsedContextThreshold:a=1}=this.options;if(i)return;let o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints(t);let c=this.getLayoutCheckpointBeforeTop(e),l=c?.top??Df(this.metrics,n)+this.cache.fileAnnotationHeight,u;return Wf({diff:t,diffStyle:o,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:a,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:a,additionLine:c})=>{let d=o===`split`?c?.splitLineIndex??a?.splitLineIndex:c?.unifiedLineIndex??a?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=Hf({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(l+=e.totalHeight)}if(l>=e&&(a==null?c!=null&&(u={lineNumber:c.lineNumber,side:`additions`,top:l}):u={lineNumber:a.lineNumber,side:`deletions`,top:l},u!=null))return!0;let f=this.getLineHeight(d,(c?.noEOFCR??!1)||(a?.noEOFCR??!1));if(l+=f,i>0){let e=Uf({type:s,metrics:this.metrics});e!=null&&(l+=e.totalHeight)}return!1}}),u}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){let t=this.getLayoutDiff();if(this.top==null||t==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let n=e==null?this.renderRange:this.computeRenderRangeFromWindow(t,this.top,e);if(n==null)return;let{bufferBefore:r,bufferAfter:i,totalLines:a}=n,o=0;if(a===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(o=i)}return{topOffset:this.top+r+o,height:this.height-(r+i)}}cleanUp(e=!1){let t=this.cache.ghostTextRows.size>0;t&&(this.layoutDirty=!0);let n=e&&this.isAdvancedMode()&&this.fileContainer!=null&&(t||!Y(this.getRenderedDiff(),this.getLatestDiff()));this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.resetLayoutCache({includeEstimatedHeights:!0}),this.pendingExpansions=void 0,this.pendingHydratedDiff=void 0),this.pendingRender=void 0,this.isSetup=!1,super.cleanUp(e),n&&this.virtualizer.instanceChanged(this,!0)}expandHunk=(e,t,n)=>{this.fileDiff!=null&&(this.loadFilesIfNecessary(),this.isAdvancedMode()?(this.pendingExpansions??=[],this.pendingExpansions.push({hunkIndex:e,direction:t,expansionLineCountOverride:n})):(this.hunksRenderer.expandHunk(e,t,n),this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))};async handleFilesLoaded(e,t){if(this.fileDiff===e&&e.isPartial){if(this.isAdvancedMode()){let n=bg(`clone`,e,t);if(await ug(()=>this.primeHighlightCache(n)),this.fileDiff!==e)return;this.pendingHydratedDiff={expectedDiff:e,nextDiff:n,files:t}}else{if(bg(`merge`,e,t),this.setHydratedState(t),!this.installHydratedSessionDiff(e)&&(await ug(()=>this.primeHighlightCache(e)),this.fileDiff!==e))return;this.resetLayoutCache({includeEstimatedHeights:!0}),this.computeApproximateSize()}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}}loadFilesIfNecessary(){if(this.pendingHydratedDiff!=null){if(this.pendingHydratedDiff.expectedDiff===this.fileDiff)return;this.pendingHydratedDiff=void 0}super.loadFilesIfNecessary()}isLineRenderable(e){if(super.isLineRenderable(e))return!0;let{pendingExpansions:t}=this,n=this.getRenderedDiff();if(t==null||t.length===0||n==null)return!1;let{expansionLineCount:r=100,collapsedContextThreshold:i=1}=this.options,a=new Map(this.hunksRenderer.getExpandedHunksMap());for(let e of t){let t={...a.get(e.hunkIndex)??{fromStart:0,fromEnd:0}},n=e.expansionLineCountOverride??r;(e.direction===`up`||e.direction===`both`)&&(t.fromStart+=n),(e.direction===`down`||e.direction===`both`)&&(t.fromEnd+=n),a.set(e.hunkIndex,t)}return If({fileDiff:n,lineNumber:e,expandedHunks:a,collapsedContextThreshold:i})}invalidateEditSessionLayout(){this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1}),this.isSimpleMode()||this.computeApproximateSize(!0),this.getSimpleVirtualizer()?.requestHeightReconcile(this)}escalateEditSessionRender(){this.invalidateEditSessionLayout(),this.enabled&&this.fileDiff!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0))}shouldSelfHealEditSession(){return!this.isAdvancedMode()&&super.shouldSelfHealEditSession()}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){if(!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null)return;let e=this.getLatestDiff(),t=e==null?void 0:this.hunksRenderer.getDiffForNextRender(e);this.isSimpleMode()&&(this.pendingRender=void 0),this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!Y(this.getRenderedDiff(),t))}syncGhostTextRows(){let e=this.getAdvancedVirtualizer();e==null?this.getSimpleVirtualizer()?.requestHeightReconcile(this):(e.capturePendingLayoutAnchor(),this.layoutDirty=!0,e.instanceChanged(this,!0))}applyDocumentChange(e,t,n=!1){let{renderRange:r}=this;this.getAdvancedVirtualizer()?.capturePendingLayoutAnchor(),super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache({forceSimpleRecompute:this.isSimpleMode(),includeEstimatedHeights:!0,resetRenderRange:!1});let i=this.getRenderedDiff();if(!this.isSimpleMode())this.computeApproximateSize(!0);else if(n&&r!=null&&i!=null){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(i,this.top??0,e);t.bufferAfter!==r.bufferAfter&&this.updateBuffers(t)}this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!0)}computeApproximateSize(e=!1,t=this.getLayoutDiff()){let n=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!n)return;let r=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,t==null){this.layoutDirty=!1;return}this.applyGhostTextRows(t,this.editor?.__getGhostTextRows()??qv);let{disableFileHeader:i=!1,collapsed:a=!1}=this.options,o=Df(this.metrics,i);if(this.height+=o,a){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight(t)+this.cache.measuredHeightDeltaTotal,n&&!r&&this.validateComputedHeight(t),this.layoutDirty=!1}getLayoutDiff(){return this.pendingRender?.diff??this.getRenderedDiff()}getActiveEstimatedHeight(e=this.getLayoutDiff()){this.ensureEstimatedDiffHeights(e);let t=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(t==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return t}ensureEstimatedDiffHeights(e=this.getLayoutDiff()){if(e==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,{splitHeight:i,unifiedHeight:a}=dg({fileDiff:e,metrics:this.metrics,disableFileHeader:t,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:n,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,canHydratePartialDiff:ay(e,this.options.loadDiffFiles!=null)});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=a}validateComputedHeight(e=this.getLayoutDiff()){if(this.fileContainer==null||e==null)return;let t=this.fileContainer.getBoundingClientRect();t.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:e.name,elementHeight:t.height,computedHeight:this.height})}render({fileContainer:e,fileDiff:t,forceRender:n=!1,lineAnnotations:r,...i}={}){let a=mg(i,`VirtualizedFileDiff.render`),o=a!=null,s=a?.oldFile,c=a?.newFile,l=o&&(!sy(s,this.deletionFile)||!sy(c,this.additionFile)),u=t??this.fileDiff;t==null&&o&&(l||this.fileDiff==null)&&(u=d_(a.oldFile,a.newFile,this.options.parseDiffOptions));let{forceRenderOverride:d,isSetup:f}=this;this.forceRenderOverride=void 0;let p=u!=null&&!Y(this.fileDiff,u),m=p||l;if(e=this.getOrCreateFileContainer(e),u==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;p&&this.updateExternalDiff(u,r);let{pendingRenderDiff:h,layoutDiffChanged:g,renderedDiffChanged:_,annotationsChanged:v}=this.pendingRender!=null&&this.pendingRender.latestDiff===(this.getLatestDiff(u)??u)?{pendingRenderDiff:this.pendingRender.diff,layoutDiffChanged:!1,renderedDiffChanged:!1,annotationsChanged:this.syncLineAnnotations(r)}:this.updatePendingRender(u,r);if(g&&this.resetLayoutCache({includeEstimatedHeights:!0}),f)this.top??=this.getVirtualizedTop(),this.layoutDirty&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.computeApproximateSize(!1,h));else{this.computeApproximateSize(!1,h);let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode()&&(!m||!f))return a!=null&&(this.deletionFile=s,this.additionFile=c),p&&this.clearReusableHeader(),this.renderPlaceholder(this.height);let y=this.virtualizer.getWindowSpecs(),b=this.top??0,x=this.computeRenderRangeFromWindow(h,b,y);return super.render({fileDiff:u,fileContainer:e,renderRange:x,lineAnnotations:r,forceRender:(d??n)||v||_||p,...a,...i})}finalizeRender(){if(!Y(this.getRenderedDiff(),this.pendingRender?.diff))throw Error(`VirtualizedFileDiff.render: rendered a different diff than its prepared layout`);this.pendingRender=void 0,this.isSimpleMode()&&this.getSimpleVirtualizer()?.requestHeightReconcile(this)}updatePendingRender(e,t){let n=this.getLatestDiff(e)??e,r=this.getRenderedDiff(),{pendingRender:i}=this,a=i?.diff??r,o=this.hunksRenderer.getDiffForNextRender(n);return this.pendingRender={latestDiff:n,diff:o},{pendingRenderDiff:o,annotationsChanged:this.syncLineAnnotations(t),layoutDiffChanged:!Y(a,o),renderedDiffChanged:!Y(r,o)}}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}shouldGuardRebuildScroll(){return!1}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}getAdvancedVirtualizer(){return this.virtualizer.type===`advanced`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return oy(this.options.hunkSeparators)}approximateLayoutCheckpoints(e){if(!this.layoutDirty&&this.cache.checkpoints.length>0||e.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsedContextThreshold:r=1}=this.options,i=e.hunks.length-1,a=ay(e,this.options.loadDiffFiles!=null),o=this.getDiffStyle(),s=this.getHunkSeparatorType(),c=n?!0:this.hunksRenderer.getExpandedHunksMap(),l=Zv(this.cache.heightDeltas),u=Df(this.metrics,t)+this.cache.fileAnnotationHeight,d=0,f=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=d,o=d+e,s=ey(a);for(;s<o;){let e=s-a,r=u+(e>0?n:0)+e*this.metrics.lineHeight+ty(i,e)*this.metrics.lineHeight+Qv(l,t,t+e);this.cache.checkpoints.push({renderedLineIndex:s,lineIndex:t+e,top:r}),s+=Kv}u+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+Qv(l,t,t+e)+r,d=o};for(let t=0;t<e.hunks.length;t++){let n=e.hunks[t];if(n==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let l=Mf({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:c,hunkIndex:t,collapsedContextThreshold:r}),u=l.collapsedLines>0?Hf({type:s,metrics:this.metrics,hunkIndex:t,hunkSpecs:n.hunkSpecs})?.totalHeight??0:0;f({rowCount:l.fromStart,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.rangeSize});let d=u;f({rowCount:l.fromEnd,startLineIndex:(o===`split`?n.splitLineStart:n.unifiedLineStart)-l.fromEnd,preSeparatorHeight:d}),l.fromEnd>0&&(d=0);let p=t===i?Ff({fileDiff:e,hunkIndex:t,expandedHunks:c,collapsedContextThreshold:r,errorPrefix:`VirtualizedFileDiff`}):void 0,m=p!=null&&p.collapsedLines>0||t===i&&a?Uf({type:s,metrics:this.metrics})?.totalHeight??0:0,h=p==null?0:p.fromStart+p.fromEnd,g=o===`split`?n.splitLineCount:n.unifiedLineCount,_=o===`split`?n.splitLineStart:n.unifiedLineStart;f({rowCount:g,startLineIndex:_,preSeparatorHeight:d,postSeparatorHeight:h===0?m:0,metadataOffsets:ny({diffStyle:o,hunk:n,rowCount:g})}),p!=null&&h>0&&f({rowCount:h,startLineIndex:_+g,postSeparatorHeight:m})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=Mf({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=Ff({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}getLayoutLineCount(e,t){let n=this.getExpandedLineCount(e,t),r=t===`split`?e.splitLineCount:e.unifiedLineCount;return Math.max(n,r,e.additionLines.length,e.deletionLines.length,this.cache.totalLines)}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=ay(e,this.options.loadDiffFiles!=null),f=this.height,p=this.getLayoutLineCount(e,l),m=Df(this.metrics,i),h=e.hunks.length>0?kf(this.metrics):0,{fileAnnotationHeight:g}=this.cache,_=m+g,v=Math.max(0,f-m-g-h),y=this.hasFileAnnotations(e),b=t+m,x=g>0&&y&&b<r&&b+g>n;if(t<n-f||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h};if(p<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(e),p=this.getLayoutLineCount(e,l);let S=Math.ceil(Math.max(r-n,0)/c),C=Math.ceil(S/s)*s+s,w=C/s,T=w,E=[],ee=(n+r)/2,D=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-C*c*2),s),O=t+(D?.top??_),te=D?.renderedLineIndex??0,ne,k,re;if(Wf({diff:e,diffStyle:l,startingLine:D?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:i,hunk:a,collapsedBefore:o,collapsedAfter:c,deletionLine:f,additionLine:p})=>{let m=p==null?f.splitLineIndex:p.splitLineIndex,h=p==null?f.unifiedLineIndex:p.unifiedLineIndex,g=(p?.noEOFCR??!1)||(f?.noEOFCR??!1),v=i===e.hunks.length-1&&a!=null&&(l===`split`?m===a.splitLineStart+a.splitLineCount-1:h===a.unifiedLineStart+a.unifiedLineCount-1),y=(o>0?Hf({type:u,metrics:this.metrics,hunkIndex:i,hunkSpecs:a?.hunkSpecs}):void 0)?.totalHeight??0;O+=y;let b=te%s===0,x=Math.floor(te/s);if(b&&(E[x]=O-(t+_+y),re!=null)){if(re<=0)return!0;re--}let S=this.getLineHeight(l===`split`?m:h,g);if(O>n-S&&O<r&&(ne??=x),k==null&&O+S>ee&&(k=x),re==null&&O>=r&&b&&(re=T),te++,O+=S,c>0||v&&d){let e=Uf({type:u,metrics:this.metrics});e!=null&&(O<r&&O+e.totalHeight>n&&(ne??=x),k==null&&O+e.totalHeight>ee&&(k=x),O+=e.totalHeight)}return!1}}),ne==null){if(x)ne=0,k=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:f-m-h}}k??=ne;let ie=Math.round(k-w/2),ae=Math.max(0,Math.ceil(p/s)-w),oe=Math.max(0,Math.min(ie,ae)),se=oe*s,ce=ie<0?C+ie*s:C,le=E[oe]??0,ue=se===0?0:g+le,de=oe+ce/s,fe=de<E.length?v-E[de]:v-(O-t-_);return{startingLine:se,totalLines:ce,bufferBefore:ue,bufferAfter:Math.max(0,fe)}}};function Xv(e){let t;for(let n of e){if(n==null)continue;let e=n.children[1];if(e instanceof HTMLElement)for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===_m&&(t=Math.max(t??0,n.getBoundingClientRect().height))}return t}function Zv(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function Qv({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=$v(e,n);return(t[$v(e,r)]??0)-(t[i]??0)}function $v(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function ey(e){return Math.ceil(e/Kv)*Kv}function ty(e,t){let n=0;for(let r of e)r<t&&n++;return n}function ny({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function ry(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function iy(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||!!e.loadDiffFiles!=!!t.loadDiffFiles||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function ay(e,t){return e.isPartial&&t&&(e.type===`change`||e.type===`rename-changed`)}function oy(e){return typeof e==`function`?`custom`:e??`line-info`}function sy(e,t){return e==null||t==null?e==null&&t==null:wf(e,t)}function cy(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}var ly=`theme.disableLineNumbers.overflow.themeType.disableFileHeader.disableVirtualizationBuffers.preferredHighlighter.useCSSClasses.useTokenTransformer.tokenizeMaxLineLength.tokenizeMaxLength.unsafeCSS.diffStyle.diffIndicators.disableBackground.expandUnchanged.loadDiffFiles.collapsedContextThreshold.lineDiffType.maxLineDiffLength.expansionLineCount.lineHoverHighlight.enableTokenInteractionsOnWhitespace.enableGutterUtility.__debugPointerEvents.enableLineSelection.controlledSelection.disableErrorHandling`.split(`.`),uy=[`theme`,`disableLineNumbers`,`overflow`,`themeType`,`disableFileHeader`,`disableVirtualizationBuffers`,`preferredHighlighter`,`useCSSClasses`,`useTokenTransformer`,`tokenizeMaxLineLength`,`tokenizeMaxLength`,`unsafeCSS`,`lineHoverHighlight`,`enableTokenInteractionsOnWhitespace`,`enableGutterUtility`,`__debugPointerEvents`,`enableLineSelection`,`controlledSelection`,`disableErrorHandling`],dy=[`renderCustomHeader`,`renderHeaderPrefix`,`renderHeaderFilenameSuffix`,`renderHeaderMetadata`,`renderAnnotation`,`renderGutterUtility`,`onPostRender`,`onGutterUtilityClick`,`onLineClick`,`onLineNumberClick`,`onLineEnter`,`onLineLeave`,`onTokenClick`,`onTokenEnter`,`onTokenLeave`],fy=[`onLineSelected`,`onLineSelectionStart`,`onLineSelectionChange`,`onLineSelectionEnd`],py=Symbol(`CodeView.itemOptionsState`);function my(e,t){Object.defineProperty(e,py,{configurable:!1,enumerable:!1,value:t})}function hy(e){return e[py]}function gy(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get(){return n(this)}})}var _y=120,vy=1,yy=`--diffs-overflow-override`,by=12e6,xy=1e6,Sy=2e6,Cy=1e7,wy=11e6;function Ty(e){if(e==null)throw Error(`CodeView: createEditor is required for items with edit: true`)}var Ey=(()=>{let{navigator:e}=globalThis,t=e.userAgent,n=/iP(?:hone|ad|od)/.test(t),r=e.platform===`MacIntel`&&e.maxTouchPoints>1;return(n||r)&&/AppleWebKit/.test(t)&&/Safari/.test(t)&&!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(t)})(),Dy=class e{static __STOP=!1;static __lastScrollPosition=0;type=`advanced`;config={overscrollSize:200,intersectionObserverMargin:0,resizeDebugging:!1};items=[];idToItem=new Map;selectedLines=null;itemEditors=new Map;attachedEditors=new Set;instanceToItem=new Map;layoutDirtyIndex;pendingLayoutReset;renderOptionsRevision=0;slotCoordinator;slotSnapshot;scrollListeners=new Set;scrollHeight=0;containerHeight=-1;scrollTop=0;scrollPageOffset=0;scrollDirty=!0;scrollInteractionFixTimer;pointerEventsDisabled=!1;codeOverflowFix=!1;height=0;heightDirty=!0;windowSpecs={top:0,bottom:0};renderState={scrollTop:-1,firstIndex:-1,lastIndex:-1,stickyHeight:0,stickyTop:-1,stickyBottom:-1};itemMetricsCache=xe;fileOptionsPrototype;diffOptionsPrototype;pendingScrollTarget;pendingLayoutAnchor;shouldFixContainerFocus=!1;scrollAnimation;root;resizeObserver;container=document.createElement(`div`);stickyContainer=document.createElement(`div`);stickyOffset=document.createElement(`div`);header={element:void 0,render:void 0,height:0};footer={element:void 0,render:void 0,height:0};elementPool=[];elementPoolVersion=0;elementPoolTracker=new WeakMap;pendingElementPool=[];options;workerManager;isReadySubscription;pendingHighlighterTheme;isContainerManaged;constructor(e={theme:A},t,n=!1){this.options=e,this.computeMetricsCache(e.itemMetrics),this.fileOptionsPrototype=this.createFileOptionsPrototype(),this.diffOptionsPrototype=this.createDiffOptionsPrototype(),this.workerManager=t,this.isContainerManaged=n,this.stickyOffset.style.contain=`layout size`,this.stickyContainer.style.position=`sticky`,this.stickyContainer.style.width=`100%`,this.stickyContainer.style.contain=`layout style inline-size`,this.stickyContainer.style.isolation=`isolate`,this.stickyContainer.style.display=`flex`,this.stickyContainer.style.flexDirection=`column`}getLayout(){return this.options.layout??Se}getItemTopOffset(){return this.getLayout().paddingTop+this.header.height}computeMetricsCache(e){return this.itemMetricsCache={hunkLineCount:e?.hunkLineCount??xe.hunkLineCount,lineHeight:e?.lineHeight??xe.lineHeight,diffHeaderHeight:e?.diffHeaderHeight??xe.diffHeaderHeight,hunkSeparatorHeight:e?.hunkSeparatorHeight,spacing:e?.spacing??xe.spacing,paddingTop:e?.paddingTop,paddingBottom:e?.paddingBottom},this.itemMetricsCache}getSmoothScrollSettings(){return this.options.smoothScrollSettings??Ce}shouldDisablePointerEvents(){return this.options.pointerEventsOnScroll!==!0}shouldValidateItemHeights(){return ie&&this.options.__devOnlyValidateItemHeights===!0}validateRenderedItemHeight(e){if(!this.shouldValidateItemHeights()||e.element==null)return;let t=e.instance.getAdvancedStickySpecs();if(t==null)return;let n=t.height,r=e.element.getBoundingClientRect().height;n!==r&&console.error(`CodeView: reconciled item height does not match DOM height`,{id:e.item.id,type:e.type,index:e.index,version:e.version,expectedHeight:n,actualHeight:r,delta:r-n,stickyTopOffset:t.topOffset,virtualizedHeight:e.instance.getVirtualizedHeight(),top:e.top,scrollTop:this.getScrollTop(),windowSpecs:{...this.windowSpecs},element:e.element,instance:e.instance})}validateStickyContainerHeight(){if(!this.shouldValidateItemHeights())return;let{firstIndex:e,lastIndex:t,stickyHeight:n,stickyTop:r,stickyBottom:i}=this.renderState;if(e===-1||t===-1)return;let a=this.stickyContainer.getBoundingClientRect().height;Math.abs(a-n)<vy||console.error(`CodeView: sticky container height does not match computed layout`,{computedStickyHeight:n,actualStickyHeight:a,delta:a-n,stickyTop:r,stickyBottom:i,firstIndex:e,lastIndex:t,firstStickySpecs:this.items[e]?.instance.getAdvancedStickySpecs(),lastStickySpecs:this.items[t]?.instance.getAdvancedStickySpecs(),scrollTop:this.getScrollTop(),scrollPageOffset:this.scrollPageOffset,windowSpecs:{...this.windowSpecs},stickyContainer:this.stickyContainer})}clearScrollInteractionTimer(){this.scrollInteractionFixTimer!=null&&(clearTimeout(this.scrollInteractionFixTimer),this.scrollInteractionFixTimer=void 0)}suspendScrollInteractions(){this.clearScrollInteractionTimer(),this.shouldDisablePointerEvents()&&!this.pointerEventsDisabled&&(this.stickyContainer.style.pointerEvents=`none`,this.pointerEventsDisabled=!0),Ey&&!this.codeOverflowFix&&(this.stickyContainer.style.setProperty(yy,`hidden`),this.codeOverflowFix=!0),this.scrollInteractionFixTimer=setTimeout(this.restoreScrollInteractions,_y)}restoreScrollInteractions=()=>{this.clearScrollInteractionTimer(),this.pointerEventsDisabled&&=(this.stickyContainer.style.removeProperty(`pointer-events`),!1),this.codeOverflowFix&&=(this.stickyContainer.style.setProperty(yy,`auto`),!1)};syncLayout(){let{gap:e,paddingBottom:t,paddingTop:n}=this.getLayout();this.stickyContainer.style.gap=`${e}px`,this.container?.style.setProperty(`margin-top`,`${n}px`),this.container?.style.setProperty(`margin-bottom`,`${t}px`)}reconcileHeaderFooterHosts(){let e=this.reconcileHost(`header`),t=this.reconcileHost(`footer`);return e||t}reconcileHost(e){let{root:t,container:n}=this;if(t==null||n==null)return!1;let r=e===`header`?this.header:this.footer,i=e===`header`?this.options.renderCodeViewHeader:this.options.renderCodeViewFooter;if(i==null)return r.element!=null&&(this.resizeObserver?.unobserve(r.element),r.element.remove(),r.element=void 0,r.render=void 0,this.setHostHeight(r,0),!1);if(r.element!=null&&i===r.render)return!1;let a=r.element??fm(e,n,this.resizeObserver);r.element=a;let o=i();return o==null?!this.isContainerManaged&&a.children.length>0&&(a.textContent=``):a.replaceChildren(o),r.render=i,!0}setHostHeight(e,t){e.height!==t&&(e.height=t,this.scrollDirty=!0)}measureMountedHosts(){this.header.element!=null&&this.setHostHeight(this.header,this.header.element.getBoundingClientRect().height),this.footer.element!=null&&this.setHostHeight(this.footer,this.footer.element.getBoundingClientRect().height)}setup(t){if(this.root!=null)throw Error(`CodeView.setup: already setup`);this.workerManager?.subscribeToThemeChanges(this),this.root=t,this.root.style.overflowAnchor=`none`,this.root.hasAttribute(`tabindex`)||(this.root.tabIndex=-1),this.container??=document.createElement(`div`),this.container.style.contain=`layout style`,this.syncLayout(),this.container.appendChild(this.stickyOffset),this.container.appendChild(this.stickyContainer),this.root.appendChild(this.container),this.scrollDirty=!0,this.heightDirty=!0,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.stickyContainer),this.root.addEventListener(`scroll`,this.handleScroll,{passive:!0}),this.root.addEventListener(`wheel`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`touchstart`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`pointerdown`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`keydown`,this.clearPendingScroll,{passive:!0}),this.resizeObserver.observe(this.root),this.render(!0),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,this.scrollTo({type:`position`,position:e.__lastScrollPosition,behavior:`instant`})):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)}}reset(){lm(this.computeRenderRangeAndEmit),this.clearReadySubscription(),this.restoreScrollInteractions(),this.cleanAllRenderedItems();let{items:e}=this,t=[...this.itemEditors.values()].map(e=>{let t=this.idToItem.get(e.state.id);return t!=null&&(e.state.removedItem=t.item),e});this.itemEditors.clear(),this.attachedEditors.clear(),this.selectedLines=null,this.items=[],this.idToItem.clear(),this.instanceToItem.clear();let n=!1,r;for(let e of t)try{e.editor.cleanUp(`discard`)}catch(e){n||(n=!0,r=e)}for(let t of e)try{t.instance.cleanUp()}catch(e){n||(n=!0,r=e)}if(this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,this.stickyContainer.textContent=``,this.stickyOffset.style.height=``,this.container?.style.removeProperty(`height`),this.containerHeight=-1,this.windowSpecs={top:0,bottom:0},this.pendingLayoutAnchor=void 0,this.shouldFixContainerFocus=!1,this.height=0,this.scrollTop=0,this.scrollPageOffset=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.resetRenderState(),this.isContainerManaged||this.flushSlotCoordinator(),n)throw r}cleanUp(){let e=!1,t;try{this.reset()}catch(n){e=!0,t=n}if(this.clearElementPool(),this.restoreScrollInteractions(),this.workerManager?.unsubscribeToThemeChanges(this),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleScroll),this.root?.removeEventListener(`wheel`,this.clearPendingScroll),this.root?.removeEventListener(`touchstart`,this.clearPendingScroll),this.root?.removeEventListener(`pointerdown`,this.clearPendingScroll),this.root?.removeEventListener(`keydown`,this.clearPendingScroll),this.root?.style.removeProperty(`overflow-anchor`),this.container?.remove(),this.stickyOffset.remove(),this.stickyContainer.remove(),this.stickyContainer.textContent=``,this.header.element?.remove(),this.header.element=void 0,this.header.render=void 0,this.header.height=0,this.footer.element?.remove(),this.footer.element=void 0,this.footer.render=void 0,this.footer.height=0,this.root=void 0,this.container=void 0,e)throw t}cleanAllRenderedItems(){if(this.renderState.firstIndex!==-1)for(let e=this.renderState.firstIndex;e<=this.renderState.lastIndex;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.cleanAllRenderedItems: Item does not exist at index: ${e}`);this.releaseRenderedItem(t)}}primeScrollTarget(e){e.type!==`position`&&this.idToItem.get(e.id)?.instance.primeHighlightCache()}getElementPoolLimit(){let e=this.getHeight()+this.config.overscrollSize*2,{diffHeaderHeight:t}=this.itemMetricsCache;return Math.max(8,Math.ceil(e/Math.max(t,10))+1)*(this.isContainerManaged?2:1)}acquireElement(){this.promotePendingPooledElements();let e=this.elementPool.pop();for(;e!=null&&!this.isElementPoolGenerationCurrent(e);)e=this.elementPool.pop();return e??=document.createElement(re),this.markElementPoolGenerationCurrent(e),e}releaseRenderedItem(e){let{element:t}=e;t!=null&&this.renderedItemOwnsFocus(t)&&(this.shouldFixContainerFocus=!0),e.instance.cleanUp(!0),this.attachedEditors.delete(e.item.id),e.element=void 0,t!=null&&(t.remove(),this.cleanElement(t),this.queueElementForPool(t))}renderedItemOwnsFocus(e){let{activeElement:t}=document;return t===e||e.contains(t)||e.shadowRoot?.activeElement!=null}fixContainerFocus(){this.shouldFixContainerFocus&&(this.shouldFixContainerFocus=!1,this.root?.focus({preventScroll:!0}))}cleanElement(e){let{shadowRoot:t}=e;if(t!=null)for(let e of Array.from(t.children))My(e)||e.remove();this.isContainerManaged||e.replaceChildren()}queueElementForPool(e){let t=this.getElementPoolLimit();!this.isElementPoolGenerationCurrent(e)||this.getElementPoolSize()>=t||(this.isElementClean(e)?this.elementPool.push(e):this.pendingElementPool.push(e))}promotePendingPooledElements(){if(this.pendingElementPool.length===0)return;let{pendingElementPool:e}=this;this.pendingElementPool=[];let t=this.getElementPoolLimit();for(let n of e)this.isElementPoolGenerationCurrent(n)&&this.isElementClean(n)&&this.elementPool.length<t?this.elementPool.push(n):this.isElementPoolGenerationCurrent(n)&&this.getElementPoolSize()<t&&this.pendingElementPool.push(n)}isElementClean(e){return e.childNodes.length===0}getElementPoolSize(){return this.elementPool.length+this.pendingElementPool.length}clearElementPool(){this.elementPool.length=0,this.pendingElementPool.length=0}invalidateElementPool(){this.elementPoolVersion++,this.clearElementPool()}markElementPoolGenerationCurrent(e){this.elementPoolTracker.set(e,this.elementPoolVersion)}isElementPoolGenerationCurrent(e){return this.elementPoolTracker.get(e)===this.elementPoolVersion}resolveEffectiveScrollBehavior(e,t){return hm()?`instant`:e.behavior===`smooth-auto`?Math.abs(t-this.getScrollTop())<=this.getHeight()*10?`smooth`:`instant`:e.behavior??`instant`}scrollTo(e){if(this.root==null)return;let t=this.normalizeScrollTarget(e);if(t==null)return;let n=this.resolveScrollTargetTop(t);n!=null&&(this.primeScrollTarget(t),this.resolveEffectiveScrollBehavior(t,n)===`smooth`?this.scrollAnimation??={position:this.getScrollTop(),velocity:0,lastTimestamp:performance.now()}:this.scrollAnimation=void 0,this.suspendScrollInteractions(),this.pendingLayoutAnchor=void 0,this.pendingScrollTarget=t,this.render())}setSelectedLines(e,t){this.applySelectedLines(e,t)}getSelectedLines(){return this.selectedLines}clearSelectedLines(e){this.applySelectedLines(null,e)}getItem(e){return this.idToItem.get(e)?.item}getEditor(e){return this.itemEditors.get(e)?.editor}updateItem(e){let t=this.idToItem.get(e.id);return t==null?(console.error(`CodeView.updateItem: unknown item id "${e.id}"`),!1):this.syncItemRecord(t,e)?(this.markItemLayoutDirty(t),this.scrollDirty=!0,this.render(),this.syncItemEditors(),this.syncSelection(),!0):!1}updateItemId(e,t){if(e===t)return!0;let n=this.idToItem.get(e);if(n==null)return console.error(`CodeView.updateItemId: unknown item id "${e}"`),!1;if(this.idToItem.has(t))return console.error(`CodeView.updateItemId: duplicate item id "${t}"`),!1;this.idToItem.delete(e),n.item.id=t,this.idToItem.set(t,n),this.updateItemOptionsId(n.instance.options,t),this.selectedLines?.id===e&&(this.selectedLines={...this.selectedLines,id:t},this.options.onSelectedLinesChange?.(this.selectedLines));let r=this.itemEditors.get(e);return r!=null&&(this.itemEditors.delete(e),this.itemEditors.set(t,r),this.attachedEditors.delete(e)&&this.attachedEditors.add(t)),this.renamePendingScrollTarget(e,t),this.renamePendingLayoutAnchor(e,t),this.render(),!0}addItem(e){this.addItems([e])}addItems(e){this.appendItemsInternal(e),this.syncItemEditors(),this.syncSelection()}removeItem(e){let t=this.idToItem.get(e);if(t==null)return console.error(`CodeView.removeItem: unknown item id "${e}"`),!1;let n=[];for(let e of this.items)e!==t&&n.push(e.item);return this.setItems(n),!0}setItems(e){let t;this.items.length===0?this.appendItemsInternal(e):this.tryAppendItems(e)||(t=this.reconcileItems(e));try{this.syncItemEditors(t)}finally{for(let e of t?.values()??[])e.instance.cleanUp()}this.syncSelection()}appendItemsInternal(e,t=!0){if(e.length===0)return;let n=this.getLayout(),r=this.items.length===0?0:this.scrollHeight+n.gap,i=r;for(let t=0;t<e.length;t++){let i=e[t];if(i==null)throw Error(`CodeView.appendItemsInternal: missing input item`);if(this.idToItem.has(i.id))throw Error(`CodeView.addItem: duplicate id "${i.id}"`);let a=this.createItem(i,this.items.length,r);this.items.push(a),this.idToItem.set(a.item.id,a),this.instanceToItem.set(a.instance,a),a.height=Oy(a),r+=a.height+n.gap}this.scrollHeight=r-n.gap,this.scrollDirty=!0,t&&(this.canSkipRenderForAppend(i)?this.syncContainerHeight():this.render())}canSkipRenderForAppend(e){return this.container!=null&&this.renderState.firstIndex!==-1&&this.pendingScrollTarget==null&&this.scrollAnimation==null&&this.layoutDirtyIndex==null&&e>this.windowSpecs.bottom}onThemeChange(){this.invalidateElementPool()}setOptions(e){if(e==null)return;this.capturePendingLayoutAnchor();let{options:t}=this,n=this.getLayout(),{itemMetricsCache:r}=this;ky(t,e)&&this.invalidateElementPool(),this.options=e;let i=this.computeMetricsCache(e.itemMetrics),a=!rm(r,i),o=!rm(n,this.getLayout());o&&this.syncLayout();let s=a||Ay(t,e);if(s){let n=this.pendingLayoutReset;this.pendingLayoutReset={metrics:a?i:n?.metrics,resetFileLayoutCache:!0,resetDiffLayoutCache:!0,includeEstimatedDiffHeights:n?.includeEstimatedDiffHeights===!0||a||jy(t,e)}}(o||s)&&(this.markLayoutDirtyFromIndex(0),this.scrollDirty=!0),im(t,e)||this.renderOptionsRevision++,this.syncItemEditors();let c=t.renderCodeViewHeader!==e.renderCodeViewHeader||t.renderCodeViewFooter!==e.renderCodeViewFooter;!this.isContainerManaged&&(this.items.length>0||c)&&this.render()}capturePendingLayoutAnchor(e=this.idToItem){this.root!=null&&this.items.length!==0&&this.pendingScrollTarget==null&&(this.pendingLayoutAnchor=this.getScrollAnchor(this.getScrollTop(),e))}render(t=!1){e.__STOP||(t?(lm(this.computeRenderRangeAndEmit),this.computeRenderRangeAndEmit()):cm(this.computeRenderRangeAndEmit))}isReady(){let{workerManager:e}=this;return e==null||e.getStats().workersFailed?this.isSharedHighlighterReady():e.isInitialized()?(this.clearReadySubscription(),!0):(this.isReadySubscription??=e.subscribeToStatChanges(e=>{(e.managerState===`initialized`||e.workersFailed)&&(this.clearReadySubscription(),this.render(!0))}),e.getStats().managerState===`waiting`&&e.initialize().catch(()=>{}),!1)}clearReadySubscription(){this.isReadySubscription!=null&&(this.isReadySubscription(),this.isReadySubscription=void 0,this.pendingHighlighterTheme=void 0)}isSharedHighlighterReady(){let e=this.workerManager?.getFileRenderOptions().theme??this.options.theme??A;return bd()&&qu(e)?(this.clearReadySubscription(),!0):(wd(this.pendingHighlighterTheme,e)||this.clearReadySubscription(),this.isReadySubscription??=(()=>{this.pendingHighlighterTheme=e;let t=!1;return Cd({themes:Be(e),langs:[],preferredHighlighter:this.options.preferredHighlighter}).then(()=>{t||(this.clearReadySubscription(),this.render(!0))},e=>{t||(this.clearReadySubscription(),console.error(e))}),()=>{t=!0}})(),!1)}instanceChanged(e,t){let n=this.instanceToItem.get(e);if(n==null)throw Error(`CodeView.instanceChanged: An instance has changed that is not registered`);t&&this.markItemLayoutDirty(n),this.render()}getWindowSpecs(){return this.windowSpecs}getContainerElement(){return this.root}getHeaderElement(){return this.header.element}getFooterElement(){return this.footer.element}getRenderedItems(){let{firstIndex:e,lastIndex:t}=this.renderState;if(e===-1||t===-1||t<e)return[];let n=[];for(let r=e;r<=t;r++){let e=this.items[r];e?.element!=null&&(e.type===`diff`?n.push({id:e.item.id,type:`diff`,item:e.item,version:e.version,element:e.element,instance:e.instance}):n.push({id:e.item.id,type:`file`,item:e.item,version:e.version,element:e.element,instance:e.instance}))}return n}setSlotCoordinator(e){return e!==this.slotCoordinator&&(this.slotCoordinator=e,this.slotSnapshot=void 0,!0)}getSlotSnapshot(e){return this.buildSlotSnapshot(e)}buildSlotSnapshot(e){let t=Ry(this.getRenderedItems(),e),{element:n}=this.header,{element:r}=this.footer;if(t!=null||n!=null||r!=null)return{items:t,header:n,footer:r}}subscribeToScroll(e){return this.scrollListeners.add(e),()=>{this.scrollListeners.delete(e)}}getLocalTopForInstance(e){let t=this.instanceToItem.get(e);if(t==null)throw Error(`CodeView.getLocalTopForInstance: unknown virtualized instance`);return t.top}getTopForItem(e){let t=this.idToItem.get(e);if(t!=null)return t.top+this.getItemTopOffset()}createItem(e,t,n){let{itemMetricsCache:r}=this;if(e.type===`diff`){let i=new Yv(this.createDiffOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`diff`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}let i=new cg(this.createFileOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`file`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}applySelectedLines(e,t){let{selectedLines:n}=this;e==null&&n==null||e!=null&&n?.id===e.id&&dm(n.range,e.range)||(n!=null&&n.id!==e?.id&&this.idToItem.get(n.id)?.instance.setSelectedLines(null,{notify:!1}),this.selectedLines=e,this.idToItem.get(e?.id??``)?.instance.setSelectedLines(e?.range??null,t))}syncSelection(){if(this.selectedLines==null)return;let e=this.idToItem.get(this.selectedLines.id);if(e==null){this.selectedLines=null,this.options.onSelectedLinesChange?.(null);return}e.instance.setSelectedLines(this.selectedLines.range,{notify:!1})}isItemInEditMode(e){return e.item.edit===!0&&e.item.collapsed!==!0}attachItemEditor(e){let{id:t}=e.item,{createEditor:n}=this.options;if(e.element==null||this.attachedEditors.has(t)||!this.isItemInEditMode(e))return;let r=this.itemEditors.get(t),i;try{if(r==null&&e.type===`diff`&&!e.instance.__canAttachEditor()){e.instance.__prepareForEditing();return}if(r==null){Ty(n);let r=hy(e.instance.options);if(r==null)throw Error(`CodeView.attachItemEditor: instance options are missing their state`);let a=e=>{let t=this.idToItem.get(r.id);t!=null&&this.options.onItemEditChange?.(e,t.item)},o=this.options.getEditStateKey?.(e.item);if(e.type===`diff`){let s=n(`file-diff`,{onChange:a},o);i=s,this.itemEditors.set(t,{editor:s,state:r,dispose:s.edit(e.instance)})}else{let s=n(`file`,{onChange:a},o);i=s,this.itemEditors.set(t,{editor:s,state:r,dispose:s.edit(e.instance)})}}else r.dispose=(e.type,r.editor.edit(e.instance));this.attachedEditors.add(t)}catch(t){throw i?.cleanUp(),this.releaseRenderedItem(e),t}}syncItemEditors(e){if(this.itemEditors.size===0)return;let t=[];for(let[n,r]of this.itemEditors){let i=this.idToItem.get(n),a=e?.get(n);if(a==null&&i!=null){let{edit:e=!1,collapsed:t=!1}=i.item;if(e){t&&this.attachedEditors.delete(n)&&r.editor.cleanUp(`recycle`);continue}}else a!=null&&(r.state.removedItem=a.item);this.itemEditors.delete(n),this.attachedEditors.delete(n),t.push(r)}if(t.length===0)return;let n=!1,r;for(let e of t){try{e.dispose()}catch(e){n||(n=!0,r=e)}let t=this.idToItem.get(e.state.id);t!=null&&this.markItemLayoutDirty(t)}if(this.render(),n)throw r}requireItemFromState(e){let t=this.idToItem.get(e.id)?.item??e.removedItem;if(t==null)throw Error(`CodeView.onItemEditComplete: unknown item "${e.id}"`);return t}completeFileItemEdit(e,t){let n=this.requireItemFromState(e);if(n.type!==`file`)throw Error(`CodeView.onItemEditComplete: item "${e.id}" is not a file item`);let r={...n,file:t.file,annotations:t.lineAnnotations,edit:!1,version:(n.version??0)+1};return(this.options.onItemEditComplete?.(t,n,r)??`reject`)===`reject`?`reject`:(this.idToItem.has(n.id)&&this.updateItem(r),`accept`)}completeDiffItemEdit(e,t){let n=this.requireItemFromState(e);if(n.type!==`diff`)throw Error(`CodeView.onItemEditComplete: item "${e.id}" is not a diff item`);let r={...n,fileDiff:t.fileDiff,annotations:t.lineAnnotations,edit:!1,version:(n.version??0)+1};return(this.options.onItemEditComplete?.(t,n,r)??`reject`)===`reject`?`reject`:(this.idToItem.has(n.id)&&this.updateItem(r),`accept`)}renamePendingScrollTarget(e,t){let{pendingScrollTarget:n}=this;n!=null&&n.type!==`position`&&n.id===e&&(this.pendingScrollTarget={...n,id:t})}renamePendingLayoutAnchor(e,t){this.pendingLayoutAnchor?.id===e&&(this.pendingLayoutAnchor.id=t)}createFileOptionsPrototype(){let e={};for(let t of uy)gy(e,t,()=>this.options[t]);gy(e,`stickyHeader`,()=>this.options.stickyHeaders),gy(e,`collapsed`,e=>{let t=hy(e);if(t!=null)return this.getItemOptions(t,`file`)?.item.collapsed}),gy(e,`onEditComplete`,e=>{if(this.options.onItemEditComplete==null)return;let t=hy(e);if(t!=null)return e=>this.completeFileItemEdit(t,e)});for(let t of dy)this.defineItemSharedCallback(e,`file`,t);for(let t of fy)this.defineItemSelectionCallback(e,`file`,t);return e}createDiffOptionsPrototype(){let e={};for(let t of ly)gy(e,t,()=>this.options[t]);gy(e,`stickyHeader`,()=>this.options.stickyHeaders),gy(e,`hunkSeparators`,()=>this.options.hunkSeparators),gy(e,`collapsed`,e=>{let t=hy(e);if(t!=null)return this.getItemOptions(t,`diff`)?.item.collapsed}),gy(e,`onEditComplete`,e=>{if(this.options.onItemEditComplete==null)return;let t=hy(e);if(t!=null)return e=>this.completeDiffItemEdit(t,e)});for(let t of dy)this.defineItemSharedCallback(e,`diff`,t);for(let t of fy)this.defineItemSelectionCallback(e,`diff`,t);return e}createFileOptions(e){let t=Object.create(this.fileOptionsPrototype);return my(t,{id:e}),t}createDiffOptions(e){let t=Object.create(this.diffOptionsPrototype);return my(t,{id:e}),t}updateItemOptionsId(e,t){let n=hy(e);if(n==null)throw Error(`CodeView.updateItemOptionsId: No valid state`);n.id=t}getItemOptions(e,t){let n=this.idToItem.get(e.id);if(n!=null&&n.type===t)return n}defineItemSharedCallback(e,t,n){gy(e,n,e=>{if(this.options[n]==null)return;let r=hy(e);if(r==null)return;let i=r.callbackCache??={},a=i[n];return a??(a=((...e)=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=this.options[n];return a?.(...e,i)}),i[n]=a),a})}defineItemSelectionCallback(e,t,n){gy(e,n,e=>{let r=hy(e);if(r==null)return;let i=r.callbackCache??={},a=i[n];return a??(a=e=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=e==null?null:{id:i.item.id,range:e};this.options.controlledSelection!==!0&&(e!=null||this.selectedLines?.id===i.item.id)&&this.applySelectedLines(a,{notify:!1}),this.options.onSelectedLinesChange?.(a);let o=this.options[n];return o?.(e,i)},i[n]=a),a})}markLayoutDirtyFromIndex(e){this.layoutDirtyIndex=Math.min(this.layoutDirtyIndex??e,e)}markItemLayoutDirty(e){if(this.items[e.index]!==e)throw Error(`CodeView.markItemLayoutDirty: unknown item id "${e.item.id}"`);this.markLayoutDirtyFromIndex(e.index)}tryAppendItems(e){if(e.length<=this.items.length)return!1;for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null||n.item.id!==r.id||n.type!==r.type)return!1}for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null)throw Error(`CodeView.tryAppendItems: append candidate missing prefix item`);this.syncItemRecord(n,r)&&this.markLayoutDirtyFromIndex(t)}return this.appendItemsInternal(e.slice(this.items.length),!1),this.scrollDirty=!0,this.render(),!0}reconcileItems(e){let{items:t,idToItem:n}=this,r=new Set(t),i=[],a=new Map,o=new Map,s=new Map,c;for(let s=0;s<e.length;s++){let l=e[s];if(l==null)throw Error(`CodeView.reconcileItems: missing input item`);if(a.has(l.id))throw Error(`CodeView.setItems: duplicate id "${l.id}"`);let u=n.get(l.id),d=u!=null&&u.type===l.type?u:this.createItem(l,s,0);d.index=s,u!=null&&u.type===l.type?(r.delete(u),this.syncItemRecord(d,l)&&(c=Math.min(c??s,s))):c=Math.min(c??s,s),t[s]!==d&&(c=Math.min(c??s,s)),i.push(d),a.set(l.id,d),o.set(d.instance,d)}if(c==null){if(r.size===0)return;c=Math.max(i.length-1,0)}this.capturePendingLayoutAnchor(a);for(let e=0;e<t.length;e++){let n=t[e];if(n==null||!r.has(n))continue;s.set(n.item.id,n),this.releaseRenderedItem(n);let a=Math.max(i.length-1,0);c=Math.min(c??a,a)}return this.items=i,this.idToItem=a,this.instanceToItem=o,this.renderState.firstIndex>=i.length?this.resetRenderState():this.renderState.lastIndex>=i.length&&(this.renderState.lastIndex=i.length-1),this.markLayoutDirtyFromIndex(c),this.scrollDirty=!0,this.render(),s.size>0?s:void 0}syncItemRecord(e,t){if(e.type!==t.type)throw Error(`CodeView.syncItemRecord: type mismatch for id "${t.id}"`);return e.version!==t.version&&(e.item=t,e.version=t.version,e.renderedOptionsRevision=-1,!0)}getMaxScrollTopForHeight(e){let{paddingBottom:t,paddingTop:n}=this.getLayout();return Math.max(n+this.header.height+e+this.footer.height+t-this.getHeight(),0)}getMaxScrollTop(){return this.getMaxScrollTopForHeight(this.getScrollHeight())}shouldRebaseScroll(){return this.getMaxScrollTop()>wy}getPagedScrollHeight(){return this.shouldRebaseScroll()?Math.min(this.getScrollHeight(),by):this.getScrollHeight()}getMaxPagedScrollTop(){return this.getMaxScrollTopForHeight(this.getPagedScrollHeight())}clampPagedScrollTop(e){let t=this.getMaxPagedScrollTop();return Math.max(0,Math.min(e,t))}clampScrollTop(e){let t=this.getMaxScrollTop();return Math.max(0,Math.min(e,t))}getMaxScrollPageOffset(){return Math.max(this.getMaxScrollTop()-this.getMaxPagedScrollTop(),0)}clampScrollPageOffset(e){let t=this.getMaxScrollPageOffset();return Math.max(0,Math.min(e,t))}resolveScrollPageWindow(e,t){let n=gm(this.clampPagedScrollTop(t)),r=this.clampScrollPageOffset(e-n);return n=gm(this.clampPagedScrollTop(e-r)),r=this.clampScrollPageOffset(e-n),{pagedScrollTop:n,scrollPageOffset:r}}resolvePagedScrollPosition(e){if(!this.shouldRebaseScroll())return{pagedScrollTop:this.clampPagedScrollTop(e),scrollPageOffset:0};let t=this.clampScrollPageOffset(this.scrollPageOffset),n=e-t,r=this.getMaxPagedScrollTop(),i=this.getMaxScrollPageOffset(),a=n>wy&&t<i,o=n<xy&&t>0;return n<0||n>r||a||o?this.resolveScrollPageWindow(e,o?Math.min(Cy,r):Sy):{pagedScrollTop:gm(this.clampPagedScrollTop(n)),scrollPageOffset:t}}needsScrollPageUpdate(e){let t=gm(this.clampScrollTop(e)),{scrollPageOffset:n}=this.resolvePagedScrollPosition(t);return n!==this.scrollPageOffset}getPagedLayoutTop(e){return this.shouldRebaseScroll()?Math.max(e-this.scrollPageOffset,0):e}getStickyHeaderOffset(){return this.options.stickyHeaders===!0&&this.options.disableFileHeader!==!0?this.itemMetricsCache.diffHeaderHeight:0}getScrollTargetRect(e){let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return{top:t.top,height:t.height};if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ny(e.range)} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}normalizeScrollTarget(e){if(e.type===`position`||e.align!==`nearest`)return e;let t=this.getScrollTargetRect(e);if(t==null)return;let n=e.offset??0,r=this.getItemTopOffset()+t.top,i=r+t.height,a=this.getScrollTop(),o=a+(e.type===`line`||e.type===`range`?this.getStickyHeaderOffset():0),s=a+this.getHeight();if(!(r-n<=o&&i+n>=s)){if(r-n<o)return{...e,align:`start`};if(i+n>s)return{...e,align:`end`}}}resolveScrollTargetTop(e){if(e.type===`position`){let t=this.clampScrollTop(e.position);return t===e.position?this.clampScrollTop(e.position-this.getStickyHeaderOffset()):t}let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top,t.height,e.align,e.offset));if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ny(e.range)} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}resolveAlignedScrollPosition(e,t,n,r=0,i=0){e+=this.getItemTopOffset();let a=this.getHeight();return n===`center`&&t+r<a?e-(a-t)/2+r:n===`end`?e-(a-t)+r:e-i-r}getLineScrollPosition(e,t){return e.type===`diff`?e.instance.getLinePosition(t.lineNumber,t.side):e.instance.getLinePosition(t.lineNumber)}getRangeScrollPosition(e,t){let{range:n}=t,r=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.start,side:n.side}),i=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.end,side:n.endSide??n.side});if(r==null||i==null)return;let a=r.top,o=a+r.height,s=i.top,c=s+i.height,l=Math.min(a,s);return{top:l,height:Math.max(o,c)-l}}computeTargetScrollTopForFrame(e,t){if(this.pendingScrollTarget==null)return e;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null)return e;let{scrollAnimation:r}=this;return r==null?n:this.computeSpringStep(r,n,t).position}computeSpringStep(e,t,n){let r=Math.max(0,n-e.lastTimestamp),{omega:i}=this.getSmoothScrollSettings(),a=Math.exp(-i*r),o=e.position-t,s=e.velocity+i*o;return{position:t+(o+s*r)*a,velocity:(s*(1-i*r)-i*o)*a}}advanceScrollAnimation(e,t){if(this.pendingScrollTarget==null)return;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null){this.pendingScrollTarget=void 0,this.scrollAnimation=void 0;return}let r=this.scrollAnimation;if(r==null)return n;r.position+=t;let{position:i,velocity:a}=this.computeSpringStep(r,n,e);r.lastTimestamp=e,r.position=i,r.velocity=a;let{positionEpsilon:o,velocityEpsilon:s}=this.getSmoothScrollSettings();return Math.abs(n-i)<=o&&Math.abs(a)<=s?(r.position=n,r.velocity=0,this.scrollAnimation=void 0,n):r.position}computeRenderRangeAndEmit=(t=performance.now())=>{if(e.__STOP||this.container==null||!this.isReady())return;let n=this.getHeight(),r=this.getScrollTop(),i=r,a=this.pendingLayoutAnchor!=null,o=this.getScrollAnchor(i);if(this.layoutDirtyIndex!=null&&(this.recomputeLayout(this.layoutDirtyIndex,this.pendingLayoutReset),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,a=!0),a&&o!=null){let e=this.resolveAnchoredScrollTop(o);if(e!=null){let t=e-i;i=e,this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}}a&&(i=this.clampScrollTop(i),this.syncContainerHeight());let s=this.computeTargetScrollTopForFrame(i,t),c=!a&&(this.renderState.scrollTop===-1||Math.abs(s-this.renderState.scrollTop)>n+this.config.overscrollSize*2);c&&(o=void 0),this.windowSpecs=pm({scrollTop:s-this.header.height,height:n,scrollHeight:this.getScrollHeight(),fitPerfectly:c,fitPerfectlyOverscroll:this.getFitPerfectlyOverscroll(),overscrollSize:this.config.overscrollSize});let l=r;(this.pendingScrollTarget!=null&&s!==l||this.needsScrollPageUpdate(s))&&(this.applyScrollFix(s,l,this.windowSpecs),l=s);let{top:u,bottom:d}=this.windowSpecs,{firstIndex:f,lastIndex:p}=this.renderState;if(f>=0)for(let e=f;e<=p;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: No item at index: ${e}`);t.top>u-t.height&&t.top<=d||this.releaseRenderedItem(t)}let m=this.reconcileHeaderFooterHosts(),h,g=new Set,_=this.findFirstVisibleIndex(u),v=this.findLastVisibleIndex(d);for(let e=_;e<=v;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: missing item`);let{instance:n}=t;t.element==null?(t.element=this.acquireElement(),Iy(this.stickyContainer,t.element,h),n.virtualizedSetup(),Fy(t,t.element)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element):(Iy(this.stickyContainer,t.element,h),Fy(t,void 0,t.renderedOptionsRevision!==this.renderOptionsRevision)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element),t.item.edit===!0&&this.attachItemEditor(t)}this.renderState.firstIndex=_<=v?_:-1,this.renderState.lastIndex=v,this.flushSlotCoordinator(),this.flushManagers(g),m&&this.measureMountedHosts(),this.reconcileRenderedItems(g),this.syncContainerHeight(),this.updateStickyPositioning();let y=o==null?void 0:this.resolveAnchoredScrollTop(o);o===this.pendingLayoutAnchor&&(this.pendingLayoutAnchor=void 0);let b=y==null?0:y-i,x=s,S=!1;if(this.pendingScrollTarget!=null){let e=this.advanceScrollAnimation(t,b);e==null?x=i:(x=e,S=!0)}else x=y??s;x!==l&&(this.applyScrollFix(x,l,this.windowSpecs),l=x),S&&this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.renderState.scrollTop=gm(l),this.updateStickyPositioning(),this.validateStickyContainerHeight(),this.fixContainerFocus(),(c||this.scrollAnimation!=null)&&this.render()};flushManagers(e){for(let t of e)t.instance.flushManagers()}syncContainerHeight(){let e=this.getPagedScrollHeight();this.container!=null&&this.containerHeight!==e&&(this.container.style.height=`${e}px`,this.containerHeight=e)}getStickyBounds(e){let{firstIndex:t,lastIndex:n}=e==null?this.renderState:{firstIndex:this.findFirstVisibleIndex(e.top),lastIndex:this.findLastVisibleIndex(e.bottom)};if(t===-1||n===-1||t>n)return;let r=this.items[t]?.instance.getAdvancedStickySpecs(e),i=this.items[n]?.instance.getAdvancedStickySpecs(e);if(r!=null&&i!=null)return{stickyTop:this.getPagedLayoutTop(Math.max(r.topOffset,0)),stickyBottom:this.getPagedLayoutTop(i.topOffset+i.height)}}applyStickyPositioning({stickyTop:e,stickyBottom:t}){let n=this.getHeight(),{itemMetricsCache:r}=this,i=t-e;this.renderState.stickyHeight=i,this.renderState.stickyTop=e,this.renderState.stickyBottom=t,this.stickyOffset.style.height=`${e}px`;let a=(Math.random()*r.lineHeight>>0)*-1,o=-Math.max(i+a,0)+n;this.stickyContainer.style.top=`${o}px`,this.stickyContainer.style.bottom=`${o+r.diffHeaderHeight}px`}syncPagedScrollScaffolding(e){this.syncContainerHeight();let t=this.getStickyBounds(e);if(t==null){this.stickyOffset.style.height=`${this.getPagedLayoutTop(e.top)}px`;return}this.applyStickyPositioning(t)}reconcileRenderedItems(e){let{firstIndex:t,lastIndex:n}=this.renderState;if(t===-1)return;let r=-1,i=!1;for(let a=t;a<this.items.length&&!(!i&&a>n);a++){let t=this.items[a];if(t==null)throw Error(`CodeView.reconcileRenderedItems: Invalid item`);r===-1?r=t.top:t.top!==r&&(t.top=r,t.instance.syncVirtualizedTop(),i=!0),(e==null?a<=n:e.has(t))&&(t.instance.reconcileHeights()&&(i=!0,t.height=t.instance.getVirtualizedHeight()),this.validateRenderedItemHeight(t)),r+=t.instance.getVirtualizedHeight(),a<this.items.length-1&&(r+=this.getLayout().gap)}i&&r!=null&&(this.scrollDirty=!0,this.scrollHeight=r)}updateStickyPositioning(){let e=this.getStickyBounds();if(e==null){this.renderState.firstIndex===-1&&(this.stickyOffset.style.height=``);return}let{stickyTop:t,stickyBottom:n}=e;(n-t!==this.renderState.stickyHeight||t!==this.renderState.stickyTop||n!==this.renderState.stickyBottom)&&this.applyStickyPositioning(e)}handleScroll=()=>{e.__STOP||(this.suspendScrollInteractions(),this.scrollDirty=!0,this.notifyScroll(),this.render())};clearPendingScroll=()=>{this.pendingScrollTarget=void 0,this.pendingLayoutAnchor=void 0,this.scrollAnimation=void 0};handleResize=e=>{let t=!1;for(let n of e)if(n.target===this.stickyContainer){let e=n.borderBoxSize[0].blockSize;if(Math.abs(e-this.renderState.stickyHeight)>=vy){let e=this.getScrollTop(),n=this.getScrollAnchor(e);this.reconcileRenderedItems(),this.updateStickyPositioning();let r=n==null?void 0:this.resolveAnchoredScrollTop(n);if(r!=null){let t=r-e;this.applyScrollFix(r,e,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),t=!0}}else if(n.target===this.header.element||n.target===this.footer.element){let e=n.target===this.header.element?this.header:this.footer,r=n.borderBoxSize[0].blockSize;if(r!==e.height){let n=this.getScrollTop(),i=this.getScrollAnchor(n);this.setHostHeight(e,r);let a=i==null?void 0:this.resolveAnchoredScrollTop(i);if(a!=null){let e=a-n;this.applyScrollFix(a,n,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=e)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),t=!0}}else this.scrollDirty=!0,this.heightDirty=!0,t=!0;t&&this.render(!0)};getScrollAnchorViewportTop(e,t){return e<t?t+this.getStickyHeaderOffset():t}getScrollAnchor(e,t=this.idToItem){let n,{pendingLayoutAnchor:r}=this;if(r!=null){let e=this.idToItem.get(r.id);if(e!=null&&t.get(r.id)===e)return r;e!=null&&(n=e)}if(e<=0)return;let{firstIndex:i,lastIndex:a,stickyTop:o,stickyBottom:s}=this.renderState;if(i===-1||a===-1)return;let c=this.getHeight();if(o!==-1&&s!==-1){for(let r=i;r<=a;r++){let i=this.items[r];if(i==null)continue;let a=this.getItemTopOffset()+i.top;if(a+i.height<=e)continue;if(a>=e+c)break;if(t.get(i.item.id)!==i){n??=i;continue}if(a>=e)return{type:`item`,id:i.item.id,viewportOffset:a-e};let o=this.getScrollAnchorViewportTop(a,e)-a,s=i.instance.getNumericScrollAnchor(o);if(s!=null){let t=a+s.top;return{type:`line`,id:i.item.id,lineNumber:s.lineNumber,side:s.side,viewportOffset:t-e}}}if(n!=null)for(let e=n.index+1;e<this.items.length;e++){let n=this.items[e];if(n!=null&&t.get(n.item.id)===n)return{type:`item`,id:n.item.id,viewportOffset:0}}}}resolveAnchoredScrollTop(e){let t=this.idToItem.get(e.id);if(t==null)return;let n=this.getItemTopOffset();if(e.type===`item`){let r=n+t.top;return this.clampScrollTop(r-e.viewportOffset)}let r=t.type===`diff`?t.instance.getLinePosition(e.lineNumber,e.side):t.instance.getLinePosition(e.lineNumber);if(r==null)return;let i=n+t.top+r.top;return this.clampScrollTop(i-e.viewportOffset)}applyScrollFix(e,t,n){if(this.root==null)return;let r=gm(this.clampScrollTop(e)),i=gm(t),{scrollPageOffset:a}=this,o=gm(this.clampPagedScrollTop(i-a)),{pagedScrollTop:s,scrollPageOffset:c}=this.resolvePagedScrollPosition(r),l=s,u=a!==c;(r!==this.renderState.scrollTop||r!==i||l!==o||u)&&(this.suspendScrollInteractions(),(l!==o||u)&&(this.scrollPageOffset=c,this.syncPagedScrollScaffolding(n)),l!==o&&this.root.scrollTo({top:l,behavior:`instant`}),this.renderState.scrollTop=r,this.scrollTop=r,this.scrollDirty=!1)}isPendingTargetSettled(e){let t=this.resolveScrollTargetTop(e);return t==null||gm(this.getScrollTop())===gm(t)}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root?.scrollTop??0;return this.scrollTop=this.clampScrollTop(e+this.scrollPageOffset),this.scrollTop}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root?.getBoundingClientRect().height??0,this.height):this.height}getScrollHeight(){return this.scrollHeight}flushSlotCoordinator(){if(this.slotCoordinator==null)return;let e=this.buildSlotSnapshot(this.slotCoordinator);tm(this.slotSnapshot,e)||(this.slotSnapshot=e,this.slotCoordinator.onSnapshotChange(e))}notifyScroll(){if(this.scrollListeners.size===0)return;let e=this.getScrollTop();for(let t of this.scrollListeners)t(e,this)}findFirstVisibleIndex(e){let t=0,n=this.items.length-1,r=this.items.length;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findFirstVisibleIndex: invalid item index`);a.top+a.height>e?(r=i,n=i-1):t=i+1}return r}findLastVisibleIndex(e){let t=0,n=this.items.length-1,r=-1;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findLastVisibleIndex: invalid item index`);a.top<=e?(r=i,t=i+1):n=i-1}return r}recomputeLayout(e=0,t){if(this.items.length===0){this.scrollHeight=0;return}let n=this.getLayout(),r=0;if(e>0){let t=this.items[e-1];if(t==null)throw Error(`CodeView.recomputeLayout: invalid dirty index`);r=t.top+t.height+n.gap}for(let i=e;i<this.items.length;i++){let e=this.items[i];if(e==null)throw Error(`CodeView.recomputeLayout: invalid item index`);e.top=r,e.height=e.type===`diff`?e.instance.updateCodeViewLayout(e.item.fileDiff,r,t,e.item.annotations??[]):e.instance.updateCodeViewLayout(e.item.file,r,t,e.item.annotations??[]),r+=e.height,i<this.items.length-1&&(r+=n.gap)}r!==this.scrollHeight&&(this.scrollDirty=!0),this.scrollHeight=r}resetRenderState(){this.renderState.scrollTop=-1,this.renderState.firstIndex=-1,this.renderState.lastIndex=-1,this.renderState.stickyHeight=0,this.renderState.stickyTop=-1,this.renderState.stickyBottom=-1}getFitPerfectlyOverscroll(){return this.getLayout().gap+this.itemMetricsCache.diffHeaderHeight}};function Oy(e){return e.instance.cleanUp(!0),e.type===`diff`?e.instance.updateCodeViewLayout(e.item.fileDiff,e.top,void 0,e.item.annotations??[]):e.instance.updateCodeViewLayout(e.item.file,e.top,void 0,e.item.annotations??[])}function ky(e,t){return!wd(e.theme??A,t.theme??A)||(e.themeType??`system`)!==(t.themeType??`system`)||e.unsafeCSS!==t.unsafeCSS}function Ay(e,t){return(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS||(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function jy(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function My(e){return e instanceof SVGElement||mm(e)&&(e.hasAttribute(`data-core-css`)||e.hasAttribute(`data-theme-css`)||e.hasAttribute(`data-unsafe-css`))}function Ny(e){let t=Py(e.start,e.side),n=Py(e.end,e.endSide??e.side);return t===n?t:`${t}-${n}`}function Py(e,t){return t==null?`${e}`:`${t===`deletions`?`D`:`A`}${e}`}function Fy(e,t,n=!1){return e.type===`diff`?e.instance.render({deferManagers:!0,fileContainer:t,fileDiff:e.item.fileDiff,forceRender:n,lineAnnotations:e.item.annotations??[]}):e.instance.render({deferManagers:!0,fileContainer:t,file:e.item.file,forceRender:n,lineAnnotations:e.item.annotations??[]})}function Iy(e,t,n){if(n==null){e.firstChild!==t&&e.prepend(t);return}n.nextSibling!==t&&n.after(t)}function Ly(e){return(e.annotations?.length??0)>0}function Ry(e,{hasHeaderRenderers:t,hasAnnotationRenderer:n,hasGutterRenderer:r}){if(e.length===0)return;if(t||r)return e;if(!n)return;let i=[];for(let t of e)Ly(t.item)&&i.push(t);return i.length>0?i:void 0}function zy(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}var By=typeof window>`u`?C.useEffect:C.useLayoutEffect;function Vy(e){return{instance:void 0,items:void 0,controlled:e,managedOptions:void 0,disableFlushSync:!1,slotCoordinator:void 0}}function Hy(e,t){let{className:n,containerRef:r,disableWorkerPool:i=!1,editorOptions:a,getEditStateKey:o,initialItems:s,items:c,onItemEditChange:l,onItemEditComplete:u,onScroll:d,onSelectedLinesChange:f,options:p,renderAnnotation:m,renderCodeViewFooter:h,renderCodeViewHeader:g,renderCustomHeader:_,renderGutterUtility:v,renderHeaderFilenameSuffix:y,renderHeaderMetadata:b,renderHeaderPrefix:x,selectedLines:S,style:E}=e,ee=c!==void 0,O=te(),ne=(0,C.useContext)(em),k=(0,C.useRef)(Vy(ee)),re=_!=null,ie=m!=null,ae=v!=null,oe=re||x!=null||y!=null||b!=null,se=oe||ie||ae,ce=g!=null,le=h!=null,ue=D(e=>{f?.(e)}),de=S!==void 0,fe=D((e,t,n)=>{if(O==null)throw Error(`CodeView: EditContext is not attached`);let r={...a,...t};return O(e,r,n)}),A=D((e,t)=>{l?.(e,t)}),pe=D((e,t,n)=>u?.(e,t,n)??`reject`),me=(0,C.useMemo)(()=>Jy({options:p,hasCustomHeader:re,hasGutterRenderer:ae,hasCodeViewHeader:ce,hasCodeViewFooter:le,onSelectedLinesChange:f==null?void 0:ue,controlledSelection:de,getEditStateKey:o,createEditor:O==null?void 0:fe,onItemEditChange:l==null?void 0:A,onItemEditComplete:u==null?void 0:pe}),[O,de,fe,A,pe,ue,le,ce,re,ae,o,l,u,f,p]),[he]=(0,C.useState)(()=>qy()),[,ge]=(0,C.useState)({}),_e=D(e=>{k.current.instance!=null&&(e==null||e!==k.current.instance.getContainerElement())&&(k.current.instance.cleanUp(),he.publish(void 0),k.current=Vy(ee)),e!=null&&e!==k.current.instance?.getContainerElement()&&(k.current.instance=new Dy(me,i?void 0:ne,!0),k.current.instance.setup(e)),zy(r,e)}),ve=D(e=>{k.current.disableFlushSync?he.publish(e):(0,T.flushSync)(()=>{he.publish(e)})}),ye=(0,C.useMemo)(()=>{if(oe||ie||ae||ce||le)return{hasHeaderRenderers:oe,hasAnnotationRenderer:ie,hasGutterRenderer:ae,onSnapshotChange:ve}},[ve,ie,ae,oe,ce,le]);return By(()=>d==null?void 0:k.current.instance?.subscribeToScroll(d)),By(()=>{let{instance:e,controlled:t,items:n,managedOptions:r,slotCoordinator:i}=k.current;if(e!=null)try{k.current.disableFlushSync=!0;let a=!1;if(im(me,r)||(k.current.managedOptions=me,e.setOptions(me),a=!0),t!==ee){console.error(`CodeView: cannot switch between controlled and uncontrolled modes. Remount with a new key instead.`);return}if(ee)c!==n&&(Gy(n,c)?k.current.items=c:Wy(n,c)?(k.current.items=c,e.addItems(c.slice(n.length))):(k.current.items=c,e.setItems(c),a=!0));else if(n==null){let t=s??[];k.current.items=t,t.length>0&&(e.setItems(t),a=!0)}S!==void 0&&e.setSelectedLines(S,{notify:!1});let o=e.setSlotCoordinator(ye),l=!1;ye!==i&&((ye==null||i==null)&&(l=!0),k.current.slotCoordinator=ye),(a||o)&&e.render(!0),o&&ye==null&&he.publish(void 0),l&&ge({})}finally{k.current.disableFlushSync=!1}}),(0,C.useImperativeHandle)(t,()=>({addItems(e){let{controlled:t,instance:n}=k.current;Ky(t,`addItems`),n==null?console.error(`CodeView.addItems: no valid instance to append items with`,e):n.addItems(e)},getItem(e){let{instance:t}=k.current;if(t==null){console.error(`CodeView.getItem: no valid instance exists`,e);return}return t.getItem(e)},removeItem(e){let{controlled:t,instance:n}=k.current;return Ky(t,`removeItem`),n==null?(console.error(`CodeView.removeItem: no valid instance to remove item from`,e),!1):n.removeItem(e)},updateItem(e){let{controlled:t,instance:n}=k.current;return Ky(t,`updateItem`),n==null?(console.error(`CodeView.updateItem: no valid instance to update item with`,e),!1):n.updateItem(e)},updateItemId(e,t){let{controlled:n,instance:r}=k.current;return Ky(n,`updateItemId`),r==null?(console.error(`CodeView.updateItemId: no valid instance to update item id with`,e,t),!1):r.updateItemId(e,t)},scrollTo(e){let{instance:t}=k.current;t==null?console.error(`CodeView.scrollTo: no valid instance to scroll with`,e):t.scrollTo(e)},setSelectedLines(e){let{instance:t}=k.current;t==null?console.error(`CodeView.setSelectedLines: no valid instance to update selection with`,e):(t.setSelectedLines(e,{notify:!1}),ue(e))},getSelectedLines(){let{instance:e}=k.current;return e==null?(console.error(`CodeView.getSelectedLines: no valid instance exists`),null):e.getSelectedLines()},clearSelectedLines(){let{instance:e}=k.current;e==null?console.error(`CodeView.clearSelectedLines: no valid instance to update selection with`):(e.clearSelectedLines({notify:!1}),ue(null))},getEditor(e){let{instance:t}=k.current;if(t==null){console.error(`CodeView.getEditor: no valid instance exists`,e);return}return t.getEditor(e)},getInstance(){return k.current.instance}}),[ue]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{ref:_e,className:n,style:E}),(se||ce||le)&&(0,w.jsx)(Yy,{managedContentStore:he,renderCustomHeader:_,renderHeaderPrefix:x,renderHeaderFilenameSuffix:y,renderHeaderMetadata:b,renderAnnotation:m,renderGutterUtility:v,renderCodeViewHeader:g,renderCodeViewFooter:h})]})}var Uy=(0,C.forwardRef)(Hy);function Wy(e,t){if(e==null||t.length<=e.length)return!1;if(e.length===0)return!0;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Gy(e,t){if(e==null||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ky(e,t){if(e)throw Error(`CodeView.${t} cannot be used when CodeView is controlled. Use initialItems for imperative item updates.`)}function qy(){let e,t=new Set;return{getSnapshot(){return e},publish(n){if(!tm(e,n)){e=n;for(let e of t)e()}},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Jy({options:e,hasCustomHeader:t,hasGutterRenderer:n,hasCodeViewHeader:r,hasCodeViewFooter:i,onSelectedLinesChange:a,controlledSelection:o,getEditStateKey:s,createEditor:c,onItemEditChange:l,onItemEditComplete:u}){let d={...e,controlledSelection:o,onSelectedLinesChange:a,createEditor:c};return s!=null&&(d.getEditStateKey=s),l!=null&&(d.onItemEditChange=l),u!=null&&(d.onItemEditComplete=u),t&&(d.renderCustomHeader=Zy),n&&(d.renderGutterUtility=Zy),r&&(d.renderCodeViewHeader=Zy),i&&(d.renderCodeViewFooter=Zy),d}var Yy=(0,C.memo)(function({managedContentStore:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderCodeViewHeader:s,renderCodeViewFooter:c}){"use no memo";let l=D(t=>e.subscribe(t)),u=D(()=>e.getSnapshot()),d=(0,C.useSyncExternalStore)(l,u,u),f=``;for(let e of d?.items??[])f+=`${e.id}:${e.version}:${e.type}`;let p=(0,C.useMemo)(()=>d?.items?.map(e=>(0,T.createPortal)(Xy({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}),e.element,e.id)),[t,n,r,i,a,o,f]),m=(0,C.useMemo)(()=>s!=null&&d?.header!=null?(0,T.createPortal)(s(),d.header):null,[s,d?.header]),h=(0,C.useMemo)(()=>c!=null&&d?.footer!=null?(0,T.createPortal)(c(),d.footer):null,[c,d?.footer]);return(0,w.jsxs)(w.Fragment,{children:[p,m,h]})});function Xy({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}){if(e.type===`diff`){let{item:s,instance:c}=e;return Me({fileDiff:s.fileDiff,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine,getAnnotationSlotName:c.getAnnotationSlotName})}{let{item:s,instance:c}=e;return Pe({file:s.file,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine,getAnnotationSlotName:c.getAnnotationSlotName})}}function Zy(){}var Qy=(e,t)=>{let n=e.shadowRoot;if(n===null)return null;let r=t.side===`additions`?`data-additions`:`data-deletions`,i=t.side===`additions`?`change-addition`:`change-deletion`,a=t.side===`additions`?`data-line`:`data-alt-line`;return n.querySelector(`[${r}] [data-line="${t.lineNumber}"]`)??n.querySelector(`[data-line="${t.lineNumber}"][data-line-type="${i}"]`)??n.querySelector(`[${a}="${t.lineNumber}"][data-line-type="context"]`)??n.querySelector(`[${a}="${t.lineNumber}"][data-line-type="context-expanded"]`)??n.querySelector(`[${r}] [data-alt-line="${t.lineNumber}"]`)??n.querySelector(`[${r}][data-line="${t.lineNumber}"]`)??n.querySelector(`[${r}][data-alt-line="${t.lineNumber}"]`)},$y=(e,t)=>{let n=e.closest(`diffs-container`);return n===null?null:Qy(n,t)},eb=(e,t)=>{let n=$y(e,t);n!==null&&(n.tabIndex=-1,n.focus({preventScroll:!0}))},tb=({annotation:e,className:t,returnFocus:n})=>{let r=(0,C.useRef)(null),i=()=>{if(n!==void 0){n();return}r.current!==null&&eb(r.current,e.location)};return(0,C.createElement)(`div`,{ref:r,"aria-label":e.accessibilityLabel,className:t,"data-rly-diff-annotation":e.id,"data-rly-diff-annotation-item":e.location.itemId,"data-rly-diff-annotation-line":e.location.lineNumber,"data-rly-diff-annotation-side":e.location.side,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),i())},role:`group`,tabIndex:0},e.render({annotationId:e.id,location:e.location,returnFocus:i}))},nb=e=>{let t=new Set;for(let n of e){if(n.id.trim().length===0||n.accessibilityLabel.trim().length===0)throw Error(`Diff annotation id and accessibility label must not be blank`);if(n.location.itemId.trim().length===0)throw Error(`Diff annotation ${n.id} location item id must not be blank`);if(!Number.isInteger(n.location.lineNumber)||n.location.lineNumber<1)throw Error(`Diff annotation ${n.id} line number must be a positive integer`);if(t.has(n.id))throw Error(`Diff annotation id ${n.id} must be unique`);t.add(n.id)}};function rb(e,t){try{let n=Ju({name:e,load:t});Qe.registerTheme(n.name,n.load)}catch(t){if(t instanceof Je){console.error(`SharedHighlight.registerCustomTheme: theme name already registered`,e);return}throw t}}function ib(e,t,n=!1){let r=ls({name:e,variablePrefix:J(`global`),variableDefaults:t,fontStyle:n});rb(e,()=>Promise.resolve(r))}var ab=(e,t)=>{if(e.trim().length===0)throw Error(`${t} must not be blank`);return e},ob=e=>{if(ab(e.id,`Diff item id`),ab(e.before.name,`Diff item ${e.id} before name`),ab(e.after.name,`Diff item ${e.id} after name`),e.version!==void 0&&(!Number.isInteger(e.version)||e.version<0))throw Error(`Diff item ${e.id} version must be a non-negative integer`)},sb=e=>(ob(e),d_({...e.before.cacheKey!==void 0&&{cacheKey:e.before.cacheKey},contents:e.before.contents,name:e.before.name},{...e.after.cacheKey!==void 0&&{cacheKey:e.after.cacheKey},contents:e.after.contents,name:e.after.name},void 0,!0)),cb={dark:`rly-dark`,light:`rly-light`},lb={"ansi-black":`var(--rly-color-text-1)`,"ansi-blue":`var(--rly-color-text-1)`,"ansi-bright-black":`var(--rly-color-text-2)`,"ansi-bright-blue":`var(--rly-color-text-1)`,"ansi-bright-cyan":`var(--rly-color-text-1)`,"ansi-bright-green":`var(--rly-color-text-1)`,"ansi-bright-magenta":`var(--rly-color-text-1)`,"ansi-bright-red":`var(--rly-color-text-1)`,"ansi-bright-white":`var(--rly-color-text-1)`,"ansi-bright-yellow":`var(--rly-color-text-1)`,"ansi-cyan":`var(--rly-color-text-1)`,"ansi-green":`var(--rly-color-text-1)`,"ansi-magenta":`var(--rly-color-text-1)`,"ansi-red":`var(--rly-color-text-1)`,"ansi-white":`var(--rly-color-text-2)`,"ansi-yellow":`var(--rly-color-text-1)`,background:`var(--rly-color-surface-1)`,foreground:`var(--rly-color-text-1)`,"token-changed":`var(--rly-color-text-1)`,"token-comment":`var(--rly-color-text-2)`,"token-constant":`var(--rly-color-text-1)`,"token-deleted":`var(--rly-color-text-1)`,"token-function":`var(--rly-color-text-1)`,"token-inserted":`var(--rly-color-text-1)`,"token-keyword":`var(--rly-color-text-1)`,"token-link":`var(--rly-color-text-1)`,"token-parameter":`var(--rly-color-text-1)`,"token-punctuation":`var(--rly-color-text-1)`,"token-string":`var(--rly-color-text-1)`,"token-string-expression":`var(--rly-color-text-1)`},ub=!1,db=()=>{ub||=(ib(cb.light,lb),ib(cb.dark,lb),!0)},fb=new URL(`/assets/worker-Cd7BK9Nc-DTL_43Cm.js`,``+import.meta.url).href,pb=(0,C.createContext)({status:`main-thread`}),mb=(e=2)=>{if(!Number.isInteger(e)||e<1||e>4)throw RangeError(`Diff worker pool size must be an integer from 1 through 4`);return e},hb=({name:e=`rly-diff-highlighter`,workerUrl:t=fb}={})=>()=>{try{return new Worker(t,{name:e,type:`module`})}catch{throw Error(`Diff workers are available only in a browser`)}},gb=hb(),_b=(e,t)=>e.subscribeToStatChanges(e=>{e.workersFailed&&t()}),vb=(e,t)=>{try{return e().terminate(),db(),{manager:new Jp({poolSize:t,workerFactory:e},{langs:[`text`,`tsx`,`typescript`,`json`,`yaml`,`markdown`],theme:cb}),status:`worker`}}catch{return{status:`fallback`}}},yb=({children:e,observeWorkerFailure:t,poolSize:n,workerFactory:r=gb})=>{let[i,a]=(0,C.useState)({status:`main-thread`});return(0,C.useEffect)(()=>{let e=!0,i=vb(r,mb(n)),o=i.manager,s=!1,c={},l=()=>{s||(s=!0,c.unsubscribe?.(),o?.terminate())};if(o!==void 0){let n=()=>{e&&(l(),a({status:`fallback`}))};c.unsubscribe=t===void 0?_b(o,n):t(n),s&&c.unsubscribe()}return s||a(i),()=>{e=!1,l()}},[t,n,r]),(0,w.jsx)(pb.Provider,{value:i,children:(0,w.jsx)(em.Provider,{value:i.manager,children:e})})},bb=()=>(0,C.useContext)(pb),xb=({rendererProps:e})=>(0,w.jsx)(Uy,{...e}),Sb=(e,t)=>t.filter(t=>t.location.itemId===e).map(e=>({lineNumber:e.location.lineNumber,metadata:{annotation:e},side:e.location.side})),Cb=(e,t)=>{let n=new Map(e.map(e=>[e.id,e])),r=new Map(t.map(e=>[e.id,e])),i=new Set;for(let[e,t]of n)r.get(e)!==t&&i.add(t.location.itemId);for(let[e,t]of r)n.get(e)!==t&&i.add(t.location.itemId);return i},wb=(e,t,n)=>({annotations:Sb(e.id,t),...e.collapsed!==void 0&&{collapsed:e.collapsed},fileDiff:sb(e),id:e.id,type:`diff`,version:n}),Tb=e=>{let t=new Set;for(let n of e){if(ob(n),t.has(n.id))throw Error(`Diff item id ${n.id} must be unique`);t.add(n.id)}},Eb=e=>e===void 0?i(E,`root`):`${i(E,`root`)} ${e}`,Db=(e,t,n,r)=>{if(n===`unmount`)return;let i=e.shadowRoot;if(e.dataset.rlyDiffItem=t,e.style.setProperty(`--diffs-selection-number-fg`,`var(--rly-color-text-1)`),r)for(let e of i?.querySelectorAll(`code[data-code]`)??[])e.tabIndex=0;for(let e of i?.querySelectorAll(`[data-expand-button]`)??[]){let t=e.hasAttribute(`data-expand-down`)?`below`:`above`;e.setAttribute(`aria-label`,`Expand unchanged lines ${t}`),e.tabIndex=0,!e.hasAttribute(`data-rly-diff-keyboard-expander`)&&(e.setAttribute(`data-rly-diff-keyboard-expander`,``),e.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e.click())}))}},Ob=(e=>(0,C.forwardRef)(function({annotations:t=[],className:n,contextLines:r=3,empty:a=`No renderable source changes.`,expandContext:o=!1,initialItems:s,mode:c=`split`,onItemRender:l,onSelectedLinesChange:u,selectedLines:d,virtualization:f=`buffered`,wrap:p=!1},m){if(Tb(s),nb(t),!Number.isInteger(r)||r<0)throw Error(`Diff context lines must be a non-negative integer`);db();let h=bb(),g=(0,C.useRef)(null),_=(0,C.useRef)(null),v=(0,C.useRef)(t),y=(0,C.useRef)(t);v.current=t;let[b]=(0,C.useState)(()=>new Map(s.map(e=>[e.id,e]))),[x]=(0,C.useState)(()=>new Map(s.map(e=>[e.id,e.version??0]))),S=[...b.values()].map(e=>wb(e,t,x.get(e.id)??e.version??0));return(0,C.useEffect)(()=>{let e=Cb(y.current,t);y.current=t;for(let n of e){let e=b.get(n);if(e===void 0)continue;let r=(x.get(e.id)??e.version??0)+1;x.set(e.id,r),_.current?.updateItem(wb(e,t,r))}},[t,b,x]),(0,C.useImperativeHandle)(m,()=>({addItems(e){Tb(e);for(let t of e)if(b.has(t.id))throw Error(`Diff item id ${t.id} already exists`);let t=e.map(e=>{b.set(e.id,e);let t=e.version??0;return x.set(e.id,t),wb(e,v.current,t)});_.current?.addItems(t)},focusLine(e){let t=g.current?.querySelector(`diffs-container[data-rly-diff-item="${CSS.escape(e.id)}"]`);if(t==null)return!1;let n=Qy(t,e);return n!==null&&(n.tabIndex=-1,n.focus({preventScroll:!0}),t.shadowRoot?.activeElement===n)},scrollTo(e){_.current?.scrollTo(e)},updateItem(e){if(ob(e),!b.has(e.id))return!1;let t=Math.max(e.version??0,(x.get(e.id)??0)+1);return x.set(e.id,t),b.set(e.id,e),_.current?.updateItem(wb(e,v.current,t))??!1}}),[b,x]),s.length===0?(0,w.jsx)(`p`,{className:Eb(n),children:a}):(0,w.jsxs)(`div`,{className:Eb(n),"data-rly-diff-code-view":``,"data-rly-diff-mode":c,children:[h.status===`fallback`?(0,w.jsx)(`p`,{"aria-live":`polite`,className:E.fallbackNotice,role:`status`,children:`Worker acceleration is unavailable. The complete diff is rendered on this device.`}):null,(0,w.jsx)(e,{rendererProps:{ref:_,className:i(E,`viewer`),containerRef:g,disableWorkerPool:h.status!==`worker`,initialItems:S,...u!==void 0&&{onSelectedLinesChange:u},options:{collapsedContextThreshold:r,diffIndicators:`bars`,diffStyle:c===`split`?`split`:`unified`,disableVirtualizationBuffers:f===`strict`,enableLineSelection:!0,expandUnchanged:o,expansionLineCount:r,hunkSeparators:`line-info-basic`,layout:{gap:8,paddingBottom:8,paddingTop:8},onPostRender:(e,t,n,r)=>{Db(e,r.item.id,n,!p),n!==`unmount`&&l?.(r.item.id,h.status)},overflow:p?`wrap`:`scroll`,stickyHeaders:!0,theme:cb},renderAnnotation:e=>(0,w.jsx)(tb,{annotation:e.metadata.annotation,className:i(E,`annotation`)}),...d!==void 0&&{selectedLines:d}}},h.status)]})}))(xb),$=e=>i(ee,e),kb=e=>{if(o(e.id,`DiffFinding id`),o(e.authorName,`DiffFinding authorName`),o(e.title,`DiffFinding title`),o(e.body,`DiffFinding body`),o(e.anchor.fileId,`DiffFinding anchor fileId`),o(e.anchor.path,`DiffFinding anchor path`),o(e.anchor.revision,`DiffFinding anchor revision`),o(e.anchor.contextHash,`DiffFinding anchor contextHash`),!Number.isInteger(e.anchor.line)||e.anchor.line<1)throw Error(`DiffFinding anchor line must be a positive integer`);e.anchor.state===`stale`&&(o(e.anchor.reason,`DiffFinding stale anchor reason`),e.anchor.currentRevision!==void 0&&o(e.anchor.currentRevision,`DiffFinding currentRevision`));let t=e.prevention;if(e.source===`agent`&&t===void 0)throw Error(`DiffFinding agent findings require a prevention plan`);if(t!==void 0){if(o(t.summary,`DiffFinding prevention summary`),t.enforcement===`none`)o(t.rationale,`DiffFinding prevention rationale`);else{if(o(t.existingRuleOrConfig,`DiffFinding prevention existingRuleOrConfig`),o(t.targetFile,`DiffFinding prevention targetFile`),o(t.matcherOrInvariant,`DiffFinding prevention matcherOrInvariant`),o(t.invalidFixture,`DiffFinding prevention invalidFixture`),o(t.validFixture,`DiffFinding prevention validFixture`),o(t.boundary,`DiffFinding prevention boundary`),t.sourcePaths.length===0)throw Error(`DiffFinding prevention sourcePaths must contain at least one path`);for(let e of t.sourcePaths)o(e,`DiffFinding prevention sourcePath`)}}},Ab={"ast-grep":`ast-grep`,eslint:`ESLint`,instruction:`Agent instruction`,none:`Human judgment`,test:`Test`,"type-check":`Type check`},jb=({className:e,finding:t,onAnchorActivate:n,...r})=>{kb(t);let i=`rly-diff-finding-${(0,C.useId)()}`,o=`${t.anchor.path}, ${t.anchor.side} line ${t.anchor.line}`;return(0,w.jsxs)(`article`,{...r,"aria-labelledby":i,className:a($(`root`),e),"data-rly-diff-finding-anchor":t.anchor.state,"data-rly-diff-finding-source":t.source,"data-rly-diff-finding-status":t.status,children:[(0,w.jsxs)(`header`,{className:$(`header`),children:[(0,w.jsx)(`span`,{"aria-hidden":`true`,className:a($(`avatar`),$(t.source)),children:t.source===`agent`?`AI`:t.authorName.slice(0,1).toUpperCase()}),(0,w.jsxs)(`span`,{className:$(`identity`),children:[(0,w.jsx)(`strong`,{children:t.authorName}),(0,w.jsx)(`span`,{children:t.source===`agent`?`Agent finding · not an approval`:`Human finding`})]}),(0,w.jsx)(`span`,{className:$(`state`),children:t.status})]}),(0,w.jsxs)(`section`,{className:$(`body`),children:[(0,w.jsx)(`span`,{className:$(`severity`),children:t.severity}),(0,w.jsx)(`h2`,{id:i,children:t.title}),(0,w.jsx)(`p`,{children:t.body})]}),t.prevention===void 0?null:(0,w.jsxs)(`details`,{className:$(`prevention`),"data-rly-diff-finding-prevention":t.prevention.enforcement,children:[(0,w.jsx)(`summary`,{children:(0,w.jsxs)(`span`,{className:$(`preventionSummary`),children:[(0,w.jsxs)(`span`,{className:$(`preventionCopy`),children:[(0,w.jsx)(`strong`,{children:`Prevent recurrence`}),(0,w.jsx)(`span`,{children:t.prevention.summary})]}),(0,w.jsx)(`code`,{children:Ab[t.prevention.enforcement]}),(0,w.jsx)(`span`,{"aria-hidden":`true`,className:$(`preventionIndicator`)})]})}),t.prevention.enforcement===`none`?(0,w.jsx)(`p`,{className:$(`rationale`),children:t.prevention.rationale}):(0,w.jsxs)(`dl`,{children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Extend`}),(0,w.jsx)(`dd`,{children:t.prevention.existingRuleOrConfig})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Change`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{children:t.prevention.targetFile})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Cover`}),(0,w.jsx)(`dd`,{children:t.prevention.sourcePaths.join(`, `)})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Matcher or invariant`}),(0,w.jsx)(`dd`,{children:t.prevention.matcherOrInvariant})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Must reject`}),(0,w.jsx)(`dd`,{children:t.prevention.invalidFixture})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Must allow`}),(0,w.jsx)(`dd`,{children:t.prevention.validFixture})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Boundary`}),(0,w.jsx)(`dd`,{children:t.prevention.boundary})]})]})]}),(0,w.jsxs)(`dl`,{className:$(`anchorDetails`),children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Revision`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{children:t.anchor.revision})})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Context`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{children:t.anchor.contextHash})})]}),t.anchor.state===`stale`&&t.anchor.currentRevision!==void 0?(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Current revision`}),(0,w.jsx)(`dd`,{children:(0,w.jsx)(`code`,{children:t.anchor.currentRevision})})]}):null]}),(0,w.jsx)(`footer`,{className:$(`footer`),children:t.anchor.state===`current`?(0,w.jsxs)(`button`,{onClick:()=>n(t.id),type:`button`,children:[(0,w.jsx)(`span`,{children:`Open anchor`}),(0,w.jsx)(`code`,{children:o})]}):(0,w.jsxs)(`span`,{className:$(`stale`),role:`status`,children:[(0,w.jsx)(`strong`,{children:`Stale anchor`}),(0,w.jsx)(`span`,{children:t.anchor.reason}),(0,w.jsx)(`code`,{children:o})]})})]})};export{Ob as DiffCodeView,d as DiffFileTree,jb as DiffFinding,u as DiffHeader,l as DiffWorkbench,yb as DiffWorkerProvider,cb as RLY_DIFF_THEMES,hb as createDiffWorkerFactory,y as n,mb as normalizeDiffWorkerPoolSize,S as t};
|
|
305
|
-
//# sourceMappingURL=diff-
|
|
305
|
+
//# sourceMappingURL=diff-CuvBMVEl.js.map
|