@aquera/nile-elements 0.0.101 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +8 -0
  2. package/dist/{gdresource-f3b2ce0c.esm.js → gdresource-6d1fa09f.esm.js} +1 -1
  3. package/dist/{gdresource-a87092f3.cjs.js → gdresource-94dcf330.cjs.js} +2 -2
  4. package/dist/{gdresource-a87092f3.cjs.js.map → gdresource-94dcf330.cjs.js.map} +1 -1
  5. package/dist/gdscript-00144682.esm.js +1 -0
  6. package/dist/gdscript-ffbf4a9f.cjs.js +2 -0
  7. package/dist/gdscript-ffbf4a9f.cjs.js.map +1 -0
  8. package/dist/mdx-61c0b1c2.cjs.js +2 -0
  9. package/dist/mdx-61c0b1c2.cjs.js.map +1 -0
  10. package/dist/mdx-878bd7c0.esm.js +1 -0
  11. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
  12. package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
  13. package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
  14. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  15. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  16. package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
  17. package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
  18. package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
  19. package/dist/nile-highlighter/nile-highlighter.esm.js +1 -1
  20. package/dist/nile-tab/nile-tab.cjs.js +1 -1
  21. package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
  22. package/dist/nile-tab/nile-tab.esm.js +1 -1
  23. package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
  24. package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
  25. package/dist/nile-tab-group/nile-tab-group.esm.js +2 -2
  26. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +1 -0
  27. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +19 -3
  28. package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
  29. package/dist/src/nile-code-editor/nile-code-editor.d.ts +8 -5
  30. package/dist/src/nile-code-editor/nile-code-editor.js +63 -41
  31. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  32. package/dist/src/nile-tab/nile-tab.js +2 -0
  33. package/dist/src/nile-tab/nile-tab.js.map +1 -1
  34. package/dist/src/nile-tab-group/nile-tab-group.d.ts +5 -5
  35. package/dist/src/nile-tab-group/nile-tab-group.js +92 -92
  36. package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
  37. package/dist/tsconfig.tsbuildinfo +1 -1
  38. package/package.json +1 -1
  39. package/src/nile-button-toggle-group/nile-button-toggle-group.ts +16 -8
  40. package/src/nile-code-editor/nile-code-editor.ts +63 -52
  41. package/src/nile-tab/nile-tab.ts +2 -1
  42. package/src/nile-tab-group/nile-tab-group.ts +98 -97
  43. package/dist/gdscript-b291189b.esm.js +0 -1
  44. package/dist/gdscript-f553f938.cjs.js +0 -2
  45. package/dist/gdscript-f553f938.cjs.js.map +0 -1
  46. package/dist/mdx-35b64539.cjs.js +0 -2
  47. package/dist/mdx-35b64539.cjs.js.map +0 -1
  48. package/dist/mdx-8b360abb.esm.js +0 -1
@@ -1,3 +1,3 @@
1
- import{__decorate as t}from"tslib";import{x as e}from"../index-0a3007c5.esm.js";import{state as n,customElement as i}from"lit/decorators.js";import{s as r}from"./nile-highlighter.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{n as s}from"../property-09139d3c.esm.js";import"lit";const l=[{id:"abap",name:"ABAP",import:()=>import("../abap-2ba67a6a.esm.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("../actionscript-3-02209631.esm.js")},{id:"ada",name:"Ada",import:()=>import("../ada-eb2c7f45.esm.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("../angular-html-dee6666d.esm.js").then((function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("../angular-ts-b05cbd6b.esm.js")},{id:"apache",name:"Apache Conf",import:()=>import("../apache-ff114010.esm.js")},{id:"apex",name:"Apex",import:()=>import("../apex-a18f8067.esm.js")},{id:"apl",name:"APL",import:()=>import("../apl-6c125f1b.esm.js")},{id:"applescript",name:"AppleScript",import:()=>import("../applescript-5bd7661e.esm.js")},{id:"ara",name:"Ara",import:()=>import("../ara-dc362516.esm.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("../asciidoc-479a5015.esm.js")},{id:"asm",name:"Assembly",import:()=>import("../asm-399082a7.esm.js")},{id:"astro",name:"Astro",import:()=>import("../astro-5413cddf.esm.js")},{id:"awk",name:"AWK",import:()=>import("../awk-ebeda106.esm.js")},{id:"ballerina",name:"Ballerina",import:()=>import("../ballerina-f6638dfe.esm.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("../bat-e43e2fa3.esm.js")},{id:"beancount",name:"Beancount",import:()=>import("../beancount-64ffab7e.esm.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("../berry-83623848.esm.js")},{id:"bibtex",name:"BibTeX",import:()=>import("../bibtex-1d977042.esm.js")},{id:"bicep",name:"Bicep",import:()=>import("../bicep-4533772f.esm.js")},{id:"blade",name:"Blade",import:()=>import("../blade-444d3218.esm.js")},{id:"c",name:"C",import:()=>import("../c-6e568302.esm.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("../cadence-bac9903e.esm.js")},{id:"clarity",name:"Clarity",import:()=>import("../clarity-188a88ea.esm.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("../clojure-f5559f9c.esm.js")},{id:"cmake",name:"CMake",import:()=>import("../cmake-6441f0dd.esm.js")},{id:"cobol",name:"COBOL",import:()=>import("../cobol-91cd2d87.esm.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("../codeowners-2c8e205d.esm.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("../codeql-d5855c59.esm.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("../coffee-6826f5b6.esm.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("../common-lisp-37cba388.esm.js")},{id:"coq",name:"Coq",import:()=>import("../coq-142fbea0.esm.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("../cpp-930fb0b9.esm.js")},{id:"crystal",name:"Crystal",import:()=>import("../crystal-84daa19c.esm.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("../csharp-bddc9bf8.esm.js")},{id:"css",name:"CSS",import:()=>import("../css-80271636.esm.js")},{id:"csv",name:"CSV",import:()=>import("../csv-63a72bf6.esm.js")},{id:"cue",name:"CUE",import:()=>import("../cue-72835cdc.esm.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("../cypher-525eefc3.esm.js")},{id:"d",name:"D",import:()=>import("../d-5b366514.esm.js")},{id:"dart",name:"Dart",import:()=>import("../dart-25798f11.esm.js")},{id:"dax",name:"DAX",import:()=>import("../dax-4d122058.esm.js")},{id:"desktop",name:"Desktop",import:()=>import("../desktop-510a2947.esm.js")},{id:"diff",name:"Diff",import:()=>import("../diff-a772c67e.esm.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("../docker-086ffca5.esm.js")},{id:"dotenv",name:"dotEnv",import:()=>import("../dotenv-7b4d4131.esm.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("../dream-maker-d074d317.esm.js")},{id:"edge",name:"Edge",import:()=>import("../edge-e78d6a81.esm.js")},{id:"elixir",name:"Elixir",import:()=>import("../elixir-4818c090.esm.js")},{id:"elm",name:"Elm",import:()=>import("../elm-7cec854b.esm.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("../emacs-lisp-acc9d1bf.esm.js")},{id:"erb",name:"ERB",import:()=>import("../erb-28f42bb4.esm.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("../erlang-dd5f32ab.esm.js")},{id:"fennel",name:"Fennel",import:()=>import("../fennel-a9a5817d.esm.js")},{id:"fish",name:"Fish",import:()=>import("../fish-c4b3e0de.esm.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("../fluent-ecf06fb2.esm.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("../fortran-fixed-form-5c104c61.esm.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("../fortran-free-form-95b71a0b.esm.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("../fsharp-0164a1d5.esm.js")},{id:"gdresource",name:"GDResource",import:()=>import("../gdresource-f3b2ce0c.esm.js")},{id:"gdscript",name:"GDScript",import:()=>import("../gdscript-b291189b.esm.js")},{id:"gdshader",name:"GDShader",import:()=>import("../gdshader-adef3cb9.esm.js")},{id:"genie",name:"Genie",import:()=>import("../genie-828f21f0.esm.js")},{id:"gherkin",name:"Gherkin",import:()=>import("../gherkin-38fbb737.esm.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("../git-commit-277814c1.esm.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("../git-rebase-ce84243e.esm.js")},{id:"gleam",name:"Gleam",import:()=>import("../gleam-11a7fc53.esm.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("../glimmer-js-03ba0754.esm.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("../glimmer-ts-c60cc0f1.esm.js")},{id:"glsl",name:"GLSL",import:()=>import("../glsl-23ab554c.esm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("../gnuplot-fb488ca4.esm.js")},{id:"go",name:"Go",import:()=>import("../go-7f7238b0.esm.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("../graphql-2c7747b6.esm.js")},{id:"groovy",name:"Groovy",import:()=>import("../groovy-8a2b3b3e.esm.js")},{id:"hack",name:"Hack",import:()=>import("../hack-92dcfd2d.esm.js")},{id:"haml",name:"Ruby Haml",import:()=>import("../haml-da0270b5.esm.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("../handlebars-13a930dc.esm.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("../haskell-fe90b706.esm.js")},{id:"haxe",name:"Haxe",import:()=>import("../haxe-4f52a4f2.esm.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("../hcl-dfb1d5ac.esm.js")},{id:"hjson",name:"Hjson",import:()=>import("../hjson-622fea55.esm.js")},{id:"hlsl",name:"HLSL",import:()=>import("../hlsl-4de7ee5d.esm.js")},{id:"html",name:"HTML",import:()=>import("../html-07b50e61.esm.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("../html-derivative-38ad45df.esm.js")},{id:"http",name:"HTTP",import:()=>import("../http-d4a4b4eb.esm.js")},{id:"hxml",name:"HXML",import:()=>import("../hxml-ffae1a6b.esm.js")},{id:"hy",name:"Hy",import:()=>import("../hy-80d68de3.esm.js")},{id:"imba",name:"Imba",import:()=>import("../imba-f3c43210.esm.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("../ini-42cfe2b2.esm.js")},{id:"java",name:"Java",import:()=>import("../java-9a18db40.esm.js")},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>import("../javascript-766be5b7.esm.js")},{id:"jinja",name:"Jinja",import:()=>import("../jinja-60af6e03.esm.js")},{id:"jison",name:"Jison",import:()=>import("../jison-bce70a6d.esm.js")},{id:"json",name:"JSON",import:()=>import("../json-c099592a.esm.js")},{id:"json5",name:"JSON5",import:()=>import("../json5-a941eda3.esm.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("../jsonc-1bfce64c.esm.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("../jsonl-c06fafa2.esm.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("../jsonnet-8da71b15.esm.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("../jssm-6fabae38.esm.js")},{id:"jsx",name:"JSX",import:()=>import("../jsx-031d907d.esm.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("../julia-1e0aa23a.esm.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("../kotlin-9232cba2.esm.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("../kusto-5a575879.esm.js")},{id:"latex",name:"LaTeX",import:()=>import("../latex-5bc51c63.esm.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("../lean-bf132505.esm.js")},{id:"less",name:"Less",import:()=>import("../less-07c1d189.esm.js")},{id:"liquid",name:"Liquid",import:()=>import("../liquid-40f4658c.esm.js")},{id:"log",name:"Log file",import:()=>import("../log-469090c5.esm.js")},{id:"logo",name:"Logo",import:()=>import("../logo-4193fe20.esm.js")},{id:"lua",name:"Lua",import:()=>import("../lua-a0557a62.esm.js")},{id:"luau",name:"Luau",import:()=>import("../luau-5721ef81.esm.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("../make-a26a0432.esm.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("../markdown-442604ed.esm.js")},{id:"marko",name:"Marko",import:()=>import("../marko-3615615d.esm.js")},{id:"matlab",name:"MATLAB",import:()=>import("../matlab-07562d17.esm.js")},{id:"mdc",name:"MDC",import:()=>import("../mdc-000f49f7.esm.js")},{id:"mdx",name:"MDX",import:()=>import("../mdx-8b360abb.esm.js")},{id:"mermaid",name:"Mermaid",import:()=>import("../mermaid-79714284.esm.js")},{id:"mojo",name:"Mojo",import:()=>import("../mojo-562151cd.esm.js")},{id:"move",name:"Move",import:()=>import("../move-33cade24.esm.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("../narrat-f62582b8.esm.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("../nextflow-f85a84cd.esm.js")},{id:"nginx",name:"Nginx",import:()=>import("../nginx-60461c6d.esm.js")},{id:"nim",name:"Nim",import:()=>import("../nim-b18dd9d6.esm.js")},{id:"nix",name:"Nix",import:()=>import("../nix-8a16e63d.esm.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("../nushell-b9317a18.esm.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("../objective-c-bbf28b4c.esm.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("../objective-cpp-5874c26c.esm.js")},{id:"ocaml",name:"OCaml",import:()=>import("../ocaml-003f9cb6.esm.js")},{id:"pascal",name:"Pascal",import:()=>import("../pascal-95cf3080.esm.js")},{id:"perl",name:"Perl",import:()=>import("../perl-8d938ec1.esm.js")},{id:"php",name:"PHP",import:()=>import("../php-779a9080.esm.js")},{id:"plsql",name:"PL/SQL",import:()=>import("../plsql-79e8273a.esm.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("../po-b4d7f8b9.esm.js")},{id:"postcss",name:"PostCSS",import:()=>import("../postcss-cc91f779.esm.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("../powerquery-dec6a2e1.esm.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("../powershell-1ba65283.esm.js")},{id:"prisma",name:"Prisma",import:()=>import("../prisma-6479f02d.esm.js")},{id:"prolog",name:"Prolog",import:()=>import("../prolog-7d87da09.esm.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("../proto-43fab750.esm.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("../pug-a0199625.esm.js")},{id:"puppet",name:"Puppet",import:()=>import("../puppet-633f76f5.esm.js")},{id:"purescript",name:"PureScript",import:()=>import("../purescript-c67856bb.esm.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("../python-662bb02f.esm.js")},{id:"qml",name:"QML",import:()=>import("../qml-58153e24.esm.js")},{id:"qmldir",name:"QML Directory",import:()=>import("../qmldir-24b48c33.esm.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("../qss-e29728df.esm.js")},{id:"r",name:"R",import:()=>import("../r-0bb974b7.esm.js")},{id:"racket",name:"Racket",import:()=>import("../racket-4d72d1b6.esm.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("../raku-c5715ad9.esm.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("../razor-945ace44.esm.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("../reg-6ab73a2e.esm.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("../regexp-7a701946.esm.js")},{id:"rel",name:"Rel",import:()=>import("../rel-59a425f3.esm.js")},{id:"riscv",name:"RISC-V",import:()=>import("../riscv-92e3bc25.esm.js")},{id:"rst",name:"reStructuredText",import:()=>import("../rst-d03e28b2.esm.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("../ruby-be4ca2b3.esm.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("../rust-73ab87c8.esm.js")},{id:"sas",name:"SAS",import:()=>import("../sas-bbbaa45e.esm.js")},{id:"sass",name:"Sass",import:()=>import("../sass-06c0f1b9.esm.js")},{id:"scala",name:"Scala",import:()=>import("../scala-0ee7160e.esm.js")},{id:"scheme",name:"Scheme",import:()=>import("../scheme-9492ba0c.esm.js")},{id:"scss",name:"SCSS",import:()=>import("../scss-669da998.esm.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("../shaderlab-1427b314.esm.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("../shellscript-d8616780.esm.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("../shellsession-04c3b61a.esm.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("../smalltalk-bf032b10.esm.js")},{id:"solidity",name:"Solidity",import:()=>import("../solidity-945b3789.esm.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("../soy-06521b95.esm.js")},{id:"sparql",name:"SPARQL",import:()=>import("../sparql-97e91077.esm.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("../splunk-724382a5.esm.js")},{id:"sql",name:"SQL",import:()=>import("../sql-992bd7be.esm.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("../ssh-config-b979ce37.esm.js")},{id:"stata",name:"Stata",import:()=>import("../stata-aae26e99.esm.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("../stylus-a19590dc.esm.js")},{id:"svelte",name:"Svelte",import:()=>import("../svelte-e9d766af.esm.js")},{id:"swift",name:"Swift",import:()=>import("../swift-fee69c7f.esm.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("../system-verilog-0672b209.esm.js")},{id:"systemd",name:"Systemd Units",import:()=>import("../systemd-c9ce059c.esm.js")},{id:"tasl",name:"Tasl",import:()=>import("../tasl-56981c00.esm.js")},{id:"tcl",name:"Tcl",import:()=>import("../tcl-70c1f2b7.esm.js")},{id:"templ",name:"Templ",import:()=>import("../templ-c39be4cd.esm.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("../terraform-73abcfab.esm.js")},{id:"tex",name:"TeX",import:()=>import("../tex-b6c05cee.esm.js")},{id:"toml",name:"TOML",import:()=>import("../toml-a6513e85.esm.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("../ts-tags-84924e55.esm.js")},{id:"tsv",name:"TSV",import:()=>import("../tsv-e2ae86b4.esm.js")},{id:"tsx",name:"TSX",import:()=>import("../tsx-c24ffc6f.esm.js")},{id:"turtle",name:"Turtle",import:()=>import("../turtle-8d160c92.esm.js")},{id:"twig",name:"Twig",import:()=>import("../twig-bad7572b.esm.js")},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>import("../typescript-a171088a.esm.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("../typespec-b8dfd5b0.esm.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("../typst-000ffe24.esm.js")},{id:"v",name:"V",import:()=>import("../v-7039b569.esm.js")},{id:"vala",name:"Vala",import:()=>import("../vala-8f2bc2b5.esm.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("../vb-9a874029.esm.js")},{id:"verilog",name:"Verilog",import:()=>import("../verilog-c2d57008.esm.js")},{id:"vhdl",name:"VHDL",import:()=>import("../vhdl-ac657a56.esm.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("../viml-68018137.esm.js")},{id:"vue",name:"Vue",import:()=>import("../vue-7023c553.esm.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("../vue-html-6dbeafca.esm.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("../vyper-067da748.esm.js")},{id:"wasm",name:"WebAssembly",import:()=>import("../wasm-43fea9ba.esm.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("../wenyan-8d0469db.esm.js")},{id:"wgsl",name:"WGSL",import:()=>import("../wgsl-958bb4d4.esm.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("../wikitext-d5aba44b.esm.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("../wolfram-a98e7871.esm.js")},{id:"xml",name:"XML",import:()=>import("../xml-dcc4373e.esm.js")},{id:"xsl",name:"XSL",import:()=>import("../xsl-e1cebd5c.esm.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("../yaml-40772700.esm.js")},{id:"zenscript",name:"ZenScript",import:()=>import("../zenscript-8287622a.esm.js")},{id:"zig",name:"Zig",import:()=>import("../zig-22785718.esm.js")}],a={...Object.fromEntries(l.map((t=>[t.id,t.import]))),...Object.fromEntries(l.flatMap((t=>t.aliases?.map((e=>[e,t.import]))||[])))},u=async t=>import("../wasm-ec34668d.esm.js").then((e=>e.default(t))),c=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("../andromeeda-5d950407.esm.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("../aurora-x-ef4469d5.esm.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("../ayu-dark-02c5eda5.esm.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("../catppuccin-frappe-374da941.esm.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("../catppuccin-latte-0443a123.esm.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("../catppuccin-macchiato-f40edfee.esm.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("../catppuccin-mocha-9325f879.esm.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("../dark-plus-6e6fe59a.esm.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("../dracula-2692338e.esm.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("../dracula-soft-6693d958.esm.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("../everforest-dark-c8bfaab7.esm.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("../everforest-light-d4dc4485.esm.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("../github-dark-fcfdd973.esm.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("../github-dark-default-2a934605.esm.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("../github-dark-dimmed-7180e6f5.esm.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("../github-dark-high-contrast-bf87cfb0.esm.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("../github-light-e7a28cff.esm.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("../github-light-default-210b3eff.esm.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("../github-light-high-contrast-3683d923.esm.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("../houston-c05ac28d.esm.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("../laserwave-bf73c7ca.esm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("../light-plus-29d176d7.esm.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("../material-theme-2eae845f.esm.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("../material-theme-darker-8fa5687b.esm.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("../material-theme-lighter-d8ffc3a3.esm.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("../material-theme-ocean-015b70e7.esm.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("../material-theme-palenight-bc1384ec.esm.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("../min-dark-8505a270.esm.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("../min-light-0666da1a.esm.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("../monokai-6a66f188.esm.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("../night-owl-29c1d219.esm.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("../nord-9b4df92f.esm.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("../one-dark-pro-6ca8f674.esm.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("../one-light-14248a14.esm.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("../plastic-5de71733.esm.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("../poimandres-d61560a5.esm.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("../red-7842649b.esm.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("../rose-pine-5671b666.esm.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("../rose-pine-dawn-5f8448ab.esm.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("../rose-pine-moon-f769c9d9.esm.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("../slack-dark-61b35310.esm.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("../slack-ochin-ceebc179.esm.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("../snazzy-light-cf013f4c.esm.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("../solarized-dark-e78ef35f.esm.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("../solarized-light-069d7924.esm.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("../synthwave-84-c91fabd4.esm.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("../tokyo-night-ed39d8c0.esm.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("../vesper-ca1042cf.esm.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("../vitesse-black-02f9013c.esm.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("../vitesse-dark-362560d8.esm.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("../vitesse-light-64c34e5b.esm.js")}],m=Object.fromEntries(c.map((t=>[t.id,t.import])));var p;function h(t){return Array.isArray(t)?function(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=h(t[n]);return e}(t):"object"==typeof t?function(t){let e={};for(let n in t)e[n]=h(t[n]);return e}(t):t}function d(t,...e){return e.forEach((e=>{for(let n in e)t[n]=e[n]})),t}function f(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===e?t:~e==t.length-1?f(t.substring(0,t.length-1)):t.substr(1+~e)}!function(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"}(p||(p={}));var g=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,y=class{static hasCaptures(t){return null!==t&&(g.lastIndex=0,g.test(t))}static replaceCaptures(t,e,n){return t.replace(g,((t,i,r,o)=>{let s=n[parseInt(i||r,10)];if(!s)return t;{let t=e.substring(s.start,s.end);for(;"."===t[0];)t=t.substring(1);switch(o){case"downcase":return t.toLowerCase();case"upcase":return t.toUpperCase();default:return t}}}))}};function b(t,e){return t<e?-1:t>e?1:0}function w(t,e){if(null===t&&null===e)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,i=e.length;if(n===i){for(let i=0;i<n;i++){let n=b(t[i],e[i]);if(0!==n)return n}return 0}return n-i}function v(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 j(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var k=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}},S=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n,this._cachedMatchRoot=new k((t=>this._root.match(t)))}static createFromRawTheme(t,e){return this.createFromParsedTheme(function(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],i=0;for(let t=0,r=e.length;t<r;t++){let r,o=e[t];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),r=t.split(",")}else r=Array.isArray(o.scope)?o.scope:[""];let s=-1;if("string"==typeof o.settings.fontStyle){s=0;let t=o.settings.fontStyle.split(" ");for(let e=0,n=t.length;e<n;e++){switch(t[e]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}}let l=null;"string"==typeof o.settings.foreground&&v(o.settings.foreground)&&(l=o.settings.foreground);let a=null;"string"==typeof o.settings.background&&v(o.settings.background)&&(a=o.settings.background);for(let e=0,o=r.length;e<o;e++){let o=r[e].trim().split(" "),u=o[o.length-1],c=null;o.length>1&&(c=o.slice(0,o.length-1),c.reverse()),n[i++]=new T(u,c,t,s,l,a)}}return n}(t),e)}static createFromParsedTheme(t,e){return function(t,e){t.sort(((t,e)=>{let n=b(t.scope,e.scope);return 0!==n?n:(n=w(t.parentScopes,e.parentScopes),0!==n?n:t.index-e.index)}));let n=0,i="#000000",r="#ffffff";for(;t.length>=1&&""===t[0].scope;){let e=t.shift();-1!==e.fontStyle&&(n=e.fontStyle),null!==e.foreground&&(i=e.foreground),null!==e.background&&(r=e.background)}let o=new A(e),s=new L(n,o.getId(i),o.getId(r)),l=new P(new M(0,null,-1,0,0),[]);for(let e=0,n=t.length;e<n;e++){let n=t[e];l.insert(0,n.scope,n.parentScopes,n.fontStyle,o.getId(n.foreground),o.getId(n.background))}return new S(o,s,l)}(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(null===t)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find((e=>function(t,e){if(0===e.length)return!0;for(let n=0;n<e.length;n++){let i=e[n],r=!1;if(">"===i){if(n===e.length-1)return!1;i=e[++n],r=!0}for(;t&&!C(t.scopeName,i);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}(t.parent,e.parentScopes)));return n?new L(n.fontStyle,n.foreground,n.background):null}},x=class t{constructor(t,e){this.parent=t,this.scopeName=e}static push(e,n){for(const i of n)e=new t(e,i);return e}static from(...e){let n=null;for(let i=0;i<e.length;i++)n=new t(n,e[i]);return n}push(e){return new t(this,e)}getSegments(){let t=this;const e=[];for(;t;)e.push(t.scopeName),t=t.parent;return e.reverse(),e}toString(){return this.getSegments().join(" ")}extends(t){return this===t||null!==this.parent&&this.parent.extends(t)}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push(n.scopeName),n=n.parent;return n===t?e.reverse():void 0}};function C(t,e){return e===t||t.startsWith(e)&&"."===t[e.length]}var L=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};var T=class{constructor(t,e,n,i,r,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}};var A=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(null===t)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)}},O=Object.freeze([]),M=class t{constructor(t,e,n,i,r){this.scopeDepth=t,this.parentScopes=e||O,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=t[n].clone();return e}acceptOverwrite(t,e,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,-1!==e&&(this.fontStyle=e),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},P=class t{constructor(t,e=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=e}static _cmpBySpecificity(t,e){if(t.scopeDepth!==e.scopeDepth)return e.scopeDepth-t.scopeDepth;let n=0,i=0;for(;">"===t.parentScopes[n]&&n++,">"===e.parentScopes[i]&&i++,!(n>=t.parentScopes.length||i>=e.parentScopes.length);){const r=e.parentScopes[i].length-t.parentScopes[n].length;if(0!==r)return r;n++,i++}return e.parentScopes.length-t.parentScopes.length}match(e){if(""!==e){let t,n,i=e.indexOf(".");if(-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,i,r,o,s){if(""===n)return void this._doInsertHere(e,i,r,o,s);let l,a,u,c=n.indexOf(".");-1===c?(l=n,a=""):(l=n.substring(0,c),a=n.substring(c+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new t(this._mainRule.clone(),M.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,a,i,r,o,s)}_doInsertHere(t,e,n,i,r){if(null!==e){for(let o=0,s=this._rulesWithParentScopes.length;o<s;o++){let s=this._rulesWithParentScopes[o];if(0===w(s.parentScopes,e))return void s.acceptOverwrite(t,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new M(t,e,n,i,r))}else this._mainRule.acceptOverwrite(t,n,i,r)}},N=class t{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(e){const n=t.getLanguageId(e),i=t.getTokenType(e),r=t.getFontStyle(e),o=t.getForeground(e),s=t.getBackground(e);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:o,background:s})}static getLanguageId(t){return(255&t)>>>0}static getTokenType(t){return(768&t)>>>8}static containsBalancedBrackets(t){return!!(1024&t)}static getFontStyle(t){return(30720&t)>>>11}static getForeground(t){return(16744448&t)>>>15}static getBackground(t){return(4278190080&t)>>>24}static set(e,n,i,r,o,s,l){let a=t.getLanguageId(e),u=t.getTokenType(e),c=t.containsBalancedBrackets(e)?1:0,m=t.getFontStyle(e),p=t.getForeground(e),h=t.getBackground(e);return 0!==n&&(a=n),8!==i&&(u=i),null!==r&&(c=r?1:0),-1!==o&&(m=o),0!==s&&(p=s),0!==l&&(h=l),(a|u<<8|c<<10|m<<11|p<<15|h<<24)>>>0}};function D(t,e){const n=[],i=function(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const i=n[0];return n=e.exec(t),i}}}(t);let r=i.next();for(;null!==r;){let t=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":t=1;break;case"L":t=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let e=s();if(n.push({matcher:e,priority:t}),","!==r)break;r=i.next()}return n;function o(){if("-"===r){r=i.next();const t=o();return e=>!!t&&!t(e)}if("("===r){r=i.next();const t=function(){const t=[];let e=s();for(;e&&(t.push(e),"|"===r||","===r);){do{r=i.next()}while("|"===r||","===r);e=s()}return e=>t.some((t=>t(e)))}();return")"===r&&(r=i.next()),t}if(E(r)){const t=[];do{t.push(r),r=i.next()}while(E(r));return n=>e(t,n)}return null}function s(){const t=[];let e=o();for(;e;)t.push(e),e=o();return e=>t.every((t=>t(e)))}}function E(t){return!!t&&!!t.match(/[\w\.:]+/)}function R(t){"function"==typeof t.dispose&&t.dispose()}var $=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},B=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},I=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))}},G=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 $(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new I;for(const n of t)_(n,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof $){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName))continue;if(this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function _(t,e,n,i){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof $?q({baseGrammar:o,selfGrammar:r},i):H(t.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},i);const s=n.injections(t.scopeName);if(s)for(const t of s)i.add(new $(t))}function H(t,e,n){if(e.repository&&e.repository[t]){z([e.repository[t]],e,n)}}function q(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function z(t,e,n){for(const i of t){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const t=i.repository?d({},e.repository,i.repository):e.repository;Array.isArray(i.patterns)&&z(i.patterns,{...e,repository:t},n);const r=i.include;if(!r)continue;const o=X(r);switch(o.kind){case 0:q({...e,selfGrammar:e.baseGrammar},n);break;case 1:q(e,n);break;case 2:H(o.ruleName,{...e,repository:t},n);break;case 3:case 4:const i=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const r={baseGrammar:e.baseGrammar,selfGrammar:i,repository:t};4===o.kind?H(o.ruleName,r,n):q(r,n)}else 4===o.kind?n.add(new B(o.scopeName,o.ruleName)):n.add(new $(o.scopeName))}}}var F=class{constructor(){this.kind=0}},U=class{constructor(){this.kind=1}},W=class{constructor(t){this.ruleName=t,this.kind=2}},V=class{constructor(t){this.scopeName=t,this.kind=3}},J=class{constructor(t,e){this.scopeName=t,this.ruleName=e,this.kind=4}};function X(t){if("$base"===t)return new F;if("$self"===t)return new U;const e=t.indexOf("#");if(-1===e)return new V(t);if(0===e)return new W(t.substring(1));{const n=t.substring(0,e),i=t.substring(e+1);return new J(n,i)}}var Y=/\\(\d+)/,K=/\\(\d+)/g,Q=-1,Z=-2;var tt=class{constructor(t,e,n,i){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=y.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=y.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${f(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return this._nameIsCapturing&&null!==this._name&&null!==t&&null!==e?y.replaceCaptures(this._name,t,e):this._name}getContentName(t,e){return this._contentNameIsCapturing&&null!==this._contentName?y.replaceCaptures(this._contentName,t,e):this._contentName}},et=class extends tt{constructor(t,e,n,i,r){super(t,e,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,i){throw new Error("Not supported!")}},nt=class extends tt{constructor(t,e,n,i,r){super(t,e,n,null),this._match=new lt(i,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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new at,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},it=class extends tt{constructor(t,e,n,i,r){super(t,e,n,i),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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new at,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},rt=class extends tt{constructor(t,e,n,i,r,o,s,l,a,u){super(t,e,n,i),this._begin=new lt(r,this.id),this.beginCaptures=o,this._end=new lt(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.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,i){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,i)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new at;for(const e of this.patterns){t.getRule(e).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}},ot=class extends tt{constructor(t,e,n,i,r,o,s,l,a){super(t,e,n,i),this._begin=new lt(r,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new lt(s,Z),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new at;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,i){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,i)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new at,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},st=class t{static createCaptureRule(t,e,n,i,r){return t.registerRule((t=>new et(e,t,n,i,r)))}static getCompiledRuleId(e,n,i){return e.id||n.registerRule((r=>{if(e.id=r,e.match)return new nt(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,i));if(void 0===e.begin){e.repository&&(i=d({},i,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new it(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(r,n,i))}return e.while?new ot(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,i),t._compilePatterns(e.patterns,n,i)):new rt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.end,t._compileCaptures(e.endCaptures||e.captures,n,i),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,i))})),e.id}static _compileCaptures(e,n,i){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let t=0;t<=o;t++)r[t]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const s=parseInt(o,10);let l=0;e[o].patterns&&(l=t.getCompiledRuleId(e[o],n,i)),r[s]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return r}static _compilePatterns(e,n,i){let r=[];if(e)for(let o=0,s=e.length;o<s;o++){const s=e[o];let l=-1;if(s.include){const e=X(s.include);switch(e.kind){case 0:case 1:l=t.getCompiledRuleId(i[s.include],n,i);break;case 2:let r=i[e.ruleName];r&&(l=t.getCompiledRuleId(r,n,i));break;case 3:case 4:const o=e.scopeName,a=4===e.kind?e.ruleName:null,u=n.getExternalGrammar(o,i);if(u)if(a){let e=u.repository[a];e&&(l=t.getCompiledRuleId(e,n,u.repository))}else l=t.getCompiledRuleId(u.repository.$self,n,u.repository)}}else l=t.getCompiledRuleId(s,n,i);if(-1!==l){const t=n.getRule(l);let e=!1;if((t instanceof it||t instanceof rt||t instanceof ot)&&t.hasMissingPatterns&&0===t.patterns.length&&(e=!0),e)continue;r.push(l)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},lt=class t{constructor(t,e){if(t){const e=t.length;let n=0,i=[],r=!1;for(let o=0;o<e;o++){if("\\"===t.charAt(o)&&o+1<e){const e=t.charAt(o+1);"z"===e?(i.push(t.substring(n,o)),i.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==e&&"G"!==e||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=t:(i.push(t.substring(n,e)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=e,this.hasBackReferences=Y.test(this.source)}clone(){return new t(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,e){let n=e.map((e=>t.substring(e.start,e.end)));return K.lastIndex=0,this.source.replace(K,((t,e)=>j(n[parseInt(e,10)]||"")))}_buildAnchorCache(){let t,e,n,i,r=[],o=[],s=[],l=[];for(t=0,e=this.source.length;t<e;t++)n=this.source.charAt(t),r[t]=n,o[t]=n,s[t]=n,l[t]=n,"\\"===n&&t+1<e&&(i=this.source.charAt(t+1),"A"===i?(r[t+1]="￿",o[t+1]="￿",s[t+1]="A",l[t+1]="A"):"G"===i?(r[t+1]="￿",o[t+1]="G",s[t+1]="￿",l[t+1]="G"):(r[t+1]=i,o[t+1]=i,s[t+1]=i,l[t+1]=i),t++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:s.join(""),A1_G1:l.join("")}}resolveAnchors(t,e){return this.hasAnchor&&this._anchorCache?t?e?this._anchorCache.A1_G1:this._anchorCache.A1_G0:e?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},at=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((t=>t.source));this._cached=new ut(t,e,this._items.map((t=>t.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 i=this._items.map((t=>t.resolveAnchors(e,n)));return new ut(t,i,this._items.map((t=>t.ruleId)))}},ut=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){"function"==typeof this.scanner.dispose&&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("\n")}findNextMatchSync(t,e,n){const i=this.scanner.findNextMatchSync(t,e,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},ct=class{constructor(t,e){this.languageId=t,this.tokenType=e}},mt=class t{constructor(t,e){this._getBasicScopeAttributes=new k((t=>{const e=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new ct(e,n)})),this._defaultAttributes=new ct(t,8),this._embeddedLanguagesMatcher=new ht(Object.entries(e||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(e){const n=e.match(t.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!")}};mt._NULL_SCOPE_METADATA=new ct(0,0),mt.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;var pt=mt,ht=class{constructor(t){if(0===t.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map((([t,e])=>j(t)));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);return e?this.values.get(e[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var dt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ft(t,e,n,i,r,o,s,l){const a=e.content.length;let u=!1,c=-1;if(s){const s=function(t,e,n,i,r,o){let s=r.beginRuleCapturedEOL?0:-1;const l=[];for(let e=r;e;e=e.pop()){const n=e.getRule(t);n instanceof ot&&l.push({rule:n,stack:e})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:l,findOptions:u}=yt(a.rule,t,a.stack.endRule,n,i===s),c=l.findNextMatchSync(e,i,u);if(!c){r=a.stack.pop();break}if(c.ruleId!==Z){r=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(o.produce(a.stack,c.captureIndices[0].start),bt(t,e,n,a.stack,o,a.rule.whileCaptures,c.captureIndices),o.produce(a.stack,c.captureIndices[0].end),s=c.captureIndices[0].end,c.captureIndices[0].end>i&&(i=c.captureIndices[0].end,n=!1))}return{stack:r,linePos:i,anchorPosition:s,isFirstLine:n}}(t,e,n,i,r,o);r=s.stack,i=s.linePos,n=s.isFirstLine,c=s.anchorPosition}const m=Date.now();for(;!u;){if(0!==l){if(Date.now()-m>l)return new dt(r,!0)}p()}return new dt(r,!1);function p(){const s=function(t,e,n,i,r,o){const s=function(t,e,n,i,r,o){const s=r.getRule(t),{ruleScanner:l,findOptions:a}=gt(s,t,r.endRule,n,i===o),u=l.findNextMatchSync(e,i,a);if(u)return{captureIndices:u.captureIndices,matchedRuleId:u.ruleId};return null}(t,e,n,i,r,o),l=t.getInjections();if(0===l.length)return s;const a=function(t,e,n,i,r,o,s){let l,a=Number.MAX_VALUE,u=null,c=0;const m=o.contentNameScopesList.getScopeNames();for(let o=0,p=t.length;o<p;o++){const p=t[o];if(!p.matcher(m))continue;const h=e.getRule(p.ruleId),{ruleScanner:d,findOptions:f}=gt(h,e,null,i,r===s),g=d.findNextMatchSync(n,r,f);if(!g)continue;const y=g.captureIndices[0].start;if(!(y>=a)&&(a=y,u=g.captureIndices,l=g.ruleId,c=p.priority,a===r))break}if(u)return{priorityMatch:-1===c,captureIndices:u,matchedRuleId:l};return null}(l,t,e,n,i,r,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,c=a.captureIndices[0].start;if(c<u||a.priorityMatch&&c===u)return a;return s}(t,e,n,i,r,c);if(!s)return o.produce(r,a),void(u=!0);const l=s.captureIndices,m=s.matchedRuleId,p=!!(l&&l.length>0)&&l[0].end>i;if(m===Q){const s=r.getRule(t);o.produce(r,l[0].start),r=r.withContentNameScopesList(r.nameScopesList),bt(t,e,n,r,o,s.endCaptures,l),o.produce(r,l[0].end);const m=r;if(r=r.parent,c=m.getAnchorPos(),!p&&m.getEnterPos()===i)return r=m,o.produce(r,a),void(u=!0)}else{const s=t.getRule(m);o.produce(r,l[0].start);const h=r,d=s.getName(e.content,l),f=r.contentNameScopesList.pushAttributed(d,t);if(r=r.push(m,i,c,l[0].end===a,null,f,f),s instanceof rt){const i=s;bt(t,e,n,r,o,i.beginCaptures,l),o.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.endHasBackReferences&&(r=r.withEndRule(i.getEndWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),o.produce(r,a),void(u=!0)}else if(s instanceof ot){const i=s;bt(t,e,n,r,o,i.beginCaptures,l),o.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.whileHasBackReferences&&(r=r.withEndRule(i.getWhileWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),o.produce(r,a),void(u=!0)}else{if(bt(t,e,n,r,o,s.captures,l),o.produce(r,l[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,a),void(u=!0)}}l[0].end>i&&(i=l[0].end,n=!1)}}function gt(t,e,n,i,r){return{ruleScanner:t.compileAG(e,n,i,r),findOptions:0}}function yt(t,e,n,i,r){return{ruleScanner:t.compileWhileAG(e,n,i,r),findOptions:0}}function bt(t,e,n,i,r,o,s){if(0===o.length)return;const l=e.content,a=Math.min(o.length,s.length),u=[],c=s[0].end;for(let e=0;e<a;e++){const a=o[e];if(null===a)continue;const m=s[e];if(0===m.length)continue;if(m.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=m.start;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?r.produceFromScopes(u[u.length-1].scopes,m.start):r.produce(i,m.start),a.retokenizeCapturedWithRuleId){const e=a.getName(l,s),o=i.contentNameScopesList.pushAttributed(e,t),u=a.getContentName(l,s),c=o.pushAttributed(u,t),p=i.push(a.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,c),h=t.createOnigString(l.substring(0,m.end));ft(t,h,n&&0===m.start,m.start,p,r,!1,0),R(h);continue}const p=a.getName(l,s);if(null!==p){const e=(u.length>0?u[u.length-1].scopes:i.contentNameScopesList).pushAttributed(p,t);u.push(new wt(e,m.end))}}for(;u.length>0;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var wt=class{constructor(t,e){this.scopes=t,this.endPos=e}};function vt(t,e,n,i,r){const o=D(e,jt),s=st.getCompiledRuleId(n,i,r.repository);for(const n of o)t.push({debugSelector:e,matcher:n.matcher,ruleId:s,grammar:r,priority:n.priority})}function jt(t,e){if(e.length<t.length)return!1;let n=0;return t.every((t=>{for(let i=n;i<e.length;i++)if(kt(e[i],t))return n=i+1,!0;return!1}))}function kt(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 St=class{constructor(t,e,n,i,r,o,s,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new pt(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=xt(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const t of Object.keys(r)){const e=D(t,jt);for(const n of e)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[t]})}}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=t=>t===this._rootScopeName?this._grammar:this.getExternalGrammar(t),e=[],n=this._rootScopeName,i=t(n);if(i){const t=i.injections;if(t)for(let n in t)vt(e,n,t[n],this,i);const r=this._grammarRepository.injections(n);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&vt(e,t,n,this,n)}}))}return e.sort(((t,e)=>t.priority-e.priority)),e}getInjections(){return null===this._injections&&(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]=xt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const i=this._tokenize(t,e,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(t,e,n=0){const i=this._tokenize(t,e,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(t,e,n,i){let r;if(-1===this._rootId&&(this._rootId=st.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),e&&e!==Tt.NULL)r=!1,e.reset();else{r=!0;const t=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),i=N.set(0,t.languageId,t.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let s;s=o?Ct.createRootAndLookUpScopeName(o,i,this):Ct.createRoot("unknown",i),e=new Tt(null,this._rootId,-1,-1,!1,null,s,s)}t+="\n";const o=this.createOnigString(t),s=o.content.length,l=new Ot(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=ft(this,o,r,0,e,l,!0,i);return R(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function xt(t,e){return(t=h(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 Ct=class t{constructor(t,e,n){this.parent=t,this.scopePath=e,this.tokenAttributes=n}static fromExtension(e,n){let i=e,r=e?.scopePath??null;for(const e of n)r=x.push(r,e.scopeNames),i=new t(i,r,e.encodedTokenAttributes);return i}static createRoot(e,n){return new t(null,new x(null,e),n)}static createRootAndLookUpScopeName(e,n,i){const r=i.getMetadataForScope(e),o=new x(null,e),s=i.themeProvider.themeMatch(o),l=t.mergeAttributes(n,r,s);return new t(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.scopeName!==e.scopeName||t.tokenAttributes!==e.tokenAttributes)return!1;t=t.parent,e=e.parent}}static mergeAttributes(t,e,n){let i=-1,r=0,o=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,o=n.backgroundId),N.set(t,e.languageId,e.tokenType,null,i,r,o)}pushAttributed(e,n){if(null===e)return this;if(-1===e.indexOf(" "))return t._pushAttributed(this,e,n);const i=e.split(/ /g);let r=this;for(const e of i)r=t._pushAttributed(r,e,n);return r}static _pushAttributed(e,n,i){const r=i.getMetadataForScope(n),o=e.scopePath.push(n),s=i.themeProvider.themeMatch(o),l=t.mergeAttributes(e.tokenAttributes,r,s);return new t(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?e.reverse():void 0}},Lt=class t{constructor(t,e,n,i,r,o,s,l){this.parent=t,this.ruleId=e,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=l,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return null!==e&&t._equals(this,e)}static _equals(t,e){return t===e||!!this._structuralEquals(t,e)&&Ct.equals(t.contentNameScopesList,e.contentNameScopesList)}static _structuralEquals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.depth!==e.depth||t.ruleId!==e.ruleId||t.endRule!==e.endRule)return!1;t=t.parent,e=e.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,i,r,o,s,l){return new t(this,e,n,i,r,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,e){return this.parent&&(e=this.parent._writeString(t,e)),t[e++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,e}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(e){return this.endRule===e?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let e=this;for(;e&&e._enterPos===t._enterPos;){if(e.ruleId===t.ruleId)return!0;e=e.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const i=Ct.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,Ct.fromExtension(i,n.contentNameScopesList))}};Lt.NULL=new Lt(null,0,0,0,!1,null,null,null);var Tt=Lt,At=class{constructor(t,e){this.allowAny=!1,this.balancedBracketScopes=t.flatMap((t=>"*"===t?(this.allowAny=!0,[]):D(t,jt).map((t=>t.matcher)))),this.unbalancedBracketScopes=e.flatMap((t=>D(t,jt).map((t=>t.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!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}},Ot=class{constructor(t,e,n,i){this.balancedBracketSelectors=i,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){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const e=t?.getScopeNames()??[];for(const t of this._tokenTypeOverrides)t.matcher(e)&&(n=N.set(n,0,t.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(e))}return i&&(n=N.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=e):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=e))}const n=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(),0===this._tokens.length&&(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()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let t=0,e=this._binaryTokens.length;t<e;t++)n[t]=this._binaryTokens[t];return n}},Mt=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,i,r){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,function(t,e,n,i,r,o,s,l){return new St(t,e,n,i,r,o,s,l)}(t,o,e,n,i,r,this,this._onigLib))}return this._grammars.get(t)}},Pt=class{constructor(t){this._options=t,this._syncRegistry=new Mt(S.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(S.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new At(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,i,r){const o=new G(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map((t=>this._loadSingleGrammar(t.scopeName))),o.processQueue();return this._grammarForScopeName(t,e,n,i,r)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const e=this._options.loadGrammar(t);if(e){const n="function"==typeof this._options.getInjections?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,i=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,e=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(t,e,n,i,r)}},Nt=Tt.NULL;function Dt(t,e=!1){const n=t.split(/(\r?\n)/g);let i=0;const r=[];for(let t=0;t<n.length;t+=2){const o=e?n[t]+(n[t+1]||""):n[t];r.push([o,i]),i+=n[t].length,i+=n[t+1]?.length||0}return r}function Et(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Rt(t){return"ansi"===t||Et(t)}function $t(t){return"none"===t}function Bt(t){return $t(t)}function It(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const e of n)e&&!t.properties.class.includes(e)&&t.properties.class.push(e);return t}async function Gt(t){return Promise.resolve("function"==typeof t?t():t).then((t=>t.default||t))}function _t(t,e){const n="string"==typeof t?{}:{...t.colorReplacements},i="string"==typeof t?t:t.name;for(const[t,r]of Object.entries(e?.colorReplacements||{}))"string"==typeof r?n[t]=r:t===i&&Object.assign(n,r);return n}function Ht(t,e){return t&&e?.[t?.toLowerCase()]||t}function qt(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&p.Italic&&(e["font-style"]="italic"),t.fontStyle&p.Bold&&(e["font-weight"]="bold"),t.fontStyle&p.Underline&&(e["text-decoration"]="underline")),e}function zt(t){return Object.entries(t).map((([t,e])=>`${t}:${e}`)).join(";")}class Ft extends Error{constructor(t){super(t),this.name="ShikiError"}}function Ut(){const t=new WeakMap;function e(e){if(!t.has(e.meta)){const n=function(t){const e=Dt(t,!0).map((([t])=>t));return{lines:e,indexToPos:function(n){if(n===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=n,r=0;for(const t of e){if(i<t.length)break;i-=t.length,r++}return{line:r,character:i}},posToIndex:function(t,n){let i=0;for(let n=0;n<t;n++)i+=e[n].length;return i+=n,i}}}(e.source);function i(t){if("number"==typeof t){if(t<0||t>e.source.length)throw new Ft(`Invalid decoration offset: ${t}. Code length: ${e.source.length}`);return{...n.indexToPos(t),offset:t}}{const e=n.lines[t.line];if(void 0===e)throw new Ft(`Invalid decoration position ${JSON.stringify(t)}. Lines length: ${n.lines.length}`);if(t.character<0||t.character>e.length)throw new Ft(`Invalid decoration position ${JSON.stringify(t)}. Line ${t.line} length: ${e.length}`);return{...t,offset:n.posToIndex(t.line,t.character)}}}const r=(e.options.decorations||[]).map((t=>({...t,start:i(t.start),end:i(t.end)})));!function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Ft(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=e+1;i<t.length;i++){const e=t[i],r=n.start.offset<e.start.offset&&e.start.offset<n.end.offset,o=n.start.offset<e.end.offset&&e.end.offset<n.end.offset,s=e.start.offset<n.start.offset&&n.start.offset<e.end.offset,l=e.start.offset<n.end.offset&&n.end.offset<e.end.offset;if(r||o||s||l){if(o&&o)continue;if(s&&l)continue;throw new Ft(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(e.start)} intersect.`)}}}}(r),t.set(e.meta,{decorations:r,converter:n,source:e.source})}return t.get(e.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const n=function(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort(((t,e)=>t-e));return n.length?t.map((t=>t.flatMap((t=>{const e=n.filter((e=>t.offset<e&&e<t.offset+t.content.length)).map((e=>e-t.offset)).sort(((t,e)=>t-e));return e.length?function(t,e){let n=0;const i=[];for(const r of e)r>n&&i.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&i.push({...t,content:t.content.slice(n),offset:t.offset+n}),i}(t,e):t})))):t}(t,e(this).decorations.flatMap((t=>[t.start.offset,t.end.offset])));return n},code(t){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(t.children).filter((t=>"element"===t.type&&"span"===t.tagName));if(i.length!==n.converter.lines.length)throw new Ft(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(t,e,n,r){const o=i[t];let l="",a=-1,u=-1;if(0===e&&(a=0),0===n&&(u=0),n===Number.POSITIVE_INFINITY&&(u=o.children.length),-1===a||-1===u)for(let t=0;t<o.children.length;t++)l+=Wt(o.children[t]),-1===a&&l.length===e&&(a=t+1),-1===u&&l.length===n&&(u=t+1);if(-1===a)throw new Ft(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===u)throw new Ft(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);const c=o.children.slice(a,u);if(r.alwaysWrap||c.length!==o.children.length)if(r.alwaysWrap||1!==c.length||"element"!==c[0].type){const t={type:"element",tagName:"span",properties:{},children:c};s(t,r,"wrapper"),o.children.splice(a,c.length,t)}else s(c[0],r,"token");else s(o,r,"line")}function o(t,e){i[t]=s(i[t],e,"line")}function s(t,e,n){const i=e.properties||{},r=e.transform||(t=>t);return t.tagName=e.tagName||"span",t.properties={...t.properties,...i,class:t.properties.class},e.properties?.class&&It(t,e.properties.class),t=r(t,n)||t}const l=[],a=n.decorations.sort(((t,e)=>e.start.offset-t.start.offset));for(const t of a){const{start:e,end:n}=t;if(e.line===n.line)r(e.line,e.character,n.character,t);else if(e.line<n.line){r(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let i=e.line+1;i<n.line;i++)l.unshift((()=>o(i,t)));r(n.line,0,n.character,t)}}l.forEach((t=>t()))}}}function Wt(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(Wt).join(""):""}const Vt=[Ut()];function Jt(t){return[...t.transformers||[],...Vt]}class Xt{_stack;lang;theme;static initial(t,e){return new Xt(Nt,t,e)}constructor(t,e,n){this._stack=t,this.lang=e,this.theme=n}get scopes(){return function(t){const e=[],n=new Set;function i(t){if(n.has(t))return;n.add(t);const r=t?.nameScopesList?.scopeName;r&&e.push(r),t.parent&&i(t.parent)}return i(t),e}(this._stack)}toJSON(){return{lang:this.lang,theme:this.theme,scopes:this.scopes}}}var Yt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Kt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Qt(t,e){const n=t.indexOf("[",e);if(-1!==n){const e=t.indexOf("m",n);return{sequence:t.substring(n+2,e).split(";"),startPosition:n,position:e+1}}return{position:t.length}}function Zt(t,e){let n=1;const i=t[e+n++];let r;if("2"===i){const i=[t[e+n++],t[e+n++],t[e+n]].map((t=>Number.parseInt(t)));3!==i.length||i.some((t=>Number.isNaN(t)))||(r={type:"rgb",rgb:i})}else if("5"===i){const i=Number.parseInt(t[e+n]);Number.isNaN(i)||(r={type:"table",index:Number(i)})}return[n,r]}function te(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Number.parseInt(i);if(!Number.isNaN(r))if(0===r)e.push({type:"resetAll"});else if(r<=9){Kt[r]&&e.push({type:"setDecoration",value:Kt[r]})}else if(r<=29){const t=Kt[r-20];t&&e.push({type:"resetDecoration",value:t})}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Yt[r-30]}});else if(38===r){const[i,r]=Zt(t,n);r&&e.push({type:"setForegroundColor",value:r}),n+=i}else if(39===r)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Yt[r-40]}});else if(48===r){const[i,r]=Zt(t,n);r&&e.push({type:"setBackgroundColor",value:r}),n+=i}else 49===r?e.push({type:"resetBackgroundColor"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Yt[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Yt[r-100+8]}})}return e}var ee={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 ne(t=ee){function e(e){return t[e]}function n(t){return`#${t.map((t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0"))).join("")}`}let i;function r(t){return function(){if(i)return i;i=[];for(let t=0;t<Yt.length;t++)i.push(e(Yt[t]));let t=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let o=0;o<6;o++)i.push(n([t[e],t[r],t[o]]));let r=8;for(let t=0;t<24;t++,r+=10)i.push(n([r,r,r]));return i}()[t]}return{value:function(t){switch(t.type){case"named":return e(t.name);case"rgb":return n(t.rgb);case"table":return r(t.index)}}}}function ie(t,e,n){const i=_t(t,n),r=Dt(e),o=ne(Object.fromEntries(Yt.map((e=>[e,t.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]])))),s=function(){let t=null,e=null,n=new Set;return{parse(i){const r=[];let o=0;do{const s=Qt(i,o),l=s.sequence?i.substring(o,s.startPosition):i.substring(o);if(l.length>0&&r.push({value:l,foreground:t,background:e,decorations:new Set(n)}),s.sequence){const i=te(s.sequence);for(const r of i)"resetAll"===r.type?(t=null,e=null,n.clear()):"resetForegroundColor"===r.type?t=null:"resetBackgroundColor"===r.type?e=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of i)"setForegroundColor"===r.type?t=r.value:"setBackgroundColor"===r.type?e=r.value:"setDecoration"===r.type&&n.add(r.value)}o=s.position}while(o<i.length);return r}}}();return r.map((e=>s.parse(e[0]).map((n=>{let r,s;n.decorations.has("reverse")?(r=n.background?o.value(n.background):t.bg,s=n.foreground?o.value(n.foreground):t.fg):(r=n.foreground?o.value(n.foreground):t.fg,s=n.background?o.value(n.background):void 0),r=Ht(r,i),s=Ht(s,i),n.decorations.has("dim")&&(r=function(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e){if(e[3]){const t=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${t}`}return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map((t=>`${t}${t}`)).join("")}80`}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}(r));let l=p.None;return n.decorations.has("bold")&&(l|=p.Bold),n.decorations.has("italic")&&(l|=p.Italic),n.decorations.has("underline")&&(l|=p.Underline),{content:n.value,offset:e[1],color:r,bgColor:s,fontStyle:l}}))))}function re(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(Et(i)||$t(r))return Dt(e).map((t=>[{content:t[0],offset:t[1]}]));const{theme:o,colorMap:s}=t.setTheme(r);if("ansi"===i)return ie(o,e,n);const l=t.getLanguage(i);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Ft(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(n.grammarState.theme!==r)throw new Ft(`Grammar state theme "${n.grammarState.theme}" does not match highlight theme "${r}"`)}return function(t,e,n,i,r){return oe(t,e,n,i,r).tokens}(e,l,o,s,n)}function oe(t,e,n,i,r){const o=_t(n,r),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=r,a=Dt(t);let u=r.grammarState?function(t){if(!(t instanceof Xt))throw new Ft("Invalid grammar state");return t._stack}(r.grammarState):null!=r.grammarContextCode?oe(r.grammarContextCode,e,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Nt,c=[];const m=[];for(let t=0,h=a.length;t<h;t++){const[h,d]=a[t];if(""===h){c=[],m.push([]);continue}if(s>0&&h.length>=s){c=[],m.push([{content:h,offset:d,color:"",fontStyle:0}]);continue}let f,g,y;r.includeExplanation&&(f=e.tokenizeLine(h,u),g=f.tokens,y=0);const b=e.tokenizeLine2(h,u,l),w=b.tokens.length/2;for(let t=0;t<w;t++){const e=b.tokens[2*t],s=t+1<w?b.tokens[2*t+2]:h.length;if(e===s)continue;const l=b.tokens[2*t+1],a=Ht(i[N.getForeground(l)],o),u=N.getFontStyle(l),m={content:h.substring(e,s),offset:d+e,color:a,fontStyle:u};if(r.includeExplanation){const t=[];if("scopeName"!==r.includeExplanation)for(const e of n.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map((t=>t.trim()));break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map((t=>t.split(/ /)))})}m.explanation=[];let i=0;for(;e+i<s;){const e=g[y],n=h.substring(e.startIndex,e.endIndex);i+=n.length,m.explanation.push({content:n,scopes:"scopeName"===r.includeExplanation?(p=e.scopes,p.map((t=>({scopeName:t})))):se(t,e.scopes)}),y+=1}}c.push(m)}m.push(c),c=[],u=b.ruleStack}var p;return{tokens:m,stateStack:u}}function se(t,e){const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];n[i]={scopeName:r,themeMatches:ue(t,r,e.slice(0,i))}}return n}function le(t,e){return t===e||e.substring(0,t.length)===t&&"."===e[t.length]}function ae(t,e,n){if(!le(t[t.length-1],e))return!1;let i=t.length-2,r=n.length-1;for(;i>=0&&r>=0;)le(t[i],n[r])&&(i-=1),r-=1;return-1===i}function ue(t,e,n){const i=[];for(const{selectors:r,settings:o}of t)for(const t of r)if(ae(t,e,n)){i.push(o);break}return i}function ce(t,e,n){const i=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))),r=function(...t){const e=t.map((()=>[])),n=t.length;for(let i=0;i<t[0].length;i++){const r=t.map((t=>t[i])),o=e.map((()=>[]));e.forEach(((t,e)=>t.push(o[e])));const s=r.map((()=>0)),l=r.map((t=>t[0]));for(;l.every((t=>t));){const t=Math.min(...l.map((t=>t.content.length)));for(let e=0;e<n;e++){const n=l[e];n.content.length===t?(o[e].push(n),s[e]+=1,l[e]=r[e][s[e]]):(o[e].push({...n,content:n.content.slice(0,t)}),l[e]={...n,content:n.content.slice(t),offset:n.offset+t})}}}return e}(...i.map((i=>re(t,e,{...n,theme:i.theme})))),o=r[0].map(((t,e)=>t.map(((t,o)=>{const s={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in n&&n.includeExplanation&&(s.explanation=t.explanation),r.forEach(((t,n)=>{const{content:r,explanation:l,offset:a,...u}=t[e][o];s.variants[i[n].color]=u})),s}))));return o}function me(t,e,n){let i,r,o,s,l;if("themes"in n){const{defaultColor:a="light",cssVariablePrefix:u="--shiki-"}=n,c=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))).sort(((t,e)=>t.color===a?-1:e.color===a?1:0));if(0===c.length)throw new Ft("`themes` option must not be empty");const m=ce(t,e,n);if(a&&!c.find((t=>t.color===a)))throw new Ft(`\`themes\` option must contain the defaultColor key \`${a}\``);const p=c.map((e=>t.getTheme(e.theme))),h=c.map((t=>t.color));o=m.map((t=>t.map((t=>function(t,e,n,i){const r={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map((e=>qt(t.variants[e]))),s=new Set(o.flatMap((t=>Object.keys(t)))),l=o.reduce(((t,r,o)=>{for(const l of s){const s=r[l]||"inherit";if(0===o&&i)t[l]=s;else{const i="color"===l?"":"background-color"===l?"-bg":`-${l}`,r=n+e[o]+("color"===l?"":i);t[l]?t[l]+=`;${r}:${s}`:t[l]=`${r}:${s}`}}return t}),{});return r.htmlStyle=i?zt(l):Object.values(l).join(";"),r}(t,h,u,a)))));const d=c.map((t=>_t(t.theme,n)));r=c.map(((t,e)=>(0===e&&a?"":`${u+t.color}:`)+(Ht(p[e].fg,d[e])||"inherit"))).join(";"),i=c.map(((t,e)=>(0===e&&a?"":`${u+t.color}-bg:`)+(Ht(p[e].bg,d[e])||"inherit"))).join(";"),s=`shiki-themes ${p.map((t=>t.name)).join(" ")}`,l=a?void 0:[r,i].join(";")}else{if(!("theme"in n))throw new Ft("Invalid options, either `theme` or `themes` must be provided");{const l=_t(n.theme,n);o=re(t,e,n);const a=t.getTheme(n.theme);i=Ht(a.bg,l),r=Ht(a.fg,l),s=a.name}}return{tokens:o,fg:r,bg:i,themeName:s,rootStyle:l}}function pe(t,e,n,i={meta:{},options:n,codeToHast:(e,n)=>pe(t,e,n),codeToTokens:(e,n)=>me(t,e,n)}){let r=e;for(const t of Jt(n))r=t.preprocess?.call(i,r,n)||r;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:u}=me(t,r,n);const{mergeWhitespaces:c=!0}=n;!0===c?o=function(t){return t.map((t=>{const e=[];let n="",i=0;return t.forEach(((r,o)=>{const s=!(r.fontStyle&&r.fontStyle&p.Underline);s&&r.content.match(/^\s+$/)&&t[o+1]?(i||(i=r.offset),n+=r.content):n?(s?e.push({...r,offset:i,content:n+r.content}):e.push({content:n,offset:i},r),i=0,n=""):e.push(r)})),e}))}(o):"never"===c&&(o=function(t){return t.map((t=>t.flatMap((t=>{if(t.content.match(/^\s+$/))return t;const e=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!e)return t;const[,n,i,r]=e;if(!n&&!r)return t;const o=[{...t,offset:t.offset+n.length,content:i}];return n&&o.unshift({content:n,offset:t.offset}),r&&o.push({content:r,offset:t.offset+n.length+i.length}),o}))))}(o));const m={...i,get source(){return r}};for(const t of Jt(n))o=t.tokens?.call(m,o)||o;return function(t,e,n){const i=Jt(e),r=[],o={type:"root",children:[]},{structure:s="classic"}=e;let l={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,tabindex:"0",...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter((([t])=>!t.startsWith("_"))))},children:[]},a={type:"element",tagName:"code",properties:{},children:r};const u=[],c={...n,structure:s,addClassToHast:It,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return l},get code(){return a},get lines(){return u}};if(t.forEach(((t,e)=>{e&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&r.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},l=0;for(const r of t){let t={type:"element",tagName:"span",properties:{},children:[{type:"text",value:r.content}]};const a=r.htmlStyle||zt(qt(r));a&&(t.properties.style=a);for(const r of i)t=r?.span?.call(c,t,e+1,l,n)||t;"inline"===s?o.children.push(t):"classic"===s&&n.children.push(t),l+=r.content.length}if("classic"===s){for(const t of i)n=t?.line?.call(c,n,e+1)||n;u.push(n),r.push(n)}})),"classic"===s){for(const t of i)a=t?.code?.call(c,a)||a;l.children.push(a);for(const t of i)l=t?.pre?.call(c,l)||l;o.children.push(l)}let m=o;for(const t of i)m=t?.root?.call(c,m)||m;return m}(o,{...n,fg:s,bg:l,themeName:a,rootStyle:u},m)}const he=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class de{constructor(t,e,n){this.property=t,this.normal=e,n&&(this.space=n)}}function fe(t,e){const n={},i={};let r=-1;for(;++r<t.length;)Object.assign(n,t[r].property),Object.assign(i,t[r].normal);return new de(n,i,e)}function ge(t){return t.toLowerCase()}de.prototype.property={},de.prototype.normal={},de.prototype.space=null;class ye{constructor(t,e){this.property=t,this.attribute=e}}ye.prototype.space=null,ye.prototype.boolean=!1,ye.prototype.booleanish=!1,ye.prototype.overloadedBoolean=!1,ye.prototype.number=!1,ye.prototype.commaSeparated=!1,ye.prototype.spaceSeparated=!1,ye.prototype.commaOrSpaceSeparated=!1,ye.prototype.mustUseProperty=!1,ye.prototype.defined=!1;let be=0;const we=Le(),ve=Le(),je=Le(),ke=Le(),Se=Le(),xe=Le(),Ce=Le();function Le(){return 2**++be}var Te=Object.freeze({__proto__:null,boolean:we,booleanish:ve,commaOrSpaceSeparated:Ce,commaSeparated:xe,number:ke,overloadedBoolean:je,spaceSeparated:Se});const Ae=Object.keys(Te);class Oe extends ye{constructor(t,e,n,i){let r=-1;if(super(t,e),Me(this,"space",i),"number"==typeof n)for(;++r<Ae.length;){const t=Ae[r];Me(this,Ae[r],(n&Te[t])===Te[t])}}}function Me(t,e,n){n&&(t[e]=n)}Oe.prototype.defined=!0;const Pe={}.hasOwnProperty;function Ne(t){const e={},n={};let i;for(i in t.properties)if(Pe.call(t.properties,i)){const r=t.properties[i],o=new Oe(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),e[i]=o,n[ge(i)]=i,n[ge(o.attribute)]=i}return new de(e,n,t.space)}const De=Ne({space:"xlink",transform:(t,e)=>"xlink:"+e.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ee=Ne({space:"xml",transform:(t,e)=>"xml:"+e.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Re(t,e){return e in t?t[e]:e}function $e(t,e){return Re(t,e.toLowerCase())}const Be=Ne({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$e,properties:{xmlns:null,xmlnsXLink:null}}),Ie=Ne({transform:(t,e)=>"role"===e?e:"aria-"+e.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:ve,ariaAutoComplete:null,ariaBusy:ve,ariaChecked:ve,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Se,ariaCurrent:null,ariaDescribedBy:Se,ariaDetails:null,ariaDisabled:ve,ariaDropEffect:Se,ariaErrorMessage:null,ariaExpanded:ve,ariaFlowTo:Se,ariaGrabbed:ve,ariaHasPopup:null,ariaHidden:ve,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Se,ariaLevel:ke,ariaLive:null,ariaModal:ve,ariaMultiLine:ve,ariaMultiSelectable:ve,ariaOrientation:null,ariaOwns:Se,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:ve,ariaReadOnly:ve,ariaRelevant:null,ariaRequired:ve,ariaRoleDescription:Se,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:ve,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),Ge=Ne({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$e,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xe,acceptCharset:Se,accessKey:Se,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Se,autoFocus:we,autoPlay:we,blocking:Se,capture:null,charSet:null,checked:we,cite:null,className:Se,cols:ke,colSpan:null,content:null,contentEditable:ve,controls:we,controlsList:Se,coords:ke|xe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:je,draggable:ve,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Se,height:ke,hidden:we,high:ke,href:null,hrefLang:null,htmlFor:Se,httpEquiv:Se,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Se,itemRef:Se,itemScope:we,itemType:Se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:we,optimum:ke,pattern:null,ping:Se,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Se,required:we,reversed:we,rows:ke,rowSpan:ke,sandbox:Se,scope:null,scoped:we,seamless:we,selected:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:ve,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ve,width:ke,wrap:null,align:null,aLink:null,archive:Se,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:ve,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:we,disableRemotePlayback:we,prefix:null,property:null,results:ke,security:null,unselectable:null}}),_e=Ne({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Re,properties:{about:Ce,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Se,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xe,g2:xe,glyphName:xe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:Ce,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ce,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ce,rev:Ce,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ce,requiredFeatures:Ce,requiredFonts:Ce,requiredFormats:Ce,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:Ce,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ce,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ce,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),He=/^data[-\w.:]+$/i,qe=/-[a-z]/g,ze=/[A-Z]/g;function Fe(t){return"-"+t.toLowerCase()}function Ue(t){return t.charAt(1).toUpperCase()}const We=fe([Ee,De,Be,Ie,Ge],"html"),Ve=fe([Ee,De,Be,Ie,_e],"svg"),Je={}.hasOwnProperty;function Xe(t,e){return t=t.replace(e.subset?function(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}(e.subset):/["&'<>`]/g,n),e.subset||e.escapeOnly?t:t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(t,n,i){return e.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,i.charCodeAt(n+2),e)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,n);function n(t,n,i){return e.format(t.charCodeAt(0),i.charCodeAt(n+1),e)}}const Ye=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ke={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Qe=["cent","copy","divide","gt","lt","not","para","times"],Ze={}.hasOwnProperty,tn={};let en;for(en in Ke)Ze.call(Ke,en)&&(tn[Ke[en]]=en);function nn(t,e,n){let i,r=function(t,e,n){const i="&#x"+t.toString(16).toUpperCase();return n&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(i=function(t,e,n,i){const r=String.fromCharCode(t);if(Ze.call(tn,r)){const t=tn[r],o="&"+t;return n&&Ye.includes(t)&&!Qe.includes(t)&&(!i||e&&61!==e&&/[^\da-z]/i.test(String.fromCharCode(e)))?o:o+";"}return""}(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const i=function(t,e,n){const i="&#"+String(t);return n&&e&&!/\d/.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function rn(t,e){return Xe(t,Object.assign({format:nn},e))}const on=/^>|^->|<!--|-->|--!>|<!-$/g,sn=[">"],ln=["<",">"];function an(t,e){const n=String(t);if("string"!=typeof e)throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;-1!==r;)i++,r=n.indexOf(e,r+e.length);return i}function un(t,e){const n=e||{};return(""===t[t.length-1]?[...t,""]:t).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}function cn(t){return t.join(" ").trim()}const mn=/[ \t\n\f\r]/g;function pn(t){return"object"==typeof t?"text"===t.type&&hn(t.value):hn(t)}function hn(t){return""===t.replace(mn,"")}const dn=yn(1),fn=yn(-1),gn=[];function yn(t){return function(e,n,i){const r=e?e.children:gn;let o=(n||0)+t,s=r[o];if(!i)for(;s&&pn(s);)o+=t,s=r[o];return s}}const bn={}.hasOwnProperty;function wn(t){return function(e,n,i){return bn.call(t,e.tagName)&&t[e.tagName](e,n,i)}}const vn=wn({body:function(t,e,n){const i=dn(n,e);return!i||"comment"!==i.type},caption:jn,colgroup:jn,dd:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(t,e,n){const i=dn(n,e);return Boolean(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:jn,html:function(t,e,n){const i=dn(n,e);return!i||"comment"!==i.type},li:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(t,e,n){const i=dn(n,e);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:kn,rt:kn,tbody:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:Sn,tfoot:function(t,e,n){return!dn(n,e)},th:Sn,thead:function(t,e,n){const i=dn(n,e);return Boolean(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"tr"===i.tagName}});function jn(t,e,n){const i=dn(n,e,!0);return!i||"comment"!==i.type&&!("text"===i.type&&pn(i.value.charAt(0)))}function kn(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function Sn(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}const xn=wn({body:function(t){const e=dn(t,-1,!0);return!(e&&("comment"===e.type||"text"===e.type&&pn(e.value.charAt(0))||"element"===e.type&&("meta"===e.tagName||"link"===e.tagName||"script"===e.tagName||"style"===e.tagName||"template"===e.tagName)))},colgroup:function(t,e,n){const i=fn(n,e),r=dn(t,-1,!0);if(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&vn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"col"===r.tagName)},head:function(t){const e=t.children,n=[];let i=-1;for(;++i<e.length;){const t=e[i];if("element"===t.type&&("title"===t.tagName||"base"===t.tagName)){if(n.includes(t.tagName))return!1;n.push(t.tagName)}}return e.length>0},html:function(t){const e=dn(t,-1);return!e||"comment"!==e.type},tbody:function(t,e,n){const i=fn(n,e),r=dn(t,-1);if(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&vn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"tr"===r.tagName)}});const Cn={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ln(t,e,n){const i=function(t,e){const n=ge(e);let i=e,r=ye;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&He.test(e)){if("-"===e.charAt(4)){const t=e.slice(5).replace(qe,Ue);i="data"+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=e.slice(4);if(!qe.test(t)){let n=t.replace(ze,Fe);"-"!==n.charAt(0)&&(n="-"+n),e="data"+n}}r=Oe}return new r(i,e)}(t.schema,e),r=t.settings.allowParseErrors&&"html"===t.schema.space?0:1,o=t.settings.allowDangerousCharacters?0:1;let s,l=t.quote;if(!i.overloadedBoolean||n!==i.attribute&&""!==n?(i.boolean||i.overloadedBoolean&&"string"!=typeof n)&&(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const a=rn(i.attribute,Object.assign({},t.settings.characterReferences,{subset:Cn.name[r][o]}));return!0===n?a:(n=Array.isArray(n)?(i.commaSeparated?un:cn)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n?a:(t.settings.preferUnquoted&&(s=rn(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Cn.unquoted[r][o]}))),s!==n&&(t.settings.quoteSmart&&an(n,l)>an(n,t.alternative)&&(l=t.alternative),s=l+rn(n,Object.assign({},t.settings.characterReferences,{subset:("'"===l?Cn.single:Cn.double)[r][o],attribute:!0}))+l),a+(s?"="+s:s)))}const Tn=["<","&"];function An(t,e,n,i){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?rn(t.value,Object.assign({},i.settings.characterReferences,{subset:Tn})):t.value}const On=function(t,e){const n=e||{};function i(e,...n){let r=i.invalid;const o=i.handlers;if(e&&Je.call(e,t)){const n=String(e[t]);r=Je.call(o,n)?o[n]:i.unknown}if(r)return r.call(this,e,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}("type",{invalid:function(t){throw new Error("Expected node, not `"+t+"`")},unknown:function(t){throw new Error("Cannot compile unknown node `"+t.type+"`")},handlers:{comment:function(t,e,n,i){return i.settings.bogusComments?"<?"+rn(t.value,Object.assign({},i.settings.characterReferences,{subset:sn}))+">":"\x3c!--"+t.value.replace(on,(function(t){return rn(t,Object.assign({},i.settings.characterReferences,{subset:ln}))}))+"--\x3e"},doctype:function(t,e,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(t,e,n,i){const r=i.schema,o="svg"!==r.space&&i.settings.omitOptionalTags;let s="svg"===r.space?i.settings.closeEmptyElements:i.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;"html"===r.space&&"svg"===t.tagName&&(i.schema=Ve);const u=function(t,e){const n=[];let i,r=-1;if(e)for(i in e)if(null!==e[i]&&void 0!==e[i]){const r=Ln(t,i,e[i]);r&&n.push(r)}for(;++r<n.length;){const e=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&'"'!==e&&"'"!==e&&(n[r]+=" ")}return n.join("")}(i,t.properties),c=i.all("html"===r.space&&"template"===t.tagName?t.content:t);return i.schema=r,c&&(s=!1),!u&&o&&xn(t,e,n)||(l.push("<",t.tagName,u?" "+u:""),s&&("svg"===r.space||i.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!i.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),s||o&&vn(t,e,n)||l.push("</"+t.tagName+">"),l.join("")},raw:function(t,e,n,i){return i.settings.allowDangerousHtml?t.value:An(t,0,n,i)},root:function(t,e,n,i){return i.all(t)},text:An}});const Mn={},Pn={},Nn=[];function Dn(t,e,n){return On(t,e,n,this)}function En(t){const e=[],n=t&&t.children||Nn;let i=-1;for(;++i<n.length;)e[i]=this.one(n[i],i,t);return e.join("")}function Rn(t,e,n){const i={meta:{},options:n,codeToHast:(e,n)=>pe(t,e,n),codeToTokens:(e,n)=>me(t,e,n)};let r=function(t,e){const n=e||Mn,i=n.quote||'"',r='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:Dn,all:En,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||he,characterReferences:n.characterReferences||Pn,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?Ve:We,quote:i,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}(pe(t,e,n,i));for(const t of Jt(n))r=t.postprocess?.call(i,r,n)||r;return r}function $n(){return"undefined"!=typeof performance?performance.now():Date.now()}const Bn=(t,e)=>t+(e-t%e)%e;async function In(t){let e,n;const i={};function r(t){n=t,i.HEAPU8=new Uint8Array(t),i.HEAPU32=new Uint32Array(t)}function o(t){try{return e.grow(t-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}const s="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e){return t?function(t,e,n=1024){const i=e+n;let r=e;for(;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&s)return s.decode(t.subarray(e,r));let o="";for(;e<r;){let n=t[e++];if(!(128&n)){o+=String.fromCharCode(n);continue}const i=63&t[e++];if(192==(224&n)){o+=String.fromCharCode((31&n)<<6|i);continue}const r=63&t[e++];if(n=224==(240&n)?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&t[e++],n<65536)o+=String.fromCharCode(n);else{const t=n-65536;o+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return o}(i.HEAPU8,t,e):""}const a={emscripten_get_now:$n,emscripten_memcpy_big:function(t,e,n){i.HEAPU8.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){const e=i.HEAPU8.length,n=2147483648;if((t>>>=0)>n)return!1;for(let i=1;i<=4;i*=2){let r=e*(1+.2/i);r=Math.min(r,t+100663296);if(o(Math.min(n,Bn(Math.max(t,r),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:a,wasi_snapshot_preview1:a},o=await t(n);e=o.memory,r(e.buffer),Object.assign(i,o),i.UTF8ToString=l}(),i}let Gn,_n=null;class Hn{static _utf8ByteLength(t){let e=0;for(let n=0,i=t.length;n<i;n++){const r=t.charCodeAt(n);let o=r,s=!1;if(r>=55296&&r<=56319&&n+1<i){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(o=65536+(r-55296<<10)|e-56320,s=!0)}e+=o<=127?1:o<=2047?2:o<=65535?3:4,s&&n++}return e}utf16Length;utf8Length;utf16Value;utf8Value;utf16OffsetToUtf8;utf8OffsetToUtf16;constructor(t){const e=t.length,n=Hn._utf8ByteLength(t),i=n!==e,r=i?new Uint32Array(e+1):null;i&&(r[e]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=e);const s=new Uint8Array(n);let l=0;for(let n=0;n<e;n++){const a=t.charCodeAt(n);let u=a,c=!1;if(a>=55296&&a<=56319&&n+1<e){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(u=65536+(a-55296<<10)|e-56320,c=!0)}i&&(r[n]=l,c&&(r[n+1]=l),u<=127?o[l+0]=n:u<=2047?(o[l+0]=n,o[l+1]=n):u<=65535?(o[l+0]=n,o[l+1]=n,o[l+2]=n):(o[l+0]=n,o[l+1]=n,o[l+2]=n,o[l+3]=n)),u<=127?s[l++]=u:u<=2047?(s[l++]=192|(1984&u)>>>6,s[l++]=128|(63&u)>>>0):u<=65535?(s[l++]=224|(61440&u)>>>12,s[l++]=128|(4032&u)>>>6,s[l++]=128|(63&u)>>>0):(s[l++]=240|(1835008&u)>>>18,s[l++]=128|(258048&u)>>>12,s[l++]=128|(4032&u)>>>6,s[l++]=128|(63&u)>>>0),c&&n++}this.utf16Length=e,this.utf8Length=n,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=o}createString(t){const e=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,e),e}}class qn{static LAST_ID=0;static _sharedPtr=0;static _sharedPtrInUse=!1;id=++qn.LAST_ID;_onigBinding;content;utf16Length;utf8Length;utf16OffsetToUtf8;utf8OffsetToUtf16;ptr;constructor(t){if(!_n)throw new Ft("Must invoke loadWasm first.");this._onigBinding=_n,this.content=t;const e=new Hn(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!qn._sharedPtrInUse?(qn._sharedPtr||(qn._sharedPtr=_n.omalloc(1e4)),qn._sharedPtrInUse=!0,_n.HEAPU8.set(e.utf8Value,qn._sharedPtr),this.ptr=qn._sharedPtr):this.ptr=e.createString(_n)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===qn._sharedPtr?qn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}}class zn{_onigBinding;_ptr;constructor(t){if(!_n)throw new Ft("Must invoke loadWasm first.");const e=[],n=[];for(let i=0,r=t.length;i<r;i++){const r=new Hn(t[i]);e[i]=r.createString(_n),n[i]=r.utf8Length}const i=_n.omalloc(4*t.length);_n.HEAPU32.set(e,i/4);const r=_n.omalloc(4*t.length);_n.HEAPU32.set(n,r/4);const o=_n.createOnigScanner(i,r,t.length);for(let n=0,i=t.length;n<i;n++)_n.ofree(e[n]);_n.ofree(r),_n.ofree(i),0===o&&function(t){throw new Ft(t.UTF8ToString(t.getLastOnigError()))}(_n),this._onigBinding=_n,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,e,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof t){t=new qn(t);const n=this._findNextMatchSync(t,e,!1,i);return t.dispose(),n}return this._findNextMatchSync(t,e,!1,i)}_findNextMatchSync(t,e,n,i){const r=this._onigBinding,o=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(e),i);if(0===o)return null;const s=r.HEAPU32;let l=o/4;const a=s[l++],u=s[l++],c=[];for(let e=0;e<u;e++){const n=t.convertUtf8OffsetToUtf16(s[l++]),i=t.convertUtf8OffsetToUtf16(s[l++]);c[e]={start:n,end:i,length:i-n}}return{index:a,captureIndices:c}}}function Fn(t){if(Gn)return Gn;return Gn=async function(){_n=await In((async e=>{let n=t;var i;return n=await n,"function"==typeof n&&(n=await n(e)),"function"==typeof n&&(n=await n(e)),"function"==typeof n.instantiator?n=await n.instantiator(e):!function(t){return"function"==typeof t.default}(n)?(function(t){return void 0!==t.data}(n)&&(n=n.data),!function(t){return"undefined"!=typeof Response&&t instanceof Response}(n)?!function(t){return"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&t instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await Un(n)(e):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Un(n.default)(e)):n=await Un(n)(e):n="function"==typeof WebAssembly.instantiateStreaming?await(i=n,t=>WebAssembly.instantiateStreaming(i,t))(e):await function(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}(n)(e)):n=await n.default(e),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n}))}(),Gn}function Un(t){return e=>WebAssembly.instantiate(t,e)}async function Wn(t){return t&&await Fn(t),{createScanner:t=>new zn(t),createString:t=>new qn(t)}}const Vn={light:"#333333",dark:"#bbbbbb"},Jn={light:"#fffffe",dark:"#1e1e1e"},Xn="__shiki_resolved";function Yn(t){if(t?.[Xn])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:i}=e;if(!n||!i){const t=e.settings?e.settings.find((t=>!t.name&&!t.scope)):void 0;t?.settings?.foreground&&(i=t.settings.foreground),t?.settings?.background&&(n=t.settings.background),!i&&e?.colors?.["editor.foreground"]&&(i=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),i||(i="light"===e.type?Vn.light:Vn.dark),n||(n="light"===e.type?Jn.light:Jn.dark),e.fg=i,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 o=new Map;function s(t){if(o.has(t))return o.get(t);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${n}`]?s(t):(o.set(t,n),n)}e.settings=e.settings.map((t=>{const n=t.settings?.foreground&&!t.settings.foreground.startsWith("#"),i=t.settings?.background&&!t.settings.background.startsWith("#");if(!n&&!i)return t;const r={...t,settings:{...t.settings}};if(n){const n=s(t.settings.foreground);e.colorReplacements[n]=t.settings.foreground,r.settings.foreground=n}if(i){const n=s(t.settings.background);e.colorReplacements[n]=t.settings.background,r.settings.background=n}return r}));for(const t of Object.keys(e.colors||{}))if(("editor.foreground"===t||"editor.background"===t||t.startsWith("terminal.ansi"))&&!e.colors[t]?.startsWith("#")){const n=s(e.colors[t]);e.colorReplacements[n]=e.colors[t],e.colors[t]=n}return Object.defineProperty(e,Xn,{enumerable:!1,writable:!1,value:!0}),e}async function Kn(t){return Array.from(new Set((await Promise.all(t.filter((t=>!Rt(t))).map((async t=>await Gt(t).then((t=>Array.isArray(t)?t:[t])))))).flat()))}async function Qn(t){return(await Promise.all(t.map((async t=>Bt(t)?null:Yn(await Gt(t)))))).filter((t=>!!t))}class Zn extends Pt{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,i={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=i,this._themes.map((t=>this.loadTheme(t))),this.loadLanguages(this._langs)}getTheme(t){return"string"==typeof t?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=Yn(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=S.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){if(this._alias[t]){const e=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],e.has(t))throw new Ft(`Circular alias \`${Array.from(e).join(" -> ")} -> ${t}\``);e.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter((e=>e.embeddedLangsLazy?.includes(t.name))));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach((e=>{this._alias[e]=t.name})),this._loadedLanguagesCache=null,e.size)for(const t of e)this._resolvedGrammars.delete(t.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(t.scopeName),this._syncRegistry?._grammars?.delete(t.scopeName),this.loadLanguage(this._langMap.get(t.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const e of t)this.resolveEmbeddedLanguages(e);const e=Array.from(this._langGraph.entries()),n=e.filter((([t,e])=>!e));if(n.length){const t=e.filter((([t,e])=>e&&e.embeddedLangs?.some((t=>n.map((([t])=>t)).includes(t))))).filter((t=>!n.includes(t)));throw new Ft(`Missing languages ${n.map((([t])=>`\`${t}\``)).join(", ")}, required by ${t.map((([t])=>`\`${t}\``)).join(", ")}`)}for(const[t,n]of e)this._resolver.addLanguage(n);for(const[t,n]of e)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const e of t.embeddedLangs)this._langGraph.set(e,this._langMap.get(e))}}class ti{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:e=>t.createScanner(e),createOnigString:e=>t.createString(e)},e.forEach((t=>this.addLanguage(t)))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach((e=>{this._langs.set(e,t)})),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach((e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)}))}getInjections(t){const e=t.split(".");let n=[];for(let t=1;t<=e.length;t++){const i=e.slice(0,t).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let ei,ni=0;async function ii(t={}){const[e,n,i]=await Promise.all([Qn(t.themes||[]),Kn(t.langs||[]),t.engine||Wn(t.loadWasm||ei)]);return function(t){ni+=1,!1!==t.warnings&&ni>=10&&ni%10==0&&console.warn(`[Shiki] ${ni} 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 Ft("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),i=(t.themes||[]).flat(1).map(Yn),r=new ti(t.engine,n),o=new Zn(r,i,n,t.langAlias);let s;function l(t){if("none"===t)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();const e=o.getTheme(t);if(!e)throw new Ft(`Theme \`${t}\` not found, you may need to load it first`);return e}function a(...t){c(),o.loadLanguages(t.flat(1))}async function u(...t){c();for(const e of t.flat(1))o.loadTheme(e)}function c(){if(e)throw new Ft("Shiki instance has been disposed")}function m(){e||(e=!0,o.dispose(),ni-=1)}return{setTheme:function(t){c();const e=l(t);return s!==t&&(o.setTheme(e),s=t),{theme:e,colorMap:o.getColorMap()}},getTheme:l,getLanguage:function(t){c();const e=o.getGrammar("string"==typeof t?t:t.name);if(!e)throw new Ft(`Language \`${t}\` not found, you may need to load it first`);return e},getLoadedThemes:function(){return c(),o.getLoadedThemes()},getLoadedLanguages:function(){return c(),o.getLoadedLanguages()},loadLanguage:async function(...t){return a(await Kn(t))},loadLanguageSync:a,loadTheme:async function(...t){return c(),u(await Qn(t))},loadThemeSync:u,dispose:m,[Symbol.dispose]:m}}({...t,loadWasm:void 0,themes:e,langs:n,engine:i})}async function ri(t={}){const e=await ii(t);return{getLastGrammarState:(t,n)=>function(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(Et(i)||$t(r))throw new Ft("Plain language does not have grammar state");if("ansi"===i)throw new Ft("ANSI language does not have grammar state");const{theme:o,colorMap:s}=t.setTheme(r),l=t.getLanguage(i);return new Xt(oe(e,l,o,s,n).stateStack,l.name,o.name)}(e,t,n),codeToTokensBase:(t,n)=>re(e,t,n),codeToTokensWithThemes:(t,n)=>ce(e,t,n),codeToTokens:(t,n)=>me(e,t,n),codeToHast:(t,n)=>pe(e,t,n),codeToHtml:(t,n)=>Rn(e,t,n),...e,getInternalContext:()=>e}}function oi(t,e,n){let i,r,o;if(e)i=t,r=e,o=()=>Wn(n);else{const e=t;i=e.langs,r=e.themes,o=e.engine}return async function(t){function e(t){if("string"==typeof t){if(Rt(t))return[];const e=i[t];if(!e)throw new Ft(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}function n(t){if(Bt(t))return"none";if("string"==typeof t){const e=r[t];if(!e)throw new Ft(`Theme \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}const s=(t.themes??[]).map((t=>n(t))),l=(t.langs??[]).map((t=>e(t))),a=await ri({engine:o(),...t,themes:s,langs:l});return{...a,loadLanguage:(...t)=>a.loadLanguage(...t.map(e)),loadTheme:(...t)=>a.loadTheme(...t.map(n))}}}function si(t){const e=function(t){let e;return async function(n={}){if(e){const t=await e;return await Promise.all([t.loadTheme(...n.themes||[]),t.loadLanguage(...n.langs||[])]),t}return e=t({...n,themes:n.themes||[],langs:n.langs||[]}),e}}(t);return{getSingletonHighlighter:t=>e(t),codeToHtml:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToHtml(t,n),codeToHast:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToHast(t,n),codeToTokens:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToTokens(t,n),codeToTokensBase:async(t,n)=>(await e({langs:[n.lang],themes:[n.theme]})).codeToTokensBase(t,n),codeToTokensWithThemes:async(t,n)=>(await e({langs:[n.lang],themes:Object.values(n.themes).filter(Boolean)})).codeToTokensWithThemes(t,n),getLastGrammarState:async(t,n)=>(await e({langs:[n.lang],themes:[n.theme]})).getLastGrammarState(t,n)}}const li=oi({langs:a,themes:m,engine:()=>Wn(u)}),{codeToHtml:ai,codeToHast:ui,codeToTokens:ci,codeToTokensBase:mi,codeToTokensWithThemes:pi,getSingletonHighlighter:hi,getLastGrammarState:di}=si(li);let fi=class extends o{constructor(){super(...arguments),this.code="",this.language="javascript",this.theme="min-light",this.highlightedCode=""}static get styles(){return[r]}async updated(t){(t.has("code")||t.has("language")||t.has("theme"))&&(this.highlightedCode=await ai(this.code,{lang:this.language,theme:this.theme}),this.requestUpdate())}render(){return e`
1
+ import{__decorate as t}from"tslib";import{x as e}from"../index-0a3007c5.esm.js";import{state as n,customElement as i}from"lit/decorators.js";import{s as r}from"./nile-highlighter.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{n as s}from"../property-09139d3c.esm.js";import"lit";const l=[{id:"abap",name:"ABAP",import:()=>import("../abap-2ba67a6a.esm.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("../actionscript-3-02209631.esm.js")},{id:"ada",name:"Ada",import:()=>import("../ada-eb2c7f45.esm.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("../angular-html-dee6666d.esm.js").then((function(t){return t.f}))},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("../angular-ts-b05cbd6b.esm.js")},{id:"apache",name:"Apache Conf",import:()=>import("../apache-ff114010.esm.js")},{id:"apex",name:"Apex",import:()=>import("../apex-a18f8067.esm.js")},{id:"apl",name:"APL",import:()=>import("../apl-6c125f1b.esm.js")},{id:"applescript",name:"AppleScript",import:()=>import("../applescript-5bd7661e.esm.js")},{id:"ara",name:"Ara",import:()=>import("../ara-dc362516.esm.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("../asciidoc-479a5015.esm.js")},{id:"asm",name:"Assembly",import:()=>import("../asm-399082a7.esm.js")},{id:"astro",name:"Astro",import:()=>import("../astro-5413cddf.esm.js")},{id:"awk",name:"AWK",import:()=>import("../awk-ebeda106.esm.js")},{id:"ballerina",name:"Ballerina",import:()=>import("../ballerina-f6638dfe.esm.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("../bat-e43e2fa3.esm.js")},{id:"beancount",name:"Beancount",import:()=>import("../beancount-64ffab7e.esm.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("../berry-83623848.esm.js")},{id:"bibtex",name:"BibTeX",import:()=>import("../bibtex-1d977042.esm.js")},{id:"bicep",name:"Bicep",import:()=>import("../bicep-4533772f.esm.js")},{id:"blade",name:"Blade",import:()=>import("../blade-444d3218.esm.js")},{id:"c",name:"C",import:()=>import("../c-6e568302.esm.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("../cadence-bac9903e.esm.js")},{id:"clarity",name:"Clarity",import:()=>import("../clarity-188a88ea.esm.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("../clojure-f5559f9c.esm.js")},{id:"cmake",name:"CMake",import:()=>import("../cmake-6441f0dd.esm.js")},{id:"cobol",name:"COBOL",import:()=>import("../cobol-91cd2d87.esm.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("../codeowners-2c8e205d.esm.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("../codeql-d5855c59.esm.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("../coffee-6826f5b6.esm.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("../common-lisp-37cba388.esm.js")},{id:"coq",name:"Coq",import:()=>import("../coq-142fbea0.esm.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("../cpp-930fb0b9.esm.js")},{id:"crystal",name:"Crystal",import:()=>import("../crystal-84daa19c.esm.js")},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("../csharp-bddc9bf8.esm.js")},{id:"css",name:"CSS",import:()=>import("../css-80271636.esm.js")},{id:"csv",name:"CSV",import:()=>import("../csv-63a72bf6.esm.js")},{id:"cue",name:"CUE",import:()=>import("../cue-72835cdc.esm.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("../cypher-525eefc3.esm.js")},{id:"d",name:"D",import:()=>import("../d-5b366514.esm.js")},{id:"dart",name:"Dart",import:()=>import("../dart-25798f11.esm.js")},{id:"dax",name:"DAX",import:()=>import("../dax-4d122058.esm.js")},{id:"desktop",name:"Desktop",import:()=>import("../desktop-510a2947.esm.js")},{id:"diff",name:"Diff",import:()=>import("../diff-a772c67e.esm.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("../docker-086ffca5.esm.js")},{id:"dotenv",name:"dotEnv",import:()=>import("../dotenv-7b4d4131.esm.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("../dream-maker-d074d317.esm.js")},{id:"edge",name:"Edge",import:()=>import("../edge-e78d6a81.esm.js")},{id:"elixir",name:"Elixir",import:()=>import("../elixir-4818c090.esm.js")},{id:"elm",name:"Elm",import:()=>import("../elm-7cec854b.esm.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("../emacs-lisp-acc9d1bf.esm.js")},{id:"erb",name:"ERB",import:()=>import("../erb-28f42bb4.esm.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("../erlang-dd5f32ab.esm.js")},{id:"fennel",name:"Fennel",import:()=>import("../fennel-a9a5817d.esm.js")},{id:"fish",name:"Fish",import:()=>import("../fish-c4b3e0de.esm.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("../fluent-ecf06fb2.esm.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("../fortran-fixed-form-5c104c61.esm.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("../fortran-free-form-95b71a0b.esm.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("../fsharp-0164a1d5.esm.js")},{id:"gdresource",name:"GDResource",import:()=>import("../gdresource-6d1fa09f.esm.js")},{id:"gdscript",name:"GDScript",import:()=>import("../gdscript-00144682.esm.js")},{id:"gdshader",name:"GDShader",import:()=>import("../gdshader-adef3cb9.esm.js")},{id:"genie",name:"Genie",import:()=>import("../genie-828f21f0.esm.js")},{id:"gherkin",name:"Gherkin",import:()=>import("../gherkin-38fbb737.esm.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("../git-commit-277814c1.esm.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("../git-rebase-ce84243e.esm.js")},{id:"gleam",name:"Gleam",import:()=>import("../gleam-11a7fc53.esm.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("../glimmer-js-03ba0754.esm.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("../glimmer-ts-c60cc0f1.esm.js")},{id:"glsl",name:"GLSL",import:()=>import("../glsl-23ab554c.esm.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("../gnuplot-fb488ca4.esm.js")},{id:"go",name:"Go",import:()=>import("../go-7f7238b0.esm.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("../graphql-2c7747b6.esm.js")},{id:"groovy",name:"Groovy",import:()=>import("../groovy-8a2b3b3e.esm.js")},{id:"hack",name:"Hack",import:()=>import("../hack-92dcfd2d.esm.js")},{id:"haml",name:"Ruby Haml",import:()=>import("../haml-da0270b5.esm.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("../handlebars-13a930dc.esm.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("../haskell-fe90b706.esm.js")},{id:"haxe",name:"Haxe",import:()=>import("../haxe-4f52a4f2.esm.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("../hcl-dfb1d5ac.esm.js")},{id:"hjson",name:"Hjson",import:()=>import("../hjson-622fea55.esm.js")},{id:"hlsl",name:"HLSL",import:()=>import("../hlsl-4de7ee5d.esm.js")},{id:"html",name:"HTML",import:()=>import("../html-07b50e61.esm.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("../html-derivative-38ad45df.esm.js")},{id:"http",name:"HTTP",import:()=>import("../http-d4a4b4eb.esm.js")},{id:"hxml",name:"HXML",import:()=>import("../hxml-ffae1a6b.esm.js")},{id:"hy",name:"Hy",import:()=>import("../hy-80d68de3.esm.js")},{id:"imba",name:"Imba",import:()=>import("../imba-f3c43210.esm.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("../ini-42cfe2b2.esm.js")},{id:"java",name:"Java",import:()=>import("../java-9a18db40.esm.js")},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>import("../javascript-766be5b7.esm.js")},{id:"jinja",name:"Jinja",import:()=>import("../jinja-60af6e03.esm.js")},{id:"jison",name:"Jison",import:()=>import("../jison-bce70a6d.esm.js")},{id:"json",name:"JSON",import:()=>import("../json-c099592a.esm.js")},{id:"json5",name:"JSON5",import:()=>import("../json5-a941eda3.esm.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("../jsonc-1bfce64c.esm.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("../jsonl-c06fafa2.esm.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("../jsonnet-8da71b15.esm.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("../jssm-6fabae38.esm.js")},{id:"jsx",name:"JSX",import:()=>import("../jsx-031d907d.esm.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("../julia-1e0aa23a.esm.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("../kotlin-9232cba2.esm.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("../kusto-5a575879.esm.js")},{id:"latex",name:"LaTeX",import:()=>import("../latex-5bc51c63.esm.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("../lean-bf132505.esm.js")},{id:"less",name:"Less",import:()=>import("../less-07c1d189.esm.js")},{id:"liquid",name:"Liquid",import:()=>import("../liquid-40f4658c.esm.js")},{id:"log",name:"Log file",import:()=>import("../log-469090c5.esm.js")},{id:"logo",name:"Logo",import:()=>import("../logo-4193fe20.esm.js")},{id:"lua",name:"Lua",import:()=>import("../lua-a0557a62.esm.js")},{id:"luau",name:"Luau",import:()=>import("../luau-5721ef81.esm.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("../make-a26a0432.esm.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("../markdown-442604ed.esm.js")},{id:"marko",name:"Marko",import:()=>import("../marko-3615615d.esm.js")},{id:"matlab",name:"MATLAB",import:()=>import("../matlab-07562d17.esm.js")},{id:"mdc",name:"MDC",import:()=>import("../mdc-000f49f7.esm.js")},{id:"mdx",name:"MDX",import:()=>import("../mdx-878bd7c0.esm.js")},{id:"mermaid",name:"Mermaid",import:()=>import("../mermaid-79714284.esm.js")},{id:"mojo",name:"Mojo",import:()=>import("../mojo-562151cd.esm.js")},{id:"move",name:"Move",import:()=>import("../move-33cade24.esm.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("../narrat-f62582b8.esm.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("../nextflow-f85a84cd.esm.js")},{id:"nginx",name:"Nginx",import:()=>import("../nginx-60461c6d.esm.js")},{id:"nim",name:"Nim",import:()=>import("../nim-b18dd9d6.esm.js")},{id:"nix",name:"Nix",import:()=>import("../nix-8a16e63d.esm.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("../nushell-b9317a18.esm.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("../objective-c-bbf28b4c.esm.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("../objective-cpp-5874c26c.esm.js")},{id:"ocaml",name:"OCaml",import:()=>import("../ocaml-003f9cb6.esm.js")},{id:"pascal",name:"Pascal",import:()=>import("../pascal-95cf3080.esm.js")},{id:"perl",name:"Perl",import:()=>import("../perl-8d938ec1.esm.js")},{id:"php",name:"PHP",import:()=>import("../php-779a9080.esm.js")},{id:"plsql",name:"PL/SQL",import:()=>import("../plsql-79e8273a.esm.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("../po-b4d7f8b9.esm.js")},{id:"postcss",name:"PostCSS",import:()=>import("../postcss-cc91f779.esm.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("../powerquery-dec6a2e1.esm.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("../powershell-1ba65283.esm.js")},{id:"prisma",name:"Prisma",import:()=>import("../prisma-6479f02d.esm.js")},{id:"prolog",name:"Prolog",import:()=>import("../prolog-7d87da09.esm.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("../proto-43fab750.esm.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("../pug-a0199625.esm.js")},{id:"puppet",name:"Puppet",import:()=>import("../puppet-633f76f5.esm.js")},{id:"purescript",name:"PureScript",import:()=>import("../purescript-c67856bb.esm.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("../python-662bb02f.esm.js")},{id:"qml",name:"QML",import:()=>import("../qml-58153e24.esm.js")},{id:"qmldir",name:"QML Directory",import:()=>import("../qmldir-24b48c33.esm.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("../qss-e29728df.esm.js")},{id:"r",name:"R",import:()=>import("../r-0bb974b7.esm.js")},{id:"racket",name:"Racket",import:()=>import("../racket-4d72d1b6.esm.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("../raku-c5715ad9.esm.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("../razor-945ace44.esm.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("../reg-6ab73a2e.esm.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("../regexp-7a701946.esm.js")},{id:"rel",name:"Rel",import:()=>import("../rel-59a425f3.esm.js")},{id:"riscv",name:"RISC-V",import:()=>import("../riscv-92e3bc25.esm.js")},{id:"rst",name:"reStructuredText",import:()=>import("../rst-d03e28b2.esm.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("../ruby-be4ca2b3.esm.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("../rust-73ab87c8.esm.js")},{id:"sas",name:"SAS",import:()=>import("../sas-bbbaa45e.esm.js")},{id:"sass",name:"Sass",import:()=>import("../sass-06c0f1b9.esm.js")},{id:"scala",name:"Scala",import:()=>import("../scala-0ee7160e.esm.js")},{id:"scheme",name:"Scheme",import:()=>import("../scheme-9492ba0c.esm.js")},{id:"scss",name:"SCSS",import:()=>import("../scss-669da998.esm.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("../shaderlab-1427b314.esm.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("../shellscript-d8616780.esm.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("../shellsession-04c3b61a.esm.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("../smalltalk-bf032b10.esm.js")},{id:"solidity",name:"Solidity",import:()=>import("../solidity-945b3789.esm.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("../soy-06521b95.esm.js")},{id:"sparql",name:"SPARQL",import:()=>import("../sparql-97e91077.esm.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("../splunk-724382a5.esm.js")},{id:"sql",name:"SQL",import:()=>import("../sql-992bd7be.esm.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("../ssh-config-b979ce37.esm.js")},{id:"stata",name:"Stata",import:()=>import("../stata-aae26e99.esm.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("../stylus-a19590dc.esm.js")},{id:"svelte",name:"Svelte",import:()=>import("../svelte-e9d766af.esm.js")},{id:"swift",name:"Swift",import:()=>import("../swift-fee69c7f.esm.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("../system-verilog-0672b209.esm.js")},{id:"systemd",name:"Systemd Units",import:()=>import("../systemd-c9ce059c.esm.js")},{id:"tasl",name:"Tasl",import:()=>import("../tasl-56981c00.esm.js")},{id:"tcl",name:"Tcl",import:()=>import("../tcl-70c1f2b7.esm.js")},{id:"templ",name:"Templ",import:()=>import("../templ-c39be4cd.esm.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("../terraform-73abcfab.esm.js")},{id:"tex",name:"TeX",import:()=>import("../tex-b6c05cee.esm.js")},{id:"toml",name:"TOML",import:()=>import("../toml-a6513e85.esm.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("../ts-tags-84924e55.esm.js")},{id:"tsv",name:"TSV",import:()=>import("../tsv-e2ae86b4.esm.js")},{id:"tsx",name:"TSX",import:()=>import("../tsx-c24ffc6f.esm.js")},{id:"turtle",name:"Turtle",import:()=>import("../turtle-8d160c92.esm.js")},{id:"twig",name:"Twig",import:()=>import("../twig-bad7572b.esm.js")},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>import("../typescript-a171088a.esm.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("../typespec-b8dfd5b0.esm.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("../typst-000ffe24.esm.js")},{id:"v",name:"V",import:()=>import("../v-7039b569.esm.js")},{id:"vala",name:"Vala",import:()=>import("../vala-8f2bc2b5.esm.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("../vb-9a874029.esm.js")},{id:"verilog",name:"Verilog",import:()=>import("../verilog-c2d57008.esm.js")},{id:"vhdl",name:"VHDL",import:()=>import("../vhdl-ac657a56.esm.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("../viml-68018137.esm.js")},{id:"vue",name:"Vue",import:()=>import("../vue-7023c553.esm.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("../vue-html-6dbeafca.esm.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("../vyper-067da748.esm.js")},{id:"wasm",name:"WebAssembly",import:()=>import("../wasm-43fea9ba.esm.js")},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>import("../wenyan-8d0469db.esm.js")},{id:"wgsl",name:"WGSL",import:()=>import("../wgsl-958bb4d4.esm.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("../wikitext-d5aba44b.esm.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("../wolfram-a98e7871.esm.js")},{id:"xml",name:"XML",import:()=>import("../xml-dcc4373e.esm.js")},{id:"xsl",name:"XSL",import:()=>import("../xsl-e1cebd5c.esm.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("../yaml-40772700.esm.js")},{id:"zenscript",name:"ZenScript",import:()=>import("../zenscript-8287622a.esm.js")},{id:"zig",name:"Zig",import:()=>import("../zig-22785718.esm.js")}],a={...Object.fromEntries(l.map((t=>[t.id,t.import]))),...Object.fromEntries(l.flatMap((t=>t.aliases?.map((e=>[e,t.import]))||[])))},u=async t=>import("../wasm-ec34668d.esm.js").then((e=>e.default(t))),c=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("../andromeeda-5d950407.esm.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("../aurora-x-ef4469d5.esm.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("../ayu-dark-02c5eda5.esm.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("../catppuccin-frappe-374da941.esm.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("../catppuccin-latte-0443a123.esm.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("../catppuccin-macchiato-f40edfee.esm.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("../catppuccin-mocha-9325f879.esm.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("../dark-plus-6e6fe59a.esm.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("../dracula-2692338e.esm.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("../dracula-soft-6693d958.esm.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("../everforest-dark-c8bfaab7.esm.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("../everforest-light-d4dc4485.esm.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("../github-dark-fcfdd973.esm.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("../github-dark-default-2a934605.esm.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("../github-dark-dimmed-7180e6f5.esm.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("../github-dark-high-contrast-bf87cfb0.esm.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("../github-light-e7a28cff.esm.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("../github-light-default-210b3eff.esm.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("../github-light-high-contrast-3683d923.esm.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>import("../houston-c05ac28d.esm.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("../laserwave-bf73c7ca.esm.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("../light-plus-29d176d7.esm.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("../material-theme-2eae845f.esm.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("../material-theme-darker-8fa5687b.esm.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("../material-theme-lighter-d8ffc3a3.esm.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("../material-theme-ocean-015b70e7.esm.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("../material-theme-palenight-bc1384ec.esm.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("../min-dark-8505a270.esm.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("../min-light-0666da1a.esm.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("../monokai-6a66f188.esm.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("../night-owl-29c1d219.esm.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("../nord-9b4df92f.esm.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("../one-dark-pro-6ca8f674.esm.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("../one-light-14248a14.esm.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("../plastic-5de71733.esm.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("../poimandres-d61560a5.esm.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("../red-7842649b.esm.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("../rose-pine-5671b666.esm.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("../rose-pine-dawn-5f8448ab.esm.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("../rose-pine-moon-f769c9d9.esm.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("../slack-dark-61b35310.esm.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("../slack-ochin-ceebc179.esm.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("../snazzy-light-cf013f4c.esm.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("../solarized-dark-e78ef35f.esm.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("../solarized-light-069d7924.esm.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("../synthwave-84-c91fabd4.esm.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("../tokyo-night-ed39d8c0.esm.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("../vesper-ca1042cf.esm.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("../vitesse-black-02f9013c.esm.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("../vitesse-dark-362560d8.esm.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("../vitesse-light-64c34e5b.esm.js")}],m=Object.fromEntries(c.map((t=>[t.id,t.import])));var p;function h(t){return Array.isArray(t)?function(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=h(t[n]);return e}(t):"object"==typeof t?function(t){let e={};for(let n in t)e[n]=h(t[n]);return e}(t):t}function d(t,...e){return e.forEach((e=>{for(let n in e)t[n]=e[n]})),t}function f(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===e?t:~e==t.length-1?f(t.substring(0,t.length-1)):t.substr(1+~e)}!function(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"}(p||(p={}));var g=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,y=class{static hasCaptures(t){return null!==t&&(g.lastIndex=0,g.test(t))}static replaceCaptures(t,e,n){return t.replace(g,((t,i,r,o)=>{let s=n[parseInt(i||r,10)];if(!s)return t;{let t=e.substring(s.start,s.end);for(;"."===t[0];)t=t.substring(1);switch(o){case"downcase":return t.toLowerCase();case"upcase":return t.toUpperCase();default:return t}}}))}};function b(t,e){return t<e?-1:t>e?1:0}function w(t,e){if(null===t&&null===e)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,i=e.length;if(n===i){for(let i=0;i<n;i++){let n=b(t[i],e[i]);if(0!==n)return n}return 0}return n-i}function v(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 j(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var k=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}},S=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n,this._cachedMatchRoot=new k((t=>this._root.match(t)))}static createFromRawTheme(t,e){return this.createFromParsedTheme(function(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],i=0;for(let t=0,r=e.length;t<r;t++){let r,o=e[t];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),r=t.split(",")}else r=Array.isArray(o.scope)?o.scope:[""];let s=-1;if("string"==typeof o.settings.fontStyle){s=0;let t=o.settings.fontStyle.split(" ");for(let e=0,n=t.length;e<n;e++){switch(t[e]){case"italic":s|=1;break;case"bold":s|=2;break;case"underline":s|=4;break;case"strikethrough":s|=8}}}let l=null;"string"==typeof o.settings.foreground&&v(o.settings.foreground)&&(l=o.settings.foreground);let a=null;"string"==typeof o.settings.background&&v(o.settings.background)&&(a=o.settings.background);for(let e=0,o=r.length;e<o;e++){let o=r[e].trim().split(" "),u=o[o.length-1],c=null;o.length>1&&(c=o.slice(0,o.length-1),c.reverse()),n[i++]=new T(u,c,t,s,l,a)}}return n}(t),e)}static createFromParsedTheme(t,e){return function(t,e){t.sort(((t,e)=>{let n=b(t.scope,e.scope);return 0!==n?n:(n=w(t.parentScopes,e.parentScopes),0!==n?n:t.index-e.index)}));let n=0,i="#000000",r="#ffffff";for(;t.length>=1&&""===t[0].scope;){let e=t.shift();-1!==e.fontStyle&&(n=e.fontStyle),null!==e.foreground&&(i=e.foreground),null!==e.background&&(r=e.background)}let o=new A(e),s=new L(n,o.getId(i),o.getId(r)),l=new P(new M(0,null,-1,0,0),[]);for(let e=0,n=t.length;e<n;e++){let n=t[e];l.insert(0,n.scope,n.parentScopes,n.fontStyle,o.getId(n.foreground),o.getId(n.background))}return new S(o,s,l)}(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(null===t)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find((e=>function(t,e){if(0===e.length)return!0;for(let n=0;n<e.length;n++){let i=e[n],r=!1;if(">"===i){if(n===e.length-1)return!1;i=e[++n],r=!0}for(;t&&!C(t.scopeName,i);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}(t.parent,e.parentScopes)));return n?new L(n.fontStyle,n.foreground,n.background):null}},x=class t{constructor(t,e){this.parent=t,this.scopeName=e}static push(e,n){for(const i of n)e=new t(e,i);return e}static from(...e){let n=null;for(let i=0;i<e.length;i++)n=new t(n,e[i]);return n}push(e){return new t(this,e)}getSegments(){let t=this;const e=[];for(;t;)e.push(t.scopeName),t=t.parent;return e.reverse(),e}toString(){return this.getSegments().join(" ")}extends(t){return this===t||null!==this.parent&&this.parent.extends(t)}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push(n.scopeName),n=n.parent;return n===t?e.reverse():void 0}};function C(t,e){return e===t||t.startsWith(e)&&"."===t[e.length]}var L=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};var T=class{constructor(t,e,n,i,r,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}};var A=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(null===t)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)}},O=Object.freeze([]),M=class t{constructor(t,e,n,i,r){this.scopeDepth=t,this.parentScopes=e||O,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=t[n].clone();return e}acceptOverwrite(t,e,n,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,-1!==e&&(this.fontStyle=e),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},P=class t{constructor(t,e=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=e}static _cmpBySpecificity(t,e){if(t.scopeDepth!==e.scopeDepth)return e.scopeDepth-t.scopeDepth;let n=0,i=0;for(;">"===t.parentScopes[n]&&n++,">"===e.parentScopes[i]&&i++,!(n>=t.parentScopes.length||i>=e.parentScopes.length);){const r=e.parentScopes[i].length-t.parentScopes[n].length;if(0!==r)return r;n++,i++}return e.parentScopes.length-t.parentScopes.length}match(e){if(""!==e){let t,n,i=e.indexOf(".");if(-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1)),this._children.hasOwnProperty(t))return this._children[t].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,i,r,o,s){if(""===n)return void this._doInsertHere(e,i,r,o,s);let l,a,u,c=n.indexOf(".");-1===c?(l=n,a=""):(l=n.substring(0,c),a=n.substring(c+1)),this._children.hasOwnProperty(l)?u=this._children[l]:(u=new t(this._mainRule.clone(),M.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,a,i,r,o,s)}_doInsertHere(t,e,n,i,r){if(null!==e){for(let o=0,s=this._rulesWithParentScopes.length;o<s;o++){let s=this._rulesWithParentScopes[o];if(0===w(s.parentScopes,e))return void s.acceptOverwrite(t,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new M(t,e,n,i,r))}else this._mainRule.acceptOverwrite(t,n,i,r)}},N=class t{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(e){const n=t.getLanguageId(e),i=t.getTokenType(e),r=t.getFontStyle(e),o=t.getForeground(e),s=t.getBackground(e);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:o,background:s})}static getLanguageId(t){return(255&t)>>>0}static getTokenType(t){return(768&t)>>>8}static containsBalancedBrackets(t){return!!(1024&t)}static getFontStyle(t){return(30720&t)>>>11}static getForeground(t){return(16744448&t)>>>15}static getBackground(t){return(4278190080&t)>>>24}static set(e,n,i,r,o,s,l){let a=t.getLanguageId(e),u=t.getTokenType(e),c=t.containsBalancedBrackets(e)?1:0,m=t.getFontStyle(e),p=t.getForeground(e),h=t.getBackground(e);return 0!==n&&(a=n),8!==i&&(u=i),null!==r&&(c=r?1:0),-1!==o&&(m=o),0!==s&&(p=s),0!==l&&(h=l),(a|u<<8|c<<10|m<<11|p<<15|h<<24)>>>0}};function D(t,e){const n=[],i=function(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const i=n[0];return n=e.exec(t),i}}}(t);let r=i.next();for(;null!==r;){let t=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":t=1;break;case"L":t=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let e=s();if(n.push({matcher:e,priority:t}),","!==r)break;r=i.next()}return n;function o(){if("-"===r){r=i.next();const t=o();return e=>!!t&&!t(e)}if("("===r){r=i.next();const t=function(){const t=[];let e=s();for(;e&&(t.push(e),"|"===r||","===r);){do{r=i.next()}while("|"===r||","===r);e=s()}return e=>t.some((t=>t(e)))}();return")"===r&&(r=i.next()),t}if(E(r)){const t=[];do{t.push(r),r=i.next()}while(E(r));return n=>e(t,n)}return null}function s(){const t=[];let e=o();for(;e;)t.push(e),e=o();return e=>t.every((t=>t(e)))}}function E(t){return!!t&&!!t.match(/[\w\.:]+/)}function R(t){"function"==typeof t.dispose&&t.dispose()}var $=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},B=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},I=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))}},_=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 $(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new I;for(const n of t)G(n,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof $){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName))continue;if(this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function G(t,e,n,i){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof $?q({baseGrammar:o,selfGrammar:r},i):H(t.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},i);const s=n.injections(t.scopeName);if(s)for(const t of s)i.add(new $(t))}function H(t,e,n){if(e.repository&&e.repository[t]){z([e.repository[t]],e,n)}}function q(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&z(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&z(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function z(t,e,n){for(const i of t){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const t=i.repository?d({},e.repository,i.repository):e.repository;Array.isArray(i.patterns)&&z(i.patterns,{...e,repository:t},n);const r=i.include;if(!r)continue;const o=X(r);switch(o.kind){case 0:q({...e,selfGrammar:e.baseGrammar},n);break;case 1:q(e,n);break;case 2:H(o.ruleName,{...e,repository:t},n);break;case 3:case 4:const i=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const r={baseGrammar:e.baseGrammar,selfGrammar:i,repository:t};4===o.kind?H(o.ruleName,r,n):q(r,n)}else 4===o.kind?n.add(new B(o.scopeName,o.ruleName)):n.add(new $(o.scopeName))}}}var F=class{constructor(){this.kind=0}},U=class{constructor(){this.kind=1}},W=class{constructor(t){this.ruleName=t,this.kind=2}},V=class{constructor(t){this.scopeName=t,this.kind=3}},J=class{constructor(t,e){this.scopeName=t,this.ruleName=e,this.kind=4}};function X(t){if("$base"===t)return new F;if("$self"===t)return new U;const e=t.indexOf("#");if(-1===e)return new V(t);if(0===e)return new W(t.substring(1));{const n=t.substring(0,e),i=t.substring(e+1);return new J(n,i)}}var Y=/\\(\d+)/,K=/\\(\d+)/g,Q=-1,Z=-2;var tt=class{constructor(t,e,n,i){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=y.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=y.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${f(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return this._nameIsCapturing&&null!==this._name&&null!==t&&null!==e?y.replaceCaptures(this._name,t,e):this._name}getContentName(t,e){return this._contentNameIsCapturing&&null!==this._contentName?y.replaceCaptures(this._contentName,t,e):this._contentName}},et=class extends tt{constructor(t,e,n,i,r){super(t,e,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,i){throw new Error("Not supported!")}},nt=class extends tt{constructor(t,e,n,i,r){super(t,e,n,null),this._match=new lt(i,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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new at,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},it=class extends tt{constructor(t,e,n,i,r){super(t,e,n,i),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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new at,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},rt=class extends tt{constructor(t,e,n,i,r,o,s,l,a,u){super(t,e,n,i),this._begin=new lt(r,this.id),this.beginCaptures=o,this._end=new lt(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.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,i){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,i)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new at;for(const e of this.patterns){t.getRule(e).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}},ot=class extends tt{constructor(t,e,n,i,r,o,s,l,a){super(t,e,n,i),this._begin=new lt(r,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new lt(s,Z),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.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,i){return this._getCachedCompiledPatterns(t).compileAG(t,n,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new at;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,i){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,i)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new at,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},st=class t{static createCaptureRule(t,e,n,i,r){return t.registerRule((t=>new et(e,t,n,i,r)))}static getCompiledRuleId(e,n,i){return e.id||n.registerRule((r=>{if(e.id=r,e.match)return new nt(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,i));if(void 0===e.begin){e.repository&&(i=d({},i,e.repository));let r=e.patterns;return void 0===r&&e.include&&(r=[{include:e.include}]),new it(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(r,n,i))}return e.while?new ot(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,i),t._compilePatterns(e.patterns,n,i)):new rt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,i),e.end,t._compileCaptures(e.endCaptures||e.captures,n,i),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,i))})),e.id}static _compileCaptures(e,n,i){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let t=0;t<=o;t++)r[t]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const s=parseInt(o,10);let l=0;e[o].patterns&&(l=t.getCompiledRuleId(e[o],n,i)),r[s]=t.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return r}static _compilePatterns(e,n,i){let r=[];if(e)for(let o=0,s=e.length;o<s;o++){const s=e[o];let l=-1;if(s.include){const e=X(s.include);switch(e.kind){case 0:case 1:l=t.getCompiledRuleId(i[s.include],n,i);break;case 2:let r=i[e.ruleName];r&&(l=t.getCompiledRuleId(r,n,i));break;case 3:case 4:const o=e.scopeName,a=4===e.kind?e.ruleName:null,u=n.getExternalGrammar(o,i);if(u)if(a){let e=u.repository[a];e&&(l=t.getCompiledRuleId(e,n,u.repository))}else l=t.getCompiledRuleId(u.repository.$self,n,u.repository)}}else l=t.getCompiledRuleId(s,n,i);if(-1!==l){const t=n.getRule(l);let e=!1;if((t instanceof it||t instanceof rt||t instanceof ot)&&t.hasMissingPatterns&&0===t.patterns.length&&(e=!0),e)continue;r.push(l)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},lt=class t{constructor(t,e){if(t){const e=t.length;let n=0,i=[],r=!1;for(let o=0;o<e;o++){if("\\"===t.charAt(o)&&o+1<e){const e=t.charAt(o+1);"z"===e?(i.push(t.substring(n,o)),i.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==e&&"G"!==e||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=t:(i.push(t.substring(n,e)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=e,this.hasBackReferences=Y.test(this.source)}clone(){return new t(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,e){let n=e.map((e=>t.substring(e.start,e.end)));return K.lastIndex=0,this.source.replace(K,((t,e)=>j(n[parseInt(e,10)]||"")))}_buildAnchorCache(){let t,e,n,i,r=[],o=[],s=[],l=[];for(t=0,e=this.source.length;t<e;t++)n=this.source.charAt(t),r[t]=n,o[t]=n,s[t]=n,l[t]=n,"\\"===n&&t+1<e&&(i=this.source.charAt(t+1),"A"===i?(r[t+1]="￿",o[t+1]="￿",s[t+1]="A",l[t+1]="A"):"G"===i?(r[t+1]="￿",o[t+1]="G",s[t+1]="￿",l[t+1]="G"):(r[t+1]=i,o[t+1]=i,s[t+1]=i,l[t+1]=i),t++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:s.join(""),A1_G1:l.join("")}}resolveAnchors(t,e){return this.hasAnchor&&this._anchorCache?t?e?this._anchorCache.A1_G1:this._anchorCache.A1_G0:e?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},at=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((t=>t.source));this._cached=new ut(t,e,this._items.map((t=>t.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 i=this._items.map((t=>t.resolveAnchors(e,n)));return new ut(t,i,this._items.map((t=>t.ruleId)))}},ut=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){"function"==typeof this.scanner.dispose&&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("\n")}findNextMatchSync(t,e,n){const i=this.scanner.findNextMatchSync(t,e,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},ct=class{constructor(t,e){this.languageId=t,this.tokenType=e}},mt=class t{constructor(t,e){this._getBasicScopeAttributes=new k((t=>{const e=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new ct(e,n)})),this._defaultAttributes=new ct(t,8),this._embeddedLanguagesMatcher=new ht(Object.entries(e||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?t._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(e){const n=e.match(t.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!")}};mt._NULL_SCOPE_METADATA=new ct(0,0),mt.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;var pt=mt,ht=class{constructor(t){if(0===t.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map((([t,e])=>j(t)));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);return e?this.values.get(e[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var dt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function ft(t,e,n,i,r,o,s,l){const a=e.content.length;let u=!1,c=-1;if(s){const s=function(t,e,n,i,r,o){let s=r.beginRuleCapturedEOL?0:-1;const l=[];for(let e=r;e;e=e.pop()){const n=e.getRule(t);n instanceof ot&&l.push({rule:n,stack:e})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:l,findOptions:u}=yt(a.rule,t,a.stack.endRule,n,i===s),c=l.findNextMatchSync(e,i,u);if(!c){r=a.stack.pop();break}if(c.ruleId!==Z){r=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(o.produce(a.stack,c.captureIndices[0].start),bt(t,e,n,a.stack,o,a.rule.whileCaptures,c.captureIndices),o.produce(a.stack,c.captureIndices[0].end),s=c.captureIndices[0].end,c.captureIndices[0].end>i&&(i=c.captureIndices[0].end,n=!1))}return{stack:r,linePos:i,anchorPosition:s,isFirstLine:n}}(t,e,n,i,r,o);r=s.stack,i=s.linePos,n=s.isFirstLine,c=s.anchorPosition}const m=Date.now();for(;!u;){if(0!==l){if(Date.now()-m>l)return new dt(r,!0)}p()}return new dt(r,!1);function p(){const s=function(t,e,n,i,r,o){const s=function(t,e,n,i,r,o){const s=r.getRule(t),{ruleScanner:l,findOptions:a}=gt(s,t,r.endRule,n,i===o),u=l.findNextMatchSync(e,i,a);if(u)return{captureIndices:u.captureIndices,matchedRuleId:u.ruleId};return null}(t,e,n,i,r,o),l=t.getInjections();if(0===l.length)return s;const a=function(t,e,n,i,r,o,s){let l,a=Number.MAX_VALUE,u=null,c=0;const m=o.contentNameScopesList.getScopeNames();for(let o=0,p=t.length;o<p;o++){const p=t[o];if(!p.matcher(m))continue;const h=e.getRule(p.ruleId),{ruleScanner:d,findOptions:f}=gt(h,e,null,i,r===s),g=d.findNextMatchSync(n,r,f);if(!g)continue;const y=g.captureIndices[0].start;if(!(y>=a)&&(a=y,u=g.captureIndices,l=g.ruleId,c=p.priority,a===r))break}if(u)return{priorityMatch:-1===c,captureIndices:u,matchedRuleId:l};return null}(l,t,e,n,i,r,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,c=a.captureIndices[0].start;if(c<u||a.priorityMatch&&c===u)return a;return s}(t,e,n,i,r,c);if(!s)return o.produce(r,a),void(u=!0);const l=s.captureIndices,m=s.matchedRuleId,p=!!(l&&l.length>0)&&l[0].end>i;if(m===Q){const s=r.getRule(t);o.produce(r,l[0].start),r=r.withContentNameScopesList(r.nameScopesList),bt(t,e,n,r,o,s.endCaptures,l),o.produce(r,l[0].end);const m=r;if(r=r.parent,c=m.getAnchorPos(),!p&&m.getEnterPos()===i)return r=m,o.produce(r,a),void(u=!0)}else{const s=t.getRule(m);o.produce(r,l[0].start);const h=r,d=s.getName(e.content,l),f=r.contentNameScopesList.pushAttributed(d,t);if(r=r.push(m,i,c,l[0].end===a,null,f,f),s instanceof rt){const i=s;bt(t,e,n,r,o,i.beginCaptures,l),o.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.endHasBackReferences&&(r=r.withEndRule(i.getEndWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),o.produce(r,a),void(u=!0)}else if(s instanceof ot){const i=s;bt(t,e,n,r,o,i.beginCaptures,l),o.produce(r,l[0].end),c=l[0].end;const m=i.getContentName(e.content,l),d=f.pushAttributed(m,t);if(r=r.withContentNameScopesList(d),i.whileHasBackReferences&&(r=r.withEndRule(i.getWhileWithResolvedBackReferences(e.content,l))),!p&&h.hasSameRuleAs(r))return r=r.pop(),o.produce(r,a),void(u=!0)}else{if(bt(t,e,n,r,o,s.captures,l),o.produce(r,l[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,a),void(u=!0)}}l[0].end>i&&(i=l[0].end,n=!1)}}function gt(t,e,n,i,r){return{ruleScanner:t.compileAG(e,n,i,r),findOptions:0}}function yt(t,e,n,i,r){return{ruleScanner:t.compileWhileAG(e,n,i,r),findOptions:0}}function bt(t,e,n,i,r,o,s){if(0===o.length)return;const l=e.content,a=Math.min(o.length,s.length),u=[],c=s[0].end;for(let e=0;e<a;e++){const a=o[e];if(null===a)continue;const m=s[e];if(0===m.length)continue;if(m.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=m.start;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?r.produceFromScopes(u[u.length-1].scopes,m.start):r.produce(i,m.start),a.retokenizeCapturedWithRuleId){const e=a.getName(l,s),o=i.contentNameScopesList.pushAttributed(e,t),u=a.getContentName(l,s),c=o.pushAttributed(u,t),p=i.push(a.retokenizeCapturedWithRuleId,m.start,-1,!1,null,o,c),h=t.createOnigString(l.substring(0,m.end));ft(t,h,n&&0===m.start,m.start,p,r,!1,0),R(h);continue}const p=a.getName(l,s);if(null!==p){const e=(u.length>0?u[u.length-1].scopes:i.contentNameScopesList).pushAttributed(p,t);u.push(new wt(e,m.end))}}for(;u.length>0;)r.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var wt=class{constructor(t,e){this.scopes=t,this.endPos=e}};function vt(t,e,n,i,r){const o=D(e,jt),s=st.getCompiledRuleId(n,i,r.repository);for(const n of o)t.push({debugSelector:e,matcher:n.matcher,ruleId:s,grammar:r,priority:n.priority})}function jt(t,e){if(e.length<t.length)return!1;let n=0;return t.every((t=>{for(let i=n;i<e.length;i++)if(kt(e[i],t))return n=i+1,!0;return!1}))}function kt(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 St=class{constructor(t,e,n,i,r,o,s,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new pt(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=xt(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const t of Object.keys(r)){const e=D(t,jt);for(const n of e)this._tokenTypeMatchers.push({matcher:n.matcher,type:r[t]})}}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=t=>t===this._rootScopeName?this._grammar:this.getExternalGrammar(t),e=[],n=this._rootScopeName,i=t(n);if(i){const t=i.injections;if(t)for(let n in t)vt(e,n,t[n],this,i);const r=this._grammarRepository.injections(n);r&&r.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&vt(e,t,n,this,n)}}))}return e.sort(((t,e)=>t.priority-e.priority)),e}getInjections(){return null===this._injections&&(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]=xt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const i=this._tokenize(t,e,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(t,e,n=0){const i=this._tokenize(t,e,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(t,e,n,i){let r;if(-1===this._rootId&&(this._rootId=st.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),e&&e!==Tt.NULL)r=!1,e.reset();else{r=!0;const t=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),i=N.set(0,t.languageId,t.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let s;s=o?Ct.createRootAndLookUpScopeName(o,i,this):Ct.createRoot("unknown",i),e=new Tt(null,this._rootId,-1,-1,!1,null,s,s)}t+="\n";const o=this.createOnigString(t),s=o.content.length,l=new Ot(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=ft(this,o,r,0,e,l,!0,i);return R(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function xt(t,e){return(t=h(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 Ct=class t{constructor(t,e,n){this.parent=t,this.scopePath=e,this.tokenAttributes=n}static fromExtension(e,n){let i=e,r=e?.scopePath??null;for(const e of n)r=x.push(r,e.scopeNames),i=new t(i,r,e.encodedTokenAttributes);return i}static createRoot(e,n){return new t(null,new x(null,e),n)}static createRootAndLookUpScopeName(e,n,i){const r=i.getMetadataForScope(e),o=new x(null,e),s=i.themeProvider.themeMatch(o),l=t.mergeAttributes(n,r,s);return new t(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.scopeName!==e.scopeName||t.tokenAttributes!==e.tokenAttributes)return!1;t=t.parent,e=e.parent}}static mergeAttributes(t,e,n){let i=-1,r=0,o=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,o=n.backgroundId),N.set(t,e.languageId,e.tokenType,null,i,r,o)}pushAttributed(e,n){if(null===e)return this;if(-1===e.indexOf(" "))return t._pushAttributed(this,e,n);const i=e.split(/ /g);let r=this;for(const e of i)r=t._pushAttributed(r,e,n);return r}static _pushAttributed(e,n,i){const r=i.getMetadataForScope(n),o=e.scopePath.push(n),s=i.themeProvider.themeMatch(o),l=t.mergeAttributes(e.tokenAttributes,r,s);return new t(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const e=[];let n=this;for(;n&&n!==t;)e.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?e.reverse():void 0}},Lt=class t{constructor(t,e,n,i,r,o,s,l){this.parent=t,this.ruleId=e,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=s,this.contentNameScopesList=l,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return null!==e&&t._equals(this,e)}static _equals(t,e){return t===e||!!this._structuralEquals(t,e)&&Ct.equals(t.contentNameScopesList,e.contentNameScopesList)}static _structuralEquals(t,e){for(;;){if(t===e)return!0;if(!t&&!e)return!0;if(!t||!e)return!1;if(t.depth!==e.depth||t.ruleId!==e.ruleId||t.endRule!==e.endRule)return!1;t=t.parent,e=e.parent}}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,i,r,o,s,l){return new t(this,e,n,i,r,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,e){return this.parent&&(e=this.parent._writeString(t,e)),t[e++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,e}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(e){return this.endRule===e?this:new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let e=this;for(;e&&e._enterPos===t._enterPos;){if(e.ruleId===t.ruleId)return!0;e=e.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const i=Ct.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,Ct.fromExtension(i,n.contentNameScopesList))}};Lt.NULL=new Lt(null,0,0,0,!1,null,null,null);var Tt=Lt,At=class{constructor(t,e){this.allowAny=!1,this.balancedBracketScopes=t.flatMap((t=>"*"===t?(this.allowAny=!0,[]):D(t,jt).map((t=>t.matcher)))),this.unbalancedBracketScopes=e.flatMap((t=>D(t,jt).map((t=>t.matcher))))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!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}},Ot=class{constructor(t,e,n,i){this.balancedBracketSelectors=i,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){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const e=t?.getScopeNames()??[];for(const t of this._tokenTypeOverrides)t.matcher(e)&&(n=N.set(n,0,t.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(e))}return i&&(n=N.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=e):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=e))}const n=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(),0===this._tokens.length&&(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()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let t=0,e=this._binaryTokens.length;t<e;t++)n[t]=this._binaryTokens[t];return n}},Mt=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,i,r){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,function(t,e,n,i,r,o,s,l){return new St(t,e,n,i,r,o,s,l)}(t,o,e,n,i,r,this,this._onigLib))}return this._grammars.get(t)}},Pt=class{constructor(t){this._options=t,this._syncRegistry=new Mt(S.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(S.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new At(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,i,r){const o=new _(this._syncRegistry,t);for(;o.Q.length>0;)o.Q.map((t=>this._loadSingleGrammar(t.scopeName))),o.processQueue();return this._grammarForScopeName(t,e,n,i,r)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const e=this._options.loadGrammar(t);if(e){const n="function"==typeof this._options.getInjections?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,i=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,i)}_grammarForScopeName(t,e=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(t,e,n,i,r)}},Nt=Tt.NULL;function Dt(t,e=!1){const n=t.split(/(\r?\n)/g);let i=0;const r=[];for(let t=0;t<n.length;t+=2){const o=e?n[t]+(n[t+1]||""):n[t];r.push([o,i]),i+=n[t].length,i+=n[t+1]?.length||0}return r}function Et(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Rt(t){return"ansi"===t||Et(t)}function $t(t){return"none"===t}function Bt(t){return $t(t)}function It(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],"string"==typeof t.properties.class&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const e of n)e&&!t.properties.class.includes(e)&&t.properties.class.push(e);return t}async function _t(t){return Promise.resolve("function"==typeof t?t():t).then((t=>t.default||t))}function Gt(t,e){const n="string"==typeof t?{}:{...t.colorReplacements},i="string"==typeof t?t:t.name;for(const[t,r]of Object.entries(e?.colorReplacements||{}))"string"==typeof r?n[t]=r:t===i&&Object.assign(n,r);return n}function Ht(t,e){return t&&e?.[t?.toLowerCase()]||t}function qt(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&p.Italic&&(e["font-style"]="italic"),t.fontStyle&p.Bold&&(e["font-weight"]="bold"),t.fontStyle&p.Underline&&(e["text-decoration"]="underline")),e}function zt(t){return Object.entries(t).map((([t,e])=>`${t}:${e}`)).join(";")}class Ft extends Error{constructor(t){super(t),this.name="ShikiError"}}function Ut(){const t=new WeakMap;function e(e){if(!t.has(e.meta)){const n=function(t){const e=Dt(t,!0).map((([t])=>t));return{lines:e,indexToPos:function(n){if(n===t.length)return{line:e.length-1,character:e[e.length-1].length};let i=n,r=0;for(const t of e){if(i<t.length)break;i-=t.length,r++}return{line:r,character:i}},posToIndex:function(t,n){let i=0;for(let n=0;n<t;n++)i+=e[n].length;return i+=n,i}}}(e.source);function i(t){if("number"==typeof t){if(t<0||t>e.source.length)throw new Ft(`Invalid decoration offset: ${t}. Code length: ${e.source.length}`);return{...n.indexToPos(t),offset:t}}{const e=n.lines[t.line];if(void 0===e)throw new Ft(`Invalid decoration position ${JSON.stringify(t)}. Lines length: ${n.lines.length}`);if(t.character<0||t.character>e.length)throw new Ft(`Invalid decoration position ${JSON.stringify(t)}. Line ${t.line} length: ${e.length}`);return{...t,offset:n.posToIndex(t.line,t.character)}}}const r=(e.options.decorations||[]).map((t=>({...t,start:i(t.start),end:i(t.end)})));!function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Ft(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=e+1;i<t.length;i++){const e=t[i],r=n.start.offset<e.start.offset&&e.start.offset<n.end.offset,o=n.start.offset<e.end.offset&&e.end.offset<n.end.offset,s=e.start.offset<n.start.offset&&n.start.offset<e.end.offset,l=e.start.offset<n.end.offset&&n.end.offset<e.end.offset;if(r||o||s||l){if(o&&o)continue;if(s&&l)continue;throw new Ft(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(e.start)} intersect.`)}}}}(r),t.set(e.meta,{decorations:r,converter:n,source:e.source})}return t.get(e.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const n=function(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort(((t,e)=>t-e));return n.length?t.map((t=>t.flatMap((t=>{const e=n.filter((e=>t.offset<e&&e<t.offset+t.content.length)).map((e=>e-t.offset)).sort(((t,e)=>t-e));return e.length?function(t,e){let n=0;const i=[];for(const r of e)r>n&&i.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&i.push({...t,content:t.content.slice(n),offset:t.offset+n}),i}(t,e):t})))):t}(t,e(this).decorations.flatMap((t=>[t.start.offset,t.end.offset])));return n},code(t){if(!this.options.decorations?.length)return;const n=e(this),i=Array.from(t.children).filter((t=>"element"===t.type&&"span"===t.tagName));if(i.length!==n.converter.lines.length)throw new Ft(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(t,e,n,r){const o=i[t];let l="",a=-1,u=-1;if(0===e&&(a=0),0===n&&(u=0),n===Number.POSITIVE_INFINITY&&(u=o.children.length),-1===a||-1===u)for(let t=0;t<o.children.length;t++)l+=Wt(o.children[t]),-1===a&&l.length===e&&(a=t+1),-1===u&&l.length===n&&(u=t+1);if(-1===a)throw new Ft(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===u)throw new Ft(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);const c=o.children.slice(a,u);if(r.alwaysWrap||c.length!==o.children.length)if(r.alwaysWrap||1!==c.length||"element"!==c[0].type){const t={type:"element",tagName:"span",properties:{},children:c};s(t,r,"wrapper"),o.children.splice(a,c.length,t)}else s(c[0],r,"token");else s(o,r,"line")}function o(t,e){i[t]=s(i[t],e,"line")}function s(t,e,n){const i=e.properties||{},r=e.transform||(t=>t);return t.tagName=e.tagName||"span",t.properties={...t.properties,...i,class:t.properties.class},e.properties?.class&&It(t,e.properties.class),t=r(t,n)||t}const l=[],a=n.decorations.sort(((t,e)=>e.start.offset-t.start.offset));for(const t of a){const{start:e,end:n}=t;if(e.line===n.line)r(e.line,e.character,n.character,t);else if(e.line<n.line){r(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let i=e.line+1;i<n.line;i++)l.unshift((()=>o(i,t)));r(n.line,0,n.character,t)}}l.forEach((t=>t()))}}}function Wt(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(Wt).join(""):""}const Vt=[Ut()];function Jt(t){return[...t.transformers||[],...Vt]}class Xt{_stack;lang;theme;static initial(t,e){return new Xt(Nt,t,e)}constructor(t,e,n){this._stack=t,this.lang=e,this.theme=n}get scopes(){return function(t){const e=[],n=new Set;function i(t){if(n.has(t))return;n.add(t);const r=t?.nameScopesList?.scopeName;r&&e.push(r),t.parent&&i(t.parent)}return i(t),e}(this._stack)}toJSON(){return{lang:this.lang,theme:this.theme,scopes:this.scopes}}}var Yt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Kt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Qt(t,e){const n=t.indexOf("[",e);if(-1!==n){const e=t.indexOf("m",n);return{sequence:t.substring(n+2,e).split(";"),startPosition:n,position:e+1}}return{position:t.length}}function Zt(t,e){let n=1;const i=t[e+n++];let r;if("2"===i){const i=[t[e+n++],t[e+n++],t[e+n]].map((t=>Number.parseInt(t)));3!==i.length||i.some((t=>Number.isNaN(t)))||(r={type:"rgb",rgb:i})}else if("5"===i){const i=Number.parseInt(t[e+n]);Number.isNaN(i)||(r={type:"table",index:Number(i)})}return[n,r]}function te(t){const e=[];for(let n=0;n<t.length;n++){const i=t[n],r=Number.parseInt(i);if(!Number.isNaN(r))if(0===r)e.push({type:"resetAll"});else if(r<=9){Kt[r]&&e.push({type:"setDecoration",value:Kt[r]})}else if(r<=29){const t=Kt[r-20];t&&e.push({type:"resetDecoration",value:t})}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Yt[r-30]}});else if(38===r){const[i,r]=Zt(t,n);r&&e.push({type:"setForegroundColor",value:r}),n+=i}else if(39===r)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Yt[r-40]}});else if(48===r){const[i,r]=Zt(t,n);r&&e.push({type:"setBackgroundColor",value:r}),n+=i}else 49===r?e.push({type:"resetBackgroundColor"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Yt[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Yt[r-100+8]}})}return e}var ee={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 ne(t=ee){function e(e){return t[e]}function n(t){return`#${t.map((t=>Math.max(0,Math.min(t,255)).toString(16).padStart(2,"0"))).join("")}`}let i;function r(t){return function(){if(i)return i;i=[];for(let t=0;t<Yt.length;t++)i.push(e(Yt[t]));let t=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let o=0;o<6;o++)i.push(n([t[e],t[r],t[o]]));let r=8;for(let t=0;t<24;t++,r+=10)i.push(n([r,r,r]));return i}()[t]}return{value:function(t){switch(t.type){case"named":return e(t.name);case"rgb":return n(t.rgb);case"table":return r(t.index)}}}}function ie(t,e,n){const i=Gt(t,n),r=Dt(e),o=ne(Object.fromEntries(Yt.map((e=>[e,t.colors?.[`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`]])))),s=function(){let t=null,e=null,n=new Set;return{parse(i){const r=[];let o=0;do{const s=Qt(i,o),l=s.sequence?i.substring(o,s.startPosition):i.substring(o);if(l.length>0&&r.push({value:l,foreground:t,background:e,decorations:new Set(n)}),s.sequence){const i=te(s.sequence);for(const r of i)"resetAll"===r.type?(t=null,e=null,n.clear()):"resetForegroundColor"===r.type?t=null:"resetBackgroundColor"===r.type?e=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of i)"setForegroundColor"===r.type?t=r.value:"setBackgroundColor"===r.type?e=r.value:"setDecoration"===r.type&&n.add(r.value)}o=s.position}while(o<i.length);return r}}}();return r.map((e=>s.parse(e[0]).map((n=>{let r,s;n.decorations.has("reverse")?(r=n.background?o.value(n.background):t.bg,s=n.foreground?o.value(n.foreground):t.fg):(r=n.foreground?o.value(n.foreground):t.fg,s=n.background?o.value(n.background):void 0),r=Ht(r,i),s=Ht(s,i),n.decorations.has("dim")&&(r=function(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e){if(e[3]){const t=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${t}`}return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map((t=>`${t}${t}`)).join("")}80`}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}(r));let l=p.None;return n.decorations.has("bold")&&(l|=p.Bold),n.decorations.has("italic")&&(l|=p.Italic),n.decorations.has("underline")&&(l|=p.Underline),{content:n.value,offset:e[1],color:r,bgColor:s,fontStyle:l}}))))}function re(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(Et(i)||$t(r))return Dt(e).map((t=>[{content:t[0],offset:t[1]}]));const{theme:o,colorMap:s}=t.setTheme(r);if("ansi"===i)return ie(o,e,n);const l=t.getLanguage(i);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Ft(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(n.grammarState.theme!==r)throw new Ft(`Grammar state theme "${n.grammarState.theme}" does not match highlight theme "${r}"`)}return function(t,e,n,i,r){return oe(t,e,n,i,r).tokens}(e,l,o,s,n)}function oe(t,e,n,i,r){const o=Gt(n,r),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=r,a=Dt(t);let u=r.grammarState?function(t){if(!(t instanceof Xt))throw new Ft("Invalid grammar state");return t._stack}(r.grammarState):null!=r.grammarContextCode?oe(r.grammarContextCode,e,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Nt,c=[];const m=[];for(let t=0,h=a.length;t<h;t++){const[h,d]=a[t];if(""===h){c=[],m.push([]);continue}if(s>0&&h.length>=s){c=[],m.push([{content:h,offset:d,color:"",fontStyle:0}]);continue}let f,g,y;r.includeExplanation&&(f=e.tokenizeLine(h,u),g=f.tokens,y=0);const b=e.tokenizeLine2(h,u,l),w=b.tokens.length/2;for(let t=0;t<w;t++){const e=b.tokens[2*t],s=t+1<w?b.tokens[2*t+2]:h.length;if(e===s)continue;const l=b.tokens[2*t+1],a=Ht(i[N.getForeground(l)],o),u=N.getFontStyle(l),m={content:h.substring(e,s),offset:d+e,color:a,fontStyle:u};if(r.includeExplanation){const t=[];if("scopeName"!==r.includeExplanation)for(const e of n.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map((t=>t.trim()));break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map((t=>t.split(/ /)))})}m.explanation=[];let i=0;for(;e+i<s;){const e=g[y],n=h.substring(e.startIndex,e.endIndex);i+=n.length,m.explanation.push({content:n,scopes:"scopeName"===r.includeExplanation?(p=e.scopes,p.map((t=>({scopeName:t})))):se(t,e.scopes)}),y+=1}}c.push(m)}m.push(c),c=[],u=b.ruleStack}var p;return{tokens:m,stateStack:u}}function se(t,e){const n=[];for(let i=0,r=e.length;i<r;i++){const r=e[i];n[i]={scopeName:r,themeMatches:ue(t,r,e.slice(0,i))}}return n}function le(t,e){return t===e||e.substring(0,t.length)===t&&"."===e[t.length]}function ae(t,e,n){if(!le(t[t.length-1],e))return!1;let i=t.length-2,r=n.length-1;for(;i>=0&&r>=0;)le(t[i],n[r])&&(i-=1),r-=1;return-1===i}function ue(t,e,n){const i=[];for(const{selectors:r,settings:o}of t)for(const t of r)if(ae(t,e,n)){i.push(o);break}return i}function ce(t,e,n){const i=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))),r=function(...t){const e=t.map((()=>[])),n=t.length;for(let i=0;i<t[0].length;i++){const r=t.map((t=>t[i])),o=e.map((()=>[]));e.forEach(((t,e)=>t.push(o[e])));const s=r.map((()=>0)),l=r.map((t=>t[0]));for(;l.every((t=>t));){const t=Math.min(...l.map((t=>t.content.length)));for(let e=0;e<n;e++){const n=l[e];n.content.length===t?(o[e].push(n),s[e]+=1,l[e]=r[e][s[e]]):(o[e].push({...n,content:n.content.slice(0,t)}),l[e]={...n,content:n.content.slice(t),offset:n.offset+t})}}}return e}(...i.map((i=>re(t,e,{...n,theme:i.theme})))),o=r[0].map(((t,e)=>t.map(((t,o)=>{const s={content:t.content,variants:{},offset:t.offset};return"includeExplanation"in n&&n.includeExplanation&&(s.explanation=t.explanation),r.forEach(((t,n)=>{const{content:r,explanation:l,offset:a,...u}=t[e][o];s.variants[i[n].color]=u})),s}))));return o}function me(t,e,n){let i,r,o,s,l;if("themes"in n){const{defaultColor:a="light",cssVariablePrefix:u="--shiki-"}=n,c=Object.entries(n.themes).filter((t=>t[1])).map((t=>({color:t[0],theme:t[1]}))).sort(((t,e)=>t.color===a?-1:e.color===a?1:0));if(0===c.length)throw new Ft("`themes` option must not be empty");const m=ce(t,e,n);if(a&&!c.find((t=>t.color===a)))throw new Ft(`\`themes\` option must contain the defaultColor key \`${a}\``);const p=c.map((e=>t.getTheme(e.theme))),h=c.map((t=>t.color));o=m.map((t=>t.map((t=>function(t,e,n,i){const r={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map((e=>qt(t.variants[e]))),s=new Set(o.flatMap((t=>Object.keys(t)))),l=o.reduce(((t,r,o)=>{for(const l of s){const s=r[l]||"inherit";if(0===o&&i)t[l]=s;else{const i="color"===l?"":"background-color"===l?"-bg":`-${l}`,r=n+e[o]+("color"===l?"":i);t[l]?t[l]+=`;${r}:${s}`:t[l]=`${r}:${s}`}}return t}),{});return r.htmlStyle=i?zt(l):Object.values(l).join(";"),r}(t,h,u,a)))));const d=c.map((t=>Gt(t.theme,n)));r=c.map(((t,e)=>(0===e&&a?"":`${u+t.color}:`)+(Ht(p[e].fg,d[e])||"inherit"))).join(";"),i=c.map(((t,e)=>(0===e&&a?"":`${u+t.color}-bg:`)+(Ht(p[e].bg,d[e])||"inherit"))).join(";"),s=`shiki-themes ${p.map((t=>t.name)).join(" ")}`,l=a?void 0:[r,i].join(";")}else{if(!("theme"in n))throw new Ft("Invalid options, either `theme` or `themes` must be provided");{const l=Gt(n.theme,n);o=re(t,e,n);const a=t.getTheme(n.theme);i=Ht(a.bg,l),r=Ht(a.fg,l),s=a.name}}return{tokens:o,fg:r,bg:i,themeName:s,rootStyle:l}}function pe(t,e,n,i={meta:{},options:n,codeToHast:(e,n)=>pe(t,e,n),codeToTokens:(e,n)=>me(t,e,n)}){let r=e;for(const t of Jt(n))r=t.preprocess?.call(i,r,n)||r;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:u}=me(t,r,n);const{mergeWhitespaces:c=!0}=n;!0===c?o=function(t){return t.map((t=>{const e=[];let n="",i=0;return t.forEach(((r,o)=>{const s=!(r.fontStyle&&r.fontStyle&p.Underline);s&&r.content.match(/^\s+$/)&&t[o+1]?(i||(i=r.offset),n+=r.content):n?(s?e.push({...r,offset:i,content:n+r.content}):e.push({content:n,offset:i},r),i=0,n=""):e.push(r)})),e}))}(o):"never"===c&&(o=function(t){return t.map((t=>t.flatMap((t=>{if(t.content.match(/^\s+$/))return t;const e=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!e)return t;const[,n,i,r]=e;if(!n&&!r)return t;const o=[{...t,offset:t.offset+n.length,content:i}];return n&&o.unshift({content:n,offset:t.offset}),r&&o.push({content:r,offset:t.offset+n.length+i.length}),o}))))}(o));const m={...i,get source(){return r}};for(const t of Jt(n))o=t.tokens?.call(m,o)||o;return function(t,e,n){const i=Jt(e),r=[],o={type:"root",children:[]},{structure:s="classic"}=e;let l={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,tabindex:"0",...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter((([t])=>!t.startsWith("_"))))},children:[]},a={type:"element",tagName:"code",properties:{},children:r};const u=[],c={...n,structure:s,addClassToHast:It,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return l},get code(){return a},get lines(){return u}};if(t.forEach(((t,e)=>{e&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&r.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},l=0;for(const r of t){let t={type:"element",tagName:"span",properties:{},children:[{type:"text",value:r.content}]};const a=r.htmlStyle||zt(qt(r));a&&(t.properties.style=a);for(const r of i)t=r?.span?.call(c,t,e+1,l,n)||t;"inline"===s?o.children.push(t):"classic"===s&&n.children.push(t),l+=r.content.length}if("classic"===s){for(const t of i)n=t?.line?.call(c,n,e+1)||n;u.push(n),r.push(n)}})),"classic"===s){for(const t of i)a=t?.code?.call(c,a)||a;l.children.push(a);for(const t of i)l=t?.pre?.call(c,l)||l;o.children.push(l)}let m=o;for(const t of i)m=t?.root?.call(c,m)||m;return m}(o,{...n,fg:s,bg:l,themeName:a,rootStyle:u},m)}const he=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class de{constructor(t,e,n){this.property=t,this.normal=e,n&&(this.space=n)}}function fe(t,e){const n={},i={};let r=-1;for(;++r<t.length;)Object.assign(n,t[r].property),Object.assign(i,t[r].normal);return new de(n,i,e)}function ge(t){return t.toLowerCase()}de.prototype.property={},de.prototype.normal={},de.prototype.space=null;class ye{constructor(t,e){this.property=t,this.attribute=e}}ye.prototype.space=null,ye.prototype.boolean=!1,ye.prototype.booleanish=!1,ye.prototype.overloadedBoolean=!1,ye.prototype.number=!1,ye.prototype.commaSeparated=!1,ye.prototype.spaceSeparated=!1,ye.prototype.commaOrSpaceSeparated=!1,ye.prototype.mustUseProperty=!1,ye.prototype.defined=!1;let be=0;const we=Le(),ve=Le(),je=Le(),ke=Le(),Se=Le(),xe=Le(),Ce=Le();function Le(){return 2**++be}var Te=Object.freeze({__proto__:null,boolean:we,booleanish:ve,commaOrSpaceSeparated:Ce,commaSeparated:xe,number:ke,overloadedBoolean:je,spaceSeparated:Se});const Ae=Object.keys(Te);class Oe extends ye{constructor(t,e,n,i){let r=-1;if(super(t,e),Me(this,"space",i),"number"==typeof n)for(;++r<Ae.length;){const t=Ae[r];Me(this,Ae[r],(n&Te[t])===Te[t])}}}function Me(t,e,n){n&&(t[e]=n)}Oe.prototype.defined=!0;const Pe={}.hasOwnProperty;function Ne(t){const e={},n={};let i;for(i in t.properties)if(Pe.call(t.properties,i)){const r=t.properties[i],o=new Oe(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),e[i]=o,n[ge(i)]=i,n[ge(o.attribute)]=i}return new de(e,n,t.space)}const De=Ne({space:"xlink",transform:(t,e)=>"xlink:"+e.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Ee=Ne({space:"xml",transform:(t,e)=>"xml:"+e.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Re(t,e){return e in t?t[e]:e}function $e(t,e){return Re(t,e.toLowerCase())}const Be=Ne({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$e,properties:{xmlns:null,xmlnsXLink:null}}),Ie=Ne({transform:(t,e)=>"role"===e?e:"aria-"+e.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:ve,ariaAutoComplete:null,ariaBusy:ve,ariaChecked:ve,ariaColCount:ke,ariaColIndex:ke,ariaColSpan:ke,ariaControls:Se,ariaCurrent:null,ariaDescribedBy:Se,ariaDetails:null,ariaDisabled:ve,ariaDropEffect:Se,ariaErrorMessage:null,ariaExpanded:ve,ariaFlowTo:Se,ariaGrabbed:ve,ariaHasPopup:null,ariaHidden:ve,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Se,ariaLevel:ke,ariaLive:null,ariaModal:ve,ariaMultiLine:ve,ariaMultiSelectable:ve,ariaOrientation:null,ariaOwns:Se,ariaPlaceholder:null,ariaPosInSet:ke,ariaPressed:ve,ariaReadOnly:ve,ariaRelevant:null,ariaRequired:ve,ariaRoleDescription:Se,ariaRowCount:ke,ariaRowIndex:ke,ariaRowSpan:ke,ariaSelected:ve,ariaSetSize:ke,ariaSort:null,ariaValueMax:ke,ariaValueMin:ke,ariaValueNow:ke,ariaValueText:null,role:null}}),_e=Ne({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$e,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xe,acceptCharset:Se,accessKey:Se,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Se,autoFocus:we,autoPlay:we,blocking:Se,capture:null,charSet:null,checked:we,cite:null,className:Se,cols:ke,colSpan:null,content:null,contentEditable:ve,controls:we,controlsList:Se,coords:ke|xe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:je,draggable:ve,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Se,height:ke,hidden:we,high:ke,href:null,hrefLang:null,htmlFor:Se,httpEquiv:Se,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Se,itemRef:Se,itemScope:we,itemType:Se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:ke,manifest:null,max:null,maxLength:ke,media:null,method:null,min:null,minLength:ke,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:we,optimum:ke,pattern:null,ping:Se,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Se,required:we,reversed:we,rows:ke,rowSpan:ke,sandbox:Se,scope:null,scoped:we,seamless:we,selected:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shape:null,size:ke,sizes:null,slot:null,span:ke,spellCheck:ve,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ke,step:null,style:null,tabIndex:ke,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ve,width:ke,wrap:null,align:null,aLink:null,archive:Se,axis:null,background:null,bgColor:null,border:ke,borderColor:null,bottomMargin:ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:ke,leftMargin:ke,link:null,longDesc:null,lowSrc:null,marginHeight:ke,marginWidth:ke,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:ke,rules:null,scheme:null,scrolling:ve,standby:null,summary:null,text:null,topMargin:ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ke,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:we,disableRemotePlayback:we,prefix:null,property:null,results:ke,security:null,unselectable:null}}),Ge=Ne({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Re,properties:{about:Ce,accentHeight:ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ke,amplitude:ke,arabicForm:null,ascent:ke,attributeName:null,attributeType:null,azimuth:ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ke,by:null,calcMode:null,capHeight:ke,className:Se,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ke,diffuseConstant:ke,direction:null,display:null,dur:null,divisor:ke,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:ke,enableBackground:null,end:null,event:null,exponent:ke,externalResourcesRequired:null,fill:null,fillOpacity:ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xe,g2:xe,glyphName:xe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ke,horizOriginX:ke,horizOriginY:ke,id:null,ideographic:ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ke,k:ke,k1:ke,k2:ke,k3:ke,k4:ke,kernelMatrix:Ce,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ke,overlineThickness:ke,paintOrder:null,panose1:null,path:null,pathLength:ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ke,pointsAtY:ke,pointsAtZ:ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ce,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ce,rev:Ce,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ce,requiredFeatures:Ce,requiredFonts:Ce,requiredFormats:Ce,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ke,specularExponent:ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ke,strikethroughThickness:ke,string:null,stroke:null,strokeDashArray:Ce,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ke,strokeOpacity:ke,strokeWidth:null,style:null,surfaceScale:ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ce,tabIndex:ke,tableValues:null,target:null,targetX:ke,targetY:ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ce,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ke,underlineThickness:ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ke,values:null,vAlphabetic:ke,vMathematical:ke,vectorEffect:null,vHanging:ke,vIdeographic:ke,version:null,vertAdvY:ke,vertOriginX:ke,vertOriginY:ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),He=/^data[-\w.:]+$/i,qe=/-[a-z]/g,ze=/[A-Z]/g;function Fe(t){return"-"+t.toLowerCase()}function Ue(t){return t.charAt(1).toUpperCase()}const We=fe([Ee,De,Be,Ie,_e],"html"),Ve=fe([Ee,De,Be,Ie,Ge],"svg"),Je={}.hasOwnProperty;function Xe(t,e){return t=t.replace(e.subset?function(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}(e.subset):/["&'<>`]/g,n),e.subset||e.escapeOnly?t:t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(t,n,i){return e.format(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536,i.charCodeAt(n+2),e)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,n);function n(t,n,i){return e.format(t.charCodeAt(0),i.charCodeAt(n+1),e)}}const Ye=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ke={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Qe=["cent","copy","divide","gt","lt","not","para","times"],Ze={}.hasOwnProperty,tn={};let en;for(en in Ke)Ze.call(Ke,en)&&(tn[Ke[en]]=en);function nn(t,e,n){let i,r=function(t,e,n){const i="&#x"+t.toString(16).toUpperCase();return n&&e&&!/[\dA-Fa-f]/.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(i=function(t,e,n,i){const r=String.fromCharCode(t);if(Ze.call(tn,r)){const t=tn[r],o="&"+t;return n&&Ye.includes(t)&&!Qe.includes(t)&&(!i||e&&61!==e&&/[^\da-z]/i.test(String.fromCharCode(e)))?o:o+";"}return""}(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const i=function(t,e,n){const i="&#"+String(t);return n&&e&&!/\d/.test(String.fromCharCode(e))?i:i+";"}(t,e,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function rn(t,e){return Xe(t,Object.assign({format:nn},e))}const on=/^>|^->|<!--|-->|--!>|<!-$/g,sn=[">"],ln=["<",">"];function an(t,e){const n=String(t);if("string"!=typeof e)throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;-1!==r;)i++,r=n.indexOf(e,r+e.length);return i}function un(t,e){const n=e||{};return(""===t[t.length-1]?[...t,""]:t).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}function cn(t){return t.join(" ").trim()}const mn=/[ \t\n\f\r]/g;function pn(t){return"object"==typeof t?"text"===t.type&&hn(t.value):hn(t)}function hn(t){return""===t.replace(mn,"")}const dn=yn(1),fn=yn(-1),gn=[];function yn(t){return function(e,n,i){const r=e?e.children:gn;let o=(n||0)+t,s=r[o];if(!i)for(;s&&pn(s);)o+=t,s=r[o];return s}}const bn={}.hasOwnProperty;function wn(t){return function(e,n,i){return bn.call(t,e.tagName)&&t[e.tagName](e,n,i)}}const vn=wn({body:function(t,e,n){const i=dn(n,e);return!i||"comment"!==i.type},caption:jn,colgroup:jn,dd:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(t,e,n){const i=dn(n,e);return Boolean(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:jn,html:function(t,e,n){const i=dn(n,e);return!i||"comment"!==i.type},li:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(t,e,n){const i=dn(n,e);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))},rp:kn,rt:kn,tbody:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:Sn,tfoot:function(t,e,n){return!dn(n,e)},th:Sn,thead:function(t,e,n){const i=dn(n,e);return Boolean(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&"tr"===i.tagName}});function jn(t,e,n){const i=dn(n,e,!0);return!i||"comment"!==i.type&&!("text"===i.type&&pn(i.value.charAt(0)))}function kn(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function Sn(t,e,n){const i=dn(n,e);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}const xn=wn({body:function(t){const e=dn(t,-1,!0);return!(e&&("comment"===e.type||"text"===e.type&&pn(e.value.charAt(0))||"element"===e.type&&("meta"===e.tagName||"link"===e.tagName||"script"===e.tagName||"style"===e.tagName||"template"===e.tagName)))},colgroup:function(t,e,n){const i=fn(n,e),r=dn(t,-1,!0);if(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&vn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"col"===r.tagName)},head:function(t){const e=t.children,n=[];let i=-1;for(;++i<e.length;){const t=e[i];if("element"===t.type&&("title"===t.tagName||"base"===t.tagName)){if(n.includes(t.tagName))return!1;n.push(t.tagName)}}return e.length>0},html:function(t){const e=dn(t,-1);return!e||"comment"!==e.type},tbody:function(t,e,n){const i=fn(n,e),r=dn(t,-1);if(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&vn(i,n.children.indexOf(i),n))return!1;return Boolean(r&&"element"===r.type&&"tr"===r.tagName)}});const Cn={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ln(t,e,n){const i=function(t,e){const n=ge(e);let i=e,r=ye;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&He.test(e)){if("-"===e.charAt(4)){const t=e.slice(5).replace(qe,Ue);i="data"+t.charAt(0).toUpperCase()+t.slice(1)}else{const t=e.slice(4);if(!qe.test(t)){let n=t.replace(ze,Fe);"-"!==n.charAt(0)&&(n="-"+n),e="data"+n}}r=Oe}return new r(i,e)}(t.schema,e),r=t.settings.allowParseErrors&&"html"===t.schema.space?0:1,o=t.settings.allowDangerousCharacters?0:1;let s,l=t.quote;if(!i.overloadedBoolean||n!==i.attribute&&""!==n?(i.boolean||i.overloadedBoolean&&"string"!=typeof n)&&(n=Boolean(n)):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";const a=rn(i.attribute,Object.assign({},t.settings.characterReferences,{subset:Cn.name[r][o]}));return!0===n?a:(n=Array.isArray(n)?(i.commaSeparated?un:cn)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n?a:(t.settings.preferUnquoted&&(s=rn(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Cn.unquoted[r][o]}))),s!==n&&(t.settings.quoteSmart&&an(n,l)>an(n,t.alternative)&&(l=t.alternative),s=l+rn(n,Object.assign({},t.settings.characterReferences,{subset:("'"===l?Cn.single:Cn.double)[r][o],attribute:!0}))+l),a+(s?"="+s:s)))}const Tn=["<","&"];function An(t,e,n,i){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?rn(t.value,Object.assign({},i.settings.characterReferences,{subset:Tn})):t.value}const On=function(t,e){const n=e||{};function i(e,...n){let r=i.invalid;const o=i.handlers;if(e&&Je.call(e,t)){const n=String(e[t]);r=Je.call(o,n)?o[n]:i.unknown}if(r)return r.call(this,e,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}("type",{invalid:function(t){throw new Error("Expected node, not `"+t+"`")},unknown:function(t){throw new Error("Cannot compile unknown node `"+t.type+"`")},handlers:{comment:function(t,e,n,i){return i.settings.bogusComments?"<?"+rn(t.value,Object.assign({},i.settings.characterReferences,{subset:sn}))+">":"\x3c!--"+t.value.replace(on,(function(t){return rn(t,Object.assign({},i.settings.characterReferences,{subset:ln}))}))+"--\x3e"},doctype:function(t,e,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(t,e,n,i){const r=i.schema,o="svg"!==r.space&&i.settings.omitOptionalTags;let s="svg"===r.space?i.settings.closeEmptyElements:i.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;"html"===r.space&&"svg"===t.tagName&&(i.schema=Ve);const u=function(t,e){const n=[];let i,r=-1;if(e)for(i in e)if(null!==e[i]&&void 0!==e[i]){const r=Ln(t,i,e[i]);r&&n.push(r)}for(;++r<n.length;){const e=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&'"'!==e&&"'"!==e&&(n[r]+=" ")}return n.join("")}(i,t.properties),c=i.all("html"===r.space&&"template"===t.tagName?t.content:t);return i.schema=r,c&&(s=!1),!u&&o&&xn(t,e,n)||(l.push("<",t.tagName,u?" "+u:""),s&&("svg"===r.space||i.settings.closeSelfClosing)&&(a=u.charAt(u.length-1),(!i.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),s||o&&vn(t,e,n)||l.push("</"+t.tagName+">"),l.join("")},raw:function(t,e,n,i){return i.settings.allowDangerousHtml?t.value:An(t,0,n,i)},root:function(t,e,n,i){return i.all(t)},text:An}});const Mn={},Pn={},Nn=[];function Dn(t,e,n){return On(t,e,n,this)}function En(t){const e=[],n=t&&t.children||Nn;let i=-1;for(;++i<n.length;)e[i]=this.one(n[i],i,t);return e.join("")}function Rn(t,e,n){const i={meta:{},options:n,codeToHast:(e,n)=>pe(t,e,n),codeToTokens:(e,n)=>me(t,e,n)};let r=function(t,e){const n=e||Mn,i=n.quote||'"',r='"'===i?"'":'"';if('"'!==i&&"'"!==i)throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:Dn,all:En,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||he,characterReferences:n.characterReferences||Pn,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?Ve:We,quote:i,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}(pe(t,e,n,i));for(const t of Jt(n))r=t.postprocess?.call(i,r,n)||r;return r}function $n(){return"undefined"!=typeof performance?performance.now():Date.now()}const Bn=(t,e)=>t+(e-t%e)%e;async function In(t){let e,n;const i={};function r(t){n=t,i.HEAPU8=new Uint8Array(t),i.HEAPU32=new Uint32Array(t)}function o(t){try{return e.grow(t-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}const s="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e){return t?function(t,e,n=1024){const i=e+n;let r=e;for(;t[r]&&!(r>=i);)++r;if(r-e>16&&t.buffer&&s)return s.decode(t.subarray(e,r));let o="";for(;e<r;){let n=t[e++];if(!(128&n)){o+=String.fromCharCode(n);continue}const i=63&t[e++];if(192==(224&n)){o+=String.fromCharCode((31&n)<<6|i);continue}const r=63&t[e++];if(n=224==(240&n)?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&t[e++],n<65536)o+=String.fromCharCode(n);else{const t=n-65536;o+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return o}(i.HEAPU8,t,e):""}const a={emscripten_get_now:$n,emscripten_memcpy_big:function(t,e,n){i.HEAPU8.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){const e=i.HEAPU8.length,n=2147483648;if((t>>>=0)>n)return!1;for(let i=1;i<=4;i*=2){let r=e*(1+.2/i);r=Math.min(r,t+100663296);if(o(Math.min(n,Bn(Math.max(t,r),65536))))return!0}return!1},fd_write:()=>0};return await async function(){const n={env:a,wasi_snapshot_preview1:a},o=await t(n);e=o.memory,r(e.buffer),Object.assign(i,o),i.UTF8ToString=l}(),i}let _n,Gn=null;class Hn{static _utf8ByteLength(t){let e=0;for(let n=0,i=t.length;n<i;n++){const r=t.charCodeAt(n);let o=r,s=!1;if(r>=55296&&r<=56319&&n+1<i){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(o=65536+(r-55296<<10)|e-56320,s=!0)}e+=o<=127?1:o<=2047?2:o<=65535?3:4,s&&n++}return e}utf16Length;utf8Length;utf16Value;utf8Value;utf16OffsetToUtf8;utf8OffsetToUtf16;constructor(t){const e=t.length,n=Hn._utf8ByteLength(t),i=n!==e,r=i?new Uint32Array(e+1):null;i&&(r[e]=n);const o=i?new Uint32Array(n+1):null;i&&(o[n]=e);const s=new Uint8Array(n);let l=0;for(let n=0;n<e;n++){const a=t.charCodeAt(n);let u=a,c=!1;if(a>=55296&&a<=56319&&n+1<e){const e=t.charCodeAt(n+1);e>=56320&&e<=57343&&(u=65536+(a-55296<<10)|e-56320,c=!0)}i&&(r[n]=l,c&&(r[n+1]=l),u<=127?o[l+0]=n:u<=2047?(o[l+0]=n,o[l+1]=n):u<=65535?(o[l+0]=n,o[l+1]=n,o[l+2]=n):(o[l+0]=n,o[l+1]=n,o[l+2]=n,o[l+3]=n)),u<=127?s[l++]=u:u<=2047?(s[l++]=192|(1984&u)>>>6,s[l++]=128|(63&u)>>>0):u<=65535?(s[l++]=224|(61440&u)>>>12,s[l++]=128|(4032&u)>>>6,s[l++]=128|(63&u)>>>0):(s[l++]=240|(1835008&u)>>>18,s[l++]=128|(258048&u)>>>12,s[l++]=128|(4032&u)>>>6,s[l++]=128|(63&u)>>>0),c&&n++}this.utf16Length=e,this.utf8Length=n,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=o}createString(t){const e=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,e),e}}class qn{static LAST_ID=0;static _sharedPtr=0;static _sharedPtrInUse=!1;id=++qn.LAST_ID;_onigBinding;content;utf16Length;utf8Length;utf16OffsetToUtf8;utf8OffsetToUtf16;ptr;constructor(t){if(!Gn)throw new Ft("Must invoke loadWasm first.");this._onigBinding=Gn,this.content=t;const e=new Hn(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!qn._sharedPtrInUse?(qn._sharedPtr||(qn._sharedPtr=Gn.omalloc(1e4)),qn._sharedPtrInUse=!0,Gn.HEAPU8.set(e.utf8Value,qn._sharedPtr),this.ptr=qn._sharedPtr):this.ptr=e.createString(Gn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===qn._sharedPtr?qn._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}}class zn{_onigBinding;_ptr;constructor(t){if(!Gn)throw new Ft("Must invoke loadWasm first.");const e=[],n=[];for(let i=0,r=t.length;i<r;i++){const r=new Hn(t[i]);e[i]=r.createString(Gn),n[i]=r.utf8Length}const i=Gn.omalloc(4*t.length);Gn.HEAPU32.set(e,i/4);const r=Gn.omalloc(4*t.length);Gn.HEAPU32.set(n,r/4);const o=Gn.createOnigScanner(i,r,t.length);for(let n=0,i=t.length;n<i;n++)Gn.ofree(e[n]);Gn.ofree(r),Gn.ofree(i),0===o&&function(t){throw new Ft(t.UTF8ToString(t.getLastOnigError()))}(Gn),this._onigBinding=Gn,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,e,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof t){t=new qn(t);const n=this._findNextMatchSync(t,e,!1,i);return t.dispose(),n}return this._findNextMatchSync(t,e,!1,i)}_findNextMatchSync(t,e,n,i){const r=this._onigBinding,o=r.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(e),i);if(0===o)return null;const s=r.HEAPU32;let l=o/4;const a=s[l++],u=s[l++],c=[];for(let e=0;e<u;e++){const n=t.convertUtf8OffsetToUtf16(s[l++]),i=t.convertUtf8OffsetToUtf16(s[l++]);c[e]={start:n,end:i,length:i-n}}return{index:a,captureIndices:c}}}function Fn(t){if(_n)return _n;return _n=async function(){Gn=await In((async e=>{let n=t;var i;return n=await n,"function"==typeof n&&(n=await n(e)),"function"==typeof n&&(n=await n(e)),"function"==typeof n.instantiator?n=await n.instantiator(e):!function(t){return"function"==typeof t.default}(n)?(function(t){return void 0!==t.data}(n)&&(n=n.data),!function(t){return"undefined"!=typeof Response&&t instanceof Response}(n)?!function(t){return"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||"undefined"!=typeof Buffer&&Buffer.isBuffer?.(t)||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&t instanceof Uint32Array}(n)?n instanceof WebAssembly.Module?n=await Un(n)(e):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Un(n.default)(e)):n=await Un(n)(e):n="function"==typeof WebAssembly.instantiateStreaming?await(i=n,t=>WebAssembly.instantiateStreaming(i,t))(e):await function(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}(n)(e)):n=await n.default(e),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n}))}(),_n}function Un(t){return e=>WebAssembly.instantiate(t,e)}async function Wn(t){return t&&await Fn(t),{createScanner:t=>new zn(t),createString:t=>new qn(t)}}const Vn={light:"#333333",dark:"#bbbbbb"},Jn={light:"#fffffe",dark:"#1e1e1e"},Xn="__shiki_resolved";function Yn(t){if(t?.[Xn])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:i}=e;if(!n||!i){const t=e.settings?e.settings.find((t=>!t.name&&!t.scope)):void 0;t?.settings?.foreground&&(i=t.settings.foreground),t?.settings?.background&&(n=t.settings.background),!i&&e?.colors?.["editor.foreground"]&&(i=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),i||(i="light"===e.type?Vn.light:Vn.dark),n||(n="light"===e.type?Jn.light:Jn.dark),e.fg=i,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 o=new Map;function s(t){if(o.has(t))return o.get(t);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${n}`]?s(t):(o.set(t,n),n)}e.settings=e.settings.map((t=>{const n=t.settings?.foreground&&!t.settings.foreground.startsWith("#"),i=t.settings?.background&&!t.settings.background.startsWith("#");if(!n&&!i)return t;const r={...t,settings:{...t.settings}};if(n){const n=s(t.settings.foreground);e.colorReplacements[n]=t.settings.foreground,r.settings.foreground=n}if(i){const n=s(t.settings.background);e.colorReplacements[n]=t.settings.background,r.settings.background=n}return r}));for(const t of Object.keys(e.colors||{}))if(("editor.foreground"===t||"editor.background"===t||t.startsWith("terminal.ansi"))&&!e.colors[t]?.startsWith("#")){const n=s(e.colors[t]);e.colorReplacements[n]=e.colors[t],e.colors[t]=n}return Object.defineProperty(e,Xn,{enumerable:!1,writable:!1,value:!0}),e}async function Kn(t){return Array.from(new Set((await Promise.all(t.filter((t=>!Rt(t))).map((async t=>await _t(t).then((t=>Array.isArray(t)?t:[t])))))).flat()))}async function Qn(t){return(await Promise.all(t.map((async t=>Bt(t)?null:Yn(await _t(t)))))).filter((t=>!!t))}class Zn extends Pt{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,i={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=i,this._themes.map((t=>this.loadTheme(t))),this.loadLanguages(this._langs)}getTheme(t){return"string"==typeof t?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=Yn(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=S.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){if(this._alias[t]){const e=new Set([t]);for(;this._alias[t];){if(t=this._alias[t],e.has(t))throw new Ft(`Circular alias \`${Array.from(e).join(" -> ")} -> ${t}\``);e.add(t)}}return this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter((e=>e.embeddedLangsLazy?.includes(t.name))));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const i=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(i.name=t.name,this._resolvedGrammars.set(t.name,i),t.aliases&&t.aliases.forEach((e=>{this._alias[e]=t.name})),this._loadedLanguagesCache=null,e.size)for(const t of e)this._resolvedGrammars.delete(t.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(t.scopeName),this._syncRegistry?._grammars?.delete(t.scopeName),this.loadLanguage(this._langMap.get(t.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const e of t)this.resolveEmbeddedLanguages(e);const e=Array.from(this._langGraph.entries()),n=e.filter((([t,e])=>!e));if(n.length){const t=e.filter((([t,e])=>e&&e.embeddedLangs?.some((t=>n.map((([t])=>t)).includes(t))))).filter((t=>!n.includes(t)));throw new Ft(`Missing languages ${n.map((([t])=>`\`${t}\``)).join(", ")}, required by ${t.map((([t])=>`\`${t}\``)).join(", ")}`)}for(const[t,n]of e)this._resolver.addLanguage(n);for(const[t,n]of e)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){if(this._langMap.set(t.name,t),this._langGraph.set(t.name,t),t.embeddedLangs)for(const e of t.embeddedLangs)this._langGraph.set(e,this._langMap.get(e))}}class ti{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:e=>t.createScanner(e),createOnigString:e=>t.createString(e)},e.forEach((t=>this.addLanguage(t)))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach((e=>{this._langs.set(e,t)})),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach((e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)}))}getInjections(t){const e=t.split(".");let n=[];for(let t=1;t<=e.length;t++){const i=e.slice(0,t).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let ei,ni=0;async function ii(t={}){const[e,n,i]=await Promise.all([Qn(t.themes||[]),Kn(t.langs||[]),t.engine||Wn(t.loadWasm||ei)]);return function(t){ni+=1,!1!==t.warnings&&ni>=10&&ni%10==0&&console.warn(`[Shiki] ${ni} 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 Ft("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),i=(t.themes||[]).flat(1).map(Yn),r=new ti(t.engine,n),o=new Zn(r,i,n,t.langAlias);let s;function l(t){if("none"===t)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();const e=o.getTheme(t);if(!e)throw new Ft(`Theme \`${t}\` not found, you may need to load it first`);return e}function a(...t){c(),o.loadLanguages(t.flat(1))}async function u(...t){c();for(const e of t.flat(1))o.loadTheme(e)}function c(){if(e)throw new Ft("Shiki instance has been disposed")}function m(){e||(e=!0,o.dispose(),ni-=1)}return{setTheme:function(t){c();const e=l(t);return s!==t&&(o.setTheme(e),s=t),{theme:e,colorMap:o.getColorMap()}},getTheme:l,getLanguage:function(t){c();const e=o.getGrammar("string"==typeof t?t:t.name);if(!e)throw new Ft(`Language \`${t}\` not found, you may need to load it first`);return e},getLoadedThemes:function(){return c(),o.getLoadedThemes()},getLoadedLanguages:function(){return c(),o.getLoadedLanguages()},loadLanguage:async function(...t){return a(await Kn(t))},loadLanguageSync:a,loadTheme:async function(...t){return c(),u(await Qn(t))},loadThemeSync:u,dispose:m,[Symbol.dispose]:m}}({...t,loadWasm:void 0,themes:e,langs:n,engine:i})}async function ri(t={}){const e=await ii(t);return{getLastGrammarState:(t,n)=>function(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(Et(i)||$t(r))throw new Ft("Plain language does not have grammar state");if("ansi"===i)throw new Ft("ANSI language does not have grammar state");const{theme:o,colorMap:s}=t.setTheme(r),l=t.getLanguage(i);return new Xt(oe(e,l,o,s,n).stateStack,l.name,o.name)}(e,t,n),codeToTokensBase:(t,n)=>re(e,t,n),codeToTokensWithThemes:(t,n)=>ce(e,t,n),codeToTokens:(t,n)=>me(e,t,n),codeToHast:(t,n)=>pe(e,t,n),codeToHtml:(t,n)=>Rn(e,t,n),...e,getInternalContext:()=>e}}function oi(t,e,n){let i,r,o;if(e)i=t,r=e,o=()=>Wn(n);else{const e=t;i=e.langs,r=e.themes,o=e.engine}return async function(t){function e(t){if("string"==typeof t){if(Rt(t))return[];const e=i[t];if(!e)throw new Ft(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}function n(t){if(Bt(t))return"none";if("string"==typeof t){const e=r[t];if(!e)throw new Ft(`Theme \`${t}\` is not included in this bundle. You may want to load it from external source.`);return e}return t}const s=(t.themes??[]).map((t=>n(t))),l=(t.langs??[]).map((t=>e(t))),a=await ri({engine:o(),...t,themes:s,langs:l});return{...a,loadLanguage:(...t)=>a.loadLanguage(...t.map(e)),loadTheme:(...t)=>a.loadTheme(...t.map(n))}}}function si(t){const e=function(t){let e;return async function(n={}){if(e){const t=await e;return await Promise.all([t.loadTheme(...n.themes||[]),t.loadLanguage(...n.langs||[])]),t}return e=t({...n,themes:n.themes||[],langs:n.langs||[]}),e}}(t);return{getSingletonHighlighter:t=>e(t),codeToHtml:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToHtml(t,n),codeToHast:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToHast(t,n),codeToTokens:async(t,n)=>(await e({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)})).codeToTokens(t,n),codeToTokensBase:async(t,n)=>(await e({langs:[n.lang],themes:[n.theme]})).codeToTokensBase(t,n),codeToTokensWithThemes:async(t,n)=>(await e({langs:[n.lang],themes:Object.values(n.themes).filter(Boolean)})).codeToTokensWithThemes(t,n),getLastGrammarState:async(t,n)=>(await e({langs:[n.lang],themes:[n.theme]})).getLastGrammarState(t,n)}}new Set("!?:=+$(){}_><# "),new Set("-!:=_>< ");const li=oi({langs:a,themes:m,engine:()=>Wn(u)}),{codeToHtml:ai,codeToHast:ui,codeToTokens:ci,codeToTokensBase:mi,codeToTokensWithThemes:pi,getSingletonHighlighter:hi,getLastGrammarState:di}=si(li);let fi=class extends o{constructor(){super(...arguments),this.code="",this.language="javascript",this.theme="min-light",this.highlightedCode=""}static get styles(){return[r]}async updated(t){(t.has("code")||t.has("language")||t.has("theme"))&&(this.highlightedCode=await ai(this.code,{lang:this.language,theme:this.theme}),this.requestUpdate())}render(){return e`
2
2
  <div class="code-container" .innerHTML=${this.highlightedCode}></div>
3
3
  `}};t([s({type:String})],fi.prototype,"code",void 0),t([s({type:String,reflect:!0})],fi.prototype,"language",void 0),t([s({type:String,reflect:!0})],fi.prototype,"theme",void 0),t([n()],fi.prototype,"highlightedCode",void 0),fi=t([i("nile-highlighter")],fi);export{fi as N};