nuxt-studio 1.3.2 → 1.3.3

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.
Files changed (29) hide show
  1. package/README.md +1 -1
  2. package/dist/app/{index-BHiGO8lZ.js → index-BNGZo_v7.js} +1 -1
  3. package/dist/app/{index-CY2pEuQG.js → index-BemYRVDN.js} +1 -1
  4. package/dist/app/{index-DZT0wMp9.js → index-D-57dgKD.js} +1 -1
  5. package/dist/app/{index-D7Zn_pzM.js → index-DHS_I0O0.js} +1 -1
  6. package/dist/app/main-DIc-1QZK.js +44 -0
  7. package/dist/app/main-PbQDqQ97.js +44 -0
  8. package/dist/app/main.d.ts +10 -9
  9. package/dist/app/main.js +1 -1
  10. package/dist/app/{rehype-DxMxi_g-.js → rehype-B5jXSQHB.js} +1 -1
  11. package/dist/app/{rehype-sZkPNt5P.js → rehype-C7dZfu6l.js} +1 -1
  12. package/dist/app/service-worker.d.ts +9 -9
  13. package/dist/app/shared.d.ts +10 -9
  14. package/dist/app/{shiki-BWNTJJZW.js → shiki-B5XDhU_3.js} +1 -1
  15. package/dist/app/{shiki-C6xy7L7G.js → shiki-BLgMZ_FB.js} +1 -1
  16. package/dist/module/module.json +1 -1
  17. package/dist/module/module.mjs +1 -1
  18. package/dist/module/runtime/server/routes/auth/github.get.js +4 -4
  19. package/dist/module/runtime/server/routes/auth/gitlab.get.js +4 -4
  20. package/dist/module/runtime/server/routes/auth/google.get.js +4 -4
  21. package/dist/module/runtime/server/routes/auth/sso.get.js +5 -5
  22. package/dist/module/runtime/server/utils/auth.js +2 -2
  23. package/dist/module/runtime/server/utils/object.d.ts +1 -0
  24. package/dist/module/runtime/server/utils/object.js +14 -0
  25. package/dist/module/runtime/utils/document/compare.js +1 -1
  26. package/dist/module/runtime/utils/document/generate.js +5 -3
  27. package/package.json +4 -1
  28. package/dist/app/main-C_AGiNp-.js +0 -44
  29. package/dist/app/main-DnxMhNqU.js +0 -44
package/README.md CHANGED
@@ -220,7 +220,7 @@ pnpm lint
220
220
 
221
221
  - [ ] Advanced conflict resolution
222
222
  - [ ] Pull request generation (from a branch to the main one)
223
- - [ ] AI-powered content suggestions
223
+ - [x] AI-powered content suggestions
224
224
  - [ ] Media optimization
225
225
 
226
226
  ## Links
@@ -1 +1 @@
1
- import{createSingletonShorthands as i,createBundledHighlighter as t,guessEmbeddedLanguages as e}from"./index-CY2pEuQG.js";import{ShikiError as r,addClassToHast as a,applyColorReplacements as m,createCssVariablesTheme as o,createHighlighterCore as s,createHighlighterCoreSync as p,createPositionConverter as n,createShikiInternal as d,createShikiInternalSync as l,createdBundledHighlighter as c,enableDeprecationWarnings as j,flatTokenVariants as u,getSingletonHighlighterCore as f,getTokenStyleObject as g,hastToHtml as y,isNoneTheme as k,isPlainLang as b,isSpecialLang as v,isSpecialTheme as S,makeSingletonHighlighter as w,makeSingletonHighlighterCore as L,normalizeGetter as x,normalizeTheme as N,resolveColorReplacements as T,splitLines as A,splitToken as C,splitTokens as M,stringifyTokenStyle as P,toArray as O,tokenizeAnsiWithTheme as U,tokenizeWithTheme as D,tokensToHast as H,transformerDecorations as _,warnDeprecated as B}from"./index-CY2pEuQG.js";import{c as E,d as G}from"./engine-compile-CsVoR5aC.js";const q=[{id:"abap",name:"ABAP",import:()=>import("./abap-DnJxzdy9.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("./actionscript-3-DKotD2Vd.js")},{id:"ada",name:"Ada",import:()=>import("./ada-iG1FnIvR.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("./angular-html-gmylb4v7.js").then(i=>i.f)},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("./angular-ts-DgRtZR5b.js")},{id:"apache",name:"Apache Conf",import:()=>import("./apache-CdTKWnKT.js")},{id:"apex",name:"Apex",import:()=>import("./apex-DPFMkx-R.js")},{id:"apl",name:"APL",import:()=>import("./apl-8tIde7kE.js")},{id:"applescript",name:"AppleScript",import:()=>import("./applescript-BlLNmGTp.js")},{id:"ara",name:"Ara",import:()=>import("./ara-Ba3fhlsS.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("./asciidoc-XTVL4-GN.js")},{id:"asm",name:"Assembly",import:()=>import("./asm-CHX6lpGW.js")},{id:"astro",name:"Astro",import:()=>import("./astro-B5Br1cQb.js")},{id:"awk",name:"AWK",import:()=>import("./awk-XRrwoikR.js")},{id:"ballerina",name:"Ballerina",import:()=>import("./ballerina-Dh0JsEtz.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("./bat-BVu0TwaT.js")},{id:"beancount",name:"Beancount",import:()=>import("./beancount-CJl0njO0.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("./berry-Bmu6i3Vs.js")},{id:"bibtex",name:"BibTeX",import:()=>import("./bibtex-CGjxJ4Zd.js")},{id:"bicep",name:"Bicep",import:()=>import("./bicep-DSW96mAt.js")},{id:"blade",name:"Blade",import:()=>import("./blade-BQ-lQURp.js")},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>import("./bsl-DGicdwC0.js")},{id:"c",name:"C",import:()=>import("./c-BmJt9k-y.js")},{id:"c3",name:"C3",import:()=>import("./c3-B5xr2KH_.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("./cadence-DbDq8SCj.js")},{id:"cairo",name:"Cairo",import:()=>import("./cairo-Dz8fl918.js")},{id:"clarity",name:"Clarity",import:()=>import("./clarity-Bb40UnPS.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("./clojure-BjI0Knrv.js")},{id:"cmake",name:"CMake",import:()=>import("./cmake-BYiqpiH1.js")},{id:"cobol",name:"COBOL",import:()=>import("./cobol-7Bn895Wb.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("./codeowners-L91meNbn.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("./codeql-Cd-JFsJB.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("./coffee-BDkVV41o.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("./common-lisp-DOi1njVG.js")},{id:"coq",name:"Coq",import:()=>import("./coq-BfbrVLCY.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("./cpp-DogXcJ7O.js")},{id:"crystal",name:"Crystal",import:()=>import("./crystal-CaN4TS0s.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("./csharp-VAkxddOj.js")},{id:"css",name:"CSS",import:()=>import("./css-l46fsARh.js")},{id:"csv",name:"CSV",import:()=>import("./csv-DXKU4rRd.js")},{id:"cue",name:"CUE",import:()=>import("./cue-zmT78Agv.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("./cypher-bkHSskm3.js")},{id:"d",name:"D",import:()=>import("./d-vs9xsbRV.js")},{id:"dart",name:"Dart",import:()=>import("./dart-BMkYYGiN.js")},{id:"dax",name:"DAX",import:()=>import("./dax-D135z3aS.js")},{id:"desktop",name:"Desktop",import:()=>import("./desktop-CigPEpQ5.js")},{id:"diff",name:"Diff",import:()=>import("./diff-Beq1YlA8.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("./docker-V5Al5bpF.js")},{id:"dotenv",name:"dotEnv",import:()=>import("./dotenv-D9G8sA2m.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("./dream-maker-BsoKROiO.js")},{id:"edge",name:"Edge",import:()=>import("./edge-rRnuLDAV.js")},{id:"elixir",name:"Elixir",import:()=>import("./elixir-CxDZGvum.js")},{id:"elm",name:"Elm",import:()=>import("./elm-5NnWpb8Q.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("./emacs-lisp-BcpYGiHp.js")},{id:"erb",name:"ERB",import:()=>import("./erb-BkKzIHzi.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("./erlang-DAw79KxH.js")},{id:"fennel",name:"Fennel",import:()=>import("./fennel-qzPJJAAI.js")},{id:"fish",name:"Fish",import:()=>import("./fish-Cx6My9pS.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("./fluent-BsukS3Co.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("./fortran-fixed-form-BiRvzwyR.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("./fortran-free-form-CakU9R0a.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("./fsharp-BmLNaTNL.js")},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>import("./gdresource-pHyHNgx5.js")},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>import("./gdscript-BpxQpKjR.js")},{id:"gdshader",name:"GDShader",import:()=>import("./gdshader-BC7WJXp9.js")},{id:"genie",name:"Genie",import:()=>import("./genie-IZOju1hG.js")},{id:"gherkin",name:"Gherkin",import:()=>import("./gherkin-DUpgZfGr.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("./git-commit-Bptnmh-c.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("./git-rebase-CqNhyBhE.js")},{id:"gleam",name:"Gleam",import:()=>import("./gleam-CCCEh_av.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("./glimmer-js-Bxt49MuP.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("./glimmer-ts-BsGfVpaS.js")},{id:"glsl",name:"GLSL",import:()=>import("./glsl-BDbjGBhJ.js")},{id:"gn",name:"GN",import:()=>import("./gn-BNGDdMfm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("./gnuplot-D0FoiB-W.js")},{id:"go",name:"Go",import:()=>import("./go-Ci1olR0S.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("./graphql-DTlHKpVh.js")},{id:"groovy",name:"Groovy",import:()=>import("./groovy-D9sPn4Z-.js")},{id:"hack",name:"Hack",import:()=>import("./hack-vS_ALjIE.js")},{id:"haml",name:"Ruby Haml",import:()=>import("./haml-DvFFb5cL.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("./handlebars--3HEtxsY.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("./haskell-Cp0NQEkn.js")},{id:"haxe",name:"Haxe",import:()=>import("./haxe-D-PmAGDa.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("./hcl-DRMo6eis.js")},{id:"hjson",name:"Hjson",import:()=>import("./hjson-BPEpXUFQ.js")},{id:"hlsl",name:"HLSL",import:()=>import("./hlsl-B-PjNM4a.js")},{id:"html",name:"HTML",import:()=>import("./html-Z-jPWkqI.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("./html-derivative-DKviipgs.js")},{id:"http",name:"HTTP",import:()=>import("./http-Dh7mhfAc.js")},{id:"hurl",name:"Hurl",import:()=>import("./hurl-DvxDWHzM.js")},{id:"hxml",name:"HXML",import:()=>import("./hxml-DB3_nACV.js")},{id:"hy",name:"Hy",import:()=>import("./hy-CLIvbAhW.js")},{id:"imba",name:"Imba",import:()=>import("./imba-B-tO30Ge.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("./ini-Bpxu4Zsc.js")},{id:"java",name:"Java",import:()=>import("./java-DtRXFtDl.js")},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>import("./javascript-DFyEbC5y.js")},{id:"jinja",name:"Jinja",import:()=>import("./jinja-Bvto84B4.js")},{id:"jison",name:"Jison",import:()=>import("./jison-rKmQmF2-.js")},{id:"json",name:"JSON",import:()=>import("./json-LWN7Ml79.js")},{id:"json5",name:"JSON5",import:()=>import("./json5-CgCB487x.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("./jsonc-BXrjvC_e.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("./jsonl-D5dm1SHP.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("./jsonnet-B60UklUs.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("./jssm-CsqlGknB.js")},{id:"jsx",name:"JSX",import:()=>import("./jsx-g2NrEQII.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("./julia-BLEJsPGm.js")},{id:"kdl",name:"KDL",import:()=>import("./kdl-DWIPcypl.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("./kotlin-DiV2Dt9D.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("./kusto-BJ51M1bD.js")},{id:"latex",name:"LaTeX",import:()=>import("./latex-DHfEut71.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("./lean-BpZurxeZ.js")},{id:"less",name:"Less",import:()=>import("./less-DKKxO4Pm.js")},{id:"liquid",name:"Liquid",import:()=>import("./liquid-C2bTOIx_.js")},{id:"llvm",name:"LLVM IR",import:()=>import("./llvm-BMwXnwe8.js")},{id:"log",name:"Log file",import:()=>import("./log-CnKjEmrw.js")},{id:"logo",name:"Logo",import:()=>import("./logo-BmG1tMr6.js")},{id:"lua",name:"Lua",import:()=>import("./lua-DlAioYQl.js")},{id:"luau",name:"Luau",import:()=>import("./luau-BImqhNgT.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("./make-Ccm3NI5i.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("./markdown-DY93LJPj.js")},{id:"marko",name:"Marko",import:()=>import("./marko-2xMnbWEh.js")},{id:"matlab",name:"MATLAB",import:()=>import("./matlab-nYX3zffi.js")},{id:"mdc",name:"MDC",import:()=>import("./mdc-CKHPIY6R.js")},{id:"mdx",name:"MDX",import:()=>import("./mdx-C8C9IGe9.js")},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>import("./mermaid--Jyu4oWd.js")},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>import("./mipsasm-BjAqecqh.js")},{id:"mojo",name:"Mojo",import:()=>import("./mojo-CxwnvobC.js")},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>import("./moonbit-Cu4LvJk1.js")},{id:"move",name:"Move",import:()=>import("./move-Dg7rFHVC.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("./narrat-BTSicUR-.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("./nextflow-D-awTbLA.js")},{id:"nginx",name:"Nginx",import:()=>import("./nginx-B2z8CTeP.js")},{id:"nim",name:"Nim",import:()=>import("./nim-CvRST-Lt.js")},{id:"nix",name:"Nix",import:()=>import("./nix-Dd0CGXk3.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("./nushell-Cdolw_6l.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("./objective-c-DLT9zZoE.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("./objective-cpp-DKXr-AK_.js")},{id:"ocaml",name:"OCaml",import:()=>import("./ocaml-DP9q6K5L.js")},{id:"odin",name:"Odin",import:()=>import("./odin-BINPiy40.js")},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>import("./openscad-CVq2HK1T.js")},{id:"pascal",name:"Pascal",import:()=>import("./pascal-DjTTLVNS.js")},{id:"perl",name:"Perl",import:()=>import("./perl-CR0OrhQR.js")},{id:"php",name:"PHP",import:()=>import("./php-Ch-cYjOD.js")},{id:"pkl",name:"Pkl",import:()=>import("./pkl-0Sl31KKD.js")},{id:"plsql",name:"PL/SQL",import:()=>import("./plsql-CJrHCTnj.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("./po-y5MdiEbo.js")},{id:"polar",name:"Polar",import:()=>import("./polar-Bsx6RkUC.js")},{id:"postcss",name:"PostCSS",import:()=>import("./postcss-CeUBPB2S.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("./powerquery-CW27I574.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("./powershell-DSYJ6xcj.js")},{id:"prisma",name:"Prisma",import:()=>import("./prisma-CLoN-gBj.js")},{id:"prolog",name:"Prolog",import:()=>import("./prolog-Bgt5DHUA.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("./proto-C194Edqz.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("./pug-zcj1uJy9.js")},{id:"puppet",name:"Puppet",import:()=>import("./puppet-TSkl_nn0.js")},{id:"purescript",name:"PureScript",import:()=>import("./purescript-BrDje9qL.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("./python-DlV7vnVD.js")},{id:"qml",name:"QML",import:()=>import("./qml-DTv-54bL.js")},{id:"qmldir",name:"QML Directory",import:()=>import("./qmldir-CSZk7E48.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("./qss-DACx-k9g.js")},{id:"r",name:"R",import:()=>import("./r-EOoB7omE.js")},{id:"racket",name:"Racket",import:()=>import("./racket-D1nq-KeH.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("./raku-DocPDKZq.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("./razor-Dx4-zBXE.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("./reg-5ydmJHEw.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("./regexp-CpyjTnFF.js")},{id:"rel",name:"Rel",import:()=>import("./rel-D68lwU-3.js")},{id:"riscv",name:"RISC-V",import:()=>import("./riscv-Cl4WfXj6.js")},{id:"ron",name:"RON",import:()=>import("./ron-1l4eGd0-.js")},{id:"rosmsg",name:"ROS Interface",import:()=>import("./rosmsg-sf_0D22S.js")},{id:"rst",name:"reStructuredText",import:()=>import("./rst-Db6JICNt.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("./ruby-DQYiaCa_.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("./rust-DpWcZSqc.js")},{id:"sas",name:"SAS",import:()=>import("./sas-BBCK0tAG.js")},{id:"sass",name:"Sass",import:()=>import("./sass-DY_rGA2-.js")},{id:"scala",name:"Scala",import:()=>import("./scala-CYRsmRER.js")},{id:"scheme",name:"Scheme",import:()=>import("./scheme-C45fPb3F.js")},{id:"scss",name:"SCSS",import:()=>import("./scss-CHxzYwli.js")},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>import("./sdbl-BpucmfEo.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("./shaderlab-DNyPh2Q6.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("./shellscript-B8OHlvmy.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("./shellsession-OATBsyRD.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("./smalltalk-CKvddXL8.js")},{id:"solidity",name:"Solidity",import:()=>import("./solidity-XfXaqt9k.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("./soy-BOdB6UQG.js")},{id:"sparql",name:"SPARQL",import:()=>import("./sparql-CLNNOQQI.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("./splunk-CFtInczE.js")},{id:"sql",name:"SQL",import:()=>import("./sql-BhJCBb_s.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("./ssh-config-Dqsr-I88.js")},{id:"stata",name:"Stata",import:()=>import("./stata-G4GYNNPE.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("./stylus-BeJftkpb.js")},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>import("./surrealql-C_6seBBi.js")},{id:"svelte",name:"Svelte",import:()=>import("./svelte-ChRP14-8.js")},{id:"swift",name:"Swift",import:()=>import("./swift-dg2QTUdp.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("./system-verilog-B3nElewZ.js")},{id:"systemd",name:"Systemd Units",import:()=>import("./systemd-B7SlkmfE.js")},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>import("./talonscript-BrsbXmRy.js")},{id:"tasl",name:"Tasl",import:()=>import("./tasl-CMkPZNj1.js")},{id:"tcl",name:"Tcl",import:()=>import("./tcl-CiyEbZSK.js")},{id:"templ",name:"Templ",import:()=>import("./templ-B_lDaXqj.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("./terraform-BUB-_BlF.js")},{id:"tex",name:"TeX",import:()=>import("./tex-C-BO_DSa.js")},{id:"toml",name:"TOML",import:()=>import("./toml-VldhK7iW.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("./ts-tags-Dj4ev--C.js")},{id:"tsv",name:"TSV",import:()=>import("./tsv-BQ9ptESM.js")},{id:"tsx",name:"TSX",import:()=>import("./tsx-DYwE5ssU.js")},{id:"turtle",name:"Turtle",import:()=>import("./turtle-BVy4HXn4.js")},{id:"twig",name:"Twig",import:()=>import("./twig-DL5s0dWc.js")},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>import("./typescript-DI7mmMRd.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("./typespec-BNdhC6HS.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("./typst-JIZTSUoJ.js")},{id:"v",name:"V",import:()=>import("./v-B66J5FdL.js")},{id:"vala",name:"Vala",import:()=>import("./vala-p2PL1w-1.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("./vb-Dv-GCw1m.js")},{id:"verilog",name:"Verilog",import:()=>import("./verilog-DKP7kpC6.js")},{id:"vhdl",name:"VHDL",import:()=>import("./vhdl-Cog-DhcW.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("./viml-0AN1aqkP.js")},{id:"vue",name:"Vue",import:()=>import("./vue-CUn-yz7f.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("./vue-html-a8uCr53v.js")},{id:"vue-vine",name:"Vue Vine",import:()=>import("./vue-vine-2Gx6KHOr.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("./vyper-sB2l1MOO.js")},{id:"wasm",name:"WebAssembly",import:()=>import("./wasm-CSAWeJiV.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("./wenyan-CLHHXU5e.js")},{id:"wgsl",name:"WGSL",import:()=>import("./wgsl-DiTcYanS.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("./wikitext-DT8E9qe0.js")},{id:"wit",name:"WebAssembly Interface Types",import:()=>import("./wit-CtjT-RdY.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("./wolfram-1xJNnwe2.js")},{id:"xml",name:"XML",import:()=>import("./xml-BsgRw6d1.js")},{id:"xsl",name:"XSL",import:()=>import("./xsl-CNIkWbJg.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("./yaml-c2-Vhxho.js")},{id:"zenscript",name:"ZenScript",import:()=>import("./zenscript-ChP1MlQf.js")},{id:"zig",name:"Zig",import:()=>import("./zig-rivS3YQG.js")}],R=Object.fromEntries(q.map(i=>[i.id,i.import])),V=Object.fromEntries(q.flatMap(i=>i.aliases?.map(t=>[t,i.import])||[])),z={...R,...V},W=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("./andromeeda-C4gqWexZ.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("./aurora-x-D-2ljcwZ.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("./ayu-dark-CMjwMIkn.js")},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>import("./ayu-light-C47S-Tmv.js")},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>import("./ayu-mirage-CjoLj4QM.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("./catppuccin-frappe-DFWUc33u.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("./catppuccin-latte-C9dUb6Cb.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("./catppuccin-macchiato-DQyhUUbL.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("./catppuccin-mocha-D87Tk5Gz.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("./dark-plus-C3mMm8J8.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("./dracula-BzJJZx-M.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("./dracula-soft-BXkSAIEj.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("./everforest-dark-BgDCqdQA.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("./everforest-light-C8M2exoo.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("./github-dark-DHJKELXO.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("./github-dark-default-Cuk6v7N8.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("./github-dark-dimmed-DH5Ifo-i.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("./github-dark-high-contrast-E3gJ1_iC.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("./github-light-DAi9KRSo.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("./github-light-default-D7oLnXFd.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("./github-light-high-contrast-BfjtVDDH.js")},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>import("./gruvbox-dark-hard-CFHQjOhq.js")},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>import("./gruvbox-dark-medium-GsRaNv29.js")},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>import("./gruvbox-dark-soft-CVdnzihN.js")},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>import("./gruvbox-light-hard-CH1njM8p.js")},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>import("./gruvbox-light-medium-DRw_LuNl.js")},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>import("./gruvbox-light-soft-hJgmCMqR.js")},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>import("./horizon-BUw7H-hv.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("./houston-DnULxvSX.js")},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>import("./kanagawa-dragon-CkXjmgJE.js")},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>import("./kanagawa-lotus-CfQXZHmo.js")},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>import("./kanagawa-wave-DWedfzmr.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("./laserwave-DUszq2jm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("./light-plus-B7mTdjB0.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("./material-theme-D5KoaKCx.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("./material-theme-darker-BfHTSMKl.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("./material-theme-lighter-B0m2ddpp.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("./material-theme-ocean-CyktbL80.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("./material-theme-palenight-Csfq5Kiy.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("./min-dark-CafNBF8u.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("./min-light-CTRr51gU.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("./monokai-D4h5O-jR.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("./night-owl-C39BiMTA.js")},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>import("./night-owl-light-CMTm3GFP.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("./nord-Ddv68eIx.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("./one-dark-pro-DVMEJ2y_.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("./one-light-C3Wv6jpd.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("./plastic-3e1v2bzS.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("./poimandres-CS3Unz2-.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("./red-bN70gL4F.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("./rose-pine-qdsjHGoJ.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("./rose-pine-dawn-DHQR4-dF.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("./rose-pine-moon-D4_iv3hh.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("./slack-dark-BthQWCQV.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("./slack-ochin-DqwNpetd.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("./snazzy-light-Bw305WKR.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("./solarized-dark-DXbdFlpD.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("./solarized-light-L9t79GZl.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("./synthwave-84-ChtBzv_y.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("./tokyo-night-hegEt444.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("./vesper-DU1UobuO.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("./vitesse-black-Bkuqu6BP.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("./vitesse-dark-D0r3Knsf.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("./vitesse-light-CVO1_9PV.js")}],I=Object.fromEntries(W.map(i=>[i.id,i.import]));class J extends Error{constructor(i){super(i),this.name="ShikiError"}}function F(){return"undefined"!=typeof performance?performance.now():Date.now()}const Q=(i,t)=>i+(t-i%t)%t;async function X(i){let t,e;const r={};function a(i){e=i,r.HEAPU8=new Uint8Array(i),r.HEAPU32=new Uint32Array(i)}function m(i){try{return t.grow(i-e.byteLength+65535>>>16),a(t.buffer),1}catch{}}const o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(i,t){return i?function(i,t,e=1024){const r=t+e;let a=t;for(;i[a]&&!(a>=r);)++a;if(a-t>16&&i.buffer&&o)return o.decode(i.subarray(t,a));let m="";for(;t<a;){let e=i[t++];if(!(128&e)){m+=String.fromCharCode(e);continue}const r=63&i[t++];if(192==(224&e)){m+=String.fromCharCode((31&e)<<6|r);continue}const a=63&i[t++];if(e=224==(240&e)?(15&e)<<12|r<<6|a:(7&e)<<18|r<<12|a<<6|63&i[t++],e<65536)m+=String.fromCharCode(e);else{const i=e-65536;m+=String.fromCharCode(55296|i>>10,56320|1023&i)}}return m}(r.HEAPU8,i,t):""}const p={emscripten_get_now:F,emscripten_memcpy_big:function(i,t,e){r.HEAPU8.copyWithin(i,t,t+e)},emscripten_resize_heap:function(i){const t=r.HEAPU8.length,e=2147483648;if((i>>>=0)>e)return!1;for(let r=1;r<=4;r*=2){let a=t*(1+.2/r);a=Math.min(a,i+100663296);if(m(Math.min(e,Q(Math.max(i,a),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const e={env:p,wasi_snapshot_preview1:p},m=await i(e);t=m.memory,a(t.buffer),Object.assign(r,m),r.UTF8ToString=s}(),r}var K=Object.defineProperty,Z=(i,t,e)=>((i,t,e)=>t in i?K(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e)(i,"symbol"!=typeof t?t+"":t,e);let Y=null;class ${constructor(i){Z(this,"utf16Length"),Z(this,"utf8Length"),Z(this,"utf16Value"),Z(this,"utf8Value"),Z(this,"utf16OffsetToUtf8"),Z(this,"utf8OffsetToUtf16");const t=i.length,e=$._utf8ByteLength(i),r=e!==t,a=r?new Uint32Array(t+1):null;r&&(a[t]=e);const m=r?new Uint32Array(e+1):null;r&&(m[e]=t);const o=new Uint8Array(e);let s=0;for(let p=0;p<t;p++){const e=i.charCodeAt(p);let n=e,d=!1;if(e>=55296&&e<=56319&&p+1<t){const t=i.charCodeAt(p+1);t>=56320&&t<=57343&&(n=65536+(e-55296<<10)|t-56320,d=!0)}r&&(a[p]=s,d&&(a[p+1]=s),n<=127?m[s+0]=p:n<=2047?(m[s+0]=p,m[s+1]=p):n<=65535?(m[s+0]=p,m[s+1]=p,m[s+2]=p):(m[s+0]=p,m[s+1]=p,m[s+2]=p,m[s+3]=p)),n<=127?o[s++]=n:n<=2047?(o[s++]=192|(1984&n)>>>6,o[s++]=128|(63&n)>>>0):n<=65535?(o[s++]=224|(61440&n)>>>12,o[s++]=128|(4032&n)>>>6,o[s++]=128|(63&n)>>>0):(o[s++]=240|(1835008&n)>>>18,o[s++]=128|(258048&n)>>>12,o[s++]=128|(4032&n)>>>6,o[s++]=128|(63&n)>>>0),d&&p++}this.utf16Length=t,this.utf8Length=e,this.utf16Value=i,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=m}static _utf8ByteLength(i){let t=0;for(let e=0,r=i.length;e<r;e++){const a=i.charCodeAt(e);let m=a,o=!1;if(a>=55296&&a<=56319&&e+1<r){const t=i.charCodeAt(e+1);t>=56320&&t<=57343&&(m=65536+(a-55296<<10)|t-56320,o=!0)}t+=m<=127?1:m<=2047?2:m<=65535?3:4,o&&e++}return t}createString(i){const t=i.omalloc(this.utf8Length);return i.HEAPU8.set(this.utf8Value,t),t}}const ii=class i{constructor(t){if(Z(this,"id",++i.LAST_ID),Z(this,"_onigBinding"),Z(this,"content"),Z(this,"utf16Length"),Z(this,"utf8Length"),Z(this,"utf16OffsetToUtf8"),Z(this,"utf8OffsetToUtf16"),Z(this,"ptr"),!Y)throw new J("Must invoke loadWasm first.");this._onigBinding=Y,this.content=t;const e=new $(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!i._sharedPtrInUse?(i._sharedPtr||(i._sharedPtr=Y.omalloc(1e4)),i._sharedPtrInUse=!0,Y.HEAPU8.set(e.utf8Value,i._sharedPtr),this.ptr=i._sharedPtr):this.ptr=e.createString(Y)}convertUtf8OffsetToUtf16(i){return this.utf8OffsetToUtf16?i<0?0:i>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[i]:i}convertUtf16OffsetToUtf8(i){return this.utf16OffsetToUtf8?i<0?0:i>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[i]:i}dispose(){this.ptr===i._sharedPtr?i._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Z(ii,"LAST_ID",0),Z(ii,"_sharedPtr",0),Z(ii,"_sharedPtrInUse",!1);let ti,ei=ii;class ri{constructor(i){if(Z(this,"_onigBinding"),Z(this,"_ptr"),!Y)throw new J("Must invoke loadWasm first.");const t=[],e=[];for(let o=0,s=i.length;o<s;o++){const r=new $(i[o]);t[o]=r.createString(Y),e[o]=r.utf8Length}const r=Y.omalloc(4*i.length);Y.HEAPU32.set(t,r/4);const a=Y.omalloc(4*i.length);Y.HEAPU32.set(e,a/4);const m=Y.createOnigScanner(r,a,i.length);for(let o=0,s=i.length;o<s;o++)Y.ofree(t[o]);Y.ofree(a),Y.ofree(r),0===m&&function(i){throw new J(i.UTF8ToString(i.getLastOnigError()))}(Y),this._onigBinding=Y,this._ptr=m}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(i,t,e){let r=0;if("number"==typeof e&&(r=e),"string"==typeof i){i=new ei(i);const e=this._findNextMatchSync(i,t,!1,r);return i.dispose(),e}return this._findNextMatchSync(i,t,!1,r)}_findNextMatchSync(i,t,e,r){const a=this._onigBinding,m=a.findNextOnigScannerMatch(this._ptr,i.id,i.ptr,i.utf8Length,i.convertUtf16OffsetToUtf8(t),r);if(0===m)return null;const o=a.HEAPU32;let s=m/4;const p=o[s++],n=o[s++],d=[];for(let l=0;l<n;l++){const t=i.convertUtf8OffsetToUtf16(o[s++]),e=i.convertUtf8OffsetToUtf16(o[s++]);d[l]={start:t,end:e,length:e-t}}return{index:p,captureIndices:d}}}function ai(i){if(ti)return ti;return ti=async function(){Y=await X(async t=>{let e=i;var r;return e=await e,"function"==typeof e&&(e=await e(t)),"function"==typeof e&&(e=await e(t)),"function"==typeof e.instantiator?e=await e.instantiator(t):!function(i){return"function"==typeof i.default}(e)?(function(i){return void 0!==i.data}(e)&&(e=e.data),!function(i){return"undefined"!=typeof Response&&i instanceof Response}(e)?!function(i){return"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array}(e)?e instanceof WebAssembly.Module?e=await mi(e)(t):"default"in e&&e.default instanceof WebAssembly.Module&&(e=await mi(e.default)(t)):e=await mi(e)(t):e="function"==typeof WebAssembly.instantiateStreaming?await(r=e,i=>WebAssembly.instantiateStreaming(r,i))(t):await function(i){return async t=>{const e=await i.arrayBuffer();return WebAssembly.instantiate(e,t)}}(e)(t)):e=await e.default(t),"instance"in e&&(e=e.instance),"exports"in e&&(e=e.exports),e})}(),ti}function mi(i){return t=>WebAssembly.instantiate(i,t)}async function oi(i){return i&&await ai(i),{createScanner:i=>new ri(i.map(i=>"string"==typeof i?i:i.source)),createString:i=>new ei(i)}}const si=/* @__PURE__ */t({langs:z,themes:I,engine:()=>oi(import("./wasm--yL7jHw-.js"))}),{codeToHtml:pi,codeToHast:ni,codeToTokens:di,codeToTokensBase:li,codeToTokensWithThemes:ci,getSingletonHighlighter:hi,getLastGrammarState:ji}=/* @__PURE__ */i(si,{guessEmbeddedLanguages:e});export{r as ShikiError,a as addClassToHast,m as applyColorReplacements,z as bundledLanguages,V as bundledLanguagesAlias,R as bundledLanguagesBase,q as bundledLanguagesInfo,I as bundledThemes,W as bundledThemesInfo,ni as codeToHast,pi as codeToHtml,di as codeToTokens,li as codeToTokensBase,ci as codeToTokensWithThemes,t as createBundledHighlighter,o as createCssVariablesTheme,si as createHighlighter,s as createHighlighterCore,p as createHighlighterCoreSync,E as createJavaScriptRegexEngine,oi as createOnigurumaEngine,n as createPositionConverter,d as createShikiInternal,l as createShikiInternalSync,i as createSingletonShorthands,c as createdBundledHighlighter,G as defaultJavaScriptRegexConstructor,j as enableDeprecationWarnings,u as flatTokenVariants,ji as getLastGrammarState,hi as getSingletonHighlighter,f as getSingletonHighlighterCore,g as getTokenStyleObject,e as guessEmbeddedLanguages,y as hastToHtml,k as isNoneTheme,b as isPlainLang,v as isSpecialLang,S as isSpecialTheme,ai as loadWasm,w as makeSingletonHighlighter,L as makeSingletonHighlighterCore,x as normalizeGetter,N as normalizeTheme,T as resolveColorReplacements,A as splitLines,C as splitToken,M as splitTokens,P as stringifyTokenStyle,O as toArray,U as tokenizeAnsiWithTheme,D as tokenizeWithTheme,H as tokensToHast,_ as transformerDecorations,B as warnDeprecated};
1
+ import{createSingletonShorthands as i,createBundledHighlighter as t,guessEmbeddedLanguages as e}from"./index-BemYRVDN.js";import{ShikiError as r,addClassToHast as a,applyColorReplacements as m,createCssVariablesTheme as o,createHighlighterCore as s,createHighlighterCoreSync as p,createPositionConverter as n,createShikiInternal as d,createShikiInternalSync as l,createdBundledHighlighter as c,enableDeprecationWarnings as j,flatTokenVariants as u,getSingletonHighlighterCore as f,getTokenStyleObject as g,hastToHtml as y,isNoneTheme as k,isPlainLang as b,isSpecialLang as v,isSpecialTheme as S,makeSingletonHighlighter as w,makeSingletonHighlighterCore as L,normalizeGetter as x,normalizeTheme as N,resolveColorReplacements as T,splitLines as A,splitToken as C,splitTokens as M,stringifyTokenStyle as P,toArray as O,tokenizeAnsiWithTheme as U,tokenizeWithTheme as D,tokensToHast as H,transformerDecorations as _,warnDeprecated as B}from"./index-BemYRVDN.js";import{c as E,d as G}from"./engine-compile-CsVoR5aC.js";const q=[{id:"abap",name:"ABAP",import:()=>import("./abap-DnJxzdy9.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("./actionscript-3-DKotD2Vd.js")},{id:"ada",name:"Ada",import:()=>import("./ada-iG1FnIvR.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("./angular-html-gmylb4v7.js").then(i=>i.f)},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("./angular-ts-DgRtZR5b.js")},{id:"apache",name:"Apache Conf",import:()=>import("./apache-CdTKWnKT.js")},{id:"apex",name:"Apex",import:()=>import("./apex-DPFMkx-R.js")},{id:"apl",name:"APL",import:()=>import("./apl-8tIde7kE.js")},{id:"applescript",name:"AppleScript",import:()=>import("./applescript-BlLNmGTp.js")},{id:"ara",name:"Ara",import:()=>import("./ara-Ba3fhlsS.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("./asciidoc-XTVL4-GN.js")},{id:"asm",name:"Assembly",import:()=>import("./asm-CHX6lpGW.js")},{id:"astro",name:"Astro",import:()=>import("./astro-B5Br1cQb.js")},{id:"awk",name:"AWK",import:()=>import("./awk-XRrwoikR.js")},{id:"ballerina",name:"Ballerina",import:()=>import("./ballerina-Dh0JsEtz.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("./bat-BVu0TwaT.js")},{id:"beancount",name:"Beancount",import:()=>import("./beancount-CJl0njO0.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("./berry-Bmu6i3Vs.js")},{id:"bibtex",name:"BibTeX",import:()=>import("./bibtex-CGjxJ4Zd.js")},{id:"bicep",name:"Bicep",import:()=>import("./bicep-DSW96mAt.js")},{id:"blade",name:"Blade",import:()=>import("./blade-BQ-lQURp.js")},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>import("./bsl-DGicdwC0.js")},{id:"c",name:"C",import:()=>import("./c-BmJt9k-y.js")},{id:"c3",name:"C3",import:()=>import("./c3-B5xr2KH_.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("./cadence-DbDq8SCj.js")},{id:"cairo",name:"Cairo",import:()=>import("./cairo-Dz8fl918.js")},{id:"clarity",name:"Clarity",import:()=>import("./clarity-Bb40UnPS.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("./clojure-BjI0Knrv.js")},{id:"cmake",name:"CMake",import:()=>import("./cmake-BYiqpiH1.js")},{id:"cobol",name:"COBOL",import:()=>import("./cobol-7Bn895Wb.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("./codeowners-L91meNbn.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("./codeql-Cd-JFsJB.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("./coffee-BDkVV41o.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("./common-lisp-DOi1njVG.js")},{id:"coq",name:"Coq",import:()=>import("./coq-BfbrVLCY.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("./cpp-DogXcJ7O.js")},{id:"crystal",name:"Crystal",import:()=>import("./crystal-CaN4TS0s.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("./csharp-VAkxddOj.js")},{id:"css",name:"CSS",import:()=>import("./css-l46fsARh.js")},{id:"csv",name:"CSV",import:()=>import("./csv-DXKU4rRd.js")},{id:"cue",name:"CUE",import:()=>import("./cue-zmT78Agv.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("./cypher-bkHSskm3.js")},{id:"d",name:"D",import:()=>import("./d-vs9xsbRV.js")},{id:"dart",name:"Dart",import:()=>import("./dart-BMkYYGiN.js")},{id:"dax",name:"DAX",import:()=>import("./dax-D135z3aS.js")},{id:"desktop",name:"Desktop",import:()=>import("./desktop-CigPEpQ5.js")},{id:"diff",name:"Diff",import:()=>import("./diff-Beq1YlA8.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("./docker-V5Al5bpF.js")},{id:"dotenv",name:"dotEnv",import:()=>import("./dotenv-D9G8sA2m.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("./dream-maker-BsoKROiO.js")},{id:"edge",name:"Edge",import:()=>import("./edge-rRnuLDAV.js")},{id:"elixir",name:"Elixir",import:()=>import("./elixir-CxDZGvum.js")},{id:"elm",name:"Elm",import:()=>import("./elm-5NnWpb8Q.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("./emacs-lisp-BcpYGiHp.js")},{id:"erb",name:"ERB",import:()=>import("./erb-BkKzIHzi.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("./erlang-DAw79KxH.js")},{id:"fennel",name:"Fennel",import:()=>import("./fennel-qzPJJAAI.js")},{id:"fish",name:"Fish",import:()=>import("./fish-Cx6My9pS.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("./fluent-BsukS3Co.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("./fortran-fixed-form-BiRvzwyR.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("./fortran-free-form-CakU9R0a.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("./fsharp-BmLNaTNL.js")},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>import("./gdresource-pHyHNgx5.js")},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>import("./gdscript-BpxQpKjR.js")},{id:"gdshader",name:"GDShader",import:()=>import("./gdshader-BC7WJXp9.js")},{id:"genie",name:"Genie",import:()=>import("./genie-IZOju1hG.js")},{id:"gherkin",name:"Gherkin",import:()=>import("./gherkin-DUpgZfGr.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("./git-commit-Bptnmh-c.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("./git-rebase-CqNhyBhE.js")},{id:"gleam",name:"Gleam",import:()=>import("./gleam-CCCEh_av.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("./glimmer-js-Bxt49MuP.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("./glimmer-ts-BsGfVpaS.js")},{id:"glsl",name:"GLSL",import:()=>import("./glsl-BDbjGBhJ.js")},{id:"gn",name:"GN",import:()=>import("./gn-BNGDdMfm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("./gnuplot-D0FoiB-W.js")},{id:"go",name:"Go",import:()=>import("./go-Ci1olR0S.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("./graphql-DTlHKpVh.js")},{id:"groovy",name:"Groovy",import:()=>import("./groovy-D9sPn4Z-.js")},{id:"hack",name:"Hack",import:()=>import("./hack-vS_ALjIE.js")},{id:"haml",name:"Ruby Haml",import:()=>import("./haml-DvFFb5cL.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("./handlebars--3HEtxsY.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("./haskell-Cp0NQEkn.js")},{id:"haxe",name:"Haxe",import:()=>import("./haxe-D-PmAGDa.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("./hcl-DRMo6eis.js")},{id:"hjson",name:"Hjson",import:()=>import("./hjson-BPEpXUFQ.js")},{id:"hlsl",name:"HLSL",import:()=>import("./hlsl-B-PjNM4a.js")},{id:"html",name:"HTML",import:()=>import("./html-Z-jPWkqI.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("./html-derivative-DKviipgs.js")},{id:"http",name:"HTTP",import:()=>import("./http-Dh7mhfAc.js")},{id:"hurl",name:"Hurl",import:()=>import("./hurl-DvxDWHzM.js")},{id:"hxml",name:"HXML",import:()=>import("./hxml-DB3_nACV.js")},{id:"hy",name:"Hy",import:()=>import("./hy-CLIvbAhW.js")},{id:"imba",name:"Imba",import:()=>import("./imba-B-tO30Ge.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("./ini-Bpxu4Zsc.js")},{id:"java",name:"Java",import:()=>import("./java-DtRXFtDl.js")},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>import("./javascript-DFyEbC5y.js")},{id:"jinja",name:"Jinja",import:()=>import("./jinja-Bvto84B4.js")},{id:"jison",name:"Jison",import:()=>import("./jison-rKmQmF2-.js")},{id:"json",name:"JSON",import:()=>import("./json-LWN7Ml79.js")},{id:"json5",name:"JSON5",import:()=>import("./json5-CgCB487x.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("./jsonc-BXrjvC_e.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("./jsonl-D5dm1SHP.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("./jsonnet-B60UklUs.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("./jssm-CsqlGknB.js")},{id:"jsx",name:"JSX",import:()=>import("./jsx-g2NrEQII.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("./julia-BLEJsPGm.js")},{id:"kdl",name:"KDL",import:()=>import("./kdl-DWIPcypl.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("./kotlin-DiV2Dt9D.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("./kusto-BJ51M1bD.js")},{id:"latex",name:"LaTeX",import:()=>import("./latex-DHfEut71.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("./lean-BpZurxeZ.js")},{id:"less",name:"Less",import:()=>import("./less-DKKxO4Pm.js")},{id:"liquid",name:"Liquid",import:()=>import("./liquid-C2bTOIx_.js")},{id:"llvm",name:"LLVM IR",import:()=>import("./llvm-BMwXnwe8.js")},{id:"log",name:"Log file",import:()=>import("./log-CnKjEmrw.js")},{id:"logo",name:"Logo",import:()=>import("./logo-BmG1tMr6.js")},{id:"lua",name:"Lua",import:()=>import("./lua-DlAioYQl.js")},{id:"luau",name:"Luau",import:()=>import("./luau-BImqhNgT.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("./make-Ccm3NI5i.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("./markdown-DY93LJPj.js")},{id:"marko",name:"Marko",import:()=>import("./marko-2xMnbWEh.js")},{id:"matlab",name:"MATLAB",import:()=>import("./matlab-nYX3zffi.js")},{id:"mdc",name:"MDC",import:()=>import("./mdc-CKHPIY6R.js")},{id:"mdx",name:"MDX",import:()=>import("./mdx-C8C9IGe9.js")},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>import("./mermaid--Jyu4oWd.js")},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>import("./mipsasm-BjAqecqh.js")},{id:"mojo",name:"Mojo",import:()=>import("./mojo-CxwnvobC.js")},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>import("./moonbit-Cu4LvJk1.js")},{id:"move",name:"Move",import:()=>import("./move-Dg7rFHVC.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("./narrat-BTSicUR-.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("./nextflow-D-awTbLA.js")},{id:"nginx",name:"Nginx",import:()=>import("./nginx-B2z8CTeP.js")},{id:"nim",name:"Nim",import:()=>import("./nim-CvRST-Lt.js")},{id:"nix",name:"Nix",import:()=>import("./nix-Dd0CGXk3.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("./nushell-Cdolw_6l.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("./objective-c-DLT9zZoE.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("./objective-cpp-DKXr-AK_.js")},{id:"ocaml",name:"OCaml",import:()=>import("./ocaml-DP9q6K5L.js")},{id:"odin",name:"Odin",import:()=>import("./odin-BINPiy40.js")},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>import("./openscad-CVq2HK1T.js")},{id:"pascal",name:"Pascal",import:()=>import("./pascal-DjTTLVNS.js")},{id:"perl",name:"Perl",import:()=>import("./perl-CR0OrhQR.js")},{id:"php",name:"PHP",import:()=>import("./php-Ch-cYjOD.js")},{id:"pkl",name:"Pkl",import:()=>import("./pkl-0Sl31KKD.js")},{id:"plsql",name:"PL/SQL",import:()=>import("./plsql-CJrHCTnj.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("./po-y5MdiEbo.js")},{id:"polar",name:"Polar",import:()=>import("./polar-Bsx6RkUC.js")},{id:"postcss",name:"PostCSS",import:()=>import("./postcss-CeUBPB2S.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("./powerquery-CW27I574.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("./powershell-DSYJ6xcj.js")},{id:"prisma",name:"Prisma",import:()=>import("./prisma-CLoN-gBj.js")},{id:"prolog",name:"Prolog",import:()=>import("./prolog-Bgt5DHUA.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("./proto-C194Edqz.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("./pug-zcj1uJy9.js")},{id:"puppet",name:"Puppet",import:()=>import("./puppet-TSkl_nn0.js")},{id:"purescript",name:"PureScript",import:()=>import("./purescript-BrDje9qL.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("./python-DlV7vnVD.js")},{id:"qml",name:"QML",import:()=>import("./qml-DTv-54bL.js")},{id:"qmldir",name:"QML Directory",import:()=>import("./qmldir-CSZk7E48.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("./qss-DACx-k9g.js")},{id:"r",name:"R",import:()=>import("./r-EOoB7omE.js")},{id:"racket",name:"Racket",import:()=>import("./racket-D1nq-KeH.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("./raku-DocPDKZq.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("./razor-Dx4-zBXE.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("./reg-5ydmJHEw.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("./regexp-CpyjTnFF.js")},{id:"rel",name:"Rel",import:()=>import("./rel-D68lwU-3.js")},{id:"riscv",name:"RISC-V",import:()=>import("./riscv-Cl4WfXj6.js")},{id:"ron",name:"RON",import:()=>import("./ron-1l4eGd0-.js")},{id:"rosmsg",name:"ROS Interface",import:()=>import("./rosmsg-sf_0D22S.js")},{id:"rst",name:"reStructuredText",import:()=>import("./rst-Db6JICNt.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("./ruby-DQYiaCa_.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("./rust-DpWcZSqc.js")},{id:"sas",name:"SAS",import:()=>import("./sas-BBCK0tAG.js")},{id:"sass",name:"Sass",import:()=>import("./sass-DY_rGA2-.js")},{id:"scala",name:"Scala",import:()=>import("./scala-CYRsmRER.js")},{id:"scheme",name:"Scheme",import:()=>import("./scheme-C45fPb3F.js")},{id:"scss",name:"SCSS",import:()=>import("./scss-CHxzYwli.js")},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>import("./sdbl-BpucmfEo.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("./shaderlab-DNyPh2Q6.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("./shellscript-B8OHlvmy.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("./shellsession-OATBsyRD.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("./smalltalk-CKvddXL8.js")},{id:"solidity",name:"Solidity",import:()=>import("./solidity-XfXaqt9k.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("./soy-BOdB6UQG.js")},{id:"sparql",name:"SPARQL",import:()=>import("./sparql-CLNNOQQI.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("./splunk-CFtInczE.js")},{id:"sql",name:"SQL",import:()=>import("./sql-BhJCBb_s.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("./ssh-config-Dqsr-I88.js")},{id:"stata",name:"Stata",import:()=>import("./stata-G4GYNNPE.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("./stylus-BeJftkpb.js")},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>import("./surrealql-C_6seBBi.js")},{id:"svelte",name:"Svelte",import:()=>import("./svelte-ChRP14-8.js")},{id:"swift",name:"Swift",import:()=>import("./swift-dg2QTUdp.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("./system-verilog-B3nElewZ.js")},{id:"systemd",name:"Systemd Units",import:()=>import("./systemd-B7SlkmfE.js")},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>import("./talonscript-BrsbXmRy.js")},{id:"tasl",name:"Tasl",import:()=>import("./tasl-CMkPZNj1.js")},{id:"tcl",name:"Tcl",import:()=>import("./tcl-CiyEbZSK.js")},{id:"templ",name:"Templ",import:()=>import("./templ-B_lDaXqj.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("./terraform-BUB-_BlF.js")},{id:"tex",name:"TeX",import:()=>import("./tex-C-BO_DSa.js")},{id:"toml",name:"TOML",import:()=>import("./toml-VldhK7iW.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("./ts-tags-Dj4ev--C.js")},{id:"tsv",name:"TSV",import:()=>import("./tsv-BQ9ptESM.js")},{id:"tsx",name:"TSX",import:()=>import("./tsx-DYwE5ssU.js")},{id:"turtle",name:"Turtle",import:()=>import("./turtle-BVy4HXn4.js")},{id:"twig",name:"Twig",import:()=>import("./twig-DL5s0dWc.js")},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>import("./typescript-DI7mmMRd.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("./typespec-BNdhC6HS.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("./typst-JIZTSUoJ.js")},{id:"v",name:"V",import:()=>import("./v-B66J5FdL.js")},{id:"vala",name:"Vala",import:()=>import("./vala-p2PL1w-1.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("./vb-Dv-GCw1m.js")},{id:"verilog",name:"Verilog",import:()=>import("./verilog-DKP7kpC6.js")},{id:"vhdl",name:"VHDL",import:()=>import("./vhdl-Cog-DhcW.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("./viml-0AN1aqkP.js")},{id:"vue",name:"Vue",import:()=>import("./vue-CUn-yz7f.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("./vue-html-a8uCr53v.js")},{id:"vue-vine",name:"Vue Vine",import:()=>import("./vue-vine-2Gx6KHOr.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("./vyper-sB2l1MOO.js")},{id:"wasm",name:"WebAssembly",import:()=>import("./wasm-CSAWeJiV.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("./wenyan-CLHHXU5e.js")},{id:"wgsl",name:"WGSL",import:()=>import("./wgsl-DiTcYanS.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("./wikitext-DT8E9qe0.js")},{id:"wit",name:"WebAssembly Interface Types",import:()=>import("./wit-CtjT-RdY.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("./wolfram-1xJNnwe2.js")},{id:"xml",name:"XML",import:()=>import("./xml-BsgRw6d1.js")},{id:"xsl",name:"XSL",import:()=>import("./xsl-CNIkWbJg.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("./yaml-c2-Vhxho.js")},{id:"zenscript",name:"ZenScript",import:()=>import("./zenscript-ChP1MlQf.js")},{id:"zig",name:"Zig",import:()=>import("./zig-rivS3YQG.js")}],R=Object.fromEntries(q.map(i=>[i.id,i.import])),V=Object.fromEntries(q.flatMap(i=>i.aliases?.map(t=>[t,i.import])||[])),z={...R,...V},W=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("./andromeeda-C4gqWexZ.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("./aurora-x-D-2ljcwZ.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("./ayu-dark-CMjwMIkn.js")},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>import("./ayu-light-C47S-Tmv.js")},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>import("./ayu-mirage-CjoLj4QM.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("./catppuccin-frappe-DFWUc33u.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("./catppuccin-latte-C9dUb6Cb.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("./catppuccin-macchiato-DQyhUUbL.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("./catppuccin-mocha-D87Tk5Gz.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("./dark-plus-C3mMm8J8.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("./dracula-BzJJZx-M.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("./dracula-soft-BXkSAIEj.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("./everforest-dark-BgDCqdQA.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("./everforest-light-C8M2exoo.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("./github-dark-DHJKELXO.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("./github-dark-default-Cuk6v7N8.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("./github-dark-dimmed-DH5Ifo-i.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("./github-dark-high-contrast-E3gJ1_iC.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("./github-light-DAi9KRSo.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("./github-light-default-D7oLnXFd.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("./github-light-high-contrast-BfjtVDDH.js")},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>import("./gruvbox-dark-hard-CFHQjOhq.js")},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>import("./gruvbox-dark-medium-GsRaNv29.js")},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>import("./gruvbox-dark-soft-CVdnzihN.js")},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>import("./gruvbox-light-hard-CH1njM8p.js")},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>import("./gruvbox-light-medium-DRw_LuNl.js")},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>import("./gruvbox-light-soft-hJgmCMqR.js")},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>import("./horizon-BUw7H-hv.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("./houston-DnULxvSX.js")},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>import("./kanagawa-dragon-CkXjmgJE.js")},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>import("./kanagawa-lotus-CfQXZHmo.js")},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>import("./kanagawa-wave-DWedfzmr.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("./laserwave-DUszq2jm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("./light-plus-B7mTdjB0.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("./material-theme-D5KoaKCx.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("./material-theme-darker-BfHTSMKl.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("./material-theme-lighter-B0m2ddpp.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("./material-theme-ocean-CyktbL80.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("./material-theme-palenight-Csfq5Kiy.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("./min-dark-CafNBF8u.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("./min-light-CTRr51gU.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("./monokai-D4h5O-jR.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("./night-owl-C39BiMTA.js")},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>import("./night-owl-light-CMTm3GFP.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("./nord-Ddv68eIx.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("./one-dark-pro-DVMEJ2y_.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("./one-light-C3Wv6jpd.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("./plastic-3e1v2bzS.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("./poimandres-CS3Unz2-.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("./red-bN70gL4F.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("./rose-pine-qdsjHGoJ.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("./rose-pine-dawn-DHQR4-dF.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("./rose-pine-moon-D4_iv3hh.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("./slack-dark-BthQWCQV.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("./slack-ochin-DqwNpetd.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("./snazzy-light-Bw305WKR.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("./solarized-dark-DXbdFlpD.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("./solarized-light-L9t79GZl.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("./synthwave-84-ChtBzv_y.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("./tokyo-night-hegEt444.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("./vesper-DU1UobuO.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("./vitesse-black-Bkuqu6BP.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("./vitesse-dark-D0r3Knsf.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("./vitesse-light-CVO1_9PV.js")}],I=Object.fromEntries(W.map(i=>[i.id,i.import]));class J extends Error{constructor(i){super(i),this.name="ShikiError"}}function F(){return"undefined"!=typeof performance?performance.now():Date.now()}const Q=(i,t)=>i+(t-i%t)%t;async function X(i){let t,e;const r={};function a(i){e=i,r.HEAPU8=new Uint8Array(i),r.HEAPU32=new Uint32Array(i)}function m(i){try{return t.grow(i-e.byteLength+65535>>>16),a(t.buffer),1}catch{}}const o="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(i,t){return i?function(i,t,e=1024){const r=t+e;let a=t;for(;i[a]&&!(a>=r);)++a;if(a-t>16&&i.buffer&&o)return o.decode(i.subarray(t,a));let m="";for(;t<a;){let e=i[t++];if(!(128&e)){m+=String.fromCharCode(e);continue}const r=63&i[t++];if(192==(224&e)){m+=String.fromCharCode((31&e)<<6|r);continue}const a=63&i[t++];if(e=224==(240&e)?(15&e)<<12|r<<6|a:(7&e)<<18|r<<12|a<<6|63&i[t++],e<65536)m+=String.fromCharCode(e);else{const i=e-65536;m+=String.fromCharCode(55296|i>>10,56320|1023&i)}}return m}(r.HEAPU8,i,t):""}const p={emscripten_get_now:F,emscripten_memcpy_big:function(i,t,e){r.HEAPU8.copyWithin(i,t,t+e)},emscripten_resize_heap:function(i){const t=r.HEAPU8.length,e=2147483648;if((i>>>=0)>e)return!1;for(let r=1;r<=4;r*=2){let a=t*(1+.2/r);a=Math.min(a,i+100663296);if(m(Math.min(e,Q(Math.max(i,a),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const e={env:p,wasi_snapshot_preview1:p},m=await i(e);t=m.memory,a(t.buffer),Object.assign(r,m),r.UTF8ToString=s}(),r}var K=Object.defineProperty,Z=(i,t,e)=>((i,t,e)=>t in i?K(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e)(i,"symbol"!=typeof t?t+"":t,e);let Y=null;class ${constructor(i){Z(this,"utf16Length"),Z(this,"utf8Length"),Z(this,"utf16Value"),Z(this,"utf8Value"),Z(this,"utf16OffsetToUtf8"),Z(this,"utf8OffsetToUtf16");const t=i.length,e=$._utf8ByteLength(i),r=e!==t,a=r?new Uint32Array(t+1):null;r&&(a[t]=e);const m=r?new Uint32Array(e+1):null;r&&(m[e]=t);const o=new Uint8Array(e);let s=0;for(let p=0;p<t;p++){const e=i.charCodeAt(p);let n=e,d=!1;if(e>=55296&&e<=56319&&p+1<t){const t=i.charCodeAt(p+1);t>=56320&&t<=57343&&(n=65536+(e-55296<<10)|t-56320,d=!0)}r&&(a[p]=s,d&&(a[p+1]=s),n<=127?m[s+0]=p:n<=2047?(m[s+0]=p,m[s+1]=p):n<=65535?(m[s+0]=p,m[s+1]=p,m[s+2]=p):(m[s+0]=p,m[s+1]=p,m[s+2]=p,m[s+3]=p)),n<=127?o[s++]=n:n<=2047?(o[s++]=192|(1984&n)>>>6,o[s++]=128|(63&n)>>>0):n<=65535?(o[s++]=224|(61440&n)>>>12,o[s++]=128|(4032&n)>>>6,o[s++]=128|(63&n)>>>0):(o[s++]=240|(1835008&n)>>>18,o[s++]=128|(258048&n)>>>12,o[s++]=128|(4032&n)>>>6,o[s++]=128|(63&n)>>>0),d&&p++}this.utf16Length=t,this.utf8Length=e,this.utf16Value=i,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=m}static _utf8ByteLength(i){let t=0;for(let e=0,r=i.length;e<r;e++){const a=i.charCodeAt(e);let m=a,o=!1;if(a>=55296&&a<=56319&&e+1<r){const t=i.charCodeAt(e+1);t>=56320&&t<=57343&&(m=65536+(a-55296<<10)|t-56320,o=!0)}t+=m<=127?1:m<=2047?2:m<=65535?3:4,o&&e++}return t}createString(i){const t=i.omalloc(this.utf8Length);return i.HEAPU8.set(this.utf8Value,t),t}}const ii=class i{constructor(t){if(Z(this,"id",++i.LAST_ID),Z(this,"_onigBinding"),Z(this,"content"),Z(this,"utf16Length"),Z(this,"utf8Length"),Z(this,"utf16OffsetToUtf8"),Z(this,"utf8OffsetToUtf16"),Z(this,"ptr"),!Y)throw new J("Must invoke loadWasm first.");this._onigBinding=Y,this.content=t;const e=new $(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!i._sharedPtrInUse?(i._sharedPtr||(i._sharedPtr=Y.omalloc(1e4)),i._sharedPtrInUse=!0,Y.HEAPU8.set(e.utf8Value,i._sharedPtr),this.ptr=i._sharedPtr):this.ptr=e.createString(Y)}convertUtf8OffsetToUtf16(i){return this.utf8OffsetToUtf16?i<0?0:i>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[i]:i}convertUtf16OffsetToUtf8(i){return this.utf16OffsetToUtf8?i<0?0:i>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[i]:i}dispose(){this.ptr===i._sharedPtr?i._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Z(ii,"LAST_ID",0),Z(ii,"_sharedPtr",0),Z(ii,"_sharedPtrInUse",!1);let ti,ei=ii;class ri{constructor(i){if(Z(this,"_onigBinding"),Z(this,"_ptr"),!Y)throw new J("Must invoke loadWasm first.");const t=[],e=[];for(let o=0,s=i.length;o<s;o++){const r=new $(i[o]);t[o]=r.createString(Y),e[o]=r.utf8Length}const r=Y.omalloc(4*i.length);Y.HEAPU32.set(t,r/4);const a=Y.omalloc(4*i.length);Y.HEAPU32.set(e,a/4);const m=Y.createOnigScanner(r,a,i.length);for(let o=0,s=i.length;o<s;o++)Y.ofree(t[o]);Y.ofree(a),Y.ofree(r),0===m&&function(i){throw new J(i.UTF8ToString(i.getLastOnigError()))}(Y),this._onigBinding=Y,this._ptr=m}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(i,t,e){let r=0;if("number"==typeof e&&(r=e),"string"==typeof i){i=new ei(i);const e=this._findNextMatchSync(i,t,!1,r);return i.dispose(),e}return this._findNextMatchSync(i,t,!1,r)}_findNextMatchSync(i,t,e,r){const a=this._onigBinding,m=a.findNextOnigScannerMatch(this._ptr,i.id,i.ptr,i.utf8Length,i.convertUtf16OffsetToUtf8(t),r);if(0===m)return null;const o=a.HEAPU32;let s=m/4;const p=o[s++],n=o[s++],d=[];for(let l=0;l<n;l++){const t=i.convertUtf8OffsetToUtf16(o[s++]),e=i.convertUtf8OffsetToUtf16(o[s++]);d[l]={start:t,end:e,length:e-t}}return{index:p,captureIndices:d}}}function ai(i){if(ti)return ti;return ti=async function(){Y=await X(async t=>{let e=i;var r;return e=await e,"function"==typeof e&&(e=await e(t)),"function"==typeof e&&(e=await e(t)),"function"==typeof e.instantiator?e=await e.instantiator(t):!function(i){return"function"==typeof i.default}(e)?(function(i){return void 0!==i.data}(e)&&(e=e.data),!function(i){return"undefined"!=typeof Response&&i instanceof Response}(e)?!function(i){return"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array}(e)?e instanceof WebAssembly.Module?e=await mi(e)(t):"default"in e&&e.default instanceof WebAssembly.Module&&(e=await mi(e.default)(t)):e=await mi(e)(t):e="function"==typeof WebAssembly.instantiateStreaming?await(r=e,i=>WebAssembly.instantiateStreaming(r,i))(t):await function(i){return async t=>{const e=await i.arrayBuffer();return WebAssembly.instantiate(e,t)}}(e)(t)):e=await e.default(t),"instance"in e&&(e=e.instance),"exports"in e&&(e=e.exports),e})}(),ti}function mi(i){return t=>WebAssembly.instantiate(i,t)}async function oi(i){return i&&await ai(i),{createScanner:i=>new ri(i.map(i=>"string"==typeof i?i:i.source)),createString:i=>new ei(i)}}const si=/* @__PURE__ */t({langs:z,themes:I,engine:()=>oi(import("./wasm--yL7jHw-.js"))}),{codeToHtml:pi,codeToHast:ni,codeToTokens:di,codeToTokensBase:li,codeToTokensWithThemes:ci,getSingletonHighlighter:hi,getLastGrammarState:ji}=/* @__PURE__ */i(si,{guessEmbeddedLanguages:e});export{r as ShikiError,a as addClassToHast,m as applyColorReplacements,z as bundledLanguages,V as bundledLanguagesAlias,R as bundledLanguagesBase,q as bundledLanguagesInfo,I as bundledThemes,W as bundledThemesInfo,ni as codeToHast,pi as codeToHtml,di as codeToTokens,li as codeToTokensBase,ci as codeToTokensWithThemes,t as createBundledHighlighter,o as createCssVariablesTheme,si as createHighlighter,s as createHighlighterCore,p as createHighlighterCoreSync,E as createJavaScriptRegexEngine,oi as createOnigurumaEngine,n as createPositionConverter,d as createShikiInternal,l as createShikiInternalSync,i as createSingletonShorthands,c as createdBundledHighlighter,G as defaultJavaScriptRegexConstructor,j as enableDeprecationWarnings,u as flatTokenVariants,ji as getLastGrammarState,hi as getSingletonHighlighter,f as getSingletonHighlighterCore,g as getTokenStyleObject,e as guessEmbeddedLanguages,y as hastToHtml,k as isNoneTheme,b as isPlainLang,v as isSpecialLang,S as isSpecialTheme,ai as loadWasm,w as makeSingletonHighlighter,L as makeSingletonHighlighterCore,x as normalizeGetter,N as normalizeTheme,T as resolveColorReplacements,A as splitLines,C as splitToken,M as splitTokens,P as stringifyTokenStyle,O as toArray,U as tokenizeAnsiWithTheme,D as tokenizeWithTheme,H as tokensToHast,_ as transformerDecorations,B as warnDeprecated};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./main-DnxMhNqU.js";let t=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}function s(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function r(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?r(e.substring(0,e.length-1)):e.substr(1+~t)}var o=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=class{static hasCaptures(e){return null!==e&&(o.lastIndex=0,o.test(e))}static replaceCaptures(e,t,n){return e.replace(o,(e,s,r,o)=>{let i=n[parseInt(s||r,10)];if(!i)return e;{let e=t.substring(i.start,i.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function a(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=a(e[s],t[s]);if(0!==n)return n}return 0}return n-s}function l(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 u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var d=class{constructor(e){this.fn=e}cache=/* @__PURE__ */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}},p=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let e,o=t[r];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),e=t.split(",")}else e=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}}let a=null;"string"==typeof o.settings.foreground&&l(o.settings.foreground)&&(a=o.settings.foreground);let c=null;"string"==typeof o.settings.background&&l(o.settings.background)&&(c=o.settings.background);for(let t=0,l=e.length;t<l;t++){let o=e[t].trim().split(" "),l=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1),u.reverse()),n[s++]=new _(l,u,r,i,a,c)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=a(e.scope,t.scope);return 0!==n?n:(n=c(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(s=t.foreground),null!==t.background&&(r=t.background)}let o=new b(t),i=new m(n,o.getId(s),o.getId(r)),l=new w(new S(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let t=e[a];l.insert(0,t.scope,t.parentScopes,t.fontStyle,o.getId(t.foreground),o.getId(t.background))}return new p(o,i,l)}(e,t)}_cachedMatchRoot=new d(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(">"===s){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!f(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new m(n.fontStyle,n.foreground,n.background):null}},g=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const s of n)t=new e(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new e(n,t[s]);return n}push(t){return new e(this,t)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function f(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var m=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var _=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},y=/* @__PURE__ */(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))(y||{});var b=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=/* @__PURE__ */Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)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)}},k=Object.freeze([]),S=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t||k,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}},w=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,s=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[s]&&s++,!(n>=e.parentScopes.length||s>=t.parentScopes.length);){const r=t.parentScopes[s].length-e.parentScopes[n].length;if(0!==r)return r;n++,s++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,s=t.indexOf(".");if(-1===s?(e=t,n=""):(e=t.substring(0,s),n=t.substring(s+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(""===n)return void this._doInsertHere(t,s,r,o,i);let a,c,l,u=n.indexOf(".");-1===u?(a=n,c=""):(a=n.substring(0,u),c=n.substring(u+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new e(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(t+1,c,s,r,o,i)}_doInsertHere(e,t,n,s,r){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===c(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,r)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new S(e,t,n,s,r))}else this._mainRule.acceptOverwrite(e,n,s,r)}},C=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),s=e.getTokenType(t),r=e.getFontStyle(t),o=e.getForeground(t),i=e.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,s,r,o,i,a){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),p=e.getForeground(t),g=e.getBackground(t);return 0!==n&&(c=n),8!==s&&(l=s),null!==r&&(u=r?1:0),-1!==o&&(d=o),0!==i&&(p=i),0!==a&&(g=a),(c|l<<8|u<<10|d<<11|p<<15|g<<24)>>>0}};function T(e){return e}function A(e,t){const n=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let r=s.next();for(;null!==r;){let e=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let t=i();if(n.push({matcher:t,priority:e}),","!==r)break;r=s.next()}return n;function o(){if("-"===r){r=s.next();const e=o();return t=>!!e&&!e(t)}if("("===r){r=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===r||","===r);){do{r=s.next()}while("|"===r||","===r);t=i()}return t=>e.some(e=>e(t))}();return")"===r&&(r=s.next()),e}if(v(r)){const e=[];do{e.push(r),r=s.next()}while(v(r));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every(e=>e(t))}}function v(e){return!!e&&!!e.match(/[\w\.:]+/)}function N(e){"function"==typeof e.dispose&&e.dispose()}var P=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},I=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=class{_references=[];_seenReferenceKeys=/* @__PURE__ */new Set;get references(){return this._references}visitedRule=/* @__PURE__ */new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},L=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}seenFullScopeRequests=/* @__PURE__ */new Set;seenPartialScopeRequests=/* @__PURE__ */new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new R;for(const n of e)x(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function x(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof P?E({baseGrammar:o,selfGrammar:r},s):G(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const a of i)s.add(new P(a))}function G(e,t,n){if(t.repository&&t.repository[e]){$([t.repository[e]],t,n)}}function E(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?s({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=W(o);switch(i.kind){case 0:E({...t,selfGrammar:t.baseGrammar},n);break;case 1:E(t,n);break;case 2:G(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===i.kind?G(i.ruleName,r,n):E(r,n)}else 4===i.kind?n.add(new I(i.scopeName,i.ruleName)):n.add(new P(i.scopeName))}}}var B=class{kind=0},M=class{kind=1},j=class{constructor(e){this.ruleName=e}kind=2},O=class{constructor(e){this.scopeName=e}kind=3},F=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function W(e){if("$base"===e)return new B;if("$self"===e)return new M;const t=e.indexOf("#");if(-1===t)return new O(e);if(0===t)return new j(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new F(n,s)}}var D=/\\(\d+)/,q=/\\(\d+)/g;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=i.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=i.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?i.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?i.replaceCaptures(this._contentName,e,t):this._contentName}},H=class extends U{retokenizeCapturedWithRuleId;constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}},z=class extends U{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,null),this._match=new V(s,this.id),this.captures=r,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,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},K=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Y=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r,o,i,a,c,l){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this._end=new V(i||"￿",-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,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},J=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,s,r,o,i,a,c){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new V(i,-2),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,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;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,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new X,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Q=class e{static createCaptureRule(e,t,n,s,r){return e.registerRule(e=>new H(t,e,n,s,r))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new z(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=s({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new K(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new J(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Y(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)r[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const o=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,s)),r[o]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const i=t[o];let a=-1;if(i.include){const t=W(i.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(s[i.include],n,s);break;case 2:let r=s[t.ruleName];r&&(a=e.getCompiledRuleId(r,n,s));break;case 3:case 4:const o=t.scopeName,c=4===t.kind?t.ruleName:null,l=n.getExternalGrammar(o,s);if(l)if(c){let t=l.repository[c];t&&(a=e.getCompiledRuleId(t,n,l.repository))}else a=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else a=e.getCompiledRuleId(i,n,s);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof K||e instanceof Y||e instanceof J)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},V=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,s=[],r=!1;for(let o=0;o<t;o++){if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(s.push(e.substring(n,o)),s.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=D.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return q.lastIndex=0,this.source.replace(q,(e,t)=>u(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,s,r=[],o=[],i=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,o[e]=n,i[e]=n,a[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",o[e+1]="￿",i[e+1]="A",a[e+1]="A"):"G"===s?(r[e+1]="￿",o[e+1]="G",i[e+1]="￿",a[e+1]="G"):(r[e+1]=s,o[e+1]=s,i[e+1]=s,a[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:i.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},X=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(e=>e.source);this._cached=new Z(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(e=>e.resolveAnchors(t,n));return new Z(e,s,this._items.map(e=>e.ruleId))}},Z=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ee=class{constructor(e,t){this.languageId=e,this.tokenType=t}},te=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ee(e,8),this._embeddedLanguagesMatcher=new ne(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ee(0,0);_getBasicScopeAttributes=new d(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new ee(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ne=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>u(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var se=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function re(e,t,n,s,r,o,i,a){const c=t.content.length;let l=!1,u=-1;if(i){const i=function(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const t=c.getRule(e);t instanceof J&&a.push({rule:t,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:a,findOptions:l}=ie(c.rule,e,c.stack.endRule,n,s===i),u=a.findNextMatchSync(t,s,l);if(!u){r=c.stack.pop();break}if(-2!==u.ruleId){r=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(o.produce(c.stack,u.captureIndices[0].start),ae(e,t,n,c.stack,o,c.rule.whileCaptures,u.captureIndices),o.produce(c.stack,u.captureIndices[0].end),i=u.captureIndices[0].end,u.captureIndices[0].end>s&&(s=u.captureIndices[0].end,n=!1))}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}(e,t,n,s,r,o);r=i.stack,s=i.linePos,n=i.isFirstLine,u=i.anchorPosition}const d=Date.now();for(;!l;){if(0!==a){if(Date.now()-d>a)return new se(r,!0)}p()}return new se(r,!1);function p(){const i=function(e,t,n,s,r,o){const i=function(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:a,findOptions:c}=oe(i,e,r.endRule,n,s===o),l=a.findNextMatchSync(t,s,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}(e,t,n,s,r,o),a=e.getInjections();if(0===a.length)return i;const c=function(e,t,n,s,r,o,i){let a,c=Number.MAX_VALUE,l=null,u=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const o=e[p];if(!o.matcher(d))continue;const g=t.getRule(o.ruleId),{ruleScanner:f,findOptions:m}=oe(g,t,null,s,r===i),_=f.findNextMatchSync(n,r,m);if(!_)continue;const y=_.captureIndices[0].start;if(!(y>=c)&&(c=y,l=_.captureIndices,a=_.ruleId,u=o.priority,c===r))break}if(l)return{priorityMatch:-1===u,captureIndices:l,matchedRuleId:a};return null}(a,e,t,n,s,r,o);if(!c)return i;if(!i)return c;const l=i.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return i}(e,t,n,s,r,u);if(!i)return o.produce(r,c),void(l=!0);const a=i.captureIndices,d=i.matchedRuleId,p=!!(a&&a.length>0)&&a[0].end>s;if(-1===d){const i=r.getRule(e);o.produce(r,a[0].start),r=r.withContentNameScopesList(r.nameScopesList),ae(e,t,n,r,o,i.endCaptures,a),o.produce(r,a[0].end);const d=r;if(r=r.parent,u=d.getAnchorPos(),!p&&d.getEnterPos()===s)return r=d,o.produce(r,c),void(l=!0)}else{const i=e.getRule(d);o.produce(r,a[0].start);const g=r,f=i.getName(t.content,a),m=r.contentNameScopesList.pushAttributed(f,e);if(r=r.push(d,s,u,a[0].end===c,null,m,m),i instanceof Y){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.endHasBackReferences&&(r=r.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else if(i instanceof J){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.whileHasBackReferences&&(r=r.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else{if(ae(e,t,n,r,o,i.captures,a),o.produce(r,a[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,c),void(l=!0)}}a[0].end>s&&(s=a[0].end,n=!1)}}function oe(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function ie(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ae(e,t,n,s,r,o,i){if(0===o.length)return;const a=t.content,c=Math.min(o.length,i.length),l=[],u=i[0].end;for(let d=0;d<c;d++){const t=o[d];if(null===t)continue;const c=i[d];if(0===c.length)continue;if(c.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=c.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,c.start):r.produce(s,c.start),t.retokenizeCapturedWithRuleId){const o=t.getName(a,i),l=s.contentNameScopesList.pushAttributed(o,e),u=t.getContentName(a,i),d=l.pushAttributed(u,e),p=s.push(t.retokenizeCapturedWithRuleId,c.start,-1,!1,null,l,d),g=e.createOnigString(a.substring(0,c.end));re(e,g,n&&0===c.start,c.start,p,r,!1,0),N(g);continue}const p=t.getName(a,i);if(null!==p){const t=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(p,e);l.push(new ce(t,c.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ce=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function le(e,t,n,s,r){const o=A(t,he),i=Q.getCompiledRuleId(n,s,r.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:i,grammar:r,priority:a.priority})}function he(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let s=n;s<t.length;s++)if(ue(t[s],e))return n=s+1,!0;return!1})}function ue(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var de=class{constructor(e,t,n,s,r,o,i,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new te(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=pe(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const e=A(c,he);for(const t of e)this._tokenTypeMatchers.push({matcher:t.matcher,type:r[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=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,s=e(n);if(s){const e=s.injections;if(e)for(let n in e)le(t,n,e[n],this,s);const r=this._grammarRepository.injections(n);r&&r.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&le(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=pe(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let r;if(-1===this._rootId&&(this._rootId=Q.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==fe.NULL)r=!1,t.reset();else{r=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=C.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?ge.createRootAndLookUpScopeName(o,s,this):ge.createRoot("unknown",s),t=new fe(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const o=this.createOnigString(e),i=o.content.length,a=new _e(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=re(this,o,r,0,t,a,!0,s);return N(o),{lineLength:i,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function pe(e,t){return(e=n(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 ge=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let s=t,r=t?.scopePath??null;for(const o of n)r=g.push(r,o.scopeNames),s=new e(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new e(null,new g(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new g(null,t),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(n,r,i);return new e(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,r=0,o=0;return null!==n&&(s=n.fontStyle,r=n.foregroundId,o=n.backgroundId),C.set(e,t.languageId,t.tokenType,null,s,r,o)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=e._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,r,i);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},fe=class e{constructor(e,t,n,s,r,o,i,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=i,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ge.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,a){return new e(this,t,n,s,r,o,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const s=ge.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,ge.fromExtension(s,n.contentNameScopesList))}},me=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):A(e,he).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>A(e,he).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!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}},_e=class{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=C.set(n,0,T(e.type),null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(t))}return s&&(n=C.set(n,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(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()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},ye=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=/* @__PURE__ */new Map;_rawGrammars=/* @__PURE__ */new Map;_injectionGrammars=/* @__PURE__ */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,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,function(e,t,n,s,r,o,i,a){return new de(e,t,n,s,r,o,i,a)}(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},be=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ye(p.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=/* @__PURE__ */new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(p.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new me(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,s,r){const o=new L(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,s,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},ke=fe.NULL;function Se(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},s="string"==typeof e?e:e.name;for(const[r,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[r]=o:r===s&&Object.assign(n,o);return n}function we(e,t){return e&&t?.[e?.toLowerCase()]||e}function Ce(e){return Array.isArray(e)?e:[e]}async function Te(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Ae(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ve(e){return"ansi"===e||Ae(e)}function Ne(e){return"none"===e}function Pe(e){return Ne(e)}function Ie(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function Re(e,t=!1){if(0===e.length)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let o=0;o<n.length;o+=2){const e=t?n[o]+(n[o+1]||""):n[o];r.push([e,s]),s+=n[o].length,s+=n[o+1]?.length||0}return r}function Le(e){const t=Re(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=n,r=0;for(const e of t){if(s<e.length)break;s-=e.length,r++}return{line:r,character:s}},posToIndex:function(e,n){let s=0;for(let r=0;r<e;r++)s+=t[r].length;return s+=n,s}}}function xe(e,t,n){const s=/* @__PURE__ */new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const e=o[1].toLowerCase().trim(),t=e.includes("/")?e.split("/").pop():e;t&&s.add(t)}if(!n)return Array.from(s);const r=n.getBundledLanguages();return Array.from(s).filter(e=>e&&r[e])}const Ge="light-dark()",Ee=["color","background-color"];function $e(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function Be(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?$e(e,t):e})):e}function Me(e,n,s,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=n.map(t=>je(e.variants[t])),c=new Set(a.flatMap(e=>Object.keys(e))),l={},u=(e,t)=>{const r="color"===t?"":"background-color"===t?"-bg":`-${t}`;return s+n[e]+("color"===t?"":r)};return a.forEach((e,s)=>{for(const i of c){const c=e[i]||"inherit";if(0===s&&r&&Ee.includes(i))if(r===Ge&&a.length>1){const e=n.findIndex(e=>"light"===e),r=n.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=a[e][i]||"inherit",p=a[r][i]||"inherit";l[i]=`light-dark(${d}, ${p})`,"css-vars"===o&&(l[u(s,i)]=c)}else l[i]=c;else"css-vars"===o&&(l[u(s,i)]=c)}}),i.htmlStyle=l,i}function je(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&y.Italic&&(t["font-style"]="italic"),e.fontStyle&y.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&y.Underline&&n.push("underline"),e.fontStyle&y.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Oe(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const Fe=/* @__PURE__ */new WeakMap;function We(e,t){Fe.set(e,t)}function De(e){return Fe.get(e)}class qe{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new qe(Object.fromEntries(Ce(t).map(e=>[e,ke])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,s]=e;this.lang=n,this._stacks={[s]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=/* @__PURE__ */new Set;function s(e){if(n.has(e))return;n.add(e);const r=e?.nameScopesList?.scopeName;r&&t.push(r),e.parent&&s(e.parent)}return s(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ue(){const e=/* @__PURE__ */new WeakMap;function n(n){if(!e.has(n.meta)){let s=function(e){if("number"==typeof e){if(e<0||e>n.source.length)throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);return{...r.indexToPos(e),offset:e}}{const n=r.lines[e.line];if(void 0===n)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let s=e.character;if(s<0&&(s=n.length+s),s<0||s>n.length)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);return{...e,character:s,offset:r.posToIndex(e.line,s)}}};const r=Le(n.source),o=(n.options.decorations||[]).map(e=>({...e,start:s(e.start),end:s(e.end)}));!function(e){for(let n=0;n<e.length;n++){const s=e[n];if(s.start.offset>s.end.offset)throw new t(`Invalid decoration range: ${JSON.stringify(s.start)} - ${JSON.stringify(s.end)}`);for(let r=n+1;r<e.length;r++){const n=e[r],o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,i=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset,a=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,c=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset;if(o||i||a||c){if(o&&i)continue;if(a&&c)continue;if(a&&s.start.offset===s.end.offset)continue;if(i&&n.start.offset===n.end.offset)continue;throw new t(`Decorations ${JSON.stringify(s.start)} and ${JSON.stringify(n.start)} intersect.`)}}}}(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;return Be(e,n(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;const s=n(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==s.converter.lines.length)throw new t(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(e,n,s,o){const i=r[e];let c="",l=-1,u=-1;if(0===n&&(l=0),0===s&&(u=0),s===Number.POSITIVE_INFINITY&&(u=i.children.length),-1===l||-1===u)for(let t=0;t<i.children.length;t++)c+=He(i.children[t]),-1===l&&c.length===n&&(l=t+1),-1===u&&c.length===s&&(u=t+1);if(-1===l)throw new t(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===u)throw new t(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,u);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};a(e,o,"wrapper"),i.children.splice(l,d.length,e)}else a(d[0],o,"token");else a(i,o,"line")}function i(e,t){r[e]=a(r[e],t,"line")}function a(e,t,n){const s=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...s,class:e.properties.class},t.properties?.class&&Ie(e,t.properties.class),e=r(e,n)||e}const c=[],l=s.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const t of l){const{start:e,end:n}=t;if(e.line===n.line)o(e.line,e.character,n.character,t);else if(e.line<n.line){o(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let s=e.line+1;s<n.line;s++)c.unshift(()=>i(s,t));o(n.line,0,n.character,t)}}c.forEach(e=>e())}}}function He(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(He).join(""):""}const ze=[
1
+ import{a as e}from"./main-DIc-1QZK.js";let t=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}function s(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function r(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?r(e.substring(0,e.length-1)):e.substr(1+~t)}var o=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=class{static hasCaptures(e){return null!==e&&(o.lastIndex=0,o.test(e))}static replaceCaptures(e,t,n){return e.replace(o,(e,s,r,o)=>{let i=n[parseInt(s||r,10)];if(!i)return e;{let e=t.substring(i.start,i.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function a(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=a(e[s],t[s]);if(0!==n)return n}return 0}return n-s}function l(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 u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var d=class{constructor(e){this.fn=e}cache=/* @__PURE__ */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}},p=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let e,o=t[r];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),e=t.split(",")}else e=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}}let a=null;"string"==typeof o.settings.foreground&&l(o.settings.foreground)&&(a=o.settings.foreground);let c=null;"string"==typeof o.settings.background&&l(o.settings.background)&&(c=o.settings.background);for(let t=0,l=e.length;t<l;t++){let o=e[t].trim().split(" "),l=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1),u.reverse()),n[s++]=new _(l,u,r,i,a,c)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=a(e.scope,t.scope);return 0!==n?n:(n=c(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(s=t.foreground),null!==t.background&&(r=t.background)}let o=new b(t),i=new m(n,o.getId(s),o.getId(r)),l=new w(new S(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let t=e[a];l.insert(0,t.scope,t.parentScopes,t.fontStyle,o.getId(t.foreground),o.getId(t.background))}return new p(o,i,l)}(e,t)}_cachedMatchRoot=new d(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(">"===s){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!f(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new m(n.fontStyle,n.foreground,n.background):null}},g=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const s of n)t=new e(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new e(n,t[s]);return n}push(t){return new e(this,t)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function f(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var m=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var _=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},y=/* @__PURE__ */(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))(y||{});var b=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=/* @__PURE__ */Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)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)}},k=Object.freeze([]),S=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t||k,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}},w=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,s=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[s]&&s++,!(n>=e.parentScopes.length||s>=t.parentScopes.length);){const r=t.parentScopes[s].length-e.parentScopes[n].length;if(0!==r)return r;n++,s++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,s=t.indexOf(".");if(-1===s?(e=t,n=""):(e=t.substring(0,s),n=t.substring(s+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(""===n)return void this._doInsertHere(t,s,r,o,i);let a,c,l,u=n.indexOf(".");-1===u?(a=n,c=""):(a=n.substring(0,u),c=n.substring(u+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new e(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(t+1,c,s,r,o,i)}_doInsertHere(e,t,n,s,r){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===c(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,r)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new S(e,t,n,s,r))}else this._mainRule.acceptOverwrite(e,n,s,r)}},C=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),s=e.getTokenType(t),r=e.getFontStyle(t),o=e.getForeground(t),i=e.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,s,r,o,i,a){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),p=e.getForeground(t),g=e.getBackground(t);return 0!==n&&(c=n),8!==s&&(l=s),null!==r&&(u=r?1:0),-1!==o&&(d=o),0!==i&&(p=i),0!==a&&(g=a),(c|l<<8|u<<10|d<<11|p<<15|g<<24)>>>0}};function T(e){return e}function A(e,t){const n=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let r=s.next();for(;null!==r;){let e=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let t=i();if(n.push({matcher:t,priority:e}),","!==r)break;r=s.next()}return n;function o(){if("-"===r){r=s.next();const e=o();return t=>!!e&&!e(t)}if("("===r){r=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===r||","===r);){do{r=s.next()}while("|"===r||","===r);t=i()}return t=>e.some(e=>e(t))}();return")"===r&&(r=s.next()),e}if(v(r)){const e=[];do{e.push(r),r=s.next()}while(v(r));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every(e=>e(t))}}function v(e){return!!e&&!!e.match(/[\w\.:]+/)}function N(e){"function"==typeof e.dispose&&e.dispose()}var P=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},I=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=class{_references=[];_seenReferenceKeys=/* @__PURE__ */new Set;get references(){return this._references}visitedRule=/* @__PURE__ */new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},L=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}seenFullScopeRequests=/* @__PURE__ */new Set;seenPartialScopeRequests=/* @__PURE__ */new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new R;for(const n of e)x(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function x(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof P?E({baseGrammar:o,selfGrammar:r},s):G(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const a of i)s.add(new P(a))}function G(e,t,n){if(t.repository&&t.repository[e]){$([t.repository[e]],t,n)}}function E(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?s({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=W(o);switch(i.kind){case 0:E({...t,selfGrammar:t.baseGrammar},n);break;case 1:E(t,n);break;case 2:G(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===i.kind?G(i.ruleName,r,n):E(r,n)}else 4===i.kind?n.add(new I(i.scopeName,i.ruleName)):n.add(new P(i.scopeName))}}}var B=class{kind=0},M=class{kind=1},j=class{constructor(e){this.ruleName=e}kind=2},O=class{constructor(e){this.scopeName=e}kind=3},F=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function W(e){if("$base"===e)return new B;if("$self"===e)return new M;const t=e.indexOf("#");if(-1===t)return new O(e);if(0===t)return new j(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new F(n,s)}}var D=/\\(\d+)/,q=/\\(\d+)/g;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=i.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=i.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?i.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?i.replaceCaptures(this._contentName,e,t):this._contentName}},H=class extends U{retokenizeCapturedWithRuleId;constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}},z=class extends U{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,null),this._match=new V(s,this.id),this.captures=r,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,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},K=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Y=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r,o,i,a,c,l){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this._end=new V(i||"￿",-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,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},J=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,s,r,o,i,a,c){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new V(i,-2),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,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;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,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new X,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Q=class e{static createCaptureRule(e,t,n,s,r){return e.registerRule(e=>new H(t,e,n,s,r))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new z(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=s({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new K(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new J(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Y(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)r[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const o=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,s)),r[o]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const i=t[o];let a=-1;if(i.include){const t=W(i.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(s[i.include],n,s);break;case 2:let r=s[t.ruleName];r&&(a=e.getCompiledRuleId(r,n,s));break;case 3:case 4:const o=t.scopeName,c=4===t.kind?t.ruleName:null,l=n.getExternalGrammar(o,s);if(l)if(c){let t=l.repository[c];t&&(a=e.getCompiledRuleId(t,n,l.repository))}else a=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else a=e.getCompiledRuleId(i,n,s);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof K||e instanceof Y||e instanceof J)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},V=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,s=[],r=!1;for(let o=0;o<t;o++){if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(s.push(e.substring(n,o)),s.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=D.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return q.lastIndex=0,this.source.replace(q,(e,t)=>u(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,s,r=[],o=[],i=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,o[e]=n,i[e]=n,a[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",o[e+1]="￿",i[e+1]="A",a[e+1]="A"):"G"===s?(r[e+1]="￿",o[e+1]="G",i[e+1]="￿",a[e+1]="G"):(r[e+1]=s,o[e+1]=s,i[e+1]=s,a[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:i.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},X=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(e=>e.source);this._cached=new Z(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(e=>e.resolveAnchors(t,n));return new Z(e,s,this._items.map(e=>e.ruleId))}},Z=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ee=class{constructor(e,t){this.languageId=e,this.tokenType=t}},te=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ee(e,8),this._embeddedLanguagesMatcher=new ne(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ee(0,0);_getBasicScopeAttributes=new d(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new ee(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ne=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>u(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var se=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function re(e,t,n,s,r,o,i,a){const c=t.content.length;let l=!1,u=-1;if(i){const i=function(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const t=c.getRule(e);t instanceof J&&a.push({rule:t,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:a,findOptions:l}=ie(c.rule,e,c.stack.endRule,n,s===i),u=a.findNextMatchSync(t,s,l);if(!u){r=c.stack.pop();break}if(-2!==u.ruleId){r=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(o.produce(c.stack,u.captureIndices[0].start),ae(e,t,n,c.stack,o,c.rule.whileCaptures,u.captureIndices),o.produce(c.stack,u.captureIndices[0].end),i=u.captureIndices[0].end,u.captureIndices[0].end>s&&(s=u.captureIndices[0].end,n=!1))}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}(e,t,n,s,r,o);r=i.stack,s=i.linePos,n=i.isFirstLine,u=i.anchorPosition}const d=Date.now();for(;!l;){if(0!==a){if(Date.now()-d>a)return new se(r,!0)}p()}return new se(r,!1);function p(){const i=function(e,t,n,s,r,o){const i=function(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:a,findOptions:c}=oe(i,e,r.endRule,n,s===o),l=a.findNextMatchSync(t,s,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}(e,t,n,s,r,o),a=e.getInjections();if(0===a.length)return i;const c=function(e,t,n,s,r,o,i){let a,c=Number.MAX_VALUE,l=null,u=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const o=e[p];if(!o.matcher(d))continue;const g=t.getRule(o.ruleId),{ruleScanner:f,findOptions:m}=oe(g,t,null,s,r===i),_=f.findNextMatchSync(n,r,m);if(!_)continue;const y=_.captureIndices[0].start;if(!(y>=c)&&(c=y,l=_.captureIndices,a=_.ruleId,u=o.priority,c===r))break}if(l)return{priorityMatch:-1===u,captureIndices:l,matchedRuleId:a};return null}(a,e,t,n,s,r,o);if(!c)return i;if(!i)return c;const l=i.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return i}(e,t,n,s,r,u);if(!i)return o.produce(r,c),void(l=!0);const a=i.captureIndices,d=i.matchedRuleId,p=!!(a&&a.length>0)&&a[0].end>s;if(-1===d){const i=r.getRule(e);o.produce(r,a[0].start),r=r.withContentNameScopesList(r.nameScopesList),ae(e,t,n,r,o,i.endCaptures,a),o.produce(r,a[0].end);const d=r;if(r=r.parent,u=d.getAnchorPos(),!p&&d.getEnterPos()===s)return r=d,o.produce(r,c),void(l=!0)}else{const i=e.getRule(d);o.produce(r,a[0].start);const g=r,f=i.getName(t.content,a),m=r.contentNameScopesList.pushAttributed(f,e);if(r=r.push(d,s,u,a[0].end===c,null,m,m),i instanceof Y){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.endHasBackReferences&&(r=r.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else if(i instanceof J){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.whileHasBackReferences&&(r=r.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else{if(ae(e,t,n,r,o,i.captures,a),o.produce(r,a[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,c),void(l=!0)}}a[0].end>s&&(s=a[0].end,n=!1)}}function oe(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function ie(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ae(e,t,n,s,r,o,i){if(0===o.length)return;const a=t.content,c=Math.min(o.length,i.length),l=[],u=i[0].end;for(let d=0;d<c;d++){const t=o[d];if(null===t)continue;const c=i[d];if(0===c.length)continue;if(c.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=c.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,c.start):r.produce(s,c.start),t.retokenizeCapturedWithRuleId){const o=t.getName(a,i),l=s.contentNameScopesList.pushAttributed(o,e),u=t.getContentName(a,i),d=l.pushAttributed(u,e),p=s.push(t.retokenizeCapturedWithRuleId,c.start,-1,!1,null,l,d),g=e.createOnigString(a.substring(0,c.end));re(e,g,n&&0===c.start,c.start,p,r,!1,0),N(g);continue}const p=t.getName(a,i);if(null!==p){const t=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(p,e);l.push(new ce(t,c.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ce=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function le(e,t,n,s,r){const o=A(t,he),i=Q.getCompiledRuleId(n,s,r.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:i,grammar:r,priority:a.priority})}function he(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let s=n;s<t.length;s++)if(ue(t[s],e))return n=s+1,!0;return!1})}function ue(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var de=class{constructor(e,t,n,s,r,o,i,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new te(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=pe(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const e=A(c,he);for(const t of e)this._tokenTypeMatchers.push({matcher:t.matcher,type:r[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=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,s=e(n);if(s){const e=s.injections;if(e)for(let n in e)le(t,n,e[n],this,s);const r=this._grammarRepository.injections(n);r&&r.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&le(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=pe(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let r;if(-1===this._rootId&&(this._rootId=Q.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==fe.NULL)r=!1,t.reset();else{r=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=C.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?ge.createRootAndLookUpScopeName(o,s,this):ge.createRoot("unknown",s),t=new fe(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const o=this.createOnigString(e),i=o.content.length,a=new _e(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=re(this,o,r,0,t,a,!0,s);return N(o),{lineLength:i,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function pe(e,t){return(e=n(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 ge=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let s=t,r=t?.scopePath??null;for(const o of n)r=g.push(r,o.scopeNames),s=new e(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new e(null,new g(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new g(null,t),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(n,r,i);return new e(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,r=0,o=0;return null!==n&&(s=n.fontStyle,r=n.foregroundId,o=n.backgroundId),C.set(e,t.languageId,t.tokenType,null,s,r,o)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=e._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,r,i);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},fe=class e{constructor(e,t,n,s,r,o,i,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=i,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ge.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,a){return new e(this,t,n,s,r,o,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const s=ge.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,ge.fromExtension(s,n.contentNameScopesList))}},me=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):A(e,he).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>A(e,he).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!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}},_e=class{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=C.set(n,0,T(e.type),null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(t))}return s&&(n=C.set(n,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(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()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},ye=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=/* @__PURE__ */new Map;_rawGrammars=/* @__PURE__ */new Map;_injectionGrammars=/* @__PURE__ */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,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,function(e,t,n,s,r,o,i,a){return new de(e,t,n,s,r,o,i,a)}(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},be=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ye(p.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=/* @__PURE__ */new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(p.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new me(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,s,r){const o=new L(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,s,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},ke=fe.NULL;function Se(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},s="string"==typeof e?e:e.name;for(const[r,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[r]=o:r===s&&Object.assign(n,o);return n}function we(e,t){return e&&t?.[e?.toLowerCase()]||e}function Ce(e){return Array.isArray(e)?e:[e]}async function Te(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Ae(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ve(e){return"ansi"===e||Ae(e)}function Ne(e){return"none"===e}function Pe(e){return Ne(e)}function Ie(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function Re(e,t=!1){if(0===e.length)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let o=0;o<n.length;o+=2){const e=t?n[o]+(n[o+1]||""):n[o];r.push([e,s]),s+=n[o].length,s+=n[o+1]?.length||0}return r}function Le(e){const t=Re(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=n,r=0;for(const e of t){if(s<e.length)break;s-=e.length,r++}return{line:r,character:s}},posToIndex:function(e,n){let s=0;for(let r=0;r<e;r++)s+=t[r].length;return s+=n,s}}}function xe(e,t,n){const s=/* @__PURE__ */new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const e=o[1].toLowerCase().trim(),t=e.includes("/")?e.split("/").pop():e;t&&s.add(t)}if(!n)return Array.from(s);const r=n.getBundledLanguages();return Array.from(s).filter(e=>e&&r[e])}const Ge="light-dark()",Ee=["color","background-color"];function $e(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function Be(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?$e(e,t):e})):e}function Me(e,n,s,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=n.map(t=>je(e.variants[t])),c=new Set(a.flatMap(e=>Object.keys(e))),l={},u=(e,t)=>{const r="color"===t?"":"background-color"===t?"-bg":`-${t}`;return s+n[e]+("color"===t?"":r)};return a.forEach((e,s)=>{for(const i of c){const c=e[i]||"inherit";if(0===s&&r&&Ee.includes(i))if(r===Ge&&a.length>1){const e=n.findIndex(e=>"light"===e),r=n.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=a[e][i]||"inherit",p=a[r][i]||"inherit";l[i]=`light-dark(${d}, ${p})`,"css-vars"===o&&(l[u(s,i)]=c)}else l[i]=c;else"css-vars"===o&&(l[u(s,i)]=c)}}),i.htmlStyle=l,i}function je(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&y.Italic&&(t["font-style"]="italic"),e.fontStyle&y.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&y.Underline&&n.push("underline"),e.fontStyle&y.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Oe(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const Fe=/* @__PURE__ */new WeakMap;function We(e,t){Fe.set(e,t)}function De(e){return Fe.get(e)}class qe{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new qe(Object.fromEntries(Ce(t).map(e=>[e,ke])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,s]=e;this.lang=n,this._stacks={[s]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=/* @__PURE__ */new Set;function s(e){if(n.has(e))return;n.add(e);const r=e?.nameScopesList?.scopeName;r&&t.push(r),e.parent&&s(e.parent)}return s(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ue(){const e=/* @__PURE__ */new WeakMap;function n(n){if(!e.has(n.meta)){let s=function(e){if("number"==typeof e){if(e<0||e>n.source.length)throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);return{...r.indexToPos(e),offset:e}}{const n=r.lines[e.line];if(void 0===n)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let s=e.character;if(s<0&&(s=n.length+s),s<0||s>n.length)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);return{...e,character:s,offset:r.posToIndex(e.line,s)}}};const r=Le(n.source),o=(n.options.decorations||[]).map(e=>({...e,start:s(e.start),end:s(e.end)}));!function(e){for(let n=0;n<e.length;n++){const s=e[n];if(s.start.offset>s.end.offset)throw new t(`Invalid decoration range: ${JSON.stringify(s.start)} - ${JSON.stringify(s.end)}`);for(let r=n+1;r<e.length;r++){const n=e[r],o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,i=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset,a=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,c=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset;if(o||i||a||c){if(o&&i)continue;if(a&&c)continue;if(a&&s.start.offset===s.end.offset)continue;if(i&&n.start.offset===n.end.offset)continue;throw new t(`Decorations ${JSON.stringify(s.start)} and ${JSON.stringify(n.start)} intersect.`)}}}}(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;return Be(e,n(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;const s=n(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==s.converter.lines.length)throw new t(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(e,n,s,o){const i=r[e];let c="",l=-1,u=-1;if(0===n&&(l=0),0===s&&(u=0),s===Number.POSITIVE_INFINITY&&(u=i.children.length),-1===l||-1===u)for(let t=0;t<i.children.length;t++)c+=He(i.children[t]),-1===l&&c.length===n&&(l=t+1),-1===u&&c.length===s&&(u=t+1);if(-1===l)throw new t(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===u)throw new t(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,u);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};a(e,o,"wrapper"),i.children.splice(l,d.length,e)}else a(d[0],o,"token");else a(i,o,"line")}function i(e,t){r[e]=a(r[e],t,"line")}function a(e,t,n){const s=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...s,class:e.properties.class},t.properties?.class&&Ie(e,t.properties.class),e=r(e,n)||e}const c=[],l=s.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const t of l){const{start:e,end:n}=t;if(e.line===n.line)o(e.line,e.character,n.character,t);else if(e.line<n.line){o(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let s=e.line+1;s<n.line;s++)c.unshift(()=>i(s,t));o(n.line,0,n.character,t)}}c.forEach(e=>e())}}}function He(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(He).join(""):""}const ze=[
2
2
  /* @__PURE__ */Ue()];function Ke(e){const t=function(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ze]}var Ye=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Je={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Qe(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Ve(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function Xe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9){Je[s]&&t.push({type:"setDecoration",value:Je[s]})}else if(s<=29){const e=Je[s-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Ye[s-30]}});else if(38===s){const n=Ve(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Ye[s-40]}});else if(48===s){const n=Ve(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):53===s?t.push({type:"setDecoration",value:"overline"}):55===s?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Ye[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Ye[s-100+8]}})}return t}var Ze={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 et(e=Ze){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(e){return function(){if(s)return s;s=[];for(let n=0;n<Ye.length;n++)s.push(t(Ye[n]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let o=0;o<6;o++)s.push(n([e[t],e[r],e[o]]));let r=8;for(let t=0;t<24;t++,r+=10)s.push(n([r,r,r]));return s}()[e]}return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r(e.index)}}}}const tt={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 nt(e,t,n){const s=Se(e,n),r=Re(t),o=et(Object.fromEntries(Ye.map(t=>{const n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`,s=e.colors?.[n];return[t,s||tt[t]]}))),i=function(){let e=null,t=null,n=/* @__PURE__ */new Set;return{parse(s){const r=[];let o=0;do{const i=Qe(s,o),a=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(a.length>0&&r.push({value:a,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const s=Xe(i.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}o=i.position}while(o<s.length);return r}}}();return r.map(t=>i.parse(t[0]).map(n=>{let r,i;n.decorations.has("reverse")?(r=n.background?o.value(n.background):e.bg,i=n.foreground?o.value(n.foreground):e.fg):(r=n.foreground?o.value(n.foreground):e.fg,i=n.background?o.value(n.background):void 0),r=we(r,s),i=we(i,s),n.decorations.has("dim")&&(r=function(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const e=t[1];if(8===e.length){const t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){const t=e[0],n=e[1],s=e[2],r=e[3];return`#${t}${t}${n}${n}${s}${s}${Math.round(Number.parseInt(`${r}${r}`,16)/2).toString(16).padStart(2,"0")}`}if(3===e.length){const t=e[0],n=e[1],s=e[2];return`#${t}${t}${n}${n}${s}${s}80`}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let a=y.None;return n.decorations.has("bold")&&(a|=y.Bold),n.decorations.has("italic")&&(a|=y.Italic),n.decorations.has("underline")&&(a|=y.Underline),n.decorations.has("strikethrough")&&(a|=y.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:i,fontStyle:a}}))}function st(e,n,s={}){const{theme:r=e.getLoadedThemes()[0]}=s,o=e.resolveLangAlias(s.lang||"text");if(Ae(o)||Ne(r))return Re(n).map(e=>[{content:e[0],offset:e[1]}]);const{theme:i,colorMap:a}=e.setTheme(r);if("ansi"===o)return nt(i,n,s);const c=e.getLanguage(s.lang||"text");if(s.grammarState){if(s.grammarState.lang!==c.name)throw new t(`Grammar state language "${s.grammarState.lang}" does not match highlight language "${c.name}"`);if(!s.grammarState.themes.includes(i.name))throw new t(`Grammar state themes "${s.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ot(n,c,i,a,s)}function rt(...e){if(2===e.length)return De(e[1]);const[n,s,r={}]=e,{lang:o="text",theme:i=n.getLoadedThemes()[0]}=r;if(Ae(o)||Ne(i))throw new t("Plain language does not have grammar state");if("ansi"===o)throw new t("ANSI language does not have grammar state");const{theme:a,colorMap:c}=n.setTheme(i),l=n.getLanguage(o);return new qe(it(s,l,a,c,r).stateStack,l.name,a.name)}function ot(e,t,n,s,r){const o=it(e,t,n,s,r),i=new qe(o.stateStack,t.name,n.name);return We(o.tokens,i),o.tokens}function it(e,n,s,r,o){const i=Se(s,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,l=Re(e);let u=o.grammarState?function(e,n){if(!(e instanceof qe))throw new t("Invalid grammar state");return e.getInternalStack(n)}(o.grammarState,s.name)??ke:null!=o.grammarContextCode?it(o.grammarContextCode,n,s,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:ke,d=[];const p=[];for(let t=0,g=l.length;t<g;t++){const[e,g]=l[t];if(""===e){d=[],p.push([]);continue}if(a>0&&e.length>=a){d=[],p.push([{content:e,offset:g,color:"",fontStyle:0}]);continue}let f,m,_;o.includeExplanation&&(f=n.tokenizeLine(e,u,c),m=f.tokens,_=0);const y=n.tokenizeLine2(e,u,c),b=y.tokens.length/2;for(let t=0;t<b;t++){const n=y.tokens[2*t],a=t+1<b?y.tokens[2*t+2]:e.length;if(n===a)continue;const c=y.tokens[2*t+1],l=we(r[C.getForeground(c)],i),u=C.getFontStyle(c),p={content:e.substring(n,a),offset:g+n,color:l,fontStyle:u};if(o.includeExplanation){const t=[];if("scopeName"!==o.includeExplanation)for(const e of s.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map(e=>e.trim());break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map(e=>e.split(/ /))})}p.explanation=[];let r=0;for(;n+r<a;){const n=m[_],s=e.substring(n.startIndex,n.endIndex);r+=s.length,p.explanation.push({content:s,scopes:"scopeName"===o.includeExplanation?at(n.scopes):ct(t,n.scopes)}),_+=1}}d.push(p)}p.push(d),d=[],u=y.ruleStack}return{tokens:p,stateStack:u}}function at(e){return e.map(e=>({scopeName:e}))}function ct(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];n[s]={scopeName:r,themeMatches:ut(e,r,t.slice(0,s))}}return n}function lt(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function ht(e,t,n){if(!lt(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)lt(e[s],n[r])&&(s-=1),r-=1;return-1===s}function ut(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const e of r)if(ht(e,t,n)){s.push(o);break}return s}function dt(e,t,n){const s=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),r=s.map(s=>{const r=st(e,t,{...n,theme:s.theme});return{tokens:r,state:De(r),theme:"string"==typeof s.theme?s.theme:s.theme.name}}),o=function(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(e=>e[s]),o=t.map(()=>[]);t.forEach((e,t)=>e.push(o[t]));const i=r.map(()=>0),a=r.map(e=>e[0]);for(;a.every(e=>e);){const e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){const n=a[t];n.content.length===e?(o[t].push(n),i[t]+=1,a[t]=r[t][i[t]]):(o[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...r.map(e=>e.tokens)),i=o[0].map((e,t)=>e.map((e,r)=>{const i={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(i.explanation=e.explanation),o.forEach((e,n)=>{const{content:o,explanation:a,offset:c,...l}=e[t][r];i.variants[s[n].color]=l}),i})),a=r[0].state?new qe(Object.fromEntries(r.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),r[0].state.lang):void 0;return a&&We(i,a),i}function pt(e,n,s){let r,o,i,a,c,l;if("themes"in s){const{defaultColor:u="light",cssVariablePrefix:d="--shiki-",colorsRendering:p="css-vars"}=s,g=Object.entries(s.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:t.color===u?1:0);if(0===g.length)throw new t("`themes` option must not be empty");const f=dt(e,n,s);if(l=De(f),u&&Ge!==u&&!g.find(e=>e.color===u))throw new t(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=g.map(t=>e.getTheme(t.theme)),_=g.map(e=>e.color);i=f.map(e=>e.map(e=>Me(e,_,d,u,p))),l&&We(i,l);const y=g.map(e=>Se(e.theme,s));o=gt(g,m,y,d,u,"fg",p),r=gt(g,m,y,d,u,"bg",p),a=`shiki-themes ${m.map(e=>e.name).join(" ")}`,c=u?void 0:[o,r].join(";")}else{if(!("theme"in s))throw new t("Invalid options, either `theme` or `themes` must be provided");{const t=Se(s.theme,s);i=st(e,n,s);const c=e.getTheme(s.theme);r=we(c.bg,t),o=we(c.fg,t),a=c.name,l=De(i)}}return{tokens:i,fg:o,bg:r,themeName:a,rootStyle:c,grammarState:l}}function gt(e,n,s,r,o,i,a){return e.map((c,l)=>{const u=we(n[l][i],s[l])||"inherit",d=`${r+c.color}${"bg"===i?"-bg":""}:${u}`;if(0===l&&o){if(o===Ge&&e.length>1){const r=e.findIndex(e=>"light"===e.color),o=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===o)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${we(n[r][i],s[r])||"inherit"}, ${we(n[o][i],s[o])||"inherit"});${d}`}return u}return"css-vars"===a?d:null}).filter(e=>!!e).join(";")}function ft(e,t,n,s={meta:{},options:n,codeToHast:(t,n)=>ft(e,t,n),codeToTokens:(t,n)=>pt(e,t,n)}){let r=t;for(const f of Ke(n))r=f.preprocess?.call(s,r,n)||r;let{tokens:o,fg:i,bg:a,themeName:c,rootStyle:l,grammarState:u}=pt(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;!0===d?o=function(e){return e.map(e=>{const t=[];let n,s="";return e.forEach((r,o)=>{const i=!(r.fontStyle&&(r.fontStyle&y.Underline||r.fontStyle&y.Strikethrough));i&&r.content.match(/^\s+$/)&&e[o+1]?(void 0===n&&(n=r.offset),s+=r.content):s?(i?t.push({...r,offset:n,content:s+r.content}):t.push({content:s,offset:n},r),n=void 0,s=""):t.push(r)}),t})}(o):"never"===d&&(o=function(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;const t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;const[,n,s,r]=t;if(!n&&!r)return e;const o=[{...e,offset:e.offset+n.length,content:s}];return n&&o.unshift({content:n,offset:e.offset}),r&&o.push({content:r,offset:e.offset+n.length+s.length}),o}))}(o)),p&&(o=function(e){return e.map(e=>{const t=[];for(const n of e){if(0===t.length){t.push({...n});continue}const e=t[t.length-1],s=Oe(e.htmlStyle||je(e)),r=Oe(n.htmlStyle||je(n)),o=e.fontStyle&&(e.fontStyle&y.Underline||e.fontStyle&y.Strikethrough),i=n.fontStyle&&(n.fontStyle&y.Underline||n.fontStyle&y.Strikethrough);o||i||s!==r?t.push({...n}):e.content+=n.content}return t})}(o));const g={...s,get source(){return r}};for(const f of Ke(n))o=f.tokens?.call(g,o)||o;return mt(o,{...n,fg:i,bg:a,themeName:c,rootStyle:!1!==n.rootStyle&&(n.rootStyle??l)},g,u)}function mt(e,t,n,s=De(e)){const r=Ke(t),o=[],i={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=t,l={class:`shiki ${t.themeName||""}`};!1!==t.rootStyle&&(null!=t.rootStyle?l.style=t.rootStyle:l.style=`background-color:${t.bg};color:${t.fg}`),!1!==c&&null!=c&&(l.tabindex=c.toString());for(const[m,_]of Object.entries(t.meta||{}))m.startsWith("_")||(l[m]=_);let u={type:"element",tagName:"pre",properties:l,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const p=[],g={...n,structure:a,addClassToHast:Ie,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return p}};if(e.forEach((e,t)=>{t&&("inline"===a?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&o.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},s=0;for(const o of e){let e={type:"element",tagName:"span",properties:{...o.htmlAttrs},children:[{type:"text",value:o.content}]};const c=Oe(o.htmlStyle||je(o));c&&(e.properties.style=c);for(const i of r)e=i?.span?.call(g,e,t+1,s,n,o)||e;"inline"===a?i.children.push(e):"classic"===a&&n.children.push(e),s+=o.content.length}if("classic"===a){for(const e of r)n=e?.line?.call(g,n,t+1)||n;p.push(n),o.push(n)}else"inline"===a&&p.push(n)}),"classic"===a){for(const e of r)d=e?.code?.call(g,d)||d;u.children.push(d);for(const e of r)u=e?.pre?.call(g,u)||u;i.children.push(u)}else if("inline"===a){const e=[];let t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const s of i.children)"element"===s.type&&"br"===s.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):"element"!==s.type&&"text"!==s.type||t.children.push(s);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(const s of r)n=s?.code?.call(g,n)||n;i.children=[];for(let s=0;s<n.children.length;s++){s>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const e=n.children[s];"element"===e.type&&i.children.push(...e.children)}}let f=i;for(const m of r)f=m?.root?.call(g,f)||f;return s&&We(f,s),f}const _t=e;function yt(e,t,n){const s={meta:{},options:n,codeToHast:(t,n)=>ft(e,t,n),codeToTokens:(t,n)=>pt(e,t,n)};let r=_t(ft(e,t,n,s));for(const o of Ke(n))r=o.postprocess?.call(s,r,n)||r;return r}const bt="#333333",kt="#bbbbbb",St="#fffffe",wt="#1e1e1e",Ct="__shiki_resolved";function Tt(e){if(e?.[Ct])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:n,fg:s}=t;if(!n||!s){const e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(s=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!s&&t?.colors?.["editor.foreground"]&&(s=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),s||(s="light"===t.type?bt:kt),n||(n="light"===t.type?St:wt),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=/* @__PURE__ */new Map;function i(e){if(o.has(e))return o.get(e);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?i(e):(o.set(e,n),n)}t.settings=t.settings.map(e=>{const n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),s=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!s)return e;const r={...e,settings:{...e.settings}};if(n){const n=i(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,r.settings.foreground=n}if(s){const n=i(e.settings.background);t.colorReplacements[n]=e.settings.background,r.settings.background=n}return r});for(const a of Object.keys(t.colors||{}))if(("editor.foreground"===a||"editor.background"===a||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const e=i(t.colors[a]);t.colorReplacements[e]=t.colors[a],t.colors[a]=e}return Object.defineProperty(t,Ct,{enumerable:!1,writable:!1,value:!0}),t}async function At(e){return Array.from(new Set((await Promise.all(e.filter(e=>!ve(e)).map(async e=>await Te(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function vt(e){return(await Promise.all(e.map(async e=>Pe(e)?null:Tt(await Te(e))))).filter(e=>!!e)}let Nt=3,Pt=!1;function It(e=!0,t=!1){Nt=e,Pt=t}function Rt(e,t=3){if(Nt&&!("number"==typeof Nt&&t>Nt)){if(Pt)throw new Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}class Lt extends Error{constructor(e){super(e),this.name="ShikiError"}}function xt(e,t){if(!t)return e;if(t[e]){const n=/* @__PURE__ */new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Lt(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class Gt extends be{constructor(e,t,n,s={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=s,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=/* @__PURE__ */new Map;_resolvedGrammars=/* @__PURE__ */new Map;_langMap=/* @__PURE__ */new Map;_langGraph=/* @__PURE__ */new Map;_textmateThemeCache=/* @__PURE__ */new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Tt(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=p.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=xt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(const r of t)this._resolvedGrammars.delete(r.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(r.scopeName),this._syncRegistry?._grammars?.delete(r.scopeName),this.loadLanguage(this._langMap.get(r.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){const e=t.filter(([e,t])=>{if(!t)return!1;const s=t.embeddedLanguages||t.embeddedLangs;return s?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new Lt(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(const[s,r]of t)this._resolver.addLanguage(r);for(const[s,r]of t)this.loadLanguage(r)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[.../* @__PURE__ */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 n of t)this._langGraph.set(n,this._langMap.get(n))}}class Et{_langs=/* @__PURE__ */new Map;_scopeToLang=/* @__PURE__ */new Map;_injections=/* @__PURE__ */new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let s=1;s<=t.length;s++){const e=t.slice(0,s).join(".");n=[...n,...this._injections.get(e)||[]]}return n}}let $t=0;function Bt(e){$t+=1,!1!==e.warnings&&$t>=10&&$t%10==0&&console.warn(`[Shiki] ${$t} 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 Lt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Tt),r=new Et(e.engine,n),o=new Gt(r,s,n,e.langAlias);let i;function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();const t=o.getTheme(e);if(!t)throw new Lt(`Theme \`${e}\` not found, you may need to load it first`);return t}function c(...e){u(),o.loadLanguages(e.flat(1))}function l(...e){u();for(const t of e.flat(1))o.loadTheme(t)}function u(){if(t)throw new Lt("Shiki instance has been disposed")}function d(){t||(t=!0,o.dispose(),$t-=1)}return{setTheme:function(e){u();const t=a(e);return i!==e&&(o.setTheme(t),i=e),{theme:t,colorMap:o.getColorMap()}},getTheme:a,getLanguage:function(e){u();const t=o.getGrammar("string"==typeof e?e:e.name);if(!t)throw new Lt(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),o.getLoadedThemes()},getLoadedLanguages:function(){return u(),o.getLoadedLanguages()},resolveLangAlias:function(t){return xt(t,e.langAlias)},loadLanguage:async function(...e){return c(await At(e))},loadLanguageSync:c,loadTheme:async function(...e){return u(),l(await vt(e))},loadThemeSync:l,dispose:d,[Symbol.dispose]:d}}async function Mt(e){e.engine||Rt("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([vt(e.themes||[]),At(e.langs||[]),e.engine]);return Bt({...e,themes:t,langs:n,engine:s})}async function jt(e){const t=await Mt(e);return{getLastGrammarState:(...e)=>rt(t,...e),codeToTokensBase:(e,n)=>st(t,e,n),codeToTokensWithThemes:(e,n)=>dt(t,e,n),codeToTokens:(e,n)=>pt(t,e,n),codeToHast:(e,n)=>ft(t,e,n),codeToHtml:(e,n)=>yt(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ot(e){const t=Bt(e);return{getLastGrammarState:(...e)=>rt(t,...e),codeToTokensBase:(e,n)=>st(t,e,n),codeToTokensWithThemes:(e,n)=>dt(t,e,n),codeToTokens:(e,n)=>pt(t,e,n),codeToHast:(e,n)=>ft(t,e,n),codeToHtml:(e,n)=>yt(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ft(e){let t;return async function(n){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}}const Wt=/* @__PURE__ */Ft(jt);function Dt(e){const n=e.langs,s=e.themes,r=e.engine;return async function(e){function o(s){if("string"==typeof s){if(ve(s=e.langAlias?.[s]||s))return[];const r=n[s];if(!r)throw new t(`Language \`${s}\` is not included in this bundle. You may want to load it from external source.`);return r}return s}function i(e){if(Pe(e))return"none";if("string"==typeof e){const n=s[e];if(!n)throw new t(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return n}return e}const a=(e.themes??[]).map(e=>i(e)),c=(e.langs??[]).map(e=>o(e)),l=await jt({engine:e.engine??r(),...e,themes:a,langs:c});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(o)),loadTheme:(...e)=>l.loadTheme(...e.map(i)),getBundledLanguages:()=>n,getBundledThemes:()=>s}}}function qt(e){let t;return async function(n={}){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});const s=await t;return await Promise.all([s.loadTheme(...n.themes||[]),s.loadLanguage(...n.langs||[])]),s}}}function Ut(e,t){const n=qt(e);async function s(e,s){const r=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),o=await(t?.guessEmbeddedLanguages?.(e,s.lang,r));return o&&await r.loadLanguage(...o),r}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await s(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await s(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await s(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await s(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await s(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}const Ht=Dt;function zt(e={}){const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:s=!0}=e,r=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,o={name:t,type:"dark",colors:{"editor.foreground":r("foreground"),"editor.background":r("background"),"terminal.ansiBlack":r("ansi-black"),"terminal.ansiRed":r("ansi-red"),"terminal.ansiGreen":r("ansi-green"),"terminal.ansiYellow":r("ansi-yellow"),"terminal.ansiBlue":r("ansi-blue"),"terminal.ansiMagenta":r("ansi-magenta"),"terminal.ansiCyan":r("ansi-cyan"),"terminal.ansiWhite":r("ansi-white"),"terminal.ansiBrightBlack":r("ansi-bright-black"),"terminal.ansiBrightRed":r("ansi-bright-red"),"terminal.ansiBrightGreen":r("ansi-bright-green"),"terminal.ansiBrightYellow":r("ansi-bright-yellow"),"terminal.ansiBrightBlue":r("ansi-bright-blue"),"terminal.ansiBrightMagenta":r("ansi-bright-magenta"),"terminal.ansiBrightCyan":r("ansi-bright-cyan"),"terminal.ansiBrightWhite":r("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:r("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:r("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:r("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:r("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:r("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:r("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:r("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:r("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:r("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:r("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:r("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:r("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:r("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:r("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:r("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:r("token-changed")}}]};return s||(o.tokenColors=o.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),o}export{t as ShikiError,Ie as addClassToHast,we as applyColorReplacements,ft as codeToHast,yt as codeToHtml,pt as codeToTokens,st as codeToTokensBase,dt as codeToTokensWithThemes,Dt as createBundledHighlighter,zt as createCssVariablesTheme,jt as createHighlighterCore,Ot as createHighlighterCoreSync,Le as createPositionConverter,Mt as createShikiInternal,Bt as createShikiInternalSync,Ut as createSingletonShorthands,Ht as createdBundledHighlighter,It as enableDeprecationWarnings,Me as flatTokenVariants,Wt as getSingletonHighlighterCore,je as getTokenStyleObject,xe as guessEmbeddedLanguages,_t as hastToHtml,Ne as isNoneTheme,Ae as isPlainLang,ve as isSpecialLang,Pe as isSpecialTheme,qt as makeSingletonHighlighter,Ft as makeSingletonHighlighterCore,Te as normalizeGetter,Tt as normalizeTheme,Se as resolveColorReplacements,Re as splitLines,$e as splitToken,Be as splitTokens,Oe as stringifyTokenStyle,Ce as toArray,nt as tokenizeAnsiWithTheme,ot as tokenizeWithTheme,mt as tokensToHast,Ue as transformerDecorations,Rt as warnDeprecated};