1var __defProp$1=Object.defineProperty,__export=(e,t)=>{let n={};for(var r in e)__defProp$1(n,r,{get:e[r],enumerable:!0});return t&&__defProp$1(n,Symbol.toStringTag,{value:"Module"}),n},ShikiError$1=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function clone(e){return doClone(e)}function doClone(e){return Array.isArray(e)?cloneArray(e):e instanceof RegExp?e:"object"==typeof e?cloneObj(e):e}function cloneArray(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=doClone(e[n]);return t}function cloneObj(e){let t={};for(let n in e)t[n]=doClone(e[n]);return t}function mergeObjects(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function basename(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?basename(e.substring(0,e.length-1)):e.substr(1+~t)}var CAPTURING_REGEX_SOURCE=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,RegexSource=class{static hasCaptures(e){return null!==e&&(CAPTURING_REGEX_SOURCE.lastIndex=0,CAPTURING_REGEX_SOURCE.test(e))}static replaceCaptures(e,t,n){return e.replace(CAPTURING_REGEX_SOURCE,(e,r,a,i)=>{let o=n[parseInt(r||a,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function strcmp(e,t){return e<t?-1:e>t?1:0}function strArrCmp(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=strcmp(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function isValidHexColor(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function escapeRegExpCharacters(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var CachedFn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Theme=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(parseTheme(e),t)}static createFromParsedTheme(e,t){return resolveParsedThemeRules(e,t)}_cachedMatchRoot=new CachedFn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>_scopePathMatchesParentScopes(e.parent,t.parentScopes));return n?new StyleAttributes(n.fontStyle,n.foreground,n.background):null}},ScopeStack=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function _scopePathMatchesParentScopes(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!_matchesScope(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function _matchesScope(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var StyleAttributes=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function parseTheme(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,a=t.length;e<a;e++){let a,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(i.scope)?i.scope:[""];let o=-1;if("string"==typeof i.settings.fontStyle){o=0;let e=i.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof i.settings.foreground&&isValidHexColor(i.settings.foreground)&&
1(s=i.settings.foreground);let l=null;"string"==typeof i.settings.background&&isValidHexColor(i.settings.background)&&(l=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(" "),c=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ParsedThemeRule(c,u,e,o,s,l)}}return n}var ParsedThemeRule=class{constructor(e,t,n,r,a,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=i}},FontStyle=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(FontStyle||{});function resolveParsedThemeRules(e,t){e.sort((e,t)=>{let n=strcmp(e.scope,t.scope);return 0!==n||(n=strArrCmp(e.parentScopes,t.parentScopes),0!==n)?n:e.index-t.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(a=t.background)}let i=new ColorMap(t),o=new StyleAttributes(n,i.getId(r),i.getId(a)),s=new ThemeTrieElement(new ThemeTrieElementRule(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,i.getId(n.foreground),i.getId(n.background))}return new Theme(i,o,s)}var ColorMap=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},emptyParentScopes=Object.freeze([]),ThemeTrieElementRule=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,a){this.scopeDepth=e,this.parentScopes=t||emptyParentScopes,this.fontStyle=n,this.foreground=r,this.background=a}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},ThemeTrieElement=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let a=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==a)return a;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,a,i,o){if(""===n)return void this._doInsertHere(t,r,a,i,o);let s,l,c,u=n.indexOf(".");-1===u?(s=n,l=""):(s=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(s)?c=this._children[s]:(c=new e(this._mainRule.clone(),ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes)),this._children[s]=c),c.insert(t+1,l,r,a,i,o)}_doInsertHere(e,t,n,r,a){if(null!==t){for(let i=0,o=this._rulesWithParentScopes.length;i<o;i++){let o=this._rulesWithParentScopes[i];if(0===strArrCmp(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,a)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new ThemeTrieElementRule(e,t,n,r,a))}else this._mainRule.acceptOverwrite(e,n,r,a)}},EncodedTokenMetadata=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}
1static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),a=e.getFontStyle(t),i=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:i,background:o})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,r,a,i,o,s){let l=e.getLanguageId(t),c=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,p=e.getFontStyle(t),m=e.getForeground(t),h=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=fromOptionalTokenType(r)),null!==a&&(u=a?1:0),-1!==i&&(p=i),0!==o&&(m=o),0!==s&&(h=s),(l|c<<8|u<<10|p<<11|m<<15|h<<24)>>>0}};function toOptionalTokenType(e){return e}function fromOptionalTokenType(e){return e}function createMatchers(e,t){let n=[],r=newTokenizer(e),a=r.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let t=o();if(n.push({matcher:t,priority:e}),","!==a)break;a=r.next()}return n;function i(){if("-"===a){a=r.next();let e=i();return t=>!!e&&!e(t)}if("("===a){a=r.next();let e=function(){let e=[],t=o();for(;t&&(e.push(t),"|"===a||","===a);){do{a=r.next()}while("|"===a||","===a);t=o()}return t=>e.some(e=>e(t))}();return")"===a&&(a=r.next()),e}if(isIdentifier(a)){let e=[];do{e.push(a),a=r.next()}while(isIdentifier(a));return n=>t(e,n)}return null}function o(){let e=[],t=i();for(;t;)e.push(t),t=i();return t=>e.every(e=>e(t))}}function isIdentifier(e){return!!e&&!!e.match(/[\w\.:]+/)}function newTokenizer(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function disposeOnigString(e){"function"==typeof e.dispose&&e.dispose()}var TopLevelRuleReference=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},TopLevelRepositoryRuleReference=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ExternalReferenceCollector=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new TopLevelRuleReference(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ExternalReferenceCollector;for(let n of e)collectReferencesOfReference(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof TopLevelRuleReference){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function collectReferencesOfReference(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let i=n.lookup(t);e instanceof TopLevelRuleReference?collectExternalReferencesInTopLevelRule({baseGrammar:i,selfGrammar:a},r):collectExternalReferencesInTopLevelRepositoryRule(e.ruleName,{baseGrammar:i,selfGrammar:a,repository:a.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new TopLevelRuleReference(e))}function collectExternalReferencesInTopLevelRepositoryRule(e,t,n){if(t.repository&&t.repository[e]){collectExternalReferencesInRules([t.repository[e]],t,n)}}function collectExternalReferencesInTopLevelRule(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&collectExternalReferencesInRules(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&collectExternalReferencesInRules(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}
1function collectExternalReferencesInRules(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?mergeObjects({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&collectExternalReferencesInRules(r.patterns,{...t,repository:e},n);let a=r.include;if(!a)continue;let i=parseInclude(a);switch(i.kind){case 0:collectExternalReferencesInTopLevelRule({...t,selfGrammar:t.baseGrammar},n);break;case 1:collectExternalReferencesInTopLevelRule(t,n);break;case 2:collectExternalReferencesInTopLevelRepositoryRule(i.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let a={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===i.kind?collectExternalReferencesInTopLevelRepositoryRule(i.ruleName,a,n):collectExternalReferencesInTopLevelRule(a,n)}else 4===i.kind?n.add(new TopLevelRepositoryRuleReference(i.scopeName,i.ruleName)):n.add(new TopLevelRuleReference(i.scopeName))}}}var BaseReference=class{kind=0},SelfReference=class{kind=1},RelativeReference=class{constructor(e){this.ruleName=e}kind=2},TopLevelReference=class{constructor(e){this.scopeName=e}kind=3},TopLevelRepositoryReference=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};
1function parseInclude(e){if("$base"===e)return new BaseReference;if("$self"===e)return new SelfReference;let t=e.indexOf("#");return-1===t?new TopLevelReference(e):0===t?new RelativeReference(e.substring(1)):new TopLevelRepositoryReference(e.substring(0,t),e.substring(t+1))}var HAS_BACK_REFERENCES=/\\(\d+)/,BACK_REFERENCING_END=/\\(\d+)/g,endRuleId=-1,whileRuleId=-2;function ruleIdFromNumber(e){return e}function ruleIdToNumber(e){return e}var Rule=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=RegexSource.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=RegexSource.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${basename(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}},CaptureRule=class extends Rule{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},MatchRule=class extends Rule{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new RegExpSource(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new RegExpSourceList,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},IncludeOnlyRule=class extends Rule{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new RegExpSourceList,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},BeginEndRule=class extends Rule{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,i,o,s,l,c){super(e,t,n,r),this._begin=new RegExpSource(a,this.id),this.beginCaptures=i,this._end=new RegExpSource(o||"ï¿¿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new RegExpSourceList;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},BeginWhileRule=class extends Rule{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,i,o,s,l){super(e,t,n,r),this._begin=new RegExpSource(a,this.id),this.beginCaptures=i,this.whileCaptures=s,this._while=ne
1w RegExpSource(o,whileRuleId),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(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new RegExpSourceList;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new RegExpSourceList,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"ï¿¿"),this._cachedCompiledWhilePatterns}
1},RuleFactory=class e{static createCaptureRule(e,t,n,r,a){return e.registerRule(e=>new CaptureRule(t,e,n,r,a))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new MatchRule(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=mergeObjects({},r,t.repository));let a=t.patterns;return void 0===a&&t.include&&(a=[{include:t.include}]),new IncludeOnlyRule(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(a,n,r))}return t.while?new BeginWhileRule(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new BeginEndRule(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let i=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)a[e]=null;for(let i in t){if("$vscodeTextmateLocation"===i)continue;let o=parseInt(i,10),s=0;t[i].patterns&&(s=e.getCompiledRuleId(t[i],n,r)),a[o]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let i=0,o=t.length;i<o;i++){let o=t[i],s=-1;if(o.include){let t=parseInclude(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let a=r[t.ruleName];a&&(s=e.getCompiledRuleId(a,n,r));break;case 3:case 4:let i=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(i,r);if(c)if(l){let t=c.repository[l];t&&(s=e.getCompiledRuleId(t,n,c.repository))}else s=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else s=e.getCompiledRuleId(o,n,r);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof IncludeOnlyRule||e instanceof BeginEndRule||e instanceof BeginWhileRule)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},RegExpSource=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){let t=e.length,n=0,r=[],a=!1;for(let i=0;i<t;i++)if("\\"===e.charAt(i)&&i+1<t){let t=e.charAt(i+1);"z"===t?(r.push(e.substring(n,i)),r.push("$(?!\\n)(?<!\\n)"),n=i+2):("A"===t||"G"===t)&&(a=!0),i++}this.hasAnchor=a,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=HAS_BACK_REFERENCES.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return BACK_REFERENCING_END.lastIndex=0,this.source.replace(BACK_REFERENCING_END,(e,t)=>escapeRegExpCharacters(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let e,t,n,r,a=[],i=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),a[e]=n,i[e]=n,o[e]=n,s[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(a[e+1]="ï¿¿",i[e+1]="ï¿¿",o[e+1]="A",s[e+1]="A"):"G"===r?(a[e+1]="ï¿¿",i[e+1]="G",o[e+1]="ï¿¿",s[e+1]="G"):(a[e+1]=r,i[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:a.join(""),A0_G1:i.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},RegExpSourceList=class{_items;_hasAnchors;_cached;_anchorCache;
1constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new CompiledRule(e,this._items.map(e=>e.source),this._items.map(e=>e.ruleId)),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new CompiledRule(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},CompiledRule=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},BasicScopeAttributes=class{constructor(e,t){this.languageId=e,this.tokenType=t}},BasicScopeAttributesProvider=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new BasicScopeAttributes(e,8),this._embeddedLanguagesMatcher=new ScopeMatcher(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new BasicScopeAttributes(0,0);_getBasicScopeAttributes=new CachedFn(e=>
1new BasicScopeAttributes(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ScopeMatcher=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>escapeRegExpCharacters(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var UseOnigurumaFindOptions=!1,TokenizeStringResult=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function _tokenizeString(e,t,n,r,a,i,o,s){let l=t.content.length,c=!1,u=-1;if(o){let o=_checkWhileConditions(e,t,n,r,a,i);a=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let p=Date.now();for(;!c;){if(0!==s&&Date.now()-p>s)return new TokenizeStringResult(a,!0);m()}return new TokenizeStringResult(a,!1);function m(){let o=matchRuleOrInjections(e,t,n,r,a,u);if(!o)return i.produce(a,l),void(c=!0);let s=o.captureIndices,p=o.matchedRuleId,m=!!(s&&s.length>0)&&s[0].end>r;if(p===endRuleId){let o=a.getRule(e);i.produce(a,s[0].start),a=a.withContentNameScopesList(a.nameScopesList),handleCaptures(e,t,n,a,i,o.endCaptures,s),i.produce(a,s[0].end);let p=a;if(a=a.parent,u=p.getAnchorPos(),!m&&p.getEnterPos()===r)return a=p,i.produce(a,l),void(c=!0)}else{let o=e.getRule(p);i.produce(a,s[0].start);let h=a,d=o.getName(t.content,s),g=a.contentNameScopesList.pushAttributed(d,e);if(a=a.push(p,r,u,s[0].end===l,null,g,g),o instanceof BeginEndRule){let r=o;handleCaptures(e,t,n,a,i,r.beginCaptures,s),i.produce(a,s[0].end),u=s[0].end;let p=r.getContentName(t.content,s),d=g.pushAttributed(p,e);if(a=a.withContentNameScopesList(d),r.endHasBackReferences&&(a=a.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!m&&h.hasSameRuleAs(a))return a=a.pop(),i.produce(a,l),void(c=!0)}else if(o instanceof BeginWhileRule){let r=o;handleCaptures(e,t,n,a,i,r.beginCaptures,s),i.produce(a,s[0].end),u=s[0].end;let p=r.getContentName(t.content,s),d=g.pushAttributed(p,e);if(a=a.withContentNameScopesList(d),r.whileHasBackReferences&&(a=a.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!m&&h.hasSameRuleAs(a))return a=a.pop(),i.produce(a,l),void(c=!0)}else if(handleCaptures(e,t,n,a,i,o.captures,s),i.produce(a,s[0].end),a=a.pop(),!m)return a=a.safePop(),i.produce(a,l),void(c=!0)}s[0].end>r&&(r=s[0].end,n=!1)}}function _checkWhileConditions(e,t,n,r,a,i){let o=a.beginRuleCapturedEOL?0:-1,s=[];for(let t=a;t;t=t.pop()){let n=t.getRule(e);n instanceof BeginWhileRule&&s.push({rule:n,stack:t})}for(let l=s.pop();l;l=s.pop()){let{ruleScanner:s,findOptions:c}=prepareRuleWhileSearch(l.rule,e,l.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,c);if(!u){a=l.stack.pop();break}if(u.ruleId!==whileRuleId){a=l.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(i.produce(l.stack,u.captureIndices[0].start),handleCaptures(e,t,n,l.stack,i,l.rule.whileCaptures,u.captureIndices),i.produce(l.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}return{stack:a,linePos:r,anchorPosition:o,isFirstLine:n}}function matchRuleOrInjections(e,t,n,r,a,i){let o=matchRule(e,t,n,r,a,i),s=e.getInjections();if(0===s.length)return o;let l=matchInjections(s,e,t,n,r,a,i);if(!l)return o;if(!o)return l;let c=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:o}function matchRule(e,t,n,r,a,i){let{ruleScanner:o,findOptions:s}=prepareRuleSearch(a.getRule(e),e,a.endRule,n,r===i),l=o.findNextMatchSync(t,r,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function matchInjections(e,t,n,r,a,i,o){let s,l=Number.MAX_VALUE,c=null,u=0,p=i.contentNameScopesList.getScopeNames();for(let i=0,m=e.length;i<m;i++){let m=e[i];if(!m.matcher(p))continue;let{ruleScanner:h,findOptions:d}=prepareRuleSearch(t.getRule(m.ruleId),t,null,r,a===o),g=h.findNextMatchSync(n,a,d);if(!g)continue;let f=g.captureIndices[0].start;if(!(f>=l)&&(l=f,c=g.captureIndices,s=g.ruleId,u=m.priority,l===a))break}return c?{priorityMatch:-1===u,captureIndices:c,matchedRuleId:s}:null}function prepareRuleSearch(e,t,n,r,a){return UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:getFindOptions(r,a)}:{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function prepareRuleWhileSearch(e,t,n,r,a){return UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:getFindOptions(r,a)}:{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function getFindOptions(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function handleCaptures(e,t,n,r,a,i,o){if(0===i.length)return;let s=t.content,l=Math.min(i.length,o.length),c=[],u=o[0].end;for(let t=0;t<l;t++){let l=i[t];if(null===l)continue;let p=o[t];if(0===p.length)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;
1)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?a.produceFromScopes(c[c.length-1].scopes,p.start):a.produce(r,p.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),i=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(s,o),u=i.pushAttributed(c,e),m=r.push(l.retokenizeCapturedWithRuleId,p.start,-1,!1,null,i,u),h=e.createOnigString(s.substring(0,p.end));_tokenizeString(e,h,n&&0===p.start,p.start,m,a,!1,0),disposeOnigString(h);continue}let m=l.getName(s,o);if(null!==m){let t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);c.push(new LocalStackElement(t,p.end))}}for(;c.length>0;)a.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var LocalStackElement=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function createGrammar(e,t,n,r,a,i,o,s){return new Grammar(e,t,n,r,a,i,o,s)}function collectInjections(e,t,n,r,a){let i=createMatchers(t,nameMatcher),o=RuleFactory.getCompiledRuleId(n,r,a.repository);for(let n of i)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:a,priority:n.priority})}function nameMatcher(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(scopesAreMatching(t[r],e))return n=r+1,!0;return!1})}function scopesAreMatching(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var Grammar=class{constructor(e,t,n,r,a,i,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=s,this._basicScopeAttributesProvider=new BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=initGrammar(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(let e of Object.keys(a)){let t=createMatchers(e,nameMatcher);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:a[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){let e=r.injections;if(e)for(let n in e)collectInjections(t,n,e[n],this,r);let a=this._grammarRepository.injections(n);a&&a.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&collectInjections(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=initGrammar(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let a;if(-1===this._rootId&&(this._rootId=RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==StateStackImpl.NULL)a=!1,t.reset();else{a=!0;let e,n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),i=EncodedTokenMetadata.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?AttributedScopeStack.createRootAndLookUpScopeName(o,i,this):AttributedScopeStack.createRoot("unknown",i),t=new StateStackImpl(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let i=this.createOnigString(e),o=i.content.length,s=new LineTokens(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=_tokenizeString(this,i,a,0,t,s,!0,r);
1return disposeOnigString(i),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function initGrammar(e,t){return(e=clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var AttributedScopeStack=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(let t of n)a=ScopeStack.push(a,t.scopeNames),r=new e(r,a,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new ScopeStack(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let a=r.getMetadataForScope(t),i=new ScopeStack(null,t),o=r.themeProvider.themeMatch(i);return new e(null,i,e.mergeAttributes(n,a,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){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}}static mergeAttributes(e,t,n){let r=-1,a=0,i=0;return null!==n&&(r=n.fontStyle,a=n.foregroundId,i=n.backgroundId),EncodedTokenMetadata.set(e,t.languageId,t.tokenType,null,r,a,i)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),a=this;for(let t of r)a=e._pushAttributed(a,t,n);return a}static _pushAttributed(t,n,r){let a=r.getMetadataForScope(n),i=t.scopePath.push(n),o=r.themeProvider.themeMatch(i);return new e(t,i,e.mergeAttributes(t.tokenAttributes,a,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},StateStackImpl=class e{constructor(e,t,n,r,a,i,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=a,this.endRule=i,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&AttributedScopeStack.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){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}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,i,o,s){return new e(this,t,n,r,a,i,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:ruleIdToNumber(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=AttributedScopeStack.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ruleIdFromNumber(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,AttributedScopeStack.fromExtension(r,n.contentNameScopesList))}},BalancedBracketSelectors=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):createMatchers(e,nameMatcher).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>createMatchers(e,nameMatcher).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},LineTokens=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>
10||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=EncodedTokenMetadata.set(n,0,toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}return r&&(n=EncodedTokenMetadata.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},SyncRegistry=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,createGrammar(e,i,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},Registry=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new SyncRegistry(Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Theme.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,a){let i=new ScopeDependencyProcessor(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,n,r,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,a=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,a)}},INITIAL=StateStackImpl.NULL;const htmlVoidElements=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Schema=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function merge(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Schema(n,r,t)}function normalize(e){return e.toLowerCase()}Schema.prototype.normal={},Schema.prototype.property={},Schema.prototype.space=void 0;var Info=class{constructor(e,t){this.attribute=t,this.property=e}};Info.prototype.attribute="",Info.prototype.booleanish=!1,Info.prototype.boolean=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.commaSeparated=!1,Info.prototype.defined=!1,Info.prototype.mustUseProperty=!1,Info.prototype.number=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.property="",Info.prototype.spaceSeparated=!1,Info.prototype.space=void 0;var types_exports=__export({boolean:()=>boolean,booleanish:()=>booleanish,commaOrSpaceSeparated:()=>commaOrSpaceSeparated,commaSeparated:()=>commaSeparated,number:()=>number,overloadedBoolean:()=>overloadedBoolean,spaceSeparated:()=>spaceSeparated}),powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}var checks=Object.keys(types_exports),DefinedInfo=class extends Info{constructor(e,t,n,r){let a=-1;if(super(e,t),mark(this,"space",r),"number"==typeof n)for(;++a<checks.length;){let e=checks[a];mark(this,checks[a],(n&types_exports[e])===types_exports[e])}}};function mark(e,t,n){n&&(e[t]=n)}function create(e){let t={},n={};for(let[r,a]of Object.entries(e.properties)){let i=new DefinedInfo(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[normalize(r)]=r,n[normalize(i.attribute)]=r}return new Schema(t,n,e.space)}DefinedInfo.prototype.defined=!0;const aria=create({properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControl
vendor: 4,272 bytes, line 1
1s:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function caseSensitiveTransform(e,t){return t in e?e[t]:t}function caseInsensitiveTransform(e,t){return caseSensitiveTransform(e,t.toLowerCase())}const html$3=create({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:overloadedBoolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,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:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInl
1ine:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null},space:"html",transform:caseInsensitiveTransform}),svg$1=create({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
1-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:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,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:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,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:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,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:number,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,on
1Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,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:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:caseSensitiveTransform}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),xmlns=create({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()});var cap=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(e,t){let n=normalize(t),r=t,a=Info;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&valid.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(dash,camelcase);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!dash.test(e)){let n=e.replace(cap,kebab);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=DefinedInfo}return new a(r,t)}function kebab(e){return"-"+e.toLowerCase()}function camelcase(e){return e.charAt(1).toUpperCase()}const html=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");var own$2={}.hasOwnProperty;function zwitch(e,t){let n=t||{};function r(t,...n){let a=r.invalid,i=r.handlers;if(t&&own$2.call(t,e)){let n=String(t[e]);a=own$2.call(i,n)?i[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(e,t){return e=e.replace(t.subset?charactersToExpressionCached(t.subset):defaultSubsetRegex,n),t.subset||t.escapeOnly?e:e.replace(surrogatePairsRegex,function(e,n,r){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}).replace(controlCharactersRegex,n);function n(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function charactersToExpressionCached(e){let t=subsetToRegexCache.get(e);return t||(t=charactersToExpression(e),subsetToRegexCache.set(e,t)),t}function charactersToExpression(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(regexEscapeRegex,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}var hexadecimalRegex=/[\dA-Fa-f]/;function toHexadecimal(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!hexadecimalRegex.test(String.fromCharCode(t))?r:r+";"}var decimalRegex=/\d/;function toDecimal(e,t,n){let r="&#"+String(e);return n&&t&&!decimalRegex.test(String.fromCharCode(t))?r:r+";"}const characterEntitiesLegacy="AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocir
1c.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."),characterEntitiesHtml4={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
1:"â",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:"â¬"},dangerous=["cent","copy","divide","gt","lt","not","para","times"];var key,own$1={}.hasOwnProperty,characters={};for(key in characterEntitiesHtml4)own$1.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);var notAlphanumericRegex=/[^\dA-Za-z]/;function toNamed(e,t,n,r){let a=String.fromCharCode(e);if(own$1.call(characters,a)){let e=characters[a],i="&"+e;return n&&characterEntitiesLegacy.includes(e)&&!dangerous.includes(e)&&(!r||t&&61!==t&¬AlphanumericRegex.test(String.fromCharCode(t)))?i:i+";"}return""}function formatSmart(e,t,n){let r,a=toHexadecimal(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=toNamed(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=toDecimal(e,t,n.omitOptionalSemicolons);r.length<a.length&&(a=r)}return r&&(!n.useShortestReferences||r.length<a.length)?r:a}function stringifyEntities(e,t){return core(e,Object.assign({format:formatSmart},t))}var htmlCommentRegex=/^>|^->|<!--|-->|--!>|<!-$/g,bogusCommentEntitySubset=[">"],commentEntitySubset=["<",">"];function comment(e,t,n,r){return r.settings.bogusComments?"<?"+stringifyEntities(e.value,Object.assign({},r.settings.characterReferences,{subset:bogusCommentEntitySubset}))+">":"\x3c!--"+e.value.replace(htmlCommentRegex,function(e){return stringifyEntities(e,Object.assign({},r.settings.characterReferences,{subset:commentEntitySubset}))})+"--\x3e"}function doctype(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function ccount(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function stringify$1(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}function stringify$2(e){return e.join(" ").trim()}var re=/[ \t\n\f\r]/g;function whitespace(e){return"object"==typeof e?"text"===e.type&&empty(e.value):empty(e)}function empty(e){return""===e.replace(re,"")}const siblingAfter=siblings(1),siblingBefore=siblings(-1);var emptyChildren$1=[];function siblings(e){return function(t,n,r){let a=t?t.children:emptyChildren$1,i=(n||0)+e,o=a[i];if(!r)for(;o&&whitespace(o);)i+=e,o=a[i];return o}}var own={}.hasOwnProperty;function omission(e){return function(t,n,r){return own.call(e,t.tagName)&&e[t.tagName](t,n,r)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd:dd,dt:dt,head:headOrColgroupOrCaption,html:html$2,li:li,optgroup:optgroup,option:option,p:p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot:tfoot,th:cells,thead:thead,tr:tr});function headOrColgroupOrCaption(e,t,n){let r=siblingAfter(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&whitespace(r.value.charAt(0)))}function html$2(e,t,n){let r=siblingAfter(n,t);return!r||"comment"!==r.type}function body$1(e,t,n){let r=siblingAfter(n,t);return!r||"comment"!==r.type}function p(e,t,n){let r=siblingAfter(n,t);return r?"element"===r.type&&("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"===r.tagName):!n||!("element"===n.type&&("a"===n.tagName||"audio"===n.tagName||"del"===n.tagName||"ins"===n.tagName||"map"===n.tagName||"noscript"===n.tagName||"video"===n.tagName))}
1function li(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&"li"===r.tagName}function dt(e,t,n){let r=siblingAfter(n,t);return!(!r||"element"!==r.type||"dt"!==r.tagName&&"dd"!==r.tagName)}function dd(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)}function rubyElement(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function optgroup(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName}function option(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)}function thead(e,t,n){let r=siblingAfter(n,t);return!(!r||"element"!==r.type||"tbody"!==r.tagName&&"tfoot"!==r.tagName)}function tbody$1(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)}function tfoot(e,t,n){return!siblingAfter(n,t)}function tr(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&"tr"===r.tagName}function cells(e,t,n){let r=siblingAfter(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}const opening=omission({body:body,colgroup:colgroup,head:head,html:html$1,tbody:tbody});function html$1(e){let t=siblingAfter(e,-1);return!t||"comment"!==t.type}function head(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type}function body(e){let t=siblingAfter(e,-1,!0);return!(t&&("comment"===t.type||"text"===t.type&&whitespace(t.value.charAt(0))||"element"===t.type&&("meta"===t.tagName||"link"===t.tagName||"script"===t.tagName||"style"===t.tagName||"template"===t.tagName)))}function colgroup(e,t,n){let r=siblingBefore(n,t),a=siblingAfter(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&closing(r,n.children.indexOf(r),n))&&!(!a||"element"!==a.type||"col"!==a.tagName)}function tbody(e,t,n){let r=siblingBefore(n,t),a=siblingAfter(e,-1);return(!n||!r||"element"!==r.type||"thead"!==r.tagName&&"tbody"!==r.tagName||!closing(r,n.children.indexOf(r),n))&&!(!a||"element"!==a.type||"tr"!==a.tagName)}var constants={name:[["\t\n\f\r &/=>".split(""),"\t\n\f\r \"&'/=>`".split("")],["\0\t\n\f\r \"&'/<=>".split(""),"\0\t\n\f\r \"&'/<=>`".split("")]],unquoted:[["\t\n\f\r &>".split(""),"\0\t\n\f\r \"&'<=>`".split("")],["\0\t\n\f\r \"&'<=>`".split(""),"\0\t\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function element(e,t,n,r){let a,i=r.schema,o="svg"!==i.space&&r.settings.omitOptionalTags,s="svg"===i.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===i.space&&"svg"===e.tagName&&(r.schema=svg);let c=serializeAttributes(r,e.properties),u=r.all("html"===i.space&&"template"===e.tagName?e.content:e);return r.schema=i,u&&(s=!1),(c||!o||!opening(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),s&&("svg"===i.space||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===a||a&&'"'!==a&&"'"!==a)&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!s&&(!o||!closing(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function serializeAttributes(e,t){let n,r=[],a=-1;if(t)for(n in t)if(null!==t[n]&&void 0!==t[n]){let a=serializeAttribute(e,n,t[n]);a&&r.push(a)}for(;++a<r.length;){let t=e.settings.tightAttributes?r[a].charAt(r[a].length-1):void 0;a!==r.length-1&&'"'!==t&&"'"!==t&&(r[a]+=" ")}return r.join("")}function serializeAttribute(e,t,n){let r,a=find(e.schema,t),i=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=e.settings.allowDangerousCharacters?0:1,s=e.quote;if(!a.overloadedBoolean||n!==a.attribute&&""!==n?(a.boolean||a.overloadedBoolean)&&("string"!=typeof n||n===a.attribute||""===n)&&(n=!!n):n=!0,null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=stringifyEntities(a.attribute,Object.assign({},e.settings.characterReferences,{subset:constants.name[i][o]}));return!0===n||(n=Array.isArray(n)?(a.commaSeparated?stringify$1:stringify$2)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=stringifyEntities(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:constants.unquoted[i][o]}))),r!==n&&(e.settings.quoteSmart&&ccount(n,s)>ccount(n,e.alternative)&&(s=e.alternative),r=s+stringifyEntities(n,Object.assign({},e.settings.characterReferences,{subset:("'"===s?constants.single:constants.double)[i][o],attribute:!0}))+s),l+(r&&"="+r))}
1var textEntitySubset=["<","&"];function text(e,t,n,r){return!n||"element"!==n.type||"script"!==n.tagName&&"style"!==n.tagName?stringifyEntities(e.value,Object.assign({},r.settings.characterReferences,{subset:textEntitySubset})):e.value}function raw(e,t,n,r){return r.settings.allowDangerousHtml?e.value:text(e,t,n,r)}function root(e,t,n,r){return r.all(e)}const handle=zwitch("type",{invalid:invalid,unknown:unknown,handlers:{comment:comment,doctype:doctype,element:element,raw:raw,root:root,text:text}});function invalid(e){throw Error("Expected node, not `"+e+"`")}function unknown(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var emptyOptions={},emptyCharacterReferences={},emptyChildren=[];function toHtml(e,t){let n=t||emptyOptions,r=n.quote||'"',a='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:one,all:all,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||htmlVoidElements,characterReferences:n.characterReferences||emptyCharacterReferences,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?svg:html,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function one(e,t,n){return handle(e,t,n,this)}function all(e){let t=[],n=e&&e.children||emptyChildren,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function resolveColorReplacements(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,a]of Object.entries(t?.colorReplacements||{}))"string"==typeof a?n[e]=a:e===r&&Object.assign(n,a);return n}function applyColorReplacements(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function toArray(e){return Array.isArray(e)?e:[e]}async function normalizeGetter(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function isPlainLang(e){return!e||["plaintext","txt","text","plain"].includes(e)}function isSpecialLang(e){return"ansi"===e||isPlainLang(e)}function isNoneTheme(e){return"none"===e}function isSpecialTheme(e){return isNoneTheme(e)}function addClassToHast(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function splitLines(e,t=!1){let n=e.split(/(\r?\n)/g),r=0,a=[];for(let e=0;e<n.length;e+=2){let i=t?n[e]+(n[e+1]||""):n[e];a.push([i,r]),r+=n[e].length,r+=n[e+1]?.length||0}return a}function createPositionConverter(e){let t=splitLines(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,a=0;for(let e of t){if(r<e.length)break;r-=e.length,a++}return{line:a,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}}}function guessEmbeddedLanguages(e,t,n){let r=new Set;for(let t of e.matchAll(/lang=["']([\w-]+)["']/g))r.add(t[1]);for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(t[1]);for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g))r.add(t[1]);if(!n)return Array.from(r);let a=n.getBundledLanguages();return Array.from(r).filter(e=>e&&a[e])}var DEFAULT_COLOR_LIGHT_DARK="light-dark()",COLOR_KEYS=["color","background-color"];function splitToken(e,t){let n=0,r=[];for(let a of t)a>n&&r.push({...e,content:e.content.slice(n,a),offset:e.offset+n}),n=a;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function splitTokens(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>
1e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?splitToken(e,t):e})):e}function flatTokenVariants(e,t,n,r,a="css-vars"){let i={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>getTokenStyleObject(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{let a="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":a)};return o.forEach((e,n)=>{for(let i of s){let s=e[i]||"inherit";if(0===n&&r&&COLOR_KEYS.includes(i))if(r===DEFAULT_COLOR_LIGHT_DARK&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new ShikiError$1('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[i]=`light-dark(${o[e][i]||"inherit"}, ${o[r][i]||"inherit"})`,"css-vars"===a&&(l[c(n,i)]=s)}else l[i]=s;else"css-vars"===a&&(l[c(n,i)]=s)}}),i.htmlStyle=l,i}function getTokenStyleObject(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&FontStyle.Italic&&(t["font-style"]="italic"),e.fontStyle&FontStyle.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&FontStyle.Underline&&n.push("underline"),e.fontStyle&FontStyle.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function stringifyTokenStyle(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}var _grammarStateMap=new WeakMap;function setLastGrammarStateToMap(e,t){_grammarStateMap.set(e,t)}function getLastGrammarStateFromMap(e){return _grammarStateMap.get(e)}var GrammarState=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(toArray(n).map(e=>[e,INITIAL])),t)}constructor(...e){if(2===e.length){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return getScopes(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function getScopes(e){let t=[],n=new Set;return function e(r){if(n.has(r))return;n.add(r);let a=r?.nameScopesList?.scopeName;a&&t.push(a),r.parent&&e(r.parent)}(e),t}function getGrammarStack(e,t){if(!(e instanceof GrammarState))throw new ShikiError$1("Invalid grammar state");return e.getInternalStack(t)}function transformerDecorations(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new ShikiError$1(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new ShikiError$1(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=createPositionConverter(t.source),a=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));verifyIntersections(a),e.set(t.meta,{decorations:a,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return splitTokens(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new ShikiError$1(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function a(e,t,n,a){let i=r[e],s="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===1/0&&(c=i.children.length),-1===l||-1===c)for(let e=0;e<i.children.length;e++)s+=stringify(i.children[e]),-1===l&&s.length===t&&(l=e+1),-1===c&&s.length===n&&(c=e+1);if(-1===l)throw new ShikiError$1(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);
1if(-1===c)throw new ShikiError$1(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);let u=i.children.slice(l,c);if(a.alwaysWrap||u.length!==i.children.length)if(a.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};o(e,a,"wrapper"),i.children.splice(l,u.length,e)}else o(u[0],a,"token");else o(i,a,"line")}function i(e,t){r[e]=o(r[e],t,"line")}function o(e,t,n){let r=t.properties||{},a=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&addClassToHast(e,t.properties.class),e=a(e,n)||e}let s=[],l=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of l){let{start:t,end:n}=e;if(t.line===n.line)a(t.line,t.character,n.character,e);else if(t.line<n.line){a(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>i(r,e));a(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function verifyIntersections(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new ShikiError$1(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],a=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,i=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(a||i||o||s){if(a&&i||o&&s||o&&n.start.offset===n.end.offset||i&&t.start.offset===t.end.offset)continue;throw new ShikiError$1(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function stringify(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(stringify).join(""):""}var builtInTransformers=[transformerDecorations()];function getTransformers(e){let t=sortTransformersByEnforcement(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...builtInTransformers]}function sortTransformersByEnforcement(e){let t=[],n=[],r=[];for(let a of e)switch(a.enforce){case"pre":t.push(a);break;case"post":n.push(a);break;default:r.push(a)}return{pre:t,post:n,normal:r}}var namedColors=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],decorations={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function findSequence(e,t){let n=e.indexOf("�",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function parseColor(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));return 3!==t.length||t.some(e=>Number.isNaN(e))?void 0:{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}function parseSequence(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)decorations[r]&&t.push({type:"setDecoration",value:decorations[r]});else if(r<=29){let e=decorations[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:namedColors[r-30]}});else if(38===r){let n=parseColor(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:namedColors[r-40]}});else if(48===r){let n=parseColor(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:namedColors[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:namedColors[r-100+8]}})}return t}function createAnsiSequenceParser(){let e=null,t=null,n=new Set;return{parse(r){let a=[],i=0;do{let o=findSequence(r,i),s=o.sequence?r.substring(i,o.startPosition):r.substring(i);if(s.length>0&&a.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=parseSequence(o.sequence);for(let a of r)"resetAll"===a.type?(e=null,t=null,n.clear()):"resetForegroundColor"===a.type?e=null:"resetBackgroun
1dColor"===a.type?t=null:"resetDecoration"===a.type&&n.delete(a.value);for(let a of r)"setForegroundColor"===a.type?e=a.value:"setBackgroundColor"===a.type?t=a.value:"setDecoration"===a.type&&n.add(a.value)}i=o.position}while(i<r.length);return a}}}var defaultNamedColorsMap={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function createColorPalette(e=defaultNamedColorsMap){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}let r;function a(e){return function(){if(r)return r;r=[];for(let e=0;e<namedColors.length;e++)r.push(t(namedColors[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let a=0;a<6;a++)for(let i=0;i<6;i++)r.push(n([e[t],e[a],e[i]]));let a=8;for(let e=0;e<24;e++,a+=10)r.push(n([a,a,a]));return r}()[e]}return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return a(e.index)}}}}var defaultAnsiColors={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function tokenizeAnsiWithTheme(e,t,n){let r=resolveColorReplacements(e,n),a=splitLines(t),i=createColorPalette(Object.fromEntries(namedColors.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||defaultAnsiColors[t]]}))),o=createAnsiSequenceParser();return a.map(t=>o.parse(t[0]).map(n=>{let a,o;n.decorations.has("reverse")?(a=n.background?i.value(n.background):e.bg,o=n.foreground?i.value(n.foreground):e.fg):(a=n.foreground?i.value(n.foreground):e.fg,o=n.background?i.value(n.background):void 0),a=applyColorReplacements(a,r),o=applyColorReplacements(o,r),n.decorations.has("dim")&&(a=dimColor(a));let s=FontStyle.None;return n.decorations.has("bold")&&(s|=FontStyle.Bold),n.decorations.has("italic")&&(s|=FontStyle.Italic),n.decorations.has("underline")&&(s|=FontStyle.Underline),n.decorations.has("strikethrough")&&(s|=FontStyle.Strikethrough),{content:n.value,offset:t[1],color:a,bgColor:o,fontStyle:s}}))}function dimColor(e){let t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);if(t){if(t[3]){let e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map(e=>`${e}${e}`).join("")}80`}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function codeToTokensBase$1(e,t,n={}){let{lang:r="text",theme:a=e.getLoadedThemes()[0]}=n;if(isPlainLang(r)||isNoneTheme(a))return splitLines(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:o}=e.setTheme(a);if("ansi"===r)return tokenizeAnsiWithTheme(i,t,n);let s=e.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new ShikiError$1(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new ShikiError$1(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return tokenizeWithTheme(t,s,i,o,n)}function getLastGrammarState$1(...e){if(2===e.length)return getLastGrammarStateFromMap(e[1]);let[t,n,r={}]=e,{lang:a="text",theme:i=t.getLoadedThemes()[0]}=r;if(isPlainLang(a)||isNoneTheme(i))throw new ShikiError$1("Plain language does not have grammar state");if("ansi"===a)throw new ShikiError$1("ANSI language does not have grammar state");
1let{theme:o,colorMap:s}=t.setTheme(i),l=t.getLanguage(a);return new GrammarState(_tokenizeWithTheme(n,l,o,s,r).stateStack,l.name,o.name)}function tokenizeWithTheme(e,t,n,r,a){let i=_tokenizeWithTheme(e,t,n,r,a),o=new GrammarState(_tokenizeWithTheme(e,t,n,r,a).stateStack,t.name,n.name);return setLastGrammarStateToMap(i.tokens,o),i.tokens}function _tokenizeWithTheme(e,t,n,r,a){let i=resolveColorReplacements(n,a),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=a,l=splitLines(e),c=a.grammarState?getGrammarStack(a.grammarState,n.name)??INITIAL:null==a.grammarContextCode?INITIAL:_tokenizeWithTheme(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],p=[];for(let e=0,m=l.length;e<m;e++){let m,h,d,[g,f]=l[e];if(""===g){u=[],p.push([]);continue}if(o>0&&g.length>=o){u=[],p.push([{content:g,offset:f,color:"",fontStyle:0}]);continue}a.includeExplanation&&(m=t.tokenizeLine(g,c,s),h=m.tokens,d=0);let y=t.tokenizeLine2(g,c,s),b=y.tokens.length/2;for(let e=0;e<b;e++){let t=y.tokens[2*e],o=e+1<b?y.tokens[2*e+2]:g.length;if(t===o)continue;let s=y.tokens[2*e+1],l=applyColorReplacements(r[EncodedTokenMetadata.getForeground(s)],i),c=EncodedTokenMetadata.getFontStyle(s),p={content:g.substring(t,o),offset:f+t,color:l,fontStyle:c};if(a.includeExplanation){let e=[];
vendor: 3,561 bytes, line 1
1if("scopeName"!==a.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}p.explanation=[];let r=0;for(;t+r<o;){let t=h[d],n=g.substring(t.startIndex,t.endIndex);r+=n.length,p.explanation.push({content:n,scopes:"scopeName"===a.includeExplanation?explainThemeScopesNameOnly(t.scopes):explainThemeScopesFull(e,t.scopes)}),d+=1}}u.push(p)}p.push(u),u=[],c=y.ruleStack}return{tokens:p,stateStack:c}}function explainThemeScopesNameOnly(e){return e.map(e=>({scopeName:e}))}function explainThemeScopesFull(e,t){let n=[];for(let r=0,a=t.length;r<a;r++){let a=t[r];n[r]={scopeName:a,themeMatches:explainThemeScope(e,a,t.slice(0,r))}}return n}function matchesOne(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function matches(e,t,n){if(!matchesOne(e[e.length-1],t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)matchesOne(e[r],n[a])&&--r,--a;return-1===r}function explainThemeScope(e,t,n){let r=[];for(let{selectors:a,settings:i}of e)for(let e of a)if(matches(e,t,n)){r.push(i);break}return r}function codeToTokensWithThemes$1(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=r.map(r=>{let a=codeToTokensBase$1(e,t,{...n,theme:r.theme});return{tokens:a,state:getLastGrammarStateFromMap(a),theme:"string"==typeof r.theme?r.theme:r.theme.name}}),i=syncThemesTokenization(...a.map(e=>e.tokens)),o=i[0].map((e,t)=>e.map((e,a)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),i.forEach((e,n)=>{let{content:i,explanation:s,offset:l,...c}=e[t][a];o.variants[r[n].color]=c}),o})),s=a[0].state?new GrammarState(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return s&&setLastGrammarStateToMap(o,s),o}function syncThemesTokenization(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let a=e.map(e=>e[r]),i=t.map(()=>[]);t.forEach((e,t)=>e.push(i[t]));let o=a.map(()=>0),s=a.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(i[t].push(n),o[t]+=1,s[t]=a[t][o[t]]):(i[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function codeToTokens$1(e,t,n){let r,a,i,o,s,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:p="css-vars"}=n,m=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:t.color===c?1:0);if(0===m.length)throw new ShikiError$1("`themes` option must not be empty");let h=codeToTokensWithThemes$1(e,t,n);if(l=getLastGrammarStateFromMap(h),c&&DEFAULT_COLOR_LIGHT_DARK!==c&&!m.find(e=>e.color===c))throw new ShikiError$1(`\`themes\` option must contain the defaultColor key \`${c}\``);let d=m.map(t=>e.getTheme(t.theme)),g=m.map(e=>e.color);i=h.map(e=>e.map(e=>flatTokenVariants(e,g,u,c,p))),l&&setLastGrammarStateToMap(i,l);let f=m.map(e=>resolveColorReplacements(e.theme,n));a=mapThemeColors(m,d,f,u,c,"fg",p),r=mapThemeColors(m,d,f,u,c,"bg",p),o=`shiki-themes ${d.map(e=>e.name).join(" ")}`,s=c?void 0:[a,r].join(";")}else{if(!("theme"in n))throw new ShikiError$1("Invalid options, either `theme` or `themes` must be provided");{let s=resolveColorReplacements(n.theme,n);i=codeToTokensBase$1(e,t,n);let c=e.getTheme(n.theme);
1r=applyColorReplacements(c.bg,s),a=applyColorReplacements(c.fg,s),o=c.name,l=getLastGrammarStateFromMap(i)}}return{tokens:i,fg:a,bg:r,themeName:o,rootStyle:s,grammarState:l}}function mapThemeColors(e,t,n,r,a,i,o){return e.map((s,l)=>{let c=applyColorReplacements(t[l][i],n[l])||"inherit",u=`${r+s.color}${"bg"===i?"-bg":""}:${c}`;if(0===l&&a){if(a===DEFAULT_COLOR_LIGHT_DARK&&e.length>1){let r=e.findIndex(e=>"light"===e.color),a=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===a)throw new ShikiError$1('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${applyColorReplacements(t[r][i],n[r])||"inherit"}, ${applyColorReplacements(t[a][i],n[a])||"inherit"});${u}`}return c}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function codeToHast$1(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>codeToHast$1(e,t,n),codeToTokens:(t,n)=>codeToTokens$1(e,t,n)}){let a=t;for(let e of getTransformers(n))a=e.preprocess?.call(r,a,n)||a;let{tokens:i,fg:o,bg:s,themeName:l,rootStyle:c,grammarState:u}=codeToTokens$1(e,a,n),{mergeWhitespaces:p=!0,mergeSameStyleTokens:m=!1}=n;!0===p?i=mergeWhitespaceTokens(i):"never"===p&&(i=splitWhitespaceTokens(i)),m&&(i=mergeAdjacentStyledTokens(i));let h={...r,get source(){return a}};for(let e of getTransformers(n))i=e.tokens?.call(h,i)||i;return tokensToHast(i,{...n,fg:o,bg:s,themeName:l,rootStyle:c},h,u)}function tokensToHast(e,t,n,r=getLastGrammarStateFromMap(e)){let a=getTransformers(t),i=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,c={type:"element",tagName:"pre",properties:{class:`shiki ${t.themeName||""}`,style:t.rootStyle||`background-color:${t.bg};color:${t.fg}`,...!1!==l&&null!=l?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(t.meta||{})).filter(([e])=>!e.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:i},p=[],m={...n,structure:s,addClassToHast:addClassToHast,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return p}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&i.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let i of e){let e={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]},l=stringifyTokenStyle(i.htmlStyle||getTokenStyleObject(i));l&&(e.properties.style=l);for(let o of a)e=o?.span?.call(m,e,t+1,r,n,i)||e;"inline"===s?o.children.push(e):"classic"===s&&n.children.push(e),r+=i.content.length}if("classic"===s){for(let e of a)n=e?.line?.call(m,n,t+1)||n;p.push(n),i.push(n)}else"inline"===s&&p.push(n)}),"classic"===s){for(let e of a)u=e?.code?.call(m,u)||u;c.children.push(u);for(let e of a)c=e?.pre?.call(m,c)||c;o.children.push(c)}else if("inline"===s){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of a)n=e?.code?.call(m,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let h=o;for(let e of a)h=e?.root?.call(m,h)||h;return r&&setLastGrammarStateToMap(h,r),h}function mergeWhitespaceTokens(e){return e.map(e=>{let t=[],n="",r=0;return e.forEach((a,i)=>{let o=!(a.fontStyle&&(a.fontStyle&FontStyle.Underline||a.fontStyle&FontStyle.Strikethrough));o&&a.content.match(/^\s+$/)&&e[i+1]?(r||=a.offset,n+=a.content):n?(o?t.push({...a,offset:r,content:n+a.content}):t.push({content:n,offset:r},a),r=0,n=""):t.push(a)}),t})}function splitWhitespaceTokens(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,a]=t;if(!n&&!a)return e;let i=[{...e,offset:e.offset+n.length,content:r}];return n&&i.unshift({content:n,offset:e.offset}),a&&i.push({content:a,offset:e.offset+n.length+r.length}),i}))}function mergeAdjacentStyledTokens(e){return e.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=stringifyTokenStyle(e.htmlStyle||getTokenStyleObject(e)),a=stringifyTokenStyle(n.htmlStyle||getTokenStyleObject(n)),i=e.fontStyle&&(e.fontStyle&FontStyle.Underline||e.fontStyle&FontStyle.Strikethrough),o=n.fontStyle&&(n.fontStyle&FontStyle.Underline||n.fontStyle&FontStyle.Strikethrough);i||o||r!==a?t.push({...n}):e.content+=n.content}return t})}var hastToHtml=toHtml;
vendor: 4,419 bytes, line 1
1function codeToHtml$1(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>codeToHast$1(e,t,n),codeToTokens:(t,n)=>codeToTokens$1(e,t,n)},a=hastToHtml(codeToHast$1(e,t,n,r));for(let e of getTransformers(n))a=e.postprocess?.call(r,a,n)||a;return a}var VSCODE_FALLBACK_EDITOR_FG={light:"#333333",dark:"#bbbbbb"},VSCODE_FALLBACK_EDITOR_BG={light:"#fffffe",dark:"#1e1e1e"},RESOLVED_KEY="__shiki_resolved";function normalizeTheme(e){if(e?.[RESOLVED_KEY])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||="light"===t.type?VSCODE_FALLBACK_EDITOR_FG.light:VSCODE_FALLBACK_EDITOR_FG.dark,n||="light"===t.type?VSCODE_FALLBACK_EDITOR_BG.light:VSCODE_FALLBACK_EDITOR_BG.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0,i=new Map;function o(e){if(i.has(e))return i.get(e);a+=1;let n=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(i.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let a={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,a.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,a.settings.background=n}return a});for(let e of Object.keys(t.colors||{}))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,RESOLVED_KEY,{enumerable:!1,writable:!1,value:!0}),t}async function resolveLangs(e){return Array.from(new Set((await Promise.all(e.filter(e=>!isSpecialLang(e)).map(async e=>await normalizeGetter(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function resolveThemes(e){return(await Promise.all(e.map(async e=>isSpecialTheme(e)?null:normalizeTheme(await normalizeGetter(e))))).filter(e=>!!e)}var _emitDeprecation=3,_emitError=!1;function warnDeprecated(e,t=3){if(_emitDeprecation&&!("number"==typeof _emitDeprecation&&t>_emitDeprecation)){if(_emitError)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var ShikiError$2=class extends Error{constructor(e){super(e),this.name="ShikiError"}},Registry$1=class extends Registry{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=normalizeTheme(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Theme.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){let t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new ShikiError$2(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEac
1h(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t&&t.embeddedLangs?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new ShikiError$2(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Resolver=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}},instancesCount=0;function createShikiInternalSync(e){instancesCount+=1,!1!==e.warnings&&instancesCount>=10&&instancesCount%10==0&&console.warn(`[Shiki] ${instancesCount} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new ShikiError$2("`engine` option is required for synchronous mode");let n,r=(e.langs||[]).flat(1),a=(e.themes||[]).flat(1).map(normalizeTheme),i=new Registry$1(new Resolver(e.engine,r),a,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=i.getTheme(e);if(!t)throw new ShikiError$2(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){c(),i.loadLanguages(e.flat(1))}function l(...e){c();for(let t of e.flat(1))i.loadTheme(t)}function c(){if(t)throw new ShikiError$2("Shiki instance has been disposed")}function u(){t||(t=!0,i.dispose(),--instancesCount)}return{setTheme:function(e){c();let t=o(e);return n!==e&&(i.setTheme(t),n=e),{theme:t,colorMap:i.getColorMap()}},getTheme:o,getLanguage:function(e){c();let t=i.getGrammar("string"==typeof e?e:e.name);if(!t)throw new ShikiError$2(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),i.getLoadedThemes()},getLoadedLanguages:function(){return c(),i.getLoadedLanguages()},loadLanguage:async function(...e){return s(await resolveLangs(e))},loadLanguageSync:s,loadTheme:async function(...e){return c(),l(await resolveThemes(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}async function createShikiInternal(e){e.engine||warnDeprecated("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([resolveThemes(e.themes||[]),resolveLangs(e.langs||[]),e.engine]);return createShikiInternalSync({...e,themes:t,langs:n,engine:r})}async function createHighlighterCore(e){let t=await createShikiInternal(e);return{getLastGrammarState:(...e)=>
1getLastGrammarState$1(t,...e),codeToTokensBase:(e,n)=>codeToTokensBase$1(t,e,n),codeToTokensWithThemes:(e,n)=>codeToTokensWithThemes$1(t,e,n),codeToTokens:(e,n)=>codeToTokens$1(t,e,n),codeToHast:(e,n)=>codeToHast$1(t,e,n),codeToHtml:(e,n)=>codeToHtml$1(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function createBundledHighlighter(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function a(n){if("string"==typeof n){if(isSpecialLang(n))return[];n=e.langAlias?.[n]||n;let r=t[n];if(!r)throw new ShikiError$1(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function i(e){if(isSpecialTheme(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new ShikiError$1(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>i(e)),s=(e.langs??[]).map(e=>a(e)),l=await createHighlighterCore({engine:e.engine??r(),...e,themes:o,langs:s});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(a)),loadTheme:(...e)=>l.loadTheme(...e.map(i)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}function makeSingletonHighlighter(e){let t;return async function(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}}function createSingletonShorthands(e,t){let n=makeSingletonHighlighter(e);async function r(e,r){let a=await n({langs:[r.lang],themes:"theme"in r?[r.theme]:Object.values(r.themes)}),i=await(t?.guessEmbeddedLanguages?.(e,r.lang,a));return i&&await a.loadLanguage(...i),a}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await r(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await r(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await r(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await r(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await r(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}var bundledLanguagesInfo=[{id:"abap",name:"ABAP",import:()=>import("./abap-RV5vueiy.js")},{id:"actionscript-3",name:"ActionScript",import:()=>import("./actionscript-3-BzdO27us.js")},{id:"ada",name:"Ada",import:()=>import("./ada-BPxJg8hc.js")},{id:"angular-html",name:"Angular HTML",import:()=>import("./angular-html-veBtCP05.js")},{id:"angular-ts",name:"Angular TypeScript",import:()=>import("./angular-ts-Dz4eoUke.js")},{id:"apache",name:"Apache Conf",import:()=>import("./apache-cMFFRxvI.js")},{id:"apex",name:"Apex",import:()=>import("./apex-D_JFNc_A.js")},{id:"apl",name:"APL",import:()=>import("./apl-CmAYKZIS.js")},{id:"applescript",name:"AppleScript",import:()=>import("./applescript-DHKpj0Wa.js")},{id:"ara",name:"Ara",import:()=>import("./ara-BVeRxUJP.js")},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>import("./asciidoc-Dwevlww9.js")},{id:"asm",name:"Assembly",import:()=>import("./asm-DXZ11733.js")},{id:"astro",name:"Astro",import:()=>import("./astro-CbS_2Slt.js")},{id:"awk",name:"AWK",import:()=>import("./awk-4Ev4IW6D.js")},{id:"ballerina",name:"Ballerina",import:()=>import("./ballerina-Bks8Jkkw.js")},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>import("./bat-Bv6RrKAX.js")},{id:"beancount",name:"Beancount",import:()=>import("./beancount-BQ2PbDD_.js")},{id:"berry",name:"Berry",aliases:["be"],import:()=>import("./berry-CeQAKFDt.js")},{id:"bibtex",name:"BibTeX",import:()=>import("./bibtex-BaYwhddd.js")},{id:"bicep",name:"Bicep",import:()=>import("./bicep-qyxAK_q8.js")},{id:"blade",name:"Blade",import:()=>import("./blade-fuRT4h3J.js")},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>import("./bsl-C2HDEwLp.js")},{id:"c",name:"C",import:()=>import("./c-BDx7QhRI.js")},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>import("./cadence-DuI4qLkV.js")},{id:"cairo",name:"Cairo",import:()=>import("./cairo-XPxAu_cD.js")},{id:"clarity",name:"Clarity",import:()=>import("./clarity-DnSVlsKQ.js")},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>import("./clojure-CGaWxpuF.js")},{id:"cmake",name:"CMake",import:()=>import("./cmake-DRjMCJdZ.js")},{id:"cobol",name:"COBOL",import:()=>import("./cobol-DA5Bc8Fk.js")},{id:"codeowners",name:"CODEOWNERS",import:()=>import("./codeowners-DVs4tqlU.js")},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>import("./codeql-C_Z8vM3Q.js")},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>import("./coffee-B_fakY8E.js")},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>import("./common-lisp-GnJMf9vk.js")},{id:"coq",name:"Coq",import:()=>import("./coq-CtKL4JaA.js")},{id:"cpp",name:"C++",aliases:["c++"],import:()=>import("./cpp-C5P_TQqe.js")},{id:"crystal",name:"Crystal",import:()=>import("./crystal-C8x87wJr.js")}
1,{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>import("./csharp-Blrhxjki.js")},{id:"css",name:"CSS",import:()=>import("./css-D8Yo0Nqd.js")},{id:"csv",name:"CSV",import:()=>import("./csv-BQm2rl0A.js")},{id:"cue",name:"CUE",import:()=>import("./cue-DFWAC8vK.js")},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>import("./cypher-nKmRpwWE.js")},{id:"d",name:"D",import:()=>import("./d-CQ6tictV.js")},{id:"dart",name:"Dart",import:()=>import("./dart-CrIemx0-.js")},{id:"dax",name:"DAX",import:()=>import("./dax-tI492qPj.js")},{id:"desktop",name:"Desktop",import:()=>import("./desktop-BNmFdalp.js")},{id:"diff",name:"Diff",import:()=>import("./diff-8ee0E2a5.js")},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>import("./docker-BXuhdfWb.js")},{id:"dotenv",name:"dotEnv",import:()=>import("./dotenv-RwPxDqGt.js")},{id:"dream-maker",name:"Dream Maker",import:()=>import("./dream-maker-BIPOq3UV.js")},{id:"edge",name:"Edge",import:()=>import("./edge-DcCbjHrs.js")},{id:"elixir",name:"Elixir",import:()=>import("./elixir-CgdvJB_H.js")},{id:"elm",name:"Elm",import:()=>import("./elm-SooK0Fml.js")},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>import("./emacs-lisp-BSyMN4hQ.js")},{id:"erb",name:"ERB",import:()=>import("./erb-Bc1_xUR9.js")},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>import("./erlang-DmS-soki.js")},{id:"fennel",name:"Fennel",import:()=>import("./fennel-BJ0Y5cD9.js")},{id:"fish",name:"Fish",import:()=>import("./fish-BAYiOHXs.js")},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>import("./fluent-ClccNbJl.js")},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>import("./fortran-fixed-form-DFXh_jJ2.js")},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>import("./fortran-free-form-DE7a-V3i.js")},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>import("./fsharp-1U_6dYGg.js")},{id:"gdresource",name:"GDResource",import:()=>import("./gdresource-COkYupQ9.js")},{id:"gdscript",name:"GDScript",import:()=>import("./gdscript-CuIbCPyt.js")},{id:"gdshader",name:"GDShader",import:()=>import("./gdshader-CltMg1T8.js")},{id:"genie",name:"Genie",import:()=>import("./genie-C7ytCCq3.js")},{id:"gherkin",name:"Gherkin",import:()=>import("./gherkin-mRs8A53d.js")},{id:"git-commit",name:"Git Commit Message",import:()=>import("./git-commit-DjKz720_.js")},{id:"git-rebase",name:"Git Rebase Message",import:()=>import("./git-rebase-wBLNJ4oP.js")},{id:"gleam",name:"Gleam",import:()=>import("./gleam-D7CrimLJ.js")},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>import("./glimmer-js-DyDe06uh.js")},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>import("./glimmer-ts-BsnXGJGd.js")},{id:"glsl",name:"GLSL",import:()=>import("./glsl-WKWgfsze.js")},{id:"gnuplot",name:"Gnuplot",import:()=>import("./gnuplot-CHHAfk3W.js")},{id:"go",name:"Go",import:()=>import("./go-Be6Jnphf.js")},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>import("./graphql-CCHBohuS.js")},{id:"groovy",name:"Groovy",import:()=>import("./groovy-CjdeCjGJ.js")},{id:"hack",name:"Hack",import:()=>import("./hack-CRuh3X3Y.js")},{id:"haml",name:"Ruby Haml",import:()=>import("./haml-CEt0msqP.js")},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>import("./handlebars-ZbiTsm3y.js")},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>import("./haskell-C5j7apXD.js")},{id:"haxe",name:"Haxe",import:()=>import("./haxe-CzPW2tmr.js")},{id:"hcl",name:"HashiCorp HCL",import:()=>import("./hcl-io8ucavw.js")},{id:"hjson",name:"Hjson",import:()=>import("./hjson-C2QnfHu6.js")},{id:"hlsl",name:"HLSL",import:()=>import("./hlsl-Jn4R0axK.js")},{id:"html",name:"HTML",import:()=>import("./html-CDSyr7rQ.js")},{id:"html-derivative",name:"HTML (Derivative)",import:()=>import("./html-derivative-oqP7uDZ4.js")},{id:"http",name:"HTTP",import:()=>import("./http-COAwcfVB.js")},{id:"hurl",name:"Hurl",import:()=>import("./hurl-DRiUpUVF.js")},{id:"hxml",name:"HXML",import:()=>import("./hxml-BHohxdPH.js")},{id:"hy",name:"Hy",import:()=>
1import("./hy-Vg80cuE9.js")},{id:"imba",name:"Imba",import:()=>import("./imba-DgIUQZfn.js")},{id:"ini",name:"INI",aliases:["properties"],import:()=>import("./ini-DIVmaxu4.js")},{id:"java",name:"Java",import:()=>import("./java-DqOUZEgv.js")},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>import("./javascript-CQTUeIrN.js")},{id:"jinja",name:"Jinja",import:()=>import("./jinja-D9npqe7P.js")},{id:"jison",name:"Jison",import:()=>import("./jison-DAXEWfM4.js")},{id:"json",name:"JSON",import:()=>import("./json-BAoXw7c3.js")},{id:"json5",name:"JSON5",import:()=>import("./json5-CM_GkdaE.js")},{id:"jsonc",name:"JSON with Comments",import:()=>import("./jsonc-CyFOL6Nn.js")},{id:"jsonl",name:"JSON Lines",import:()=>import("./jsonl-DEWbF6yV.js")},{id:"jsonnet",name:"Jsonnet",import:()=>import("./jsonnet-B7UBEdJt.js")},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>import("./jssm-gg4zykSE.js")},{id:"jsx",name:"JSX",import:()=>import("./jsx-CbbI1WRu.js")},{id:"julia",name:"Julia",aliases:["jl"],import:()=>import("./julia-bsJueagq.js")},{id:"kdl",name:"KDL",import:()=>import("./kdl-DWsujCgU.js")},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>import("./kotlin-7CpzdOdB.js")},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>import("./kusto-CNzvqYcS.js")},{id:"latex",name:"LaTeX",import:()=>import("./latex-D8bEhoRl.js")},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>import("./lean-B3FJEOmX.js")},{id:"less",name:"Less",import:()=>import("./less-BSenpIfB.js")},{id:"liquid",name:"Liquid",import:()=>import("./liquid-CyIQ9v1y.js")},{id:"llvm",name:"LLVM IR",import:()=>import("./llvm-B74H7jDj.js")},{id:"log",name:"Log file",import:()=>import("./log-9IyWaM2k.js")},{id:"logo",name:"Logo",import:()=>import("./logo-o1rUv3PG.js")},{id:"lua",name:"Lua",import:()=>import("./lua-CI83vDFD.js")},{id:"luau",name:"Luau",import:()=>import("./luau-BIjwQdjt.js")},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>import("./make-Cm-cyPIx.js")},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>import("./markdown-OmeKZLWA.js")},{id:"marko",name:"Marko",import:()=>import("./marko-BPFmwsUO.js")},{id:"matlab",name:"MATLAB",import:()=>import("./matlab-HgcMS2nH.js")},{id:"mdc",name:"MDC",import:()=>import("./mdc-D6XQ9kbk.js")},{id:"mdx",name:"MDX",import:()=>import("./mdx-OVIlQtD-.js")},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>import("./mermaid-DZL24jfO.js")},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>import("./mipsasm-CBeBy97i.js")},{id:"mojo",name:"Mojo",import:()=>import("./mojo-D84UHbgC.js")},{id:"move",name:"Move",import:()=>import("./move-B7FSHgiR.js")},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>import("./narrat-I_pL48ns.js")},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>import("./nextflow-CrOHlcwk.js")},{id:"nginx",name:"Nginx",import:()=>import("./nginx-BnUlfmTT.js")},{id:"nim",name:"Nim",import:()=>import("./nim-C2SuaCjw.js")},{id:"nix",name:"Nix",import:()=>import("./nix-IietKlQc.js")},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>import("./nushell-Cun-jDBZ.js")},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>import("./objective-c-2k3XbYYJ.js")},{id:"objective-cpp",name:"Objective-C++",import:()=>import("./objective-cpp-X9ajjr1h.js")},{id:"ocaml",name:"OCaml",import:()=>import("./ocaml-DuU2eH_2.js")},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>import("./openscad-DS24EGGC.js")},{id:"pascal",name:"Pascal",import:()=>import("./pascal-D3CX7bHJ.js")},{id:"perl",name:"Perl",import:()=>import("./perl-qElJQZQj.js")},{id:"php",name:"PHP",import:()=>import("./php-Buqxr1Aw.js")},{id:"pkl",name:"Pkl",import:()=>import("./pkl-DiBgHWzw.js")},{id:"plsql",name:"PL/SQL",import:()=>import("./plsql-B0Y5lzLA.js")},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>import("./po-DH_2lVVI.js")},{id:"polar",name:"Polar",import:()=>import("./polar-B5UJqW2X.js")},{id:"postcss",name:"PostCSS",import:()=>import("./postcss-DJ5duRgE.js")},{id:"powerquery",name:"PowerQuery",import:()=>import("./powerquery-782B9lMX.js")},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>import("./powershell-C430fpLb.js")},{id:"prisma",name:"Prisma",import:()=>import("./prisma-CvweD45H.js")},{id:"prolog",name:"Prolog",import:()=>import("./prolog-D4wVZtB7.js")},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>import("./proto-DdvYvbZd.js")},{id:"pug",name:"Pug",aliases:["jade"],import:()=>import("./pug-CUbd7KHr.js")},{id:"puppet",name:"Puppet",import:()=>import("./puppet-CClzKUH9.js")},{id:"purescript",name:"PureScript",import:()=>import("./purescript-DHIg5VOR.js")},{id:"python",name:"Python",aliases:["py"],import:()=>import("./python-CDv4qsNj.js")},{id:"qml",name:"QML",import:()=>import("./qml-DyizqdVF.js")},{id:"qmldir",name:"QML Directory",import:()=>import("./qmldir-BtOqlgPr.js")},{id:"qss",name:"Qt Style Sheets",import:()=>import("./qss-ClrV3_Z9.js")},{id:"r",name:"R",import:()=>import("./r-Dzoos1Je.js")},{id:"racket",name:"Racket",import:()=>import("./racket-od71tNNk.js")},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>import("./raku-BafRw-D9.js")},{id:"razor",name:"ASP.NET Razor",import:()=>import("./razor-_oJH-0CK.js")},{id:"reg",name:"Windows Registry Script",import:()=>import("./reg-CEJ4u76_.js")},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>import("./regexp-Cf1MuY-Q.js")},{id:"rel",name:"Rel",import:()=>import("./rel-CqP7ei8l.js")},{id:"riscv",name:"RISC-V",import:()=>import("./riscv-MDRl54Sr.js")},{id:"rosmsg",name:"ROS Interface",import:()=>import("./rosmsg-CjPdTMH_.js")}
1,{id:"rst",name:"reStructuredText",import:()=>import("./rst-qM0jYrw3.js")},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>import("./ruby-D3elnVCo.js")},{id:"rust",name:"Rust",aliases:["rs"],import:()=>import("./rust-BmA7pwJq.js")},{id:"sas",name:"SAS",import:()=>import("./sas-Di1rpFCj.js")},{id:"sass",name:"Sass",import:()=>import("./sass-WBoQIb5a.js")},{id:"scala",name:"Scala",import:()=>import("./scala-oj3UWPYE.js")},{id:"scheme",name:"Scheme",import:()=>import("./scheme-D8elN4XP.js")},{id:"scss",name:"SCSS",import:()=>import("./scss-DW5FN4pg.js")},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>import("./sdbl-DyDIC4Je.js")},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>import("./shaderlab-HbYqk-Ez.js")},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>import("./shellscript-CJRAHGYP.js")},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>import("./shellsession-B48ReSpM.js")},{id:"smalltalk",name:"Smalltalk",import:()=>import("./smalltalk-CqpX258U.js")},{id:"solidity",name:"Solidity",import:()=>import("./solidity-DkHnQa-Q.js")},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>import("./soy-Crx0N47O.js")},{id:"sparql",name:"SPARQL",import:()=>import("./sparql-CZh_weHK.js")},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>import("./splunk-BpVxEntx.js")},{id:"sql",name:"SQL",import:()=>import("./sql-BtjBN5x2.js")},{id:"ssh-config",name:"SSH Config",import:()=>import("./ssh-config-CIhMiQRT.js")},{id:"stata",name:"Stata",import:()=>import("./stata-BeL1W4qb.js")},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>import("./stylus-P9B8i6Ey.js")},{id:"svelte",name:"Svelte",import:()=>import("./svelte-bsZdXdkl.js")},{id:"swift",name:"Swift",import:()=>import("./swift-BqM0f76n.js")},{id:"system-verilog",name:"SystemVerilog",import:()=>import("./system-verilog-Dp_c8B5u.js")},{id:"systemd",name:"Systemd Units",import:()=>import("./systemd-CvaSYMaZ.js")},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>import("./talonscript-Ddb-_Y3v.js")},{id:"tasl",name:"Tasl",import:()=>import("./tasl-CO-7B21N.js")},{id:"tcl",name:"Tcl",import:()=>import("./tcl-_xuswFTt.js")},{id:"templ",name:"Templ",import:()=>import("./templ-Cm7ee-Ma.js")},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>import("./terraform-VMq5spsp.js")}
1,{id:"tex",name:"TeX",import:()=>import("./tex-BXvnwRKj.js")},{id:"toml",name:"TOML",import:()=>import("./toml-D9bF_uF_.js")},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>import("./ts-tags-Dtimoe3s.js")},{id:"tsv",name:"TSV",import:()=>import("./tsv-Cgz-dXFB.js")},{id:"tsx",name:"TSX",import:()=>import("./tsx-blsqdTY1.js")},{id:"turtle",name:"Turtle",import:()=>import("./turtle-DSH4qasc.js")},{id:"twig",name:"Twig",import:()=>import("./twig-B7BiXFyG.js")},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>import("./typescript-BSQH0d5j.js")},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>import("./typespec-tIFNAaj2.js")},{id:"typst",name:"Typst",aliases:["typ"],import:()=>import("./typst-MYuShMdG.js")},{id:"v",name:"V",import:()=>import("./v-DjjRXhHH.js")},{id:"vala",name:"Vala",import:()=>import("./vala-CL2KKRaZ.js")},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>import("./vb-BXOkEAQZ.js")},{id:"verilog",name:"Verilog",import:()=>import("./verilog-B_82cXt0.js")},{id:"vhdl",name:"VHDL",import:()=>import("./vhdl-MfRYDMhK.js")},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>import("./viml-DyYsnmsh.js")},{id:"vue",name:"Vue",import:()=>import("./vue-ftaQ-hVu.js")},{id:"vue-html",name:"Vue HTML",import:()=>import("./vue-html-9JxBoWMY.js")},{id:"vue-vine",name:"Vue Vine",import:()=>import("./vue-vine-B_6QVA_L.js")},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>import("./vyper-Qc9g14Nx.js")},{id:"wasm",name:"WebAssembly",import:()=>import("./wasm-B7MK0zOH.js")},{id:"wenyan",name:"Wenyan",aliases:["æè¨"],import:()=>import("./wenyan-ruIYMbOV.js")},{id:"wgsl",name:"WGSL",import:()=>import("./wgsl-BxpTrJgJ.js")},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>import("./wikitext-Bj-P1mLu.js")},{id:"wit",name:"WebAssembly Interface Types",import:()=>import("./wit-CxyOfiBz.js")},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>import("./wolfram-ayTiXMoQ.js")},{id:"xml",name:"XML",import:()=>import("./xml-CcPxoyai.js")},{id:"xsl",name:"XSL",import:()=>import("./xsl-BJISk0PD.js")},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>import("./yaml-gWZX-E-a.js")},{id:"zenscript",name:"ZenScript",import:()=>import("./zenscript-yE-tXUy-.js")},{id:"zig",name:"Zig",import:()=>import("./zig-bpVmAFBc.js")}],bundledLanguagesBase=Object.fromEntries(bundledLanguagesInfo.map(e=>[e.id,e.import])),bundledLanguagesAlias=Object.fromEntries(bundledLanguagesInfo.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),bundledLanguages={...bundledLanguagesBase,...bundledLanguagesAlias},bundledThemes=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>import("./andromeeda-CZJCK9HY.js")},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>import("./aurora-x-CFdDB9H7.js")},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>import("./ayu-dark-DMTtjDbh.js")},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>import("./catppuccin-frappe-fiB3pZ9m.js")},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>import("./catppuccin-latte-Dw612eVl.js")},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>import("./catppuccin-macchiato-FJw0v7p-.js")},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>import("./catppuccin-mocha-Bqg0td2a.js")},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>import("./dark-plus-zlYzWbdw.js")},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>import("./dracula-DEnlBAol.js")},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>import("./dracula-soft-BdMW38QM.js")},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>import("./everforest-dark-CcZj7XZy.js")},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>import("./everforest-light-CKoYJvrr.js")},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>import("./github-dark-CzEcf93U.js")},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>import("./github-dark-default-BShFYEN6.js")},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>import("./github-dark-dimmed-4pWB8gPd.js")},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>import("./github-dark-high-contrast-BMTbjxgK.js")},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>import("./github-light-DXezaWei.js")},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>import("./github-light-default-GY8q0chO.js")},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>import("./github-light-high-contrast-CQUqTUSJ.js")},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>import("./gruvbox-dark-hard-BXYD9OCa.js")},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>import("./gruvbox-dark-medium-DOyq98ZY.js")},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>import("./gruvbox-dark-soft-wxouu2ha.js")},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>import("./gruvbox-light-hard-BPA1nJlm.js")},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>import("./gruvbox-light-medium-B87C6Pwu.js")},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>import("./gruvbox-light-soft-fLwO43xR.js")},{id:"houston",displayName:"Houston",type:"dark",import:()=>
1import("./houston-D-RYpXtD.js")},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>import("./kanagawa-dragon-z1k8MnBI.js")},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>import("./kanagawa-lotus-CYcrL89m.js")},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>import("./kanagawa-wave-B5LnxfIQ.js")},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>import("./laserwave-BPEifNUL.js")},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>import("./light-plus-CXzy4fKM.js")},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>import("./material-theme-CU8ubF-q.js")},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>import("./material-theme-darker-BCfTGBmM.js")},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>import("./material-theme-lighter-D8zbra7p.js")},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>import("./material-theme-ocean-4xdcAHIQ.js")},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>import("./material-theme-palenight-CAIxVYbC.js")},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>import("./min-dark-DkbHO2MG.js")},{id:"min-light",displayName:"Min Light",type:"light",import:()=>import("./min-light-CVHdqfqj.js")},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>import("./monokai-Dadhl-Qd.js")},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>import("./night-owl-BCxXJFX5.js")},{id:"nord",displayName:"Nord",type:"dark",import:()=>import("./nord-ylsID2bK.js")},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>import("./one-dark-pro-Cl9KXjuJ.js")},{id:"one-light",displayName:"One Light",type:"light",import:()=>import("./one-light-CTvYD9il.js")},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>import("./plastic-Bp3t9rFL.js")},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>import("./poimandres-D1jLitFH.js")},{id:"red",displayName:"Red",type:"dark",import:()=>import("./red-B1nr02oy.js")},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>import("./rose-pine-BI0lquUz.js")},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>import("./rose-pine-dawn-BPY2MIQe.js")},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>import("./rose-pine-moon-BqIhY7G6.js")},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>import("./slack-dark-BOZcuq0L.js")},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>import("./slack-ochin-B1Q9wadw.js")},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>import("./snazzy-light-Bv96R3Gp.js")},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>import("./solarized-dark-D2qnMms3.js")},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>import("./solarized-light-C9ItGPlz.js")},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>import("./synthwave-84-DC0E7ToD.js")},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>import("./tokyo-night-tQ2enwQP.js")},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>import("./vesper-BKzZMdJj.js")},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>import("./vitesse-black-DT3AO3LO.js")},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>import("./vitesse-dark-C1180uHn.js")},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>import("./vitesse-light-DA_MT7Ks.js")}].map(e=>[e.id,e.import])),ShikiError=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function getHeapMax(){return 2147483648}function _emscripten_get_now(){return typeof performance<"u"?performance.now():Date.now()}var alignUp=(e,t)=>e+(t-e%t)%t;async function main(e){let t,n,r={};function a(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function i(e){try{return t.grow(e-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}let o=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function s(e,t){return e?function(e,t,n=1024){let r=t+n,a=t;for(;e[a]&&!(a>=r);)++a;if(a-t>16&&e.buffer&&o)return o.decode(e.subarray(t,a));let i="";for(;t<a;){let n=e[t++];if(!(128&n)){i+=String.fromCharCode(n);continue}let r=63&e[t++];if(192==(224&n)){i+=String.fromCharCode((31&n)<<6|r);continue}let a=63&e[t++];if(n=224==(240&n)?(15&n)<<12|r<<6|a:(7&n)<<18|r<<12|a<<6|63&e[t++],n<65536)i+=String.fromCharCode(n);else{let e=n-65536;i+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return i}(r.HEAPU8,e,t):""}let l={emscripten_get_now:_emscripten_get_now,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let t=r.HEAPU8.length;e>>>=0;let n=getHeapMax();if(e>n)return!1;for(let r=1;r<=4;r*=2){let a=t*(1+.2/r);if(a=Math.min(a,e+100663296),i(Math.min(n,alignUp(Math.max(e,a),65536))))return!0}return!1},fd_write:()=>0};return await async function(){let n=await e({env:l,wasi_snapshot_preview1:l});t=n.memory,a(t.buffer),Object.assign(r,n),r.UTF8ToString=s}(),r}var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>
1__defNormalProp(e,"symbol"==typeof t?t:t+"",n),onigBinding=null;function throwLastOnigError(e){throw new ShikiError(e.UTF8ToString(e.getLastOnigError()))}var UtfString=class e{constructor(t){__publicField(this,"utf16Length"),__publicField(this,"utf8Length"),__publicField(this,"utf16Value"),__publicField(this,"utf8Value"),__publicField(this,"utf16OffsetToUtf8"),__publicField(this,"utf8OffsetToUtf16");let n=t.length,r=e._utf8ByteLength(t),a=r!==n,i=a?new Uint32Array(n+1):null;a&&(i[n]=r);let o=a?new Uint32Array(r+1):null;a&&(o[r]=n);let s=new Uint8Array(r),l=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),c=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(c=65536+(r-55296<<10)|n-56320,u=!0)}a&&(i[e]=l,u&&(i[e+1]=l),c<=127?o[l+0]=e:c<=2047?(o[l+0]=e,o[l+1]=e):c<=65535?(o[l+0]=e,o[l+1]=e,o[l+2]=e):(o[l+0]=e,o[l+1]=e,o[l+2]=e,o[l+3]=e)),c<=127?s[l++]=c:c<=2047?(s[l++]=192|(1984&c)>>>6,s[l++]=128|(63&c)>>>0):c<=65535?(s[l++]=224|(61440&c)>>>12,s[l++]=128|(4032&c)>>>6,s[l++]=128|(63&c)>>>0):(s[l++]=240|(1835008&c)>>>18,s[l++]=128|(258048&c)>>>12,s[l++]=128|(4032&c)>>>6,s[l++]=128|(63&c)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let a=e.charCodeAt(n),i=a,o=!1;if(a>=55296&&a<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(i=65536+(a-55296<<10)|t-56320,o=!0)}t+=i<=127?1:i<=2047?2:i<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},_OnigString=class e{constructor(t){if(__publicField(this,"id",++e.LAST_ID),__publicField(this,"_onigBinding"),__publicField(this,"content"),__publicField(this,"utf16Length"),__publicField(this,"utf8Length"),__publicField(this,"utf16OffsetToUtf8"),__publicField(this,"utf8OffsetToUtf16"),__publicField(this,"ptr"),!onigBinding)throw new ShikiError("Must invoke loadWasm first.");this._onigBinding=onigBinding,this.content=t;let n=new UtfString(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=onigBinding.omalloc(1e4),e._sharedPtrInUse=!0,onigBinding.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(onigBinding)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};__publicField(_OnigString,"LAST_ID",0),__publicField(_OnigString,"_sharedPtr",0),__publicField(_OnigString,"_sharedPtrInUse",!1);var initPromise,OnigString=_OnigString,OnigScanner=class{constructor(e){if(__publicField(this,"_onigBinding"),__publicField(this,"_ptr"),!onigBinding)throw new ShikiError("Must invoke loadWasm first.");let t=[],n=[];for(let r=0,a=e.length;r<a;r++){let a=new UtfString(e[r]);t[r]=a.createString(onigBinding),n[r]=a.utf8Length}let r=onigBinding.omalloc(4*e.length);onigBinding.HEAPU32.set(t,r/4);let a=onigBinding.omalloc(4*e.length);onigBinding.HEAPU32.set(n,a/4);let i=onigBinding.createOnigScanner(r,a,e.length);for(let n=0,r=e.length;n<r;n++)onigBinding.ofree(t[n]);onigBinding.ofree(a),onigBinding.ofree(r),0===i&&throwLastOnigError(onigBinding),this._onigBinding=onigBinding,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new OnigString(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let a=this._onigBinding,i=a.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===i)return null;let o=a.HEAPU32,s=i/4,l=o[s++],c=o[s++],u=[];for(let t=0;t<c;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}};function isInstantiatorOptionsObject(e){return"function"==typeof e.instantiator}function isInstantiatorModule(e){return"function"==typeof e.default}function isDataOptionsObject(e){return void 0!==e.data}function isResponse(e){return typeof Response<"u"&&e instanceof Response}function isArrayBuffer(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}function loadWasm(e){if(initPromise)return initPromise;return initPromise=async function(){onigBinding=await main(async t=>{let n=e;return n=await n,"function"==typeof n&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),isInstantiatorOptionsObject(n)?n=await n.instantiator(t):isInstantiatorModule(n)?n=await n.default(t):(isDataOptionsObject(n)&&(n=n.data),isResponse(n)?n="function"==typeof WebAssembly.instantiateStreaming?await _makeResponseStreamingLoader(n)(t):await _makeResponseNonStreamingLoader(n)(t):isArrayBuffer(n)||n instanceof WebAssembly.Module?n=await _makeArrayBufferLoader(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await _makeArrayBufferLoader(n.default)(t))),"instance"in n&&(n=n.instance),"exports"in n&&
1(n=n.exports),n})}(),initPromise}function _makeArrayBufferLoader(e){return t=>WebAssembly.instantiate(e,t)}function _makeResponseStreamingLoader(e){return t=>WebAssembly.instantiateStreaming(e,t)}function _makeResponseNonStreamingLoader(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function createOnigurumaEngine(e){return e&&await loadWasm(e),{createScanner:e=>new OnigScanner(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new OnigString(e)}}var{codeToHtml:codeToHtml,codeToHast:codeToHast,codeToTokens:codeToTokens,codeToTokensBase:codeToTokensBase,codeToTokensWithThemes:codeToTokensWithThemes,getSingletonHighlighter:getSingletonHighlighter,getLastGrammarState:getLastGrammarState}=createSingletonShorthands(createBundledHighlighter({langs:bundledLanguages,themes:bundledThemes,engine:()=>createOnigurumaEngine(import("./wasm-Ca5qiJxJ.js"))}),{guessEmbeddedLanguages:guessEmbeddedLanguages});export{codeToHtml,getSingletonHighlighter};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.