@prismshadow/penguin-server 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +45 -0
- package/dist/api/types.d.ts +958 -0
- package/dist/api/types.js +1 -0
- package/dist/api/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6867 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
- package/web-dist/assets/abap-BdImnpbu.js +1 -0
- package/web-dist/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/web-dist/assets/ada-bCR0ucgS.js +1 -0
- package/web-dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/web-dist/assets/angular-html-DA-rfuFy.js +1 -0
- package/web-dist/assets/angular-ts-BrjP3tb8.js +1 -0
- package/web-dist/assets/apache-Pmp26Uib.js +1 -0
- package/web-dist/assets/apex-Dqspr-GT.js +1 -0
- package/web-dist/assets/apl-CORt7UWP.js +1 -0
- package/web-dist/assets/applescript-Co6uUVPk.js +1 -0
- package/web-dist/assets/ara-BRHolxvo.js +1 -0
- package/web-dist/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/web-dist/assets/asm-D_Q5rh1f.js +1 -0
- package/web-dist/assets/astro-HNnZUWAn.js +1 -0
- package/web-dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/web-dist/assets/awk-DMzUqQB5.js +1 -0
- package/web-dist/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/web-dist/assets/ayu-light-BA47KaF1.js +1 -0
- package/web-dist/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/web-dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/web-dist/assets/bat-BkioyH1T.js +1 -0
- package/web-dist/assets/beancount-k_qm7-4y.js +1 -0
- package/web-dist/assets/berry-uYugtg8r.js +1 -0
- package/web-dist/assets/bibtex-CHM0blh-.js +1 -0
- package/web-dist/assets/bicep-Bmn6On1c.js +1 -0
- package/web-dist/assets/bird2-BIv1doCn.js +1 -0
- package/web-dist/assets/blade-2xfisSek.js +1 -0
- package/web-dist/assets/bsl-BO_Y6i37.js +1 -0
- package/web-dist/assets/c-BIGW1oBm.js +1 -0
- package/web-dist/assets/c3-MRO5bC_T.js +1 -0
- package/web-dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/web-dist/assets/cairo-KRGpt6FW.js +1 -0
- package/web-dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/web-dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/web-dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/web-dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/web-dist/assets/clarity-D53aC0YG.js +1 -0
- package/web-dist/assets/clojure-P80f7IUj.js +1 -0
- package/web-dist/assets/cmake-D1j8_8rp.js +1 -0
- package/web-dist/assets/cobol-nBiQ_Alo.js +1 -0
- package/web-dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/web-dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/web-dist/assets/coffee-Ch7k5sss.js +1 -0
- package/web-dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/web-dist/assets/coq-DkFqJrB1.js +1 -0
- package/web-dist/assets/cpp-UfJy6YNI.js +1 -0
- package/web-dist/assets/crystal-DGywbUpC.js +1 -0
- package/web-dist/assets/csharp-DSvCPggb.js +1 -0
- package/web-dist/assets/css-CLj8gQPS.js +1 -0
- package/web-dist/assets/csv-fuZLfV_i.js +1 -0
- package/web-dist/assets/cue-D82EKSYY.js +1 -0
- package/web-dist/assets/cypher-COkxafJQ.js +1 -0
- package/web-dist/assets/d-85-TOEBH.js +1 -0
- package/web-dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/web-dist/assets/dart-bE4Kk8sk.js +1 -0
- package/web-dist/assets/dax-CEL-wOlO.js +1 -0
- package/web-dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/web-dist/assets/diff-D97Zzqfu.js +1 -0
- package/web-dist/assets/docker-BcOcwvcX.js +1 -0
- package/web-dist/assets/dotenv-Da5cRb03.js +1 -0
- package/web-dist/assets/dracula-BzJJZx-M.js +1 -0
- package/web-dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/web-dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/web-dist/assets/edge-FbVlp4U3.js +1 -0
- package/web-dist/assets/elixir-CkH2-t6x.js +1 -0
- package/web-dist/assets/elm-DbKCFpqz.js +1 -0
- package/web-dist/assets/emacs-lisp-CXvaQtF9.js +1 -0
- package/web-dist/assets/erb-Dm6A9KJ5.js +1 -0
- package/web-dist/assets/erlang-DsQrWhSR.js +1 -0
- package/web-dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/web-dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/web-dist/assets/fennel-BYunw83y.js +1 -0
- package/web-dist/assets/fish-BvzEVeQv.js +1 -0
- package/web-dist/assets/fluent-C4IJs8-o.js +1 -0
- package/web-dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/web-dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/web-dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/web-dist/assets/gdresource-BOOCDP_w.js +1 -0
- package/web-dist/assets/gdscript-C5YyOfLZ.js +1 -0
- package/web-dist/assets/gdshader-DkwncUOv.js +1 -0
- package/web-dist/assets/genie-D0YGMca9.js +1 -0
- package/web-dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/web-dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/web-dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/web-dist/assets/github-dark-DHJKELXO.js +1 -0
- package/web-dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/web-dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web-dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/web-dist/assets/github-light-DAi9KRSo.js +1 -0
- package/web-dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/web-dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/web-dist/assets/gleam-BspZqrRM.js +1 -0
- package/web-dist/assets/glimmer-js-ByusRIyA.js +1 -0
- package/web-dist/assets/glimmer-ts-BfAWNZQY.js +1 -0
- package/web-dist/assets/glsl-DplSGwfg.js +1 -0
- package/web-dist/assets/gn-n2N0HUVH.js +1 -0
- package/web-dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/web-dist/assets/go-C27-OAKa.js +1 -0
- package/web-dist/assets/graphql-ChdNCCLP.js +1 -0
- package/web-dist/assets/groovy-gcz8RCvz.js +1 -0
- package/web-dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/web-dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/web-dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/web-dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/web-dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/web-dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/web-dist/assets/hack-DbPARsA_.js +1 -0
- package/web-dist/assets/haml-D5jkg6IW.js +1 -0
- package/web-dist/assets/handlebars-BpdQsYii.js +1 -0
- package/web-dist/assets/haskell-Df6bDoY_.js +1 -0
- package/web-dist/assets/haxe-CzTSHFRz.js +1 -0
- package/web-dist/assets/hcl-BWvSN4gD.js +1 -0
- package/web-dist/assets/hjson-D5-asLiD.js +1 -0
- package/web-dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/web-dist/assets/horizon-BUw7H-hv.js +1 -0
- package/web-dist/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/web-dist/assets/houston-DnULxvSX.js +1 -0
- package/web-dist/assets/html-derivative-DlHx6ybY.js +1 -0
- package/web-dist/assets/html-pp8916En.js +1 -0
- package/web-dist/assets/http-jrhK8wxY.js +1 -0
- package/web-dist/assets/hurl-irOxFIW8.js +1 -0
- package/web-dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/web-dist/assets/hy-DFXneXwc.js +1 -0
- package/web-dist/assets/imba-DGztddWO.js +1 -0
- package/web-dist/assets/index-7oqK2MPp.js +153 -0
- package/web-dist/assets/index-DGY2Myoq.js +51 -0
- package/web-dist/assets/index-SaWO9NKB.css +1 -0
- package/web-dist/assets/ini-BEwlwnbL.js +1 -0
- package/web-dist/assets/java-CylS5w8V.js +1 -0
- package/web-dist/assets/javascript-wDzz0qaB.js +1 -0
- package/web-dist/assets/jinja-f2NsQr07.js +1 -0
- package/web-dist/assets/jison-wvAkD_A8.js +1 -0
- package/web-dist/assets/json-Cp-IABpG.js +1 -0
- package/web-dist/assets/json5-C9tS-k6U.js +1 -0
- package/web-dist/assets/jsonc-Des-eS-w.js +1 -0
- package/web-dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/web-dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/web-dist/assets/jssm-C2t-YnRu.js +1 -0
- package/web-dist/assets/jsx-g9-lgVsj.js +1 -0
- package/web-dist/assets/julia-D7OTSIA_.js +1 -0
- package/web-dist/assets/just-CUsbIsdP.js +1 -0
- package/web-dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/web-dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/web-dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/web-dist/assets/kdl-DV7GczEv.js +1 -0
- package/web-dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/web-dist/assets/kusto-wEQ09or8.js +1 -0
- package/web-dist/assets/laserwave-DUszq2jm.js +1 -0
- package/web-dist/assets/latex-CaSxy8MP.js +1 -0
- package/web-dist/assets/lean-BZvkOJ9d.js +1 -0
- package/web-dist/assets/less-B1dDrJ26.js +1 -0
- package/web-dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/web-dist/assets/liquid-C0sCDyMI.js +1 -0
- package/web-dist/assets/llvm-DjAJT7YJ.js +1 -0
- package/web-dist/assets/log-2UxHyX5q.js +1 -0
- package/web-dist/assets/logo-BtOb2qkB.js +1 -0
- package/web-dist/assets/lua-BaeVxFsk.js +1 -0
- package/web-dist/assets/luau-KW6xsasC.js +1 -0
- package/web-dist/assets/make-CHLpvVh8.js +1 -0
- package/web-dist/assets/markdown-Cvjx9yec.js +1 -0
- package/web-dist/assets/marko-DjSrsDqO.js +1 -0
- package/web-dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/web-dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/web-dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/web-dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/web-dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/web-dist/assets/matlab-D7o27uSR.js +1 -0
- package/web-dist/assets/mdc-DTYItulj.js +1 -0
- package/web-dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/web-dist/assets/mermaid-mWjccvbQ.js +1 -0
- package/web-dist/assets/min-dark-CafNBF8u.js +1 -0
- package/web-dist/assets/min-light-CTRr51gU.js +1 -0
- package/web-dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/web-dist/assets/mojo-rZm6bMo-.js +1 -0
- package/web-dist/assets/monokai-D4h5O-jR.js +1 -0
- package/web-dist/assets/moonbit-_H4v1dQx.js +1 -0
- package/web-dist/assets/move-IF9eRakj.js +1 -0
- package/web-dist/assets/narrat-DRg8JJMk.js +1 -0
- package/web-dist/assets/nextflow-C-mBbutL.js +1 -0
- package/web-dist/assets/nextflow-groovy-vE_lwT2v.js +1 -0
- package/web-dist/assets/nginx-BpAMiNFr.js +1 -0
- package/web-dist/assets/night-owl-C39BiMTA.js +1 -0
- package/web-dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/web-dist/assets/nim-BIad80T-.js +1 -0
- package/web-dist/assets/nix-CwoSXNpI.js +1 -0
- package/web-dist/assets/nord-Ddv68eIx.js +1 -0
- package/web-dist/assets/nushell-Cz2AlsmD.js +1 -0
- package/web-dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/web-dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/web-dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/web-dist/assets/odin-BBf5iR-q.js +1 -0
- package/web-dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/web-dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/web-dist/assets/openscad-C4EeE6gA.js +1 -0
- package/web-dist/assets/pascal-D93ZcfNL.js +1 -0
- package/web-dist/assets/perl-B9cMNwum.js +1 -0
- package/web-dist/assets/php-Csjmro_R.js +1 -0
- package/web-dist/assets/pkl-u5AG7uiY.js +1 -0
- package/web-dist/assets/plastic-3e1v2bzS.js +1 -0
- package/web-dist/assets/plsql-ChMvpjG-.js +1 -0
- package/web-dist/assets/po-BTJTHyun.js +1 -0
- package/web-dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/web-dist/assets/polar-C0HS_06l.js +1 -0
- package/web-dist/assets/postcss-CXtECtnM.js +1 -0
- package/web-dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/web-dist/assets/powershell-Dpen1YoG.js +1 -0
- package/web-dist/assets/prisma-Dd19v3D-.js +1 -0
- package/web-dist/assets/prolog-CbFg5uaA.js +1 -0
- package/web-dist/assets/proto-C7zT0LnQ.js +1 -0
- package/web-dist/assets/pug-DKIMFp6K.js +1 -0
- package/web-dist/assets/puppet-BMWR74SV.js +1 -0
- package/web-dist/assets/purescript-CklMAg4u.js +1 -0
- package/web-dist/assets/python-B6aJPvgy.js +1 -0
- package/web-dist/assets/qml-3beO22l8.js +1 -0
- package/web-dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/web-dist/assets/qss-IeuSbFQv.js +1 -0
- package/web-dist/assets/r-Dspwwk_N.js +1 -0
- package/web-dist/assets/racket-BqYA7rlc.js +1 -0
- package/web-dist/assets/raku-DXvB9xmW.js +1 -0
- package/web-dist/assets/razor-BjBPvh-w.js +1 -0
- package/web-dist/assets/red-bN70gL4F.js +1 -0
- package/web-dist/assets/reg-C-SQnVFl.js +1 -0
- package/web-dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/web-dist/assets/rel-C3B-1QV4.js +1 -0
- package/web-dist/assets/riscv-BM1_JUlF.js +1 -0
- package/web-dist/assets/ron-D8l8udqQ.js +1 -0
- package/web-dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/web-dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/web-dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/web-dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/web-dist/assets/rst-CpCqk9r5.js +1 -0
- package/web-dist/assets/ruby-DyJCeAvU.js +1 -0
- package/web-dist/assets/rust-B1yitclQ.js +1 -0
- package/web-dist/assets/sas-DEy46yEz.js +1 -0
- package/web-dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/web-dist/assets/scala-C151Ov-r.js +1 -0
- package/web-dist/assets/scheme-C98Dy4si.js +1 -0
- package/web-dist/assets/scss-D5BDwBP9.js +1 -0
- package/web-dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/web-dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/web-dist/assets/shellscript-Yzrsuije.js +1 -0
- package/web-dist/assets/shellsession-BADoaaVG.js +1 -0
- package/web-dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/web-dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/web-dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/web-dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/web-dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/web-dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/web-dist/assets/solidity-rGO070M0.js +1 -0
- package/web-dist/assets/soy-8wufbnw4.js +1 -0
- package/web-dist/assets/sparql-rVzFXLq3.js +1 -0
- package/web-dist/assets/splunk-BtCnVYZw.js +1 -0
- package/web-dist/assets/sql-CRqJ_cUM.js +1 -0
- package/web-dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/web-dist/assets/stata-DI20mbqo.js +1 -0
- package/web-dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/web-dist/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/web-dist/assets/svelte-Cy7k_4gC.js +1 -0
- package/web-dist/assets/swift-D82vCrfD.js +1 -0
- package/web-dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/web-dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/web-dist/assets/systemd-4A_iFExJ.js +1 -0
- package/web-dist/assets/talonscript-CkByrt1z.js +1 -0
- package/web-dist/assets/tasl-QIJgUcNo.js +1 -0
- package/web-dist/assets/tcl-dwOrl1Do.js +1 -0
- package/web-dist/assets/templ-DhtptRzy.js +1 -0
- package/web-dist/assets/terraform-BETggiCN.js +1 -0
- package/web-dist/assets/tex-idrVyKtj.js +1 -0
- package/web-dist/assets/tokyo-night-hegEt444.js +1 -0
- package/web-dist/assets/toml-vGWfd6FD.js +1 -0
- package/web-dist/assets/ts-tags-D351s5mN.js +1 -0
- package/web-dist/assets/tsv-B_m7g4N7.js +1 -0
- package/web-dist/assets/tsx-COt5Ahok.js +1 -0
- package/web-dist/assets/turtle-BsS91CYL.js +1 -0
- package/web-dist/assets/twig-CW1WmMYd.js +1 -0
- package/web-dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/web-dist/assets/typespec-CAFt9gP4.js +1 -0
- package/web-dist/assets/typst-DHCkPAjA.js +1 -0
- package/web-dist/assets/v-BcVCzyr7.js +1 -0
- package/web-dist/assets/vala-CsfeWuGM.js +1 -0
- package/web-dist/assets/vb-D17OF-Vu.js +1 -0
- package/web-dist/assets/verilog-BQ8w6xss.js +1 -0
- package/web-dist/assets/vesper-DRje8inN.js +1 -0
- package/web-dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/web-dist/assets/viml-CJc9bBzg.js +1 -0
- package/web-dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/web-dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/web-dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/web-dist/assets/vue-D2xRrEX4.js +1 -0
- package/web-dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/web-dist/assets/vue-vine-BoDAl6tE.js +1 -0
- package/web-dist/assets/vyper-CDx5xZoG.js +1 -0
- package/web-dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/web-dist/assets/wasm-MzD3tlZU.js +1 -0
- package/web-dist/assets/wenyan-BV7otONQ.js +1 -0
- package/web-dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/web-dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/web-dist/assets/wit-5i3qLPDT.js +1 -0
- package/web-dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/web-dist/assets/xml-sdJ4AIDG.js +1 -0
- package/web-dist/assets/xsl-CtQFsRM5.js +1 -0
- package/web-dist/assets/yaml-Buea-lGh.js +1 -0
- package/web-dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/web-dist/assets/zig-VOosw3JB.js +1 -0
- package/web-dist/index.html +16 -0
- package/web-dist/penguin-logo.svg +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as u,w as Vt,s as zr,f as hi,a as fi,b as mi,c as or,h as gi}from"./index-DGY2Myoq.js";const ar={}.hasOwnProperty;function _i(e,t){const r=t||{};function n(i,...s){let o=n.invalid;const a=n.handlers;if(i&&ar.call(i,e)){const c=String(i[e]);o=ar.call(a,c)?a[c]:n.unknown}if(o)return o.call(this,i,...s)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}var wt=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,Ei=Object.getOwnPropertyNames,bi=Object.prototype.hasOwnProperty,Mt=(e,t)=>{let r={};for(var n in e)wt(r,n,{get:e[n],enumerable:!0});return wt(r,Symbol.toStringTag,{value:"Module"}),r},wi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Ei(t),s=0,o=i.length,a;s<o;s++)a=i[s],!bi.call(e,a)&&a!==r&&wt(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(n=yi(t,a))||n.enumerable});return e},qr=(e,t,r)=>(wi(e,t,"default"),r);const ze=[{id:"abap",name:"ABAP",import:(()=>u(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>u(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>u(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>u(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>u(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>u(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>u(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>u(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>u(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>u(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>u(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>u(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>u(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>u(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>u(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>u(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>u(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>u(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>u(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>u(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>u(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>u(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>u(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>u(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>u(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>u(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>u(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>u(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>u(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>u(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>u(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>u(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>u(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>u(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>u(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>u(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>u(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>u(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>u(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>u(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>u(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>u(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>u(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>u(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>u(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>u(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>u(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>u(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>u(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>u(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>u(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>u(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>u(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>u(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>u(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>u(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>u(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>u(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>u(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>u(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>u(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>u(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>u(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>u(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>u(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>u(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>u(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>u(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>u(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>u(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>u(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>u(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>u(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>u(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>u(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>u(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>u(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>u(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>u(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>u(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>u(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>u(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>u(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>u(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>u(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>u(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>u(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>u(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>u(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>u(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>u(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>u(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>u(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>u(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>u(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>u(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>u(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>u(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>u(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>u(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>u(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>u(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>u(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>u(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>u(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>u(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>u(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>u(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>u(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>u(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>u(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>u(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>u(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>u(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>u(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>u(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>u(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>u(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>u(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>u(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>u(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>u(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>u(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>u(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>u(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>u(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>u(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>u(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>u(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>u(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>u(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>u(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>u(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>u(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>u(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>u(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>u(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>u(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>u(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>u(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>u(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>u(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>u(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>u(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>u(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>u(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>u(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>u(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>u(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>u(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>u(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>u(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>u(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>u(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>u(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>u(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>u(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>u(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>u(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>u(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>u(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>u(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>u(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>u(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>u(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>u(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>u(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>u(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>u(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>u(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>u(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>u(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>u(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>u(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>u(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>u(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>u(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>u(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>u(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>u(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>u(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>u(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>u(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>u(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>u(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>u(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>u(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>u(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>u(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>u(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>u(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>u(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>u(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>u(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>u(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>u(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>u(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>u(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>u(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>u(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>u(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>u(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>u(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>u(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>u(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>u(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>u(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>u(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>u(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>u(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>u(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>u(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>u(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>u(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>u(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>u(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>u(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>u(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>u(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>u(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>u(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>u(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>u(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>u(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>u(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>u(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>u(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>u(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>u(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>u(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>u(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>u(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>u(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>u(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>u(()=>import("./zig-VOosw3JB.js"),[]))}],Gt=Object.fromEntries(ze.map(e=>[e.id,e.import])),Bt=Object.fromEntries(ze.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Ft={...Gt,...Bt},jt=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>u(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>u(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>u(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>u(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>u(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>u(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>u(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>u(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>u(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>u(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>u(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>u(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>u(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>u(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>u(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>u(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>u(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>u(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>u(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>u(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>u(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>u(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>u(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>u(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>u(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>u(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>u(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>u(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>u(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>u(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>u(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>u(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>u(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>u(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>u(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>u(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>u(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>u(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>u(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>u(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>u(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>u(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>u(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>u(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>u(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>u(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>u(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>u(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>u(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>u(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>u(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>u(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>u(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>u(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>u(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>u(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>u(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>u(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>u(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>u(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>u(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>u(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>u(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Ut=Object.fromEntries(jt.map(e=>[e.id,e.import]));var Ht=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function vi(){return 2147483648}function Ai(){return typeof performance<"u"?performance.now():Date.now()}const Ci=(e,t)=>e+(t-e%t)%t;async function Ii(e){let t,r;const n={};function i(h){r=h,n.HEAPU8=new Uint8Array(h),n.HEAPU32=new Uint32Array(h)}function s(h,m,y){n.HEAPU8.copyWithin(h,m,m+y)}function o(h){try{return t.grow(h-r.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=n.HEAPU8.length;h=h>>>0;const y=vi();if(h>y)return!1;for(let E=1;E<=4;E*=2){let g=m*(1+.2/E);g=Math.min(g,h+100663296);const _=Math.min(y,Ci(Math.max(h,g),65536));if(o(_))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(h,m,y=1024){const E=m+y;let g=m;for(;h[g]&&!(g>=E);)++g;if(g-m>16&&h.buffer&&c)return c.decode(h.subarray(m,g));let _="";for(;m<g;){let b=h[m++];if(!(b&128)){_+=String.fromCharCode(b);continue}const v=h[m++]&63;if((b&224)===192){_+=String.fromCharCode((b&31)<<6|v);continue}const A=h[m++]&63;if((b&240)===224?b=(b&15)<<12|v<<6|A:b=(b&7)<<18|v<<12|A<<6|h[m++]&63,b<65536)_+=String.fromCharCode(b);else{const S=b-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function p(h,m){return h?l(n.HEAPU8,h,m):""}const d={emscripten_get_now:Ai,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(n,m),n.UTF8ToString=p}return await f(),n}var Si=Object.defineProperty,Li=(e,t,r)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t,r)=>Li(e,typeof t!="symbol"?t+"":t,r);let k=null;function Ti(e){throw new Ht(e.UTF8ToString(e.getLastOnigError()))}class qe{constructor(t){L(this,"utf16Length"),L(this,"utf8Length"),L(this,"utf16Value"),L(this,"utf8Value"),L(this,"utf16OffsetToUtf8"),L(this,"utf8OffsetToUtf16");const r=t.length,n=qe._utf8ByteLength(t),i=n!==r,s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const a=new Uint8Array(n);let c=0;for(let l=0;l<r;l++){const p=t.charCodeAt(l);let d=p,f=!1;if(p>=55296&&p<=56319&&l+1<r){const h=t.charCodeAt(l+1);h>=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(s[l]=c,f&&(s[l+1]=c),d<=127?o[c+0]=l:d<=2047?(o[c+0]=l,o[c+1]=l):d<=65535?(o[c+0]=l,o[c+1]=l,o[c+2]=l):(o[c+0]=l,o[c+1]=l,o[c+2]=l,o[c+3]=l)),d<=127?a[c++]=d:d<=2047?(a[c++]=192|(d&1984)>>>6,a[c++]=128|(d&63)>>>0):d<=65535?(a[c++]=224|(d&61440)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0):(a[c++]=240|(d&1835008)>>>18,a[c++]=128|(d&258048)>>>12,a[c++]=128|(d&4032)>>>6,a[c++]=128|(d&63)>>>0),f&&l++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(t){let r=0;for(let n=0,i=t.length;n<i;n++){const s=t.charCodeAt(n);let o=s,a=!1;if(s>=55296&&s<=56319&&n+1<i){const c=t.charCodeAt(n+1);c>=56320&&c<=57343&&(o=(s-55296<<10)+65536|c-56320,a=!0)}o<=127?r+=1:o<=2047?r+=2:o<=65535?r+=3:r+=4,a&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Xe=class j{constructor(t){if(L(this,"id",++j.LAST_ID),L(this,"_onigBinding"),L(this,"content"),L(this,"utf16Length"),L(this,"utf8Length"),L(this,"utf16OffsetToUtf8"),L(this,"utf8OffsetToUtf16"),L(this,"ptr"),!k)throw new Ht("Must invoke loadWasm first.");this._onigBinding=k,this.content=t;const r=new qe(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!j._sharedPtrInUse?(j._sharedPtr||(j._sharedPtr=k.omalloc(1e4)),j._sharedPtrInUse=!0,k.HEAPU8.set(r.utf8Value,j._sharedPtr),this.ptr=j._sharedPtr):this.ptr=r.createString(k)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===j._sharedPtr?j._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};L(Xe,"LAST_ID",0);L(Xe,"_sharedPtr",0);L(Xe,"_sharedPtrInUse",!1);let Xr=Xe;class Ri{constructor(t){if(L(this,"_onigBinding"),L(this,"_ptr"),!k)throw new Ht("Must invoke loadWasm first.");const r=[],n=[];for(let a=0,c=t.length;a<c;a++){const l=new qe(t[a]);r[a]=l.createString(k),n[a]=l.utf8Length}const i=k.omalloc(4*t.length);k.HEAPU32.set(r,i/4);const s=k.omalloc(4*t.length);k.HEAPU32.set(n,s/4);const o=k.createOnigScanner(i,s,t.length);for(let a=0,c=t.length;a<c;a++)k.ofree(r[a]);k.ofree(s),k.ofree(i),o===0&&Ti(k),this._onigBinding=k,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof t=="string"){t=new Xr(t);const s=this._findNextMatchSync(t,r,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,r,!1,i)}_findNextMatchSync(t,r,n,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),i);if(o===0)return null;const a=s.HEAPU32;let c=o/4;const l=a[c++],p=a[c++],d=[];for(let f=0;f<p;f++){const h=t.convertUtf8OffsetToUtf16(a[c++]),m=t.convertUtf8OffsetToUtf16(a[c++]);d[f]={start:h,end:m,length:m-h}}return{index:l,captureIndices:d}}}function ki(e){return typeof e.instantiator=="function"}function Pi(e){return typeof e.default=="function"}function Oi(e){return typeof e.data<"u"}function xi(e){return typeof Response<"u"&&e instanceof Response}function Ni(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}let Se;function Wt(e){if(Se)return Se;async function t(){k=await Ii(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),ki(n)?n=await n.instantiator(r):Pi(n)?n=await n.default(r):(Oi(n)&&(n=n.data),xi(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await Di(n)(r):n=await $i(n)(r):Ni(n)?n=await at(n)(r):n instanceof WebAssembly.Module?n=await at(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await at(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return Se=t(),Se}function at(e){return t=>WebAssembly.instantiate(e,t)}function Di(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $i(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}let Qr;function Vi(e){Qr=e}function Mi(){return Qr}async function Jr(e){return e&&await Wt(e),{createScanner(t){return new Ri(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Xr(t)}}}const Gi=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:Jr,getDefaultWasmLoader:Mi,loadWasm:Wt,setDefaultWasmLoader:Vi},Symbol.toStringTag,{value:"Module"}));var Kr=Mt({});qr(Kr,Gi);var C=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Bi(e){return zt(e)}function zt(e){return Array.isArray(e)?Fi(e):e instanceof RegExp?e:typeof e=="object"?ji(e):e}function Fi(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=zt(e[r]);return t}function ji(e){let t={};for(let r in e)t[r]=zt(e[r]);return t}function Zr(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Yr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Yr(e.substring(0,e.length-1)):e.substr(~t+1)}var ct=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Le=class{static hasCaptures(e){return e===null?!1:(ct.lastIndex=0,ct.test(e))}static replaceCaptures(e,t,r){return e.replace(ct,(n,i,s,o)=>{let a=r[parseInt(i||s,10)];if(a){let c=t.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return n})}};function en(e,t){return e<t?-1:e>t?1:0}function tn(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let i=0;i<r;i++){let s=en(e[i],t[i]);if(s!==0)return s}return 0}return r-n}function cr(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 rn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var nn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},$e=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(Wi(e),t)}static createFromParsedTheme(e,t){return qi(e,t)}_cachedMatchRoot=new nn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(i=>Ui(e.parent,i.parentScopes));return n?new sn(n.fontStyle,n.foreground,n.background):null}},lt=class xe{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new xe(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new xe(r,t[n]);return r}push(t){return new xe(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function Ui(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],i=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],i=!0}for(;e&&!Hi(e.scopeName,n);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Hi(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var sn=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function Wi(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let i=0,s=t.length;i<s;i++){let o=t[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let d=o.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let d=o.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let l=null;typeof o.settings.foreground=="string"&&cr(o.settings.foreground)&&(l=o.settings.foreground);let p=null;typeof o.settings.background=="string"&&cr(o.settings.background)&&(p=o.settings.background);for(let d=0,f=a.length;d<f;d++){let m=a[d].trim().split(" "),y=m[m.length-1],E=null;m.length>1&&(E=m.slice(0,m.length-1),E.reverse()),r[n++]=new zi(y,E,i,c,l,p)}}return r}var zi=class{constructor(e,t,r,n,i,s){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},x=(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))(x||{});function qi(e,t){e.sort((c,l)=>{let p=en(c.scope,l.scope);return p!==0||(p=tn(c.parentScopes,l.parentScopes),p!==0)?p:c.index-l.index});let r=0,n="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(r=c.fontStyle),c.foreground!==null&&(n=c.foreground),c.background!==null&&(i=c.background)}let s=new Xi(t),o=new sn(r,s.getId(n),s.getId(i)),a=new Ji(new vt(0,null,-1,0,0),[]);for(let c=0,l=e.length;c<l;c++){let p=e[c];a.insert(0,p.scope,p.parentScopes,p.fontStyle,s.getId(p.foreground),s.getId(p.background))}return new $e(s,o,a)}var Xi=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,r=e.length;t<r;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 new 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)}},Qi=Object.freeze([]),vt=class on{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,i,s){this.scopeDepth=t,this.parentScopes=r||Qi,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new on(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,i=t.length;n<i;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Ji=class At{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,i=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=t.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-t.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),i,s;if(n===-1?(i=t,s=""):(i=t.substring(0,n),s=t.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(At._cmpBySpecificity),r}insert(t,r,n,i,s,o){if(r===""){this._doInsertHere(t,n,i,s,o);return}let a=r.indexOf("."),c,l;a===-1?(c=r,l=""):(c=r.substring(0,a),l=r.substring(a+1));let p;this._children.hasOwnProperty(c)?p=this._children[c]:(p=new At(this._mainRule.clone(),vt.cloneArr(this._rulesWithParentScopes)),this._children[c]=p),p.insert(t+1,l,n,i,s,o)}_doInsertHere(t,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(t,n,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let c=this._rulesWithParentScopes[o];if(tn(c.parentScopes,r)===0){c.acceptOverwrite(t,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new vt(t,r,n,i,s))}},re=class D{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=D.getLanguageId(t),n=D.getTokenType(t),i=D.getFontStyle(t),s=D.getForeground(t),o=D.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:o})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,i,s,o,a){let c=D.getLanguageId(t),l=D.getTokenType(t),p=D.containsBalancedBrackets(t)?1:0,d=D.getFontStyle(t),f=D.getForeground(t),h=D.getBackground(t);return r!==0&&(c=r),n!==8&&(l=n),i!==null&&(p=i?1:0),s!==-1&&(d=s),o!==0&&(f=o),a!==0&&(h=a),(c<<0|l<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ve(e,t){const r=[],n=Ki(e);let i=n.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let l=o();if(r.push({matcher:l,priority:c}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const c=s();return l=>!!c&&!c(l)}if(i==="("){i=n.next();const c=a();return i===")"&&(i=n.next()),c}if(lr(i)){const c=[];do c.push(i),i=n.next();while(lr(i));return l=>t(c,l)}return null}function o(){const c=[];let l=s();for(;l;)c.push(l),l=s();return p=>c.every(d=>d(p))}function a(){const c=[];let l=o();for(;l&&(c.push(l),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");l=o()}return p=>c.some(d=>d(p))}}function lr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Ki(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function an(e){typeof e.dispose=="function"&&e.dispose()}var _e=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Zi=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Yi=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},es=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _e(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Yi;for(const r of e)ts(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof _e){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function ts(e,t,r,n){const i=r.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=r.lookup(t);e instanceof _e?Ne({baseGrammar:s,selfGrammar:i},n):Ct(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const o=r.injections(e.scopeName);if(o)for(const a of o)n.add(new _e(a))}function Ct(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];Me([n],t,r)}}function Ne(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Me(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Me(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Me(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Zr({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&Me(n.patterns,{...t,repository:i},r);const s=n.include;if(!s)continue;const o=cn(s);switch(o.kind){case 0:Ne({...t,selfGrammar:t.baseGrammar},r);break;case 1:Ne(t,r);break;case 2:Ct(o.ruleName,{...t,repository:i},r);break;case 3:case 4:const a=o.scopeName===t.selfGrammar.scopeName?t.selfGrammar:o.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const c={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};o.kind===4?Ct(o.ruleName,c,r):Ne(c,r)}else o.kind===4?r.add(new Zi(o.scopeName,o.ruleName)):r.add(new _e(o.scopeName));break}}}var rs=class{kind=0},ns=class{kind=1},is=class{constructor(e){this.ruleName=e}kind=2},ss=class{constructor(e){this.scopeName=e}kind=3},os=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function cn(e){if(e==="$base")return new rs;if(e==="$self")return new ns;const t=e.indexOf("#");if(t===-1)return new ss(e);if(t===0)return new is(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new os(r,n)}}var as=/\\(\d+)/,ur=/\\(\d+)/g,cs=-1,ln=-2;var Ce=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=Le.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Le.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Yr(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:Le.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Le.replaceCaptures(this._contentName,e,t)}},ls=class extends Ce{retokenizeCapturedWithRuleId;constructor(e,t,r,n,i){super(e,t,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},us=class extends Ce{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,null),this._match=new ye(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ee,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dr=class extends Ce{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i){super(e,t,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ee,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},It=class extends Ce{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,i,s,o,a,c,l){super(e,t,r,n),this._begin=new ye(i,this.id),this.beginCaptures=s,this._end=new ye(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ee;for(const r of this.patterns)e.getRule(r).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}},Ge=class extends Ce{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,i,s,o,a,c){super(e,t,r,n),this._begin=new ye(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new ye(o,ln),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(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ee;for(const 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,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ee,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},un=class O{static createCaptureRule(t,r,n,i,s){return t.registerRule(o=>new ls(r,o,n,i,s))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(i=>{if(t.id=i,t.match)return new us(t.$vscodeTextmateLocation,t.id,t.name,t.match,O._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Zr({},n,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new dr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,O._compilePatterns(s,r,n))}return t.while?new Ge(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,O._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,O._compileCaptures(t.whileCaptures||t.captures,r,n),O._compilePatterns(t.patterns,r,n)):new It(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,O._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,O._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,O._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let i=[];if(t){let s=0;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in t){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let c=0;t[o].patterns&&(c=O.getCompiledRuleId(t[o],r,n)),i[a]=O.createCaptureRule(r,t[o].$vscodeTextmateLocation,t[o].name,t[o].contentName,c)}}return i}static _compilePatterns(t,r,n){let i=[];if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s];let c=-1;if(a.include){const l=cn(a.include);switch(l.kind){case 0:case 1:c=O.getCompiledRuleId(n[a.include],r,n);break;case 2:let p=n[l.ruleName];p&&(c=O.getCompiledRuleId(p,r,n));break;case 3:case 4:const d=l.scopeName,f=l.kind===4?l.ruleName:null,h=r.getExternalGrammar(d,n);if(h)if(f){let m=h.repository[f];m&&(c=O.getCompiledRuleId(m,r,h.repository))}else c=O.getCompiledRuleId(h.repository.$self,r,h.repository);break}}else c=O.getCompiledRuleId(a,r,n);if(c!==-1){const l=r.getRule(c);let p=!1;if((l instanceof dr||l instanceof It||l instanceof Ge)&&l.hasMissingPatterns&&l.patterns.length===0&&(p=!0),p)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ye=class dn{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let i=0,s=[],o=!1;for(let a=0;a<n;a++)if(t.charAt(a)==="\\"&&a+1<n){const l=t.charAt(a+1);l==="z"?(s.push(t.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(l==="A"||l==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=t:(s.push(t.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=as.test(this.source):this.hasBackReferences=!1}clone(){return new dn(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>t.substring(i.start,i.end));return ur.lastIndex=0,this.source.replace(ur,(i,s)=>rn(n[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],i=[],s,o,a,c;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),t[s]=a,r[s]=a,n[s]=a,i[s]=a,a==="\\"&&s+1<o&&(c=this.source.charAt(s+1),c==="A"?(t[s+1]="",r[s+1]="",n[s+1]="A",i[s+1]="A"):c==="G"?(t[s+1]="",r[s+1]="G",n[s+1]="",i[s+1]="G"):(t[s+1]=c,r[s+1]=c,n[s+1]=c,i[s+1]=c),s++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ee=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(),this._cached=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(r=>r.source);this._cached=new pr(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(i=>i.resolveAnchors(t,r));return new pr(e,n,this._items.map(i=>i.ruleId))}},pr=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
3
|
+
`)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},ut=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ds=class St{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new ut(t,8),this._embeddedLanguagesMatcher=new ps(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?St._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ut(0,0);_getBasicScopeAttributes=new nn(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new ut(r,n)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(St.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ps=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>rn(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},hr=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function pn(e,t,r,n,i,s,o,a){const c=t.content.length;let l=!1,p=-1;if(o){const h=hs(e,t,r,n,i,s);i=h.stack,n=h.linePos,r=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!l;){if(a!==0&&Date.now()-d>a)return new hr(i,!0);f()}return new hr(i,!1);function f(){const h=fs(e,t,r,n,i,p);if(!h){s.produce(i,c),l=!0;return}const m=h.captureIndices,y=h.matchedRuleId,E=m&&m.length>0?m[0].end>n:!1;if(y===cs){const g=i.getRule(e);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),fe(e,t,r,i,s,g.endCaptures,m),s.produce(i,m[0].end);const _=i;if(i=i.parent,p=_.getAnchorPos(),!E&&_.getEnterPos()===n){i=_,s.produce(i,c),l=!0;return}}else{const g=e.getRule(y);s.produce(i,m[0].start);const _=i,b=g.getName(t.content,m),v=i.contentNameScopesList.pushAttributed(b,e);if(i=i.push(y,n,p,m[0].end===c,null,v,v),g instanceof It){const A=g;fe(e,t,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const S=A.getContentName(t.content,m),N=v.pushAttributed(S,e);if(i=i.withContentNameScopesList(N),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(t.content,m))),!E&&_.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(g instanceof Ge){const A=g;fe(e,t,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),p=m[0].end;const S=A.getContentName(t.content,m),N=v.pushAttributed(S,e);if(i=i.withContentNameScopesList(N),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(t.content,m))),!E&&_.hasSameRuleAs(i)){i=i.pop(),s.produce(i,c),l=!0;return}}else if(fe(e,t,r,i,s,g.captures,m),s.produce(i,m[0].end),i=i.pop(),!E){i=i.safePop(),s.produce(i,c),l=!0;return}}m[0].end>n&&(n=m[0].end,r=!1)}}function hs(e,t,r,n,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let c=i;c;c=c.pop()){const l=c.getRule(e);l instanceof Ge&&a.push({rule:l,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:l,findOptions:p}=_s(c.rule,e,c.stack.endRule,r,n===o),d=l.findNextMatchSync(t,n,p);if(d){if(d.ruleId!==ln){i=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(c.stack,d.captureIndices[0].start),fe(e,t,r,c.stack,s,c.rule.whileCaptures,d.captureIndices),s.produce(c.stack,d.captureIndices[0].end),o=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:o,isFirstLine:r}}function fs(e,t,r,n,i,s){const o=ms(e,t,r,n,i,s),a=e.getInjections();if(a.length===0)return o;const c=gs(a,e,t,r,n,i,s);if(!c)return o;if(!o)return c;const l=o.captureIndices[0].start,p=c.captureIndices[0].start;return p<l||c.priorityMatch&&p===l?c:o}function ms(e,t,r,n,i,s){const o=i.getRule(e),{ruleScanner:a,findOptions:c}=hn(o,e,i.endRule,r,n===s),l=a.findNextMatchSync(t,n,c);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function gs(e,t,r,n,i,s,o){let a=Number.MAX_VALUE,c=null,l,p=0;const d=s.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(d))continue;const y=t.getRule(m.ruleId),{ruleScanner:E,findOptions:g}=hn(y,t,null,n,i===o),_=E.findNextMatchSync(r,i,g);if(!_)continue;const b=_.captureIndices[0].start;if(!(b>=a)&&(a=b,c=_.captureIndices,l=_.ruleId,p=m.priority,a===i))break}return c?{priorityMatch:p===-1,captureIndices:c,matchedRuleId:l}:null}function hn(e,t,r,n,i){return{ruleScanner:e.compileAG(t,r,n,i),findOptions:0}}function _s(e,t,r,n,i){return{ruleScanner:e.compileWhileAG(t,r,n,i),findOptions:0}}function fe(e,t,r,n,i,s,o){if(s.length===0)return;const a=t.content,c=Math.min(s.length,o.length),l=[],p=o[0].end;for(let d=0;d<c;d++){const f=s[d];if(f===null)continue;const h=o[d];if(h.length===0)continue;if(h.start>p)break;for(;l.length>0&&l[l.length-1].endPos<=h.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,h.start):i.produce(n,h.start),f.retokenizeCapturedWithRuleId){const y=f.getName(a,o),E=n.contentNameScopesList.pushAttributed(y,e),g=f.getContentName(a,o),_=E.pushAttributed(g,e),b=n.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,E,_),v=e.createOnigString(a.substring(0,h.end));pn(e,v,r&&h.start===0,h.start,b,i,!1,0),an(v);continue}const m=f.getName(a,o);if(m!==null){const E=(l.length>0?l[l.length-1].scopes:n.contentNameScopesList).pushAttributed(m,e);l.push(new ys(E,h.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ys=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Es(e,t,r,n,i,s,o,a){return new ws(e,t,r,n,i,s,o,a)}function fr(e,t,r,n,i){const s=Ve(t,Be),o=un.getCompiledRuleId(r,n,i.repository);for(const a of s)e.push({debugSelector:t,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function Be(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let i=r;i<t.length;i++)if(bs(t[i],n))return r=i+1,!0;return!1})}function bs(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var ws=class{constructor(e,t,r,n,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ds(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=mr(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const l=Ve(c,Be);for(const p of l)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const 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(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const i=n.injections;if(i)for(let o in i)fr(t,o,i[o],this,n);const s=this._grammarRepository.injections(r);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const c=a.injectionSelector;c&&fr(t,c,a,this,a)}})}return t.sort((i,s)=>i.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=mr(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=un.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Lt.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=re.set(0,l.languageId,l.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=me.createRootAndLookUpScopeName(f,d,this):h=me.createRoot("unknown",d),t=new Lt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+`
|
|
4
|
+
`;const s=this.createOnigString(e),o=s.content.length,a=new As(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=pn(this,s,i,0,t,a,!0,n);return an(s),{lineLength:o,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function mr(e,t){return e=Bi(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 me=class U{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,i=t?.scopePath??null;for(const s of r)i=lt.push(i,s.scopeNames),n=new U(n,i,s.encodedTokenAttributes);return n}static createRoot(t,r){return new U(null,new lt(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const i=n.getMetadataForScope(t),s=new lt(null,t),o=n.themeProvider.themeMatch(s),a=U.mergeAttributes(r,i,o);return new U(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return U.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let i=-1,s=0,o=0;return n!==null&&(i=n.fontStyle,s=n.foregroundId,o=n.backgroundId),re.set(t,r.languageId,r.tokenType,null,i,s,o)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return U._pushAttributed(this,t,r);const n=t.split(/ /g);let i=this;for(const s of n)i=U._pushAttributed(i,s,r);return i}static _pushAttributed(t,r,n){const i=n.getMetadataForScope(r),s=t.scopePath.push(r),o=n.themeProvider.themeMatch(s),a=U.mergeAttributes(t.tokenAttributes,i,o);return new U(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},Lt=class Z{constructor(t,r,n,i,s,o,a,c){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Z(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Z._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?me.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Z._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,i,s,o,a){return new Z(this,t,r,n,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Z(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId: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,r){const n=me.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new Z(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,me.fromExtension(n,r.contentNameScopesList))}},vs=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ve(r,Be).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>Ve(r,Be).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},As=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,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,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=e?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(n=re.set(n,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(n=re.set(n,0,8,i,-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}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),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);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},Cs=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const 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,r,n,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,Es(e,s,t,r,n,i,this,this._onigLib))}return this._grammars.get(e)}},Is=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Cs($e.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme($e.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new vs(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,i,s){const o=new es(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(t,r,n,i,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,i=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,r=0,n=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(t,r,n,i,s)}},Tt=Lt.NULL;function Fe(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?r[i]=s:i===n&&Object.assign(r,s);return r}function J(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Ss(e){return Array.isArray(e)?e:[e]}async function fn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Qe(e){return!e||["plaintext","txt","text","plain"].includes(e)}function mn(e){return e==="ansi"||Qe(e)}function Je(e){return e==="none"}function gn(e){return Je(e)}const Ls=/(\r?\n)/g;function Ke(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(Ls);let n=0;const i=[];for(let s=0;s<r.length;s+=2){const o=t?r[s]+(r[s+1]||""):r[s];i.push([o,n]),n+=r[s].length,n+=r[s+1]?.length||0}return i}const gr={light:"#333333",dark:"#bbbbbb"},_r={light:"#fffffe",dark:"#1e1e1e"},yr="__shiki_resolved";function qt(e){if(e?.[yr])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:n}=t;if(!r||!n){const a=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;a?.settings?.foreground&&(n=a.settings.foreground),a?.settings?.background&&(r=a.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?gr.light:gr.dark),r||(r=t.type==="light"?_r.light:_r.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const s=new Map;function o(a){if(s.has(a))return s.get(a);i+=1;const c=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?o(a):(s.set(a,c),c)}t.settings=t.settings.map(a=>{const c=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),l=a.settings?.background&&!a.settings.background.startsWith("#");if(!c&&!l)return a;const p={...a,settings:{...a.settings}};if(c){const d=o(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(l){const d=o(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const c=o(t.colors[a]);t.colorReplacements[c]=t.colors[a],t.colors[a]=c}return Object.defineProperty(t,yr,{enumerable:!1,writable:!1,value:!0}),t}async function _n(e){return[...new Set((await Promise.all(e.filter(t=>!mn(t)).map(async t=>await fn(t).then(r=>Array.isArray(r)?r:[r])))).flat())]}async function yn(e){return(await Promise.all(e.map(async t=>gn(t)?null:qt(await fn(t))))).filter(t=>!!t)}function En(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new C(`Circular alias \`${[...r].join(" -> ")} -> ${e}\``);r.add(e)}}return e}var Ts=class extends Is{_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,r,n={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=n,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=qt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=$e.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=En(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const n=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(n.name=e.name,this._resolvedGrammars.set(e.name,n),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const n of e)this.resolveEmbeddedLanguages(n);const t=[...this._langGraph.entries()],r=t.filter(([n,i])=>!i);if(r.length){const n=t.filter(([i,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(o=>r.map(([a])=>a).includes(o)):!1).filter(i=>!r.includes(i));throw new C(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${n.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[n,i]of t)this._resolver.addLanguage(i);for(const[n,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(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);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}},Rs=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let n=1;n<=t.length;n++){const i=t.slice(0,n).join(".");r=[...r,...this._injections.get(i)||[]]}return r}};let he=0;function Xt(e){he+=1,e.warnings!==!1&&he>=10&&he%10===0&&console.warn(`[Shiki] ${he} 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 C("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(qt),i=new Ts(new Rs(e.engine,r),n,r,e.langAlias);let s;function o(_){return En(_,e.langAlias)}function a(_){E();const b=i.getGrammar(typeof _=="string"?_:_.name);if(!b)throw new C(`Language \`${_}\` not found, you may need to load it first`);return b}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};E();const b=i.getTheme(_);if(!b)throw new C(`Theme \`${_}\` not found, you may need to load it first`);return b}function l(_){E();const b=c(_);return s!==_&&(i.setTheme(b),s=_),{theme:b,colorMap:i.getColorMap()}}function p(){return E(),i.getLoadedThemes()}function d(){return E(),i.getLoadedLanguages()}function f(..._){E(),i.loadLanguages(_.flat(1))}async function h(..._){return f(await _n(_))}function m(..._){E();for(const b of _.flat(1))i.loadTheme(b)}async function y(..._){return E(),m(await yn(_))}function E(){if(t)throw new C("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),he-=1)}return{setTheme:l,getTheme:c,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:h,loadLanguageSync:f,loadTheme:y,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const hl=Xt;async function bn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,n]=await Promise.all([yn(e.themes||[]),_n(e.langs||[]),e.engine]);return Xt({...e,themes:t,langs:r,engine:n})}const fl=bn,wn=new WeakMap;function Ze(e,t){wn.set(e,t)}function be(e){return wn.get(e)}var Ye=class vn{_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,r){return new vn(Object.fromEntries(Ss(r).map(n=>[n,Tt])),t)}constructor(...t){if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,i]=t;this.lang=n,this._stacks={[i]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return ks(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ks(e){const t=[],r=new Set;function n(i){if(r.has(i))return;r.add(i);const s=i?.nameScopesList?.scopeName;s&&t.push(s),i.parent&&n(i.parent)}return n(e),t}function Ps(e,t){if(!(e instanceof Ye))throw new C("Invalid grammar state");return e.getInternalStack(t)}const Os=/,/,xs=/ /;function An(e,t,r={}){const{theme:n=e.getLoadedThemes()[0]}=r;if(Qe(e.resolveLangAlias(r.lang||"text"))||Je(n))return Ke(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=e.setTheme(n),o=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==o.name)throw new C(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${o.name}"`);if(!r.grammarState.themes.includes(i.name))throw new C(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Ns(t,o,i,s,r)}function Cn(...e){if(e.length===2)return be(e[1]);const[t,r,n={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=n;if(Qe(i)||Je(s))throw new C("Plain language does not have grammar state");if(i==="ansi")throw new C("ANSI language does not have grammar state");const{theme:o,colorMap:a}=t.setTheme(s),c=t.getLanguage(i);return new Ye(Qt(r,c,o,a,n).stateStack,c.name,o.name)}function Ns(e,t,r,n,i){const s=Qt(e,t,r,n,i),o=new Ye(s.stateStack,t.name,r.name);return Ze(s.tokens,o),s.tokens}function Qt(e,t,r,n,i){const s=Fe(r,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500,includeExplanation:c=!1}=i,l=Ke(e);let p=i.grammarState?Ps(i.grammarState,r.name)??Tt:i.grammarContextCode!=null?Qt(i.grammarContextCode,t,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Tt,d=[];const f=[];for(let h=0,m=l.length;h<m;h++){const[y,E]=l[h];if(y===""){d=[],f.push([]);continue}if(o>0&&y.length>=o){d=[],f.push([{content:y,offset:E,color:"",fontStyle:0}]);continue}let g,_,b;c&&c!=="tokenType"&&(g=t.tokenizeLine(y,p,a),_=g.tokens,b=0);const v=t.tokenizeLine2(y,p,a),A=v.tokens.length/2;for(let S=0;S<A;S++){const N=v.tokens[2*S],B=S+1<A?v.tokens[2*S+2]:y.length;if(N===B)continue;const ie=v.tokens[2*S+1],it=J(n[re.getForeground(ie)],s),st=re.getFontStyle(ie),F={content:y.substring(N,B),offset:E+N,color:it,fontStyle:st};if(c==="tokenType")F.type=re.getTokenType(ie);else if(c){const ir=[];if(c!=="scopeName")for(const H of r.settings){let se;switch(typeof H.scope){case"string":se=H.scope.split(Os).map(ot=>ot.trim());break;case"object":se=H.scope;break;default:continue}ir.push({settings:H,selectors:se.map(ot=>ot.split(xs))})}F.explanation=[];let sr=0;for(;N+sr<B;){const H=_[b],se=y.substring(H.startIndex,H.endIndex);sr+=se.length,F.explanation.push({content:se,scopes:c==="scopeName"?Ds(H.scopes):$s(ir,H.scopes)}),b+=1}}d.push(F)}f.push(d),d=[],p=v.ruleStack}return{tokens:f,stateStack:p}}function Ds(e){return e.map(t=>({scopeName:t}))}function $s(e,t){const r=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];r[n]={scopeName:s,themeMatches:Ms(e,s,t.slice(0,n))}}return r}function Er(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Vs(e,t,r){if(!Er(e.at(-1),t))return!1;let n=e.length-2,i=r.length-1;for(;n>=0&&i>=0;)Er(e[n],r[i])&&(n-=1),i-=1;return n===-1}function Ms(e,t,r){const n=[];for(const{selectors:i,settings:s}of e)for(const o of i)if(Vs(o,t,r)){n.push(s);break}return n}function Jt(e,t,r,n=An){const i=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),s=i.map(l=>{const p=n(e,t,{...r,theme:l.theme});return{tokens:p,state:be(p),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=Gs(...s.map(l=>l.tokens)),a=o[0].map((l,p)=>l.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in r&&r.includeExplanation&&(h.explanation=d.explanation),o.forEach((m,y)=>{const{content:E,explanation:g,offset:_,...b}=m[p][f];h.variants[i[y].color]=b}),h})),c=s[0].state?new Ye(Object.fromEntries(s.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),s[0].state.lang):void 0;return c&&Ze(a,c),a}function Gs(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const i=e.map(c=>c[n]),s=t.map(()=>[]);t.forEach((c,l)=>c.push(s[l]));const o=i.map(()=>0),a=i.map(c=>c[0]);for(;a.every(c=>c);){const c=Math.min(...a.map(l=>l.content.length));for(let l=0;l<r;l++){const p=a[l];p.content.length===c?(s[l].push(p),o[l]+=1,a[l]=i[l][o[l]]):(s[l].push({...p,content:p.content.slice(0,c)}),a[l]={...p,content:p.content.slice(c),offset:p.offset+c})}}}return t}const Bs=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Fs=/["&'<>`]/g,js=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Us=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Hs=/[|\\{}()[\]^$+*?.]/g,br=new WeakMap;function Ws(e,t){if(e=e.replace(t.subset?zs(t.subset):Fs,n),t.subset||t.escapeOnly)return e;return e.replace(js,r).replace(Us,n);function r(i,s,o){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),t)}function n(i,s,o){return t.format(i.charCodeAt(0),o.charCodeAt(s+1),t)}}function zs(e){let t=br.get(e);return t||(t=qs(e),br.set(e,t)),t}function qs(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(Hs,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Xs=/[\dA-Fa-f]/;function Qs(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!Xs.test(String.fromCharCode(t))?n:n+";"}const Js=/\d/;function Ks(e,t,r){const n="&#"+String(e);return r&&t&&!Js.test(String.fromCharCode(t))?n:n+";"}const Zs=["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"],dt={nbsp:" ",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:"€"},Ys=["cent","copy","divide","gt","lt","not","para","times"],In={}.hasOwnProperty,Rt={};let Te;for(Te in dt)In.call(dt,Te)&&(Rt[dt[Te]]=Te);const eo=/[^\dA-Za-z]/;function to(e,t,r,n){const i=String.fromCharCode(e);if(In.call(Rt,i)){const s=Rt[i],o="&"+s;return r&&Zs.includes(s)&&!Ys.includes(s)&&(!n||t&&t!==61&&eo.test(String.fromCharCode(t)))?o:o+";"}return""}function ro(e,t,r){let n=Qs(e,t,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=to(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const s=Ks(e,t,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function ue(e,t){return Ws(e,Object.assign({format:ro},t))}const no=/^>|^->|<!--|-->|--!>|<!-$/g,io=[">"],so=["<",">"];function oo(e,t,r,n){return n.settings.bogusComments?"<?"+ue(e.value,Object.assign({},n.settings.characterReferences,{subset:io}))+">":"<!--"+e.value.replace(no,i)+"-->";function i(s){return ue(s,Object.assign({},n.settings.characterReferences,{subset:so}))}}function ao(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const R=Ln(1),Sn=Ln(-1),co=[];function Ln(e){return t;function t(r,n,i){const s=r?r.children:co;let o=(n||0)+e,a=s[o];if(!i)for(;a&&Vt(a);)o+=e,a=s[o];return a}}const lo={}.hasOwnProperty;function Tn(e){return t;function t(r,n,i){return lo.call(e,r.tagName)&&e[r.tagName](r,n,i)}}const Kt=Tn({body:po,caption:pt,colgroup:pt,dd:go,dt:mo,head:pt,html:uo,li:fo,optgroup:_o,option:yo,p:ho,rp:wr,rt:wr,tbody:bo,td:vr,tfoot:wo,th:vr,thead:Eo,tr:vo});function pt(e,t,r){const n=R(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Vt(n.value.charAt(0)))}function uo(e,t,r){const n=R(r,t);return!n||n.type!=="comment"}function po(e,t,r){const n=R(r,t);return!n||n.type!=="comment"}function ho(e,t,r){const n=R(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function fo(e,t,r){const n=R(r,t);return!n||n.type==="element"&&n.tagName==="li"}function mo(e,t,r){const n=R(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function go(e,t,r){const n=R(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function wr(e,t,r){const n=R(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function _o(e,t,r){const n=R(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function yo(e,t,r){const n=R(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function Eo(e,t,r){const n=R(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function bo(e,t,r){const n=R(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function wo(e,t,r){return!R(r,t)}function vo(e,t,r){const n=R(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function vr(e,t,r){const n=R(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const Ao=Tn({body:So,colgroup:Lo,head:Io,html:Co,tbody:To});function Co(e){const t=R(e,-1);return!t||t.type!=="comment"}function Io(e){const t=new Set;for(const 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)}const r=e.children[0];return!r||r.type==="element"}function So(e){const t=R(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Vt(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Lo(e,t,r){const n=Sn(r,t),i=R(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Kt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function To(e,t,r){const n=Sn(r,t),i=R(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Kt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Re={name:[[`
|
|
5
|
+
\f\r &/=>`.split(""),`
|
|
6
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
7
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
8
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
9
|
+
\f\r &>`.split(""),`\0
|
|
10
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
11
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
12
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ro(e,t,r,n){const i=n.schema,s=i.space==="svg"?!1:n.settings.omitOptionalTags;let o=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const a=[];let c;i.space==="html"&&e.tagName==="svg"&&(n.schema=zr);const l=ko(n,e.properties),p=n.all(i.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=i,p&&(o=!1),(l||!s||!Ao(e,t,r))&&(a.push("<",e.tagName,l?" "+l:""),o&&(i.space==="svg"||n.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!n.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(p),!o&&(!s||!Kt(e,t,r))&&a.push("</"+e.tagName+">"),a.join("")}function ko(e,t){const r=[];let n=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=Po(e,i,t[i]);s&&r.push(s)}}for(;++n<r.length;){const s=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&s!=='"'&&s!=="'"&&(r[n]+=" ")}return r.join("")}function Po(e,t,r){const n=hi(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let o=e.quote,a;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const c=ue(n.attribute,Object.assign({},e.settings.characterReferences,{subset:Re.name[i][s]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?fi:mi)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?c:(e.settings.preferUnquoted&&(a=ue(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Re.unquoted[i][s]}))),a!==r&&(e.settings.quoteSmart&&or(r,o)>or(r,e.alternative)&&(o=e.alternative),a=o+ue(r,Object.assign({},e.settings.characterReferences,{subset:(o==="'"?Re.single:Re.double)[i][s],attribute:!0}))+o),c+(a&&"="+a))}const Oo=["<","&"];function Rn(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:ue(e.value,Object.assign({},n.settings.characterReferences,{subset:Oo}))}function xo(e,t,r,n){return n.settings.allowDangerousHtml?e.value:Rn(e,t,r,n)}function No(e,t,r,n){return n.all(e)}const Do=_i("type",{invalid:$o,unknown:Vo,handlers:{comment:oo,doctype:ao,element:Ro,raw:xo,root:No,text:Rn}});function $o(e){throw new Error("Expected node, not `"+e+"`")}function Vo(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Mo={},Go={},Bo=[];function Fo(e,t){const r=t||Mo,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:jo,all:Uo,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||Bs,characterReferences:r.characterReferences||Go,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?zr:gi,quote:n,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function jo(e,t,r){return Do(e,t,r,this)}function Uo(e){const t=[],r=e&&e.children||Bo;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}const Ar=/\s+/g;function kn(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(Ar)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(Ar);for(const n of r)n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}const Ho=/:?lang=["']([^"']+)["']/g,Wo=/(?:```|~~~)([\w-]+)/g,zo=/\\begin\{([\w-]+)\}/g,qo=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function Xo(e){const t=Ke(e,!0).map(([i])=>i);function r(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let s=i,o=0;for(const a of t){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function n(i,s){let o=0;for(let a=0;a<i;a++)o+=t[a].length;return o+=s,o}return{lines:t,indexToPos:r,posToIndex:n}}function Qo(e,t,r){const n=new Set;for(const s of e.matchAll(Ho)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of e.matchAll(Wo)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of e.matchAll(zo)){const o=s[1].toLowerCase().trim();o&&n.add(o)}for(const s of e.matchAll(qo)){const o=s[1].toLowerCase().trim(),a=o.includes("/")?o.split("/").pop():o;a&&n.add(a)}if(!r)return[...n];const i=r.getBundledLanguages();return[...n].filter(s=>s&&i[s])}const Jo=["color","background-color"];function Ko(e,t){let r=0;const n=[];for(const i of t)i>r&&n.push({...e,content:e.content.slice(r,i),offset:e.offset+r}),r=i;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function Zo(e,t){const r=[...t instanceof Set?t:new Set(t)].sort((n,i)=>n-i);return r.length?e.map(n=>n.flatMap(i=>{const s=r.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,a)=>o-a);return s.length?Ko(i,s):i})):e}function Yo(e,t,r,n,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(p=>je(e.variants[p])),a=new Set(o.flatMap(p=>Object.keys(p))),c={},l=(p,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+t[p]+(d==="color"?"":f)};return o.forEach((p,d)=>{for(const f of a){const h=p[f]||"inherit";if(d===0&&n&&Jo.includes(f))if(n==="light-dark()"&&o.length>1){const m=t.findIndex(E=>E==="light"),y=t.findIndex(E=>E==="dark");if(m===-1||y===-1)throw new C('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[f]=`light-dark(${o[m][f]||"inherit"}, ${o[y][f]||"inherit"})`,i==="css-vars"&&(c[l(d,f)]=h)}else c[f]=h;else i==="css-vars"&&(c[l(d,f)]=h)}}),s.htmlStyle=c,s}function je(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&x.Italic&&(t["font-style"]="italic"),e.fontStyle&x.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&x.Underline&&r.push("underline"),e.fontStyle&x.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function kt(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}function ea(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>r.source.length)throw new C(`Invalid decoration offset: ${o}. Code length: ${r.source.length}`);return{...n.indexToPos(o),offset:o}}else{const a=n.lines[o.line];if(a===void 0)throw new C(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${n.lines.length}`);let c=o.character;if(c<0&&(c=a.length+c),c<0||c>a.length)throw new C(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,character:c,offset:n.posToIndex(o.line,c)}}};const n=Xo(r.source),s=(r.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));ta(s),e.set(r.meta,{decorations:s,converter:n,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(this.options.decorations?.length)return Zo(r,t(this).decorations.flatMap(n=>[n.start.offset,n.end.offset]))},code(r){if(!this.options.decorations?.length)return;const n=t(this),i=[...r.children].filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==n.converter.lines.length)throw new C(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function s(p,d,f,h){const m=i[p];let y="",E=-1,g=-1;if(d===0&&(E=0),f===0&&(g=0),f===Number.POSITIVE_INFINITY&&(g=m.children.length),E===-1||g===-1)for(let b=0;b<m.children.length;b++)y+=Pn(m.children[b]),E===-1&&y.length===d&&(E=b+1),g===-1&&y.length===f&&(g=b+1);if(E===-1)throw new C(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(g===-1)throw new C(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const _=m.children.slice(E,g);if(!h.alwaysWrap&&_.length===m.children.length)a(m,h,"line");else if(!h.alwaysWrap&&_.length===1&&_[0].type==="element")a(_[0],h,"token");else{const b={type:"element",tagName:"span",properties:{},children:_};a(b,h,"wrapper"),m.children.splice(E,_.length,b)}}function o(p,d){i[p]=a(i[p],d,"line")}function a(p,d,f){const h=d.properties||{},m=d.transform||(y=>y);return p.tagName=d.tagName||"span",p.properties={...p.properties,...h,class:p.properties.class},d.properties?.class&&kn(p,d.properties.class),p=m(p,f)||p,p}const c=[],l=n.decorations.sort((p,d)=>d.start.offset-p.start.offset||p.end.offset-d.end.offset);for(const p of l){const{start:d,end:f}=p;if(d.line===f.line)s(d.line,d.character,f.character,p);else if(d.line<f.line){s(d.line,d.character,Number.POSITIVE_INFINITY,p);for(let h=d.line+1;h<f.line;h++)c.unshift(()=>o(h,p));s(f.line,0,f.character,p)}}c.forEach(p=>p())}}}function ta(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new C(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const i=e[n],s=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,o=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,a=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,c=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(s||o||a||c){if(s&&o||a&&c||a&&r.start.offset===r.end.offset||o&&i.start.offset===i.end.offset)continue;throw new C(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function Pn(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Pn).join(""):""}const ra=[ea()];function Ue(e){const t=na(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ra]}function na(e){const t=[],r=[],n=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:t,post:r,normal:n}}var ee=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ht={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ia(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const n=e.indexOf("m",r);if(n!==-1)return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function Cr(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function sa(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)t.push({type:"resetAll"});else if(n<=9)ht[n]&&t.push({type:"setDecoration",value:ht[n]});else if(n<=29){const i=ht[n-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ee[n-30]}});else if(n===38){const i=Cr(e);i&&t.push({type:"setForegroundColor",value:i})}else if(n===39)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ee[n-40]}});else if(n===48){const i=Cr(e);i&&t.push({type:"setBackgroundColor",value:i})}else n===49?t.push({type:"resetBackgroundColor"}):n===53?t.push({type:"setDecoration",value:"overline"}):n===55?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ee[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ee[n-100+8]}})}return t}function oa(){let e=null,t=null,r=new Set;return{parse(n){const i=[];let s=0;do{const o=ia(n,s),a=o.sequence?n.substring(s,o.startPosition):n.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(r)}),o.sequence){const c=sa(o.sequence);for(const l of c)l.type==="resetAll"?(e=null,t=null,r.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&r.delete(l.value);for(const l of c)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&r.add(l.value)}s=o.position}while(s<n.length);return i}}}var aa={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function ca(e=aa){function t(a){return e[a]}function r(a){return`#${a.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let l=0;l<ee.length;l++)n.push(t(ee[l]));let a=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let p=0;p<6;p++)for(let d=0;d<6;d++)n.push(r([a[l],a[p],a[d]]));let c=8;for(let l=0;l<24;l++,c+=10)n.push(r([c,c,c]));return n}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return t(a.name);case"rgb":return r(a.rgb);case"table":return s(a.index)}}return{value:o}}const la=/#([0-9a-f]{3,8})/i,ua=/var\((--[\w-]+-ansi-[\w-]+)\)/,da={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function pa(e,t,r){const n=Fe(e,r),i=Ke(t),s=ca(Object.fromEntries(ee.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,e.colors?.[c]||da[a]]}))),o=oa();return i.map(a=>o.parse(a[0]).map(c=>{let l,p;c.decorations.has("reverse")?(l=c.background?s.value(c.background):e.bg,p=c.foreground?s.value(c.foreground):e.fg):(l=c.foreground?s.value(c.foreground):e.fg,p=c.background?s.value(c.background):void 0),l=J(l,n),p=J(p,n),c.decorations.has("dim")&&(l=ha(l));let d=x.None;return c.decorations.has("bold")&&(d|=x.Bold),c.decorations.has("italic")&&(d|=x.Italic),c.decorations.has("underline")&&(d|=x.Underline),c.decorations.has("strikethrough")&&(d|=x.Strikethrough),{content:c.value,offset:a[1],color:l,bgColor:p,fontStyle:d}}))}function ha(e){const t=e.match(la);if(t){const n=t[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],s=n[1],o=n[2],a=n[3];return`#${i}${i}${s}${s}${o}${o}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(n.length===3){const i=n[0],s=n[1],o=n[2];return`#${i}${i}${s}${s}${o}${o}80`}}}const r=e.match(ua);return r?`var(${r[1]}-dim)`:e}function He(e,t,r={}){const n=e.resolveLangAlias(r.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=r;if(!Qe(n)&&!Je(i)&&n==="ansi"){const{theme:s}=e.setTheme(i);return pa(s,t,r)}return An(e,t,r)}function we(e,t,r){let n,i,s,o,a,c;if("themes"in r){const{defaultColor:l="light",cssVariablePrefix:p="--shiki-",colorsRendering:d="css-vars"}=r,f=Object.entries(r.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,_)=>g.color===l?-1:_.color===l?1:0);if(f.length===0)throw new C("`themes` option must not be empty");const h=Jt(e,t,r,He);if(c=be(h),l&&l!=="light-dark()"&&!f.some(g=>g.color===l))throw new C(`\`themes\` option must contain the defaultColor key \`${l}\``);const m=f.map(g=>e.getTheme(g.theme)),y=f.map(g=>g.color);s=h.map(g=>g.map(_=>Yo(_,y,p,l,d))),c&&Ze(s,c);const E=f.map(g=>Fe(g.theme,r));i=Ir(f,m,E,p,l,"fg",d),n=Ir(f,m,E,p,l,"bg",d),o=`shiki-themes ${m.map(g=>g.name).join(" ")}`,a=l?void 0:[i,n].join(";")}else if("theme"in r){const l=Fe(r.theme,r);s=He(e,t,r);const p=e.getTheme(r.theme);n=J(p.bg,l),i=J(p.fg,l),o=p.name,c=be(s)}else throw new C("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:n,themeName:o,rootStyle:a,grammarState:c}}function Ir(e,t,r,n,i,s,o){return e.map((a,c)=>{const l=J(t[c][s],r[c])||"inherit",p=`${n+a.color}${s==="bg"?"-bg":""}:${l}`;if(c===0&&i){if(i==="light-dark()"&&e.length>1){const d=e.findIndex(h=>h.color==="light"),f=e.findIndex(h=>h.color==="dark");if(d===-1||f===-1)throw new C('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${J(t[d][s],r[d])||"inherit"}, ${J(t[f][s],r[f])||"inherit"});${p}`}return l}return o==="css-vars"?p:null}).filter(a=>!!a).join(";")}const On=/^\s+$/,fa=/^(\s*)(.*?)(\s*)$/;function ve(e,t,r,n={meta:{},options:r,codeToHast:(i,s)=>ve(e,i,s),codeToTokens:(i,s)=>we(e,i,s)}){let i=t;for(const m of Ue(r))i=m.preprocess?.call(n,i,r)||i;let{tokens:s,fg:o,bg:a,themeName:c,rootStyle:l,grammarState:p}=we(e,i,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=r;d===!0?s=ga(s):d==="never"&&(s=_a(s)),f&&(s=ya(s));const h={...n,get source(){return i}};for(const m of Ue(r))s=m.tokens?.call(h,s)||s;return ma(s,{...r,fg:o,bg:a,themeName:c,rootStyle:r.rootStyle===!1?!1:r.rootStyle??l},h,p)}function ma(e,t,r,n=be(e)){const i=Ue(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=t,l={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?l.style=t.rootStyle:l.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(l.tabindex=c.toString());for(const[y,E]of Object.entries(t.meta||{}))y.startsWith("_")||(l[y]=E);let p={type:"element",tagName:"pre",properties:l,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s};const f=[],h={...r,structure:a,addClassToHast:kn,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return p},get code(){return d},get lines(){return f}};if(e.forEach((y,E)=>{E&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
|
|
13
|
+
`}));let g={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const b of y){let v={type:"element",tagName:"span",properties:{...b.htmlAttrs},children:[{type:"text",value:b.content}]};const A=kt(b.htmlStyle||je(b));A&&(v.properties.style=A);for(const S of i)v=S?.span?.call(h,v,E+1,_,g,b)||v;a==="inline"?o.children.push(v):a==="classic"&&g.children.push(v),_+=b.content.length}if(a==="classic"){for(const b of i)g=b?.line?.call(h,g,E+1)||g;f.push(g),s.push(g)}else a==="inline"&&f.push(g)}),a==="classic"){for(const y of i)d=y?.code?.call(h,d)||d;p.children.push(d);for(const y of i)p=y?.pre?.call(h,p)||p;o.children.push(p)}else if(a==="inline"){const y=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of o.children)_.type==="element"&&_.tagName==="br"?(y.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&E.children.push(_);y.push(E);let g={type:"element",tagName:"code",properties:{},children:y};for(const _ of i)g=_?.code?.call(h,g)||g;o.children=[];for(let _=0;_<g.children.length;_++){_>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const b=g.children[_];b.type==="element"&&o.children.push(...b.children)}}let m=o;for(const y of i)m=y?.root?.call(h,m)||m;return n&&Ze(m,n),m}function ga(e){return e.map(t=>{const r=[];let n="",i;return t.forEach((s,o)=>{const a=!(s.fontStyle&&(s.fontStyle&x.Underline||s.fontStyle&x.Strikethrough));a&&On.test(s.content)&&t[o+1]?(i===void 0&&(i=s.offset),n+=s.content):n?(a?r.push({...s,offset:i,content:n+s.content}):r.push({content:n,offset:i},s),i=void 0,n=""):r.push(s)}),r})}function _a(e){return e.map(t=>t.flatMap(r=>{if(On.test(r.content))return r;const n=r.content.match(fa);if(!n)return r;const[,i,s,o]=n;if(!i&&!o)return r;const a=[{...r,offset:r.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:r.offset}),o&&a.push({content:o,offset:r.offset+i.length+s.length}),a}))}function ya(e){return e.map(t=>{const r=[];for(const n of t){if(r.length===0){r.push({...n});continue}const i=r.at(-1),s=kt(i.htmlStyle||je(i)),o=kt(n.htmlStyle||je(n)),a=i.fontStyle&&(i.fontStyle&x.Underline||i.fontStyle&x.Strikethrough),c=n.fontStyle&&(n.fontStyle&x.Underline||n.fontStyle&x.Strikethrough);!a&&!c&&s===o?i.content+=n.content:r.push({...n})}return r})}const Ea=Fo;function xn(e,t,r){const n={meta:{},options:r,codeToHast:(s,o)=>ve(e,s,o),codeToTokens:(s,o)=>we(e,s,o)};let i=Ea(ve(e,t,r,n));for(const s of Ue(r))i=s.postprocess?.call(n,i,r)||i;return i}async function Nn(e){const t=await bn(e);return{getLastGrammarState:(...r)=>Cn(t,...r),codeToTokensBase:(r,n)=>He(t,r,n),codeToTokensWithThemes:(r,n)=>Jt(t,r,n),codeToTokens:(r,n)=>we(t,r,n),codeToHast:(r,n)=>ve(t,r,n),codeToHtml:(r,n)=>xn(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ml(e){const t=Xt(e);return{getLastGrammarState:(...r)=>Cn(t,...r),codeToTokensBase:(r,n)=>He(t,r,n),codeToTokensWithThemes:(r,n)=>Jt(t,r,n),codeToTokens:(r,n)=>we(t,r,n),codeToHast:(r,n)=>ve(t,r,n),codeToHtml:(r,n)=>xn(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function ba(e){let t;async function r(n){if(t){const i=await t;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}else return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}return r}const gl=ba(Nn);function wa(e){const t=e.langs,r=e.themes,n=e.engine;async function i(s){function o(d){if(typeof d=="string"){if(d=s.langAlias?.[d]||d,mn(d))return[];const f=t[d];if(!f)throw new C(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function a(d){if(gn(d))return"none";if(typeof d=="string"){const f=r[d];if(!f)throw new C(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const c=(s.themes??[]).map(d=>a(d)),l=(s.langs??[]).map(d=>o(d)),p=await Nn({engine:s.engine??n(),...s,themes:c,langs:l});return{...p,loadLanguage(...d){return p.loadLanguage(...d.map(o))},loadTheme(...d){return p.loadTheme(...d.map(a))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return i}function va(e){let t;async function r(n={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}else{t=e({...n,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...n.themes||[]),i.loadLanguage(...n.langs||[])]),i}}return r}function Aa(e,t){const r=va(e);async function n(i,s){const o=await r({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),a=await t?.guessEmbeddedLanguages?.(i,s.lang,o);return a&&await o.loadLanguage(...a),o}return{getSingletonHighlighter(i){return r(i)},async codeToHtml(i,s){return(await n(i,s)).codeToHtml(i,s)},async codeToHast(i,s){return(await n(i,s)).codeToHast(i,s)},async codeToTokens(i,s){return(await n(i,s)).codeToTokens(i,s)},async codeToTokensBase(i,s){return(await n(i,s)).codeToTokensBase(i,s)},async codeToTokensWithThemes(i,s){return(await n(i,s)).codeToTokensWithThemes(i,s)},async getLastGrammarState(i,s){return(await r({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(i,s)}}}function _l(e={}){const{name:t="css-variables",variablePrefix:r="--shiki-",fontStyle:n=!0}=e,i=o=>e.variableDefaults?.[o]?`var(${r}${o}, ${e.variableDefaults[o]})`:`var(${r}${o})`,s={name:t,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return n||(s.tokenColors=s.tokenColors?.map(o=>(o.settings?.fontStyle&&delete o.settings.fontStyle,o))),s}var Ca=Mt({bundledLanguages:()=>Ft,bundledLanguagesAlias:()=>Bt,bundledLanguagesBase:()=>Gt,bundledLanguagesInfo:()=>ze,bundledThemes:()=>Ut,bundledThemesInfo:()=>jt,codeToHast:()=>$n,codeToHtml:()=>Dn,codeToTokens:()=>Vn,codeToTokensBase:()=>Mn,codeToTokensWithThemes:()=>Gn,createHighlighter:()=>Zt,getLastGrammarState:()=>Fn,getSingletonHighlighter:()=>Bn});const Zt=wa({langs:Ft,themes:Ut,engine:()=>(0,Kr.createOnigurumaEngine)(u(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Dn,codeToHast:$n,codeToTokens:Vn,codeToTokensBase:Mn,codeToTokensWithThemes:Gn,getSingletonHighlighter:Bn,getLastGrammarState:Fn}=Aa(Zt,{guessEmbeddedLanguages:Qo}),Sr=4294967295;var Ia=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:r=!1,cache:n,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;const o=n?.get(s);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const a=i(s);return n?.set(s,a),a}catch(a){if(n?.set(s,a),r)return null;throw a}})}findNextMatchSync(e,t,r){const n=typeof e=="string"?e:e.content,i=[];function s(o,a,c=0){return{index:o,captureIndices:a.indices.map(l=>l==null?{start:Sr,end:Sr,length:0}:{start:l[0]+c,end:l[1]+c,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const a=this.regexps[o];if(a)try{a.lastIndex=t;const c=a.exec(n);if(!c)continue;if(c.index===t)return s(o,c,0);i.push([o,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(i.length){const o=Math.min(...i.map(a=>a[1].index));for(const[a,c,l]of i)if(c.index===o)return s(a,c,l)}return null}};function de(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Sa(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}const Yt=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),P=String.raw;function pe(e,t){if(e==null)throw new Error(t??"Value expected");return e}const jn=P`\[\^?`,Un=`c.? | C(?:-.?)?|${P`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${P`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${P`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${P`o\{[^\}]*\}?`}|${P`\d{1,3}`}`,er=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ke=new RegExp(P`
|
|
14
|
+
\\ (?:
|
|
15
|
+
${Un}
|
|
16
|
+
| [gk]<[^>]*>?
|
|
17
|
+
| [gk]'[^']*'?
|
|
18
|
+
| .
|
|
19
|
+
)
|
|
20
|
+
| \( (?:
|
|
21
|
+
\? (?:
|
|
22
|
+
[:=!>({]
|
|
23
|
+
| <[=!]
|
|
24
|
+
| <[^>]*>
|
|
25
|
+
| '[^']*'
|
|
26
|
+
| ~\|?
|
|
27
|
+
| #(?:[^)\\]|\\.?)*
|
|
28
|
+
| [^:)]*[:)]
|
|
29
|
+
)?
|
|
30
|
+
| \*[^\)]*\)?
|
|
31
|
+
)?
|
|
32
|
+
| (?:${er.source})+
|
|
33
|
+
| ${jn}
|
|
34
|
+
| .
|
|
35
|
+
`.replace(/\s+/g,""),"gsu"),ft=new RegExp(P`
|
|
36
|
+
\\ (?:
|
|
37
|
+
${Un}
|
|
38
|
+
| .
|
|
39
|
+
)
|
|
40
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
41
|
+
| ${jn}
|
|
42
|
+
| &&
|
|
43
|
+
| .
|
|
44
|
+
`.replace(/\s+/g,""),"gsu");function La(e,t={}){const r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const n=za(r.flags),i=[n.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:r.rules.singleline};let o=[],a;for(ke.lastIndex=0;a=ke.exec(e);){const d=Ta(s,e,a[0],ke.lastIndex);d.tokens?o.push(...d.tokens):d.token&&o.push(d.token),d.lastIndex!==void 0&&(ke.lastIndex=d.lastIndex)}const c=[];let l=0;o.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++l:d.raw==="("&&c.push(d)}),l||c.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const p=l||c.length;return{tokens:o.map(d=>d.type==="EscapedNumber"?Xa(d,p):d).flat(),flags:n}}function Ta(e,t,r,n){const[i,s]=r;if(r==="["||r==="[^"){const o=Ra(t,r,n);return{tokens:o.tokens,lastIndex:o.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:Lr(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Ga(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:Wn(r)}}if(s==="K")return{token:zn("keep",r)};if(s==="N"||s==="R")return{token:te("newline",r,{negate:s==="N"})};if(s==="O")return{token:te("any",r)};if(s==="X")return{token:te("text_segment",r)};const o=Hn(r,{inCharClass:!1});return Array.isArray(o)?{tokens:o}:{token:o}}if(i==="("){if(s==="*")return{token:Ua(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(t[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:ja(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:ce("group",r)};if(r==="(?>")return{token:ce("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:ce(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:ce("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:ce("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:$a(r)}}if(e.getCurrentModX()){if(r==="#"){const o=t.indexOf(`
|
|
45
|
+
`,n);return{lastIndex:o===-1?t.length:o}}if(/^\s$/.test(r)){const o=/\s+/y;return o.lastIndex=n,{lastIndex:o.exec(t)?o.lastIndex:n}}}if(r===".")return{token:te("dot",r)};if(r==="^"||r==="$"){const o=e.singleline?{"^":P`\A`,$:P`\Z`}[r]:r;return{token:Lr(o,r)}}return r==="|"?{token:Pa(r)}:er.test(r)?{tokens:Qa(r)}:{token:q(de(r),r)}}function Ra(e,t,r){const n=[Tr(t[1]==="^",t)];let i=1,s;for(ft.lastIndex=r;s=ft.exec(e);){const o=s[0];if(o[0]==="["&&o[1]!==":")i++,n.push(Tr(o[1]==="^",o));else if(o==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(q(93,o));else if(i--,n.push(Oa(o)),!i)break}else{const a=ka(o);Array.isArray(a)?n.push(...a):n.push(a)}}return{tokens:n,lastIndex:ft.lastIndex||e.length}}function ka(e){if(e[0]==="\\")return Hn(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Yt.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return te("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?xa(e):e==="&&"?Na(e):q(de(e),e)}function Hn(e,{inCharClass:t}){const r=e[1];if(r==="c"||r==="C")return Fa(e);if("dDhHsSwW".includes(r))return Ha(e);if(e.startsWith(P`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Wa(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const n=e.split(/\\x/).slice(1).map(o=>parseInt(o,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),s=new TextEncoder;return[...i].map(o=>{const a=[...s.encode(o)].map(c=>`\\x${c.toString(16)}`).join("");return q(de(o),a)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return q(qa(e),e);if(Rr.has(r))return q(Rr.get(r),e);if(/\d/.test(r))return Da(t,e);if(e==="\\")throw new Error(P`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return q(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Pa(e){return{type:"Alternator",raw:e}}function Lr(e,t){return{type:"Assertion",kind:e,raw:t}}function Wn(e){return{type:"Backreference",raw:e}}function q(e,t){return{type:"Character",value:e,raw:t}}function Oa(e){return{type:"CharacterClassClose",raw:e}}function xa(e){return{type:"CharacterClassHyphen",raw:e}}function Na(e){return{type:"CharacterClassIntersector",raw:e}}function Tr(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function te(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function zn(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:pe(r.flags),raw:t}}function Da(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function $a(e){return{type:"GroupClose",raw:e}}function ce(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function Va(e,t,r,n){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:n}}function Ma(e,t,r,n){return{type:"Quantifier",kind:e,min:t,max:r,raw:n}}function Ga(e){return{type:"Subroutine",raw:e}}const Ba=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Rr=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Fa(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return q(de(t.toUpperCase())-64,e)}function ja(e,t){let{on:r,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??="";const i=(t.getCurrentModX()||r.includes("x"))&&!n.includes("x"),s=Pr(r),o=Pr(n),a={};if(s&&(a.enable=s),o&&(a.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),zn("flags",e,{flags:a});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,ce("group",e,{...(s||o)&&{flags:a}});throw new Error(`Unexpected flag modifier "${e}"`)}function Ua(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:n,args:i}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[o,a,c]=s,l=Ba.has(r)?r.toLowerCase():"custom";switch(l){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof o=="string")throw new Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof o=="string"&&!/^[A-Za-z_]\w*$/.test(o))throw new Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${l}"`)}return Va(l,n??null,i?.split(",")??null,e)}function kr(e){let t=null,r,n;if(e[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||s&&+s>o)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+i,n=s===void 0?+i:s===""?1/0:+s,r>n&&(t="possessive",[r,n]=[n,r]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,n=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Ma(t,r,n,e)}function Ha(e){const t=e[1].toLowerCase();return te({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Wa(e){const{p:t,neg:r,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return te("property",e,{value:n,negate:t==="P"&&!r||t==="p"&&!!r})}function Pr(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function za(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const n=e[r];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return t}function qa(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Xa(e,t){const{raw:r,inCharClass:n}=e,i=r.slice(1);if(!n&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[Wn(r)];const s=[],o=i.match(/^[0-7]+|\d/g);for(let a=0;a<o.length;a++){const c=o[a];let l;if(a===0&&c!=="8"&&c!=="9"){if(l=parseInt(c,8),l>127)throw new Error(P`Octal encoded byte above 177 unsupported "${r}"`)}else l=de(c);s.push(q(l,(a===0?"\\":"")+c))}return s}function Qa(e){const t=[],r=new RegExp(er,"gy");let n;for(;n=r.exec(e);){const i=n[0];if(i[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(s){const{min:o,max:a}=s.groups;if(+o>+a&&i.endsWith("?")){r.lastIndex--,t.push(kr(i.slice(0,-1)));continue}}}t.push(kr(i))}return t}function qn(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(n=>t[n]===r[n])}function Ja(e){return Ka.has(e.type)}const Ka=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Xn(e,t={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},n=La(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),i=(f,h)=>{const m=n.tokens[s.nextIndex];switch(s.parent=f,s.nextIndex++,m.type){case"Alternator":return ne();case"Assertion":return Za(m);case"Backreference":return Ya(m,s);case"Character":return et(m.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return ec(m,s,h);case"CharacterClassOpen":return tc(m,s,h);case"CharacterSet":return rc(m,s);case"Directive":return cc(m.kind,{flags:m.flags});case"GroupOpen":return nc(m,s,h);case"NamedCallout":return uc(m.kind,m.tag,m.arguments);case"Quantifier":return ic(m,s);case"Subroutine":return sc(m,s);default:throw new Error(`Unexpected token type "${m.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:i},o=pc(lc(n.flags));let a=o.body[0];for(;s.nextIndex<n.tokens.length;){const f=i(a,{});f.type==="Alternative"?(o.body.push(f),a=f):a.body.push(f)}const{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:p,subroutines:d}=s;if(l&&p.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of d)if(typeof f=="number"){if(f>c.length)throw new Error("Subroutine uses a group number that's not defined");f&&(c[f-1].isSubroutined=!0)}else if(p.has(f)){if(p.get(f).length>1)throw new Error(P`Subroutine uses a duplicate group name "\g<${f}>"`);p.get(f)[0].isSubroutined=!0}else throw new Error(P`Subroutine uses a group name that's not defined "\g<${f}>"`);return o}function Za({kind:e}){return Pt(pe({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===P`\B`||e===P`\Y`})}function Ya({raw:e},t){const r=/^\\k[<']/.test(e),n=r?e.slice(3,-1):e.slice(1),i=(s,o=!1)=>{const a=t.capturingGroups.length;let c=!1;if(s>a)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Ot(o?a+1-s:s,{orphan:c})};if(r){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(s)return i(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${e}"`);return Ot(n)}return i(+n)}function ec(e,t,r){const{tokens:n,walk:i}=t,s=t.parent,o=s.body.at(-1),a=n[t.nextIndex];if(!r.isCheckingRangeEnd&&o&&o.type!=="CharacterClass"&&o.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){const c=i(s,{...r,isCheckingRangeEnd:!0});if(o.type==="Character"&&c.type==="Character")return s.body.pop(),ac(o,c);throw new Error("Invalid character class range")}return et(de("-"))}function tc({negate:e},t,r){const{tokens:n,walk:i}=t,s=[De()],o=n[t.nextIndex];let a=Nr(o);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(De()),t.nextIndex++;else{const l=s.at(-1);l.body.push(i(l,r))}a=Nr(n[t.nextIndex],o)}const c=De({negate:e});return s.length===1?c.body=s[0].body:(c.kind="intersection",c.body=s.map(l=>l.body.length===1?l.body[0]:l)),t.nextIndex++,c}function rc({kind:e,negate:t,value:r},n){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o}=n;if(e==="property"){const a=tt(r);if(Yt.has(a)&&!o?.has(a))e="posix",r=a;else return le(r,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:o})}return e==="posix"?dc(r,{negate:t}):xt(e,{negate:t})}function nc(e,t,r){const{tokens:n,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:o,walk:a}=t,c=hc(e),l=c.type==="AbsenceFunction",p=xr(c),d=p&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Sa(s,c.name,[]).push(c)),l&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=Dr(n[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")c.body.push(ne()),t.nextIndex++;else{const h=c.body.at(-1),m=a(h,{...r,isInAbsenceFunction:r.isInAbsenceFunction||l,isInLookbehind:r.isInLookbehind||p,isInNegLookbehind:r.isInNegLookbehind||d});if(h.body.push(m),(p||r.isInLookbehind)&&!o){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(d||r.isInNegLookbehind){if(Or(m)||m.type==="CapturingGroup")throw new Error(y)}else if(Or(m)||xr(m)&&m.negate)throw new Error(y)}}f=Dr(n[t.nextIndex])}return t.nextIndex++,c}function ic({kind:e,min:t,max:r},n){const i=n.parent,s=i.body.at(-1);if(!s||!Ja(s))throw new Error("Quantifier requires a repeatable token");const o=Jn(e,t,r,s);return i.body.pop(),o}function sc({raw:e},t){const{capturingGroups:r,subroutines:n}=t;let i=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(s){const a=+s.groups.num,c=r.length;if(t.hasNumberedRef=!0,i={"":a,"+":c+a,"-":c+1-a}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const o=Kn(i);return n.push(o),o}function oc(e,t){return{type:"AbsenceFunction",kind:e,body:Ie(t?.body)}}function ne(e){return{type:"Alternative",body:Zn(e?.body)}}function Pt(e,t){const r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!t?.negate),r}function Ot(e,t){const r=!!t?.orphan;return{type:"Backreference",ref:e,...r&&{orphan:r}}}function Qn(e,t){const r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!fc(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Ie(t?.body)}}function et(e,t){const r={useLastValid:!1,...t};if(e>1114111){const n=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:e}}function De(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Zn(e?.body)}}function ac(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function xt(e,t){const r=!!t?.negate,n={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(n.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(n.variableLength=!0),n}function cc(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:pe(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function lc(e){return{type:"Flags",...e}}function M(e){const t=e?.atomic,r=e?.flags;if(t&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:Ie(e?.body)}}function Y(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ie(e?.body)}}function uc(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function dc(e,t){const r=!!t?.negate;if(!Yt.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function Jn(e,t,r,n){if(t>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:n}}function pc(e,t){return{type:"Regex",body:Ie(t?.body),flags:e}}function Kn(e){return{type:"Subroutine",ref:e}}function le(e,t){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let n=r.unicodePropertyMap?.get(tt(e));if(!n){if(r.normalizeUnknownPropertyNames)n=mc(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(P`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:r.negate}}function hc({flags:e,kind:t,name:r,negate:n,number:i}){switch(t){case"absence_repeater":return oc("repeater");case"atomic":return M({atomic:!0});case"capturing":return Qn(i,{name:r});case"group":return M({flags:e});case"lookahead":case"lookbehind":return Y({behind:t==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ie(e){if(e===void 0)e=[ne()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Zn(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Or(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function xr(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function fc(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function mc(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function tt(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Nr(e,t){const r=t;return pe(e,`Unclosed character class${r?.type==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function Dr(e){return pe(e,"Unclosed group")}function ge(e,t,r=null){function n(s,o){for(let a=0;a<s.length;a++){const c=i(s[a],o,a,s);a=Math.max(-1,a+c)}}function i(s,o=null,a=null,c=null){let l=0,p=!1;const d={node:s,parent:o,key:a,container:c,root:e,remove(){Pe(c).splice(Math.max(0,oe(a)+l),1),l--,p=!0},removeAllNextSiblings(){return Pe(c).splice(oe(a)+1)},removeAllPrevSiblings(){const g=oe(a)+l;return l-=g,Pe(c).splice(0,Math.max(0,g))},replaceWith(g,_={}){const b=!!_.traverse;c?c[Math.max(0,oe(a)+l)]=g:pe(o,"Can't replace root node")[a]=g,b&&i(g,o,a,c),p=!0},replaceWithMultiple(g,_={}){const b=!!_.traverse;if(Pe(c).splice(Math.max(0,oe(a)+l),1,...g),l+=g.length-1,b){let v=0;for(let A=0;A<g.length;A++)v+=i(g[A],o,oe(a)+A+v,c)}p=!0},skip(){p=!0}},{type:f}=s,h=t["*"],m=t[f],y=typeof h=="function"?h:h?.enter,E=typeof m=="function"?m:m?.enter;if(y?.(d,r),E?.(d,r),!p)switch(f){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(s.min,s,"min"),i(s.max,s,"max");break;case"Quantifier":i(s.body,s,"body");break;case"Regex":n(s.body,s),i(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,r),h?.exit?.(d,r),l}return i(e),e}function Pe(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function oe(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const gc=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function _c(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function yc(e,t,r,n){return e.slice(0,t)+n+e.slice(t+r.length)}const V=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function tr(e,t,r,n){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let o=0,a="";for(const c of e.matchAll(i)){const{0:l,groups:{$skip:p}}=c;if(!p&&(!n||n===V.DEFAULT==!o)){r instanceof Function?a+=r(c,{context:o?V.CHAR_CLASS:V.DEFAULT,negated:s[s.length-1]}):a+=r;continue}l[0]==="["?(o++,s.push(l[1]==="^")):l==="]"&&o&&(o--,s.pop()),a+=l}return a}function Yn(e,t,r,n){tr(e,t,r,n)}function Ec(e,t,r=0,n){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=r;let s=0,o;for(;o=i.exec(e);){const{0:a,groups:{$skip:c}}=o;if(!c&&(!n||n===V.DEFAULT==!s))return o;a==="["?s++:a==="]"&&s&&s--,i.lastIndex==o.index&&i.lastIndex++}return null}function Oe(e,t,r){return!!Ec(e,t,0,r)}function bc(e,t){const r=/\\?./gsu;r.lastIndex=t;let n=e.length,i=0,s=1,o;for(;o=r.exec(e);){const[a]=o;if(a==="[")i++;else if(i)a==="]"&&i--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){n=o.index;break}}return e.slice(t,n)}const $r=new RegExp(String.raw`(?<noncapturingStart>${gc})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function wc(e,t){const r=t?.hiddenCaptures??[];let n=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:r};const i="(?>",s="(?:(?=(",o=[0],a=[];let c=0,l=0,p=NaN,d;do{d=!1;let f=0,h=0,m=!1,y;for($r.lastIndex=Number.isNaN(p)?0:p+s.length;y=$r.exec(e);){const{0:E,index:g,groups:{capturingStart:_,noncapturingStart:b}}=y;if(E==="[")f++;else if(f)E==="]"&&f--;else if(E===i&&!m)p=g,m=!0;else if(m&&b)h++;else if(_)m?h++:(c++,o.push(c+l));else if(E===")"&&m){if(!h){l++;const v=c+l;if(e=`${e.slice(0,p)}${s}${e.slice(p+i.length,g)}))<$$${v}>)${e.slice(g+1)}`,d=!0,a.push(v),_c(r,v),n.size){const A=new Map;n.forEach((S,N)=>{A.set(N>=v?N+1:N,S.map(B=>B>=v?B+1:B))}),n=A}break}h--}}}while(d);return r.push(...a),e=tr(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:h,wrappedBackrefNum:m}})=>{if(h){const y=+h;if(y>o.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${o[y]}`}return`\\${m}`},V.DEFAULT),{pattern:e,captureTransfers:n,hiddenCaptures:r}}const ei=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,mt=new RegExp(String.raw`
|
|
46
|
+
\\(?: \d+
|
|
47
|
+
| c[A-Za-z]
|
|
48
|
+
| [gk]<[^>]+>
|
|
49
|
+
| [pPu]\{[^\}]+\}
|
|
50
|
+
| u[A-Fa-f\d]{4}
|
|
51
|
+
| x[A-Fa-f\d]{2}
|
|
52
|
+
)
|
|
53
|
+
| \((?: \? (?: [:=!>]
|
|
54
|
+
| <(?:[=!]|[^>]+>)
|
|
55
|
+
| [A-Za-z\-]+:
|
|
56
|
+
| \(DEFINE\)
|
|
57
|
+
))?
|
|
58
|
+
| (?<qBase>${ei})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
59
|
+
| \\?.
|
|
60
|
+
`.replace(/\s+/g,""),"gsu");function vc(e){if(!new RegExp(`${ei}\\+`).test(e))return{pattern:e};const t=[];let r=null,n=null,i="",s=0,o;for(mt.lastIndex=0;o=mt.exec(e);){const{0:a,index:c,groups:{qBase:l,qMod:p,invalidQ:d}}=o;if(a==="[")s||(n=c),s++;else if(a==="]")s?s--:n=null;else if(!s)if(p==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let f=-1;if(/^\{\d+\}$/.test(l))e=yc(e,c+l.length,p,"");else{if(i===")"||i==="]"){const h=i===")"?r:n;if(h===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,h)}(?>${e.slice(h,c)}${l})${e.slice(c+a.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+a.length)}`;f+=4}mt.lastIndex+=f}else a[0]==="("?t.push(c):a===")"&&(r=t.length?t.pop():null);i=a}return{pattern:e}}const $=String.raw,Ac=$`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Nt=$`\(\?R=(?<rDepth>[^\)]+)\)|${Ac}`,rt=$`\(\?<(?![=!])(?<captureName>[^>]+)>`,ti=$`${rt}|(?<unnamed>\()(?!\?)`,K=new RegExp($`${rt}|${Nt}|\(\?|\\?.`,"gsu"),gt="Cannot use multiple overlapping recursions";function Cc(e,t){const{hiddenCaptures:r,mode:n}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(Nt,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};if(n==="plugin"&&Oe(e,$`\(\?\(DEFINE\)`,V.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],o=Oe(e,$`\\[1-9]`,V.DEFAULT),a=new Map,c=[];let l=!1,p=0,d=0,f;for(K.lastIndex=0;f=K.exec(e);){const{0:h,groups:{captureName:m,rDepth:y,gRNameOrNum:E,gRDepth:g}}=f;if(h==="[")p++;else if(p)h==="]"&&p--;else if(y){if(Vr(y),l)throw new Error(gt);if(o)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,f.index),b=e.slice(K.lastIndex);if(Oe(b,Nt,V.DEFAULT))throw new Error(gt);const v=+y-1;e=Mr(_,b,v,!1,r,s,d),i=Br(i,_,v,s.length,0,d);break}else if(E){Vr(g);let _=!1;for(const F of c)if(F.name===E||F.num===+E){if(_=!0,F.hasRecursedWithin)throw new Error(gt);break}if(!_)throw new Error($`Recursive \g cannot be used outside the referenced group "${n==="external"?E:$`\g<${E}&R=${g}>`}"`);const b=a.get(E),v=bc(e,b);if(o&&Oe(v,$`${rt}|\((?!\?)`,V.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(b,f.index),S=v.slice(A.length+h.length),N=s.length,B=+g-1,ie=Mr(A,S,B,!0,r,s,d);i=Br(i,A,B,s.length-N,N,d);const it=e.slice(0,b),st=e.slice(b+v.length);e=`${it}${ie}${st}`,K.lastIndex+=ie.length-h.length-A.length-S.length,c.forEach(F=>F.hasRecursedWithin=!0),l=!0}else if(m)d++,a.set(String(d),K.lastIndex),a.set(m,K.lastIndex),c.push({num:d,name:m});else if(h[0]==="("){const _=h==="(";_&&(d++,a.set(String(d),K.lastIndex)),c.push(_?{num:d}:{})}else h===")"&&c.pop()}return r.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:r}}function Vr(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Mr(e,t,r,n,i,s,o){const a=new Set;n&&Yn(e+t,rt,({groups:{captureName:l}})=>{a.add(l)},V.DEFAULT);const c=[r,n?a:null,i,s,o];return`${e}${Gr(`(?:${e}`,"forward",...c)}(?:)${Gr(`${t})`,"backward",...c)}${t}`}function Gr(e,t,r,n,i,s,o){const c=p=>t==="forward"?p+2:r-p+2-1;let l="";for(let p=0;p<r;p++){const d=c(p);l+=tr(e,$`${ti}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:h,unnamed:m,backref:y}})=>{if(y&&n&&!n.has(y))return f;const E=`_$${d}`;if(m||h){const g=o+s.length+1;return s.push(g),Ic(i,g),m?f:`(?<${h}${E}>`}return $`\k<${y}${E}>`},V.DEFAULT)}return l}function Ic(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function Br(e,t,r,n,i,s){if(e.size&&n){let o=0;Yn(t,ti,()=>o++,V.DEFAULT);const a=s-o+i,c=new Map;return e.forEach((l,p)=>{const d=(n-o*r)/r,f=o*r,h=p>a+o?p+n:p,m=[];for(const y of l)if(y<=a)m.push(y);else if(y>a+o+d)m.push(y+n);else if(y<=a+o)for(let E=0;E<=r;E++)m.push(y+o*E);else for(let E=0;E<=r;E++)m.push(y+f+d*E);c.set(h,m)}),c}return e}var T=String.fromCodePoint,w=String.raw,G={},nt=globalThis.RegExp;G.flagGroups=(()=>{try{new nt("(?i:)")}catch{return!1}return!0})();G.unicodeSets=(()=>{try{new nt("[[]]","v")}catch{return!1}return!0})();G.bugFlagVLiteralHyphenIsRange=G.unicodeSets?(()=>{try{new nt(w`[\d\-a]`,"v")}catch{return!0}return!1})():!1;G.bugNestedClassIgnoresNegation=G.unicodeSets&&new nt("[[^a]]","v").test("a");function We(e,{enable:t,disable:r}){return{dotAll:!r?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!r?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Ae(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}function Dt(e,t){return Fr[e]>=Fr[t]}function Sc(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Fr={ES2025:2025,ES2024:2024,ES2018:2018},Lc={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function ri(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Lc[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=G.flagGroups?"ES2025":G.unicodeSets?"ES2024":"ES2018"),t}var Tc="[ -\r ]",Rc=new Set([T(304),T(305)]),W=w`[\p{L}\p{M}\p{N}\p{Pc}]`;function ni(e){if(Rc.has(e))return[e];const t=new Set,r=e.toLowerCase(),n=r.toUpperCase(),i=Oc.get(r),s=kc.get(r),o=Pc.get(r);return[...n].length===1&&t.add(n),o&&t.add(o),i&&t.add(i),t.add(r),s&&t.add(s),[...t]}var rr=new Map(`C Other
|
|
61
|
+
Cc Control cntrl
|
|
62
|
+
Cf Format
|
|
63
|
+
Cn Unassigned
|
|
64
|
+
Co Private_Use
|
|
65
|
+
Cs Surrogate
|
|
66
|
+
L Letter
|
|
67
|
+
LC Cased_Letter
|
|
68
|
+
Ll Lowercase_Letter
|
|
69
|
+
Lm Modifier_Letter
|
|
70
|
+
Lo Other_Letter
|
|
71
|
+
Lt Titlecase_Letter
|
|
72
|
+
Lu Uppercase_Letter
|
|
73
|
+
M Mark Combining_Mark
|
|
74
|
+
Mc Spacing_Mark
|
|
75
|
+
Me Enclosing_Mark
|
|
76
|
+
Mn Nonspacing_Mark
|
|
77
|
+
N Number
|
|
78
|
+
Nd Decimal_Number digit
|
|
79
|
+
Nl Letter_Number
|
|
80
|
+
No Other_Number
|
|
81
|
+
P Punctuation punct
|
|
82
|
+
Pc Connector_Punctuation
|
|
83
|
+
Pd Dash_Punctuation
|
|
84
|
+
Pe Close_Punctuation
|
|
85
|
+
Pf Final_Punctuation
|
|
86
|
+
Pi Initial_Punctuation
|
|
87
|
+
Po Other_Punctuation
|
|
88
|
+
Ps Open_Punctuation
|
|
89
|
+
S Symbol
|
|
90
|
+
Sc Currency_Symbol
|
|
91
|
+
Sk Modifier_Symbol
|
|
92
|
+
Sm Math_Symbol
|
|
93
|
+
So Other_Symbol
|
|
94
|
+
Z Separator
|
|
95
|
+
Zl Line_Separator
|
|
96
|
+
Zp Paragraph_Separator
|
|
97
|
+
Zs Space_Separator
|
|
98
|
+
ASCII
|
|
99
|
+
ASCII_Hex_Digit AHex
|
|
100
|
+
Alphabetic Alpha
|
|
101
|
+
Any
|
|
102
|
+
Assigned
|
|
103
|
+
Bidi_Control Bidi_C
|
|
104
|
+
Bidi_Mirrored Bidi_M
|
|
105
|
+
Case_Ignorable CI
|
|
106
|
+
Cased
|
|
107
|
+
Changes_When_Casefolded CWCF
|
|
108
|
+
Changes_When_Casemapped CWCM
|
|
109
|
+
Changes_When_Lowercased CWL
|
|
110
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
111
|
+
Changes_When_Titlecased CWT
|
|
112
|
+
Changes_When_Uppercased CWU
|
|
113
|
+
Dash
|
|
114
|
+
Default_Ignorable_Code_Point DI
|
|
115
|
+
Deprecated Dep
|
|
116
|
+
Diacritic Dia
|
|
117
|
+
Emoji
|
|
118
|
+
Emoji_Component EComp
|
|
119
|
+
Emoji_Modifier EMod
|
|
120
|
+
Emoji_Modifier_Base EBase
|
|
121
|
+
Emoji_Presentation EPres
|
|
122
|
+
Extended_Pictographic ExtPict
|
|
123
|
+
Extender Ext
|
|
124
|
+
Grapheme_Base Gr_Base
|
|
125
|
+
Grapheme_Extend Gr_Ext
|
|
126
|
+
Hex_Digit Hex
|
|
127
|
+
IDS_Binary_Operator IDSB
|
|
128
|
+
IDS_Trinary_Operator IDST
|
|
129
|
+
ID_Continue IDC
|
|
130
|
+
ID_Start IDS
|
|
131
|
+
Ideographic Ideo
|
|
132
|
+
Join_Control Join_C
|
|
133
|
+
Logical_Order_Exception LOE
|
|
134
|
+
Lowercase Lower
|
|
135
|
+
Math
|
|
136
|
+
Noncharacter_Code_Point NChar
|
|
137
|
+
Pattern_Syntax Pat_Syn
|
|
138
|
+
Pattern_White_Space Pat_WS
|
|
139
|
+
Quotation_Mark QMark
|
|
140
|
+
Radical
|
|
141
|
+
Regional_Indicator RI
|
|
142
|
+
Sentence_Terminal STerm
|
|
143
|
+
Soft_Dotted SD
|
|
144
|
+
Terminal_Punctuation Term
|
|
145
|
+
Unified_Ideograph UIdeo
|
|
146
|
+
Uppercase Upper
|
|
147
|
+
Variation_Selector VS
|
|
148
|
+
White_Space space
|
|
149
|
+
XID_Continue XIDC
|
|
150
|
+
XID_Start XIDS`.split(/\s/).map(e=>[tt(e),e])),kc=new Map([["s",T(383)],[T(383),"s"]]),Pc=new Map([[T(223),T(7838)],[T(107),T(8490)],[T(229),T(8491)],[T(969),T(8486)]]),Oc=new Map([X(453),X(456),X(459),X(498),..._t(8072,8079),..._t(8088,8095),..._t(8104,8111),X(8124),X(8140),X(8188)]),xc=new Map([["alnum",w`[\p{Alpha}\p{Nd}]`],["alpha",w`\p{Alpha}`],["ascii",w`\p{ASCII}`],["blank",w`[\p{Zs}\t]`],["cntrl",w`\p{Cc}`],["digit",w`\p{Nd}`],["graph",w`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",w`\p{Lower}`],["print",w`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",w`[\p{P}\p{S}]`],["space",w`\p{space}`],["upper",w`\p{Upper}`],["word",w`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",w`\p{AHex}`]]);function Nc(e,t){const r=[];for(let n=e;n<=t;n++)r.push(n);return r}function X(e){const t=T(e);return[t.toLowerCase(),t]}function _t(e,t){return Nc(e,t).map(r=>X(r))}var ii=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Dc(e,t){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};si(e);const n={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Dt(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ge(e,$c,n);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};ge(e,Vc,s);const o={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return ge(e,Mc,o),e._originMap=s.groupOriginByCopy,e._strategy=n.strategy,e}var $c={AbsenceFunction({node:e,parent:t,replaceWith:r}){const{body:n,kind:i}=e;if(i==="repeater"){const s=M();s.body[0].body.push(Y({negate:!0,body:n}),le("Any"));const o=M();o.body[0].body.push(Jn("greedy",0,1/0,s)),r(I(o,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:n}){const i=e.body.filter(s=>s.kind==="flags");for(let s=r+1;s<t.body.length;s++){const o=t.body[s];Ae(n,o,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const r=ai(t.get(e));if(r){const n=M({flags:r});n.body[0].body=e.body,e.body=[I(n,e)]}}}},Assertion({node:e,parent:t,key:r,container:n,root:i,remove:s,replaceWith:o},a){const{kind:c,negate:l}=e,{asciiWordBoundaries:p,avoidSubclass:d,supportedGNodes:f,wordIsAscii:h}=a;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(c==="line_end")o(I(Y({body:[ne({body:[Pt("string_end")]}),ne({body:[et(10)]})]}),t));else if(c==="line_start")o(I(z(w`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(f.has(e))i.flags.sticky=!0,s();else{const m=n[r-1];if(m&&Hc(m))o(I(Y({negate:!0}),t));else{if(d)throw new Error(w`Uses "\G" in a way that requires a subclass`);o(Q(Pt("string_start"),t)),a.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")o(I(z(w`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!h&&!p){const m=`(?:(?<=${W})(?!${W})|(?<!${W})(?=${W}))`,y=`(?:(?<=${W})(?=${W})|(?<!${W})(?!${W}))`;o(I(z(l?y:m),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Et(r)&&(r=yt(r,t),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:n}=e;n&&!Et(n)&&(n=yt(n,t),e.name=n),r.set(e.number,e),n&&r.set(n,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if(t.kind==="intersection"){const n=De({body:[e]});r(I(n,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:n,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:o,wordIsAscii:a}){const{kind:c,negate:l,value:p}=e;if(s&&(c==="digit"||p==="digit")){r(Q(xt("digit",{negate:l}),t));return}if(o&&(c==="space"||p==="space")){r(I(bt(z(Tc),l),t));return}if(a&&(c==="word"||p==="word")){r(Q(xt("word",{negate:l}),t));return}if(c==="any")r(Q(le("Any"),t));else if(c==="digit")r(Q(le("Nd",{negate:l}),t));else if(c!=="dot")if(c==="text_segment"){if(n==="strict")throw new Error(w`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=w`\p{RI}{2}|${d}(?:\u200D${d})*`;r(I(z(w`(?>\r\n|${i?w`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")r(Q(le("AHex",{negate:l}),t));else if(c==="newline")r(I(z(l?`[^
|
|
151
|
+
]`:`(?>\r
|
|
152
|
+
?|[
|
|
153
|
+
\v\f
\u2028\u2029])`),t));else if(c==="posix")if(!i&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[p];l&&(d=`\0-${T(d.codePointAt(0)-1)}${T(d.codePointAt(2)+1)}-`),r(I(z(`[${d}]`),t))}else r(I(bt(z(xc.get(p)),l),t));else if(c==="property")rr.has(tt(p))||(e.key="sc");else if(c==="space")r(Q(le("space",{negate:l}),t));else if(c==="word")r(I(bt(z(W),l),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:r,remove:n,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:o}){const{kind:a,flags:c}=e;if(a==="flags")if(!c.enable&&!c.disable)n();else{const l=M({flags:c});l.body[0].body=o(),i(I(l,t),{traverse:!0})}else if(a==="keep"){const l=r.body[0],d=r.body.length===1&&qn(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:r;if(t.parent!==d||d.body.length>1)throw new Error(w`Uses "\K" in a way that's unsupported`);const f=Y({behind:!0});f.body[0].body=s(),i(I(f,t))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:r}=e.flags;t?.extended&&delete t.extended,r?.extended&&delete r.extended,t?.dotAll&&r?.dotAll&&delete t.dotAll,t?.ignoreCase&&r?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;r==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:n}=e;if(n==="fail")r(I(Y({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=M();t.body[0].body.push(e.body),e.body=I(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let n=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const o=li(s.body);o?(n=!0,Array.isArray(o)?r.push(...o):r.push(o)):i=!0}n&&!i&&r.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:r,strategy:n}){if(t==="strict"&&r&&n)throw new Error(w`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Et(r)&&(r=yt(r,t),e.ref=r)}},Vc={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:n,ref:i}=e;n||r.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:n},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:o,openRefs:a,reffedNodesByReferencer:c}){const l=i.get(e);if(l&&a.has(e.number)){const d=Q(jr(e.number),t);c.set(d,a.get(e.number)),r(d);return}a.set(e.number,e),o.set(e.number,[]),e.name&&Ae(o,e.name,[]);const p=o.get(e.name??e.number);for(let d=0;d<p.length;d++){const f=p[d];if(l===f.node||l&&l===f.origin||e===f.origin){p.splice(d,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){const d=Ae(s,e.name,new Map);let f=!1;if(l)f=!0;else for(const h of d.values())if(!h.hasDuplicateNameToRemove){f=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=We(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},n){const{isRecursive:i,ref:s}=e;if(i){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===s||p.number===s)););n.reffedNodesByReferencer.set(e,p);return}const o=n.subroutineRefMap.get(s),a=s===0,c=a?jr(0):oi(o,n.groupOriginByCopy,null);let l=c;if(!a){const p=ai(Fc(o,f=>f.type==="Group"&&!!f.flags)),d=p?We(n.globalFlags,p):n.globalFlags;Gc(d,n.currentFlags)||(l=M({flags:jc(d)}),l.body[0].body.push(c))}r(I(l,t),{traverse:!a})}},Mc={Backreference({node:e,parent:t,replaceWith:r},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}const s=n.reffedNodesByReferencer.get(e).filter(o=>Bc(o,e));if(!s.length)r(I(Y({negate:!0}),t));else if(s.length>1){const o=M({atomic:!0,body:s.reverse().map(a=>ne({body:[Ot(a.number)]}))});r(I(o,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let n=0;n<r;n++){const i=Qn();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function si(e){ge(e,{"*"({node:t,parent:r}){t.parent=r}})}function Gc(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Bc(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const n=ci(r.parent);for(const i of n){if(i===r)break;if(i===e||ui(i,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function oi(e,t,r,n){const i=Array.isArray(e)?[]:{};for(const[s,o]of Object.entries(e))s==="parent"?i.parent=Array.isArray(r)?n:r:o&&typeof o=="object"?i[s]=oi(o,t,i,r):(s==="type"&&o==="CapturingGroup"&&t.set(i,t.get(e)??e),i[s]=o);return i}function jr(e){const t=Kn(e);return t.isRecursive=!0,t}function Fc(e,t){const r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}function yt(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function ai(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:n})=>{t.forEach(i=>{n.enable?.[i]&&(delete r.disable[i],r.enable[i]=!0),n.disable?.[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function jc({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),(!e||!t)&&(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function ci(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function li(e){const t=e.find(r=>r.kind==="search_start"||Wc(r,{negate:!1})||!Uc(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const r=[];for(const n of t.body){const i=li(n.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function ui(e,t){const r=ci(e)??[];for(const n of r)if(n===t||ui(n,t))return!0;return!1}function Uc({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Hc(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Wc(e,t){const r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&qn(e.body[0],{type:"Assertion",kind:"search_start"})}function Et(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function z(e,t){const n=Xn(e,{...t,unicodePropertyMap:rr}).body;return n.length>1||n[0].body.length>1?M({body:n}):n[0].body[0]}function bt(e,t){return e.negate=t,e}function Q(e,t){return e.parent=t,e}function I(e,t){return si(e),e.parent=t,e}function zc(e,t){const r=ri(t),n=Dt(r.target,"ES2024"),i=Dt(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let o=null,a=null;if(!i){const h=[e.flags.ignoreCase];ge(e,qc,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(m){h.push(m)},setHasCasedChar(){h.at(-1)?o=!0:a=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!a)};let l=e;const p={accuracy:r.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&o&&a),useFlagMods:i,useFlagV:n,verbose:r.verbose};function d(h){return p.lastNode=l,l=h,Sc(Xc[h.type],`Unexpected node type "${h.type}"`)(h,p,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return n||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],p.captureMap.forEach((h,m)=>{h.hidden&&f._hiddenCaptures.push(m),h.transferTo&&Ae(f._captureTransfers,h.transferTo,[]).push(m)}),f}var qc={"*":{enter({node:e},t){if(Hr(e)){const r=t.getCurrentModI();t.pushModI(e.flags?We({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){Hr(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){nr(T(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),di(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&ii.has(e.value)&&t.setHasCasedChar()}},Xc={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?w`\B`:w`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:n,name:i,number:s}=e,o={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(o.hidden=!0,s>a.number&&(o.transferTo=a.number)),t.captureMap.set(s,o),`(${i?`?<${i}>`:""}${n.map(r).join("|")})`},Character({value:e},t){const r=T(e),n=ae(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(n!==r)return n;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&nr(r)){const i=ni(r);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(e,t,r){const{kind:n,negate:i,parent:s}=e;let{body:o}=e;if(n==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");G.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(Wr)&&(o=[et(45),...o.filter(l=>!Wr(l))]);const a=()=>`[${i?"^":""}${o.map(r).join(n==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||G.bugNestedClassIgnoresNegation)&&!i){const p=o.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(p.length){const d=M(),f=d.body[0];return d.parent=s,f.parent=d,o=o.filter(h=>!p.includes(h)),e.body=o,o.length?(e.parent=f,f.body.push(e)):d.body.pop(),p.forEach(h=>{const m=ne({body:[h]});h.parent=m,m.parent=d,d.body.push(m)}),r(d)}}t.inCharClass=!0;const l=a();return t.inCharClass=!1,l}const c=o[0];if(n==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(G.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&o.length===1&&c.type!=="CharacterClassRange"))return o.map(r).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){const r=e.min.value,n=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=ae(r,i),o=ae(n,i),a=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=di(e);Yc(c).forEach(p=>{a.add(Array.isArray(p)?`${ae(p[0],i)}-${ae(p[1],i)}`:ae(p,i))})}return`${s}-${o}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:n},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":w`[^\n]`;if(e==="digit")return t?w`\D`:w`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&ii.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?w`\P`:w`\p`}{${n?`${n}=`:""}${r}}`}if(e==="word")return t?w`\W`:w`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:n},i,s){const o=i.currentFlags;r&&(i.currentFlags=We(o,r));const a=t.map(s).join("|"),c=!i.verbose&&t.length===1&&n.type!=="Quantifier"&&!e&&(!i.useFlagMods||!r)?a:`(?${el(e,r,i.useFlagMods)}${a})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:r},n,i){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,r){return r(e.body)+tl(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=r.recursionLimit;return t===0?`(?R=${n})`:w`\g<${t}&R=${n}>`}},Qc=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Jc=new Set(["-","\\","]","^","["]),Kc=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Ur=new Map([[9,w`\t`],[10,w`\n`],[11,w`\v`],[12,w`\f`],[13,w`\r`],[8232,w`\u2028`],[8233,w`\u2029`],[65279,w`\uFEFF`]]),Zc=new RegExp("^\\p{Cased}$","u");function nr(e){return Zc.test(e)}function di(e,t){const r=!!t?.firstOnly,n=e.min.value,i=e.max.value,s=[];if(n<65&&(i===65535||i>=131071)||n===65536&&i>=131071)return s;for(let o=n;o<=i;o++){const a=T(o);if(!nr(a))continue;const c=ni(a).filter(l=>{const p=l.codePointAt(0);return p<n||p>i});if(c.length&&(s.push(...c),r))break}return s}function ae(e,{escDigit:t,inCharClass:r,useFlagV:n}){if(Ur.has(e))return Ur.get(e);if(e<32||e>126&&e<160||e>262143||t&&rl(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?n?Kc:Jc:Qc,s=T(e);return(i.has(s)?"\\":"")+s}function Yc(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),r=[];let n=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?n??=t[i]:n===null?r.push(t[i]):(r.push([n,t[i]]),n=null);return r}function el(e,t,r){if(e)return">";let n="";if(t&&r){const{enable:i,disable:s}=t;n=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${n}:`}function tl({kind:e,max:t,min:r}){let n;return!r&&t===1?n="?":!r&&t===1/0?n="*":r===1&&t===1/0?n="+":r===t?n=`{${r}}`:n=`{${r},${t===1/0?"":t}}`,n+{greedy:"",lazy:"?",possessive:"+"}[e]}function Hr({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function rl(e){return e>47&&e<58}function Wr({type:e,value:t}){return e==="Character"&&t===45}var nl=class $t extends RegExp{#t=new Map;#e=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,r,n){const i=!!n?.lazyCompile;if(t instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const s=t;super(s,r),this.#n=s.source,s instanceof $t&&(this.#t=s.#t,this.#r=s.#r,this.#i=s.#i,this.rawOptions=s.rawOptions)}else{const s={hiddenCaptures:[],strategy:null,transfers:[],...n};super(i?"":t,r),this.#n=t,this.#t=sl(s.hiddenCaptures,s.transfers),this.#i=s.strategy,this.rawOptions=n??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...s}=this.rawOptions;this.#e=new $t(this.#n,this.flags,s)}const r=this.global||this.sticky,n=this.lastIndex;if(this.#i==="clip_search"&&r&&n){this.lastIndex=0;const i=this.#s(t.slice(n));return i&&(il(i,n,t,this.hasIndices),this.lastIndex+=n),i}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const n=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const s=[0];for(let o=1;o<n.length;o++){const{hidden:a,transferTo:c}=this.#t.get(o)??{};if(a?s.push(null):(s.push(r.length),r.push(n[o]),this.hasIndices&&r.indices.push(i[o])),c&&n[o]!==void 0){const l=s[c];if(!l)throw new Error(`Invalid capture transfer to "${l}"`);if(r[l]=n[o],this.hasIndices&&(r.indices[l]=i[o]),r.groups){this.#r||(this.#r=ol(this.source));const p=this.#r.get(c);p&&(r.groups[p]=n[o],this.hasIndices&&(r.indices.groups[p]=i[o]))}}}return r}};function il(e,t,r,n){if(e.index+=t,e.input=r,n){const i=e.indices;for(let o=0;o<i.length;o++){const a=i[o];a&&(i[o]=[a[0]+t,a[1]+t])}const s=i.groups;s&&Object.keys(s).forEach(o=>{const a=s[o];a&&(s[o]=[a[0]+t,a[1]+t])})}}function sl(e,t){const r=new Map;for(const n of e)r.set(n,{hidden:!0});for(const[n,i]of t)for(const s of i)Ae(r,s,{}).transferTo=n;return r}function ol(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let n=0,i=0,s;for(;s=t.exec(e);){const{0:o,groups:{capture:a,name:c}}=s;o==="["?n++:n?o==="]"&&n--:a&&(i++,c&&r.set(i,c))}return r}function al(e,t){const r=cl(e,t);return r.options?new nl(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function cl(e,t){const r=ri(t),n=Xn(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:rr}),i=Dc(n,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=zc(i,r),o=Cc(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=vc(o.pattern),c=wc(a.pattern,{captureTransfers:o.captureTransfers,hiddenCaptures:o.hiddenCaptures}),l={pattern:c.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=c.hiddenCaptures.sort((m,y)=>m-y),d=Array.from(c.captureTransfers),f=i._strategy,h=l.pattern.length>=r.lazyCompileLength;(p.length||d.length||f||h)&&(l.options={...p.length&&{hiddenCaptures:p},...d.length&&{transfers:d},...f&&{strategy:f},...h&&{lazyCompile:h}})}return l}function pi(e,t){return al(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function ll(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=r=>pi(r,{target:t.target}),{createScanner(r){return new Ia(r,t)},createString(r){return{content:r}}}}qr(Mt({bundledLanguages:()=>Ft,bundledLanguagesAlias:()=>Bt,bundledLanguagesBase:()=>Gt,bundledLanguagesInfo:()=>ze,bundledThemes:()=>Ut,bundledThemesInfo:()=>jt,codeToHast:()=>$n,codeToHtml:()=>Dn,codeToTokens:()=>Vn,codeToTokensBase:()=>Mn,codeToTokensWithThemes:()=>Gn,createHighlighter:()=>Zt,createJavaScriptRegexEngine:()=>ll,createOnigurumaEngine:()=>Jr,defaultJavaScriptRegexConstructor:()=>pi,getLastGrammarState:()=>Fn,getSingletonHighlighter:()=>Bn,loadWasm:()=>Wt}),Ca);export{C as ShikiError,kn as addClassToHast,J as applyColorReplacements,Ft as bundledLanguages,Bt as bundledLanguagesAlias,Gt as bundledLanguagesBase,ze as bundledLanguagesInfo,Ut as bundledThemes,jt as bundledThemesInfo,$n as codeToHast,Dn as codeToHtml,Vn as codeToTokens,Mn as codeToTokensBase,Gn as codeToTokensWithThemes,wa as createBundledHighlighter,_l as createCssVariablesTheme,Zt as createHighlighter,Nn as createHighlighterCore,ml as createHighlighterCoreSync,ll as createJavaScriptRegexEngine,Jr as createOnigurumaEngine,Xo as createPositionConverter,fl as createShikiInternal,hl as createShikiInternalSync,Xt as createShikiPrimitive,bn as createShikiPrimitiveAsync,Aa as createSingletonShorthands,pi as defaultJavaScriptRegexConstructor,Yo as flatTokenVariants,Fn as getLastGrammarState,Bn as getSingletonHighlighter,gl as getSingletonHighlighterCore,je as getTokenStyleObject,Qo as guessEmbeddedLanguages,Ea as hastToHtml,Je as isNoneTheme,Qe as isPlainLang,mn as isSpecialLang,gn as isSpecialTheme,Wt as loadWasm,va as makeSingletonHighlighter,ba as makeSingletonHighlighterCore,fn as normalizeGetter,qt as normalizeTheme,Fe as resolveColorReplacements,Ke as splitLines,Ko as splitToken,Zo as splitTokens,kt as stringifyTokenStyle,Ss as toArray,pa as tokenizeAnsiWithTheme,Ns as tokenizeWithTheme,ma as tokensToHast,ea as transformerDecorations};
|