chapkit 2.0.0__tar.gz → 2.1.0__tar.gz

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 (94) hide show
  1. {chapkit-2.0.0 → chapkit-2.1.0}/PKG-INFO +1 -1
  2. {chapkit-2.0.0 → chapkit-2.1.0}/pyproject.toml +1 -1
  3. {chapkit-2.0.0 → chapkit-2.1.0}/pyproject.toml.orig +1 -1
  4. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/__init__.py +2 -0
  5. chapkit-2.0.0/src/chapkit/api/apps/console/assets/dist-B7bpuMSM.js → chapkit-2.1.0/src/chapkit/api/apps/console/assets/dist-CjxGhzN4.js +2 -2
  6. chapkit-2.1.0/src/chapkit/api/apps/console/assets/index-BEhTq576.js +127 -0
  7. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/index.html +1 -1
  8. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/manifest.json +1 -1
  9. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/service_builder.py +8 -1
  10. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/migrate.py +4 -4
  11. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/main.py.jinja2 +3 -1
  12. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/main_shell.py.jinja2 +3 -1
  13. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/CHAPKIT_migrate.md.jinja2 +1 -1
  14. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/test/command.py +43 -4
  15. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/test/runner.py +14 -1
  16. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/schemas.py +31 -4
  17. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/ml/__init__.py +2 -0
  18. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/ml/manager.py +100 -19
  19. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/ml/router.py +15 -2
  20. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/ml/runner.py +5 -0
  21. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/ml/schemas.py +39 -1
  22. chapkit-2.0.0/src/chapkit/api/apps/console/assets/index-CQwQU2vo.js +0 -127
  23. {chapkit-2.0.0 → chapkit-2.1.0}/README.md +0 -0
  24. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic/__init__.py +0 -0
  25. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic/env.py +0 -0
  26. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic/script.py.mako +0 -0
  27. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic/versions/20251010_0927_4d869b5fb06e_initial_schema.py +0 -0
  28. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic/versions/__init__.py +0 -0
  29. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/alembic_helpers.py +0 -0
  30. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/__init__.py +0 -0
  31. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/index-HY9NoZeE.css +0 -0
  32. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/javascript-CppQSorr.js +0 -0
  33. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-cyrillic-ext-wght-normal-BCp_3N7R.woff2 +0 -0
  34. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-cyrillic-wght-normal-fOt7epNf.woff2 +0 -0
  35. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-greek-ext-wght-normal-Bgw4czJT.woff2 +0 -0
  36. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-greek-wght-normal-DlT9XTxE.woff2 +0 -0
  37. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-latin-ext-wght-normal-DYIxWhlt.woff2 +0 -0
  38. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-latin-wght-normal-ccAYIvAh.woff2 +0 -0
  39. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-math-wght-normal-4a3xuzGk.woff2 +0 -0
  40. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-symbols-wght-normal-B7iHSfaG.woff2 +0 -0
  41. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/roboto-vietnamese-wght-normal-_f1XEJpo.woff2 +0 -0
  42. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/vitesse-dark-BZCL-v6S.js +0 -0
  43. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/assets/vitesse-light-VbXTXTou.js +0 -0
  44. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/favicon.svg +0 -0
  45. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/apps/console/icons.svg +0 -0
  46. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/api/dependencies.py +0 -0
  47. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/__init__.py +0 -0
  48. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/manager.py +0 -0
  49. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/models.py +0 -0
  50. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/repository.py +0 -0
  51. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/router.py +0 -0
  52. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/artifact/schemas.py +0 -0
  53. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/__init__.py +0 -0
  54. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/__main__.py +0 -0
  55. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/artifact.py +0 -0
  56. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/cli.py +0 -0
  57. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/init.py +0 -0
  58. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/mlproject.py +0 -0
  59. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/requirements.py +0 -0
  60. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/run.py +0 -0
  61. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/.dockerignore +0 -0
  62. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/.gitignore +0 -0
  63. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/.python-version +0 -0
  64. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/Dockerfile.jinja2 +0 -0
  65. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/README.md.jinja2 +0 -0
  66. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/compose.yml.jinja2 +0 -0
  67. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/Dockerfile_migrate.jinja2 +0 -0
  68. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/Makefile_migrate.jinja2 +0 -0
  69. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/README_migrate.md.jinja2 +0 -0
  70. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/dockerignore_migrate.jinja2 +0 -0
  71. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/gitignore_migrate.jinja2 +0 -0
  72. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/main_migrate.py.jinja2 +0 -0
  73. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/pyproject_migrate.toml.jinja2 +0 -0
  74. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/migrate/requirements_migrate.txt.jinja2 +0 -0
  75. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/publish-docker.yml.jinja2 +0 -0
  76. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/pyproject.toml.jinja2 +0 -0
  77. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/scripts/predict.R.jinja2 +0 -0
  78. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/scripts/predict_model.py.jinja2 +0 -0
  79. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/scripts/train.R.jinja2 +0 -0
  80. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/templates/scripts/train_model.py.jinja2 +0 -0
  81. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/test/__init__.py +0 -0
  82. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/cli/test/utils.py +0 -0
  83. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/__init__.py +0 -0
  84. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/manager.py +0 -0
  85. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/models.py +0 -0
  86. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/repository.py +0 -0
  87. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/config/router.py +0 -0
  88. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/data/__init__.py +0 -0
  89. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/data/dataframe.py +0 -0
  90. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/data/generator.py +0 -0
  91. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/data/geo.py +0 -0
  92. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/py.typed +0 -0
  93. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/scheduler.py +0 -0
  94. {chapkit-2.0.0 → chapkit-2.1.0}/src/chapkit/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: chapkit
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: ML and data service modules built on servicekit - config, artifacts, and ML workflows
5
5
  Keywords: ml,machine-learning,data-science,artifacts,config,servicekit
6
6
  Author: Morten Hansen
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chapkit"
3
- version = "2.0.0"
3
+ version = "2.1.0"
4
4
  description = "ML and data service modules built on servicekit - config, artifacts, and ML workflows"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "chapkit"
3
- version = "2.0.0"
3
+ version = "2.1.0"
4
4
  description = "ML and data service modules built on servicekit - config, artifacts, and ML workflows"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Morten Hansen", email = "morten@dhis2.org" }]
@@ -52,6 +52,7 @@ from .ml import (
52
52
  ModelRunnerProtocol,
53
53
  PredictRequest,
54
54
  PredictResponse,
55
+ RunInfo,
55
56
  ShellModelRunner,
56
57
  TrainRequest,
57
58
  TrainResponse,
@@ -109,6 +110,7 @@ __all__ = [
109
110
  "ModelRunnerProtocol",
110
111
  "PredictRequest",
111
112
  "PredictResponse",
113
+ "RunInfo",
112
114
  "ShellModelRunner",
113
115
  "TrainRequest",
114
116
  "TrainResponse",
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./index-CQwQU2vo.js";var p=c(n(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})}))(),1);p.default.setLevel(`silent`);var m=p.default,h={STRING:`String`,NUMBER:`Number`,TRUE:`True`,FALSE:`False`,NULL:`Null`,OBJECT:`Object`,ARRAY:`Array`,PROPERTY:`Property`,PROPERTY_NAME:`PropertyName`,PROPERTY_COLON:`PropertyColon`,ITEM:`Item`,JSON_TEXT:`JsonText`,INVALID:`⚠`},g={Pair:h.PROPERTY,Key:h.PROPERTY_NAME,BlockSequence:h.ARRAY,BlockMapping:h.OBJECT,FlowSequence:h.ARRAY,FlowMapping:h.OBJECT,QuotedLiteral:h.STRING,Literal:h.STRING,Stream:h.JSON_TEXT,Document:h.OBJECT},_={File:h.JSON_TEXT},v=[h.STRING,h.NUMBER,h.TRUE,h.FALSE,h.NULL],y=[h.OBJECT,h.ARRAY,h.ITEM],b={JSON5:`json5`,JSON:`json4`,YAML:`yaml`},x=(e,t)=>{switch(t){case b.YAML:return g[e]??e;case b.JSON5:return _[e]??e;default:return e}};function S(e,t,n){let r=[];for(let i=t;i?.parent;i=i.parent)switch(x(i.parent.name,n)){case h.PROPERTY:{let t=de(i.parent,h.PROPERTY_NAME,n);if(t){let n=ie(e,t).replace(/[/~]/g,e=>e===`~`?`~0`:`~1`);r.unshift(n)}break}case h.ARRAY:if(se(i,n)){let e=me(i.parent,i,n);r.unshift(`${e}`)}}return r.length===0?``:`/`+r.join(`/`)}var ee=(e,t,n=-1,r)=>S(e.doc,s(e).resolve(t,n),r),te=(e,t)=>{let n=s(e),r=new Map;return n.iterate({enter:n=>{if([h.PROPERTY_NAME,h.OBJECT].includes(x(n.name,t))){let i=S(e.doc,n.node,t),{from:a,to:o}=n.node;if(!n.node?.nextSibling?.node)return r.set(i,{keyFrom:a,keyTo:o}),!0;let s=t===b.JSON?n.node?.nextSibling?.node:n.node?.nextSibling?.node?.nextSibling?.node;if(!s)return r.set(i,{keyFrom:a,keyTo:o}),!0;let{from:c,to:l}=s;return r.set(i,{keyFrom:a,keyTo:o,valueFrom:c,valueTo:l}),!0}}}),r},ne=(e,t,n=-1)=>s(e).resolveInner(t,n),C=e=>e.replace(/^"(.*)"$/,`$1`).replace(/^'(.*)'$/,`$1`),re=e=>e.replace(/^"(.*)"$/,`'$1'`),ie=(e,t,n=!0,r=!0)=>{let i=t?e.sliceString(t.from,t.to):``;return n?r?C(i):i.replace(/(^["'])|(["']$)/g,``):i},ae=(e,t)=>x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY_NAME||x(e.prevSibling?.name??``,t)===h.PROPERTY_COLON),oe=(e,t)=>v.includes(x(e.name,t))||ae(e,t),se=(e,t)=>[...v,...y].includes(x(e.name,t))||ae(e,t),ce=(e,t)=>x(e.name,t)===h.PROPERTY_NAME||x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY||x(e.prevSibling?.name??``,t)===`{`)||t===b.YAML&&x(e.parent?.name??``,t)===h.OBJECT,le=e=>{let t=[],n=e.firstChild;for(;n;)n&&t.push(n),n=n?.nextSibling;return t},ue=(e,t,n)=>le(e).filter(e=>x(e.name,n)===t),de=(e,t,n)=>le(e).find(e=>x(e.name,n)===t)??null,fe=(e,t)=>le(e).find(e=>oe(e,t)),pe=(e,t)=>le(e).filter(e=>v.includes(x(e.name,t))||y.includes(x(e.name,t))),me=(e,t,n)=>pe(e,n).findIndex(e=>e.from===t.from&&e.to===t.to),w=(e,t,n,r=1/0)=>{let i=e;for(;i&&r>0;){if(x(i.name,n)===t)return i;i=i.parent,r--}return null},he=t.define(),ge=a.define({create(){},update(e,t){for(let e of t.effects)if(e.is(he))return e.value;return e}}),_e=e=>e.field(ge),ve=e=>[ge.init(()=>e)],ye={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},be=Object.prototype.toString;function T(e){let t=be.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t===`file`?`object`:t}var xe=`object`,Se=`array`;function Ce(e,t={}){return e.replace(/\{\{\w+\}\}/g,e=>{let n=t[e.replace(/[{}]/g,``)],r=T(n);return r===xe||r===Se?JSON.stringify(n):n})}function we(e,t,n=e){return Ce(ye[e]??n,t)}function E(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function D(e,t){return{type:`error`,name:e,code:E(e),message:we(e,t),data:t}}function O(e){return D.bind(null,e)}function k(e,t=[]){for(let n=0;n<e.length;n+=1){let r=e[n];Array.isArray(r)?k(r,t):t.push(r)}return t}var A={DECLARATOR_ONEOF:`oneOfProperty`,GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:[`_id`],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function Te(e,t,n){let r={...t};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:e})}),r}function j(e){return e?.type===`error`}function M(e){return e instanceof Promise}function Ee(e){return j(e)||M(e)}var{DECLARATOR_ONEOF:N}=A;function De(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[],a=[];for(let o=0;o<n.oneOf.length;o+=1){let s=e.resolveRef(n.oneOf[o]),c=k(e.validate(t,s,r));c=c.filter(Ee),c.length>0?a.push(...c):i.push({index:o,schema:s})}return i.length===1?Te(n,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:r,schema:n,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf,errors:a})}function Oe(e,t,n,r){if(n==null||t.properties==null)return-1;let i=0,a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){let s=a[o];n[s]!=null&&e.isValid(n[s],t.properties[s],r)&&(i+=1)}return i}function ke(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[];for(let a=0;a<n.oneOf.length;a+=1){let o=e.resolveRef(n.oneOf[a]);e.isValid(t,o,r)&&i.push({schema:o,index:a})}if(i.length===1)return Te(n,i[0].schema,i[0].index);if(T(t)===`object`){let i,a=-1,o=0;for(let r=0;r<n.oneOf.length;r+=1){let s=Oe(e,e.resolveRef(n.oneOf[r]),t);o<s&&(o=s,i=n.oneOf[r],a=r)}return i===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf}):Te(n,i,a)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}var Ae=(e,t,n,r)=>{if(Array.isArray(t.oneOf)){let i=e.resolveOneOf(n,t,r);if(j(i))return i}},je=c(n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(r[i]=p(e,i)&&n.isMergeableObject(t[i])?u(i,n)(e[i],t[i],n):c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))()),Me=(e,t)=>t,Ne=(e,t)=>(0,je.default)(e,t,{arrayMerge:Me}),P=(e,t)=>{let n=e.concat(t);return n.filter((e,t)=>n.indexOf(e)===t)},Pe=(e,t)=>(0,je.default)(e,t,{arrayMerge:P});function F(e,t){if(T(e)!==T(t))return e;let n=Pe(e,t);return e.getOneOfOrigin?Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),e.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),n}var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ie(e,t)};function Le(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ie(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Re=Object.create,ze=Function.prototype.toString,Be=Object.prototype.toString,Ve=Object.setPrototypeOf,He=function(e){Le(t,e);function t(n){var r=e.call(this,`Maximum copy depth of `+String(n)+` exceeded; the value copied is nested too deeply.`)||this;return Ve&&Ve(r,t.prototype),r.maxDepth=n,r.name=`MaxDepthExceededError`,r}return t}(RangeError),Ue=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();function We(){return new Ue}function Ge(){return new WeakMap}var Ke=typeof WeakMap<`u`?Ge:We;function qe(e){if(!e)return Re(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:Re(e);if(t&&~ze.call(t).indexOf(`[native code]`))try{return new t}catch{}return Re(e)}function Je(e){var t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t}function Ye(e){return e.flags}var Xe=/test/g.flags===`g`?Ye:Je;function Ze(e){var t=Be.call(e);return t.substring(8,t.length-1)}function Qe(e){return e[Symbol.toStringTag]||Ze(e)}var $e=typeof Symbol<`u`?Qe:Ze,et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,nt=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,it=Object.prototype,at=it.hasOwnProperty,ot=it.propertyIsEnumerable,st=typeof rt==`function`;function ct(e){return nt(e).concat(rt(e))}var lt=st?ct:nt;function ut(e,t,n){for(var r=lt(e),i=0,a=r.length,o=void 0,s=void 0;i<a;++i)if(o=r[i],o!==`callee`&&o!==`caller`){if(s=tt(e,o),!s){t[o]=n.copier(e[o],n);continue}!s.get&&!s.set&&(s.value=n.copier(s.value,n));try{et(t,o,s)}catch{t[o]=s.value}}return t}function dt(e,t){var n=new t.Constructor;t.cache.set(e,n);for(var r=0,i=e.length;r<i;++r)n[r]=t.copier(e[r],t);return n}function ft(e,t){var n=new t.Constructor;return t.cache.set(e,n),ut(e,n,t)}function pt(e,t){return e.slice(0)}function mt(e,t){return e.slice(0,e.size,e.type)}function ht(e,t){return new t.Constructor(pt(e.buffer))}function gt(e,t){return new t.Constructor(e.getTime())}function _t(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e,r){n.set(r,t.copier(e,t))}),n}function vt(e,t){return ut(e,_t(e,t),t)}function yt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));return n}function bt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));for(var i=rt(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],ot.call(e,s)&&(n[s]=t.copier(e[s],t));return n}var xt=st?bt:yt;function St(e,t){var n=qe(t.prototype);return t.cache.set(e,n),ut(e,n,t)}function Ct(e,t){return new t.Constructor(e.valueOf())}function wt(e,t){var n=new t.Constructor(e.source,Xe(e));return n.lastIndex=e.lastIndex,n}function Tt(e,t){return e}function Et(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e){n.add(t.copier(e,t))}),n}function Dt(e,t){return ut(e,Et(e,t),t)}var Ot=Array.isArray,kt=Object.assign,At=Object.getPrototypeOf||(function(e){return e.__proto__}),jt={array:dt,arrayBuffer:pt,blob:mt,dataView:ht,date:gt,error:Tt,map:_t,object:xt,regExp:wt,set:Et,maxDepth:1e3},Mt=kt({},jt,{array:ft,map:vt,object:St,set:Dt});function Nt(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:Ct,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:Ct,Object:e.object,Promise:Tt,RegExp:e.regExp,Set:e.set,String:Ct,WeakMap:Tt,WeakSet:Tt,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Pt(e){var t=kt({},jt,e),n=Nt(t);if(!n.Object||!n.Array)throw Error(`An object and array copier must be provided.`);var r=n.Array,i=n.Object,a=t.maxDepth;function o(e,t){if(t.prototype=t.Constructor=void 0,!e||typeof e!=`object`)return e;if(t.cache.has(e))return t.cache.get(e);if(++t.depth>a)throw new He(a);t.prototype=At(e),t.Constructor=t.prototype&&t.prototype.constructor;var o;if(!t.Constructor||t.Constructor===Object)o=i(e,t);else if(Ot(e))o=r(e,t);else{var s=n[$e(e)];o=s?s(e,t):typeof e.then==`function`?e:i(e,t)}return--t.depth,o}return function(e){return o(e,{Constructor:void 0,cache:Ke(),copier:o,depth:0,prototype:void 0})}}function Ft(e){return Pt(kt({},Mt,e))}Ft({});var It=Pt({});function Lt(e,t,n){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){let r=e.validate(n,e.resolveRef(t.if));if(r.length===0&&t.then)return e.resolveRef(t.then);if(r.length!==0&&t.else)return e.resolveRef(t.else)}}}var Rt=(e,t,n,r)=>{let i=Lt(e,t,n);if(i)return e.validate(n,i,r)};function zt(e,t,n){let r={...e.resolveRef(t)??{}};return Lt(e,r,n)||Fe(r,`if`,`then`,`else`)}function Bt(e,t,n=e.rootSchema){let r=It(n);for(let i=0;i<n.allOf.length;i+=1){let a=zt(e,n.allOf[i],t);r=F(r,a)}return delete r.allOf,r}function Vt(e,t){let{allOf:n}=t;if(!Array.isArray(n)||n.length===0)return;let r={};return n.forEach(t=>{r=F(r,e.resolveRef(t))}),r}var Ht=(e,t,n,r)=>{let{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;let a=[];return t.allOf.forEach(t=>{a.push(...e.validate(n,t,r))}),a};function Ut(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function Wt(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Gt(e){return T(e)===`object`}function Kt(e,t,n){let{dependencies:r}=t;if(!Gt(r)||!Gt(n))return;let i=!1,a={required:[]};if(Object.keys(r).forEach(o=>{if(n[o]==null&&!(t.required?.includes(o)||a.required?.includes(o)))return;let s=r[o];if(Array.isArray(s)){i=!0,a.required.push(...s);return}if(Gt(s)){i=!0,a=F(a,e.resolveRef(s));return}}),i)return a.required=Wt(a.required),a}var qt=(e,t,n,r)=>{if(T(t.dependencies)!==`object`)return;let i=[];return Object.keys(n).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:r,schema:t,value:n}));return}let o,s=T(t.dependencies[a]);if(s===`array`)o=t.dependencies[a].filter(e=>n[e]===void 0).map(i=>e.errors.missingDependencyError({missingProperty:i,pointer:r,schema:t,value:n}));else if(s===`object`)o=e.validate(n,t.dependencies[a],r);else throw Error(`Invalid dependency definition for ${r}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function Jt(e,t,n){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let r;return t.anyOf.forEach(t=>{t=e.resolveRef(t),e.isValid(n,t)&&(r=r?F(r,t):t)}),r}function Yt(e,t,n=e.rootSchema,r=`#`){let{anyOf:i}=n;if(!Array.isArray(i)||i.length===0)return n;let a=Jt(e,n,t);return a==null?e.errors.anyOfError({pointer:r,schema:n,value:t,anyOf:JSON.stringify(i)}):Fe(F(n,a),`anyOf`)}var Xt=(e,t,n,r)=>{if(Array.isArray(t.anyOf)&&t.anyOf.length!==0){for(let r=0;r<t.anyOf.length;r+=1)if(e.isValid(n,t.anyOf[r]))return;return e.errors.anyOfError({pointer:r,schema:t,value:n,anyOf:t.anyOf})}},Zt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`],Qt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`];function $t(e){let t=Object.keys(e);return Qt.findIndex(e=>t.includes(e))!==-1}function en(e,t,n,r){let i,a;if(t=e.resolveRef(t),t.oneOf){let o=ke(e,n,t,r);j(o)?a=o:o&&(i=F(i??{},o))}if(Array.isArray(t.allOf)){let a=t.allOf.map(t=>{if($t(t)){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...Zt)):void 0}return t});if(a.length>0){let t=Vt(e,{allOf:a});i=F(i??{},t)}}let o=Jt(e,t,n);o&&(i=F(i??{},o));let s=Kt(e,t,n);s&&(i=F(i??{},s));let c=Lt(e,t,n);if(c&&(i=F(i??{},c)),i==null)return a;let l=en(e,i,n,r);return l&&(i=F(i,l)),Fe(i,...Zt)}var tn=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`];function nn(e,t,n,r){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...tn)):t}var rn=class{constructor(e,t){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=It(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(t)}get rootSchema(){return this.__rootSchema}set rootSchema(e){e!=null&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,t){this.config.addRemoteSchema(this,e,t)}compileSchema(e){return this.config.compileSchema(this,e,this.rootSchema??e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,t,n,r){return this.config.each(this,e,t,n,r)}eachSchema(e,t=this.rootSchema){return this.config.eachSchema(t,e)}getChildSchemaSelection(e,t){return this.config.getChildSchemaSelection(this,e,t)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,t,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,t,n)}isValid(e,t,n){return this.config.isValid(this,e,t,n)}resolveAnyOf(e,t,n){return this.config.resolveAnyOf(this,e,t,n)}resolveAllOf(e,t){return this.config.resolveAllOf(this,e,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,t,n){return this.config.resolveOneOf(this,e,t,n)}setSchema(e){this.rootSchema=e}step(e,t,n,r){return this.config.step(this,e,t,n,r)}validate(e,t,n){return this.config.validate(this,e,t,n)}};function an(e,t,n){n.id=n.id||t,e.remotes[t]=e.compileSchema(n)}var on=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`jsonPointer`,[],r):typeof e==`object`?e.jsonPointer=r():n.jsonPointer=r()})(typeof self<`u`?self:e,(()=>(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return e===`#`||e===``||Array.isArray(e)&&e.length===0||!1}e.r(t),e.d(t,{default:()=>C,get:()=>u,isRoot:()=>n,join:()=>te,remove:()=>y,removeUndefinedItems:()=>v,set:()=>h,split:()=>l,splitLast:()=>ne});let r=/~1/g,i=/~0/g,a=/\/+/g,o=/(^[#/]*|\/+$)/g;function s(e){return e.replace(r,`/`).replace(i,`~`)}function c(e){return s(decodeURIComponent(e))}function l(e){if(e==null||typeof e!=`string`||n(e))return Array.isArray(e)?e:[];let t=e.indexOf(`#`)>=0?c:s,r=(e=(e=e.replace(a,`/`)).replace(o,``)).split(`/`);for(let e=0,n=r.length;e<n;e+=1)r[e]=t(r[e]);return r}function u(e,t,r=void 0){if(t==null||e==null)return r;if(n(t))return e;let i=d(e,l(t));return i===void 0?r:i}function d(e,t){let n=t.shift();if(e!==void 0)return n===void 0?e:d(e[n],t)}let f=/^\[.*\]$/,p=/^\[(.+)\]$/;function m(e,t){return e===`__proto__`||e==`constructor`&&t.length>0&&t[0]==`prototype`}function h(e,t,n){if(t==null)return e;let r=l(t);if(r.length===0)return e;e??=f.test(r[0])?[]:{};let i,a,o=e;for(;r.length>1;)i=r.shift(),a=f.test(r[0]),m(i,r)||(o=_(o,i,a));return i=r.pop(),g(o,i,n),e}function g(e,t,n){let r,i=t.match(p);t===`[]`&&Array.isArray(e)?e.push(n):i?(r=i.pop(),e[r]=n):e[t]=n}function _(e,t,n){if(e[t]!=null)return e[t];let r=n?[]:{};return g(e,t,r),r}function v(e){let t=0,n=0;for(;t+n<e.length;)e[t+n]===void 0&&(n+=1),e[t]=e[t+n],t+=1;return e.length-=n,e}function y(e,t,n){let r=l(t),i=r.pop(),a=u(e,r);return a&&delete a[i],Array.isArray(a)&&!0!==n&&v(a),e}let b=/\/+/g,x=/~/g,S=/\//g;function ee(e,t){if(e.length===0)return t?`#`:``;for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(x,`~0`).replace(S,`~1`),t&&(e[n]=encodeURIComponent(e[n]));return((t?`#/`:`/`)+e.join(`/`)).replace(b,`/`)}function te(e,...t){let n=[];if(Array.isArray(e))return ee(e,!0===arguments[1]);let r=arguments[arguments.length-1],i=typeof r==`boolean`?r:e&&e[0]===`#`;for(let e=0,t=arguments.length;e<t;e+=1)n.push.apply(n,l(arguments[e]));let a=[];for(let e=0,t=n.length;e<t;e+=1)if(n[e]===`..`){if(a.length===0)return i?`#`:``;a.pop()}else a.push(n[e]);return ee(a,i)}function ne(e){let t=l(e);if(t.length===0)return typeof e==`string`&&e[0]===`#`?[`#`,t[0]]:[``,void 0];if(t.length===1)return e[0]===`#`?[`#`,t[0]]:[``,t[0]];let n=t.pop();return[te(t,e[0]===`#`),n]}let C={get:u,set:h,remove:y,join:te,split:l,splitLast:ne,isRoot:n,removeUndefinedItems:v};return t})()))})),sn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=void 0,e.TokenError=class extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,t&&t.errors)t.errors.push(this);else throw this}inspect(){return`SyntaxError: `+this.message}}})),cn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.findRuleByName=e.parseRuleName=e.escapeRegExp=e.readToken=void 0;var t=/^[A-Z0-9_]+$/,n=/(\?|\+|\*)$/,r=/^(@|&|!)/,i=`WS`,a=sn();function o(e,t){let n=t.exec(e);return n&&n.index==0?n[0].length==0&&t.source.length>0?null:{type:null,text:n[0],rest:e.substr(n[0].length),start:0,end:n[0].length-1,fullText:n[0],errors:[],children:[],parent:null}:null}e.readToken=o;function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`)}e.escapeRegExp=s;function c(e){e.rest=``,e.children&&e.children.forEach(e=>c(e))}function l(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach(t=>l(t,e.start))}function u(e,t){t.errors&&t.errors.length&&t.errors.forEach(t=>e.push(t)),t.children&&t.children.forEach(t=>u(e,t))}function d(e){let t=n.exec(e),i=r.exec(e),a=t&&t[0]||``,o=i&&i[0]||``,s={raw:e,name:e.replace(n,``).replace(r,``),isOptional:a==`?`||a==`*`,allowRepetition:a==`+`||a==`*`,atLeastOne:a==`+`,lookupPositive:o==`&`,lookupNegative:o==`!`,pinned:o==`@`,lookup:!1,isLiteral:!1};return s.isLiteral=s.name[0]==`'`||s.name[0]==`"`,s.lookup=s.lookupNegative||s.lookupPositive,s}e.parseRuleName=d;function f(e,t){let n=d(e);return t.cachedRules[n.name]||null}e.findRuleByName=f;function p(e,t){if(e.children){let n=e.children.filter(e=>e.type&&t.test(e.type));for(let t=0;t<n.length;t++){let r=e.children.indexOf(n[t]);r!=-1&&e.children.splice(r,1)}e.children.forEach(e=>p(e,t))}}var m=[`EOF`],h=class{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=t?t.debug===!0:!1;let n=[],r=[];if(e.forEach(e=>{let t=d(e.name);if(t.name in this.cachedRules){n.push(`Duplicated rule `+t.name);return}if(this.cachedRules[t.name]=e,!e.bnf||!e.bnf.length){let t=`Missing rule content, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}else e.bnf.forEach(t=>{if(typeof t[0]==`string`&&d(t[0]).name==e.name){let t=`Left recursion is not allowed, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}t.forEach(e=>{if(typeof e==`string`){let t=d(e);!t.isLiteral&&r.indexOf(t.name)==-1&&m.indexOf(t.name)==-1&&r.push(t.name)}})});i==e.name&&(e.implicitWs=!1),e.implicitWs&&r.indexOf(i)==-1&&r.push(i),e.recover&&r.indexOf(e.recover)==-1&&r.push(e.recover)}),r.forEach(e=>{e in this.cachedRules||n.push(`Missing rule `+e)}),n.length)throw Error(n.join(`
1
+ import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./index-BEhTq576.js";var p=c(n(((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define(n):typeof t==`object`&&t.exports?t.exports=n():e.log=n()})(e,function(){var e=function(){},t=`undefined`,n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=[`trace`,`debug`,`info`,`warn`,`error`],i={},a=null;function o(e,t){var n=e[t];if(typeof n.bind==`function`)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(r){return r===`debug`&&(r=`log`),typeof console===t?!1:r===`trace`&&n?s:console[r]===void 0?console.log===void 0?e:o(console,`log`):o(console,r)}function l(){for(var n=this.getLevel(),i=0;i<r.length;i++){var a=r[i];this[a]=i<n?e:this.methodFactory(a,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return`No console available for logging`}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function d(e,t,n){return c(e)||u.apply(this,arguments)}function f(e,n){var o=this,s,c,u,f=`loglevel`;typeof e==`string`?f+=`:`+e:typeof e==`symbol`&&(f=void 0);function p(e){var n=(r[e]||`silent`).toUpperCase();if(typeof window!==t&&f){try{window.localStorage[f]=n;return}catch{}try{window.document.cookie=encodeURIComponent(f)+`=`+n+`;`}catch{}}}function m(){var e;if(typeof window!==t&&f){try{e=window.localStorage[f]}catch{}if(typeof e===t)try{var n=window.document.cookie,r=encodeURIComponent(f),i=n.indexOf(r+`=`);i!==-1&&(e=/^([^;]+)/.exec(n.slice(i+r.length+1))[1])}catch{}return o.levels[e]===void 0&&(e=void 0),e}}function h(){if(typeof window!==t&&f){try{window.localStorage.removeItem(f)}catch{}try{window.document.cookie=encodeURIComponent(f)+`=; expires=Thu, 01 Jan 1970 00:00:00 UTC`}catch{}}}function g(e){var t=e;if(typeof t==`string`&&o.levels[t.toUpperCase()]!==void 0&&(t=o.levels[t.toUpperCase()]),typeof t==`number`&&t>=0&&t<=o.levels.SILENT)return t;throw TypeError(`log.setLevel() called with invalid level: `+e)}o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=n||d,o.getLevel=function(){return u??c??s},o.setLevel=function(e,t){return u=g(e),t!==!1&&p(u),l.call(o)},o.setDefaultLevel=function(e){c=g(e),m()||o.setLevel(e,!1)},o.resetLevel=function(){u=null,h(),l.call(o)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)},o.rebuild=function(){if(a!==o&&(s=g(a.getLevel())),l.call(o),a===o)for(var e in i)i[e].rebuild()},s=g(a?a.getLevel():`WARN`);var _=m();_!=null&&(u=g(_)),l.call(o)}a=new f,a.getLogger=function(e){if(typeof e!=`symbol`&&typeof e!=`string`||e===``)throw TypeError(`You must supply a name when creating a logger.`);var t=i[e];return t||=i[e]=new f(e,a.methodFactory),t};var p=typeof window===t?void 0:window.log;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=p),a},a.getLoggers=function(){return i},a.default=a,a})}))(),1);p.default.setLevel(`silent`);var m=p.default,h={STRING:`String`,NUMBER:`Number`,TRUE:`True`,FALSE:`False`,NULL:`Null`,OBJECT:`Object`,ARRAY:`Array`,PROPERTY:`Property`,PROPERTY_NAME:`PropertyName`,PROPERTY_COLON:`PropertyColon`,ITEM:`Item`,JSON_TEXT:`JsonText`,INVALID:`⚠`},g={Pair:h.PROPERTY,Key:h.PROPERTY_NAME,BlockSequence:h.ARRAY,BlockMapping:h.OBJECT,FlowSequence:h.ARRAY,FlowMapping:h.OBJECT,QuotedLiteral:h.STRING,Literal:h.STRING,Stream:h.JSON_TEXT,Document:h.OBJECT},_={File:h.JSON_TEXT},v=[h.STRING,h.NUMBER,h.TRUE,h.FALSE,h.NULL],y=[h.OBJECT,h.ARRAY,h.ITEM],b={JSON5:`json5`,JSON:`json4`,YAML:`yaml`},x=(e,t)=>{switch(t){case b.YAML:return g[e]??e;case b.JSON5:return _[e]??e;default:return e}};function S(e,t,n){let r=[];for(let i=t;i?.parent;i=i.parent)switch(x(i.parent.name,n)){case h.PROPERTY:{let t=de(i.parent,h.PROPERTY_NAME,n);if(t){let n=ie(e,t).replace(/[/~]/g,e=>e===`~`?`~0`:`~1`);r.unshift(n)}break}case h.ARRAY:if(se(i,n)){let e=me(i.parent,i,n);r.unshift(`${e}`)}}return r.length===0?``:`/`+r.join(`/`)}var ee=(e,t,n=-1,r)=>S(e.doc,s(e).resolve(t,n),r),te=(e,t)=>{let n=s(e),r=new Map;return n.iterate({enter:n=>{if([h.PROPERTY_NAME,h.OBJECT].includes(x(n.name,t))){let i=S(e.doc,n.node,t),{from:a,to:o}=n.node;if(!n.node?.nextSibling?.node)return r.set(i,{keyFrom:a,keyTo:o}),!0;let s=t===b.JSON?n.node?.nextSibling?.node:n.node?.nextSibling?.node?.nextSibling?.node;if(!s)return r.set(i,{keyFrom:a,keyTo:o}),!0;let{from:c,to:l}=s;return r.set(i,{keyFrom:a,keyTo:o,valueFrom:c,valueTo:l}),!0}}}),r},ne=(e,t,n=-1)=>s(e).resolveInner(t,n),C=e=>e.replace(/^"(.*)"$/,`$1`).replace(/^'(.*)'$/,`$1`),re=e=>e.replace(/^"(.*)"$/,`'$1'`),ie=(e,t,n=!0,r=!0)=>{let i=t?e.sliceString(t.from,t.to):``;return n?r?C(i):i.replace(/(^["'])|(["']$)/g,``):i},ae=(e,t)=>x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY_NAME||x(e.prevSibling?.name??``,t)===h.PROPERTY_COLON),oe=(e,t)=>v.includes(x(e.name,t))||ae(e,t),se=(e,t)=>[...v,...y].includes(x(e.name,t))||ae(e,t),ce=(e,t)=>x(e.name,t)===h.PROPERTY_NAME||x(e.name,t)===h.INVALID&&(x(e.prevSibling?.name??``,t)===h.PROPERTY||x(e.prevSibling?.name??``,t)===`{`)||t===b.YAML&&x(e.parent?.name??``,t)===h.OBJECT,le=e=>{let t=[],n=e.firstChild;for(;n;)n&&t.push(n),n=n?.nextSibling;return t},ue=(e,t,n)=>le(e).filter(e=>x(e.name,n)===t),de=(e,t,n)=>le(e).find(e=>x(e.name,n)===t)??null,fe=(e,t)=>le(e).find(e=>oe(e,t)),pe=(e,t)=>le(e).filter(e=>v.includes(x(e.name,t))||y.includes(x(e.name,t))),me=(e,t,n)=>pe(e,n).findIndex(e=>e.from===t.from&&e.to===t.to),w=(e,t,n,r=1/0)=>{let i=e;for(;i&&r>0;){if(x(i.name,n)===t)return i;i=i.parent,r--}return null},he=t.define(),ge=a.define({create(){},update(e,t){for(let e of t.effects)if(e.is(he))return e.value;return e}}),_e=e=>e.field(ge),ve=e=>[ge.init(()=>e)],ye={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:`IPv4 addresses starting with zero are invalid, since they are interpreted as octals`,FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:`IPv6 addresses starting with zero are invalid, since they are interpreted as octals`,FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minimum}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:`Failed retrieving a schema from '{{pointer}}' to key '{{key}}'`,TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},be=Object.prototype.toString;function T(e){let t=be.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t===`file`?`object`:t}var xe=`object`,Se=`array`;function Ce(e,t={}){return e.replace(/\{\{\w+\}\}/g,e=>{let n=t[e.replace(/[{}]/g,``)],r=T(n);return r===xe||r===Se?JSON.stringify(n):n})}function we(e,t,n=e){return Ce(ye[e]??n,t)}function E(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function D(e,t){return{type:`error`,name:e,code:E(e),message:we(e,t),data:t}}function O(e){return D.bind(null,e)}function k(e,t=[]){for(let n=0;n<e.length;n+=1){let r=e[n];Array.isArray(r)?k(r,t):t.push(r)}return t}var A={DECLARATOR_ONEOF:`oneOfProperty`,GET_TEMPLATE_RECURSION_LIMIT:1,propertyBlacklist:[`_id`],templateDefaultOptions:{addOptionalProps:!1,removeInvalidData:!1,extendDefaults:!0}};function Te(e,t,n){let r={...t};return Object.defineProperty(r,"getOneOfOrigin",{enumerable:!1,value:()=>({index:n,schema:e})}),r}function j(e){return e?.type===`error`}function M(e){return e instanceof Promise}function Ee(e){return j(e)||M(e)}var{DECLARATOR_ONEOF:N}=A;function De(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[],a=[];for(let o=0;o<n.oneOf.length;o+=1){let s=e.resolveRef(n.oneOf[o]),c=k(e.validate(t,s,r));c=c.filter(Ee),c.length>0?a.push(...c):i.push({index:o,schema:s})}return i.length===1?Te(n,i[0].schema,i[0].index):i.length>1?e.errors.multipleOneOfError({value:t,pointer:r,schema:n,matches:i}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf,errors:a})}function Oe(e,t,n,r){if(n==null||t.properties==null)return-1;let i=0,a=Object.keys(t.properties);for(let o=0;o<a.length;o+=1){let s=a[o];n[s]!=null&&e.isValid(n[s],t.properties[s],r)&&(i+=1)}return i}function ke(e,t,n=e.rootSchema,r=`#`){if(t!=null&&n[N]){let i=[],a=n[N],o=t[n[N]];if(o===void 0)return e.errors.missingOneOfPropertyError({property:a,pointer:r,schema:n,value:t});for(let s=0;s<n.oneOf.length;s+=1){let c=e.resolveRef(n.oneOf[s]),l=e.step(a,c,t,r);if(j(l))return l;let u=k(e.validate(o,l,r));if(u=u.filter(Ee),u.length>0)i.push(...u);else return Te(n,c,s)}return e.errors.oneOfPropertyError({property:a,value:o,pointer:r,schema:n,errors:i})}let i=[];for(let a=0;a<n.oneOf.length;a+=1){let o=e.resolveRef(n.oneOf[a]);e.isValid(t,o,r)&&i.push({schema:o,index:a})}if(i.length===1)return Te(n,i[0].schema,i[0].index);if(T(t)===`object`){let i,a=-1,o=0;for(let r=0;r<n.oneOf.length;r+=1){let s=Oe(e,e.resolveRef(n.oneOf[r]),t);o<s&&(o=s,i=n.oneOf[r],a=r)}return i===void 0?e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf}):Te(n,i,a)}return i.length>1?e.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):e.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}var Ae=(e,t,n,r)=>{if(Array.isArray(t.oneOf)){let i=e.resolveOneOf(n,t,r);if(j(i))return i}},je=c(n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?g(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return g;var n=t.customMerge(e);return typeof n==`function`?n:g}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function m(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function h(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){m(e,i)||(r[i]=p(e,i)&&n.isMergeableObject(t[i])?u(i,n)(e[i],t[i],n):c(t[i],n))}),r}function g(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):h(e,t,r):c(t,r)}g.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return g(e,n,t)},{})},t.exports=g}))()),Me=(e,t)=>t,Ne=(e,t)=>(0,je.default)(e,t,{arrayMerge:Me}),P=(e,t)=>{let n=e.concat(t);return n.filter((e,t)=>n.indexOf(e)===t)},Pe=(e,t)=>(0,je.default)(e,t,{arrayMerge:P});function F(e,t){if(T(e)!==T(t))return e;let n=Pe(e,t);return e.getOneOfOrigin?Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}):t.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:t.getOneOfOrigin}),n}function Fe(e,...t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),e.getOneOfOrigin&&Object.defineProperty(n,"getOneOfOrigin",{enumerable:!1,value:e.getOneOfOrigin}),n}var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ie(e,t)};function Le(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Ie(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Re=Object.create,ze=Function.prototype.toString,Be=Object.prototype.toString,Ve=Object.setPrototypeOf,He=function(e){Le(t,e);function t(n){var r=e.call(this,`Maximum copy depth of `+String(n)+` exceeded; the value copied is nested too deeply.`)||this;return Ve&&Ve(r,t.prototype),r.maxDepth=n,r.name=`MaxDepthExceededError`,r}return t}(RangeError),Ue=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(e){return!!~this._keys.indexOf(e)},e.prototype.get=function(e){return this._values[this._keys.indexOf(e)]},e.prototype.set=function(e,t){this._keys.push(e),this._values.push(t)},e}();function We(){return new Ue}function Ge(){return new WeakMap}var Ke=typeof WeakMap<`u`?Ge:We;function qe(e){if(!e)return Re(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:Re(e);if(t&&~ze.call(t).indexOf(`[native code]`))try{return new t}catch{}return Re(e)}function Je(e){var t=``;return e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.unicode&&(t+=`u`),e.sticky&&(t+=`y`),t}function Ye(e){return e.flags}var Xe=/test/g.flags===`g`?Ye:Je;function Ze(e){var t=Be.call(e);return t.substring(8,t.length-1)}function Qe(e){return e[Symbol.toStringTag]||Ze(e)}var $e=typeof Symbol<`u`?Qe:Ze,et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,nt=Object.getOwnPropertyNames,rt=Object.getOwnPropertySymbols,it=Object.prototype,at=it.hasOwnProperty,ot=it.propertyIsEnumerable,st=typeof rt==`function`;function ct(e){return nt(e).concat(rt(e))}var lt=st?ct:nt;function ut(e,t,n){for(var r=lt(e),i=0,a=r.length,o=void 0,s=void 0;i<a;++i)if(o=r[i],o!==`callee`&&o!==`caller`){if(s=tt(e,o),!s){t[o]=n.copier(e[o],n);continue}!s.get&&!s.set&&(s.value=n.copier(s.value,n));try{et(t,o,s)}catch{t[o]=s.value}}return t}function dt(e,t){var n=new t.Constructor;t.cache.set(e,n);for(var r=0,i=e.length;r<i;++r)n[r]=t.copier(e[r],t);return n}function ft(e,t){var n=new t.Constructor;return t.cache.set(e,n),ut(e,n,t)}function pt(e,t){return e.slice(0)}function mt(e,t){return e.slice(0,e.size,e.type)}function ht(e,t){return new t.Constructor(pt(e.buffer))}function gt(e,t){return new t.Constructor(e.getTime())}function _t(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e,r){n.set(r,t.copier(e,t))}),n}function vt(e,t){return ut(e,_t(e,t),t)}function yt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));return n}function bt(e,t){var n=qe(t.prototype);for(var r in t.cache.set(e,n),e)at.call(e,r)&&(n[r]=t.copier(e[r],t));for(var i=rt(e),a=0,o=i.length,s=void 0;a<o;++a)s=i[a],ot.call(e,s)&&(n[s]=t.copier(e[s],t));return n}var xt=st?bt:yt;function St(e,t){var n=qe(t.prototype);return t.cache.set(e,n),ut(e,n,t)}function Ct(e,t){return new t.Constructor(e.valueOf())}function wt(e,t){var n=new t.Constructor(e.source,Xe(e));return n.lastIndex=e.lastIndex,n}function Tt(e,t){return e}function Et(e,t){var n=new t.Constructor;return t.cache.set(e,n),e.forEach(function(e){n.add(t.copier(e,t))}),n}function Dt(e,t){return ut(e,Et(e,t),t)}var Ot=Array.isArray,kt=Object.assign,At=Object.getPrototypeOf||(function(e){return e.__proto__}),jt={array:dt,arrayBuffer:pt,blob:mt,dataView:ht,date:gt,error:Tt,map:_t,object:xt,regExp:wt,set:Et,maxDepth:1e3},Mt=kt({},jt,{array:ft,map:vt,object:St,set:Dt});function Nt(e){return{Arguments:e.object,Array:e.array,ArrayBuffer:e.arrayBuffer,Blob:e.blob,Boolean:Ct,DataView:e.dataView,Date:e.date,Error:e.error,Float32Array:e.arrayBuffer,Float64Array:e.arrayBuffer,Int8Array:e.arrayBuffer,Int16Array:e.arrayBuffer,Int32Array:e.arrayBuffer,Map:e.map,Number:Ct,Object:e.object,Promise:Tt,RegExp:e.regExp,Set:e.set,String:Ct,WeakMap:Tt,WeakSet:Tt,Uint8Array:e.arrayBuffer,Uint8ClampedArray:e.arrayBuffer,Uint16Array:e.arrayBuffer,Uint32Array:e.arrayBuffer,Uint64Array:e.arrayBuffer}}function Pt(e){var t=kt({},jt,e),n=Nt(t);if(!n.Object||!n.Array)throw Error(`An object and array copier must be provided.`);var r=n.Array,i=n.Object,a=t.maxDepth;function o(e,t){if(t.prototype=t.Constructor=void 0,!e||typeof e!=`object`)return e;if(t.cache.has(e))return t.cache.get(e);if(++t.depth>a)throw new He(a);t.prototype=At(e),t.Constructor=t.prototype&&t.prototype.constructor;var o;if(!t.Constructor||t.Constructor===Object)o=i(e,t);else if(Ot(e))o=r(e,t);else{var s=n[$e(e)];o=s?s(e,t):typeof e.then==`function`?e:i(e,t)}return--t.depth,o}return function(e){return o(e,{Constructor:void 0,cache:Ke(),copier:o,depth:0,prototype:void 0})}}function Ft(e){return Pt(kt({},Mt,e))}Ft({});var It=Pt({});function Lt(e,t,n){if(t.if!=null){if(t.if===!1)return t.else;if(t.if&&(t.then||t.else)){let r=e.validate(n,e.resolveRef(t.if));if(r.length===0&&t.then)return e.resolveRef(t.then);if(r.length!==0&&t.else)return e.resolveRef(t.else)}}}var Rt=(e,t,n,r)=>{let i=Lt(e,t,n);if(i)return e.validate(n,i,r)};function zt(e,t,n){let r={...e.resolveRef(t)??{}};return Lt(e,r,n)||Fe(r,`if`,`then`,`else`)}function Bt(e,t,n=e.rootSchema){let r=It(n);for(let i=0;i<n.allOf.length;i+=1){let a=zt(e,n.allOf[i],t);r=F(r,a)}return delete r.allOf,r}function Vt(e,t){let{allOf:n}=t;if(!Array.isArray(n)||n.length===0)return;let r={};return n.forEach(t=>{r=F(r,e.resolveRef(t))}),r}var Ht=(e,t,n,r)=>{let{allOf:i}=t;if(!Array.isArray(i)||i.length===0)return;let a=[];return t.allOf.forEach(t=>{a.push(...e.validate(n,t,r))}),a};function Ut(e,t){return e==null||e.$ref==null?e:e.getRoot?e.getRoot().getRef(e):t.getRef(e)}function Wt(e){return e.filter((t,n)=>e.indexOf(t)===n)}function Gt(e){return T(e)===`object`}function Kt(e,t,n){let{dependencies:r}=t;if(!Gt(r)||!Gt(n))return;let i=!1,a={required:[]};if(Object.keys(r).forEach(o=>{if(n[o]==null&&!(t.required?.includes(o)||a.required?.includes(o)))return;let s=r[o];if(Array.isArray(s)){i=!0,a.required.push(...s);return}if(Gt(s)){i=!0,a=F(a,e.resolveRef(s));return}}),i)return a.required=Wt(a.required),a}var qt=(e,t,n,r)=>{if(T(t.dependencies)!==`object`)return;let i=[];return Object.keys(n).forEach(a=>{if(t.dependencies[a]===void 0||t.dependencies[a]===!0)return;if(t.dependencies[a]===!1){i.push(e.errors.missingDependencyError({pointer:r,schema:t,value:n}));return}let o,s=T(t.dependencies[a]);if(s===`array`)o=t.dependencies[a].filter(e=>n[e]===void 0).map(i=>e.errors.missingDependencyError({missingProperty:i,pointer:r,schema:t,value:n}));else if(s===`object`)o=e.validate(n,t.dependencies[a],r);else throw Error(`Invalid dependency definition for ${r}/${a}. Must be string[] or schema`);i.push(...o)}),i.length>0?i:void 0};function Jt(e,t,n){if(!Array.isArray(t.anyOf)||t.anyOf.length===0)return;let r;return t.anyOf.forEach(t=>{t=e.resolveRef(t),e.isValid(n,t)&&(r=r?F(r,t):t)}),r}function Yt(e,t,n=e.rootSchema,r=`#`){let{anyOf:i}=n;if(!Array.isArray(i)||i.length===0)return n;let a=Jt(e,n,t);return a==null?e.errors.anyOfError({pointer:r,schema:n,value:t,anyOf:JSON.stringify(i)}):Fe(F(n,a),`anyOf`)}var Xt=(e,t,n,r)=>{if(Array.isArray(t.anyOf)&&t.anyOf.length!==0){for(let r=0;r<t.anyOf.length;r+=1)if(e.isValid(n,t.anyOf[r]))return;return e.errors.anyOfError({pointer:r,schema:t,value:n,anyOf:t.anyOf})}},Zt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`],Qt=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`];function $t(e){let t=Object.keys(e);return Qt.findIndex(e=>t.includes(e))!==-1}function en(e,t,n,r){let i,a;if(t=e.resolveRef(t),t.oneOf){let o=ke(e,n,t,r);j(o)?a=o:o&&(i=F(i??{},o))}if(Array.isArray(t.allOf)){let a=t.allOf.map(t=>{if($t(t)){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...Zt)):void 0}return t});if(a.length>0){let t=Vt(e,{allOf:a});i=F(i??{},t)}}let o=Jt(e,t,n);o&&(i=F(i??{},o));let s=Kt(e,t,n);s&&(i=F(i??{},s));let c=Lt(e,t,n);if(c&&(i=F(i??{},c)),i==null)return a;let l=en(e,i,n,r);return l&&(i=F(i,l)),Fe(i,...Zt)}var tn=[`allOf`,`anyOf`,`oneOf`,`dependencies`,`if`,`then`,`else`];function nn(e,t,n,r){let i=en(e,t,n,r);return i?(i=F(t,i),Fe(i,...tn)):t}var rn=class{constructor(e,t){this.remotes={},this.errors={},this.typeKeywords={},this.validateKeyword={},this.validateType={},this.validateFormat={},this.config=e,this.typeKeywords=It(e.typeKeywords),this.validateKeyword=Object.assign({},e.validateKeyword),this.validateType=Object.assign({},e.validateType),this.validateFormat=Object.assign({},e.validateFormat),this.errors=Object.assign({},e.errors),this.setSchema(t)}get rootSchema(){return this.__rootSchema}set rootSchema(e){e!=null&&(this.__rootSchema=this.config.compileSchema(this,e))}addRemoteSchema(e,t){this.config.addRemoteSchema(this,e,t)}compileSchema(e){return this.config.compileSchema(this,e,this.rootSchema??e)}createSchemaOf(e){return this.config.createSchemaOf(e)}each(e,t,n,r){return this.config.each(this,e,t,n,r)}eachSchema(e,t=this.rootSchema){return this.config.eachSchema(t,e)}getChildSchemaSelection(e,t){return this.config.getChildSchemaSelection(this,e,t)}getSchema(e){return this.config.getSchema(this,e)}getTemplate(e,t,n=this.config.templateDefaultOptions){return this.config.getTemplate(this,e,t,n)}isValid(e,t,n){return this.config.isValid(this,e,t,n)}resolveAnyOf(e,t,n){return this.config.resolveAnyOf(this,e,t,n)}resolveAllOf(e,t){return this.config.resolveAllOf(this,e,t)}resolveRef(e){return this.config.resolveRef(e,this.rootSchema)}resolveOneOf(e,t,n){return this.config.resolveOneOf(this,e,t,n)}setSchema(e){this.rootSchema=e}step(e,t,n,r){return this.config.step(this,e,t,n,r)}validate(e,t,n){return this.config.validate(this,e,t,n)}};function an(e,t,n){n.id=n.id||t,e.remotes[t]=e.compileSchema(n)}var on=n(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`jsonPointer`,[],r):typeof e==`object`?e.jsonPointer=r():n.jsonPointer=r()})(typeof self<`u`?self:e,(()=>(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e){return e===`#`||e===``||Array.isArray(e)&&e.length===0||!1}e.r(t),e.d(t,{default:()=>C,get:()=>u,isRoot:()=>n,join:()=>te,remove:()=>y,removeUndefinedItems:()=>v,set:()=>h,split:()=>l,splitLast:()=>ne});let r=/~1/g,i=/~0/g,a=/\/+/g,o=/(^[#/]*|\/+$)/g;function s(e){return e.replace(r,`/`).replace(i,`~`)}function c(e){return s(decodeURIComponent(e))}function l(e){if(e==null||typeof e!=`string`||n(e))return Array.isArray(e)?e:[];let t=e.indexOf(`#`)>=0?c:s,r=(e=(e=e.replace(a,`/`)).replace(o,``)).split(`/`);for(let e=0,n=r.length;e<n;e+=1)r[e]=t(r[e]);return r}function u(e,t,r=void 0){if(t==null||e==null)return r;if(n(t))return e;let i=d(e,l(t));return i===void 0?r:i}function d(e,t){let n=t.shift();if(e!==void 0)return n===void 0?e:d(e[n],t)}let f=/^\[.*\]$/,p=/^\[(.+)\]$/;function m(e,t){return e===`__proto__`||e==`constructor`&&t.length>0&&t[0]==`prototype`}function h(e,t,n){if(t==null)return e;let r=l(t);if(r.length===0)return e;e??=f.test(r[0])?[]:{};let i,a,o=e;for(;r.length>1;)i=r.shift(),a=f.test(r[0]),m(i,r)||(o=_(o,i,a));return i=r.pop(),g(o,i,n),e}function g(e,t,n){let r,i=t.match(p);t===`[]`&&Array.isArray(e)?e.push(n):i?(r=i.pop(),e[r]=n):e[t]=n}function _(e,t,n){if(e[t]!=null)return e[t];let r=n?[]:{};return g(e,t,r),r}function v(e){let t=0,n=0;for(;t+n<e.length;)e[t+n]===void 0&&(n+=1),e[t]=e[t+n],t+=1;return e.length-=n,e}function y(e,t,n){let r=l(t),i=r.pop(),a=u(e,r);return a&&delete a[i],Array.isArray(a)&&!0!==n&&v(a),e}let b=/\/+/g,x=/~/g,S=/\//g;function ee(e,t){if(e.length===0)return t?`#`:``;for(let n=0,r=e.length;n<r;n+=1)e[n]=e[n].replace(x,`~0`).replace(S,`~1`),t&&(e[n]=encodeURIComponent(e[n]));return((t?`#/`:`/`)+e.join(`/`)).replace(b,`/`)}function te(e,...t){let n=[];if(Array.isArray(e))return ee(e,!0===arguments[1]);let r=arguments[arguments.length-1],i=typeof r==`boolean`?r:e&&e[0]===`#`;for(let e=0,t=arguments.length;e<t;e+=1)n.push.apply(n,l(arguments[e]));let a=[];for(let e=0,t=n.length;e<t;e+=1)if(n[e]===`..`){if(a.length===0)return i?`#`:``;a.pop()}else a.push(n[e]);return ee(a,i)}function ne(e){let t=l(e);if(t.length===0)return typeof e==`string`&&e[0]===`#`?[`#`,t[0]]:[``,void 0];if(t.length===1)return e[0]===`#`?[`#`,t[0]]:[``,t[0]];let n=t.pop();return[te(t,e[0]===`#`),n]}let C={get:u,set:h,remove:y,join:te,split:l,splitLast:ne,isRoot:n,removeUndefinedItems:v};return t})()))})),sn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenError=void 0,e.TokenError=class extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,t&&t.errors)t.errors.push(this);else throw this}inspect(){return`SyntaxError: `+this.message}}})),cn=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.findRuleByName=e.parseRuleName=e.escapeRegExp=e.readToken=void 0;var t=/^[A-Z0-9_]+$/,n=/(\?|\+|\*)$/,r=/^(@|&|!)/,i=`WS`,a=sn();function o(e,t){let n=t.exec(e);return n&&n.index==0?n[0].length==0&&t.source.length>0?null:{type:null,text:n[0],rest:e.substr(n[0].length),start:0,end:n[0].length-1,fullText:n[0],errors:[],children:[],parent:null}:null}e.readToken=o;function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`)}e.escapeRegExp=s;function c(e){e.rest=``,e.children&&e.children.forEach(e=>c(e))}function l(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach(t=>l(t,e.start))}function u(e,t){t.errors&&t.errors.length&&t.errors.forEach(t=>e.push(t)),t.children&&t.children.forEach(t=>u(e,t))}function d(e){let t=n.exec(e),i=r.exec(e),a=t&&t[0]||``,o=i&&i[0]||``,s={raw:e,name:e.replace(n,``).replace(r,``),isOptional:a==`?`||a==`*`,allowRepetition:a==`+`||a==`*`,atLeastOne:a==`+`,lookupPositive:o==`&`,lookupNegative:o==`!`,pinned:o==`@`,lookup:!1,isLiteral:!1};return s.isLiteral=s.name[0]==`'`||s.name[0]==`"`,s.lookup=s.lookupNegative||s.lookupPositive,s}e.parseRuleName=d;function f(e,t){let n=d(e);return t.cachedRules[n.name]||null}e.findRuleByName=f;function p(e,t){if(e.children){let n=e.children.filter(e=>e.type&&t.test(e.type));for(let t=0;t<n.length;t++){let r=e.children.indexOf(n[t]);r!=-1&&e.children.splice(r,1)}e.children.forEach(e=>p(e,t))}}var m=[`EOF`],h=class{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=t?t.debug===!0:!1;let n=[],r=[];if(e.forEach(e=>{let t=d(e.name);if(t.name in this.cachedRules){n.push(`Duplicated rule `+t.name);return}if(this.cachedRules[t.name]=e,!e.bnf||!e.bnf.length){let t=`Missing rule content, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}else e.bnf.forEach(t=>{if(typeof t[0]==`string`&&d(t[0]).name==e.name){let t=`Left recursion is not allowed, rule: `+e.name;n.indexOf(t)==-1&&n.push(t)}t.forEach(e=>{if(typeof e==`string`){let t=d(e);!t.isLiteral&&r.indexOf(t.name)==-1&&m.indexOf(t.name)==-1&&r.push(t.name)}})});i==e.name&&(e.implicitWs=!1),e.implicitWs&&r.indexOf(i)==-1&&r.push(i),e.recover&&r.indexOf(e.recover)==-1&&r.push(e.recover)}),r.forEach(e=>{e in this.cachedRules||n.push(`Missing rule `+e)}),n.length)throw Error(n.join(`
2
2
  `))}getAST(e,n){n||=this.grammarRules.filter(e=>!e.fragment&&e.name.indexOf(`%`)!=0)[0].name;let r=this.parse(e,n);if(r){u(r.errors,r),l(r,0),p(r,/^%/),(!this.options||!this.options.keepUpperRules)&&p(r,t);let e=r.rest;e&&new a.TokenError(`Unexpected end of input:
3
3
  `+e,r),c(r),r.rest=e}return r}emitSource(){return`CANNOT EMIT SOURCE FROM BASE Parser`}parse(e,n,r=0){let c=null,l=d(n),u,p=this.debug&&!t.test(l.name);p&&console.log(Array(r).join(`│ `)+`Trying to get `+n+` from `+JSON.stringify(e.split(`
4
4
  `)[0]));let m=l.name,h=f(l.name,this);if(l.name==`EOF`){if(e.length)return null;if(e.length==0)return{type:`EOF`,text:``,rest:``,start:0,end:0,fullText:``,errors:[],children:[],parent:null}}try{if(!h&&l.isLiteral){let t=l.name.trim();if(t.startsWith(`"`)?t=JSON.parse(t):t.startsWith(`'`)&&(t=t.replace(/^'(.+)'$/,`$1`).replace(/\\'/g,`'`)),t===``)return{type:`%%EMPTY%%`,text:``,rest:e,start:0,end:0,fullText:``,errors:[],children:[],parent:null};u=new RegExp(s(t)),m=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(u){let t=o(e,u);if(t)return t.type=m,t}else{let t=h.bnf;t instanceof Array&&t.forEach(t=>{if(c)return;let n=null,s={type:l.name,text:``,children:[],end:0,errors:[],fullText:``,parent:null,start:0,rest:e};h.fragment&&(s.fragment=!0);let u=e,f=0,m=t.length>0,g=!1;for(let e=0;e<t.length;e++)if(typeof t[e]==`string`){let o=d(t[e]);m&&=o.isOptional;let l,_=!1;do{if(l=null,h.implicitWs&&(l=this.parse(u,o.name,r+1),!l)){let e;do if(e=this.parse(u,i,r+1),e)s.text+=e.text,s.end=s.text.length,e.parent=s,s.children.push(e),u=u.substr(e.text.length),f+=e.text.length;else break;while(e&&e.text.length)}if(l||=this.parse(u,o.name,r+1),o.lookupNegative){if(l)return;break}if(o.lookupPositive&&!l)return;if(!l&&(o.isOptional||o.atLeastOne&&_))break;if(l&&h.pinned==e+1&&(n=l,p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` PINNED`)),l||=this.parseRecovery(h,u,r+1),!l){if(n)c=s,l={type:`SyntaxError`,text:u,children:[],end:u.length,errors:[],fullText:``,parent:null,start:0,rest:``},u.length?new a.TokenError(`Unexpected end of input. Expecting ${o.name} Got: ${u}`,l):new a.TokenError(`Unexpected end of input. Missing ${o.name}`,l),p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` `+JSON.stringify(l.text));else return}if(_=!0,g=!0,l.type==`%%EMPTY%%`)break;l.start+=f,l.end+=f,!o.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach(e=>{e.start+=f,e.end+=f,e.parent=s,s.children.push(e)}):(l.parent=s,s.children.push(l))),o.lookup&&(l.lookup=!0),p&&console.log(Array(r+1).join(`│ `)+`└─ `+l.type+` `+JSON.stringify(l.text)),!o.lookup&&!l.lookup&&(s.text+=l.text,s.end=s.text.length,u=u.substr(l.text.length),f+=l.text.length),s.rest=u}while(l&&o.allowRepetition&&u.length&&!l.lookup)}else{let n=o(u,t[e]);if(!n)return;p&&console.log(Array(r+1).join(`│ `)+`└> `+JSON.stringify(n.text)+t[e].source),g=!0,n.start+=f,n.end+=f,s.text+=n.text,s.end=s.text.length,u=u.substr(n.text.length),f+=n.text.length,s.rest=u}g&&(c=s,p&&console.log(Array(r).join(`│ `)+`├<─┴< PUSHING `+c.type+` `+JSON.stringify(c.text)))}),c&&h.simplifyWhenOneChildren&&c.children.length==1&&(c=c.children[0])}return c||p&&console.log(n+` NOT RESOLVED FROM `+e),c}parseRecovery(e,t,n){if(e.recover&&t.length){let r=this.debug;r&&console.log(Array(n+1).join(`│ `)+`Trying to recover until token `+e.recover+` from `+JSON.stringify(t.split(`
@@ -59,7 +59,7 @@ S ::= [ ]*
59
59
  `,a.map=[t,e.line],!0}function Xo(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;let o=e.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let s=i;i=e.skipChars(i,o);let c=i-s;if(c<3)return!1;let l=e.src.slice(s,i),u=e.src.slice(i,a);if(o===96&&u.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=t,f=!1;for(;d++,!(d>=n||(i=s=e.bMarks[d]+e.tShift[d],a=e.eMarks[d],i<a&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(i)===o&&!(e.sCount[d]-e.blkIndent>=4)&&(i=e.skipChars(i,o),!(i-s<c)&&(i=e.skipSpaces(i),!(i<a)))){f=!0;break}c=e.sCount[t],e.line=d+ +!!f;let p=e.push(`fence`,`code`,0);return p.info=u,p.content=e.getLines(t+1,d,c,!0),p.markup=l,p.map=[t,e.line],!0}function Zo(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;let s=[],c=[],l=[],u=[],d=e.md.block.ruler.getRules(`blockquote`),f=e.parentType;e.parentType=`blockquote`;let p=!1,m;for(m=t;m<n;m++){let t=e.sCount[m]<e.blkIndent;if(i=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i>=a)break;if(e.src.charCodeAt(i++)===62&&!t){let t=e.sCount[m]+1,n,r;e.src.charCodeAt(i)===32?(i++,t++,r=!1,n=!0):e.src.charCodeAt(i)===9?(n=!0,(e.bsCount[m]+t)%4==3?(i++,t++,r=!1):r=!0):n=!1;let o=t;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i<a;){let t=e.src.charCodeAt(i);if(R(t))t===9?o+=4-(o+e.bsCount[m]+ +!!r)%4:o++;else break;i++}p=i>=a,c.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+ +!!n,l.push(e.sCount[m]),e.sCount[m]=o-t,u.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let r=!1;for(let t=0,i=d.length;t<i;t++)if(d[t](e,m,n,!0)){r=!0;break}if(r){e.lineMax=m,e.blkIndent!==0&&(s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}s.push(e.bMarks[m]),c.push(e.bsCount[m]),u.push(e.tShift[m]),l.push(e.sCount[m]),e.sCount[m]=-1}let h=e.blkIndent;e.blkIndent=0;let g=e.push(`blockquote_open`,`blockquote`,1);g.markup=`>`;let _=[t,0];g.map=_,e.md.block.tokenize(e,t,m);let v=e.push(`blockquote_close`,`blockquote`,-1);v.markup=`>`,e.lineMax=o,e.parentType=f,_[1]=e.line;for(let n=0;n<u.length;n++)e.bMarks[n+t]=s[n],e.tShift[n+t]=u[n],e.sCount[n+t]=l[n],e.bsCount[n+t]=c[n];return e.blkIndent=h,!0}function Qo(e,t,n,r){let i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t],o=e.src.charCodeAt(a++);if(o!==42&&o!==45&&o!==95)return!1;let s=1;for(;a<i;){let t=e.src.charCodeAt(a++);if(t!==o&&!R(t))return!1;t===o&&s++}if(s<3)return!1;if(r)return!0;e.line=t+1;let c=e.push(`hr`,`hr`,0);return c.map=[t,e.line],c.markup=Array(s+1).join(String.fromCharCode(o)),!0}function $o(e,t){let n=e.eMarks[t],r=e.bMarks[t]+e.tShift[t],i=e.src.charCodeAt(r++);return i!==42&&i!==45&&i!==43||r<n&&!R(e.src.charCodeAt(r))?-1:r}function es(e,t){let n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],i=n;if(i+1>=r)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=r)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-n>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<r&&(a=e.src.charCodeAt(i),!R(a))?-1:i}function ts(e,t){let n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type===`paragraph_open`&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function ns(e,t,n,r){let i,a,o,s,c=t,l=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let u=!1;r&&e.parentType===`paragraph`&&e.sCount[c]>=e.blkIndent&&(u=!0);let d,f,p;if((p=es(e,c))>=0){if(d=!0,o=e.bMarks[c]+e.tShift[c],f=Number(e.src.slice(o,p-1)),u&&f!==1)return!1}else if((p=$o(e,c))>=0)d=!1;else return!1;if(u&&e.skipSpaces(p)>=e.eMarks[c])return!1;if(r)return!0;let m=e.src.charCodeAt(p-1),h=e.tokens.length;d?(s=e.push(`ordered_list_open`,`ol`,1),f!==1&&(s.attrs=[[`start`,f]])):s=e.push(`bullet_list_open`,`ul`,1);let g=[c,0];s.map=g,s.markup=String.fromCharCode(m);let _=!1,v=e.md.block.ruler.getRules(`list`),y=e.parentType;for(e.parentType=`list`;c<n;){a=p,i=e.eMarks[c];let t=e.sCount[c]+p-(e.bMarks[c]+e.tShift[c]),r=t;for(;a<i;){let t=e.src.charCodeAt(a);if(t===9)r+=4-(r+e.bsCount[c])%4;else if(t===32)r++;else break;a++}let u=a,f;f=u>=i?1:r-t,f>4&&(f=1);let h=t+f;s=e.push(`list_item_open`,`li`,1),s.markup=String.fromCharCode(m);let g=[c,0];s.map=g,d&&(s.info=e.src.slice(o,p-1));let y=e.tight,b=e.tShift[c],x=e.sCount[c],S=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=h,e.tight=!0,e.tShift[c]=u-e.bMarks[c],e.sCount[c]=r,u>=i&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n,!0),(!e.tight||_)&&(l=!1),_=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=S,e.tShift[c]=b,e.sCount[c]=x,e.tight=y,s=e.push(`list_item_close`,`li`,-1),s.markup=String.fromCharCode(m),c=e.line,g[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let ee=!1;for(let t=0,r=v.length;t<r;t++)if(v[t](e,c,n,!0)){ee=!0;break}if(ee)break;if(d){if(p=es(e,c),p<0)break;o=e.bMarks[c]+e.tShift[c]}else if(p=$o(e,c),p<0)break;if(m!==e.src.charCodeAt(p-1))break}return s=d?e.push(`ordered_list_close`,`ol`,-1):e.push(`bullet_list_close`,`ul`,-1),s.markup=String.fromCharCode(m),g[1]=c,e.line=c,e.parentType=y,l&&ts(e,h),!0}function rs(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],o=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function s(t){let n=e.lineMax;if(t>=n||e.isEmpty(t))return null;let r=!1;if(e.sCount[t]-e.blkIndent>3&&(r=!0),e.sCount[t]<0&&(r=!0),!r){let r=e.md.block.ruler.getRules(`reference`),i=e.parentType;e.parentType=`reference`;let a=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,t,n,!0)){a=!0;break}if(e.parentType=i,a)return null}let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];return e.src.slice(i,a+1)}let c=e.src.slice(i,a+1);a=c.length;let l=-1;for(i=1;i<a;i++){let e=c.charCodeAt(i);if(e===91)return!1;if(e===93){l=i;break}if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(e===92&&(i++,i<a&&c.charCodeAt(i)===10)){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}}if(l<0||c.charCodeAt(l+1)!==58)return!1;for(i=l+2;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!R(e))break}let u=e.md.helpers.parseLinkDestination(c,i,a);if(!u.ok)return!1;let d=e.md.normalizeLink(u.str);if(!e.md.validateLink(d))return!1;i=u.pos;let f=i,p=o,m=i;for(;i<a;i++){let e=c.charCodeAt(i);if(e===10){let e=s(o);e!==null&&(c+=e,a=c.length,o++)}else if(!R(e))break}let h=e.md.helpers.parseLinkTitle(c,i,a);for(;h.can_continue;){let t=s(o);if(t===null)break;c+=t,i=a,a=c.length,o++,h=e.md.helpers.parseLinkTitle(c,i,a,h)}let g;for(i<a&&m!==i&&h.ok?(g=h.str,i=h.pos):(g=``,i=f,o=p);i<a&&R(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10&&g)for(g=``,i=f,o=p;i<a&&R(c.charCodeAt(i));)i++;if(i<a&&c.charCodeAt(i)!==10)return!1;let _=ao(c.slice(1,l));return _?r?!0:(e.env.references===void 0&&(e.env.references={}),e.env.references[_]===void 0&&(e.env.references[_]={title:g,href:d}),e.line=o,!0):!1}var is=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),as=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,os=`<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>`,ss=RegExp(`^(?:`+as+`|`+os+`|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),cs=RegExp(`^(?:`+as+`|`+os+`)`),ls=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp(`^</?(`+is.join(`|`)+`)(?=(\\s|/?>|$))`,`i`),/^$/,!0],[RegExp(cs.source+`\\s*$`),/^$/,!1]];function us(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let o=e.src.slice(i,a),s=0;for(;s<ls.length&&!ls[s][0].test(o);s++);if(s===ls.length)return!1;if(r)return ls[s][2];let c=t+1,l=ls[s][1].test(``);if(!ls[s][1].test(o)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(l||!e.isEmpty(c)));c++)if(i=e.bMarks[c]+e.tShift[c],a=e.eMarks[c],o=e.src.slice(i,a),ls[s][1].test(o)){o.length!==0&&c++;break}}e.line=c;let u=e.push(`html_block`,``,0);return u.map=[t,c],u.content=e.getLines(t,c,e.blkIndent,!0),!0}function ds(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.src.charCodeAt(i);if(o!==35||i>=a)return!1;let s=1;for(o=e.src.charCodeAt(++i);o===35&&i<a&&s<=6;)s++,o=e.src.charCodeAt(++i);if(s>6||i<a&&!R(o))return!1;if(r)return!0;a=e.skipSpacesBack(a,i);let c=e.skipCharsBack(a,35,i);c>i&&R(e.src.charCodeAt(c-1))&&(a=c),e.line=t+1;let l=e.push(`heading_open`,`h`+String(s),1);l.markup=`########`.slice(0,s),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=so(e.src.slice(i,a)),u.map=[t,e.line],u.children=[];let d=e.push(`heading_close`,`h`+String(s),-1);return d.markup=`########`.slice(0,s),!0}function fs(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`);if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.parentType;e.parentType=`paragraph`;let a=0,o,s=t+1;for(;s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3)continue;if(e.sCount[s]>=e.blkIndent){let t=e.bMarks[s]+e.tShift[s],n=e.eMarks[s];if(t<n&&(o=e.src.charCodeAt(t),(o===45||o===61)&&(t=e.skipChars(t,o),t=e.skipSpaces(t),t>=n))){a=o===61?1:2;break}}if(e.sCount[s]<0)continue;let t=!1;for(let i=0,a=r.length;i<a;i++)if(r[i](e,s,n,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=i,!1;let c=so(e.getLines(t,s,e.blkIndent,!1));e.line=s+1;let l=e.push(`heading_open`,`h`+String(a),1);l.markup=String.fromCharCode(o),l.map=[t,e.line];let u=e.push(`inline`,``,0);u.content=c,u.map=[t,e.line-1],u.children=[];let d=e.push(`heading_close`,`h`+String(a),-1);return d.markup=String.fromCharCode(o),e.parentType=i,!0}function ps(e,t,n){let r=e.md.block.ruler.getRules(`paragraph`),i=e.parentType,a=t+1;for(e.parentType=`paragraph`;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let t=!1;for(let i=0,o=r.length;i<o;i++)if(r[i](e,a,n,!0)){t=!0;break}if(t)break}let o=so(e.getLines(t,a,e.blkIndent,!1));e.line=a;let s=e.push(`paragraph_open`,`p`,1);s.map=[t,e.line];let c=e.push(`inline`,``,0);return c.content=o,c.map=[t,e.line],c.children=[],e.push(`paragraph_close`,`p`,-1),e.parentType=i,!0}var ms=[[`table`,Jo,[`paragraph`,`reference`]],[`code`,Yo],[`fence`,Xo,[`paragraph`,`reference`,`blockquote`,`list`]],[`blockquote`,Zo,[`paragraph`,`reference`,`blockquote`,`list`]],[`hr`,Qo,[`paragraph`,`reference`,`blockquote`,`list`]],[`list`,ns,[`paragraph`,`reference`,`blockquote`]],[`reference`,rs],[`html_block`,us,[`paragraph`,`reference`,`blockquote`]],[`heading`,ds,[`paragraph`,`reference`,`blockquote`]],[`lheading`,fs],[`paragraph`,ps]];function hs(){this.ruler=new z;for(let e=0;e<ms.length;e++)this.ruler.push(ms[e][0],ms[e][1],{alt:(ms[e][2]||[]).slice()})}hs.prototype.tokenize=function(e,t,n){let r=this.ruler.getRules(``),i=r.length,a=e.md.options.maxNesting,o=t,s=!1;for(;o<n&&(e.line=o=e.skipEmptyLines(o),!(o>=n||e.sCount[o]<e.blkIndent));){if(e.level>=a){e.line=n;break}let t=e.line,c=!1;for(let a=0;a<i;a++)if(c=r[a](e,o,n,!1),c){if(t>=e.line)throw Error(`block rule didn't increment state.line`);break}if(!c)throw Error(`none of the block rules matched`);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),o=e.line,o<n&&e.isEmpty(o)&&(s=!0,o++,e.line=o)}},hs.prototype.parse=function(e,t,n,r){if(!e)return;let i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)},hs.prototype.State=Wo;function gs(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=``,this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}gs.prototype.pushPending=function(){let e=new go(`text`,``,0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending=``,e},gs.prototype.push=function(e,t,n){this.pending&&this.pushPending();let r=new go(e,t,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r},gs.prototype.scanDelims=function(e,t){let n=this.posMax,r=this.src.charCodeAt(e),i;if(e===0)i=32;else if(e===1)i=this.src.charCodeAt(0),(i&63488)==55296&&(i=65533);else if(i=this.src.charCodeAt(e-1),(i&64512)==56320){let t=this.src.charCodeAt(e-2);i=(t&64512)==55296?65536+(t-55296<<10)+(i-56320):65533}else(i&64512)==55296&&(i=65533);let a=e;for(;a<n&&this.src.charCodeAt(a)===r;)a++;let o=a-e,s=a<n?this.src.charCodeAt(a):32;if((s&64512)==55296){let e=this.src.charCodeAt(a+1);s=(e&64512)==56320?65536+(s-55296<<10)+(e-56320):65533}else(s&64512)==56320&&(s=65533);let c=io(i)||ro(i),l=io(s)||ro(s),u=to(i),d=to(s),f=!d&&(!l||u||c),p=!u&&(!c||d||l);return{can_open:f&&(t||!p||c),can_close:p&&(t||!f||l),length:o}},gs.prototype.Token=go;function _s(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function vs(e,t){let n=e.pos;for(;n<e.posMax&&!_s(e.src.charCodeAt(n));)n++;return n!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}function ys(e){return e>=65&&e<=90||e>=97&&e<=122}function bs(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===45||e===46}function xs(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;let n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;let i=n-Math.min(10,e.pending.length,n),a=n;for(;a>i&&bs(e.src.charCodeAt(a-1));)a--;if(a===n||!ys(e.src.charCodeAt(a)))return!1;let o=n-a,s=e.md.linkify.matchAtStart(e.src.slice(a));if(!s)return!1;let c=s.url;if(c.length<=o)return!1;let l=c.length;for(;l>0&&c.charCodeAt(l-1)===42;)l--;l!==c.length&&(c=c.slice(0,l));let u=e.md.normalizeLink(c);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o);let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,u]],t.markup=`linkify`,t.info=`auto`;let n=e.push(`text`,``,0);n.content=e.md.normalizeLinkText(c);let r=e.push(`link_close`,`a`,-1);r.markup=`linkify`,r.info=`auto`}return e.pos+=c.length-o,!0}function Ss(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;let r=e.pending.length-1,i=e.posMax;if(!t){if(r>=0&&e.pending.charCodeAt(r)===32){if(r>=1&&e.pending.charCodeAt(r-1)===32){let t=r-1;for(;t>=1&&e.pending.charCodeAt(t-1)===32;)t--;e.pending=e.pending.slice(0,t),e.push(`hardbreak`,`br`,0)}else e.pending=e.pending.slice(0,-1),e.push(`softbreak`,`br`,0)}else e.push(`softbreak`,`br`,0)}for(n++;n<i&&R(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Cs=[];for(let e=0;e<256;e++)Cs.push(0);`\\!"#$%&'()*+,./:;<=>?@[]^_\`{|}~-`.split(``).forEach(function(e){Cs[e.charCodeAt(0)]=1});function ws(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push(`hardbreak`,`br`,0),n++;n<r&&(i=e.src.charCodeAt(n),R(i));)n++;return e.pos=n,!0}if(i===32){if(!t){let t=e.push(`text_special`,``,0);t.content=`\\`,t.markup=`\\`,t.info=`escape`}return e.pos=n,!0}let a=e.src[n];if(i>=55296&&i<=56319&&n+1<r){let t=e.src.charCodeAt(n+1);t>=56320&&t<=57343&&(a+=e.src[n+1],n++)}let o=`\\`+a;if(!t){let t=e.push(`text_special`,``,0);t.content=i<256&&Cs[i]!==0?a:o,t.markup=o,t.info=`escape`}return e.pos=n+1,!0}function Ts(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;let r=n;n++;let i=e.posMax;for(;n<i&&e.src.charCodeAt(n)===96;)n++;let a=e.src.slice(r,n),o=a.length;if(e.backticksScanned&&(e.backticks[o]||0)<=r)return t||(e.pending+=a),e.pos+=o,!0;let s=n,c;for(;(c=e.src.indexOf("`",s))!==-1;){for(s=c+1;s<i&&e.src.charCodeAt(s)===96;)s++;let r=s-c;if(r===o){if(!t){let t=e.push(`code_inline`,`code`,0);t.markup=a,t.content=e.src.slice(n,c).replace(/\n/g,` `).replace(/^ (.+) $/,`$1`)}return e.pos=s,!0}e.backticks[r]=c}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=o,!0}function Es(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;let i=e.scanDelims(e.pos,!0),a=i.length,o=String.fromCharCode(r);if(a<2)return!1;let s;a%2&&(s=e.push(`text`,``,0),s.content=o,a--);for(let t=0;t<a;t+=2)s=e.push(`text`,``,0),s.content=o+o,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function Ds(e,t){let n,r=[],i=t.length;for(let a=0;a<i;a++){let i=t[a];if(i.marker!==126||i.end===-1)continue;let o=t[i.end];n=e.tokens[i.token],n.type=`s_open`,n.tag=`s`,n.nesting=1,n.markup=`~~`,n.content=``,n=e.tokens[o.token],n.type=`s_close`,n.tag=`s`,n.nesting=-1,n.markup=`~~`,n.content=``,e.tokens[o.token-1].type===`text`&&e.tokens[o.token-1].content===`~`&&r.push(o.token-1)}for(;r.length;){let t=r.pop(),i=t+1;for(;i<e.tokens.length&&e.tokens[i].type===`s_close`;)i++;i--,t!==i&&(n=e.tokens[i],e.tokens[i]=e.tokens[t],e.tokens[t]=n)}}function Os(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ds(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&Ds(e,t[r].delimiters)}var ks={tokenize:Es,postProcess:Os};function As(e,t){let n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;let i=e.scanDelims(e.pos,r===42);for(let t=0;t<i.length;t++){let t=e.push(`text`,``,0);t.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function js(e,t){let n=t.length;for(let r=n-1;r>=0;r--){let n=t[r];if(n.marker!==95&&n.marker!==42||n.end===-1)continue;let i=t[n.end],a=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1,o=String.fromCharCode(n.marker),s=e.tokens[n.token];s.type=a?`strong_open`:`em_open`,s.tag=a?`strong`:`em`,s.nesting=1,s.markup=a?o+o:o,s.content=``;let c=e.tokens[i.token];c.type=a?`strong_close`:`em_close`,c.tag=a?`strong`:`em`,c.nesting=-1,c.markup=a?o+o:o,c.content=``,a&&(e.tokens[t[r-1].token].content=``,e.tokens[t[n.end+1].token].content=``,r--)}}function Ms(e){let t=e.tokens_meta,n=e.tokens_meta.length;js(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&js(e,t[r].delimiters)}var Ns={tokenize:As,postProcess:Ms};function Ps(e,t){let n,r,i,a,o=``,s=``,c=e.pos,l=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;let u=e.pos,d=e.posMax,f=e.pos+1,p=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(p<0)return!1;let m=p+1;if(m<d&&e.src.charCodeAt(m)===40){for(l=!1,m++;m<d&&(n=e.src.charCodeAt(m),R(n)||n===10);m++);if(m>=d)return!1;if(c=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(o=e.md.normalizeLink(i.str),e.md.validateLink(o)?m=i.pos:o=``,c=m;m<d&&(n=e.src.charCodeAt(m),R(n)||n===10);m++);if(i=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<d&&c!==m&&i.ok)for(s=i.str,m=i.pos;m<d&&(n=e.src.charCodeAt(m),R(n)||n===10);m++);}(m>=d||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(e.env.references===void 0)return!1;if(m<d&&e.src.charCodeAt(m)===91?(c=m+1,m=e.md.helpers.parseLinkLabel(e,m),m>=0?r=e.src.slice(c,m++):m=p+1):m=p+1,r||=e.src.slice(f,p),a=e.env.references[ao(r)],!a)return e.pos=u,!1;o=a.href,s=a.title}if(!t){e.pos=f,e.posMax=p;let t=e.push(`link_open`,`a`,1),n=[[`href`,o]];t.attrs=n,s&&n.push([`title`,s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push(`link_close`,`a`,-1)}return e.pos=m,e.posMax=d,!0}function Fs(e,t){let n,r,i,a,o,s,c,l,u=``,d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;let p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(a=m+1,a<f&&e.src.charCodeAt(a)===40){for(a++;a<f&&(n=e.src.charCodeAt(a),R(n)||n===10);a++);if(a>=f)return!1;for(l=a,s=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),s.ok&&(u=e.md.normalizeLink(s.str),e.md.validateLink(u)?a=s.pos:u=``),l=a;a<f&&(n=e.src.charCodeAt(a),R(n)||n===10);a++);if(s=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<f&&l!==a&&s.ok)for(c=s.str,a=s.pos;a<f&&(n=e.src.charCodeAt(a),R(n)||n===10);a++);else c=``;if(a>=f||e.src.charCodeAt(a)!==41)return e.pos=d,!1;a++}else{if(e.env.references===void 0)return!1;if(a<f&&e.src.charCodeAt(a)===91?(l=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(l,a++):a=m+1):a=m+1,i||=e.src.slice(p,m),o=e.env.references[ao(i)],!o)return e.pos=d,!1;u=o.href,c=o.title}if(!t){r=e.src.slice(p,m);let t=[];e.md.inline.parse(r,e.md,e.env,t);let n=e.push(`image`,`img`,0),i=[[`src`,u],[`alt`,``]];n.attrs=i,n.children=t,n.content=r,c&&i.push([`title`,c])}return e.pos=a,e.posMax=f,!0}var Is=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Ls=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Rs(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;let r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;let t=e.src.charCodeAt(n);if(t===60)return!1;if(t===62)break}let a=e.src.slice(r+1,n);if(Ls.test(a)){let n=e.md.normalizeLink(a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}if(Is.test(a)){let n=e.md.normalizeLink(`mailto:`+a);if(!e.md.validateLink(n))return!1;if(!t){let t=e.push(`link_open`,`a`,1);t.attrs=[[`href`,n]],t.markup=`autolink`,t.info=`auto`;let r=e.push(`text`,``,0);r.content=e.md.normalizeLinkText(a);let i=e.push(`link_close`,`a`,-1);i.markup=`autolink`,i.info=`auto`}return e.pos+=a.length+2,!0}return!1}function zs(e){return/^<a[>\s]/i.test(e)}function Bs(e){return/^<\/a\s*>/i.test(e)}function Vs(e){let t=e|32;return t>=97&&t<=122}function Hs(e,t){if(!e.md.options.html)return!1;let n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Vs(i))return!1;let a=e.src.slice(r).match(ss);if(!a)return!1;if(!t){let t=e.push(`html_inline`,``,0);t.content=a[0],zs(t.content)&&e.linkLevel++,Bs(t.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}var Us=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ws=/^&([a-z][a-z0-9]{1,31});/i;function Gs(e,t){let n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){let r=e.src.slice(n).match(Us);if(r){if(!t){let t=r[1][0].toLowerCase()===`x`?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=e.push(`text_special`,``,0);n.content=Ba(t)?Va(t):Va(65533),n.markup=r[0],n.info=`entity`}return e.pos+=r[0].length,!0}}else{let r=e.src.slice(n).match(Ws);if(r){let n=Ma(r[0]);if(n!==r[0]){if(!t){let t=e.push(`text_special`,``,0);t.content=n,t.markup=r[0],t.info=`entity`}return e.pos+=r[0].length,!0}}}return!1}function Ks(e){let t={},n=e.length;if(!n)return;let r=0,i=-2,a=[];for(let o=0;o<n;o++){let n=e[o];if(a.push(0),(e[r].marker!==n.marker||i!==n.token-1)&&(r=o),i=n.token,n.length=n.length||0,!n.close)continue;t.hasOwnProperty(n.marker)||(t[n.marker]=[-1,-1,-1,-1,-1,-1]);let s=t[n.marker][(n.open?3:0)+n.length%3],c=r-a[r]-1,l=c;for(;c>s;c-=a[c]+1){let t=e[c];if(t.marker===n.marker&&t.open&&t.end<0){let r=!1;if((t.close||n.open)&&(t.length+n.length)%3==0&&(t.length%3!=0||n.length%3!=0)&&(r=!0),!r){let r=c>0&&!e[c-1].open?a[c-1]+1:0;a[o]=o-c+r,a[c]=r,n.open=!1,t.end=o,t.close=!1,l=-1,i=-2;break}}}l!==-1&&(t[n.marker][(n.open?3:0)+(n.length||0)%3]=l)}}function qs(e){let t=e.tokens_meta,n=e.tokens_meta.length;Ks(e.delimiters);for(let e=0;e<n;e++)t[e]&&t[e].delimiters&&Ks(t[e].delimiters)}function Js(e){let t,n,r=0,i=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type===`text`&&t+1<a&&i[t+1].type===`text`?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}var Ys=[[`text`,vs],[`linkify`,xs],[`newline`,Ss],[`escape`,ws],[`backticks`,Ts],[`strikethrough`,ks.tokenize],[`emphasis`,Ns.tokenize],[`link`,Ps],[`image`,Fs],[`autolink`,Rs],[`html_inline`,Hs],[`entity`,Gs]],Xs=[[`balance_pairs`,qs],[`strikethrough`,ks.postProcess],[`emphasis`,Ns.postProcess],[`fragments_join`,Js]];function Zs(){this.ruler=new z;for(let e=0;e<Ys.length;e++)this.ruler.push(Ys[e][0],Ys[e][1]);this.ruler2=new z;for(let e=0;e<Xs.length;e++)this.ruler2.push(Xs[e][0],Xs[e][1])}Zs.prototype.skipToken=function(e){let t=e.pos,n=this.ruler.getRules(``),r=n.length,i=e.md.options.maxNesting,a=e.cache;if(a[t]!==void 0){e.pos=a[t];return}let o=!1;if(e.level<i){for(let i=0;i<r;i++)if(e.level++,o=n[i](e,!0),e.level--,o){if(t>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}else e.pos=e.posMax;o||e.pos++,a[t]=e.pos},Zs.prototype.tokenize=function(e){let t=this.ruler.getRules(``),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){let a=e.pos,o=!1;if(e.level<i){for(let r=0;r<n;r++)if(o=t[r](e,!1),o){if(a>=e.pos)throw Error(`inline rule didn't increment state.pos`);break}}if(o){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Zs.prototype.parse=function(e,t,n,r){let i=new this.State(e,t,n,r);this.tokenize(i);let a=this.ruler2.getRules(``),o=a.length;for(let e=0;e<o;e++)a[e](i)},Zs.prototype.State=gs;function Qs(e){let t={};e||={},t.src_Any=ca.source,t.src_Cc=la.source,t.src_Z=pa.source,t.src_P=da.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let n=`[><|]`;return t.src_pseudo_letter=`(?:(?!${n}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|${n}|${t.src_ZPCc})(?!${e[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${n}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function $s(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function ec(e){return Object.prototype.toString.call(e)}function tc(e){return ec(e)===`[object String]`}function nc(e){return ec(e)===`[object Object]`}function rc(e){return ec(e)===`[object RegExp]`}function ic(e){return ec(e)===`[object Function]`}function ac(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var oc={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function sc(e){return Object.keys(e||{}).reduce(function(e,t){return e||oc.hasOwnProperty(t)},!1)}var cc={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},lc=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,uc=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function dc(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function fc(){return function(e,t){t.normalize(e)}}function pc(e){let t=e.re=Qs(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(lc),n.push(t.src_xn),t.src_tlds=n.join(`|`);function r(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),`i`),t.email_fuzzy_global=RegExp(r(t.tpl_email_fuzzy),`ig`),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),`i`),t.link_fuzzy_global=RegExp(r(t.tpl_link_fuzzy),`ig`),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),`i`),t.link_no_ip_fuzzy_global=RegExp(r(t.tpl_link_no_ip_fuzzy),`ig`),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),`i`);let i=[];e.__compiled__={};function a(e,t){throw Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,nc(n)){rc(n.validate)?r.validate=dc(n.validate):ic(n.validate)?r.validate=n.validate:a(t,n),ic(n.normalize)?r.normalize=n.normalize:n.normalize?a(t,n):r.normalize=fc();return}if(tc(n)){i.push(t);return}a(t,n)}),i.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:fc()};let o=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(ac).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${o})`,`ig`),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,`i`),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,`i`)}function mc(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}function hc(e,t){if(!(this instanceof hc))return new hc(e,t);t||sc(e)&&(t=e,e={}),this.__opts__=$s({},oc,t),this.__schemas__=$s({},cc,e),this.__compiled__={},this.__tlds__=uc,this.__tlds_replaced__=!1,this.re={},pc(this)}hc.prototype.add=function(e,t){return this.__schemas__[e]=t,pc(this),this},hc.prototype.set=function(e){return this.__opts__=$s(this.__opts__,e),this},hc.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&e.indexOf(`@`)>=0&&e.match(this.re.email_fuzzy)!==null)},hc.prototype.pretest=function(e){return this.re.pretest.test(e)},hc.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},hc.prototype.match=function(e){let t=[],n=[],r=[],i=[],a,o,s;function c(e,t){return e?t?e.index===t.index?e.lastIndex>=t.lastIndex?e:t:e.index<t.index?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;(a=s.exec(e))!==null;)o=this.testSchemaAt(e,a[2],s.lastIndex),o&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__[`http:`])for(s=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)r.push({schema:``,index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`])for(s=this.re.email_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)i.push({schema:`mailto:`,index:a.index+a[1].length,lastIndex:a.index+a[0].length});let l=[0,0,0],u=0;for(;;){let a=[n[l[0]],i[l[1]],r[l[2]]],o=c(c(a[0],a[1]),a[2]);if(!o)break;if(o===a[0]?l[0]++:o===a[1]?l[1]++:l[2]++,o.index<u)continue;let s=new mc(e,o.schema,o.index,o.lastIndex);this.__compiled__[s.schema].normalize(s,this),t.push(s),u=o.lastIndex}return t.length?t:null},hc.prototype.matchAtStart=function(e){if(!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new mc(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},hc.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),pc(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,pc(this),this)},hc.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)},hc.prototype.onCompile=function(){};var gc=2147483647,_c=36,vc=1,yc=26,bc=38,xc=700,Sc=72,Cc=128,wc=`-`,Tc=/^xn--/,Ec=/[^\0-\x7F]/,Dc=/[\x2E\u3002\uFF0E\uFF61]/g,Oc={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},kc=35,Ac=Math.floor,jc=String.fromCharCode;function Mc(e){throw RangeError(Oc[e])}function Nc(e,t){let n=[],r=e.length;for(;r--;)n[r]=t(e[r]);return n}function Pc(e,t){let n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(Dc,`.`);let i=Nc(e.split(`.`),t).join(`.`);return r+i}function Fc(e){let t=[],n=0,r=e.length;for(;n<r;){let i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){let r=e.charCodeAt(n++);(r&64512)==56320?t.push(((i&1023)<<10)+(r&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}var Ic=e=>String.fromCodePoint(...e),Lc=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:_c},Rc=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},zc=function(e,t,n){let r=0;for(e=n?Ac(e/xc):e>>1,e+=Ac(e/t);e>455;r+=_c)e=Ac(e/kc);return Ac(r+36*e/(e+bc))},Bc=function(e){let t=[],n=e.length,r=0,i=Cc,a=Sc,o=e.lastIndexOf(wc);o<0&&(o=0);for(let n=0;n<o;++n)e.charCodeAt(n)>=128&&Mc(`not-basic`),t.push(e.charCodeAt(n));for(let s=o>0?o+1:0;s<n;){let o=r;for(let t=1,i=_c;;i+=_c){s>=n&&Mc(`invalid-input`);let o=Lc(e.charCodeAt(s++));o>=_c&&Mc(`invalid-input`),o>Ac((gc-r)/t)&&Mc(`overflow`),r+=o*t;let c=i<=a?vc:i>=a+yc?yc:i-a;if(o<c)break;let l=_c-c;t>Ac(gc/l)&&Mc(`overflow`),t*=l}let c=t.length+1;a=zc(r-o,c,o==0),Ac(r/c)>gc-i&&Mc(`overflow`),i+=Ac(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},Vc=function(e){let t=[];e=Fc(e);let n=e.length,r=Cc,i=0,a=Sc;for(let n of e)n<128&&t.push(jc(n));let o=t.length,s=o;for(o&&t.push(wc);s<n;){let n=gc;for(let t of e)t>=r&&t<n&&(n=t);let c=s+1;n-r>Ac((gc-i)/c)&&Mc(`overflow`),i+=(n-r)*c,r=n;for(let n of e)if(n<r&&++i>gc&&Mc(`overflow`),n===r){let e=i;for(let n=_c;;n+=_c){let r=n<=a?vc:n>=a+yc?yc:n-a;if(e<r)break;let i=e-r,o=_c-r;t.push(jc(Rc(r+i%o,0))),e=Ac(i/o)}t.push(jc(Rc(e,0))),a=zc(i,c,s===o),i=0,++s}++i,++r}return t.join(``)},Hc={version:`2.3.1`,ucs2:{decode:Fc,encode:Ic},decode:Bc,encode:Vc,toASCII:function(e){return Pc(e,function(e){return Ec.test(e)?`xn--`+Vc(e):e})},toUnicode:function(e){return Pc(e,function(e){return Tc.test(e)?Bc(e.slice(4).toLowerCase()):e})}},Uc={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`paragraph`]},inline:{rules:[`text`],rules2:[`balance_pairs`,`fragments_join`]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:`language-`,linkify:!1,typographer:!1,quotes:`“”‘’`,highlight:null,maxNesting:20},components:{core:{rules:[`normalize`,`block`,`inline`,`text_join`]},block:{rules:[`blockquote`,`code`,`fence`,`heading`,`hr`,`html_block`,`lheading`,`list`,`reference`,`paragraph`]},inline:{rules:[`autolink`,`backticks`,`emphasis`,`entity`,`escape`,`html_inline`,`image`,`link`,`newline`,`text`],rules2:[`balance_pairs`,`emphasis`,`fragments_join`]}}}},Wc=/^(vbscript|javascript|file|data):/,Gc=/^data:image\/(gif|png|jpeg|webp);/;function Kc(e){let t=e.trim().toLowerCase();return!Wc.test(t)||Gc.test(t)}var qc=[`http:`,`https:`,`mailto:`];function Jc(e){let t=oa(e,!0);if(t.hostname&&(!t.protocol||qc.indexOf(t.protocol)>=0))try{t.hostname=Hc.toASCII(t.hostname)}catch{}return qi(Ji(t))}function Yc(e){let t=oa(e,!0);if(t.hostname&&(!t.protocol||qc.indexOf(t.protocol)>=0))try{t.hostname=Hc.toUnicode(t.hostname)}catch{}return Wi(Ji(t),Wi.defaultChars+`%`)}function Xc(e,t){if(!(this instanceof Xc))return new Xc(e,t);t||Fa(e)||(t=e||{},e=`default`),this.inline=new Zs,this.block=new hs,this.core=new Uo,this.renderer=new ho,this.linkify=new hc,this.validateLink=Kc,this.normalizeLink=Jc,this.normalizeLinkText=Yc,this.utils=Na,this.helpers=Ra({},po),this.options={},this.configure(e),t&&this.set(t)}Xc.prototype.set=function(e){return Ra(this.options,e),this},Xc.prototype.configure=function(e){let t=this;if(Fa(e)){let t=e;if(e=Uc[t],!e)throw Error('Wrong `markdown-it` preset "'+t+`", check name`)}if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Xc.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to enable unknown rule(s): `+r);return this},Xc.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),[`core`,`block`,`inline`].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));let r=e.filter(function(e){return n.indexOf(e)<0});if(r.length&&!t)throw Error(`MarkdownIt. Failed to disable unknown rule(s): `+r);return this},Xc.prototype.use=function(e){let t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Xc.prototype.parse=function(e,t){if(typeof e!=`string`)throw Error(`Input data should be a String`);let n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Xc.prototype.render=function(e,t){return t||={},this.renderer.render(this.parse(e,t),this.options,t)},Xc.prototype.parseInline=function(e,t){let n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Xc.prototype.renderInline=function(e,t){return t||={},this.renderer.render(this.parseInline(e,t),this.options,t)};function Zc(e,t,n){let{parseMetaString:r,trimEndingNewline:i=!0,defaultLanguage:a=`text`,fallbackLanguage:o}=n,s=t.getLoadedLanguages();e.options.highlight=(e,c=`text`,l)=>{c===``&&(c=a),o&&!s.includes(c)&&(c=o);let u=r?.(l,e,c)||{},d={...n,lang:c,meta:{...n.meta,...u,__raw:l}},f=[];return f.push({name:`@shikijs/markdown-it:block-class`,code(e){e.properties.class=`language-${c}`}}),i&&e.endsWith(`
60
60
  `)&&(e=e.slice(0,-1)),t.codeToHtml(e,{...d,transformers:[...f,...d.transformers||[]]})}}function Qc(e,t){return function(n){Zc(n,e,t)}}var $c=class extends Error{constructor(e){super(e),this.name=`ShikiError`}},el=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function tl(){return 2147483648}function nl(){return typeof performance<`u`?performance.now():Date.now()}var rl=(e,t)=>e+(t-e%t)%t;async function il(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=tl();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,rl(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:nl,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var al=Object.defineProperty,ol=(e,t,n)=>t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t,n)=>(ol(e,typeof t==`symbol`?t:t+``,n),n),V=null;function sl(e){throw new el(e.UTF8ToString(e.getLastOnigError()))}var cl=class e{constructor(t){B(this,`utf16Length`),B(this,`utf8Length`),B(this,`utf16Value`),B(this,`utf8Value`),B(this,`utf16OffsetToUtf8`),B(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},ll=class{constructor(e){if(B(this,`id`,++ll.LAST_ID),B(this,`_onigBinding`),B(this,`content`),B(this,`utf16Length`),B(this,`utf8Length`),B(this,`utf16OffsetToUtf8`),B(this,`utf8OffsetToUtf16`),B(this,`ptr`),!V)throw new el(`Must invoke loadWasm first.`);this._onigBinding=V,this.content=e;let t=new cl(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!ll._sharedPtrInUse?(ll._sharedPtr||=V.omalloc(1e4),ll._sharedPtrInUse=!0,V.HEAPU8.set(t.utf8Value,ll._sharedPtr),this.ptr=ll._sharedPtr):this.ptr=t.createString(V)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===ll._sharedPtr?ll._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}},ul=ll;B(ul,`LAST_ID`,0),B(ul,`_sharedPtr`,0),B(ul,`_sharedPtrInUse`,!1);var dl=class{constructor(e){if(B(this,`_onigBinding`),B(this,`_ptr`),!V)throw new el(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new cl(e[r]);t[r]=i.createString(V),n[r]=i.utf8Length}let r=V.omalloc(4*e.length);V.HEAPU32.set(t,r/4);let i=V.omalloc(4*e.length);V.HEAPU32.set(n,i/4);let a=V.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)V.ofree(t[n]);V.ofree(i),V.ofree(r),a===0&&sl(V),this._onigBinding=V,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ul(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function fl(e){return typeof e.instantiator==`function`}function pl(e){return typeof e.default==`function`}function ml(e){return e.data!==void 0}function hl(e){return typeof Response<`u`&&e instanceof Response}function gl(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var _l;function vl(e){if(_l)return _l;async function t(){V=await il(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),fl(n)?n=await n.instantiator(t):pl(n)?n=await n.default(t):(ml(n)&&(n=n.data),hl(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await bl(n)(t):await xl(n)(t):gl(n)||n instanceof WebAssembly.Module?n=await yl(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await yl(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return _l=t(),_l}function yl(e){return t=>WebAssembly.instantiate(e,t)}function bl(e){return t=>WebAssembly.instantiateStreaming(e,t)}function xl(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Sl(e){return e&&await vl(e),{createScanner(e){return new dl(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ul(e)}}}function Cl(e){return wl(e)}function wl(e){return Array.isArray(e)?Tl(e):e instanceof RegExp?e:typeof e==`object`?El(e):e}function Tl(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=wl(e[n]);return t}function El(e){let t={};for(let n in e)t[n]=wl(e[n]);return t}function Dl(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ol(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ol(e.substring(0,e.length-1)):e.substr(~t+1)}var kl=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Al=class{static hasCaptures(e){return e!==null&&(kl.lastIndex=0,kl.test(e))}static replaceCaptures(e,t,n){return e.replace(kl,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function jl(e,t){return e<t?-1:+(e>t)}function Ml(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=jl(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Nl(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Pl(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Fl=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Il=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Vl(e),t)}static createFromParsedTheme(e,t){return Wl(e,t)}_cachedMatchRoot=new Fl(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Rl(e.parent,t.parentScopes));return n?new Bl(n.fontStyle,n.foreground,n.background):null}},Ll=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Rl(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!zl(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function zl(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Bl=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Vl(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Nl(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Nl(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Hl(l,u,e,o,s,c)}}return n}var Hl=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Ul=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Ul||{});function Wl(e,t){e.sort((e,t)=>{let n=jl(e.scope,t.scope);return n!==0||(n=Ml(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Gl(t),o=new Bl(n,a.getId(r),a.getId(i)),s=new Jl(new ql(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Il(a,o,s)}var Gl=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Kl=Object.freeze([]),ql=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Kl,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Jl=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ql.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ml(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ql(e,t,n,r,i))}},Yl=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Zl(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Xl(e){return e}function Zl(e){return e}function Ql(e,t){let n=[],r=eu(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if($l(i)){let e=[];do e.push(i),i=r.next();while($l(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function $l(e){return!!e&&!!e.match(/[\w\.:]+/)}function eu(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function tu(e){typeof e.dispose==`function`&&e.dispose()}var nu=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ru=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},iu=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},au=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new nu(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new iu;for(let n of e)ou(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof nu){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ou(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof nu?cu({baseGrammar:a,selfGrammar:i},r):su(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new nu(e))}function su(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];lu([r],t,n)}}function cu(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&lu(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&lu(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function lu(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Dl({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&lu(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=hu(i);switch(a.kind){case 0:cu({...t,selfGrammar:t.baseGrammar},n);break;case 1:cu(t,n);break;case 2:su(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?su(a.ruleName,i,n):cu(i,n)}else a.kind===4?n.add(new ru(a.scopeName,a.ruleName)):n.add(new nu(a.scopeName))}}}var uu=class{kind=0},du=class{kind=1},fu=class{constructor(e){this.ruleName=e}kind=2},pu=class{constructor(e){this.scopeName=e}kind=3},mu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function hu(e){if(e===`$base`)return new uu;if(e===`$self`)return new du;let t=e.indexOf(`#`);return t===-1?new pu(e):t===0?new fu(e.substring(1)):new mu(e.substring(0,t),e.substring(t+1))}var gu=/\\(\d+)/,_u=/\\(\d+)/g,vu=-1,yu=-2;function bu(e){return e}function xu(e){return e}var Su=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Al.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Al.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ol(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Al.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Al.replaceCaptures(this._contentName,e,t)}},Cu=class extends Su{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},wu=class extends Su{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ku(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Au,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Tu=class extends Su{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Au,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Eu=class extends Su{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new ku(i,this.id),this.beginCaptures=a,this._end=new ku(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Au;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Du=class extends Su{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new ku(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new ku(o,yu),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Au;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Au,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Ou=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Cu(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new wu(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Dl({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Tu(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Du(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Eu(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=hu(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Tu||e instanceof Eu||e instanceof Du)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ku=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&gu.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return _u.lastIndex=0,this.source.replace(_u,(e,t)=>Pl(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Au=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new ju(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new ju(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ju=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
61
61
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Mu=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Nu=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Mu(e,8),this._embeddedLanguagesMatcher=new Pu(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Mu(0,0);_getBasicScopeAttributes=new Fl(e=>new Mu(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Pu=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Pl(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Fu=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Iu(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Lu(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Fu(i,!0);f()}return new Fu(i,!1);function f(){let o=Ru(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===vu){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Uu(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Eu){let r=o;Uu(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Du){let r=o;Uu(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Uu(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Lu(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Du&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Hu(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==yu){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Uu(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ru(e,t,n,r,i,a){let o=zu(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Bu(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function zu(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Vu(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Bu(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Vu(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Vu(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Hu(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Uu(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Iu(e,p,n&&d.start===0,d.start,f,i,!1,0),tu(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Wu(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Wu=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Gu(e,t,n,r,i,a,o,s){return new Yu(e,t,n,r,i,a,o,s)}function Ku(e,t,n,r,i){let a=Ql(t,qu),o=Ou.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function qu(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Ju(t[r],e))return n=r+1,!0;return!1})}function Ju(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Yu=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Nu(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Xu(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Ql(e,qu);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Ku(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Ku(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(bu(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[xu(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Xu(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ou.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Qu.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Yl.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Zu.createRootAndLookUpScopeName(a,r,this):Zu.createRoot(`unknown`,r),t=new Qu(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
62
- `;let a=this.createOnigString(e),o=a.content.length,s=new ed(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Iu(this,a,i,0,t,s,!0,r);return tu(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Xu(e,t){return e=Cl(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Zu=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ll.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ll(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ll(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Yl.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Qu=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Zu.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:xu(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Zu.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,bu(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Zu.fromExtension(r,n.contentNameScopesList))}},$u=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Ql(e,qu).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Ql(e,qu).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ed=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Yl.set(n,0,Xl(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Yl.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},td=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Gu(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},nd=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new td(Il.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Il.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new $u(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new au(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},rd=Qu.NULL,id=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],ad=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ad.prototype.normal={},ad.prototype.property={},ad.prototype.space=void 0;function od(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ad(n,r,t)}function sd(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var cd=r({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>fd,commaSeparated:()=>dd,number:()=>G,overloadedBoolean:()=>ud,spaceSeparated:()=>K}),ld=0,U=pd(),W=pd(),ud=pd(),G=pd(),K=pd(),dd=pd(),fd=pd();function pd(){return 2**++ld}var md=Object.keys(cd),hd=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),gd(this,`space`,r),typeof n==`number`)for(;++i<md.length;){let e=md[i];gd(this,md[i],(n&cd[e])===cd[e])}}};hd.prototype.defined=!0;function gd(e,t,n){n&&(e[t]=n)}function _d(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new hd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sd(r)]=r,n[sd(a.attribute)]=r}return new ad(t,n,e.space)}var vd=_d({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function yd(e,t){return t in e?e[t]:t}function bd(e,t){return yd(e,t.toLowerCase())}var xd=_d({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:dd,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alpha:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|dd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:ud,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:ud,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootCustomElementRegistry:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shadowRootSerializable:U,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:U,disablePictureInPicture:U,disableRemotePlayback:U,exportParts:dd,part:K,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:bd}),Sd=_d({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:fd,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:dd,g2:dd,glyphName:dd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:fd,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fd,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fd,rev:fd,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fd,requiredFeatures:fd,requiredFonts:fd,requiredFormats:fd,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:fd,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fd,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fd,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:yd}),Cd=_d({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),wd=_d({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:bd}),Td=_d({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ed=/[A-Z]/g,Dd=/-[a-z]/g,Od=/^data[-\w.:]+$/i;function kd(e,t){let n=sd(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Od.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Dd,jd);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Dd.test(e)){let n=e.replace(Ed,Ad);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=hd}return new i(r,t)}function Ad(e){return`-`+e.toLowerCase()}function jd(e){return e.charAt(1).toUpperCase()}var Md=od([vd,xd,Cd,wd,Td],`html`),Nd=od([vd,Sd,Cd,wd,Td],`svg`),Pd={}.hasOwnProperty;function Fd(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Pd.call(t,e)){let n=String(t[e]);i=Pd.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Id=/["&'<>`]/g,Ld=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zd=/[|\\{}()[\]^$+*?.]/g,Bd=new WeakMap;function Vd(e,t){if(e=e.replace(t.subset?Hd(t.subset):Id,r),t.subset||t.escapeOnly)return e;return e.replace(Ld,n).replace(Rd,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Hd(e){let t=Bd.get(e);return t||(t=Ud(e),Bd.set(e,t)),t}function Ud(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(zd,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Wd=/[\dA-Fa-f]/;function Gd(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Wd.test(String.fromCharCode(t))?r:r+`;`}var Kd=/\d/;function qd(e,t,n){let r=`&#`+String(e);return n&&t&&!Kd.test(String.fromCharCode(t))?r:r+`;`}var Jd=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Yd={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Xd=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Zd={}.hasOwnProperty,Qd={},$d;for($d in Yd)Zd.call(Yd,$d)&&(Qd[Yd[$d]]=$d);var ef=/[^\dA-Za-z]/;function tf(e,t,n,r){let i=String.fromCharCode(e);if(Zd.call(Qd,i)){let e=Qd[i],a=`&`+e;return n&&Jd.includes(e)&&!Xd.includes(e)&&(!r||t&&t!==61&&ef.test(String.fromCharCode(t)))?a:a+`;`}return``}function nf(e,t,n){let r=Gd(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=tf(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=qd(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function rf(e,t){return Vd(e,Object.assign({format:nf},t))}var af=/^>|^->|<!--|-->|--!>|<!-$/g,of=[`>`],sf=[`<`,`>`];function cf(e,t,n,r){return r.settings.bogusComments?`<?`+rf(e.value,Object.assign({},r.settings.characterReferences,{subset:of}))+`>`:`<!--`+e.value.replace(af,i)+`-->`;function i(e){return rf(e,Object.assign({},r.settings.characterReferences,{subset:sf}))}}function lf(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function uf(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function df(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function ff(e){return e.join(` `).trim()}var pf=/[ \t\n\f\r]/g;function mf(e){return typeof e==`object`?e.type===`text`&&hf(e.value):hf(e)}function hf(e){return e.replace(pf,``)===``}var q=vf(1),gf=vf(-1),_f=[];function vf(e){return t;function t(t,n,r){let i=t?t.children:_f,a=(n||0)+e,o=i[a];if(!r)for(;o&&mf(o);)a+=e,o=i[a];return o}}var yf={}.hasOwnProperty;function bf(e){return t;function t(t,n,r){return yf.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var xf=bf({body:wf,caption:Sf,colgroup:Sf,dd:Of,dt:Df,head:Sf,html:Cf,li:Ef,optgroup:Af,option:jf,p:Tf,rp:kf,rt:kf,tbody:Nf,td:If,tfoot:Pf,th:If,thead:Mf,tr:Ff});function Sf(e,t,n){let r=q(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&mf(r.value.charAt(0)))}function Cf(e,t,n){let r=q(n,t);return!r||r.type!==`comment`}function wf(e,t,n){let r=q(n,t);return!r||r.type!==`comment`}function Tf(e,t,n){let r=q(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function Ef(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Df(e,t,n){let r=q(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Of(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function kf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Af(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function jf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Mf(e,t,n){let r=q(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Nf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Pf(e,t,n){return!q(n,t)}function Ff(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function If(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Lf=bf({body:Bf,colgroup:Vf,head:zf,html:Rf,tbody:Hf});function Rf(e){let t=q(e,-1);return!t||t.type!==`comment`}function zf(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Bf(e){let t=q(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&mf(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Vf(e,t,n){let r=gf(n,t),i=q(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Hf(e,t,n){let r=gf(n,t),i=q(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Uf={name:[[`
62
+ `;let a=this.createOnigString(e),o=a.content.length,s=new ed(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Iu(this,a,i,0,t,s,!0,r);return tu(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Xu(e,t){return e=Cl(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Zu=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ll.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ll(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ll(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Yl.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Qu=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Zu.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:xu(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Zu.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,bu(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Zu.fromExtension(r,n.contentNameScopesList))}},$u=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Ql(e,qu).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Ql(e,qu).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ed=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Yl.set(n,0,Xl(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Yl.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},td=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Gu(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},nd=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new td(Il.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Il.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new $u(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new au(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},rd=Qu.NULL,id=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],ad=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ad.prototype.normal={},ad.prototype.property={},ad.prototype.space=void 0;function od(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ad(n,r,t)}function sd(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var cd=r({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>fd,commaSeparated:()=>dd,number:()=>G,overloadedBoolean:()=>ud,spaceSeparated:()=>K}),ld=0,U=pd(),W=pd(),ud=pd(),G=pd(),K=pd(),dd=pd(),fd=pd();function pd(){return 2**++ld}var md=Object.keys(cd),hd=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),gd(this,`space`,r),typeof n==`number`)for(;++i<md.length;){let e=md[i];gd(this,md[i],(n&cd[e])===cd[e])}}};hd.prototype.defined=!0;function gd(e,t,n){n&&(e[t]=n)}function _d(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new hd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sd(r)]=r,n[sd(a.attribute)]=r}return new ad(t,n,e.space)}var vd=_d({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function yd(e,t){return t in e?e[t]:t}function bd(e,t){return yd(e,t.toLowerCase())}var xd=_d({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:dd,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alpha:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|dd,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:ud,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:ud,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootCustomElementRegistry:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shadowRootSerializable:U,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:U,disablePictureInPicture:U,disableRemotePlayback:U,exportParts:dd,part:K,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:bd}),Sd=_d({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:fd,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,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:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,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:dd,g2:dd,glyphName:dd,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:fd,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,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:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fd,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fd,rev:fd,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fd,requiredFeatures:fd,requiredFonts:fd,requiredFormats:fd,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:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:fd,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fd,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fd,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:yd}),Cd=_d({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),wd=_d({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:bd}),Td=_d({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ed=/[A-Z]/g,Dd=/-[a-z]/g,Od=/^data[-\w.:]+$/i;function kd(e,t){let n=sd(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Od.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Dd,jd);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Dd.test(e)){let n=e.replace(Ed,Ad);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=hd}return new i(r,t)}function Ad(e){return`-`+e.toLowerCase()}function jd(e){return e.charAt(1).toUpperCase()}var Md=od([vd,xd,Cd,wd,Td],`html`),Nd=od([vd,Sd,Cd,wd,Td],`svg`),Pd={}.hasOwnProperty;function Fd(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Pd.call(t,e)){let n=String(t[e]);i=Pd.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Id=/["&'<>`]/g,Ld=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zd=/[|\\{}()[\]^$+*?.]/g,Bd=new WeakMap;function Vd(e,t){return e=e.replace(t.subset?Hd(t.subset):Id,r),t.subset||t.escapeOnly?e:e.replace(Ld,n).replace(Rd,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Hd(e){let t=Bd.get(e);return t||(t=Ud(e),Bd.set(e,t)),t}function Ud(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(zd,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Wd=/[\dA-Fa-f]/;function Gd(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Wd.test(String.fromCharCode(t))?r:r+`;`}var Kd=/\d/;function qd(e,t,n){let r=`&#`+String(e);return n&&t&&!Kd.test(String.fromCharCode(t))?r:r+`;`}var Jd=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),Yd={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Xd=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Zd={}.hasOwnProperty,Qd={},$d;for($d in Yd)Zd.call(Yd,$d)&&(Qd[Yd[$d]]=$d);var ef=/[^\dA-Za-z]/;function tf(e,t,n,r){let i=String.fromCharCode(e);if(Zd.call(Qd,i)){let e=Qd[i],a=`&`+e;return n&&Jd.includes(e)&&!Xd.includes(e)&&(!r||t&&t!==61&&ef.test(String.fromCharCode(t)))?a:a+`;`}return``}function nf(e,t,n){let r=Gd(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=tf(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=qd(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function rf(e,t){return Vd(e,Object.assign({format:nf},t))}var af=/^>|^->|<!--|-->|--!>|<!-$/g,of=[`>`],sf=[`<`,`>`];function cf(e,t,n,r){return r.settings.bogusComments?`<?`+rf(e.value,Object.assign({},r.settings.characterReferences,{subset:of}))+`>`:`<!--`+e.value.replace(af,i)+`-->`;function i(e){return rf(e,Object.assign({},r.settings.characterReferences,{subset:sf}))}}function lf(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function uf(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function df(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function ff(e){return e.join(` `).trim()}var pf=/[ \t\n\f\r]/g;function mf(e){return typeof e==`object`?e.type===`text`&&hf(e.value):hf(e)}function hf(e){return e.replace(pf,``)===``}var q=vf(1),gf=vf(-1),_f=[];function vf(e){return t;function t(t,n,r){let i=t?t.children:_f,a=(n||0)+e,o=i[a];if(!r)for(;o&&mf(o);)a+=e,o=i[a];return o}}var yf={}.hasOwnProperty;function bf(e){return t;function t(t,n,r){return yf.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var xf=bf({body:wf,caption:Sf,colgroup:Sf,dd:Of,dt:Df,head:Sf,html:Cf,li:Ef,optgroup:Af,option:jf,p:Tf,rp:kf,rt:kf,tbody:Nf,td:If,tfoot:Pf,th:If,thead:Mf,tr:Ff});function Sf(e,t,n){let r=q(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&mf(r.value.charAt(0)))}function Cf(e,t,n){let r=q(n,t);return!r||r.type!==`comment`}function wf(e,t,n){let r=q(n,t);return!r||r.type!==`comment`}function Tf(e,t,n){let r=q(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function Ef(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Df(e,t,n){let r=q(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Of(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function kf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Af(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function jf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Mf(e,t,n){let r=q(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Nf(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Pf(e,t,n){return!q(n,t)}function Ff(e,t,n){let r=q(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function If(e,t,n){let r=q(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Lf=bf({body:Bf,colgroup:Vf,head:zf,html:Rf,tbody:Hf});function Rf(e){let t=q(e,-1);return!t||t.type!==`comment`}function zf(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Bf(e){let t=q(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&mf(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Vf(e,t,n){let r=gf(n,t),i=q(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Hf(e,t,n){let r=gf(n,t),i=q(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&xf(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Uf={name:[[`
63
63
  \f\r &/=>`.split(``),`
64
64
  \f\r "&'/=>\``.split(``)],[`\0
65
65
  \f\r "&'/<=>`.split(``),`\0