MCPcopy
hub / github.com/AstrBotDevs/AstrBot / processQueue

Method processQueue

astrbot/core/utils/t2i/template/shiki_runtime.iife.js:1–1  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1var dl=Object.defineProperty;var gl=Object.getPrototypeOf;var bl=Reflect.get;var ds=k=>{throw TypeError(k)};var hl=(k,q,N)=>q in k?dl(k,q,{enumerable:!0,configurable:!0,writable:!0,value:N}):k[q]=N;var b=(k,q,N)=>hl(k,typeof q!="symbol"?q+"":q,N),pt=(k,q,N)=>q.has(k)||ds("Cannot "+N);var O=(k,q,N)=>(pt(k,q,"read from private field"),N?N.call(k):q.get(k)),xe=(k,q,N)=>q.has(k)?ds("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(k):q.set(k,N),Y=(k,q,N,Xe)=>(pt(k,q,"write to private field"),Xe?Xe.call(k,N):q.set(k,N),N),dt=(k,q,N)=>(pt(k,q,"access private method"),N);var gs=(k,q,N)=>bl(gl(k),N,q);(function(){"use strict";var te,W,le,ae,_e,ue,$e,Ve,bt,me;let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function q(n){return N(n)}function N(n){return Array.isArray(n)?Xe(n):n instanceof RegExp?n:typeof n=="object"?fs(n):n}function Xe(n){let e=[];for(let t=0,a=n.length;t<a;t++)e[t]=N(n[t]);return e}function fs(n){let e={};for(let t in n)e[t]=N(n[t]);return e}function ht(n,...e){return e.forEach(t=>{for(let a in t)n[a]=t[a]}),n}function ft(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?ft(n.substring(0,n.length-1)):n.substr(~e+1)}var wn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ye=class{static hasCaptures(n){return n===null?!1:(wn.lastIndex=0,wn.test(n))}static replaceCaptures(n,e,t){return n.replace(wn,(a,s,i,r)=>{let c=t[parseInt(s||i,10)];if(c){let o=e.substring(c.start,c.end);for(;o[0]===".";)o=o.substring(1);switch(r){case"downcase":return o.toLowerCase();case"upcase":return o.toUpperCase();default:return o}}else return a})}};function yt(n,e){return n<e?-1:n>e?1:0}function _t(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,a=e.length;if(t===a){for(let s=0;s<t;s++){let i=yt(n[s],e[s]);if(i!==0)return i}return 0}return t-a}function $t(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function xt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var wt=class{constructor(n){b(this,"cache",new Map);this.fn=n}get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},Je=class{constructor(n,e,t){b(this,"_cachedMatchRoot",new wt(n=>this._root.match(n)));this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme($s(n),e)}static createFromParsedTheme(n,e){return ws(n,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,a=this._cachedMatchRoot.get(e).find(s=>ys(n.parent,s.parentScopes));return a?new kt(a.fontStyle,a.foreground,a.background):null}},kn=class xn{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const a of t)e=new xn(e,a);return e}static from(...e){let t=null;for(let a=0;a<e.length;a++)t=new xn(t,e[a]);return t}push(e){return new xn(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let a=this;for(;a&&a!==e;)t.push(a.scopeName),a=a.parent;return a===e?t.reverse():void 0}};function ys(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let a=e[t],s=!1;if(a===">"){if(t===e.length-1)return!1;a=e[++t],s=!0}for(;n&&!_s(n.scopeName,a);){if(s)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function _s(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var kt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function $s(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],a=0;for(let s=0,i=e.length;s<i;s++){let r=e[s];if(!r.settings)continue;let c;if(typeof r.scope=="string"){let m=r.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(r.scope)?c=r.scope:c=[""];let o=-1;if(typeof r.settings.fontStyle=="string"){o=0;let m=r.settings.fontStyle.split(" ");for(let p=0,g=m.length;p<g;p++)switch(m[p]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break;case"strikethrough":o=o|8;break}}let l=null;typeof r.settings.foreground=="string"&&$t(r.settings.foreground)&&(l=r.settings.foreground);let u=null;typeof r.settings.background=="string"&&$t(r.settings.background)&&(u=r.settings.background);for(let m=0,p=c.length;m<p;m++){let d=c[m].trim().split(" "),f=d[d.length-1],$=null;d.length>1&&($=d.slice(0,d.length-1),$.reverse()),t[a++]=new xs(f,$,s,o,l,u)}}return t}var xs=class{constructor(n,e,t,a,s,i){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=a,this.foreground=s,this.background=i}},z=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(z||{});function ws(n,e){n.sort((o,l)=>{let u=yt(o.scope,l.scope);return u!==0||(u=_t(o.parentScopes,l.parentScopes),u!==0)?u:o.index-l.index});let t=0,a="#000000",s="#ffffff";for(;n.length>=1&&n[0].scope==="";){let o=n.shift();o.fontStyle!==-1&&(t=o.fontStyle),o.foreground!==null&&(a=o.foreground),o.background!==null&&(s=o.background)}let i=new ks(e),r=new kt(t,i.getId(a),i.getId(s)),c=new vs(new jn(0,null,-1,0,0),[]);for(let o=0,l=n.length;o<l;o++){let u=n[o];c.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Je(i,r,c)}var ks=class{constructor(n){b(this,"_isFrozen");b(this,"_lastColorId");b(this,"_id2color");b(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},js=Object.freeze([]),jn=class bs{constructor(e,t,a,s,i){b(this,"scopeDepth");b(this,"parentScopes");b(this,"fontStyle");b(this,"foreground");b(this,"background");this.scopeDepth=e,this.parentScopes=t||js,this.fontStyle=a,this.foreground=s,this.background=i}clone(){return new bs(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let a=0,s=e.length;a<s;a++)t[a]=e[a].clone();return t}acceptOverwrite(e,t,a,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),a!==0&&(this.foreground=a),s!==0&&(this.background=s)}},vs=class gt{constructor(e,t=[],a={}){b(this,"_rulesWithParentScopes");this._mainRule=e,this._children=a,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let a=0,s=0;for(;e.parentScopes[a]===">"&&a++,t.parentScopes[s]===">"&&s++,!(a>=e.parentScopes.length||s>=t.parentScopes.length);){const i=t.parentScopes[s].length-e.parentScopes[a].length;if(i!==0)return i;a++,s++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let a=e.indexOf("."),s,i;if(a===-1?(s=e,i=""):(s=e.substring(0,a),i=e.substring(a+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(gt._cmpBySpecificity),t}insert(e,t,a,s,i,r){if(t===""){this._doInsertHere(e,a,s,i,r);return}let c=t.indexOf("."),o,l;c===-1?(o=t,l=""):(o=t.substring(0,c),l=t.substring(c+1));let u;this._children.hasOwnProperty(o)?u=this._children[o]:(u=new gt(this._mainRule.clone(),jn.cloneArr(this._rulesWithParentScopes)),this._children[o]=u),u.insert(e+1,l,a,s,i,r)}_doInsertHere(e,t,a,s,i){if(t===null){this._mainRule.acceptOverwrite(e,a,s,i);return}for(let r=0,c=this._rulesWithParentScopes.length;r<c;r++){let o=this._rulesWithParentScopes[r];if(_t(o.parentScopes,t)===0){o.acceptOverwrite(e,a,s,i);return}}a===-1&&(a=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new jn(e,t,a,s,i))}},we=class V{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=V.getLanguageId(e),a=V.getTokenType(e),s=V.getFontStyle(e),i=V.getForeground(e),r=V.getBackground(e);console.log({languageId:t,tokenType:a,fontStyle:s,foreground:i,background:r})}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,t,a,s,i,r,c){let o=V.getLanguageId(e),l=V.getTokenType(e),u=V.containsBalancedBrackets(e)?1:0,m=V.getFontStyle(e),p=V.getForeground(e),g=V.getBackground(e);return t!==0&&(o=t),a!==8&&(l=a),s!==null&&(u=s?1:0),i!==-1&&(m=i),r!==0&&(p=r),c!==0&&(g=c),(o<<0|l<<8|u<<10|m<<11|p<<15|g<<24)>>>0}};function fl(n){return n}function yl(n){return n}function Qe(n,e){const t=[],a=Cs(n);let s=a.next();for(;s!==null;){let o=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":o=1;break;case"L":o=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=a.next()}let l=r();if(t.push({matcher:l,priority:o}),s!==",")break;s=a.next()}return t;function i(){if(s==="-"){s=a.next();const o=i();return l=>!!o&&!o(l)}if(s==="("){s=a.next();const o=c();return s===")"&&(s=a.next()),o}if(jt(s)){const o=[];do o.push(s),s=a.next();while(jt(s));return l=>e(o,l)}return null}function r(){const o=[];let l=i();for(;l;)o.push(l),l=i();return u=>o.every(m=>m(u))}function c(){const o=[];let l=r();for(;l&&(o.push(l),s==="|"||s===",");){do s=a.next();while(s==="|"||s===",");l=r()}return u=>o.some(m=>m(u))}}function jt(n){return!!n&&!!n.match(/[\w\.:]+/)}function Cs(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const a=t[0];return t=e.exec(n),a}}}function vt(n){typeof n.dispose=="function"&&n.dispose()}var Re=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},Ss=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Es=class{constructor(){b(this,"_references",[]);b(this,"_seenReferenceKeys",new Set);b(this,"visitedRule",new Set)}get references(){return this._references}add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},qs=class{constructor(n,e){b(this,"seenFullScopeRequests",new Set);b(this,"seenPartialScopeRequests",new Set);b(this,"Q");this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Re(this.initialScopeName)]}processQueue(){const n=this.Q;this.Q=[];const e=new Es;for(const t of n)As(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof Re){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function As(n,e,t,a){const s=t.lookup(n.scopeName);if(!s){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof Re?Ke({baseGrammar:i,selfGrammar:s},a):vn(n.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},a);const r=t.injections(n.scopeName);if(r)for(const c of r)a.add(new Re(c))}function vn(n,e,t){if(e.repository&&e.repository[n]){const a=e.repository[n];en([a],e,t)}}function Ke(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&en(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&en(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function en(n,e,t){for(const a of n){if(t.visitedRule.has(a))continue;t.visitedRule.add(a);const s=a.repository?ht({},e.repository,a.repository):e.repository;Array.isArray(a.patterns)&&en(a.patterns,{...e,repository:s},t);const i=a.include;if(!i)continue;const r=Ct(i);switch(r.kind){case 0:Ke({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ke(e,t);break;case 2:vn(r.ruleName,{...e,repository:s},t);break;case 3:case 4:const c=r.scopeName===e.selfGrammar.scopeName?e.selfGrammar:r.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const o={baseGrammar:e.baseGrammar,selfGrammar:c,repository:s};r.kind===4?vn(r.ruleName,o,t):Ke(o,t)}else r.kind===4?t.add(new Ss(r.scopeName,r.ruleName)):t.add(new Re(r.scopeName));break}}}var Ns=class{constructor(){b(this,"kind",0)}},Fs=class{constructor(){b(this,"kind",1)}},Bs=class{constructor(n){b(this,"kind",2);this.ruleName=n}},Gs=class{constructor(n){b(this,"kind",3);this.scopeName=n}},Is=class{constructor(n,e){b(this,"kind",4);this.scopeName=n,this.ruleName=e}};function Ct(n){if(n==="$base")return new Ns;if(n==="$self")return new Fs;const e=n.indexOf("#");if(e===-1)return new Gs(n);if(e===0)return new Bs(n.substring(1));{const t=n.substring(0,e),a=n.substring(e+1);return new Is(t,a)}}var Rs=/\\(\d+)/,St=/\\(\d+)/g,Ps=-1,Et=-2;function _l(n){return n}function $l(n){return n}var Pe=class{constructor(n,e,t,a){b(this,"$location");b(this,"id");b(this,"_nameIsCapturing");b(this,"_name");b(this,"_contentNameIsCapturing");b(this,"_contentName");this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=Ye.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=Ye.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${ft(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:Ye.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ye.replaceCaptures(this._contentName,n,e)}},zs=class extends Pe{constructor(e,t,a,s,i){super(e,t,a,s);b(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,a,s){throw new Error("Not supported!")}},Ls=class extends Pe{constructor(e,t,a,s,i){super(e,t,a,null);b(this,"_match");b(this,"captures");b(this,"_cachedCompiledPatterns");this._match=new ze(s,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qt=class extends Pe{constructor(e,t,a,s,i){super(e,t,a,s);b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const a of this.patterns)e.getRule(a).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Le,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Cn=class extends Pe{constructor(e,t,a,s,i,r,c,o,l,u){super(e,t,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"_end");b(this,"endHasBackReferences");b(this,"endCaptures");b(this,"applyEndPatternLast");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");this._begin=new ze(i,this.id),this.beginCaptures=r,this._end=new ze(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,a,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,a,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Le;for(const a of this.patterns)e.getRule(a).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},nn=class extends Pe{constructor(e,t,a,s,i,r,c,o,l){super(e,t,a,s);b(this,"_begin");b(this,"beginCaptures");b(this,"whileCaptures");b(this,"_while");b(this,"whileHasBackReferences");b(this,"hasMissingPatterns");b(this,"patterns");b(this,"_cachedCompiledPatterns");b(this,"_cachedCompiledWhilePatterns");this._begin=new ze(i,this.id),this.beginCaptures=r,this.whileCaptures=o,this._while=new ze(c,Et),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,a,s){return this._getCachedCompiledPatterns(e).compileAG(e,a,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Le;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,a,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,a,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Le,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},At=class L{static createCaptureRule(e,t,a,s,i){return e.registerRule(r=>new zs(t,r,a,s,i))}static getCompiledRuleId(e,t,a){return e.id||t.registerRule(s=>{if(e.id=s,e.match)return new Ls(e.$vscodeTextmateLocation,e.id,e.name,e.match,L._compileCaptures(e.captures,t,a));if(typeof e.begin=="undefined"){e.repository&&(a=ht({},a,e.repository));let i=e.patterns;return typeof i=="undefined"&&e.include&&(i=[{include:e.include}]),new qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,L._compilePatterns(i,t,a))}return e.while?new nn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,L._compileCaptures(e.beginCaptures||e.captures,t,a),e.while,L._compileCaptures(e.whileCaptures||e.captures,t,a),L._compilePatterns(e.patterns,t,a)):new Cn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,L._compileCaptures(e.beginCaptures||e.captures,t,a),e.end,L._compileCaptures(e.endCaptures||e.captures,t,a),e.applyEndPatternLast,L._compilePatterns(e.patterns,t,a))}),e.id}static _compileCaptures(e,t,a){let s=[];if(e){let i=0;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);c>i&&(i=c)}for(let r=0;r<=i;r++)s[r]=null;for(const r in e){if(r==="$vscodeTextmateLocation")continue;const c=parseInt(r,10);let o=0;e[r].patterns&&(o=L.getCompiledRuleId(e[r],t,a)),s[c]=L.createCaptureRule(t,e[r].$vscodeTextmateLocation,e[r].name,e[r].contentName,o)}}return s}static _compilePatterns(e,t,a){let s=[];if(e)for(let i=0,r=e.length;i<r;i++){const c=e[i];let o=-1;if(c.include){const l=Ct(c.include);switch(l.kind){case 0:case 1:o=L.getCompiledRuleId(a[c.include],t,a);break;case 2:let u=a[l.ruleName];u&&(o=L.getCompiledRuleId(u,t,a));break;case 3:case 4:const m=l.scopeName,p=l.kind===4?l.ruleName:null,g=t.getExternalGrammar(m,a);if(g)if(p){let d=g.repository[p];d&&(o=L.getCompiledRuleId(d,t,g.repository))}else o=L.getCompiledRuleId(g.repository.$self,t,g.repository);break}}else o=L.getCompiledRuleId(c,t,a);if(o!==-1){const l=t.getRule(o);let u=!1;if((l instanceof qt||l instanceof Cn||l instanceof nn)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;s.push(o)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ze=class hs{constructor(e,t){b(this,"source");b(this,"ruleId");b(this,"hasAnchor");b(this,"hasBackReferences");b(this,"_anchorCache");if(e&&typeof e=="string"){const a=e.length;let s=0,i=[],r=!1;for(let c=0;c<a;c++)if(e.charAt(c)==="\\"&&c+1<a){const l=e.charAt(c+1);l==="z"?(i.push(e.substring(s,c)),i.push("$(?!\\n)(?<!\\n)"),s=c+2):(l==="A"||l==="G")&&(r=!0),c++}this.hasAnchor=r,s===0?this.source=e:(i.push(e.substring(s,a)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Rs.test(this.source):this.hasBackReferences=!1}clone(){return new hs(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=t.map(s=>e.substring(s.start,s.end));return St.lastIndex=0,this.source.replace(St,(s,i)=>xt(a[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],a=[],s=[],i,r,c,o;for(i=0,r=this.source.length;i<r;i++)c=this.source.charAt(i),e[i]=c,t[i]=c,a[i]=c,s[i]=c,c==="\\"&&i+1<r&&(o=this.source.charAt(i+1),o==="A"?(e[i+1]="￿",t[i+1]="￿",a[i+1]="A",s[i+1]="A"):o==="G"?(e[i+1]="￿",t[i+1]="G",a[i+1]="￿",s[i+1]="G"):(e[i+1]=o,t[i+1]=o,a[i+1]=o,s[i+1]=o),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:a.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Le=class{constructor(){b(this,"_items");b(this,"_hasAnchors");b(this,"_cached");b(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(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Nt(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let a=this._items.map(s=>s.resolveAnchors(e,t));return new Nt(n,a,this._items.map(s=>s.ruleId))}},Nt=class{constructor(n,e,t){b(this,"scanner");this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
2`)}findNextMatchSync(n,e,t){const a=this.scanner.findNextMatchSync(n,e,t);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},Sn=class{constructor(n,e){this.languageId=n,this.tokenType=e}},Ts=(te=class{constructor(e,t){b(this,"_defaultAttributes");b(this,"_embeddedLanguagesMatcher");b(this,"_getBasicScopeAttributes",new wt(e=>{const t=this._scopeToLanguage(e),a=this._toStandardTokenType(e);return new Sn(t,a)}));this._defaultAttributes=new Sn(e,8),this._embeddedLanguagesMatcher=new Os(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?te._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(te.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[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!")}},b(te,"_NULL_SCOPE_METADATA",new Sn(0,0)),b(te,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),te),Os=class{constructor(n){b(this,"values");b(this,"scopesRegExp");if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,a])=>xt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}};typeof process!="undefined"&&process.env.VSCODE_TEXTMATE_DEBUG;var Ft=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function Bt(n,e,t,a,s,i,r,c){const o=e.content.length;let l=!1,u=-1;if(r){const g=Ms(n,e,t,a,s,i);s=g.stack,a=g.linePos,t=g.isFirstLine,u=g.anchorPosition}const m=Date.now();for(;!l;){if(c!==0&&Date.now()-m>c)return new Ft(s,!0);p()}return new Ft(s,!1);function p(){const g=Ds(n,e,t,a,s,u);if(!g){i.produce(s,o),l=!0;return}const d=g.captureIndices,f=g.matchedRuleId,$=d&&d.length>0?d[0].end>a:!1;if(f===Ps){const _=s.getRule(n);i.produce(s,d[0].start),s=s.withContentNameScopesList(s.nameScopesList),Te(n,e,t,s,i,_.endCaptures,d),i.produce(s,d[0].end);const x=s;if(s=s.parent,u=x.getAnchorPos(),!$&&x.getEnterPos()===a){s=x,i.produce(s,o),l=!0;return}}else{const _=n.getRule(f);i.produce(s,d[0].start);const x=s,y=_.getName(e.content,d),w=s.contentNameScopesList.pushAttributed(y,n);if(s=s.push(f,a,u,d[0].end===o,null,w,w),_ instanceof Cn){const C=_;Te(n,e,t,s,i,C.beginCaptures,d),i.produce(s,d[0].end),u=d[0].end;const E=C.getContentName(e.content,d),S=w.pushAttributed(E,n);if(s=s.withContentNameScopesList(S),C.endHasBackReferences&&(s=s.withEndRule(C.getEndWithResolvedBackReferences(e.content,d))),!$&&x.hasSameRuleAs(s)){s=s.pop(),i.produce(s,o),l=!0;return}}else if(_ instanceof nn){const C=_;Te(n,e,t,s,i,C.beginCaptures,d),i.produce(s,d[0].end),u=d[0].end;const E=C.getContentName(e.content,d),S=w.pushAttributed(E,n);if(s=s.withContentNameScopesList(S),C.whileHasBackReferences&&(s=s.withEndRule(C.getWhileWithResolvedBackReferences(e.content,d))),!$&&x.hasSameRuleAs(s)){s=s.pop(),i.produce(s,o),l=!0;return}}else if(Te(n,e,t,s,i,_.captures,d),i.produce(s,d[0].end),s=s.pop(),!$){s=s.safePop(),i.produce(s,o),l=!0;return}}d[0].end>a&&(a=d[0].end,t=!1)}}function Ms(n,e,t,a,s,i){let r=s.beginRuleCapturedEOL?0:-1;const c=[];for(let o=s;o;o=o.pop()){const l=o.getRule(n);l instanceof nn&&c.push({rule:l,stack:o})}for(let o=c.pop();o;o=c.pop()){const{ruleScanner:l,findOptions:u}=Hs(o.rule,n,o.stack.endRule,t,a===r),m=l.findNextMatchSync(e,a,u);if(m){if(m.ruleId!==Et){s=o.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(o.stack,m.captureIndices[0].start),Te(n,e,t,o.stack,i,o.rule.whileCaptures,m.captureIndices),i.produce(o.stack,m.captureIndices[0].end),r=m.captureIndices[0].end,m.captureIndices[0].end>a&&(a=m.captureIndices[0].end,t=!1))}else{s=o.stack.pop();break}}return{stack:s,linePos:a,anchorPosition:r,isFirstLine:t}}function Ds(n,e,t,a,s,i){const r=Us(n,e,t,a,s,i),c=n.getInjections();if(c.length===0)return r;const o=Zs(c,n,e,t,a,s,i);if(!o)return r;if(!r)return o;const l=r.captureIndices[0].start,u=o.captureIndices[0].start;return u<l||o.priorityMatch&&u===l?o:r}function Us(n,e,t,a,s,i){const r=s.getRule(n),{ruleScanner:c,findOptions:o}=Gt(r,n,s.endRule,t,a===i),l=c.findNextMatchSync(e,a,o);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Zs(n,e,t,a,s,i,r){let c=Number.MAX_VALUE,o=null,l,u=0;const m=i.contentNameScopesList.getScopeNames();for(let p=0,g=n.length;p<g;p++){const d=n[p];if(!d.matcher(m))continue;const f=e.getRule(d.ruleId),{ruleScanner:$,findOptions:_}=Gt(f,e,null,a,s===r),x=$.findNextMatchSync(t,s,_);if(!x)continue;const y=x.captureIndices[0].start;if(!(y>=c)&&(c=y,o=x.captureIndices,l=x.ruleId,u=d.priority,c===s))break}return o?{priorityMatch:u===-1,captureIndices:o,matchedRuleId:l}:null}function Gt(n,e,t,a,s){return{ruleScanner:n.compileAG(e,t,a,s),findOptions:0}}function Hs(n,e,t,a,s){return{ruleScanner:n.compileWhileAG(e,t,a,s),findOptions:0}}function Te(n,e,t,a,s,i,r){if(i.length===0)return;const c=e.content,o=Math.min(i.length,r.length),l=[],u=r[0].end;for(let m=0;m<o;m++){const p=i[m];if(p===null)continue;const g=r[m];if(g.length===0)continue;if(g.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=g.start;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?s.produceFromScopes(l[l.length-1].scopes,g.start):s.produce(a,g.start),p.retokenizeCapturedWithRuleId){const f=p.getName(c,r),$=a.contentNameScopesList.pushAttributed(f,n),_=p.getContentName(c,r),x=$.pushAttributed(_,n),y=a.push(p.retokenizeCapturedWithRuleId,g.start,-1,!1,null,$,x),w=n.createOnigString(c.substring(0,g.end));Bt(n,w,t&&g.start===0,g.start,y,s,!1,0),vt(w);continue}const d=p.getName(c,r);if(d!==null){const $=(l.length>0?l[l.length-1].scopes:a.contentNameScopesList).pushAttributed(d,n);l.push(new Ws($,g.end))}}for(;l.length>0;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ws=class{constructor(n,e){b(this,"scopes");b(this,"endPos");this.scopes=n,this.endPos=e}};function Vs(n,e,t,a,s,i,r,c){return new Ys(n,e,t,a,s,i,r,c)}function It(n,e,t,a,s){const i=Qe(e,tn),r=At.getCompiledRuleId(t,a,s.repository);for(const c of i)n.push({debugSelector:e,matcher:c.matcher,ruleId:r,grammar:s,priority:c.priority})}function tn(n,e){if(e.length<n.length)return!1;let t=0;return n.every(a=>{for(let s=t;s<e.length;s++)if(Xs(e[s],a))return t=s+1,!0;return!1})}function Xs(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var Ys=class{constructor(n,e,t,a,s,i,r,c){b(this,"_rootId");b(this,"_lastRuleId");b(this,"_ruleId2desc");b(this,"_includedGrammars");b(this,"_grammarRepository");b(this,"_grammar");b(this,"_injections");b(this,"_basicScopeAttributesProvider");b(this,"_tokenTypeMatchers");if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=c,this._basicScopeAttributesProvider=new Ts(t,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=r,this._grammar=Rt(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const o of Object.keys(s)){const l=Qe(o,tn);for(const u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[o]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],t=this._rootScopeName,a=n.lookup(t);if(a){const s=a.injections;if(s)for(let r in s)It(e,r,s[r],this,a);const i=this._grammarRepository.injections(t);i&&i.forEach(r=>{const c=this.getExternalGrammar(r);if(c){const o=c.injectionSelector;o&&It(e,o,c,this,c)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=Rt(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const a=this._tokenize(n,e,!1,t);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(n,e,t=0){const a=this._tokenize(n,e,!0,t);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(n,e,t,a){this._rootId===-1&&(this._rootId=At.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===En.NULL){s=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),m=we.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let g;p?g=Oe.createRootAndLookUpScopeName(p,m,this):g=Oe.createRoot("unknown",m),e=new En(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();n=n+`
3`;const i=this.createOnigString(n),r=i.content.length,c=new Qs(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),o=Bt(this,i,s,0,e,c,!0,a);return vt(i),{lineLength:r,lineTokens:c,ruleStack:o.stack,stoppedEarly:o.stoppedEarly}}};function Rt(n,e){return n=q(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var Oe=class J{constructor(e,t,a){this.parent=e,this.scopePath=t,this.tokenAttributes=a}static fromExtension(e,t){var i;let a=e,s=(i=e==null?void 0:e.scopePath)!=null?i:null;for(const r of t)s=kn.push(s,r.scopeNames),a=new J(a,s,r.encodedTokenAttributes);return a}static createRoot(e,t){return new J(null,new kn(null,e),t)}static createRootAndLookUpScopeName(e,t,a){const s=a.getMetadataForScope(e),i=new kn(null,e),r=a.themeProvider.themeMatch(i),c=J.mergeAttributes(t,s,r);return new J(null,i,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return J.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,a){let s=-1,i=0,r=0;return a!==null&&(s=a.fontStyle,i=a.foregroundId,r=a.backgroundId),we.set(e,t.languageId,t.tokenType,null,s,i,r)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return J._pushAttributed(this,e,t);const a=e.split(/ /g);let s=this;for(const i of a)s=J._pushAttributed(s,i,t);return s}static _pushAttributed(e,t,a){const s=a.getMetadataForScope(t),i=e.scopePath.push(t),r=a.themeProvider.themeMatch(i),c=J.mergeAttributes(e.tokenAttributes,s,r);return new J(e,i,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var s,i;const t=[];let a=this;for(;a&&a!==e;)t.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined((i=(s=a.parent)==null?void 0:s.scopePath)!=null?i:null)}),a=a.parent;return a===e?t.reverse():void 0}},En=(W=class{constructor(e,t,a,s,i,r,c,o){b(this,"_stackElementBrand");b(this,"_enterPos");b(this,"_anchorPos");b(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=r,this.nameScopesList=c,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=s}equals(e){return e===null?!1:W._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Oe.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){W._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,a,s,i,r,c){return new W(this,e,t,a,s,i,r,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var a,s;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(a=this.nameScopesList)==null?void 0:a.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new W(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,a,s,i,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:(s=(a=this.nameScopesList)==null?void 0:a.getExtensionIfDefined((t=(e=this.parent)==null?void 0:e.nameScopesList)!=null?t:null))!=null?s:[],contentNameScopesList:(r=(i=this.contentNameScopesList)==null?void 0:i.getExtensionIfDefined(this.nameScopesList))!=null?r:[]}}static pushFrame(e,t){var s,i,r;const a=Oe.fromExtension((s=e==null?void 0:e.nameScopesList)!=null?s:null,t.nameScopesList);return new W(e,t.ruleId,(i=t.enterPos)!=null?i:-1,(r=t.anchorPos)!=null?r:-1,t.beginRuleCapturedEOL,t.endRule,a,Oe.fromExtension(a,t.contentNameScopesList))}},b(W,"NULL",new W(null,0,0,0,!1,null,null,null)),W),Js=class{constructor(n,e){b(this,"balancedBracketScopes");b(this,"unbalancedBracketScopes");b(this,"allowAny",!1);this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Qe(t,tn).map(a=>a.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Qe(t,tn).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},Qs=class{constructor(n,e,t,a){b(this,"_emitBinaryTokens");b(this,"_lineText");b(this,"_tokens");b(this,"_binaryTokens");b(this,"_lastTokenEndIndex");b(this,"_tokenTypeOverrides");this.balancedBracketSelectors=a,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){var a,s,i,r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let c=(a=n==null?void 0:n.tokenAttributes)!=null?a:0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(i=n==null?void 0:n.getScopeNames())!=null?i:[];for(const u of this._tokenTypeOverrides)u.matcher(l)&&(c=we.set(c,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(c=we.set(c,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===c){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(c),this._lastTokenEndIndex=e;return}const t=(r=n==null?void 0:n.getScopeNames())!=null?r:[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,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(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,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(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let a=0,s=this._binaryTokens.length;a<s;a++)t[a]=this._binaryTokens[a];return t}},Ks=class{constructor(n,e){b(this,"_grammars",new Map);b(this,"_rawGrammars",new Map);b(this,"_injectionGrammars",new Map);b(this,"_theme");this._onigLib=e,this._theme=n}dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,a,s){if(!this._grammars.has(n)){let i=this._rawGrammars.get(n);if(!i)return null;this._grammars.set(n,Vs(n,i,e,t,a,s,this,this._onigLib))}return this._grammars.get(n)}},ei=class{constructor(e){b(this,"_options");b(this,"_syncRegistry");b(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Ks(Je.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Je.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,a){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:a})}loadGrammarWithConfiguration(e,t,a){return this._loadGrammar(e,t,a.embeddedLanguages,a.tokenTypes,new Js(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,a,s,i){const r=new qs(this._syncRegistry,e);for(;r.Q.length>0;)r.Q.map(c=>this._loadSingleGrammar(c.scopeName)),r.processQueue();return this._grammarForScopeName(e,t,a,s,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const a=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,a)}}addGrammar(e,t=[],a=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,a,s)}_grammarForScopeName(e,t=0,a=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,a,s,i)}},qn=En.NULL;const ni=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Me{constructor(e,t,a){this.normal=t,this.property=e,a&&(this.space=a)}}Me.prototype.normal={},Me.prototype.property={},Me.prototype.space=void 0;function Pt(n,e){const t={},a={};for(const s of n)Object.assign(t,s.property),Object.assign(a,s.normal);return new Me(t,a,e)}function An(n){return n.toLowerCase()}class M{constructor(e,t){this.attribute=t,this.property=e}}M.prototype.attribute="",M.prototype.booleanish=!1,M.prototype.boolean=!1,M.prototype.commaOrSpaceSeparated=!1,M.prototype.commaSeparated=!1,M.prototype.defined=!1,M.prototype.mustUseProperty=!1,M.prototype.number=!1,M.prototype.overloadedBoolean=!1,M.prototype.property="",M.prototype.spaceSeparated=!1,M.prototype.space=void 0;let ti=0;const v=de(),B=de(),Nn=de(),h=de(),A=de(),ke=de(),U=de();function de(){return 2**++ti}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:v,booleanish:B,commaOrSpaceSeparated:U,commaSeparated:ke,number:h,overloadedBoolean:Nn,spaceSeparated:A},Symbol.toStringTag,{value:"Module"})),Bn=Object.keys(Fn);class Gn extends M{constructor(e,t,a,s){let i=-1;if(super(e,t),zt(this,"space",s),typeof a=="number")for(;++i<Bn.length;){const r=Bn[i];zt(this,Bn[i],(a&Fn[r])===Fn[r])}}}Gn.prototype.defined=!0;function zt(n,e,t){t&&(n[e]=t)}function je(n){const e={},t={};for(const[a,s]of Object.entries(n.properties)){const i=new Gn(a,n.transform(n.attributes||{},a),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),e[a]=i,t[An(a)]=a,t[An(i.attribute)]=a}return new Me(e,t,n.space)}const Lt=je({properties:{ariaActiveDescendant:null,ariaAtomic:B,ariaAutoComplete:null,ariaBusy:B,ariaChecked:B,ariaColCount:h,ariaColIndex:h,ariaColSpan:h,ariaControls:A,ariaCurrent:null,ariaDescribedBy:A,ariaDetails:null,ariaDisabled:B,ariaDropEffect:A,ariaErrorMessage:null,ariaExpanded:B,ariaFlowTo:A,ariaGrabbed:B,ariaHasPopup:null,ariaHidden:B,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:A,ariaLevel:h,ariaLive:null,ariaModal:B,ariaMultiLine:B,ariaMultiSelectable:B,ariaOrientation:null,ariaOwns:A,ariaPlaceholder:null,ariaPosInSet:h,ariaPressed:B,ariaReadOnly:B,ariaRelevant:null,ariaRequired:B,ariaRoleDescription:A,ariaRowCount:h,ariaRowIndex:h,ariaRowSpan:h,ariaSelected:B,ariaSetSize:h,ariaSort:null,ariaValueMax:h,ariaValueMin:h,ariaValueNow:h,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Tt(n,e){return e in n?n[e]:e}function Ot(n,e){return Tt(n,e.toLowerCase())}const ai=je({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ke,acceptCharset:A,accessKey:A,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:A,autoFocus:v,autoPlay:v,blocking:A,capture:null,charSet:null,checked:v,cite:null,className:A,cols:h,colSpan:null,content:null,contentEditable:B,controls:v,controlsList:A,coords:h|ke,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:Nn,draggable:B,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:A,height:h,hidden:Nn,high:h,href:null,hrefLang:null,htmlFor:A,httpEquiv:A,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:A,itemRef:A,itemScope:v,itemType:A,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:h,manifest:null,max:null,maxLength:h,media:null,method:null,min:null,minLength:h,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,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:v,optimum:h,pattern:null,ping:A,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:A,required:v,reversed:v,rows:h,rowSpan:h,sandbox:A,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shape:null,size:h,sizes:null,slot:null,span:h,spellCheck:B,src:null,srcDoc:null,srcLang:null,srcSet:null,start:h,step:null,style:null,tabIndex:h,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:B,width:h,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:A,axis:null,background:null,bgColor:null,border:h,borderColor:null,bottomMargin:h,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:h,leftMargin:h,link:null,longDesc:null,lowSrc:null,marginHeight:h,marginWidth:h,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:h,rules:null,scheme:null,scrolling:B,standby:null,summary:null,text:null,topMargin:h,valueType:null,version:null,vAlign:null,vLink:null,vSpace:h,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:v,disableRemotePlayback:v,prefix:null,property:null,results:h,security:null,unselectable:null},space:"html",transform:Ot}),si=je({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:U,accentHeight:h,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:h,amplitude:h,arabicForm:null,ascent:h,attributeName:null,attributeType:null,azimuth:h,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:h,by:null,calcMode:null,capHeight:h,className:A,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:h,diffuseConstant:h,direction:null,display:null,dur:null,divisor:h,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:h,enableBackground:null,end:null,event:null,exponent:h,externalResourcesRequired:null,fill:null,fillOpacity:h,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:ke,g2:ke,glyphName:ke,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:h,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:h,horizOriginX:h,horizOriginY:h,id:null,ideographic:h,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:h,k:h,k1:h,k2:h,k3:h,k4:h,kernelMatrix:U,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:h,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:h,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:h,overlineThickness:h,paintOrder:null,panose1:null,path:null,pathLength:h,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:A,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:h,pointsAtY:h,pointsAtZ:h,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:U,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:U,rev:U,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:U,requiredFeatures:U,requiredFonts:U,requiredFormats:U,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:h,specularExponent:h,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:h,strikethroughThickness:h,string:null,stroke:null,strokeDashArray:U,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:h,strokeOpacity:h,strokeWidth:null,style:null,surfaceScale:h,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:U,tabIndex:h,tableValues:null,target:null,targetX:h,targetY:h,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:U,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:h,underlineThickness:h,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:h,values:null,vAlphabetic:h,vMathematical:h,vectorEffect:null,vHanging:h,vIdeographic:h,version:null,vertAdvY:h,vertOriginX:h,vertOriginY:h,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:h,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tt}),Mt=je({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),Dt=je({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ot}),Ut=je({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),ii=/[A-Z]/g,Zt=/-[a-z]/g,ri=/^data[-\w.:]+$/i;function oi(n,e){const t=An(e);let a=e,s=M;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ri.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(Zt,li);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!Zt.test(i)){let r=i.replace(ii,ci);r.charAt(0)!=="-"&&(r="-"+r),e="data"+r}}s=Gn}return new s(a,e)}function ci(n){return"-"+n.toLowerCase()}function li(n){return n.charAt(1).toUpperCase()}const ui=Pt([Lt,ai,Mt,Dt,Ut],"html"),Ht=Pt([Lt,si,Mt,Dt,Ut],"svg"),Wt={}.hasOwnProperty;function mi(n,e){const t=e||{};function a(s,...i){let r=a.invalid;const c=a.handlers;if(s&&Wt.call(s,n)){const o=String(s[n]);r=Wt.call(c,o)?c[o]:a.unknown}if(r)return r.call(this,s,...i)}return a.handlers=t.handlers||{},a.invalid=t.invalid,a.unknown=t.unknown,a}const pi=/["&'<>`]/g,di=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,bi=/[|\\{}()[\]^$+*?.]/g,Vt=new WeakMap;function hi(n,e){if(n=n.replace(e.subset?fi(e.subset):pi,a),e.subset||e.escapeOnly)return n;return n.replace(di,t).replace(gi,a);function t(s,i,r){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,r.charCodeAt(i+2),e)}function a(s,i,r){return e.format(s.charCodeAt(0),r.charCodeAt(i+1),e)}}function fi(n){let e=Vt.get(n);return e||(e=yi(n),Vt.set(n,e)),e}function yi(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(bi,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const _i=/[\dA-Fa-f]/;function $i(n,e,t){const a="&#x"+n.toString(16).toUpperCase();return t&&e&&!_i.test(String.fromCharCode(e))?a:a+";"}const xi=/\d/;function wi(n,e,t){const a="&#"+String(n);return t&&e&&!xi.test(String.fromCharCode(e))?a:a+";"}const ki=["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"],In={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:"€"},ji=["cent","copy","divide","gt","lt","not","para","times"],Xt={}.hasOwnProperty,Rn={};let an;for(an in In)Xt.call(In,an)&&(Rn[In[an]]=an);const vi=/[^\dA-Za-z]/;function Ci(n,e,t,a){const s=String.fromCharCode(n);if(Xt.call(Rn,s)){const i=Rn[s],r="&"+i;return t&&ki.includes(i)&&!ji.includes(i)&&(!a||e&&e!==61&&vi.test(String.fromCharCode(e)))?r:r+";"}return""}function Si(n,e,t){let a=$i(n,e,t.omitOptionalSemicolons),s;if((t.useNamedReferences||t.useShortestReferences)&&(s=Ci(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!s)&&t.useShortestReferences){const i=wi(n,e,t.omitOptionalSemicolons);i.length<a.length&&(a=i)}return s&&(!t.useShortestReferences||s.length<a.length)?s:a}function ve(n,e){return hi(n,Object.assign({format:Si},e))}const Ei=/^>|^->|<!--|-->|--!>|<!-$/g,qi=[">"],Ai=["<",">"];function Ni(n,e,t,a){return a.settings.bogusComments?"<?"+ve(n.value,Object.assign({},a.settings.characterReferences,{subset:qi}))+">":"<!--"+n.value.replace(Ei,s)+"-->";function s(i){return ve(i,Object.assign({},a.settings.characterReferences,{subset:Ai}))}}function Fi(n,e,t,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function Yt(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let a=0,s=t.indexOf(e);for(;s!==-1;)a++,s=t.indexOf(e,s+e.length);return a}function Bi(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function Gi(n){return n.join(" ").trim()}const Ii=/[ \t\n\f\r]/g;function Pn(n){return typeof n=="object"?n.type==="text"?Jt(n.value):!1:Jt(n)}function Jt(n){return n.replace(Ii,"")===""}const I=Kt(1),Qt=Kt(-1),Ri=[];function Kt(n){return e;function e(t,a,s){const i=t?t.children:Ri;let r=(a||0)+n,c=i[r];if(!s)for(;c&&Pn(c);)r+=n,c=i[r];return c}}const Pi={}.hasOwnProperty;function ea(n){return e;function e(t,a,s){return Pi.call(n,t.tagName)&&n[t.tagName](t,a,s)}}const zn=ea({body:Li,caption:Ln,colgroup:Ln,dd:Di,dt:Mi,head:Ln,html:zi,li:Oi,optgroup:Ui,option:Zi,p:Ti,rp:na,rt:na,tbody:Wi,td:ta,tfoot:Vi,th:ta,thead:Hi,tr:Xi});function Ln(n,e,t){const a=I(t,e,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&Pn(a.value.charAt(0)))}function zi(n,e,t){const a=I(t,e);return!a||a.type!=="comment"}function Li(n,e,t){const a=I(t,e);return!a||a.type!=="comment"}function Ti(n,e,t){const a=I(t,e);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function Oi(n,e,t){const a=I(t,e);return!a||a.type==="element"&&a.tagName==="li"}function Mi(n,e,t){const a=I(t,e);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function Di(n,e,t){const a=I(t,e);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function na(n,e,t){const a=I(t,e);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function Ui(n,e,t){const a=I(t,e);return!a||a.type==="element"&&a.tagName==="optgroup"}function Zi(n,e,t){const a=I(t,e);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function Hi(n,e,t){const a=I(t,e);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function Wi(n,e,t){const a=I(t,e);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function Vi(n,e,t){return!I(t,e)}function Xi(n,e,t){const a=I(t,e);return!a||a.type==="element"&&a.tagName==="tr"}function ta(n,e,t){const a=I(t,e);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const Yi=ea({body:Ki,colgroup:er,head:Qi,html:Ji,tbody:nr});function Ji(n){const e=I(n,-1);return!e||e.type!=="comment"}function Qi(n){const e=new Set;for(const a of n.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(e.has(a.tagName))return!1;e.add(a.tagName)}const t=n.children[0];return!t||t.type==="element"}function Ki(n){const e=I(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Pn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function er(n,e,t){const a=Qt(t,e),s=I(n,-1,!0);return t&&a&&a.type==="element"&&a.tagName==="colgroup"&&zn(a,t.children.indexOf(a),t)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function nr(n,e,t){const a=Qt(t,e),s=I(n,-1);return t&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&zn(a,t.children.indexOf(a),t)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const sn={name:[[`
4\f\r &/=>`.split(""),`

Callers 1

_loadGrammarMethod · 0.80

Calls 4

AsFunction · 0.85
addMethod · 0.80
toKeyMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected