arize-phoenix 11.11.0__py3-none-any.whl → 11.13.0__py3-none-any.whl
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.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/METADATA +1 -1
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/RECORD +22 -21
- phoenix/server/api/mutations/user_mutations.py +2 -2
- phoenix/server/api/queries.py +10 -0
- phoenix/server/api/types/Dataset.py +9 -1
- phoenix/server/api/types/ServerStatus.py +6 -0
- phoenix/server/app.py +13 -0
- phoenix/server/static/.vite/manifest.json +44 -44
- phoenix/server/static/assets/{components-B7lK-RgC.js → components-CTjLYQx7.js} +390 -308
- phoenix/server/static/assets/{index-CpePoyTU.js → index-CtWu3zfM.js} +8 -7
- phoenix/server/static/assets/{pages-CnVg_GUi.js → pages-D0FD65Uw.js} +469 -440
- phoenix/server/static/assets/{vendor-uWG2jYEi.js → vendor-_6rG8OMg.js} +133 -133
- phoenix/server/static/assets/{vendor-arizeai-CXCKGfvH.js → vendor-arizeai-BznCmJFh.js} +6 -6
- phoenix/server/static/assets/{vendor-codemirror-DWr46-WB.js → vendor-codemirror-29fWLPAy.js} +1 -1
- phoenix/server/static/assets/{vendor-recharts-0Yf6lanX.js → vendor-recharts-Cu431IpB.js} +1 -1
- phoenix/server/static/assets/{vendor-shiki-Caei6iKO.js → vendor-shiki-Ce9e01lU.js} +1 -1
- phoenix/server/templates/index.html +2 -1
- phoenix/version.py +1 -1
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-11.11.0.dist-info → arize_phoenix-11.13.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Bn=Object.defineProperty;var En=(t,e,n)=>e in t?Bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var v=(t,e,n)=>En(t,typeof e!="symbol"?e+"":e,n);import{el as c,em as vn}from"./vendor-uWG2jYEi.js";const Qt=[{id:"abap",name:"ABAP",import:()=>c(()=>Promise.resolve().then(()=>Cr),void 0)},{id:"actionscript-3",name:"ActionScript",import:()=>c(()=>Promise.resolve().then(()=>vr),void 0)},{id:"ada",name:"Ada",import:()=>c(()=>Promise.resolve().then(()=>Ir),void 0)},{id:"angular-html",name:"Angular HTML",import:()=>c(()=>Promise.resolve().then(()=>Pr),void 0)},{id:"angular-ts",name:"Angular TypeScript",import:()=>c(()=>Promise.resolve().then(()=>Wr),void 0)},{id:"apache",name:"Apache Conf",import:()=>c(()=>Promise.resolve().then(()=>Xr),void 0)},{id:"apex",name:"Apex",import:()=>c(()=>Promise.resolve().then(()=>ni),void 0)},{id:"apl",name:"APL",import:()=>c(()=>Promise.resolve().then(()=>di),void 0)},{id:"applescript",name:"AppleScript",import:()=>c(()=>Promise.resolve().then(()=>ui),void 0)},{id:"ara",name:"Ara",import:()=>c(()=>Promise.resolve().then(()=>fi),void 0)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>c(()=>Promise.resolve().then(()=>wi),void 0)},{id:"asm",name:"Assembly",import:()=>c(()=>Promise.resolve().then(()=>Ci),void 0)},{id:"astro",name:"Astro",import:()=>c(()=>Promise.resolve().then(()=>Di),void 0)},{id:"awk",name:"AWK",import:()=>c(()=>Promise.resolve().then(()=>zi),void 0)},{id:"ballerina",name:"Ballerina",import:()=>c(()=>Promise.resolve().then(()=>Li),void 0)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>c(()=>Promise.resolve().then(()=>Mi),void 0)},{id:"beancount",name:"Beancount",import:()=>c(()=>Promise.resolve().then(()=>Zi),void 0)},{id:"berry",name:"Berry",aliases:["be"],import:()=>c(()=>Promise.resolve().then(()=>Oi),void 0)},{id:"bibtex",name:"BibTeX",import:()=>c(()=>Promise.resolve().then(()=>Ki),void 0)},{id:"bicep",name:"Bicep",import:()=>c(()=>Promise.resolve().then(()=>Ji),void 0)},{id:"blade",name:"Blade",import:()=>c(()=>Promise.resolve().then(()=>no),void 0)},{id:"c",name:"C",import:()=>c(()=>Promise.resolve().then(()=>ro),void 0)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>c(()=>Promise.resolve().then(()=>so),void 0)},{id:"clarity",name:"Clarity",import:()=>c(()=>Promise.resolve().then(()=>lo),void 0)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>c(()=>Promise.resolve().then(()=>uo),void 0)},{id:"cmake",name:"CMake",import:()=>c(()=>Promise.resolve().then(()=>bo),void 0)},{id:"cobol",name:"COBOL",import:()=>c(()=>Promise.resolve().then(()=>yo),void 0)},{id:"codeowners",name:"CODEOWNERS",import:()=>c(()=>Promise.resolve().then(()=>_o),void 0)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>c(()=>Promise.resolve().then(()=>Eo),void 0)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>c(()=>Promise.resolve().then(()=>Qo),void 0)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>c(()=>Promise.resolve().then(()=>Fo),void 0)},{id:"coq",name:"Coq",import:()=>c(()=>Promise.resolve().then(()=>No),void 0)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>c(()=>Promise.resolve().then(()=>Zo),void 0)},{id:"crystal",name:"Crystal",import:()=>c(()=>Promise.resolve().then(()=>Uo),void 0)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>c(()=>Promise.resolve().then(()=>Yo),void 0)},{id:"css",name:"CSS",import:()=>c(()=>Promise.resolve().then(()=>zr),void 0)},{id:"csv",name:"CSV",import:()=>c(()=>Promise.resolve().then(()=>Vo),void 0)},{id:"cue",name:"CUE",import:()=>c(()=>Promise.resolve().then(()=>ts),void 0)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>c(()=>Promise.resolve().then(()=>rs),void 0)},{id:"d",name:"D",import:()=>c(()=>Promise.resolve().then(()=>ss),void 0)},{id:"dart",name:"Dart",import:()=>c(()=>Promise.resolve().then(()=>ls),void 0)},{id:"dax",name:"DAX",import:()=>c(()=>Promise.resolve().then(()=>ms),void 0)},{id:"desktop",name:"Desktop",import:()=>c(()=>Promise.resolve().then(()=>bs),void 0)},{id:"diff",name:"Diff",import:()=>c(()=>Promise.resolve().then(()=>hs),void 0)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>c(()=>Promise.resolve().then(()=>ks),void 0)},{id:"dotenv",name:"dotEnv",import:()=>c(()=>Promise.resolve().then(()=>Bs),void 0)},{id:"dream-maker",name:"Dream Maker",import:()=>c(()=>Promise.resolve().then(()=>xs),void 0)},{id:"edge",name:"Edge",import:()=>c(()=>Promise.resolve().then(()=>Ss),void 0)},{id:"elixir",name:"Elixir",import:()=>c(()=>Promise.resolve().then(()=>js),void 0)},{id:"elm",name:"Elm",import:()=>c(()=>Promise.resolve().then(()=>$s),void 0)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>c(()=>Promise.resolve().then(()=>Ps),void 0)},{id:"erb",name:"ERB",import:()=>c(()=>Promise.resolve().then(()=>Ks),void 0)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>c(()=>Promise.resolve().then(()=>Js),void 0)},{id:"fennel",name:"Fennel",import:()=>c(()=>Promise.resolve().then(()=>ec),void 0)},{id:"fish",name:"Fish",import:()=>c(()=>Promise.resolve().then(()=>ac),void 0)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>c(()=>Promise.resolve().then(()=>oc),void 0)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>c(()=>Promise.resolve().then(()=>dc),void 0)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>c(()=>Promise.resolve().then(()=>cc),void 0)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>c(()=>Promise.resolve().then(()=>bc),void 0)},{id:"gdresource",name:"GDResource",import:()=>c(()=>Promise.resolve().then(()=>Cc),void 0)},{id:"gdscript",name:"GDScript",import:()=>c(()=>Promise.resolve().then(()=>wc),void 0)},{id:"gdshader",name:"GDShader",import:()=>c(()=>Promise.resolve().then(()=>hc),void 0)},{id:"genie",name:"Genie",import:()=>c(()=>Promise.resolve().then(()=>vc),void 0)},{id:"gherkin",name:"Gherkin",import:()=>c(()=>Promise.resolve().then(()=>Ic),void 0)},{id:"git-commit",name:"Git Commit Message",import:()=>c(()=>Promise.resolve().then(()=>Sc),void 0)},{id:"git-rebase",name:"Git Rebase Message",import:()=>c(()=>Promise.resolve().then(()=>jc),void 0)},{id:"gleam",name:"Gleam",import:()=>c(()=>Promise.resolve().then(()=>$c),void 0)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>c(()=>Promise.resolve().then(()=>Pc),void 0)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>c(()=>Promise.resolve().then(()=>Gc),void 0)},{id:"glsl",name:"GLSL",import:()=>c(()=>Promise.resolve().then(()=>$o),void 0)},{id:"gnuplot",name:"Gnuplot",import:()=>c(()=>Promise.resolve().then(()=>Uc),void 0)},{id:"go",name:"Go",import:()=>c(()=>Promise.resolve().then(()=>Yc),void 0)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>c(()=>Promise.resolve().then(()=>tA),void 0)},{id:"groovy",name:"Groovy",import:()=>c(()=>Promise.resolve().then(()=>rA),void 0)},{id:"hack",name:"Hack",import:()=>c(()=>Promise.resolve().then(()=>sA),void 0)},{id:"haml",name:"Ruby Haml",import:()=>c(()=>Promise.resolve().then(()=>lA),void 0)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>c(()=>Promise.resolve().then(()=>gA),void 0)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>c(()=>Promise.resolve().then(()=>hA),void 0)},{id:"haxe",name:"Haxe",import:()=>c(()=>Promise.resolve().then(()=>wA),void 0)},{id:"hcl",name:"HashiCorp HCL",import:()=>c(()=>Promise.resolve().then(()=>CA),void 0)},{id:"hjson",name:"Hjson",import:()=>c(()=>Promise.resolve().then(()=>vA),void 0)},{id:"hlsl",name:"HLSL",import:()=>c(()=>Promise.resolve().then(()=>QA),void 0)},{id:"html",name:"HTML",import:()=>c(()=>Promise.resolve().then(()=>jr),void 0)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>c(()=>Promise.resolve().then(()=>Is),void 0)},{id:"http",name:"HTTP",import:()=>c(()=>Promise.resolve().then(()=>FA),void 0)},{id:"hxml",name:"HXML",import:()=>c(()=>Promise.resolve().then(()=>NA),void 0)},{id:"hy",name:"Hy",import:()=>c(()=>Promise.resolve().then(()=>RA),void 0)},{id:"imba",name:"Imba",import:()=>c(()=>Promise.resolve().then(()=>qA),void 0)},{id:"ini",name:"INI",aliases:["properties"],import:()=>c(()=>Promise.resolve().then(()=>TA),void 0)},{id:"java",name:"Java",import:()=>c(()=>Promise.resolve().then(()=>ri),void 0)},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>c(()=>Promise.resolve().then(()=>Fr),void 0)},{id:"jinja",name:"Jinja",import:()=>c(()=>Promise.resolve().then(()=>KA),void 0)},{id:"jison",name:"Jison",import:()=>c(()=>Promise.resolve().then(()=>JA),void 0)},{id:"json",name:"JSON",import:()=>c(()=>Promise.resolve().then(()=>ci),void 0)},{id:"json5",name:"JSON5",import:()=>c(()=>Promise.resolve().then(()=>el),void 0)},{id:"jsonc",name:"JSON with Comments",import:()=>c(()=>Promise.resolve().then(()=>al),void 0)},{id:"jsonl",name:"JSON Lines",import:()=>c(()=>Promise.resolve().then(()=>ol),void 0)},{id:"jsonnet",name:"Jsonnet",import:()=>c(()=>Promise.resolve().then(()=>Al),void 0)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>c(()=>Promise.resolve().then(()=>pl),void 0)},{id:"jsx",name:"JSX",import:()=>c(()=>Promise.resolve().then(()=>Jc),void 0)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>c(()=>Promise.resolve().then(()=>yl),void 0)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>c(()=>Promise.resolve().then(()=>_l),void 0)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>c(()=>Promise.resolve().then(()=>El),void 0)},{id:"latex",name:"LaTeX",import:()=>c(()=>Promise.resolve().then(()=>Dl),void 0)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>c(()=>Promise.resolve().then(()=>zl),void 0)},{id:"less",name:"Less",import:()=>c(()=>Promise.resolve().then(()=>jl),void 0)},{id:"liquid",name:"Liquid",import:()=>c(()=>Promise.resolve().then(()=>$l),void 0)},{id:"log",name:"Log file",import:()=>c(()=>Promise.resolve().then(()=>Pl),void 0)},{id:"logo",name:"Logo",import:()=>c(()=>Promise.resolve().then(()=>Gl),void 0)},{id:"lua",name:"Lua",import:()=>c(()=>Promise.resolve().then(()=>Ts),void 0)},{id:"luau",name:"Luau",import:()=>c(()=>Promise.resolve().then(()=>Ul),void 0)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>c(()=>Promise.resolve().then(()=>Wl),void 0)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>c(()=>Promise.resolve().then(()=>mc),void 0)},{id:"marko",name:"Marko",import:()=>c(()=>Promise.resolve().then(()=>Xl),void 0)},{id:"matlab",name:"MATLAB",import:()=>c(()=>Promise.resolve().then(()=>nd),void 0)},{id:"mdc",name:"MDC",import:()=>c(()=>Promise.resolve().then(()=>id),void 0)},{id:"mdx",name:"MDX",import:()=>c(()=>Promise.resolve().then(()=>cd),void 0)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>c(()=>Promise.resolve().then(()=>dd),void 0)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>c(()=>Promise.resolve().then(()=>ud),void 0)},{id:"mojo",name:"Mojo",import:()=>c(()=>Promise.resolve().then(()=>fd),void 0)},{id:"move",name:"Move",import:()=>c(()=>Promise.resolve().then(()=>wd),void 0)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>c(()=>Promise.resolve().then(()=>Cd),void 0)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>c(()=>Promise.resolve().then(()=>vd),void 0)},{id:"nginx",name:"Nginx",import:()=>c(()=>Promise.resolve().then(()=>Id),void 0)},{id:"nim",name:"Nim",import:()=>c(()=>Promise.resolve().then(()=>Sd),void 0)},{id:"nix",name:"Nix",import:()=>c(()=>Promise.resolve().then(()=>jd),void 0)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>c(()=>Promise.resolve().then(()=>$d),void 0)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>c(()=>Promise.resolve().then(()=>Pd),void 0)},{id:"objective-cpp",name:"Objective-C++",import:()=>c(()=>Promise.resolve().then(()=>Gd),void 0)},{id:"ocaml",name:"OCaml",import:()=>c(()=>Promise.resolve().then(()=>Ud),void 0)},{id:"pascal",name:"Pascal",import:()=>c(()=>Promise.resolve().then(()=>Wd),void 0)},{id:"perl",name:"Perl",import:()=>c(()=>Promise.resolve().then(()=>Xd),void 0)},{id:"php",name:"PHP",import:()=>c(()=>Promise.resolve().then(()=>tp),void 0)},{id:"plsql",name:"PL/SQL",import:()=>c(()=>Promise.resolve().then(()=>rp),void 0)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>c(()=>Promise.resolve().then(()=>sp),void 0)},{id:"postcss",name:"PostCSS",import:()=>c(()=>Promise.resolve().then(()=>xi),void 0)},{id:"powerquery",name:"PowerQuery",import:()=>c(()=>Promise.resolve().then(()=>lp),void 0)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>c(()=>Promise.resolve().then(()=>mp),void 0)},{id:"prisma",name:"Prisma",import:()=>c(()=>Promise.resolve().then(()=>bp),void 0)},{id:"prolog",name:"Prolog",import:()=>c(()=>Promise.resolve().then(()=>yp),void 0)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>c(()=>Promise.resolve().then(()=>_p),void 0)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>c(()=>Promise.resolve().then(()=>Ep),void 0)},{id:"puppet",name:"Puppet",import:()=>c(()=>Promise.resolve().then(()=>Qp),void 0)},{id:"purescript",name:"PureScript",import:()=>c(()=>Promise.resolve().then(()=>Fp),void 0)},{id:"python",name:"Python",aliases:["py"],import:()=>c(()=>Promise.resolve().then(()=>ul),void 0)},{id:"qml",name:"QML",import:()=>c(()=>Promise.resolve().then(()=>Np),void 0)},{id:"qmldir",name:"QML Directory",import:()=>c(()=>Promise.resolve().then(()=>Rp),void 0)},{id:"qss",name:"Qt Style Sheets",import:()=>c(()=>Promise.resolve().then(()=>qp),void 0)},{id:"r",name:"R",import:()=>c(()=>Promise.resolve().then(()=>bl),void 0)},{id:"racket",name:"Racket",import:()=>c(()=>Promise.resolve().then(()=>Tp),void 0)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>c(()=>Promise.resolve().then(()=>Hp),void 0)},{id:"razor",name:"ASP.NET Razor",import:()=>c(()=>Promise.resolve().then(()=>Yp),void 0)},{id:"reg",name:"Windows Registry Script",import:()=>c(()=>Promise.resolve().then(()=>Vp),void 0)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>c(()=>Promise.resolve().then(()=>Lo),void 0)},{id:"rel",name:"Rel",import:()=>c(()=>Promise.resolve().then(()=>tm),void 0)},{id:"riscv",name:"RISC-V",import:()=>c(()=>Promise.resolve().then(()=>rm),void 0)},{id:"rst",name:"reStructuredText",import:()=>c(()=>Promise.resolve().then(()=>sm),void 0)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>c(()=>Promise.resolve().then(()=>Os),void 0)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>c(()=>Promise.resolve().then(()=>lm),void 0)},{id:"sas",name:"SAS",import:()=>c(()=>Promise.resolve().then(()=>mm),void 0)},{id:"sass",name:"Sass",import:()=>c(()=>Promise.resolve().then(()=>bm),void 0)},{id:"scala",name:"Scala",import:()=>c(()=>Promise.resolve().then(()=>ym),void 0)},{id:"scheme",name:"Scheme",import:()=>c(()=>Promise.resolve().then(()=>_m),void 0)},{id:"scss",name:"SCSS",import:()=>c(()=>Promise.resolve().then(()=>Tr),void 0)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>c(()=>Promise.resolve().then(()=>Em),void 0)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>c(()=>Promise.resolve().then(()=>Go),void 0)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>c(()=>Promise.resolve().then(()=>Qm),void 0)},{id:"smalltalk",name:"Smalltalk",import:()=>c(()=>Promise.resolve().then(()=>Fm),void 0)},{id:"solidity",name:"Solidity",import:()=>c(()=>Promise.resolve().then(()=>Nm),void 0)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>c(()=>Promise.resolve().then(()=>Rm),void 0)},{id:"sparql",name:"SPARQL",import:()=>c(()=>Promise.resolve().then(()=>Zm),void 0)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>c(()=>Promise.resolve().then(()=>Om),void 0)},{id:"sql",name:"SQL",import:()=>c(()=>Promise.resolve().then(()=>Xi),void 0)},{id:"ssh-config",name:"SSH Config",import:()=>c(()=>Promise.resolve().then(()=>Km),void 0)},{id:"stata",name:"Stata",import:()=>c(()=>Promise.resolve().then(()=>Jm),void 0)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>c(()=>Promise.resolve().then(()=>eu),void 0)},{id:"svelte",name:"Svelte",import:()=>c(()=>Promise.resolve().then(()=>au),void 0)},{id:"swift",name:"Swift",import:()=>c(()=>Promise.resolve().then(()=>ou),void 0)},{id:"system-verilog",name:"SystemVerilog",import:()=>c(()=>Promise.resolve().then(()=>Au),void 0)},{id:"systemd",name:"Systemd Units",import:()=>c(()=>Promise.resolve().then(()=>pu),void 0)},{id:"tasl",name:"Tasl",import:()=>c(()=>Promise.resolve().then(()=>gu),void 0)},{id:"tcl",name:"Tcl",import:()=>c(()=>Promise.resolve().then(()=>hu),void 0)},{id:"templ",name:"Templ",import:()=>c(()=>Promise.resolve().then(()=>ku),void 0)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>c(()=>Promise.resolve().then(()=>Bu),void 0)},{id:"tex",name:"TeX",import:()=>c(()=>Promise.resolve().then(()=>xl),void 0)},{id:"toml",name:"TOML",import:()=>c(()=>Promise.resolve().then(()=>xu),void 0)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>c(()=>Promise.resolve().then(()=>qu),void 0)},{id:"tsv",name:"TSV",import:()=>c(()=>Promise.resolve().then(()=>Tu),void 0)},{id:"tsx",name:"TSX",import:()=>c(()=>Promise.resolve().then(()=>Xc),void 0)},{id:"turtle",name:"Turtle",import:()=>c(()=>Promise.resolve().then(()=>Mm),void 0)},{id:"twig",name:"Twig",import:()=>c(()=>Promise.resolve().then(()=>Hu),void 0)},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>c(()=>Promise.resolve().then(()=>Ei),void 0)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>c(()=>Promise.resolve().then(()=>Yu),void 0)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>c(()=>Promise.resolve().then(()=>Vu),void 0)},{id:"v",name:"V",import:()=>c(()=>Promise.resolve().then(()=>tg),void 0)},{id:"vala",name:"Vala",import:()=>c(()=>Promise.resolve().then(()=>rg),void 0)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>c(()=>Promise.resolve().then(()=>sg),void 0)},{id:"verilog",name:"Verilog",import:()=>c(()=>Promise.resolve().then(()=>lg),void 0)},{id:"vhdl",name:"VHDL",import:()=>c(()=>Promise.resolve().then(()=>mg),void 0)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>c(()=>Promise.resolve().then(()=>bg),void 0)},{id:"vue",name:"Vue",import:()=>c(()=>Promise.resolve().then(()=>vg),void 0)},{id:"vue-html",name:"Vue HTML",import:()=>c(()=>Promise.resolve().then(()=>Ig),void 0)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>c(()=>Promise.resolve().then(()=>Sg),void 0)},{id:"wasm",name:"WebAssembly",import:()=>c(()=>Promise.resolve().then(()=>jg),void 0)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>c(()=>Promise.resolve().then(()=>$g),void 0)},{id:"wgsl",name:"WGSL",import:()=>c(()=>Promise.resolve().then(()=>Pg),void 0)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>c(()=>Promise.resolve().then(()=>Gg),void 0)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>c(()=>Promise.resolve().then(()=>Ug),void 0)},{id:"xml",name:"XML",import:()=>c(()=>Promise.resolve().then(()=>oi),void 0)},{id:"xsl",name:"XSL",import:()=>c(()=>Promise.resolve().then(()=>Wg),void 0)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>c(()=>Promise.resolve().then(()=>pA),void 0)},{id:"zenscript",name:"ZenScript",import:()=>c(()=>Promise.resolve().then(()=>Xg),void 0)},{id:"zig",name:"Zig",import:()=>c(()=>Promise.resolve().then(()=>nb),void 0)}],xn=Object.fromEntries(Qt.map(t=>[t.id,t.import])),Qn=Object.fromEntries(Qt.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(n=>[n,t.import]))||[]})),It={...xn,...Qn},In=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>rb),void 0)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ob),void 0)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>cb),void 0)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>lb),void 0)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>c(()=>Promise.resolve().then(()=>pb),void 0)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ub),void 0)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>bb),void 0)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>hb),void 0)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>wb),void 0)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>_b),void 0)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Bb),void 0)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>vb),void 0)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Qb),void 0)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Db),void 0)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Sb),void 0)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Nb),void 0)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Lb),void 0)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>c(()=>Promise.resolve().then(()=>$b),void 0)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>c(()=>Promise.resolve().then(()=>qb),void 0)},{id:"houston",displayName:"Houston",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Zb),void 0)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Gb),void 0)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Hb),void 0)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Kb),void 0)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Wb),void 0)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Vb),void 0)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ef),void 0)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>nf),void 0)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>rf),void 0)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>sf),void 0)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Af),void 0)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>df),void 0)},{id:"nord",displayName:"Nord",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>mf),void 0)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>gf),void 0)},{id:"one-light",displayName:"One Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>ff),void 0)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>yf),void 0)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>kf),void 0)},{id:"red",displayName:"Red",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Cf),void 0)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Ef),void 0)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>c(()=>Promise.resolve().then(()=>xf),void 0)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>If),void 0)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Ff),void 0)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>c(()=>Promise.resolve().then(()=>zf),void 0)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>jf),void 0)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Rf),void 0)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Mf),void 0)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Pf),void 0)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Tf),void 0)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Of),void 0)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Uf),void 0)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Yf),void 0)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Jf),void 0)}],Dn=Object.fromEntries(In.map(t=>[t.id,t.import]));let P=class extends Error{constructor(e){super(e),this.name="ShikiError"}},Je=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Fn(){return 2147483648}function Sn(){return typeof performance<"u"?performance.now():Date.now()}const zn=(t,e)=>t+(e-t%e)%e;async function Nn(t){let e,n;const a={};function r(d){n=d,a.HEAPU8=new Uint8Array(d),a.HEAPU32=new Uint32Array(d)}function i(d,g,w){a.HEAPU8.copyWithin(d,g,g+w)}function o(d){try{return e.grow(d-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}function A(d){const g=a.HEAPU8.length;d=d>>>0;const w=Fn();if(d>w)return!1;for(let f=1;f<=4;f*=2){let b=g*(1+.2/f);b=Math.min(b,d+100663296);const h=Math.min(w,zn(Math.max(d,b),65536));if(o(h))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(d,g,w=1024){const f=g+w;let b=g;for(;d[b]&&!(b>=f);)++b;if(b-g>16&&d.buffer&&s)return s.decode(d.subarray(g,b));let h="";for(;g<b;){let y=d[g++];if(!(y&128)){h+=String.fromCharCode(y);continue}const _=d[g++]&63;if((y&224)===192){h+=String.fromCharCode((y&31)<<6|_);continue}const B=d[g++]&63;if((y&240)===224?y=(y&15)<<12|_<<6|B:y=(y&7)<<18|_<<12|B<<6|d[g++]&63,y<65536)h+=String.fromCharCode(y);else{const F=y-65536;h+=String.fromCharCode(55296|F>>10,56320|F&1023)}}return h}function m(d,g){return d?l(a.HEAPU8,d,g):""}const p={emscripten_get_now:Sn,emscripten_memcpy_big:i,emscripten_resize_heap:A,fd_write:()=>0};async function u(){const g=await t({env:p,wasi_snapshot_preview1:p});e=g.memory,r(e.buffer),Object.assign(a,g),a.UTF8ToString=m}return await u(),a}let Q=null;function jn(t){throw new Je(t.UTF8ToString(t.getLastOnigError()))}class xe{constructor(e){v(this,"utf16Length");v(this,"utf8Length");v(this,"utf16Value");v(this,"utf8Value");v(this,"utf16OffsetToUtf8");v(this,"utf8OffsetToUtf16");const n=e.length,a=xe._utf8ByteLength(e),r=a!==n,i=r?new Uint32Array(n+1):null;r&&(i[n]=a);const o=r?new Uint32Array(a+1):null;r&&(o[a]=n);const A=new Uint8Array(a);let s=0;for(let l=0;l<n;l++){const m=e.charCodeAt(l);let p=m,u=!1;if(m>=55296&&m<=56319&&l+1<n){const d=e.charCodeAt(l+1);d>=56320&&d<=57343&&(p=(m-55296<<10)+65536|d-56320,u=!0)}r&&(i[l]=s,u&&(i[l+1]=s),p<=127?o[s+0]=l:p<=2047?(o[s+0]=l,o[s+1]=l):p<=65535?(o[s+0]=l,o[s+1]=l,o[s+2]=l):(o[s+0]=l,o[s+1]=l,o[s+2]=l,o[s+3]=l)),p<=127?A[s++]=p:p<=2047?(A[s++]=192|(p&1984)>>>6,A[s++]=128|(p&63)>>>0):p<=65535?(A[s++]=224|(p&61440)>>>12,A[s++]=128|(p&4032)>>>6,A[s++]=128|(p&63)>>>0):(A[s++]=240|(p&1835008)>>>18,A[s++]=128|(p&258048)>>>12,A[s++]=128|(p&4032)>>>6,A[s++]=128|(p&63)>>>0),u&&l++}this.utf16Length=n,this.utf8Length=a,this.utf16Value=e,this.utf8Value=A,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let a=0,r=e.length;a<r;a++){const i=e.charCodeAt(a);let o=i,A=!1;if(i>=55296&&i<=56319&&a+1<r){const s=e.charCodeAt(a+1);s>=56320&&s<=57343&&(o=(i-55296<<10)+65536|s-56320,A=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,A&&a++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const S=class S{constructor(e){v(this,"id",++S.LAST_ID);v(this,"_onigBinding");v(this,"content");v(this,"utf16Length");v(this,"utf8Length");v(this,"utf16OffsetToUtf8");v(this,"utf8OffsetToUtf16");v(this,"ptr");if(!Q)throw new Je("Must invoke loadWasm first.");this._onigBinding=Q,this.content=e;const n=new xe(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!S._sharedPtrInUse?(S._sharedPtr||(S._sharedPtr=Q.omalloc(1e4)),S._sharedPtrInUse=!0,Q.HEAPU8.set(n.utf8Value,S._sharedPtr),this.ptr=S._sharedPtr):this.ptr=n.createString(Q)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===S._sharedPtr?S._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};v(S,"LAST_ID",0),v(S,"_sharedPtr",0),v(S,"_sharedPtrInUse",!1);let be=S;class Ln{constructor(e){v(this,"_onigBinding");v(this,"_ptr");if(!Q)throw new Je("Must invoke loadWasm first.");const n=[],a=[];for(let A=0,s=e.length;A<s;A++){const l=new xe(e[A]);n[A]=l.createString(Q),a[A]=l.utf8Length}const r=Q.omalloc(4*e.length);Q.HEAPU32.set(n,r/4);const i=Q.omalloc(4*e.length);Q.HEAPU32.set(a,i/4);const o=Q.createOnigScanner(r,i,e.length);for(let A=0,s=e.length;A<s;A++)Q.ofree(n[A]);Q.ofree(i),Q.ofree(r),o===0&&jn(Q),this._onigBinding=Q,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,a){let r=0;if(typeof a=="number"&&(r=a),typeof e=="string"){e=new be(e);const i=this._findNextMatchSync(e,n,!1,r);return e.dispose(),i}return this._findNextMatchSync(e,n,!1,r)}_findNextMatchSync(e,n,a,r){const i=this._onigBinding,o=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),r);if(o===0)return null;const A=i.HEAPU32;let s=o/4;const l=A[s++],m=A[s++],p=[];for(let u=0;u<m;u++){const d=e.convertUtf8OffsetToUtf16(A[s++]),g=e.convertUtf8OffsetToUtf16(A[s++]);p[u]={start:d,end:g,length:g-d}}return{index:l,captureIndices:p}}}function Rn(t){return typeof t.instantiator=="function"}function $n(t){return typeof t.default=="function"}function Mn(t){return typeof t.data<"u"}function qn(t){return typeof Response<"u"&&t instanceof Response}function Pn(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let de;function Zn(t){if(de)return de;async function e(){Q=await Nn(async n=>{let a=t;return a=await a,typeof a=="function"&&(a=await a(n)),typeof a=="function"&&(a=await a(n)),Rn(a)?a=await a.instantiator(n):$n(a)?a=await a.default(n):(Mn(a)&&(a=a.data),qn(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await Tn(a)(n):a=await Gn(a)(n):Pn(a)?a=await $e(a)(n):a instanceof WebAssembly.Module?a=await $e(a)(n):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await $e(a.default)(n))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return de=e(),de}function $e(t){return e=>WebAssembly.instantiate(t,e)}function Tn(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Gn(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}let On;function Hn(){return On}async function Dt(t){return t&&await Zn(t),{createScanner(e){return new Ln(e)},createString(e){return new be(e)}}}function Un(t){return Ve(t)}function Ve(t){return Array.isArray(t)?Kn(t):typeof t=="object"?Yn(t):t}function Kn(t){let e=[];for(let n=0,a=t.length;n<a;n++)e[n]=Ve(t[n]);return e}function Yn(t){let e={};for(let n in t)e[n]=Ve(t[n]);return e}function Ft(t,...e){return e.forEach(n=>{for(let a in n)t[a]=n[a]}),t}function St(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?St(t.substring(0,t.length-1)):t.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(t){return t===null?!1:(Me.lastIndex=0,Me.test(t))}static replaceCaptures(t,e,n){return t.replace(Me,(a,r,i,o)=>{let A=n[parseInt(r||i,10)];if(A){let s=e.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(o){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return a})}};function zt(t,e){return t<e?-1:t>e?1:0}function Nt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,a=e.length;if(n===a){for(let r=0;r<n;r++){let i=zt(t[r],e[r]);if(i!==0)return i}return 0}return n-a}function pt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Lt=class{constructor(t){this.fn=t,this.cache=new Map}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},fe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n,this._cachedMatchRoot=new Lt(a=>this._root.match(a))}static createFromRawTheme(t,e){return this.createFromParsedTheme(Vn(t),e)}static createFromParsedTheme(t,e){return ea(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,a=this._cachedMatchRoot.get(e).find(r=>Wn(t.parent,r.parentScopes));return a?new Rt(a.fontStyle,a.foreground,a.background):null}},qe=class ue{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const a of n)e=new ue(e,a);return e}static from(...e){let n=null;for(let a=0;a<e.length;a++)n=new ue(n,e[a]);return n}push(e){return new ue(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let a=this;for(;a&&a!==e;)n.push(a.scopeName),a=a.parent;return a===e?n.reverse():void 0}};function Wn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let a=e[n],r=!1;if(a===">"){if(n===e.length-1)return!1;a=e[++n],r=!0}for(;t&&!Jn(t.scopeName,a);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Jn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Rt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Vn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],a=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let A;if(typeof o.scope=="string"){let p=o.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),A=p.split(",")}else Array.isArray(o.scope)?A=o.scope:A=[""];let s=-1;if(typeof o.settings.fontStyle=="string"){s=0;let p=o.settings.fontStyle.split(" ");for(let u=0,d=p.length;u<d;u++)switch(p[u]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let l=null;typeof o.settings.foreground=="string"&&pt(o.settings.foreground)&&(l=o.settings.foreground);let m=null;typeof o.settings.background=="string"&&pt(o.settings.background)&&(m=o.settings.background);for(let p=0,u=A.length;p<u;p++){let g=A[p].trim().split(" "),w=g[g.length-1],f=null;g.length>1&&(f=g.slice(0,g.length-1),f.reverse()),n[a++]=new Xn(w,f,r,s,l,m)}}return n}var Xn=class{constructor(t,e,n,a,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=a,this.foreground=r,this.background=i}},q=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(q||{});function ea(t,e){t.sort((s,l)=>{let m=zt(s.scope,l.scope);return m!==0||(m=Nt(s.parentScopes,l.parentScopes),m!==0)?m:s.index-l.index});let n=0,a="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let s=t.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(a=s.foreground),s.background!==null&&(r=s.background)}let i=new ta(e),o=new Rt(n,i.getId(a),i.getId(r)),A=new aa(new Ze(0,null,-1,0,0),[]);for(let s=0,l=t.length;s<l;s++){let m=t[s];A.insert(0,m.scope,m.parentScopes,m.fontStyle,i.getId(m.foreground),i.getId(m.background))}return new fe(i,o,A)}var ta=class{constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},na=Object.freeze([]),Ze=class $t{constructor(e,n,a,r,i){this.scopeDepth=e,this.parentScopes=n||na,this.fontStyle=a,this.foreground=r,this.background=i}clone(){return new $t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let a=0,r=e.length;a<r;a++)n[a]=e[a].clone();return n}acceptOverwrite(e,n,a,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),a!==0&&(this.foreground=a),r!==0&&(this.background=r)}},aa=class Te{constructor(e,n=[],a={}){this._mainRule=e,this._children=a,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let a=0,r=0;for(;e.parentScopes[a]===">"&&a++,n.parentScopes[r]===">"&&r++,!(a>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[a].length;if(i!==0)return i;a++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),r,i;if(a===-1?(r=e,i=""):(r=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Te._cmpBySpecificity),n}insert(e,n,a,r,i,o){if(n===""){this._doInsertHere(e,a,r,i,o);return}let A=n.indexOf("."),s,l;A===-1?(s=n,l=""):(s=n.substring(0,A),l=n.substring(A+1));let m;this._children.hasOwnProperty(s)?m=this._children[s]:(m=new Te(this._mainRule.clone(),Ze.cloneArr(this._rulesWithParentScopes)),this._children[s]=m),m.insert(e+1,l,a,r,i,o)}_doInsertHere(e,n,a,r,i){if(n===null){this._mainRule.acceptOverwrite(e,a,r,i);return}for(let o=0,A=this._rulesWithParentScopes.length;o<A;o++){let s=this._rulesWithParentScopes[o];if(Nt(s.parentScopes,n)===0){s.acceptOverwrite(e,a,r,i);return}}a===-1&&(a=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ze(e,n,a,r,i))}},Y=class j{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=j.getLanguageId(e),a=j.getTokenType(e),r=j.getFontStyle(e),i=j.getForeground(e),o=j.getBackground(e);console.log({languageId:n,tokenType:a,fontStyle:r,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,a,r,i,o,A){let s=j.getLanguageId(e),l=j.getTokenType(e),m=j.containsBalancedBrackets(e)?1:0,p=j.getFontStyle(e),u=j.getForeground(e),d=j.getBackground(e);return n!==0&&(s=n),a!==8&&(l=a),r!==null&&(m=r?1:0),i!==-1&&(p=i),o!==0&&(u=o),A!==0&&(d=A),(s<<0|l<<8|m<<10|p<<11|u<<15|d<<24)>>>0}};function he(t,e){const n=[],a=ra(t);let r=a.next();for(;r!==null;){let s=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=a.next()}let l=o();if(n.push({matcher:l,priority:s}),r!==",")break;r=a.next()}return n;function i(){if(r==="-"){r=a.next();const s=i();return l=>!!s&&!s(l)}if(r==="("){r=a.next();const s=A();return r===")"&&(r=a.next()),s}if(mt(r)){const s=[];do s.push(r),r=a.next();while(mt(r));return l=>e(s,l)}return null}function o(){const s=[];let l=i();for(;l;)s.push(l),l=i();return m=>s.every(p=>p(m))}function A(){const s=[];let l=o();for(;l&&(s.push(l),r==="|"||r===",");){do r=a.next();while(r==="|"||r===",");l=o()}return m=>s.some(p=>p(m))}}function mt(t){return!!t&&!!t.match(/[\w\.:]+/)}function ra(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const a=n[0];return n=e.exec(t),a}}}function Mt(t){typeof t.dispose=="function"&&t.dispose()}var ae=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},ia=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},oa=class{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},sa=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ae(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new oa;for(const n of t)ca(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ae){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function ca(t,e,n,a){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof ae?ge({baseGrammar:i,selfGrammar:r},a):Ge(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},a);const o=n.injections(t.scopeName);if(o)for(const A of o)a.add(new ae(A))}function Ge(t,e,n){if(e.repository&&e.repository[t]){const a=e.repository[t];ye([a],e,n)}}function ge(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,n){for(const a of t){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const r=a.repository?Ft({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&ye(a.patterns,{...e,repository:r},n);const i=a.include;if(!i)continue;const o=qt(i);switch(o.kind){case 0:ge({...e,selfGrammar:e.baseGrammar},n);break;case 1:ge(e,n);break;case 2:Ge(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const A=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(A){const s={baseGrammar:e.baseGrammar,selfGrammar:A,repository:r};o.kind===4?Ge(o.ruleName,s,n):ge(s,n)}else o.kind===4?n.add(new ia(o.scopeName,o.ruleName)):n.add(new ae(o.scopeName));break}}}var Aa=class{constructor(){this.kind=0}},la=class{constructor(){this.kind=1}},da=class{constructor(t){this.ruleName=t,this.kind=2}},pa=class{constructor(t){this.scopeName=t,this.kind=3}},ma=class{constructor(t,e){this.scopeName=t,this.ruleName=e,this.kind=4}};function qt(t){if(t==="$base")return new Aa;if(t==="$self")return new la;const e=t.indexOf("#");if(e===-1)return new pa(t);if(e===0)return new da(t.substring(1));{const n=t.substring(0,e),a=t.substring(e+1);return new ma(n,a)}}var ua=/\\(\d+)/,ut=/\\(\d+)/g,ga=-1,Pt=-2;var se=class{constructor(t,e,n,a){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${St(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:pe.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,t,e)}},ba=class extends se{constructor(t,e,n,a,r){super(t,e,n,a),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,a){throw new Error("Not supported!")}},fa=class extends se{constructor(t,e,n,a,r){super(t,e,n,null),this._match=new re(a,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends se{constructor(t,e,n,a,r){super(t,e,n,a),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Oe=class extends se{constructor(t,e,n,a,r,i,o,A,s,l){super(t,e,n,a),this._begin=new re(r,this.id),this.beginCaptures=i,this._end=new re(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!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(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,a)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const n of this.patterns)t.getRule(n).collectPatterns(t,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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},we=class extends se{constructor(t,e,n,a,r,i,o,A,s){super(t,e,n,a),this._begin=new re(r,this.id),this.beginCaptures=i,this.whileCaptures=A,this._while=new re(o,Pt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,a){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,a)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ie,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Zt=class I{static createCaptureRule(e,n,a,r,i){return e.registerRule(o=>new ba(n,o,a,r,i))}static getCompiledRuleId(e,n,a){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new fa(e.$vscodeTextmateLocation,e.id,e.name,e.match,I._compileCaptures(e.captures,n,a));if(typeof e.begin>"u"){e.repository&&(a=Ft({},a,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,I._compilePatterns(i,n,a))}return e.while?new we(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,a),e.while,I._compileCaptures(e.whileCaptures||e.captures,n,a),I._compilePatterns(e.patterns,n,a)):new Oe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,a),e.end,I._compileCaptures(e.endCaptures||e.captures,n,a),e.applyEndPatternLast,I._compilePatterns(e.patterns,n,a))}),e.id}static _compileCaptures(e,n,a){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const A=parseInt(o,10);A>i&&(i=A)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const A=parseInt(o,10);let s=0;e[o].patterns&&(s=I.getCompiledRuleId(e[o],n,a)),r[A]=I.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,s)}}return r}static _compilePatterns(e,n,a){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const A=e[i];let s=-1;if(A.include){const l=qt(A.include);switch(l.kind){case 0:case 1:s=I.getCompiledRuleId(a[A.include],n,a);break;case 2:let m=a[l.ruleName];m&&(s=I.getCompiledRuleId(m,n,a));break;case 3:case 4:const p=l.scopeName,u=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(p,a);if(d)if(u){let g=d.repository[u];g&&(s=I.getCompiledRuleId(g,n,d.repository))}else s=I.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else s=I.getCompiledRuleId(A,n,a);if(s!==-1){const l=n.getRule(s);let m=!1;if((l instanceof gt||l instanceof Oe||l instanceof we)&&l.hasMissingPatterns&&l.patterns.length===0&&(m=!0),m)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},re=class Tt{constructor(e,n){if(e){const a=e.length;let r=0,i=[],o=!1;for(let A=0;A<a;A++)if(e.charAt(A)==="\\"&&A+1<a){const l=e.charAt(A+1);l==="z"?(i.push(e.substring(r,A)),i.push("$(?!\\n)(?<!\\n)"),r=A+2):(l==="A"||l==="G")&&(o=!0),A++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,a)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,this.hasBackReferences=ua.test(this.source)}clone(){return new Tt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){let a=n.map(r=>e.substring(r.start,r.end));return ut.lastIndex=0,this.source.replace(ut,(r,i)=>jt(a[parseInt(i,10)]||""))}_buildAnchorCache(){let e=[],n=[],a=[],r=[],i,o,A,s;for(i=0,o=this.source.length;i<o;i++)A=this.source.charAt(i),e[i]=A,n[i]=A,a[i]=A,r[i]=A,A==="\\"&&i+1<o&&(s=this.source.charAt(i+1),s==="A"?(e[i+1]="",n[i+1]="",a[i+1]="A",r[i+1]="A"):s==="G"?(e[i+1]="",n[i+1]="G",a[i+1]="",r[i+1]="G"):(e[i+1]=s,n[i+1]=s,a[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:a.join(""),A1_G1:r.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ie=class{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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new bt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let a=this._items.map(r=>r.resolveAnchors(e,n));return new bt(t,a,this._items.map(r=>r.ruleId))}},bt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
1
|
+
var Bn=Object.defineProperty;var En=(t,e,n)=>e in t?Bn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var v=(t,e,n)=>En(t,typeof e!="symbol"?e+"":e,n);import{em as c,en as vn}from"./vendor-_6rG8OMg.js";const Qt=[{id:"abap",name:"ABAP",import:()=>c(()=>Promise.resolve().then(()=>Cr),void 0)},{id:"actionscript-3",name:"ActionScript",import:()=>c(()=>Promise.resolve().then(()=>vr),void 0)},{id:"ada",name:"Ada",import:()=>c(()=>Promise.resolve().then(()=>Ir),void 0)},{id:"angular-html",name:"Angular HTML",import:()=>c(()=>Promise.resolve().then(()=>Pr),void 0)},{id:"angular-ts",name:"Angular TypeScript",import:()=>c(()=>Promise.resolve().then(()=>Wr),void 0)},{id:"apache",name:"Apache Conf",import:()=>c(()=>Promise.resolve().then(()=>Xr),void 0)},{id:"apex",name:"Apex",import:()=>c(()=>Promise.resolve().then(()=>ni),void 0)},{id:"apl",name:"APL",import:()=>c(()=>Promise.resolve().then(()=>di),void 0)},{id:"applescript",name:"AppleScript",import:()=>c(()=>Promise.resolve().then(()=>ui),void 0)},{id:"ara",name:"Ara",import:()=>c(()=>Promise.resolve().then(()=>fi),void 0)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>c(()=>Promise.resolve().then(()=>wi),void 0)},{id:"asm",name:"Assembly",import:()=>c(()=>Promise.resolve().then(()=>Ci),void 0)},{id:"astro",name:"Astro",import:()=>c(()=>Promise.resolve().then(()=>Di),void 0)},{id:"awk",name:"AWK",import:()=>c(()=>Promise.resolve().then(()=>zi),void 0)},{id:"ballerina",name:"Ballerina",import:()=>c(()=>Promise.resolve().then(()=>Li),void 0)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>c(()=>Promise.resolve().then(()=>Mi),void 0)},{id:"beancount",name:"Beancount",import:()=>c(()=>Promise.resolve().then(()=>Zi),void 0)},{id:"berry",name:"Berry",aliases:["be"],import:()=>c(()=>Promise.resolve().then(()=>Oi),void 0)},{id:"bibtex",name:"BibTeX",import:()=>c(()=>Promise.resolve().then(()=>Ki),void 0)},{id:"bicep",name:"Bicep",import:()=>c(()=>Promise.resolve().then(()=>Ji),void 0)},{id:"blade",name:"Blade",import:()=>c(()=>Promise.resolve().then(()=>no),void 0)},{id:"c",name:"C",import:()=>c(()=>Promise.resolve().then(()=>ro),void 0)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>c(()=>Promise.resolve().then(()=>so),void 0)},{id:"clarity",name:"Clarity",import:()=>c(()=>Promise.resolve().then(()=>lo),void 0)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>c(()=>Promise.resolve().then(()=>uo),void 0)},{id:"cmake",name:"CMake",import:()=>c(()=>Promise.resolve().then(()=>bo),void 0)},{id:"cobol",name:"COBOL",import:()=>c(()=>Promise.resolve().then(()=>yo),void 0)},{id:"codeowners",name:"CODEOWNERS",import:()=>c(()=>Promise.resolve().then(()=>_o),void 0)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>c(()=>Promise.resolve().then(()=>Eo),void 0)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>c(()=>Promise.resolve().then(()=>Qo),void 0)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>c(()=>Promise.resolve().then(()=>Fo),void 0)},{id:"coq",name:"Coq",import:()=>c(()=>Promise.resolve().then(()=>No),void 0)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>c(()=>Promise.resolve().then(()=>Zo),void 0)},{id:"crystal",name:"Crystal",import:()=>c(()=>Promise.resolve().then(()=>Uo),void 0)},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>c(()=>Promise.resolve().then(()=>Yo),void 0)},{id:"css",name:"CSS",import:()=>c(()=>Promise.resolve().then(()=>zr),void 0)},{id:"csv",name:"CSV",import:()=>c(()=>Promise.resolve().then(()=>Vo),void 0)},{id:"cue",name:"CUE",import:()=>c(()=>Promise.resolve().then(()=>ts),void 0)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>c(()=>Promise.resolve().then(()=>rs),void 0)},{id:"d",name:"D",import:()=>c(()=>Promise.resolve().then(()=>ss),void 0)},{id:"dart",name:"Dart",import:()=>c(()=>Promise.resolve().then(()=>ls),void 0)},{id:"dax",name:"DAX",import:()=>c(()=>Promise.resolve().then(()=>ms),void 0)},{id:"desktop",name:"Desktop",import:()=>c(()=>Promise.resolve().then(()=>bs),void 0)},{id:"diff",name:"Diff",import:()=>c(()=>Promise.resolve().then(()=>hs),void 0)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>c(()=>Promise.resolve().then(()=>ks),void 0)},{id:"dotenv",name:"dotEnv",import:()=>c(()=>Promise.resolve().then(()=>Bs),void 0)},{id:"dream-maker",name:"Dream Maker",import:()=>c(()=>Promise.resolve().then(()=>xs),void 0)},{id:"edge",name:"Edge",import:()=>c(()=>Promise.resolve().then(()=>Ss),void 0)},{id:"elixir",name:"Elixir",import:()=>c(()=>Promise.resolve().then(()=>js),void 0)},{id:"elm",name:"Elm",import:()=>c(()=>Promise.resolve().then(()=>$s),void 0)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>c(()=>Promise.resolve().then(()=>Ps),void 0)},{id:"erb",name:"ERB",import:()=>c(()=>Promise.resolve().then(()=>Ks),void 0)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>c(()=>Promise.resolve().then(()=>Js),void 0)},{id:"fennel",name:"Fennel",import:()=>c(()=>Promise.resolve().then(()=>ec),void 0)},{id:"fish",name:"Fish",import:()=>c(()=>Promise.resolve().then(()=>ac),void 0)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>c(()=>Promise.resolve().then(()=>oc),void 0)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>c(()=>Promise.resolve().then(()=>dc),void 0)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>c(()=>Promise.resolve().then(()=>cc),void 0)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>c(()=>Promise.resolve().then(()=>bc),void 0)},{id:"gdresource",name:"GDResource",import:()=>c(()=>Promise.resolve().then(()=>Cc),void 0)},{id:"gdscript",name:"GDScript",import:()=>c(()=>Promise.resolve().then(()=>wc),void 0)},{id:"gdshader",name:"GDShader",import:()=>c(()=>Promise.resolve().then(()=>hc),void 0)},{id:"genie",name:"Genie",import:()=>c(()=>Promise.resolve().then(()=>vc),void 0)},{id:"gherkin",name:"Gherkin",import:()=>c(()=>Promise.resolve().then(()=>Ic),void 0)},{id:"git-commit",name:"Git Commit Message",import:()=>c(()=>Promise.resolve().then(()=>Sc),void 0)},{id:"git-rebase",name:"Git Rebase Message",import:()=>c(()=>Promise.resolve().then(()=>jc),void 0)},{id:"gleam",name:"Gleam",import:()=>c(()=>Promise.resolve().then(()=>$c),void 0)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>c(()=>Promise.resolve().then(()=>Pc),void 0)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>c(()=>Promise.resolve().then(()=>Gc),void 0)},{id:"glsl",name:"GLSL",import:()=>c(()=>Promise.resolve().then(()=>$o),void 0)},{id:"gnuplot",name:"Gnuplot",import:()=>c(()=>Promise.resolve().then(()=>Uc),void 0)},{id:"go",name:"Go",import:()=>c(()=>Promise.resolve().then(()=>Yc),void 0)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>c(()=>Promise.resolve().then(()=>tA),void 0)},{id:"groovy",name:"Groovy",import:()=>c(()=>Promise.resolve().then(()=>rA),void 0)},{id:"hack",name:"Hack",import:()=>c(()=>Promise.resolve().then(()=>sA),void 0)},{id:"haml",name:"Ruby Haml",import:()=>c(()=>Promise.resolve().then(()=>lA),void 0)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>c(()=>Promise.resolve().then(()=>gA),void 0)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>c(()=>Promise.resolve().then(()=>hA),void 0)},{id:"haxe",name:"Haxe",import:()=>c(()=>Promise.resolve().then(()=>wA),void 0)},{id:"hcl",name:"HashiCorp HCL",import:()=>c(()=>Promise.resolve().then(()=>CA),void 0)},{id:"hjson",name:"Hjson",import:()=>c(()=>Promise.resolve().then(()=>vA),void 0)},{id:"hlsl",name:"HLSL",import:()=>c(()=>Promise.resolve().then(()=>QA),void 0)},{id:"html",name:"HTML",import:()=>c(()=>Promise.resolve().then(()=>jr),void 0)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>c(()=>Promise.resolve().then(()=>Is),void 0)},{id:"http",name:"HTTP",import:()=>c(()=>Promise.resolve().then(()=>FA),void 0)},{id:"hxml",name:"HXML",import:()=>c(()=>Promise.resolve().then(()=>NA),void 0)},{id:"hy",name:"Hy",import:()=>c(()=>Promise.resolve().then(()=>RA),void 0)},{id:"imba",name:"Imba",import:()=>c(()=>Promise.resolve().then(()=>qA),void 0)},{id:"ini",name:"INI",aliases:["properties"],import:()=>c(()=>Promise.resolve().then(()=>TA),void 0)},{id:"java",name:"Java",import:()=>c(()=>Promise.resolve().then(()=>ri),void 0)},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>c(()=>Promise.resolve().then(()=>Fr),void 0)},{id:"jinja",name:"Jinja",import:()=>c(()=>Promise.resolve().then(()=>KA),void 0)},{id:"jison",name:"Jison",import:()=>c(()=>Promise.resolve().then(()=>JA),void 0)},{id:"json",name:"JSON",import:()=>c(()=>Promise.resolve().then(()=>ci),void 0)},{id:"json5",name:"JSON5",import:()=>c(()=>Promise.resolve().then(()=>el),void 0)},{id:"jsonc",name:"JSON with Comments",import:()=>c(()=>Promise.resolve().then(()=>al),void 0)},{id:"jsonl",name:"JSON Lines",import:()=>c(()=>Promise.resolve().then(()=>ol),void 0)},{id:"jsonnet",name:"Jsonnet",import:()=>c(()=>Promise.resolve().then(()=>Al),void 0)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>c(()=>Promise.resolve().then(()=>pl),void 0)},{id:"jsx",name:"JSX",import:()=>c(()=>Promise.resolve().then(()=>Jc),void 0)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>c(()=>Promise.resolve().then(()=>yl),void 0)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>c(()=>Promise.resolve().then(()=>_l),void 0)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>c(()=>Promise.resolve().then(()=>El),void 0)},{id:"latex",name:"LaTeX",import:()=>c(()=>Promise.resolve().then(()=>Dl),void 0)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>c(()=>Promise.resolve().then(()=>zl),void 0)},{id:"less",name:"Less",import:()=>c(()=>Promise.resolve().then(()=>jl),void 0)},{id:"liquid",name:"Liquid",import:()=>c(()=>Promise.resolve().then(()=>$l),void 0)},{id:"log",name:"Log file",import:()=>c(()=>Promise.resolve().then(()=>Pl),void 0)},{id:"logo",name:"Logo",import:()=>c(()=>Promise.resolve().then(()=>Gl),void 0)},{id:"lua",name:"Lua",import:()=>c(()=>Promise.resolve().then(()=>Ts),void 0)},{id:"luau",name:"Luau",import:()=>c(()=>Promise.resolve().then(()=>Ul),void 0)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>c(()=>Promise.resolve().then(()=>Wl),void 0)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>c(()=>Promise.resolve().then(()=>mc),void 0)},{id:"marko",name:"Marko",import:()=>c(()=>Promise.resolve().then(()=>Xl),void 0)},{id:"matlab",name:"MATLAB",import:()=>c(()=>Promise.resolve().then(()=>nd),void 0)},{id:"mdc",name:"MDC",import:()=>c(()=>Promise.resolve().then(()=>id),void 0)},{id:"mdx",name:"MDX",import:()=>c(()=>Promise.resolve().then(()=>cd),void 0)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>c(()=>Promise.resolve().then(()=>dd),void 0)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>c(()=>Promise.resolve().then(()=>ud),void 0)},{id:"mojo",name:"Mojo",import:()=>c(()=>Promise.resolve().then(()=>fd),void 0)},{id:"move",name:"Move",import:()=>c(()=>Promise.resolve().then(()=>wd),void 0)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>c(()=>Promise.resolve().then(()=>Cd),void 0)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>c(()=>Promise.resolve().then(()=>vd),void 0)},{id:"nginx",name:"Nginx",import:()=>c(()=>Promise.resolve().then(()=>Id),void 0)},{id:"nim",name:"Nim",import:()=>c(()=>Promise.resolve().then(()=>Sd),void 0)},{id:"nix",name:"Nix",import:()=>c(()=>Promise.resolve().then(()=>jd),void 0)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>c(()=>Promise.resolve().then(()=>$d),void 0)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>c(()=>Promise.resolve().then(()=>Pd),void 0)},{id:"objective-cpp",name:"Objective-C++",import:()=>c(()=>Promise.resolve().then(()=>Gd),void 0)},{id:"ocaml",name:"OCaml",import:()=>c(()=>Promise.resolve().then(()=>Ud),void 0)},{id:"pascal",name:"Pascal",import:()=>c(()=>Promise.resolve().then(()=>Wd),void 0)},{id:"perl",name:"Perl",import:()=>c(()=>Promise.resolve().then(()=>Xd),void 0)},{id:"php",name:"PHP",import:()=>c(()=>Promise.resolve().then(()=>tp),void 0)},{id:"plsql",name:"PL/SQL",import:()=>c(()=>Promise.resolve().then(()=>rp),void 0)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>c(()=>Promise.resolve().then(()=>sp),void 0)},{id:"postcss",name:"PostCSS",import:()=>c(()=>Promise.resolve().then(()=>xi),void 0)},{id:"powerquery",name:"PowerQuery",import:()=>c(()=>Promise.resolve().then(()=>lp),void 0)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>c(()=>Promise.resolve().then(()=>mp),void 0)},{id:"prisma",name:"Prisma",import:()=>c(()=>Promise.resolve().then(()=>bp),void 0)},{id:"prolog",name:"Prolog",import:()=>c(()=>Promise.resolve().then(()=>yp),void 0)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>c(()=>Promise.resolve().then(()=>_p),void 0)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>c(()=>Promise.resolve().then(()=>Ep),void 0)},{id:"puppet",name:"Puppet",import:()=>c(()=>Promise.resolve().then(()=>Qp),void 0)},{id:"purescript",name:"PureScript",import:()=>c(()=>Promise.resolve().then(()=>Fp),void 0)},{id:"python",name:"Python",aliases:["py"],import:()=>c(()=>Promise.resolve().then(()=>ul),void 0)},{id:"qml",name:"QML",import:()=>c(()=>Promise.resolve().then(()=>Np),void 0)},{id:"qmldir",name:"QML Directory",import:()=>c(()=>Promise.resolve().then(()=>Rp),void 0)},{id:"qss",name:"Qt Style Sheets",import:()=>c(()=>Promise.resolve().then(()=>qp),void 0)},{id:"r",name:"R",import:()=>c(()=>Promise.resolve().then(()=>bl),void 0)},{id:"racket",name:"Racket",import:()=>c(()=>Promise.resolve().then(()=>Tp),void 0)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>c(()=>Promise.resolve().then(()=>Hp),void 0)},{id:"razor",name:"ASP.NET Razor",import:()=>c(()=>Promise.resolve().then(()=>Yp),void 0)},{id:"reg",name:"Windows Registry Script",import:()=>c(()=>Promise.resolve().then(()=>Vp),void 0)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>c(()=>Promise.resolve().then(()=>Lo),void 0)},{id:"rel",name:"Rel",import:()=>c(()=>Promise.resolve().then(()=>tm),void 0)},{id:"riscv",name:"RISC-V",import:()=>c(()=>Promise.resolve().then(()=>rm),void 0)},{id:"rst",name:"reStructuredText",import:()=>c(()=>Promise.resolve().then(()=>sm),void 0)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>c(()=>Promise.resolve().then(()=>Os),void 0)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>c(()=>Promise.resolve().then(()=>lm),void 0)},{id:"sas",name:"SAS",import:()=>c(()=>Promise.resolve().then(()=>mm),void 0)},{id:"sass",name:"Sass",import:()=>c(()=>Promise.resolve().then(()=>bm),void 0)},{id:"scala",name:"Scala",import:()=>c(()=>Promise.resolve().then(()=>ym),void 0)},{id:"scheme",name:"Scheme",import:()=>c(()=>Promise.resolve().then(()=>_m),void 0)},{id:"scss",name:"SCSS",import:()=>c(()=>Promise.resolve().then(()=>Tr),void 0)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>c(()=>Promise.resolve().then(()=>Em),void 0)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>c(()=>Promise.resolve().then(()=>Go),void 0)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>c(()=>Promise.resolve().then(()=>Qm),void 0)},{id:"smalltalk",name:"Smalltalk",import:()=>c(()=>Promise.resolve().then(()=>Fm),void 0)},{id:"solidity",name:"Solidity",import:()=>c(()=>Promise.resolve().then(()=>Nm),void 0)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>c(()=>Promise.resolve().then(()=>Rm),void 0)},{id:"sparql",name:"SPARQL",import:()=>c(()=>Promise.resolve().then(()=>Zm),void 0)},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>c(()=>Promise.resolve().then(()=>Om),void 0)},{id:"sql",name:"SQL",import:()=>c(()=>Promise.resolve().then(()=>Xi),void 0)},{id:"ssh-config",name:"SSH Config",import:()=>c(()=>Promise.resolve().then(()=>Km),void 0)},{id:"stata",name:"Stata",import:()=>c(()=>Promise.resolve().then(()=>Jm),void 0)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>c(()=>Promise.resolve().then(()=>eu),void 0)},{id:"svelte",name:"Svelte",import:()=>c(()=>Promise.resolve().then(()=>au),void 0)},{id:"swift",name:"Swift",import:()=>c(()=>Promise.resolve().then(()=>ou),void 0)},{id:"system-verilog",name:"SystemVerilog",import:()=>c(()=>Promise.resolve().then(()=>Au),void 0)},{id:"systemd",name:"Systemd Units",import:()=>c(()=>Promise.resolve().then(()=>pu),void 0)},{id:"tasl",name:"Tasl",import:()=>c(()=>Promise.resolve().then(()=>gu),void 0)},{id:"tcl",name:"Tcl",import:()=>c(()=>Promise.resolve().then(()=>hu),void 0)},{id:"templ",name:"Templ",import:()=>c(()=>Promise.resolve().then(()=>ku),void 0)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>c(()=>Promise.resolve().then(()=>Bu),void 0)},{id:"tex",name:"TeX",import:()=>c(()=>Promise.resolve().then(()=>xl),void 0)},{id:"toml",name:"TOML",import:()=>c(()=>Promise.resolve().then(()=>xu),void 0)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>c(()=>Promise.resolve().then(()=>qu),void 0)},{id:"tsv",name:"TSV",import:()=>c(()=>Promise.resolve().then(()=>Tu),void 0)},{id:"tsx",name:"TSX",import:()=>c(()=>Promise.resolve().then(()=>Xc),void 0)},{id:"turtle",name:"Turtle",import:()=>c(()=>Promise.resolve().then(()=>Mm),void 0)},{id:"twig",name:"Twig",import:()=>c(()=>Promise.resolve().then(()=>Hu),void 0)},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>c(()=>Promise.resolve().then(()=>Ei),void 0)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>c(()=>Promise.resolve().then(()=>Yu),void 0)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>c(()=>Promise.resolve().then(()=>Vu),void 0)},{id:"v",name:"V",import:()=>c(()=>Promise.resolve().then(()=>tg),void 0)},{id:"vala",name:"Vala",import:()=>c(()=>Promise.resolve().then(()=>rg),void 0)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>c(()=>Promise.resolve().then(()=>sg),void 0)},{id:"verilog",name:"Verilog",import:()=>c(()=>Promise.resolve().then(()=>lg),void 0)},{id:"vhdl",name:"VHDL",import:()=>c(()=>Promise.resolve().then(()=>mg),void 0)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>c(()=>Promise.resolve().then(()=>bg),void 0)},{id:"vue",name:"Vue",import:()=>c(()=>Promise.resolve().then(()=>vg),void 0)},{id:"vue-html",name:"Vue HTML",import:()=>c(()=>Promise.resolve().then(()=>Ig),void 0)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>c(()=>Promise.resolve().then(()=>Sg),void 0)},{id:"wasm",name:"WebAssembly",import:()=>c(()=>Promise.resolve().then(()=>jg),void 0)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>c(()=>Promise.resolve().then(()=>$g),void 0)},{id:"wgsl",name:"WGSL",import:()=>c(()=>Promise.resolve().then(()=>Pg),void 0)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>c(()=>Promise.resolve().then(()=>Gg),void 0)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>c(()=>Promise.resolve().then(()=>Ug),void 0)},{id:"xml",name:"XML",import:()=>c(()=>Promise.resolve().then(()=>oi),void 0)},{id:"xsl",name:"XSL",import:()=>c(()=>Promise.resolve().then(()=>Wg),void 0)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>c(()=>Promise.resolve().then(()=>pA),void 0)},{id:"zenscript",name:"ZenScript",import:()=>c(()=>Promise.resolve().then(()=>Xg),void 0)},{id:"zig",name:"Zig",import:()=>c(()=>Promise.resolve().then(()=>nb),void 0)}],xn=Object.fromEntries(Qt.map(t=>[t.id,t.import])),Qn=Object.fromEntries(Qt.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(n=>[n,t.import]))||[]})),It={...xn,...Qn},In=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>rb),void 0)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ob),void 0)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>cb),void 0)},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>lb),void 0)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>c(()=>Promise.resolve().then(()=>pb),void 0)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ub),void 0)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>bb),void 0)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>hb),void 0)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>wb),void 0)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>_b),void 0)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Bb),void 0)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>vb),void 0)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Qb),void 0)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Db),void 0)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Sb),void 0)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Nb),void 0)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Lb),void 0)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>c(()=>Promise.resolve().then(()=>$b),void 0)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>c(()=>Promise.resolve().then(()=>qb),void 0)},{id:"houston",displayName:"Houston",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Zb),void 0)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Gb),void 0)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Hb),void 0)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Kb),void 0)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Wb),void 0)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Vb),void 0)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>ef),void 0)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>nf),void 0)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>rf),void 0)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>sf),void 0)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Af),void 0)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>df),void 0)},{id:"nord",displayName:"Nord",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>mf),void 0)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>gf),void 0)},{id:"one-light",displayName:"One Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>ff),void 0)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>yf),void 0)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>kf),void 0)},{id:"red",displayName:"Red",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Cf),void 0)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Ef),void 0)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>c(()=>Promise.resolve().then(()=>xf),void 0)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>If),void 0)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Ff),void 0)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>c(()=>Promise.resolve().then(()=>zf),void 0)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>jf),void 0)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Rf),void 0)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Mf),void 0)},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Pf),void 0)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Tf),void 0)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Of),void 0)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Uf),void 0)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>c(()=>Promise.resolve().then(()=>Yf),void 0)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>c(()=>Promise.resolve().then(()=>Jf),void 0)}],Dn=Object.fromEntries(In.map(t=>[t.id,t.import]));let P=class extends Error{constructor(e){super(e),this.name="ShikiError"}},Je=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Fn(){return 2147483648}function Sn(){return typeof performance<"u"?performance.now():Date.now()}const zn=(t,e)=>t+(e-t%e)%e;async function Nn(t){let e,n;const a={};function r(d){n=d,a.HEAPU8=new Uint8Array(d),a.HEAPU32=new Uint32Array(d)}function i(d,g,w){a.HEAPU8.copyWithin(d,g,g+w)}function o(d){try{return e.grow(d-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}function A(d){const g=a.HEAPU8.length;d=d>>>0;const w=Fn();if(d>w)return!1;for(let f=1;f<=4;f*=2){let b=g*(1+.2/f);b=Math.min(b,d+100663296);const h=Math.min(w,zn(Math.max(d,b),65536));if(o(h))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(d,g,w=1024){const f=g+w;let b=g;for(;d[b]&&!(b>=f);)++b;if(b-g>16&&d.buffer&&s)return s.decode(d.subarray(g,b));let h="";for(;g<b;){let y=d[g++];if(!(y&128)){h+=String.fromCharCode(y);continue}const _=d[g++]&63;if((y&224)===192){h+=String.fromCharCode((y&31)<<6|_);continue}const B=d[g++]&63;if((y&240)===224?y=(y&15)<<12|_<<6|B:y=(y&7)<<18|_<<12|B<<6|d[g++]&63,y<65536)h+=String.fromCharCode(y);else{const F=y-65536;h+=String.fromCharCode(55296|F>>10,56320|F&1023)}}return h}function m(d,g){return d?l(a.HEAPU8,d,g):""}const p={emscripten_get_now:Sn,emscripten_memcpy_big:i,emscripten_resize_heap:A,fd_write:()=>0};async function u(){const g=await t({env:p,wasi_snapshot_preview1:p});e=g.memory,r(e.buffer),Object.assign(a,g),a.UTF8ToString=m}return await u(),a}let Q=null;function jn(t){throw new Je(t.UTF8ToString(t.getLastOnigError()))}class xe{constructor(e){v(this,"utf16Length");v(this,"utf8Length");v(this,"utf16Value");v(this,"utf8Value");v(this,"utf16OffsetToUtf8");v(this,"utf8OffsetToUtf16");const n=e.length,a=xe._utf8ByteLength(e),r=a!==n,i=r?new Uint32Array(n+1):null;r&&(i[n]=a);const o=r?new Uint32Array(a+1):null;r&&(o[a]=n);const A=new Uint8Array(a);let s=0;for(let l=0;l<n;l++){const m=e.charCodeAt(l);let p=m,u=!1;if(m>=55296&&m<=56319&&l+1<n){const d=e.charCodeAt(l+1);d>=56320&&d<=57343&&(p=(m-55296<<10)+65536|d-56320,u=!0)}r&&(i[l]=s,u&&(i[l+1]=s),p<=127?o[s+0]=l:p<=2047?(o[s+0]=l,o[s+1]=l):p<=65535?(o[s+0]=l,o[s+1]=l,o[s+2]=l):(o[s+0]=l,o[s+1]=l,o[s+2]=l,o[s+3]=l)),p<=127?A[s++]=p:p<=2047?(A[s++]=192|(p&1984)>>>6,A[s++]=128|(p&63)>>>0):p<=65535?(A[s++]=224|(p&61440)>>>12,A[s++]=128|(p&4032)>>>6,A[s++]=128|(p&63)>>>0):(A[s++]=240|(p&1835008)>>>18,A[s++]=128|(p&258048)>>>12,A[s++]=128|(p&4032)>>>6,A[s++]=128|(p&63)>>>0),u&&l++}this.utf16Length=n,this.utf8Length=a,this.utf16Value=e,this.utf8Value=A,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let a=0,r=e.length;a<r;a++){const i=e.charCodeAt(a);let o=i,A=!1;if(i>=55296&&i<=56319&&a+1<r){const s=e.charCodeAt(a+1);s>=56320&&s<=57343&&(o=(i-55296<<10)+65536|s-56320,A=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,A&&a++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const S=class S{constructor(e){v(this,"id",++S.LAST_ID);v(this,"_onigBinding");v(this,"content");v(this,"utf16Length");v(this,"utf8Length");v(this,"utf16OffsetToUtf8");v(this,"utf8OffsetToUtf16");v(this,"ptr");if(!Q)throw new Je("Must invoke loadWasm first.");this._onigBinding=Q,this.content=e;const n=new xe(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!S._sharedPtrInUse?(S._sharedPtr||(S._sharedPtr=Q.omalloc(1e4)),S._sharedPtrInUse=!0,Q.HEAPU8.set(n.utf8Value,S._sharedPtr),this.ptr=S._sharedPtr):this.ptr=n.createString(Q)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===S._sharedPtr?S._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};v(S,"LAST_ID",0),v(S,"_sharedPtr",0),v(S,"_sharedPtrInUse",!1);let be=S;class Ln{constructor(e){v(this,"_onigBinding");v(this,"_ptr");if(!Q)throw new Je("Must invoke loadWasm first.");const n=[],a=[];for(let A=0,s=e.length;A<s;A++){const l=new xe(e[A]);n[A]=l.createString(Q),a[A]=l.utf8Length}const r=Q.omalloc(4*e.length);Q.HEAPU32.set(n,r/4);const i=Q.omalloc(4*e.length);Q.HEAPU32.set(a,i/4);const o=Q.createOnigScanner(r,i,e.length);for(let A=0,s=e.length;A<s;A++)Q.ofree(n[A]);Q.ofree(i),Q.ofree(r),o===0&&jn(Q),this._onigBinding=Q,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,a){let r=0;if(typeof a=="number"&&(r=a),typeof e=="string"){e=new be(e);const i=this._findNextMatchSync(e,n,!1,r);return e.dispose(),i}return this._findNextMatchSync(e,n,!1,r)}_findNextMatchSync(e,n,a,r){const i=this._onigBinding,o=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),r);if(o===0)return null;const A=i.HEAPU32;let s=o/4;const l=A[s++],m=A[s++],p=[];for(let u=0;u<m;u++){const d=e.convertUtf8OffsetToUtf16(A[s++]),g=e.convertUtf8OffsetToUtf16(A[s++]);p[u]={start:d,end:g,length:g-d}}return{index:l,captureIndices:p}}}function Rn(t){return typeof t.instantiator=="function"}function $n(t){return typeof t.default=="function"}function Mn(t){return typeof t.data<"u"}function qn(t){return typeof Response<"u"&&t instanceof Response}function Pn(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let de;function Zn(t){if(de)return de;async function e(){Q=await Nn(async n=>{let a=t;return a=await a,typeof a=="function"&&(a=await a(n)),typeof a=="function"&&(a=await a(n)),Rn(a)?a=await a.instantiator(n):$n(a)?a=await a.default(n):(Mn(a)&&(a=a.data),qn(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await Tn(a)(n):a=await Gn(a)(n):Pn(a)?a=await $e(a)(n):a instanceof WebAssembly.Module?a=await $e(a)(n):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await $e(a.default)(n))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return de=e(),de}function $e(t){return e=>WebAssembly.instantiate(t,e)}function Tn(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Gn(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}let On;function Hn(){return On}async function Dt(t){return t&&await Zn(t),{createScanner(e){return new Ln(e)},createString(e){return new be(e)}}}function Un(t){return Ve(t)}function Ve(t){return Array.isArray(t)?Kn(t):typeof t=="object"?Yn(t):t}function Kn(t){let e=[];for(let n=0,a=t.length;n<a;n++)e[n]=Ve(t[n]);return e}function Yn(t){let e={};for(let n in t)e[n]=Ve(t[n]);return e}function Ft(t,...e){return e.forEach(n=>{for(let a in n)t[a]=n[a]}),t}function St(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?St(t.substring(0,t.length-1)):t.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(t){return t===null?!1:(Me.lastIndex=0,Me.test(t))}static replaceCaptures(t,e,n){return t.replace(Me,(a,r,i,o)=>{let A=n[parseInt(r||i,10)];if(A){let s=e.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(o){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return a})}};function zt(t,e){return t<e?-1:t>e?1:0}function Nt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,a=e.length;if(n===a){for(let r=0;r<n;r++){let i=zt(t[r],e[r]);if(i!==0)return i}return 0}return n-a}function pt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Lt=class{constructor(t){this.fn=t,this.cache=new Map}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},fe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n,this._cachedMatchRoot=new Lt(a=>this._root.match(a))}static createFromRawTheme(t,e){return this.createFromParsedTheme(Vn(t),e)}static createFromParsedTheme(t,e){return ea(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,a=this._cachedMatchRoot.get(e).find(r=>Wn(t.parent,r.parentScopes));return a?new Rt(a.fontStyle,a.foreground,a.background):null}},qe=class ue{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const a of n)e=new ue(e,a);return e}static from(...e){let n=null;for(let a=0;a<e.length;a++)n=new ue(n,e[a]);return n}push(e){return new ue(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let a=this;for(;a&&a!==e;)n.push(a.scopeName),a=a.parent;return a===e?n.reverse():void 0}};function Wn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let a=e[n],r=!1;if(a===">"){if(n===e.length-1)return!1;a=e[++n],r=!0}for(;t&&!Jn(t.scopeName,a);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Jn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Rt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Vn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],a=0;for(let r=0,i=e.length;r<i;r++){let o=e[r];if(!o.settings)continue;let A;if(typeof o.scope=="string"){let p=o.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),A=p.split(",")}else Array.isArray(o.scope)?A=o.scope:A=[""];let s=-1;if(typeof o.settings.fontStyle=="string"){s=0;let p=o.settings.fontStyle.split(" ");for(let u=0,d=p.length;u<d;u++)switch(p[u]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let l=null;typeof o.settings.foreground=="string"&&pt(o.settings.foreground)&&(l=o.settings.foreground);let m=null;typeof o.settings.background=="string"&&pt(o.settings.background)&&(m=o.settings.background);for(let p=0,u=A.length;p<u;p++){let g=A[p].trim().split(" "),w=g[g.length-1],f=null;g.length>1&&(f=g.slice(0,g.length-1),f.reverse()),n[a++]=new Xn(w,f,r,s,l,m)}}return n}var Xn=class{constructor(t,e,n,a,r,i){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=a,this.foreground=r,this.background=i}},q=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(q||{});function ea(t,e){t.sort((s,l)=>{let m=zt(s.scope,l.scope);return m!==0||(m=Nt(s.parentScopes,l.parentScopes),m!==0)?m:s.index-l.index});let n=0,a="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let s=t.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(a=s.foreground),s.background!==null&&(r=s.background)}let i=new ta(e),o=new Rt(n,i.getId(a),i.getId(r)),A=new aa(new Ze(0,null,-1,0,0),[]);for(let s=0,l=t.length;s<l;s++){let m=t[s];A.insert(0,m.scope,m.parentScopes,m.fontStyle,i.getId(m.foreground),i.getId(m.background))}return new fe(i,o,A)}var ta=class{constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},na=Object.freeze([]),Ze=class $t{constructor(e,n,a,r,i){this.scopeDepth=e,this.parentScopes=n||na,this.fontStyle=a,this.foreground=r,this.background=i}clone(){return new $t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let a=0,r=e.length;a<r;a++)n[a]=e[a].clone();return n}acceptOverwrite(e,n,a,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),a!==0&&(this.foreground=a),r!==0&&(this.background=r)}},aa=class Te{constructor(e,n=[],a={}){this._mainRule=e,this._children=a,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let a=0,r=0;for(;e.parentScopes[a]===">"&&a++,n.parentScopes[r]===">"&&r++,!(a>=e.parentScopes.length||r>=n.parentScopes.length);){const i=n.parentScopes[r].length-e.parentScopes[a].length;if(i!==0)return i;a++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),r,i;if(a===-1?(r=e,i=""):(r=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(r))return this._children[r].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Te._cmpBySpecificity),n}insert(e,n,a,r,i,o){if(n===""){this._doInsertHere(e,a,r,i,o);return}let A=n.indexOf("."),s,l;A===-1?(s=n,l=""):(s=n.substring(0,A),l=n.substring(A+1));let m;this._children.hasOwnProperty(s)?m=this._children[s]:(m=new Te(this._mainRule.clone(),Ze.cloneArr(this._rulesWithParentScopes)),this._children[s]=m),m.insert(e+1,l,a,r,i,o)}_doInsertHere(e,n,a,r,i){if(n===null){this._mainRule.acceptOverwrite(e,a,r,i);return}for(let o=0,A=this._rulesWithParentScopes.length;o<A;o++){let s=this._rulesWithParentScopes[o];if(Nt(s.parentScopes,n)===0){s.acceptOverwrite(e,a,r,i);return}}a===-1&&(a=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ze(e,n,a,r,i))}},Y=class j{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=j.getLanguageId(e),a=j.getTokenType(e),r=j.getFontStyle(e),i=j.getForeground(e),o=j.getBackground(e);console.log({languageId:n,tokenType:a,fontStyle:r,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,a,r,i,o,A){let s=j.getLanguageId(e),l=j.getTokenType(e),m=j.containsBalancedBrackets(e)?1:0,p=j.getFontStyle(e),u=j.getForeground(e),d=j.getBackground(e);return n!==0&&(s=n),a!==8&&(l=a),r!==null&&(m=r?1:0),i!==-1&&(p=i),o!==0&&(u=o),A!==0&&(d=A),(s<<0|l<<8|m<<10|p<<11|u<<15|d<<24)>>>0}};function he(t,e){const n=[],a=ra(t);let r=a.next();for(;r!==null;){let s=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=a.next()}let l=o();if(n.push({matcher:l,priority:s}),r!==",")break;r=a.next()}return n;function i(){if(r==="-"){r=a.next();const s=i();return l=>!!s&&!s(l)}if(r==="("){r=a.next();const s=A();return r===")"&&(r=a.next()),s}if(mt(r)){const s=[];do s.push(r),r=a.next();while(mt(r));return l=>e(s,l)}return null}function o(){const s=[];let l=i();for(;l;)s.push(l),l=i();return m=>s.every(p=>p(m))}function A(){const s=[];let l=o();for(;l&&(s.push(l),r==="|"||r===",");){do r=a.next();while(r==="|"||r===",");l=o()}return m=>s.some(p=>p(m))}}function mt(t){return!!t&&!!t.match(/[\w\.:]+/)}function ra(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const a=n[0];return n=e.exec(t),a}}}function Mt(t){typeof t.dispose=="function"&&t.dispose()}var ae=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},ia=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},oa=class{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},sa=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ae(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new oa;for(const n of t)ca(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof ae){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function ca(t,e,n,a){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=n.lookup(e);t instanceof ae?ge({baseGrammar:i,selfGrammar:r},a):Ge(t.ruleName,{baseGrammar:i,selfGrammar:r,repository:r.repository},a);const o=n.injections(t.scopeName);if(o)for(const A of o)a.add(new ae(A))}function Ge(t,e,n){if(e.repository&&e.repository[t]){const a=e.repository[t];ye([a],e,n)}}function ge(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,n){for(const a of t){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const r=a.repository?Ft({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&ye(a.patterns,{...e,repository:r},n);const i=a.include;if(!i)continue;const o=qt(i);switch(o.kind){case 0:ge({...e,selfGrammar:e.baseGrammar},n);break;case 1:ge(e,n);break;case 2:Ge(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const A=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(A){const s={baseGrammar:e.baseGrammar,selfGrammar:A,repository:r};o.kind===4?Ge(o.ruleName,s,n):ge(s,n)}else o.kind===4?n.add(new ia(o.scopeName,o.ruleName)):n.add(new ae(o.scopeName));break}}}var Aa=class{constructor(){this.kind=0}},la=class{constructor(){this.kind=1}},da=class{constructor(t){this.ruleName=t,this.kind=2}},pa=class{constructor(t){this.scopeName=t,this.kind=3}},ma=class{constructor(t,e){this.scopeName=t,this.ruleName=e,this.kind=4}};function qt(t){if(t==="$base")return new Aa;if(t==="$self")return new la;const e=t.indexOf("#");if(e===-1)return new pa(t);if(e===0)return new da(t.substring(1));{const n=t.substring(0,e),a=t.substring(e+1);return new ma(n,a)}}var ua=/\\(\d+)/,ut=/\\(\d+)/g,ga=-1,Pt=-2;var se=class{constructor(t,e,n,a){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${St(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:pe.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,t,e)}},ba=class extends se{constructor(t,e,n,a,r){super(t,e,n,a),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,a){throw new Error("Not supported!")}},fa=class extends se{constructor(t,e,n,a,r){super(t,e,n,null),this._match=new re(a,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends se{constructor(t,e,n,a,r){super(t,e,n,a),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ie,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Oe=class extends se{constructor(t,e,n,a,r,i,o,A,s,l){super(t,e,n,a),this._begin=new re(r,this.id),this.beginCaptures=i,this._end=new re(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!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(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,a)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const n of this.patterns)t.getRule(n).collectPatterns(t,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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},we=class extends se{constructor(t,e,n,a,r,i,o,A,s){super(t,e,n,a),this._begin=new re(r,this.id),this.beginCaptures=i,this.whileCaptures=A,this._while=new re(o,Pt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,a){return this._getCachedCompiledPatterns(t).compileAG(t,n,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ie;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,a){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,a)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ie,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Zt=class I{static createCaptureRule(e,n,a,r,i){return e.registerRule(o=>new ba(n,o,a,r,i))}static getCompiledRuleId(e,n,a){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new fa(e.$vscodeTextmateLocation,e.id,e.name,e.match,I._compileCaptures(e.captures,n,a));if(typeof e.begin>"u"){e.repository&&(a=Ft({},a,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,I._compilePatterns(i,n,a))}return e.while?new we(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,a),e.while,I._compileCaptures(e.whileCaptures||e.captures,n,a),I._compilePatterns(e.patterns,n,a)):new Oe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,a),e.end,I._compileCaptures(e.endCaptures||e.captures,n,a),e.applyEndPatternLast,I._compilePatterns(e.patterns,n,a))}),e.id}static _compileCaptures(e,n,a){let r=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const A=parseInt(o,10);A>i&&(i=A)}for(let o=0;o<=i;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const A=parseInt(o,10);let s=0;e[o].patterns&&(s=I.getCompiledRuleId(e[o],n,a)),r[A]=I.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,s)}}return r}static _compilePatterns(e,n,a){let r=[];if(e)for(let i=0,o=e.length;i<o;i++){const A=e[i];let s=-1;if(A.include){const l=qt(A.include);switch(l.kind){case 0:case 1:s=I.getCompiledRuleId(a[A.include],n,a);break;case 2:let m=a[l.ruleName];m&&(s=I.getCompiledRuleId(m,n,a));break;case 3:case 4:const p=l.scopeName,u=l.kind===4?l.ruleName:null,d=n.getExternalGrammar(p,a);if(d)if(u){let g=d.repository[u];g&&(s=I.getCompiledRuleId(g,n,d.repository))}else s=I.getCompiledRuleId(d.repository.$self,n,d.repository);break}}else s=I.getCompiledRuleId(A,n,a);if(s!==-1){const l=n.getRule(s);let m=!1;if((l instanceof gt||l instanceof Oe||l instanceof we)&&l.hasMissingPatterns&&l.patterns.length===0&&(m=!0),m)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},re=class Tt{constructor(e,n){if(e){const a=e.length;let r=0,i=[],o=!1;for(let A=0;A<a;A++)if(e.charAt(A)==="\\"&&A+1<a){const l=e.charAt(A+1);l==="z"?(i.push(e.substring(r,A)),i.push("$(?!\\n)(?<!\\n)"),r=A+2):(l==="A"||l==="G")&&(o=!0),A++}this.hasAnchor=o,r===0?this.source=e:(i.push(e.substring(r,a)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,this.hasBackReferences=ua.test(this.source)}clone(){return new Tt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){let a=n.map(r=>e.substring(r.start,r.end));return ut.lastIndex=0,this.source.replace(ut,(r,i)=>jt(a[parseInt(i,10)]||""))}_buildAnchorCache(){let e=[],n=[],a=[],r=[],i,o,A,s;for(i=0,o=this.source.length;i<o;i++)A=this.source.charAt(i),e[i]=A,n[i]=A,a[i]=A,r[i]=A,A==="\\"&&i+1<o&&(s=this.source.charAt(i+1),s==="A"?(e[i+1]="",n[i+1]="",a[i+1]="A",r[i+1]="A"):s==="G"?(e[i+1]="",n[i+1]="G",a[i+1]="",r[i+1]="G"):(e[i+1]=s,n[i+1]=s,a[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:a.join(""),A1_G1:r.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ie=class{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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new bt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let a=this._items.map(r=>r.resolveAnchors(e,n));return new bt(t,a,this._items.map(r=>r.ruleId))}},bt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
2
|
`)}findNextMatchSync(t,e,n){const a=this.scanner.findNextMatchSync(t,e,n);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},He=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Xe=class Ue{constructor(e,n){this._getBasicScopeAttributes=new Lt(a=>{const r=this._scopeToLanguage(a),i=this._toStandardTokenType(a);return new He(r,i)}),this._defaultAttributes=new He(e,8),this._embeddedLanguagesMatcher=new ya(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ue._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ue.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!")}};Xe._NULL_SCOPE_METADATA=new He(0,0);Xe.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;var ha=Xe,ya=class{constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,a])=>jt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},ft=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Gt(t,e,n,a,r,i,o,A){const s=e.content.length;let l=!1,m=-1;if(o){const d=wa(t,e,n,a,r,i);r=d.stack,a=d.linePos,n=d.isFirstLine,m=d.anchorPosition}const p=Date.now();for(;!l;){if(A!==0&&Date.now()-p>A)return new ft(r,!0);u()}return new ft(r,!1);function u(){const d=ka(t,e,n,a,r,m);if(!d){i.produce(r,s),l=!0;return}const g=d.captureIndices,w=d.matchedRuleId,f=g&&g.length>0?g[0].end>a:!1;if(w===ga){const b=r.getRule(t);i.produce(r,g[0].start),r=r.withContentNameScopesList(r.nameScopesList),te(t,e,n,r,i,b.endCaptures,g),i.produce(r,g[0].end);const h=r;if(r=r.parent,m=h.getAnchorPos(),!f&&h.getEnterPos()===a){r=h,i.produce(r,s),l=!0;return}}else{const b=t.getRule(w);i.produce(r,g[0].start);const h=r,y=b.getName(e.content,g),_=r.contentNameScopesList.pushAttributed(y,t);if(r=r.push(w,a,m,g[0].end===s,null,_,_),b instanceof Oe){const B=b;te(t,e,n,r,i,B.beginCaptures,g),i.produce(r,g[0].end),m=g[0].end;const F=B.getContentName(e.content,g),x=_.pushAttributed(F,t);if(r=r.withContentNameScopesList(x),B.endHasBackReferences&&(r=r.withEndRule(B.getEndWithResolvedBackReferences(e.content,g))),!f&&h.hasSameRuleAs(r)){r=r.pop(),i.produce(r,s),l=!0;return}}else if(b instanceof we){const B=b;te(t,e,n,r,i,B.beginCaptures,g),i.produce(r,g[0].end),m=g[0].end;const F=B.getContentName(e.content,g),x=_.pushAttributed(F,t);if(r=r.withContentNameScopesList(x),B.whileHasBackReferences&&(r=r.withEndRule(B.getWhileWithResolvedBackReferences(e.content,g))),!f&&h.hasSameRuleAs(r)){r=r.pop(),i.produce(r,s),l=!0;return}}else if(te(t,e,n,r,i,b.captures,g),i.produce(r,g[0].end),r=r.pop(),!f){r=r.safePop(),i.produce(r,s),l=!0;return}}g[0].end>a&&(a=g[0].end,n=!1)}}function wa(t,e,n,a,r,i){let o=r.beginRuleCapturedEOL?0:-1;const A=[];for(let s=r;s;s=s.pop()){const l=s.getRule(t);l instanceof we&&A.push({rule:l,stack:s})}for(let s=A.pop();s;s=A.pop()){const{ruleScanner:l,findOptions:m}=Ba(s.rule,t,s.stack.endRule,n,a===o),p=l.findNextMatchSync(e,a,m);if(p){if(p.ruleId!==Pt){r=s.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(i.produce(s.stack,p.captureIndices[0].start),te(t,e,n,s.stack,i,s.rule.whileCaptures,p.captureIndices),i.produce(s.stack,p.captureIndices[0].end),o=p.captureIndices[0].end,p.captureIndices[0].end>a&&(a=p.captureIndices[0].end,n=!1))}else{r=s.stack.pop();break}}return{stack:r,linePos:a,anchorPosition:o,isFirstLine:n}}function ka(t,e,n,a,r,i){const o=_a(t,e,n,a,r,i),A=t.getInjections();if(A.length===0)return o;const s=Ca(A,t,e,n,a,r,i);if(!s)return o;if(!o)return s;const l=o.captureIndices[0].start,m=s.captureIndices[0].start;return m<l||s.priorityMatch&&m===l?s:o}function _a(t,e,n,a,r,i){const o=r.getRule(t),{ruleScanner:A,findOptions:s}=Ot(o,t,r.endRule,n,a===i),l=A.findNextMatchSync(e,a,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Ca(t,e,n,a,r,i,o){let A=Number.MAX_VALUE,s=null,l,m=0;const p=i.contentNameScopesList.getScopeNames();for(let u=0,d=t.length;u<d;u++){const g=t[u];if(!g.matcher(p))continue;const w=e.getRule(g.ruleId),{ruleScanner:f,findOptions:b}=Ot(w,e,null,a,r===o),h=f.findNextMatchSync(n,r,b);if(!h)continue;const y=h.captureIndices[0].start;if(!(y>=A)&&(A=y,s=h.captureIndices,l=h.ruleId,m=g.priority,A===r))break}return s?{priorityMatch:m===-1,captureIndices:s,matchedRuleId:l}:null}function Ot(t,e,n,a,r){return{ruleScanner:t.compileAG(e,n,a,r),findOptions:0}}function Ba(t,e,n,a,r){return{ruleScanner:t.compileWhileAG(e,n,a,r),findOptions:0}}function te(t,e,n,a,r,i,o){if(i.length===0)return;const A=e.content,s=Math.min(i.length,o.length),l=[],m=o[0].end;for(let p=0;p<s;p++){const u=i[p];if(u===null)continue;const d=o[p];if(d.length===0)continue;if(d.start>m)break;for(;l.length>0&&l[l.length-1].endPos<=d.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,d.start):r.produce(a,d.start),u.retokenizeCapturedWithRuleId){const w=u.getName(A,o),f=a.contentNameScopesList.pushAttributed(w,t),b=u.getContentName(A,o),h=f.pushAttributed(b,t),y=a.push(u.retokenizeCapturedWithRuleId,d.start,-1,!1,null,f,h),_=t.createOnigString(A.substring(0,d.end));Gt(t,_,n&&d.start===0,d.start,y,r,!1,0),Mt(_);continue}const g=u.getName(A,o);if(g!==null){const f=(l.length>0?l[l.length-1].scopes:a.contentNameScopesList).pushAttributed(g,t);l.push(new Ea(f,d.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ea=class{constructor(t,e){this.scopes=t,this.endPos=e}};function va(t,e,n,a,r,i,o,A){return new Qa(t,e,n,a,r,i,o,A)}function ht(t,e,n,a,r){const i=he(e,ke),o=Zt.getCompiledRuleId(n,a,r.repository);for(const A of i)t.push({debugSelector:e,matcher:A.matcher,ruleId:o,grammar:r,priority:A.priority})}function ke(t,e){if(e.length<t.length)return!1;let n=0;return t.every(a=>{for(let r=n;r<e.length;r++)if(xa(e[r],a))return n=r+1,!0;return!1})}function xa(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Qa=class{constructor(t,e,n,a,r,i,o,A){if(this._rootScopeName=t,this.balancedBracketSelectors=i,this._onigLib=A,this._basicScopeAttributesProvider=new ha(n,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=yt(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const s of Object.keys(r)){const l=he(s,ke);for(const m of l)this._tokenTypeMatchers.push({matcher:m.matcher,type:r[s]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],n=this._rootScopeName,a=t.lookup(n);if(a){const r=a.injections;if(r)for(let o in r)ht(e,o,r[o],this,a);const i=this._grammarRepository.injections(n);i&&i.forEach(o=>{const A=this.getExternalGrammar(o);if(A){const s=A.injectionSelector;s&&ht(e,s,A,this,A)}})}return e.sort((r,i)=>r.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=yt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const a=this._tokenize(t,e,!1,n);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(t,e,n=0){const a=this._tokenize(t,e,!0,n);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(t,e,n,a){this._rootId===-1&&(this._rootId=Zt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===Ye.NULL){r=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),p=Y.set(0,l.languageId,l.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),u=this.getRule(this._rootId).getName(null,null);let d;u?d=ne.createRootAndLookUpScopeName(u,p,this):d=ne.createRoot("unknown",p),e=new Ye(null,this._rootId,-1,-1,!1,null,d,d)}else r=!1,e.reset();t=t+`
|
|
3
3
|
`;const i=this.createOnigString(t),o=i.content.length,A=new Da(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),s=Gt(this,i,r,0,e,A,!0,a);return Mt(i),{lineLength:o,lineTokens:A,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function yt(t,e){return t=Un(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ne=class L{constructor(e,n,a){this.parent=e,this.scopePath=n,this.tokenAttributes=a}static fromExtension(e,n){let a=e,r=(e==null?void 0:e.scopePath)??null;for(const i of n)r=qe.push(r,i.scopeNames),a=new L(a,r,i.encodedTokenAttributes);return a}static createRoot(e,n){return new L(null,new qe(null,e),n)}static createRootAndLookUpScopeName(e,n,a){const r=a.getMetadataForScope(e),i=new qe(null,e),o=a.themeProvider.themeMatch(i),A=L.mergeAttributes(n,r,o);return new L(null,i,A)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return L.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,a){let r=-1,i=0,o=0;return a!==null&&(r=a.fontStyle,i=a.foregroundId,o=a.backgroundId),Y.set(e,n.languageId,n.tokenType,null,r,i,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return L._pushAttributed(this,e,n);const a=e.split(/ /g);let r=this;for(const i of a)r=L._pushAttributed(r,i,n);return r}static _pushAttributed(e,n,a){const r=a.getMetadataForScope(n),i=e.scopePath.push(n),o=a.themeProvider.themeMatch(i),A=L.mergeAttributes(e.tokenAttributes,r,o);return new L(e,i,A)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var r;const n=[];let a=this;for(;a&&a!==e;)n.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(((r=a.parent)==null?void 0:r.scopePath)??null)}),a=a.parent;return a===e?n.reverse():void 0}},Ke=class K{constructor(e,n,a,r,i,o,A,s){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=A,this.contentNameScopesList=s,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=r}equals(e){return e===null?!1:K._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ne.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){K._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,a,r,i,o,A){return new K(this,e,n,a,r,i,o,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,n){var a,r;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(a=this.nameScopesList)==null?void 0:a.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new K(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,a;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((a=this.contentNameScopesList)==null?void 0:a.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const a=ne.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new K(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,a,ne.fromExtension(a,n.contentNameScopesList))}};Ke.NULL=new Ke(null,0,0,0,!1,null,null,null);var Ye=Ke,Ia=class{constructor(t,e){this.allowAny=!1,this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):he(n,ke).map(a=>a.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>he(n,ke).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Da=class{constructor(t,e,n,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var a;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=(t==null?void 0:t.tokenAttributes)??0,i=!1;if((a=this.balancedBracketSelectors)!=null&&a.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const A of this._tokenTypeOverrides)A.matcher(o)&&(r=Y.set(r,0,A.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Y.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let a=0,r=this._binaryTokens.length;a<r;a++)n[a]=this._binaryTokens[a];return n}},Fa=class{constructor(t,e){this._onigLib=e,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,a,r){if(!this._grammars.has(t)){let i=this._rawGrammars.get(t);if(!i)return null;this._grammars.set(t,va(t,i,e,n,a,r,this,this._onigLib))}return this._grammars.get(t)}},Sa=class{constructor(e){this._options=e,this._syncRegistry=new Fa(fe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(fe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,a){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:a})}loadGrammarWithConfiguration(e,n,a){return this._loadGrammar(e,n,a.embeddedLanguages,a.tokenTypes,new Ia(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,a,r,i){const o=new sa(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(A=>this._loadSingleGrammar(A.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,a,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const a=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,a)}}addGrammar(e,n=[],a=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,a,r)}_grammarForScopeName(e,n=0,a=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,n,a,r,i)}},We=Ye.NULL;function za(t){return Array.isArray(t)?t:[t]}function Qe(t,e=!1){var i;const n=t.split(/(\r?\n)/g);let a=0;const r=[];for(let o=0;o<n.length;o+=2){const A=e?n[o]+(n[o+1]||""):n[o];r.push([A,a]),a+=n[o].length,a+=((i=n[o+1])==null?void 0:i.length)||0}return r}function et(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Ht(t){return t==="ansi"||et(t)}function tt(t){return t==="none"}function Ut(t){return tt(t)}function Kt(t,e){var n;if(!e)return t;t.properties||(t.properties={}),(n=t.properties).class||(n.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const a=Array.isArray(e)?e:e.split(/\s+/g);for(const r of a)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function Na(t,e){let n=0;const a=[];for(const r of e)r>n&&a.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&a.push({...t,content:t.content.slice(n),offset:t.offset+n}),a}function ja(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((a,r)=>a-r);return n.length?t.map(a=>a.flatMap(r=>{const i=n.filter(o=>r.offset<o&&o<r.offset+r.content.length).map(o=>o-r.offset).sort((o,A)=>o-A);return i.length?Na(r,i):r})):t}async function Yt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function _e(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},a=typeof t=="string"?t:t.name;for(const[r,i]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof i=="string"?n[r]=i:r===a&&Object.assign(n,i);return n}function G(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function Wt(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&q.Italic&&(e["font-style"]="italic"),t.fontStyle&q.Bold&&(e["font-weight"]="bold"),t.fontStyle&q.Underline&&(e["text-decoration"]="underline")),e}function La(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function Ra(t){const e=Qe(t,!0).map(([r])=>r);function n(r){if(r===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=r,o=0;for(const A of e){if(i<A.length)break;i-=A.length,o++}return{line:o,character:i}}function a(r,i){let o=0;for(let A=0;A<r;A++)o+=e[A].length;return o+=i,o}return{lines:e,indexToPos:n,posToIndex:a}}class D extends Error{constructor(e){super(e),this.name="ShikiError"}}var $a=Object.defineProperty,Ma=(t,e,n)=>e in t?$a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wt=(t,e,n)=>(Ma(t,typeof e!="symbol"?e+"":e,n),n);const Jt=new WeakMap;function Ie(t,e){Jt.set(t,e)}function oe(t){return Jt.get(t)}class W{constructor(...e){if(wt(this,"_stacks",{}),wt(this,"lang"),e.length===2){const[n,a]=e;this.lang=a,this._stacks=n}else{const[n,a,r]=e;this.lang=a,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new W(Object.fromEntries(za(n).map(a=>[a,We])),e)}getInternalStack(e=this.theme){return this._stacks[e]}get scopes(){return kt(this._stacks[this.theme])}getScopes(e=this.theme){return kt(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function kt(t){const e=[],n=new Set;function a(r){var o;if(n.has(r))return;n.add(r);const i=(o=r==null?void 0:r.nameScopesList)==null?void 0:o.scopeName;i&&e.push(i),r.parent&&a(r.parent)}return a(t),e}function qa(t,e){if(!(t instanceof W))throw new D("Invalid grammar state");return t.getInternalStack(e)}function Pa(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let a=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new D(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const A=r.lines[o.line];if(A===void 0)throw new D(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);if(o.character<0||o.character>A.length)throw new D(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${A.length}`);return{...o,offset:r.posToIndex(o.line,o.character)}}};const r=Ra(n.source),i=(n.options.decorations||[]).map(o=>({...o,start:a(o.start),end:a(o.end)}));Za(i),t.set(n.meta,{decorations:i,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){var o;if(!((o=this.options.decorations)!=null&&o.length))return;const r=e(this).decorations.flatMap(A=>[A.start.offset,A.end.offset]);return ja(n,r)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const a=e(this),r=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(r.length!==a.converter.lines.length)throw new D(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function i(p,u,d,g){const w=r[p];let f="",b=-1,h=-1;if(u===0&&(b=0),d===0&&(h=0),d===Number.POSITIVE_INFINITY&&(h=w.children.length),b===-1||h===-1)for(let _=0;_<w.children.length;_++)f+=Vt(w.children[_]),b===-1&&f.length===u&&(b=_+1),h===-1&&f.length===d&&(h=_+1);if(b===-1)throw new D(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(h===-1)throw new D(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);const y=w.children.slice(b,h);if(!g.alwaysWrap&&y.length===w.children.length)A(w,g,"line");else if(!g.alwaysWrap&&y.length===1&&y[0].type==="element")A(y[0],g,"token");else{const _={type:"element",tagName:"span",properties:{},children:y};A(_,g,"wrapper"),w.children.splice(b,y.length,_)}}function o(p,u){r[p]=A(r[p],u,"line")}function A(p,u,d){var f;const g=u.properties||{},w=u.transform||(b=>b);return p.tagName=u.tagName||"span",p.properties={...p.properties,...g,class:p.properties.class},(f=u.properties)!=null&&f.class&&Kt(p,u.properties.class),p=w(p,d)||p,p}const s=[],l=a.decorations.sort((p,u)=>u.start.offset-p.start.offset);for(const p of l){const{start:u,end:d}=p;if(u.line===d.line)i(u.line,u.character,d.character,p);else if(u.line<d.line){i(u.line,u.character,Number.POSITIVE_INFINITY,p);for(let g=u.line+1;g<d.line;g++)s.unshift(()=>o(g,p));i(d.line,0,d.character,p)}}s.forEach(p=>p())}}}function Za(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let a=e+1;a<t.length;a++){const r=t[a],i=n.start.offset<r.start.offset&&r.start.offset<n.end.offset,o=n.start.offset<r.end.offset&&r.end.offset<n.end.offset,A=r.start.offset<n.start.offset&&n.start.offset<r.end.offset,s=r.start.offset<n.end.offset&&n.end.offset<r.end.offset;if(i||o||A||s){if(o&&o||A&&s)continue;throw new D(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function Vt(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(Vt).join(""):""}const Ta=[Pa()];function Ce(t){return[...t.transformers||[],...Ta]}var O=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Pe={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Ga(t,e){const n=t.indexOf("\x1B[",e);if(n!==-1){const a=t.indexOf("m",n);return{sequence:t.substring(n+2,a).split(";"),startPosition:n,position:a+1}}return{position:t.length}}function _t(t,e){let n=1;const a=t[e+n++];let r;if(a==="2"){const i=[t[e+n++],t[e+n++],t[e+n]].map(o=>Number.parseInt(o));i.length===3&&!i.some(o=>Number.isNaN(o))&&(r={type:"rgb",rgb:i})}else if(a==="5"){const i=Number.parseInt(t[e+n]);Number.isNaN(i)||(r={type:"table",index:Number(i)})}return[n,r]}function Oa(t){const e=[];for(let n=0;n<t.length;n++){const a=t[n],r=Number.parseInt(a);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Pe[r]&&e.push({type:"setDecoration",value:Pe[r]});else if(r<=29){const i=Pe[r-20];i&&e.push({type:"resetDecoration",value:i})}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:O[r-30]}});else if(r===38){const[i,o]=_t(t,n);o&&e.push({type:"setForegroundColor",value:o}),n+=i}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:O[r-40]}});else if(r===48){const[i,o]=_t(t,n);o&&e.push({type:"setBackgroundColor",value:o}),n+=i}else r===49?e.push({type:"resetBackgroundColor"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:O[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:O[r-100+8]}})}return e}function Ha(){let t=null,e=null,n=new Set;return{parse(a){const r=[];let i=0;do{const o=Ga(a,i),A=o.sequence?a.substring(i,o.startPosition):a.substring(i);if(A.length>0&&r.push({value:A,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const s=Oa(o.sequence);for(const l of s)l.type==="resetAll"?(t=null,e=null,n.clear()):l.type==="resetForegroundColor"?t=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of s)l.type==="setForegroundColor"?t=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&n.add(l.value)}i=o.position}while(i<a.length);return r}}}var Ua={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 Ka(t=Ua){function e(A){return t[A]}function n(A){return`#${A.map(s=>Math.max(0,Math.min(s,255)).toString(16).padStart(2,"0")).join("")}`}let a;function r(){if(a)return a;a=[];for(let l=0;l<O.length;l++)a.push(e(O[l]));let A=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let m=0;m<6;m++)for(let p=0;p<6;p++)a.push(n([A[l],A[m],A[p]]));let s=8;for(let l=0;l<24;l++,s+=10)a.push(n([s,s,s]));return a}function i(A){return r()[A]}function o(A){switch(A.type){case"named":return e(A.name);case"rgb":return n(A.rgb);case"table":return i(A.index)}}return{value:o}}function Ya(t,e,n){const a=_e(t,n),r=Qe(e),i=Ka(Object.fromEntries(O.map(A=>{var s;return[A,(s=t.colors)==null?void 0:s[`terminal.ansi${A[0].toUpperCase()}${A.substring(1)}`]]}))),o=Ha();return r.map(A=>o.parse(A[0]).map(s=>{let l,m;s.decorations.has("reverse")?(l=s.background?i.value(s.background):t.bg,m=s.foreground?i.value(s.foreground):t.fg):(l=s.foreground?i.value(s.foreground):t.fg,m=s.background?i.value(s.background):void 0),l=G(l,a),m=G(m,a),s.decorations.has("dim")&&(l=Wa(l));let p=q.None;return s.decorations.has("bold")&&(p|=q.Bold),s.decorations.has("italic")&&(p|=q.Italic),s.decorations.has("underline")&&(p|=q.Underline),{content:s.value,offset:A[1],color:l,bgColor:m,fontStyle:p}}))}function Wa(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const a=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${a}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(a=>`${a}${a}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function nt(t,e,n={}){const{lang:a="text",theme:r=t.getLoadedThemes()[0]}=n;if(et(a)||tt(r))return Qe(e).map(s=>[{content:s[0],offset:s[1]}]);const{theme:i,colorMap:o}=t.setTheme(r);if(a==="ansi")return Ya(i,e,n);const A=t.getLanguage(a);if(n.grammarState){if(n.grammarState.lang!==A.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${A.name}"`);if(!n.grammarState.themes.includes(i.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Va(e,A,i,o,n)}function Ja(...t){if(t.length===2)return oe(t[1]);const[e,n,a={}]=t,{lang:r="text",theme:i=e.getLoadedThemes()[0]}=a;if(et(r)||tt(i))throw new P("Plain language does not have grammar state");if(r==="ansi")throw new P("ANSI language does not have grammar state");const{theme:o,colorMap:A}=e.setTheme(i),s=e.getLanguage(r);return new W(Be(n,s,o,A,a).stateStack,s.name,o.name)}function Va(t,e,n,a,r){const i=Be(t,e,n,a,r),o=new W(Be(t,e,n,a,r).stateStack,e.name,n.name);return Ie(i.tokens,o),i.tokens}function Be(t,e,n,a,r){const i=_e(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:A=500}=r,s=Qe(t);let l=r.grammarState?qa(r.grammarState,n.name)??We:r.grammarContextCode!=null?Be(r.grammarContextCode,e,n,a,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:We,m=[];const p=[];for(let u=0,d=s.length;u<d;u++){const[g,w]=s[u];if(g===""){m=[],p.push([]);continue}if(o>0&&g.length>=o){m=[],p.push([{content:g,offset:w,color:"",fontStyle:0}]);continue}let f,b,h;r.includeExplanation&&(f=e.tokenizeLine(g,l),b=f.tokens,h=0);const y=e.tokenizeLine2(g,l,A),_=y.tokens.length/2;for(let B=0;B<_;B++){const F=y.tokens[2*B],x=B+1<_?y.tokens[2*B+2]:g.length;if(F===x)continue;const $=y.tokens[2*B+1],le=G(a[Y.getForeground($)],i),X=Y.getFontStyle($),Le={content:g.substring(F,x),offset:w+F,color:le,fontStyle:X};if(r.includeExplanation){const lt=[];if(r.includeExplanation!=="scopeName")for(const M of n.settings){let U;switch(typeof M.scope){case"string":U=M.scope.split(/,/).map(Re=>Re.trim());break;case"object":U=M.scope;break;default:continue}lt.push({settings:M,selectors:U.map(Re=>Re.split(/ /))})}Le.explanation=[];let dt=0;for(;F+dt<x;){const M=b[h],U=g.substring(M.startIndex,M.endIndex);dt+=U.length,Le.explanation.push({content:U,scopes:r.includeExplanation==="scopeName"?Xa(M.scopes):er(lt,M.scopes)}),h+=1}}m.push(Le)}p.push(m),m=[],l=y.ruleStack}return{tokens:p,stateStack:l}}function Xa(t){return t.map(e=>({scopeName:e}))}function er(t,e){const n=[];for(let a=0,r=e.length;a<r;a++){const i=e[a];n[a]={scopeName:i,themeMatches:nr(t,i,e.slice(0,a))}}return n}function Ct(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function tr(t,e,n){if(!Ct(t[t.length-1],e))return!1;let a=t.length-2,r=n.length-1;for(;a>=0&&r>=0;)Ct(t[a],n[r])&&(a-=1),r-=1;return a===-1}function nr(t,e,n){const a=[];for(const{selectors:r,settings:i}of t)for(const o of r)if(tr(o,e,n)){a.push(i);break}return a}function Xt(t,e,n){const a=Object.entries(n.themes).filter(s=>s[1]).map(s=>({color:s[0],theme:s[1]})),r=a.map(s=>{const l=nt(t,e,{...n,theme:s.theme}),m=oe(l),p=typeof s.theme=="string"?s.theme:s.theme.name;return{tokens:l,state:m,theme:p}}),i=ar(...r.map(s=>s.tokens)),o=i[0].map((s,l)=>s.map((m,p)=>{const u={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(u.explanation=m.explanation),i.forEach((d,g)=>{const{content:w,explanation:f,offset:b,...h}=d[l][p];u.variants[a[g].color]=h}),u})),A=r[0].state?new W(Object.fromEntries(r.map(s=>{var l;return[s.theme,(l=s.state)==null?void 0:l.getInternalStack(s.theme)]})),r[0].state.lang):void 0;return A&&Ie(o,A),o}function ar(...t){const e=t.map(()=>[]),n=t.length;for(let a=0;a<t[0].length;a++){const r=t.map(s=>s[a]),i=e.map(()=>[]);e.forEach((s,l)=>s.push(i[l]));const o=r.map(()=>0),A=r.map(s=>s[0]);for(;A.every(s=>s);){const s=Math.min(...A.map(l=>l.content.length));for(let l=0;l<n;l++){const m=A[l];m.content.length===s?(i[l].push(m),o[l]+=1,A[l]=r[l][o[l]]):(i[l].push({...m,content:m.content.slice(0,s)}),A[l]={...m,content:m.content.slice(s),offset:m.offset+s})}}}return e}function Ee(t,e,n){let a,r,i,o,A,s;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:m="--shiki-"}=n,p=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})).sort((f,b)=>f.color===l?-1:b.color===l?1:0);if(p.length===0)throw new P("`themes` option must not be empty");const u=Xt(t,e,n);if(s=oe(u),l&&!p.find(f=>f.color===l))throw new P(`\`themes\` option must contain the defaultColor key \`${l}\``);const d=p.map(f=>t.getTheme(f.theme)),g=p.map(f=>f.color);i=u.map(f=>f.map(b=>rr(b,g,m,l))),s&&Ie(i,s);const w=p.map(f=>_e(f.theme,n));r=p.map((f,b)=>(b===0&&l?"":`${m+f.color}:`)+(G(d[b].fg,w[b])||"inherit")).join(";"),a=p.map((f,b)=>(b===0&&l?"":`${m+f.color}-bg:`)+(G(d[b].bg,w[b])||"inherit")).join(";"),o=`shiki-themes ${d.map(f=>f.name).join(" ")}`,A=l?void 0:[r,a].join(";")}else if("theme"in n){const l=_e(n.theme,n);i=nt(t,e,n);const m=t.getTheme(n.theme);a=G(m.bg,l),r=G(m.fg,l),o=m.name,s=oe(i)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:r,bg:a,themeName:o,rootStyle:A,grammarState:s}}function rr(t,e,n,a){const r={content:t.content,explanation:t.explanation,offset:t.offset},i=e.map(s=>Wt(t.variants[s])),o=new Set(i.flatMap(s=>Object.keys(s))),A={};return i.forEach((s,l)=>{for(const m of o){const p=s[m]||"inherit";if(l===0&&a)A[m]=p;else{const u=m==="color"?"":m==="background-color"?"-bg":`-${m}`,d=n+e[l]+(m==="color"?"":u);A[d]=p}}}),r.htmlStyle=A,r}function ve(t,e,n,a={meta:{},options:n,codeToHast:(r,i)=>ve(t,r,i),codeToTokens:(r,i)=>Ee(t,r,i)}){var d,g;let r=e;for(const w of Ce(n))r=((d=w.preprocess)==null?void 0:d.call(a,r,n))||r;let{tokens:i,fg:o,bg:A,themeName:s,rootStyle:l,grammarState:m}=Ee(t,r,n);const{mergeWhitespaces:p=!0}=n;p===!0?i=or(i):p==="never"&&(i=sr(i));const u={...a,get source(){return r}};for(const w of Ce(n))i=((g=w.tokens)==null?void 0:g.call(u,i))||i;return ir(i,{...n,fg:o,bg:A,themeName:s,rootStyle:l},u,m)}function ir(t,e,n,a=oe(t)){var g,w,f;const r=Ce(e),i=[],o={type:"root",children:[]},{structure:A="classic",tabindex:s="0"}=e;let l={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...s!==!1&&s!=null?{tabindex:s.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([b])=>!b.startsWith("_")))},children:[]},m={type:"element",tagName:"code",properties:{},children:i};const p=[],u={...n,structure:A,addClassToHast:Kt,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return l},get code(){return m},get lines(){return p}};if(t.forEach((b,h)=>{var B,F;h&&(A==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):A==="classic"&&i.push({type:"text",value:`
|
|
4
4
|
`}));let y={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const x of b){let $={type:"element",tagName:"span",properties:{...x.htmlAttrs},children:[{type:"text",value:x.content}]};x.htmlStyle;const le=La(x.htmlStyle||Wt(x));le&&($.properties.style=le);for(const X of r)$=((B=X==null?void 0:X.span)==null?void 0:B.call(u,$,h+1,_,y,x))||$;A==="inline"?o.children.push($):A==="classic"&&y.children.push($),_+=x.content.length}if(A==="classic"){for(const x of r)y=((F=x==null?void 0:x.line)==null?void 0:F.call(u,y,h+1))||y;p.push(y),i.push(y)}}),A==="classic"){for(const b of r)m=((g=b==null?void 0:b.code)==null?void 0:g.call(u,m))||m;l.children.push(m);for(const b of r)l=((w=b==null?void 0:b.pre)==null?void 0:w.call(u,l))||l;o.children.push(l)}let d=o;for(const b of r)d=((f=b==null?void 0:b.root)==null?void 0:f.call(u,d))||d;return a&&Ie(d,a),d}function or(t){return t.map(e=>{const n=[];let a="",r=0;return e.forEach((i,o)=>{const s=!(i.fontStyle&&i.fontStyle&q.Underline);s&&i.content.match(/^\s+$/)&&e[o+1]?(r||(r=i.offset),a+=i.content):a?(s?n.push({...i,offset:r,content:a+i.content}):n.push({content:a,offset:r},i),r=0,a=""):n.push(i)}),n})}function sr(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const a=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return n;const[,r,i,o]=a;if(!r&&!o)return n;const A=[{...n,offset:n.offset+r.length,content:i}];return r&&A.unshift({content:r,offset:n.offset}),o&&A.push({content:o,offset:n.offset+r.length+i.length}),A}))}function cr(t,e,n){var i;const a={meta:{},options:n,codeToHast:(o,A)=>ve(t,o,A),codeToTokens:(o,A)=>Ee(t,o,A)};let r=vn(ve(t,e,n,a));for(const o of Ce(n))r=((i=o.postprocess)==null?void 0:i.call(a,r,n))||r;return r}const Bt={light:"#333333",dark:"#bbbbbb"},Et={light:"#fffffe",dark:"#1e1e1e"},vt="__shiki_resolved";function at(t){var A,s,l,m,p;if(t!=null&&t[vt])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:a}=e;if(!n||!a){const u=e.settings?e.settings.find(d=>!d.name&&!d.scope):void 0;(A=u==null?void 0:u.settings)!=null&&A.foreground&&(a=u.settings.foreground),(s=u==null?void 0:u.settings)!=null&&s.background&&(n=u.settings.background),!a&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(a=e.colors["editor.foreground"]),!n&&((m=e==null?void 0:e.colors)!=null&&m["editor.background"])&&(n=e.colors["editor.background"]),a||(a=e.type==="light"?Bt.light:Bt.dark),n||(n=e.type==="light"?Et.light:Et.dark),e.fg=a,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const i=new Map;function o(u){var g;if(i.has(u))return i.get(u);r+=1;const d=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(g=e.colorReplacements)!=null&&g[`#${d}`]?o(u):(i.set(u,d),d)}e.settings=e.settings.map(u=>{var f,b;const d=((f=u.settings)==null?void 0:f.foreground)&&!u.settings.foreground.startsWith("#"),g=((b=u.settings)==null?void 0:b.background)&&!u.settings.background.startsWith("#");if(!d&&!g)return u;const w={...u,settings:{...u.settings}};if(d){const h=o(u.settings.foreground);e.colorReplacements[h]=u.settings.foreground,w.settings.foreground=h}if(g){const h=o(u.settings.background);e.colorReplacements[h]=u.settings.background,w.settings.background=h}return w});for(const u of Object.keys(e.colors||{}))if((u==="editor.foreground"||u==="editor.background"||u.startsWith("terminal.ansi"))&&!((p=e.colors[u])!=null&&p.startsWith("#"))){const d=o(e.colors[u]);e.colorReplacements[d]=e.colors[u],e.colors[u]=d}return Object.defineProperty(e,vt,{enumerable:!1,writable:!1,value:!0}),e}async function en(t){return Array.from(new Set((await Promise.all(t.filter(e=>!Ht(e)).map(async e=>await Yt(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function tn(t){return(await Promise.all(t.map(async n=>Ut(n)?null:at(await Yt(n))))).filter(n=>!!n)}var Ar=Object.defineProperty,lr=(t,e,n)=>e in t?Ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T=(t,e,n)=>(lr(t,typeof e!="symbol"?e+"":e,n),n);class dr extends Sa{constructor(e,n,a,r={}){super(e),this._resolver=e,this._themes=n,this._langs=a,this._alias=r,T(this,"_resolvedThemes",new Map),T(this,"_resolvedGrammars",new Map),T(this,"_langMap",new Map),T(this,"_langGraph",new Map),T(this,"_textmateThemeCache",new WeakMap),T(this,"_loadedThemesCache",null),T(this,"_loadedLanguagesCache",null),this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=at(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=fe.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){if(this._alias[e]){const n=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],n.has(e))throw new D(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){var i,o,A,s;if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(l=>{var m;return(m=l.embeddedLangsLazy)==null?void 0:m.includes(e.name)}));this._resolver.addLanguage(e);const a={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,a);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(l=>{this._alias[l]=e.name}),this._loadedLanguagesCache=null,n.size)for(const l of n)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,(o=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||o.delete(l.scopeName),(s=(A=this._syncRegistry)==null?void 0:A._grammars)==null||s.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const n=Array.from(this._langGraph.entries()),a=n.filter(([r,i])=>!i);if(a.length){const r=n.filter(([i,o])=>{var A;return o&&((A=o.embeddedLangs)==null?void 0:A.some(s=>a.map(([l])=>l).includes(s)))}).filter(i=>!a.includes(i));throw new D(`Missing languages ${a.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of n)this._resolver.addLanguage(i);for(const[r,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const n of e.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}var pr=Object.defineProperty,mr=(t,e,n)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,me=(t,e,n)=>(mr(t,typeof e!="symbol"?e+"":e,n),n);class ur{constructor(e,n){me(this,"_langs",new Map),me(this,"_scopeToLang",new Map),me(this,"_injections",new Map),me(this,"_onigLib"),this._onigLib={createOnigScanner:a=>e.createScanner(a),createOnigString:a=>e.createString(a)},n.forEach(a=>this.addLanguage(a))}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(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let a=[];for(let r=1;r<=n.length;r++){const i=n.slice(0,r).join(".");a=[...a,...this._injections.get(i)||[]]}return a}}let ee=0;function gr(t){ee+=1,t.warnings!==!1&&ee>=10&&ee%10===0&&console.warn(`[Shiki] ${ee} 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 e=!1;if(!t.engine)throw new D("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),a=(t.themes||[]).flat(1).map(at),r=new ur(t.engine,n),i=new dr(r,a,n,t.langAlias);let o;function A(h){f();const y=i.getGrammar(typeof h=="string"?h:h.name);if(!y)throw new D(`Language \`${h}\` not found, you may need to load it first`);return y}function s(h){if(h==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};f();const y=i.getTheme(h);if(!y)throw new D(`Theme \`${h}\` not found, you may need to load it first`);return y}function l(h){f();const y=s(h);o!==h&&(i.setTheme(y),o=h);const _=i.getColorMap();return{theme:y,colorMap:_}}function m(){return f(),i.getLoadedThemes()}function p(){return f(),i.getLoadedLanguages()}function u(...h){f(),i.loadLanguages(h.flat(1))}async function d(...h){return u(await en(h))}function g(...h){f();for(const y of h.flat(1))i.loadTheme(y)}async function w(...h){return f(),g(await tn(h))}function f(){if(e)throw new D("Shiki instance has been disposed")}function b(){e||(e=!0,i.dispose(),ee-=1)}return{setTheme:l,getTheme:s,getLanguage:A,getLoadedThemes:m,getLoadedLanguages:p,loadLanguage:d,loadLanguageSync:u,loadTheme:w,loadThemeSync:g,dispose:b,[Symbol.dispose]:b}}async function br(t={}){t.loadWasm;const[e,n,a]=await Promise.all([tn(t.themes||[]),en(t.langs||[]),t.engine||Dt(t.loadWasm||Hn())]);return gr({...t,themes:e,langs:n,engine:a})}async function fr(t={}){const e=await br(t);return{getLastGrammarState:(...n)=>Ja(e,...n),codeToTokensBase:(n,a)=>nt(e,n,a),codeToTokensWithThemes:(n,a)=>Xt(e,n,a),codeToTokens:(n,a)=>Ee(e,n,a),codeToHast:(n,a)=>ve(e,n,a),codeToHtml:(n,a)=>cr(e,n,a),...e,getInternalContext:()=>e}}function hr(t,e,n){let a,r,i;{const A=t;a=A.langs,r=A.themes,i=A.engine}async function o(A){function s(d){if(typeof d=="string"){if(Ht(d))return[];const g=a[d];if(!g)throw new P(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return g}return d}function l(d){if(Ut(d))return"none";if(typeof d=="string"){const g=r[d];if(!g)throw new P(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return g}return d}const m=(A.themes??[]).map(d=>l(d)),p=(A.langs??[]).map(d=>s(d)),u=await fr({engine:i(),...A,themes:m,langs:p});return{...u,loadLanguage(...d){return u.loadLanguage(...d.map(s))},loadTheme(...d){return u.loadTheme(...d.map(l))}}}return o}const yr=hr({langs:It,themes:Dn,engine:()=>Dt(c(()=>Promise.resolve().then(()=>Xf),void 0))});function wr(t,e,n){const{parseMetaString:a,trimEndingNewline:r=!0,defaultLanguage:i="text",fallbackLanguage:o}=n,A=e.getLoadedLanguages();t.options.highlight=(s,l="text",m)=>{l===""&&(l=i),o&&!A.includes(l)&&(l=o);const p=(a==null?void 0:a(m,s,l))||{},u={...n,lang:l,meta:{...n.meta,...p,__raw:m}},d=[];return d.push({name:"@shikijs/markdown-it:block-class",code(g){g.properties.class=`language-${l}`}}),r&&s.endsWith(`
|
|
@@ -108,8 +108,9 @@
|
|
|
108
108
|
authenticationEnabled: Boolean("{{authentication_enabled}}" == "True"),
|
|
109
109
|
oAuth2Idps: {{ oauth2_idps | tojson }},
|
|
110
110
|
basicAuthDisabled: Boolean("{{basic_auth_disabled}}" == "True"),
|
|
111
|
-
websocketsEnabled: Boolean("{{websockets_enabled}}" == "True"),
|
|
112
111
|
managementUrl: {{management_url | tojson}},
|
|
112
|
+
supportEmail: {{support_email | tojson}},
|
|
113
|
+
hasDbThreshold: Boolean("{{has_db_threshold}}" == "True"),
|
|
113
114
|
}),
|
|
114
115
|
writable: false
|
|
115
116
|
});
|
phoenix/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "11.
|
|
1
|
+
__version__ = "11.13.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|