context-lens 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analysis/server.js +9 -0
- package/dist/analysis/server.js.map +1 -1
- package/dist/cli.js +41 -8
- package/dist/cli.js.map +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/package.json +2 -2
- package/ui/dist/assets/{index-CdGmP5z3.js → index-BEayMkoF.js} +2 -2
- package/ui/dist/assets/{index-TAgDqd5r.js → index-BxdAuPdU.js} +1 -1
- package/ui/dist/assets/{index-BJDWae5m.css → index-ndnQ4AES.css} +1 -1
- package/ui/dist/index.html +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-CgJxNhIT.js","assets/ruby-Cw6WdidG.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/latex-DGMBWnxU.js","assets/tex-CvyZ59Mk.js","assets/liquid-DYVedYrR.js","assets/marko-DZsq8hO1.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-D5oM4XIm.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-zxCyuUbr.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-ChbOoGGc.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Ti=Object.defineProperty;var Pi=Object.getPrototypeOf;var Oi=Reflect.get;var kn=t=>{throw TypeError(t)};var xi=(t,e,n)=>e in t?Ti(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var g=(t,e,n)=>xi(t,typeof e!="symbol"?e+"":e,n),It=(t,e,n)=>e.has(t)||kn("Cannot "+n);var F=(t,e,n)=>(It(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Q=(t,e,n,r)=>(It(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Rt=(t,e,n)=>(It(t,e,"access private method"),n);var Sn=(t,e,n)=>Oi(Pi(t),n,e);import{_ as c}from"./index-CdGmP5z3.js";let O=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Di(t){return ln(t)}function ln(t){return Array.isArray(t)?Ni(t):t instanceof RegExp?t:typeof t=="object"?$i(t):t}function Ni(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=ln(t[n]);return e}function $i(t){let e={};for(let n in t)e[n]=ln(t[n]);return e}function mr(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function gr(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?gr(t.substring(0,t.length-1)):t.substr(~e+1)}var Lt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ye=class{static hasCaptures(t){return t===null?!1:(Lt.lastIndex=0,Lt.test(t))}static replaceCaptures(t,e,n){return t.replace(Lt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function _r(t,e){return t<e?-1:t>e?1:0}function yr(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let o=_r(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function In(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Er(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var br=class{constructor(t){g(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ut=class{constructor(t,e,n){g(this,"_cachedMatchRoot",new br(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Gi(t),e)}static createFromParsedTheme(t,e){return Ui(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>Vi(t.parent,i.parentScopes));return r?new wr(r.fontStyle,r.foreground,r.background):null}},Tt=class ot{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new ot(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new ot(n,e[r]);return n}push(e){return new ot(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Vi(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Mi(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Mi(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var wr=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Gi(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&In(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&In(s.settings.background)&&(p=s.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),b=m[m.length-1],w=null;m.length>1&&(w=m.slice(0,m.length-1),w.reverse()),n[r++]=new Bi(b,w,i,l,u,p)}}return n}var Bi=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},G=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(G||{});function Ui(t,e){t.sort((l,u)=>{let p=_r(l.scope,u.scope);return p!==0||(p=yr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Fi(e),s=new wr(n,o.getId(r),o.getId(i)),a=new Hi(new Ht(0,null,-1,0,0),[]);for(let l=0,u=t.length;l<u;l++){let p=t[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new ut(o,s,a)}var Fi=class{constructor(t){g(this,"_isFrozen");g(this,"_lastColorId");g(this,"_id2color");g(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},ji=Object.freeze([]),Ht=class vr{constructor(e,n,r,i,o){g(this,"scopeDepth");g(this,"parentScopes");g(this,"fontStyle");g(this,"foreground");g(this,"background");this.scopeDepth=e,this.parentScopes=n||ji,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new vr(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Hi=class Wt{constructor(e,n=[],r={}){g(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Wt._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Wt(this._mainRule.clone(),Ht.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(e+1,u,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(yr(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Ht(e,n,r,i,o))}},Oe=class z{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=z.getLanguageId(e),r=z.getTokenType(e),i=z.getFontStyle(e),o=z.getForeground(e),s=z.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,o,s,a){let l=z.getLanguageId(e),u=z.getTokenType(e),p=z.containsBalancedBrackets(e)?1:0,d=z.getFontStyle(e),h=z.getForeground(e),f=z.getBackground(e);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),a!==0&&(f=a),(l<<0|u<<8|p<<10|d<<11|h<<15|f<<24)>>>0}};function ct(t,e){const n=[],r=Wi(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Rn(i)){const l=[];do l.push(i),i=r.next();while(Rn(i));return u=>e(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Rn(t){return!!t&&!!t.match(/[\w\.:]+/)}function Wi(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Cr(t){typeof t.dispose=="function"&&t.dispose()}var Ue=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},zi=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},qi=class{constructor(){g(this,"_references",[]);g(this,"_seenReferenceKeys",new Set);g(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Xi=class{constructor(t,e){g(this,"seenFullScopeRequests",new Set);g(this,"seenPartialScopeRequests",new Set);g(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ue(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new qi;for(const n of t)Ki(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof Ue){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Ki(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof Ue?st({baseGrammar:o,selfGrammar:i},r):zt(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const a of s)r.add(new Ue(a))}function zt(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];dt([r],e,n)}}function st(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&dt(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&dt(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function dt(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?mr({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&dt(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=Ar(o);switch(s.kind){case 0:st({...e,selfGrammar:e.baseGrammar},n);break;case 1:st(e,n);break;case 2:zt(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};s.kind===4?zt(s.ruleName,l,n):st(l,n)}else s.kind===4?n.add(new zi(s.scopeName,s.ruleName)):n.add(new Ue(s.scopeName));break}}}var Qi=class{constructor(){g(this,"kind",0)}},Ji=class{constructor(){g(this,"kind",1)}},Yi=class{constructor(t){g(this,"kind",2);this.ruleName=t}},Zi=class{constructor(t){g(this,"kind",3);this.scopeName=t}},eo=class{constructor(t,e){g(this,"kind",4);this.scopeName=t,this.ruleName=e}};function Ar(t){if(t==="$base")return new Qi;if(t==="$self")return new Ji;const e=t.indexOf("#");if(e===-1)return new Zi(t);if(e===0)return new Yi(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new eo(n,r)}}var to=/\\(\d+)/,Ln=/\\(\d+)/g,no=-1,kr=-2;var Ke=class{constructor(t,e,n,r){g(this,"$location");g(this,"id");g(this,"_nameIsCapturing");g(this,"_name");g(this,"_contentNameIsCapturing");g(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Ye.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ye.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${gr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Ye.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ye.replaceCaptures(this._contentName,t,e)}},ro=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,i);g(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,r,i){throw new Error("Not supported!")}},io=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,null);g(this,"_match");g(this,"captures");g(this,"_cachedCompiledPatterns");this._match=new Fe(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new je,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Tn=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,i);g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const r of this.patterns)e.getRule(r).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new je,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qt=class extends Ke{constructor(e,n,r,i,o,s,a,l,u,p){super(e,n,r,i);g(this,"_begin");g(this,"beginCaptures");g(this,"_end");g(this,"endHasBackReferences");g(this,"endCaptures");g(this,"applyEndPatternLast");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this._begin=new Fe(o,this.id),this.beginCaptures=s,this._end=new Fe(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=u||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e,n).compileAG(e,r,i)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new je;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},pt=class extends Ke{constructor(e,n,r,i,o,s,a,l,u){super(e,n,r,i);g(this,"_begin");g(this,"beginCaptures");g(this,"whileCaptures");g(this,"_while");g(this,"whileHasBackReferences");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");g(this,"_cachedCompiledWhilePatterns");this._begin=new Fe(o,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new Fe(a,kr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new je;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,r,i){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new je,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Sr=class M{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new ro(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new io(e.$vscodeTextmateLocation,e.id,e.name,e.match,M._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=mr({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new Tn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,M._compilePatterns(o,n,r))}return e.while?new pt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,M._compileCaptures(e.whileCaptures||e.captures,n,r),M._compilePatterns(e.patterns,n,r)):new qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,M._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,M._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;e[s].patterns&&(l=M.getCompiledRuleId(e[s],n,r)),i[a]=M.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l=-1;if(a.include){const u=Ar(a.include);switch(u.kind){case 0:case 1:l=M.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=M.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=n.getExternalGrammar(d,r);if(f)if(h){let m=f.repository[h];m&&(l=M.getCompiledRuleId(m,n,f.repository))}else l=M.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else l=M.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Tn||u instanceof qt||u instanceof pt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Fe=class Ir{constructor(e,n){g(this,"source");g(this,"ruleId");g(this,"hasAnchor");g(this,"hasBackReferences");g(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const u=e.charAt(a+1);u==="z"?(o.push(e.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=to.test(this.source):this.hasBackReferences=!1}clone(){return new Ir(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return Ln.lastIndex=0,this.source.replace(Ln,(i,o)=>Er(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):l==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},je=class{constructor(){g(this,"_items");g(this,"_hasAnchors");g(this,"_cached");g(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Pn(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new Pn(t,r,this._items.map(i=>i.ruleId))}},Pn=class{constructor(t,e,n){g(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
var Ti=Object.defineProperty;var Pi=Object.getPrototypeOf;var Oi=Reflect.get;var kn=t=>{throw TypeError(t)};var xi=(t,e,n)=>e in t?Ti(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var g=(t,e,n)=>xi(t,typeof e!="symbol"?e+"":e,n),It=(t,e,n)=>e.has(t)||kn("Cannot "+n);var F=(t,e,n)=>(It(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Q=(t,e,n,r)=>(It(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Rt=(t,e,n)=>(It(t,e,"access private method"),n);var Sn=(t,e,n)=>Oi(Pi(t),n,e);import{_ as c}from"./index-BEayMkoF.js";let O=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Di(t){return ln(t)}function ln(t){return Array.isArray(t)?Ni(t):t instanceof RegExp?t:typeof t=="object"?$i(t):t}function Ni(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=ln(t[n]);return e}function $i(t){let e={};for(let n in t)e[n]=ln(t[n]);return e}function mr(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function gr(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?gr(t.substring(0,t.length-1)):t.substr(~e+1)}var Lt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ye=class{static hasCaptures(t){return t===null?!1:(Lt.lastIndex=0,Lt.test(t))}static replaceCaptures(t,e,n){return t.replace(Lt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function _r(t,e){return t<e?-1:t>e?1:0}function yr(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let o=_r(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function In(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Er(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var br=class{constructor(t){g(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ut=class{constructor(t,e,n){g(this,"_cachedMatchRoot",new br(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Gi(t),e)}static createFromParsedTheme(t,e){return Ui(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>Vi(t.parent,i.parentScopes));return r?new wr(r.fontStyle,r.foreground,r.background):null}},Tt=class ot{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new ot(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new ot(n,e[r]);return n}push(e){return new ot(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Vi(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Mi(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Mi(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var wr=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Gi(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&In(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&In(s.settings.background)&&(p=s.settings.background);for(let d=0,h=a.length;d<h;d++){let m=a[d].trim().split(" "),b=m[m.length-1],w=null;m.length>1&&(w=m.slice(0,m.length-1),w.reverse()),n[r++]=new Bi(b,w,i,l,u,p)}}return n}var Bi=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},G=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(G||{});function Ui(t,e){t.sort((l,u)=>{let p=_r(l.scope,u.scope);return p!==0||(p=yr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Fi(e),s=new wr(n,o.getId(r),o.getId(i)),a=new Hi(new Ht(0,null,-1,0,0),[]);for(let l=0,u=t.length;l<u;l++){let p=t[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new ut(o,s,a)}var Fi=class{constructor(t){g(this,"_isFrozen");g(this,"_lastColorId");g(this,"_id2color");g(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},ji=Object.freeze([]),Ht=class vr{constructor(e,n,r,i,o){g(this,"scopeDepth");g(this,"parentScopes");g(this,"fontStyle");g(this,"foreground");g(this,"background");this.scopeDepth=e,this.parentScopes=n||ji,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new vr(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Hi=class Wt{constructor(e,n=[],r={}){g(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Wt._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Wt(this._mainRule.clone(),Ht.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(e+1,u,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(yr(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Ht(e,n,r,i,o))}},Oe=class z{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=z.getLanguageId(e),r=z.getTokenType(e),i=z.getFontStyle(e),o=z.getForeground(e),s=z.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,o,s,a){let l=z.getLanguageId(e),u=z.getTokenType(e),p=z.containsBalancedBrackets(e)?1:0,d=z.getFontStyle(e),h=z.getForeground(e),f=z.getBackground(e);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),a!==0&&(f=a),(l<<0|u<<8|p<<10|d<<11|h<<15|f<<24)>>>0}};function ct(t,e){const n=[],r=Wi(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Rn(i)){const l=[];do l.push(i),i=r.next();while(Rn(i));return u=>e(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Rn(t){return!!t&&!!t.match(/[\w\.:]+/)}function Wi(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Cr(t){typeof t.dispose=="function"&&t.dispose()}var Ue=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},zi=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},qi=class{constructor(){g(this,"_references",[]);g(this,"_seenReferenceKeys",new Set);g(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Xi=class{constructor(t,e){g(this,"seenFullScopeRequests",new Set);g(this,"seenPartialScopeRequests",new Set);g(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ue(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new qi;for(const n of t)Ki(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof Ue){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Ki(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof Ue?st({baseGrammar:o,selfGrammar:i},r):zt(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const a of s)r.add(new Ue(a))}function zt(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];dt([r],e,n)}}function st(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&dt(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&dt(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function dt(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?mr({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&dt(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=Ar(o);switch(s.kind){case 0:st({...e,selfGrammar:e.baseGrammar},n);break;case 1:st(e,n);break;case 2:zt(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};s.kind===4?zt(s.ruleName,l,n):st(l,n)}else s.kind===4?n.add(new zi(s.scopeName,s.ruleName)):n.add(new Ue(s.scopeName));break}}}var Qi=class{constructor(){g(this,"kind",0)}},Ji=class{constructor(){g(this,"kind",1)}},Yi=class{constructor(t){g(this,"kind",2);this.ruleName=t}},Zi=class{constructor(t){g(this,"kind",3);this.scopeName=t}},eo=class{constructor(t,e){g(this,"kind",4);this.scopeName=t,this.ruleName=e}};function Ar(t){if(t==="$base")return new Qi;if(t==="$self")return new Ji;const e=t.indexOf("#");if(e===-1)return new Zi(t);if(e===0)return new Yi(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new eo(n,r)}}var to=/\\(\d+)/,Ln=/\\(\d+)/g,no=-1,kr=-2;var Ke=class{constructor(t,e,n,r){g(this,"$location");g(this,"id");g(this,"_nameIsCapturing");g(this,"_name");g(this,"_contentNameIsCapturing");g(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=Ye.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ye.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${gr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Ye.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ye.replaceCaptures(this._contentName,t,e)}},ro=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,i);g(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,r,i){throw new Error("Not supported!")}},io=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,null);g(this,"_match");g(this,"captures");g(this,"_cachedCompiledPatterns");this._match=new Fe(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new je,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Tn=class extends Ke{constructor(e,n,r,i,o){super(e,n,r,i);g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const r of this.patterns)e.getRule(r).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new je,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qt=class extends Ke{constructor(e,n,r,i,o,s,a,l,u,p){super(e,n,r,i);g(this,"_begin");g(this,"beginCaptures");g(this,"_end");g(this,"endHasBackReferences");g(this,"endCaptures");g(this,"applyEndPatternLast");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");this._begin=new Fe(o,this.id),this.beginCaptures=s,this._end=new Fe(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=u||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e,n).compileAG(e,r,i)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new je;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},pt=class extends Ke{constructor(e,n,r,i,o,s,a,l,u){super(e,n,r,i);g(this,"_begin");g(this,"beginCaptures");g(this,"whileCaptures");g(this,"_while");g(this,"whileHasBackReferences");g(this,"hasMissingPatterns");g(this,"patterns");g(this,"_cachedCompiledPatterns");g(this,"_cachedCompiledWhilePatterns");this._begin=new Fe(o,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new Fe(a,kr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new je;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,r,i){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new je,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Sr=class M{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new ro(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new io(e.$vscodeTextmateLocation,e.id,e.name,e.match,M._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=mr({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new Tn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,M._compilePatterns(o,n,r))}return e.while?new pt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,M._compileCaptures(e.whileCaptures||e.captures,n,r),M._compilePatterns(e.patterns,n,r)):new qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,M._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,M._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,M._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;e[s].patterns&&(l=M.getCompiledRuleId(e[s],n,r)),i[a]=M.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const a=e[o];let l=-1;if(a.include){const u=Ar(a.include);switch(u.kind){case 0:case 1:l=M.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=M.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,f=n.getExternalGrammar(d,r);if(f)if(h){let m=f.repository[h];m&&(l=M.getCompiledRuleId(m,n,f.repository))}else l=M.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else l=M.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Tn||u instanceof qt||u instanceof pt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Fe=class Ir{constructor(e,n){g(this,"source");g(this,"ruleId");g(this,"hasAnchor");g(this,"hasBackReferences");g(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const u=e.charAt(a+1);u==="z"?(o.push(e.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=to.test(this.source):this.hasBackReferences=!1}clone(){return new Ir(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return Ln.lastIndex=0,this.source.replace(Ln,(i,o)=>Er(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),e[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):l==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},je=class{constructor(){g(this,"_items");g(this,"_hasAnchors");g(this,"_cached");g(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Pn(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new Pn(t,r,this._items.map(i=>i.ruleId))}},Pn=class{constructor(t,e,n){g(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Pt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},oe,oo=(oe=class{constructor(e,n){g(this,"_defaultAttributes");g(this,"_embeddedLanguagesMatcher");g(this,"_getBasicScopeAttributes",new br(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Pt(n,r)}));this._defaultAttributes=new Pt(e,8),this._embeddedLanguagesMatcher=new so(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?oe._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(oe.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},g(oe,"_NULL_SCOPE_METADATA",new Pt(0,0)),g(oe,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),oe),so=class{constructor(t){g(this,"values");g(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Er(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},On=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Rr(t,e,n,r,i,o,s,a){const l=e.content.length;let u=!1,p=-1;if(s){const f=ao(t,e,n,r,i,o);i=f.stack,r=f.linePos,n=f.isFirstLine,p=f.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new On(i,!0);h()}return new On(i,!1);function h(){const f=lo(t,e,n,r,i,p);if(!f){o.produce(i,l),u=!0;return}const m=f.captureIndices,b=f.matchedRuleId,w=m&&m.length>0?m[0].end>r:!1;if(b===no){const E=i.getRule(t);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Me(t,e,n,i,o,E.endCaptures,m),o.produce(i,m[0].end);const v=i;if(i=i.parent,p=v.getAnchorPos(),!w&&v.getEnterPos()===r){i=v,o.produce(i,l),u=!0;return}}else{const E=t.getRule(b);o.produce(i,m[0].start);const v=i,_=E.getName(e.content,m),C=i.contentNameScopesList.pushAttributed(_,t);if(i=i.push(b,r,p,m[0].end===l,null,C,C),E instanceof qt){const A=E;Me(t,e,n,i,o,A.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const R=A.getContentName(e.content,m),I=C.pushAttributed(R,t);if(i=i.withContentNameScopesList(I),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(e.content,m))),!w&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(E instanceof pt){const A=E;Me(t,e,n,i,o,A.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const R=A.getContentName(e.content,m),I=C.pushAttributed(R,t);if(i=i.withContentNameScopesList(I),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(e.content,m))),!w&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Me(t,e,n,i,o,E.captures,m),o.produce(i,m[0].end),i=i.pop(),!w){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function ao(t,e,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(t);u instanceof pt&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=po(l.rule,t,l.stack.endRule,n,r===s),d=u.findNextMatchSync(e,r,p);if(d){if(d.ruleId!==kr){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Me(t,e,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function lo(t,e,n,r,i,o){const s=uo(t,e,n,r,i,o),a=t.getInjections();if(a.length===0)return s;const l=co(a,t,e,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p<u||l.priorityMatch&&p===u?l:s}function uo(t,e,n,r,i,o){const s=i.getRule(t),{ruleScanner:a,findOptions:l}=Lr(s,t,i.endRule,n,r===o),u=a.findNextMatchSync(e,r,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function co(t,e,n,r,i,o,s){let a=Number.MAX_VALUE,l=null,u,p=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,f=t.length;h<f;h++){const m=t[h];if(!m.matcher(d))continue;const b=e.getRule(m.ruleId),{ruleScanner:w,findOptions:E}=Lr(b,e,null,r,i===s),v=w.findNextMatchSync(n,i,E);if(!v)continue;const _=v.captureIndices[0].start;if(!(_>=a)&&(a=_,l=v.captureIndices,u=v.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function Lr(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function po(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function Me(t,e,n,r,i,o,s){if(o.length===0)return;const a=e.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;d<l;d++){const h=o[d];if(h===null)continue;const f=s[d];if(f.length===0)continue;if(f.start>p)break;for(;u.length>0&&u[u.length-1].endPos<=f.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,f.start):i.produce(r,f.start),h.retokenizeCapturedWithRuleId){const b=h.getName(a,s),w=r.contentNameScopesList.pushAttributed(b,t),E=h.getContentName(a,s),v=w.pushAttributed(E,t),_=r.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,w,v),C=t.createOnigString(a.substring(0,f.end));Rr(t,C,n&&f.start===0,f.start,_,i,!1,0),Cr(C);continue}const m=h.getName(a,s);if(m!==null){const w=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,t);u.push(new ho(w,f.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ho=class{constructor(t,e){g(this,"scopes");g(this,"endPos");this.scopes=t,this.endPos=e}};function fo(t,e,n,r,i,o,s,a){return new go(t,e,n,r,i,o,s,a)}function xn(t,e,n,r,i){const o=ct(e,ht),s=Sr.getCompiledRuleId(n,r,i.repository);for(const a of o)t.push({debugSelector:e,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function ht(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(mo(e[i],r))return n=i+1,!0;return!1})}function mo(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var go=class{constructor(t,e,n,r,i,o,s,a){g(this,"_rootId");g(this,"_lastRuleId");g(this,"_ruleId2desc");g(this,"_includedGrammars");g(this,"_grammarRepository");g(this,"_grammar");g(this,"_injections");g(this,"_basicScopeAttributesProvider");g(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new oo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Dn(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=ct(l,ht);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)xn(e,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&xn(e,l,a,this,a)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Dn(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Sr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Xt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=Oe.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=Ge.createRootAndLookUpScopeName(h,d,this):f=Ge.createRoot("unknown",d),e=new Xt(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),s=o.content.length,a=new yo(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Rr(this,o,i,0,e,a,!0,r);return Cr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Dn(t,e){return t=Di(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Ge=class Z{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=(e==null?void 0:e.scopePath)??null;for(const o of n)i=Tt.push(i,o.scopeNames),r=new Z(r,i,o.encodedTokenAttributes);return r}static createRoot(e,n){return new Z(null,new Tt(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),o=new Tt(null,e),s=r.themeProvider.themeMatch(o),a=Z.mergeAttributes(n,i,s);return new Z(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return Z.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),Oe.set(e,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return Z._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const o of r)i=Z._pushAttributed(i,o,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),o=e.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=Z.mergeAttributes(e.tokenAttributes,i,s);return new Z(e,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===e?n.reverse():void 0}},q,Xt=(q=class{constructor(e,n,r,i,o,s,a,l){g(this,"_stackElementBrand");g(this,"_enterPos");g(this,"_anchorPos");g(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:q._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Ge.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){q._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,o,s,a){return new q(this,e,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var r,i;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new q(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const r=Ge.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new q(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ge.fromExtension(r,n.contentNameScopesList))}},g(q,"NULL",new q(null,0,0,0,!1,null,null,null)),q),_o=class{constructor(t,e){g(this,"balancedBracketScopes");g(this,"unbalancedBracketScopes");g(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ct(n,ht).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ct(n,ht).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},yo=class{constructor(t,e,n,r){g(this,"_emitBinaryTokens");g(this,"_lineText");g(this,"_tokens");g(this,"_binaryTokens");g(this,"_lastTokenEndIndex");g(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(s)&&(i=Oe.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Oe.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},Eo=class{constructor(t,e){g(this,"_grammars",new Map);g(this,"_rawGrammars",new Map);g(this,"_injectionGrammars",new Map);g(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,fo(t,o,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},bo=class{constructor(e){g(this,"_options");g(this,"_syncRegistry");g(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Eo(ut.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(ut.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new _o(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,o){const s=new Xi(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(e,n,r,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,o)}},Kt=Xt.NULL;const wo=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Qe{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Qe.prototype.normal={};Qe.prototype.property={};Qe.prototype.space=void 0;function Tr(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Qe(n,r,e)}function Qt(t){return t.toLowerCase()}class j{constructor(e,n){this.attribute=n,this.property=e}}j.prototype.attribute="";j.prototype.booleanish=!1;j.prototype.boolean=!1;j.prototype.commaOrSpaceSeparated=!1;j.prototype.commaSeparated=!1;j.prototype.defined=!1;j.prototype.mustUseProperty=!1;j.prototype.number=!1;j.prototype.overloadedBoolean=!1;j.prototype.property="";j.prototype.spaceSeparated=!1;j.prototype.space=void 0;let vo=0;const S=Ce(),P=Ce(),Jt=Ce(),y=Ce(),L=Ce(),Te=Ce(),H=Ce();function Ce(){return 2**++vo}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:S,booleanish:P,commaOrSpaceSeparated:H,commaSeparated:Te,number:y,overloadedBoolean:Jt,spaceSeparated:L},Symbol.toStringTag,{value:"Module"})),Ot=Object.keys(Yt);class un extends j{constructor(e,n,r,i){let o=-1;if(super(e,n),Nn(this,"space",i),typeof r=="number")for(;++o<Ot.length;){const s=Ot[o];Nn(this,Ot[o],(r&Yt[s])===Yt[s])}}}un.prototype.defined=!0;function Nn(t,e,n){n&&(t[e]=n)}function xe(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const o=new un(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Qt(r)]=r,n[Qt(o.attribute)]=r}return new Qe(e,n,t.space)}const Pr=xe({properties:{ariaActiveDescendant:null,ariaAtomic:P,ariaAutoComplete:null,ariaBusy:P,ariaChecked:P,ariaColCount:y,ariaColIndex:y,ariaColSpan:y,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:P,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:P,ariaFlowTo:L,ariaGrabbed:P,ariaHasPopup:null,ariaHidden:P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:y,ariaLive:null,ariaModal:P,ariaMultiLine:P,ariaMultiSelectable:P,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:y,ariaPressed:P,ariaReadOnly:P,ariaRelevant:null,ariaRequired:P,ariaRoleDescription:L,ariaRowCount:y,ariaRowIndex:y,ariaRowSpan:y,ariaSelected:P,ariaSetSize:y,ariaSort:null,ariaValueMax:y,ariaValueMin:y,ariaValueNow:y,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Or(t,e){return e in t?t[e]:e}function xr(t,e){return Or(t,e.toLowerCase())}const Co=xe({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Te,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:S,allowPaymentRequest:S,allowUserMedia:S,alt:null,as:null,async:S,autoCapitalize:null,autoComplete:L,autoFocus:S,autoPlay:S,blocking:L,capture:null,charSet:null,checked:S,cite:null,className:L,cols:y,colSpan:null,content:null,contentEditable:P,controls:S,controlsList:L,coords:y|Te,crossOrigin:null,data:null,dateTime:null,decoding:null,default:S,defer:S,dir:null,dirName:null,disabled:S,download:Jt,draggable:P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:S,formTarget:null,headers:L,height:y,hidden:Jt,high:y,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:S,inputMode:null,integrity:null,is:null,isMap:S,itemId:null,itemProp:L,itemRef:L,itemScope:S,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:S,low:y,manifest:null,max:null,maxLength:y,media:null,method:null,min:null,minLength:y,multiple:S,muted:S,name:null,nonce:null,noModule:S,noValidate:S,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:S,optimum:y,pattern:null,ping:L,placeholder:null,playsInline:S,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:S,referrerPolicy:null,rel:L,required:S,reversed:S,rows:y,rowSpan:y,sandbox:L,scope:null,scoped:S,seamless:S,selected:S,shadowRootClonable:S,shadowRootDelegatesFocus:S,shadowRootMode:null,shape:null,size:y,sizes:null,slot:null,span:y,spellCheck:P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y,step:null,style:null,tabIndex:y,target:null,title:null,translate:null,type:null,typeMustMatch:S,useMap:null,value:P,width:y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:y,borderColor:null,bottomMargin:y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:S,declare:S,event:null,face:null,frame:null,frameBorder:null,hSpace:y,leftMargin:y,link:null,longDesc:null,lowSrc:null,marginHeight:y,marginWidth:y,noResize:S,noHref:S,noShade:S,noWrap:S,object:null,profile:null,prompt:null,rev:null,rightMargin:y,rules:null,scheme:null,scrolling:P,standby:null,summary:null,text:null,topMargin:y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:S,disableRemotePlayback:S,prefix:null,property:null,results:y,security:null,unselectable:null},space:"html",transform:xr}),Ao=xe({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:H,accentHeight:y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y,amplitude:y,arabicForm:null,ascent:y,attributeName:null,attributeType:null,azimuth:y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y,by:null,calcMode:null,capHeight:y,className:L,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:y,diffuseConstant:y,direction:null,display:null,dur:null,divisor:y,dominantBaseline:null,download:S,dx:null,dy:null,edgeMode:null,editable:null,elevation:y,enableBackground:null,end:null,event:null,exponent:y,externalResourcesRequired:null,fill:null,fillOpacity:y,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:Te,g2:Te,glyphName:Te,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y,horizOriginX:y,horizOriginY:y,id:null,ideographic:y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y,k:y,k1:y,k2:y,k3:y,k4:y,kernelMatrix:H,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:y,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:y,overlineThickness:y,paintOrder:null,panose1:null,path:null,pathLength:y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y,pointsAtY:y,pointsAtZ:y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:H,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:H,rev:H,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:H,requiredFeatures:H,requiredFonts:H,requiredFormats:H,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:y,specularExponent:y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y,strikethroughThickness:y,string:null,stroke:null,strokeDashArray:H,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y,strokeOpacity:y,strokeWidth:null,style:null,surfaceScale:y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:H,tabIndex:y,tableValues:null,target:null,targetX:y,targetY:y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:H,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y,underlineThickness:y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y,values:null,vAlphabetic:y,vMathematical:y,vectorEffect:null,vHanging:y,vIdeographic:y,version:null,vertAdvY:y,vertOriginX:y,vertOriginY:y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Or}),Dr=xe({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Nr=xe({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xr}),$r=xe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),ko=/[A-Z]/g,$n=/-[a-z]/g,So=/^data[-\w.:]+$/i;function Io(t,e){const n=Qt(e);let r=e,i=j;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&So.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace($n,Lo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!$n.test(o)){let s=o.replace(ko,Ro);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=un}return new i(r,e)}function Ro(t){return"-"+t.toLowerCase()}function Lo(t){return t.charAt(1).toUpperCase()}const To=Tr([Pr,Co,Dr,Nr,$r],"html"),Vr=Tr([Pr,Ao,Dr,Nr,$r],"svg"),Vn={}.hasOwnProperty;function Po(t,e){const n=e||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Vn.call(i,t)){const l=String(i[t]);s=Vn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Oo=/["&'<>`]/g,xo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Do=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,No=/[|\\{}()[\]^$+*?.]/g,Mn=new WeakMap;function $o(t,e){if(t=t.replace(e.subset?Vo(e.subset):Oo,r),e.subset||e.escapeOnly)return t;return t.replace(xo,n).replace(Do,r);function n(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function Vo(t){let e=Mn.get(t);return e||(e=Mo(t),Mn.set(t,e)),e}function Mo(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(No,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Go=/[\dA-Fa-f]/;function Bo(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Go.test(String.fromCharCode(e))?r:r+";"}const Uo=/\d/;function Fo(t,e,n){const r="&#"+String(t);return n&&e&&!Uo.test(String.fromCharCode(e))?r:r+";"}const jo=["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"],xt={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Ho=["cent","copy","divide","gt","lt","not","para","times"],Mr={}.hasOwnProperty,Zt={};let Ze;for(Ze in xt)Mr.call(xt,Ze)&&(Zt[xt[Ze]]=Ze);const Wo=/[^\dA-Za-z]/;function zo(t,e,n,r){const i=String.fromCharCode(t);if(Mr.call(Zt,i)){const o=Zt[i],s="&"+o;return n&&jo.includes(o)&&!Ho.includes(o)&&(!r||e&&e!==61&&Wo.test(String.fromCharCode(e)))?s:s+";"}return""}function qo(t,e,n){let r=Bo(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=zo(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Fo(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Pe(t,e){return $o(t,Object.assign({format:qo},e))}const Xo=/^>|^->|<!--|-->|--!>|<!-$/g,Ko=[">"],Qo=["<",">"];function Jo(t,e,n,r){return r.settings.bogusComments?"<?"+Pe(t.value,Object.assign({},r.settings.characterReferences,{subset:Ko}))+">":"<!--"+t.value.replace(Xo,i)+"-->";function i(o){return Pe(o,Object.assign({},r.settings.characterReferences,{subset:Qo}))}}function Yo(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Gn(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function Zo(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function es(t){return t.join(" ").trim()}const ts=/[ \t\n\f\r]/g;function cn(t){return typeof t=="object"?t.type==="text"?Bn(t.value):!1:Bn(t)}function Bn(t){return t.replace(ts,"")===""}const N=Br(1),Gr=Br(-1),ns=[];function Br(t){return e;function e(n,r,i){const o=n?n.children:ns;let s=(r||0)+t,a=o[s];if(!i)for(;a&&cn(a);)s+=t,a=o[s];return a}}const rs={}.hasOwnProperty;function Ur(t){return e;function e(n,r,i){return rs.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const dn=Ur({body:os,caption:Dt,colgroup:Dt,dd:us,dt:ls,head:Dt,html:is,li:as,optgroup:cs,option:ds,p:ss,rp:Un,rt:Un,tbody:hs,td:Fn,tfoot:fs,th:Fn,thead:ps,tr:ms});function Dt(t,e,n){const r=N(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&cn(r.value.charAt(0)))}function is(t,e,n){const r=N(n,e);return!r||r.type!=="comment"}function os(t,e,n){const r=N(n,e);return!r||r.type!=="comment"}function ss(t,e,n){const r=N(n,e);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 as(t,e,n){const r=N(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ls(t,e,n){const r=N(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function us(t,e,n){const r=N(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Un(t,e,n){const r=N(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function cs(t,e,n){const r=N(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function ds(t,e,n){const r=N(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ps(t,e,n){const r=N(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function hs(t,e,n){const r=N(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function fs(t,e,n){return!N(n,e)}function ms(t,e,n){const r=N(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Fn(t,e,n){const r=N(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const gs=Ur({body:Es,colgroup:bs,head:ys,html:_s,tbody:ws});function _s(t){const e=N(t,-1);return!e||e.type!=="comment"}function ys(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Es(t){const e=N(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&cn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function bs(t,e,n){const r=Gr(n,e),i=N(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ws(t,e,n){const r=Gr(n,e),i=N(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const et={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|