intlayer-editor 7.0.0-canary.3 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/{CodeBlockShiki-Da9FdWZC.js → CodeBlockShiki-DSxtdBJf.js} +2 -2
- package/client/dist/assets/{bundle-web-mXNhGq2u.js → bundle-web-BMXsc5R8.js} +2 -2
- package/client/dist/assets/{index-CUWL1CMm.js → index-IBF8ectu.js} +48 -48
- package/client/dist/index.html +1 -1
- package/package.json +24 -24
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-CGSbC7ds.js","assets/css-DPfMkruS.js","assets/javascript-Bu8dFlWd.js","assets/typescript-DtkYWpva.js","assets/json-BHNwtY8x.js","assets/html-derivative-BSjB4sSK.js","assets/html-C3HxQsge.js","assets/bundle-web-
|
|
2
|
-
import{r as h,j as n,C as l,_ as r}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vue-CGSbC7ds.js","assets/css-DPfMkruS.js","assets/javascript-Bu8dFlWd.js","assets/typescript-DtkYWpva.js","assets/json-BHNwtY8x.js","assets/html-derivative-BSjB4sSK.js","assets/html-C3HxQsge.js","assets/bundle-web-BMXsc5R8.js","assets/index-IBF8ectu.js","assets/index-DhJQvNNZ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as h,j as n,C as l,_ as r}from"./index-IBF8ectu.js";const u=new Map,c=new Map,d=async a=>{if(u.has(a))return u.get(a);let e;switch(a){case"typescript":case"ts":e=await r(()=>import("./typescript-DtkYWpva.js").then(t=>t.b),[]);break;case"javascript":case"js":e=await r(()=>import("./javascript-Bu8dFlWd.js").then(t=>t.b),[]);break;case"bash":case"sh":case"shell":e=await r(()=>import("./bash-SHvotRv0.js").then(t=>t.b),[]);break;case"json":e=await r(()=>import("./json-BHNwtY8x.js").then(t=>t.b),[]);break;case"tsx":e=await r(()=>import("./tsx-D7BNtDUy.js").then(t=>t.b),[]);break;case"vue":e=await r(()=>import("./vue-CGSbC7ds.js").then(t=>t.b),__vite__mapDeps([0,1,2,3,4,5,6]));break;case"html":e=await r(()=>import("./html-C3HxQsge.js").then(t=>t.b),__vite__mapDeps([6,2,1]));break;default:e=await r(()=>import("./typescript-DtkYWpva.js").then(t=>t.b),[]);break}const _=e.default;return u.set(a,_),_},E=async a=>{if(c.has(a))return c.get(a);let e;switch(a){case"github-dark":e=await r(()=>import("./github-dark-nz1Ug7wa.js").then(t=>t.a),[]);break;case"github-light":e=await r(()=>import("./github-light-hIqfNsk6.js").then(t=>t.a),[]);break;default:e=await r(()=>import("./github-light-hIqfNsk6.js").then(t=>t.a),[]);break}const _=e.default;return c.set(a,_),_},b=async(a,e,_)=>{const t=_?"github-dark":"github-light",[{codeToHtml:i},o,s]=await Promise.all([r(()=>import("./bundle-web-BMXsc5R8.js"),__vite__mapDeps([7,8,9])),d(e),E(t)]);return i(a,{lang:e,theme:s,langs:[o]})},p=({children:a,lang:e,isDarkMode:_})=>{const[t,i]=h.useState(null);return h.useEffect(()=>{let o=!1;return i(null),b(a,e,_).then(s=>{o||i(s)}).catch(()=>{o||i("")}),()=>{o=!0}},[a,e,_]),n.jsx("div",{style:{backgroundColor:"transparent",minWidth:0,maxWidth:"100%",overflow:"auto"},children:t?n.jsx("div",{dangerouslySetInnerHTML:{__html:t}}):n.jsx(l,{children:a})})};export{p as CodeBlockShiki};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BhtAKmdv.js","assets/html-C3HxQsge.js","assets/javascript-Bu8dFlWd.js","assets/css-DPfMkruS.js","assets/angular-ts-BeFqxUEK.js","assets/scss-OYdSNvt2.js","assets/astro-fnUV64w6.js","assets/json-BHNwtY8x.js","assets/typescript-DtkYWpva.js","assets/postcss-CXtECtnM.js","assets/tsx-D7BNtDUy.js","assets/blade-BXHw_pqF.js","assets/html-derivative-BSjB4sSK.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/sql-BLtJtn59.js","assets/coffee-Bn-gRTwi.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/graphql-DsDBh1Xd.js","assets/jsx-g9-lgVsj.js","assets/haml-DXac2MKr.js","assets/handlebars-DGp8LPLW.js","assets/yaml-Buea-lGh.js","assets/http-DCi7G6X5.js","assets/bash-SHvotRv0.js","assets/jinja-DRFn41Dg.js","assets/jison-D2rCaaX8.js","assets/julia-CKK9Si6J.js","assets/python-B6aJPvgy.js","assets/r-DiinP2Uv.js","assets/marko-oTM4hF24.js","assets/less-B1dDrJ26.js","assets/mdc-CnEUHEQ0.js","assets/markdown-Cvjx9yec.js","assets/php-BVkpE1Rs.js","assets/pug-Cxa3IGBH.js","assets/svelte-Dn5bEqJ2.js","assets/ts-tags-o7tE_SiD.js","assets/vue-CGSbC7ds.js","assets/vue-html-2e51hq9W.js","assets/vue-vine-BIRRuYKM.js","assets/stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as d}from"./index-CUWL1CMm.js";let R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Cn(t){return Qe(t)}function Qe(t){return Array.isArray(t)?Rn(t):t instanceof RegExp?t:typeof t=="object"?Tn(t):t}function Rn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Qe(t[n]);return e}function Tn(t){let e={};for(let n in t)e[n]=Qe(t[n]);return e}function Nt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function xt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?xt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ce=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,i,o,s)=>{let l=n[parseInt(i||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Mt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let o=Dt(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function ht(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Bt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Gt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ge=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Pn(t),e)}static createFromParsedTheme(t,e){return On(t,e)}_cachedMatchRoot=new Gt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>An(t.parent,i.parentScopes));return r?new Vt(r.fontStyle,r.foreground,r.background):null}},Ne=class pe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new pe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new pe(n,e[r]);return n}push(e){return new pe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function An(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Ln(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Ln(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Vt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Pn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let h=s.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let h=s.settings.fontStyle.split(" ");for(let m=0,p=h.length;m<p;m++)switch(h[m]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof s.settings.foreground=="string"&&ht(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&ht(s.settings.background)&&(u=s.settings.background);for(let h=0,m=l.length;h<m;h++){let f=l[h].trim().split(" "),v=f[f.length-1],b=null;f.length>1&&(b=f.slice(0,f.length-1),b.reverse()),n[r++]=new In(v,b,i,a,c,u)}}return n}var In=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},O=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(O||{});function On(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Mt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let o=new Nn(e),s=new Vt(n,o.getId(r),o.getId(i)),l=new Dn(new je(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new ge(o,s,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xn=Object.freeze([]),je=class jt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,o){this.scopeDepth=e,this.parentScopes=n||xn,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new jt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Dn=class $e{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort($e._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new $e(this._mainRule.clone(),je.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(Mt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new je(e,n,r,i,o))}},Y=class D{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=D.getLanguageId(e),r=D.getTokenType(e),i=D.getFontStyle(e),o=D.getForeground(e),s=D.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,o,s,l){let a=D.getLanguageId(e),c=D.getTokenType(e),u=D.containsBalancedBrackets(e)?1:0,h=D.getFontStyle(e),m=D.getForeground(e),p=D.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(h=o),s!==0&&(m=s),l!==0&&(p=l),(a<<0|c<<8|u<<10|h<<11|m<<15|p<<24)>>>0}};function _e(t,e){const n=[],r=Mn(t);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(n.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=l();return i===")"&&(i=r.next()),a}if(dt(i)){const a=[];do a.push(i),i=r.next();while(dt(i));return c=>e(a,c)}return null}function s(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>a.some(h=>h(u))}}function dt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Mn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function $t(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Bn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Vn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)jn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function jn(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?fe({baseGrammar:o,selfGrammar:i},r):Ue(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const l of s)r.add(new te(l))}function Ue(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];ye([r],e,n)}}function fe(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Nt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ye(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=Ut(o);switch(s.kind){case 0:fe({...e,selfGrammar:e.baseGrammar},n);break;case 1:fe(e,n);break;case 2:Ue(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const l=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:i};s.kind===4?Ue(s.ruleName,a,n):fe(a,n)}else s.kind===4?n.add(new Bn(s.scopeName,s.ruleName)):n.add(new te(s.scopeName));break}}}var $n=class{kind=0},Un=class{kind=1},Hn=class{constructor(t){this.ruleName=t}kind=2},Wn=class{constructor(t){this.scopeName=t}kind=3},zn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Ut(t){if(t==="$base")return new $n;if(t==="$self")return new Un;const e=t.indexOf("#");if(e===-1)return new Wn(t);if(e===0)return new Hn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new zn(n,r)}}var Fn=/\\(\d+)/,pt=/\\(\d+)/g,qn=-1,Ht=-2;var ae=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=ce.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ce.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${xt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:ce.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ce.replaceCaptures(this._contentName,t,e)}},Kn=class extends ae{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends ae{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ft=class extends ae{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends ae{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,o,s,l,a,c){super(t,e,n,r),this._begin=new ne(i,this.id),this.beginCaptures=o,this._end=new ne(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},be=class extends ae{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,o,s,l,a){super(t,e,n,r),this._begin=new ne(i,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(s,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Wt=class I{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new Kn(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,I._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Nt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ft(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,I._compilePatterns(o,n,r))}return e.while?new be(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,I._compileCaptures(e.whileCaptures||e.captures,n,r),I._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,I._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,I._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;e[s].patterns&&(a=I.getCompiledRuleId(e[s],n,r)),i[l]=I.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const l=e[o];let a=-1;if(l.include){const c=Ut(l.include);switch(c.kind){case 0:case 1:a=I.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=I.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,m=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(h,r);if(p)if(m){let f=p.repository[m];f&&(a=I.getCompiledRuleId(f,n,p.repository))}else a=I.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=I.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof ft||c instanceof He||c instanceof be)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},ne=class zt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(i,l)),o.push("$(?!\\n)(?<!\\n)"),i=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Fn.test(this.source):this.hasBackReferences=!1}clone(){return new zt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return pt.lastIndex=0,this.source.replace(pt,(i,o)=>Bt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,i[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new mt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new mt(t,r,this._items.map(i=>i.ruleId))}},mt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
import{_ as d}from"./index-IBF8ectu.js";let R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Cn(t){return Qe(t)}function Qe(t){return Array.isArray(t)?Rn(t):t instanceof RegExp?t:typeof t=="object"?Tn(t):t}function Rn(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Qe(t[n]);return e}function Tn(t){let e={};for(let n in t)e[n]=Qe(t[n]);return e}function Nt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function xt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?xt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ce=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,i,o,s)=>{let l=n[parseInt(i||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Mt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let o=Dt(t[i],e[i]);if(o!==0)return o}return 0}return n-r}function ht(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Bt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Gt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},ge=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Pn(t),e)}static createFromParsedTheme(t,e){return On(t,e)}_cachedMatchRoot=new Gt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>An(t.parent,i.parentScopes));return r?new Vt(r.fontStyle,r.foreground,r.background):null}},Ne=class pe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new pe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new pe(n,e[r]);return n}push(e){return new pe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function An(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Ln(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Ln(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Vt=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Pn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let h=s.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let h=s.settings.fontStyle.split(" ");for(let m=0,p=h.length;m<p;m++)switch(h[m]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof s.settings.foreground=="string"&&ht(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&ht(s.settings.background)&&(u=s.settings.background);for(let h=0,m=l.length;h<m;h++){let f=l[h].trim().split(" "),v=f[f.length-1],b=null;f.length>1&&(b=f.slice(0,f.length-1),b.reverse()),n[r++]=new In(v,b,i,a,c,u)}}return n}var In=class{constructor(t,e,n,r,i,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},O=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(O||{});function On(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Mt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let o=new Nn(e),s=new Vt(n,o.getId(r),o.getId(i)),l=new Dn(new je(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new ge(o,s,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xn=Object.freeze([]),je=class jt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,i,o){this.scopeDepth=e,this.parentScopes=n||xn,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new jt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Dn=class $e{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort($e._cmpBySpecificity),n}insert(e,n,r,i,o,s){if(n===""){this._doInsertHere(e,r,i,o,s);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new $e(this._mainRule.clone(),je.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(Mt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new je(e,n,r,i,o))}},Y=class D{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=D.getLanguageId(e),r=D.getTokenType(e),i=D.getFontStyle(e),o=D.getForeground(e),s=D.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,o,s,l){let a=D.getLanguageId(e),c=D.getTokenType(e),u=D.containsBalancedBrackets(e)?1:0,h=D.getFontStyle(e),m=D.getForeground(e),p=D.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(h=o),s!==0&&(m=s),l!==0&&(p=l),(a<<0|c<<8|u<<10|h<<11|m<<15|p<<24)>>>0}};function _e(t,e){const n=[],r=Mn(t);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(n.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=l();return i===")"&&(i=r.next()),a}if(dt(i)){const a=[];do a.push(i),i=r.next();while(dt(i));return c=>e(a,c)}return null}function s(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>a.some(h=>h(u))}}function dt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Mn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function $t(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Bn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Vn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)jn(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function jn(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?fe({baseGrammar:o,selfGrammar:i},r):Ue(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(t.scopeName);if(s)for(const l of s)r.add(new te(l))}function Ue(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];ye([r],e,n)}}function fe(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Nt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&ye(r.patterns,{...e,repository:i},n);const o=r.include;if(!o)continue;const s=Ut(o);switch(s.kind){case 0:fe({...e,selfGrammar:e.baseGrammar},n);break;case 1:fe(e,n);break;case 2:Ue(s.ruleName,{...e,repository:i},n);break;case 3:case 4:const l=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:i};s.kind===4?Ue(s.ruleName,a,n):fe(a,n)}else s.kind===4?n.add(new Bn(s.scopeName,s.ruleName)):n.add(new te(s.scopeName));break}}}var $n=class{kind=0},Un=class{kind=1},Hn=class{constructor(t){this.ruleName=t}kind=2},Wn=class{constructor(t){this.scopeName=t}kind=3},zn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Ut(t){if(t==="$base")return new $n;if(t==="$self")return new Un;const e=t.indexOf("#");if(e===-1)return new Wn(t);if(e===0)return new Hn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new zn(n,r)}}var Fn=/\\(\d+)/,pt=/\\(\d+)/g,qn=-1,Ht=-2;var ae=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=ce.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ce.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${xt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:ce.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ce.replaceCaptures(this._contentName,t,e)}},Kn=class extends ae{retokenizeCapturedWithRuleId;constructor(t,e,n,r,i){super(t,e,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends ae{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ft=class extends ae{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i){super(t,e,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends ae{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,i,o,s,l,a,c){super(t,e,n,r),this._begin=new ne(i,this.id),this.beginCaptures=o,this._end=new ne(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},be=class extends ae{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,i,o,s,l,a){super(t,e,n,r),this._begin=new ne(i,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(s,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Wt=class I{static createCaptureRule(e,n,r,i,o){return e.registerRule(s=>new Kn(n,s,r,i,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,I._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Nt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ft(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,I._compilePatterns(o,n,r))}return e.while?new be(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,I._compileCaptures(e.whileCaptures||e.captures,n,r),I._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,I._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,I._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,I._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;e[s].patterns&&(a=I.getCompiledRuleId(e[s],n,r)),i[l]=I.createCaptureRule(n,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const l=e[o];let a=-1;if(l.include){const c=Ut(l.include);switch(c.kind){case 0:case 1:a=I.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=I.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,m=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(h,r);if(p)if(m){let f=p.repository[m];f&&(a=I.getCompiledRuleId(f,n,p.repository))}else a=I.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=I.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof ft||c instanceof He||c instanceof be)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},ne=class zt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(i,l)),o.push("$(?!\\n)(?<!\\n)"),i=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Fn.test(this.source):this.hasBackReferences=!1}clone(){return new zt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return pt.lastIndex=0,this.source.replace(pt,(i,o)=>Bt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,i[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new mt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new mt(t,r,this._items.map(i=>i.ruleId))}},mt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},xe=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Jn=class We{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new xe(e,8),this._embeddedLanguagesMatcher=new Xn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?We._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new xe(0,0);_getBasicScopeAttributes=new Gt(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new xe(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(We.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Xn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Bt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},gt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Ft(t,e,n,r,i,o,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const p=Qn(t,e,n,r,i,o);i=p.stack,r=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new gt(i,!0);m()}return new gt(i,!1);function m(){const p=Zn(t,e,n,r,i,u);if(!p){o.produce(i,a),c=!0;return}const f=p.captureIndices,v=p.matchedRuleId,b=f&&f.length>0?f[0].end>r:!1;if(v===qn){const y=i.getRule(t);o.produce(i,f[0].start),i=i.withContentNameScopesList(i.nameScopesList),Z(t,e,n,i,o,y.endCaptures,f),o.produce(i,f[0].end);const _=i;if(i=i.parent,u=_.getAnchorPos(),!b&&_.getEnterPos()===r){i=_,o.produce(i,a),c=!0;return}}else{const y=t.getRule(v);o.produce(i,f[0].start);const _=i,S=y.getName(e.content,f),T=i.contentNameScopesList.pushAttributed(S,t);if(i=i.push(v,r,u,f[0].end===a,null,T,T),y instanceof He){const E=y;Z(t,e,n,i,o,E.beginCaptures,f),o.produce(i,f[0].end),u=f[0].end;const M=E.getContentName(e.content,f),$=T.pushAttributed(M,t);if(i=i.withContentNameScopesList($),E.endHasBackReferences&&(i=i.withEndRule(E.getEndWithResolvedBackReferences(e.content,f))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(y instanceof be){const E=y;Z(t,e,n,i,o,E.beginCaptures,f),o.produce(i,f[0].end),u=f[0].end;const M=E.getContentName(e.content,f),$=T.pushAttributed(M,t);if(i=i.withContentNameScopesList($),E.whileHasBackReferences&&(i=i.withEndRule(E.getWhileWithResolvedBackReferences(e.content,f))),!b&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(Z(t,e,n,i,o,y.captures,f),o.produce(i,f[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,a),c=!0;return}}f[0].end>r&&(r=f[0].end,n=!1)}}function Qn(t,e,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const l=[];for(let a=i;a;a=a.pop()){const c=a.getRule(t);c instanceof be&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=nr(a.rule,t,a.stack.endRule,n,r===s),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Ht){i=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),Z(t,e,n,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.produce(a.stack,h.captureIndices[0].end),s=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function Zn(t,e,n,r,i,o){const s=er(t,e,n,r,i,o),l=t.getInjections();if(l.length===0)return s;const a=tr(l,t,e,n,r,i,o);if(!a)return s;if(!s)return a;const c=s.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:s}function er(t,e,n,r,i,o){const s=i.getRule(t),{ruleScanner:l,findOptions:a}=qt(s,t,i.endRule,n,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function tr(t,e,n,r,i,o,s){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let m=0,p=t.length;m<p;m++){const f=t[m];if(!f.matcher(h))continue;const v=e.getRule(f.ruleId),{ruleScanner:b,findOptions:y}=qt(v,e,null,r,i===s),_=b.findNextMatchSync(n,i,y);if(!_)continue;const S=_.captureIndices[0].start;if(!(S>=l)&&(l=S,a=_.captureIndices,c=_.ruleId,u=f.priority,l===i))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function qt(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function nr(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function Z(t,e,n,r,i,o,s){if(o.length===0)return;const l=e.content,a=Math.min(o.length,s.length),c=[],u=s[0].end;for(let h=0;h<a;h++){const m=o[h];if(m===null)continue;const p=s[h];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,p.start):i.produce(r,p.start),m.retokenizeCapturedWithRuleId){const v=m.getName(l,s),b=r.contentNameScopesList.pushAttributed(v,t),y=m.getContentName(l,s),_=b.pushAttributed(y,t),S=r.push(m.retokenizeCapturedWithRuleId,p.start,-1,!1,null,b,_),T=t.createOnigString(l.substring(0,p.end));Ft(t,T,n&&p.start===0,p.start,S,i,!1,0),$t(T);continue}const f=m.getName(l,s);if(f!==null){const b=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(f,t);c.push(new rr(b,p.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var rr=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function ir(t,e,n,r,i,o,s,l){return new sr(t,e,n,r,i,o,s,l)}function _t(t,e,n,r,i){const o=_e(e,Se),s=Wt.getCompiledRuleId(n,r,i.repository);for(const l of o)t.push({debugSelector:e,matcher:l.matcher,ruleId:s,grammar:i,priority:l.priority})}function Se(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(or(e[i],r))return n=i+1,!0;return!1})}function or(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var sr=class{constructor(t,e,n,r,i,o,s,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Jn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=yt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const c=_e(a,Se);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)_t(e,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&_t(e,a,l,this,l)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=yt(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Wt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===ze.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Y.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),m=this.getRule(this._rootId).getName(null,null);let p;m?p=ee.createRootAndLookUpScopeName(m,h,this):p=ee.createRoot("unknown",h),e=new ze(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),s=o.content.length,l=new lr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Ft(this,o,i,0,e,l,!0,r);return $t(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function yt(t,e){return t=Cn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ee=class B{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=e?.scopePath??null;for(const o of n)i=Ne.push(i,o.scopeNames),r=new B(r,i,o.encodedTokenAttributes);return r}static createRoot(e,n){return new B(null,new Ne(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),o=new Ne(null,e),s=r.themeProvider.themeMatch(o),l=B.mergeAttributes(n,i,s);return new B(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return B.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),Y.set(e,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return B._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const o of r)i=B._pushAttributed(i,o,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),o=e.scopePath.push(n),s=r.themeProvider.themeMatch(o),l=B.mergeAttributes(e.tokenAttributes,i,s);return new B(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},ze=class U{constructor(e,n,r,i,o,s,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new U(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:U._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ee.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){U._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,o,s,l){return new U(this,e,n,r,i,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new U(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=ee.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new U(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ee.fromExtension(r,n.contentNameScopesList))}},ar=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):_e(n,Se).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>_e(n,Se).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},lr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=Y.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Y.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},cr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,ir(t,o,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},ur=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new cr(ge.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(ge.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ar(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,o){const s=new Vn(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(e,n,r,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,o)}},Fe=ze.NULL;const hr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class le{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}le.prototype.normal={};le.prototype.property={};le.prototype.space=void 0;function Kt(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new le(n,r,e)}function qe(t){return t.toLowerCase()}class N{constructor(e,n){this.attribute=n,this.property=e}}N.prototype.attribute="";N.prototype.booleanish=!1;N.prototype.boolean=!1;N.prototype.commaOrSpaceSeparated=!1;N.prototype.commaSeparated=!1;N.prototype.defined=!1;N.prototype.mustUseProperty=!1;N.prototype.number=!1;N.prototype.overloadedBoolean=!1;N.prototype.property="";N.prototype.spaceSeparated=!1;N.prototype.space=void 0;let dr=0;const k=W(),C=W(),Ke=W(),g=W(),w=W(),q=W(),x=W();function W(){return 2**++dr}const Ye=Object.freeze(Object.defineProperty({__proto__:null,boolean:k,booleanish:C,commaOrSpaceSeparated:x,commaSeparated:q,number:g,overloadedBoolean:Ke,spaceSeparated:w},Symbol.toStringTag,{value:"Module"})),De=Object.keys(Ye);class Ze extends N{constructor(e,n,r,i){let o=-1;if(super(e,n),bt(this,"space",i),typeof r=="number")for(;++o<De.length;){const s=De[o];bt(this,De[o],(r&Ye[s])===Ye[s])}}}Ze.prototype.defined=!0;function bt(t,e,n){n&&(t[e]=n)}function J(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const o=new Ze(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[qe(r)]=r,n[qe(o.attribute)]=r}return new le(e,n,t.space)}const Yt=J({properties:{ariaActiveDescendant:null,ariaAtomic:C,ariaAutoComplete:null,ariaBusy:C,ariaChecked:C,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:w,ariaCurrent:null,ariaDescribedBy:w,ariaDetails:null,ariaDisabled:C,ariaDropEffect:w,ariaErrorMessage:null,ariaExpanded:C,ariaFlowTo:w,ariaGrabbed:C,ariaHasPopup:null,ariaHidden:C,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:w,ariaLevel:g,ariaLive:null,ariaModal:C,ariaMultiLine:C,ariaMultiSelectable:C,ariaOrientation:null,ariaOwns:w,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:C,ariaReadOnly:C,ariaRelevant:null,ariaRequired:C,ariaRoleDescription:w,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:C,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Jt(t,e){return e in t?t[e]:e}function Xt(t,e){return Jt(t,e.toLowerCase())}const pr=J({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:w,accessKey:w,action:null,allow:null,allowFullScreen:k,allowPaymentRequest:k,allowUserMedia:k,alt:null,as:null,async:k,autoCapitalize:null,autoComplete:w,autoFocus:k,autoPlay:k,blocking:w,capture:null,charSet:null,checked:k,cite:null,className:w,cols:g,colSpan:null,content:null,contentEditable:C,controls:k,controlsList:w,coords:g|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:k,defer:k,dir:null,dirName:null,disabled:k,download:Ke,draggable:C,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:k,formTarget:null,headers:w,height:g,hidden:Ke,high:g,href:null,hrefLang:null,htmlFor:w,httpEquiv:w,id:null,imageSizes:null,imageSrcSet:null,inert:k,inputMode:null,integrity:null,is:null,isMap:k,itemId:null,itemProp:w,itemRef:w,itemScope:k,itemType:w,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:k,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:k,muted:k,name:null,nonce:null,noModule:k,noValidate:k,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:k,optimum:g,pattern:null,ping:w,placeholder:null,playsInline:k,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:k,referrerPolicy:null,rel:w,required:k,reversed:k,rows:g,rowSpan:g,sandbox:w,scope:null,scoped:k,seamless:k,selected:k,shadowRootClonable:k,shadowRootDelegatesFocus:k,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:C,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:k,useMap:null,value:C,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:w,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:k,declare:k,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:k,noHref:k,noShade:k,noWrap:k,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:C,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:k,disableRemotePlayback:k,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:Xt}),fr=J({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:x,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:w,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:k,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:x,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:w,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:x,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:x,rev:x,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:x,requiredFeatures:x,requiredFonts:x,requiredFormats:x,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:x,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:x,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:x,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jt}),Qt=J({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Zt=J({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xt}),en=J({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),mr=/[A-Z]/g,St=/-[a-z]/g,gr=/^data[-\w.:]+$/i;function _r(t,e){const n=qe(e);let r=e,i=N;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&gr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(St,br);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!St.test(o)){let s=o.replace(mr,yr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=Ze}return new i(r,e)}function yr(t){return"-"+t.toLowerCase()}function br(t){return t.charAt(1).toUpperCase()}const Sr=Kt([Yt,pr,Qt,Zt,en],"html"),tn=Kt([Yt,fr,Qt,Zt,en],"svg"),vt={}.hasOwnProperty;function vr(t,e){const n=e||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&vt.call(i,t)){const a=String(i[t]);s=vt.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const kr=/["&'<>`]/g,wr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Er=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Cr=/[|\\{}()[\]^$+*?.]/g,kt=new WeakMap;function Rr(t,e){if(t=t.replace(e.subset?Tr(e.subset):kr,r),e.subset||e.escapeOnly)return t;return t.replace(wr,n).replace(Er,r);function n(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function Tr(t){let e=kt.get(t);return e||(e=Ar(t),kt.set(t,e)),e}function Ar(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Cr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Lr=/[\dA-Fa-f]/;function Pr(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Lr.test(String.fromCharCode(e))?r:r+";"}const Ir=/\d/;function Or(t,e,n){const r="&#"+String(t);return n&&e&&!Ir.test(String.fromCharCode(e))?r:r+";"}const Nr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Me={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},xr=["cent","copy","divide","gt","lt","not","para","times"],nn={}.hasOwnProperty,Je={};let ue;for(ue in Me)nn.call(Me,ue)&&(Je[Me[ue]]=ue);const Dr=/[^\dA-Za-z]/;function Mr(t,e,n,r){const i=String.fromCharCode(t);if(nn.call(Je,i)){const o=Je[i],s="&"+o;return n&&Nr.includes(o)&&!xr.includes(o)&&(!r||e&&e!==61&&Dr.test(String.fromCharCode(e)))?s:s+";"}return""}function Br(t,e,n){let r=Pr(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Mr(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Or(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function K(t,e){return Rr(t,Object.assign({format:Br},e))}const Gr=/^>|^->|<!--|-->|--!>|<!-$/g,Vr=[">"],jr=["<",">"];function $r(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:Vr}))+">":"<!--"+t.value.replace(Gr,i)+"-->";function i(o){return K(o,Object.assign({},r.settings.characterReferences,{subset:jr}))}}function Ur(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function wt(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function Hr(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Wr(t){return t.join(" ").trim()}const zr=/[ \t\n\f\r]/g;function et(t){return typeof t=="object"?t.type==="text"?Et(t.value):!1:Et(t)}function Et(t){return t.replace(zr,"")===""}const L=on(1),rn=on(-1),Fr=[];function on(t){return e;function e(n,r,i){const o=n?n.children:Fr;let s=(r||0)+t,l=o[s];if(!i)for(;l&&et(l);)s+=t,l=o[s];return l}}const qr={}.hasOwnProperty;function sn(t){return e;function e(n,r,i){return qr.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const tt=sn({body:Yr,caption:Be,colgroup:Be,dd:Zr,dt:Qr,head:Be,html:Kr,li:Xr,optgroup:ei,option:ti,p:Jr,rp:Ct,rt:Ct,tbody:ri,td:Rt,tfoot:ii,th:Rt,thead:ni,tr:oi});function Be(t,e,n){const r=L(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&et(r.value.charAt(0)))}function Kr(t,e,n){const r=L(n,e);return!r||r.type!=="comment"}function Yr(t,e,n){const r=L(n,e);return!r||r.type!=="comment"}function Jr(t,e,n){const r=L(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Xr(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Qr(t,e,n){const r=L(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Zr(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Ct(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ei(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function ti(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ni(t,e,n){const r=L(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ri(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ii(t,e,n){return!L(n,e)}function oi(t,e,n){const r=L(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Rt(t,e,n){const r=L(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const si=sn({body:ci,colgroup:ui,head:li,html:ai,tbody:hi});function ai(t){const e=L(t,-1);return!e||e.type!=="comment"}function li(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function ci(t){const e=L(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&et(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function ui(t,e,n){const r=rn(n,e),i=L(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&tt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function hi(t,e,n){const r=rn(n,e),i=L(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&tt(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const he={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -10,4 +10,4 @@ import{_ as d}from"./index-CUWL1CMm.js";let R=class extends Error{constructor(e)
|
|
|
10
10
|
\f\r "&'<=>\``.split("")],[`\0
|
|
11
11
|
\f\r "&'<=>\``.split(""),`\0
|
|
12
12
|
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function di(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const l=[];let a;i.space==="html"&&t.tagName==="svg"&&(r.schema=tn);const c=pi(r,t.properties),u=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,u&&(s=!1),(c||!o||!si(t,e,n))&&(l.push("<",t.tagName,c?" "+c:""),s&&(i.space==="svg"||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||!tt(t,e,n))&&l.push("</"+t.tagName+">"),l.join("")}function pi(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=fi(t,i,e[i]);o&&n.push(o)}}for(;++r<n.length;){const o=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function fi(t,e,n){const r=_r(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,o=t.settings.allowDangerousCharacters?0:1;let s=t.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=K(r.attribute,Object.assign({},t.settings.characterReferences,{subset:he.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Hr:Wr)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?a:(t.settings.preferUnquoted&&(l=K(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:he.unquoted[i][o]}))),l!==n&&(t.settings.quoteSmart&&wt(n,s)>wt(n,t.alternative)&&(s=t.alternative),l=s+K(n,Object.assign({},t.settings.characterReferences,{subset:(s==="'"?he.single:he.double)[i][o],attribute:!0}))+s),a+(l&&"="+l))}const mi=["<","&"];function an(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:K(t.value,Object.assign({},r.settings.characterReferences,{subset:mi}))}function gi(t,e,n,r){return r.settings.allowDangerousHtml?t.value:an(t,e,n,r)}function _i(t,e,n,r){return r.all(t)}const yi=vr("type",{invalid:bi,unknown:Si,handlers:{comment:$r,doctype:Ur,element:di,raw:gi,root:_i,text:an}});function bi(t){throw new Error("Expected node, not `"+t+"`")}function Si(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const vi={},ki={},wi=[];function Ei(t,e){const n=e||vi,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ci,all:Ri,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||hr,characterReferences:n.characterReferences||ki,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?tn:Sr,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Ci(t,e,n){return yi(t,e,n,this)}function Ri(t){const e=[],n=t&&t.children||wi;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function ve(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function j(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function Ti(t){return Array.isArray(t)?t:[t]}async function ln(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function nt(t){return!t||["plaintext","txt","text","plain"].includes(t)}function cn(t){return t==="ansi"||nt(t)}function rt(t){return t==="none"}function un(t){return rt(t)}function hn(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function Ce(t,e=!1){const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const s=e?n[o]+(n[o+1]||""):n[o];i.push([s,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}function Ai(t){const e=Ce(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let o=i,s=0;for(const l of e){if(o<l.length)break;o-=l.length,s++}return{line:s,character:o}}function r(i,o){let s=0;for(let l=0;l<i;l++)s+=e[l].length;return s+=o,s}return{lines:e,indexToPos:n,posToIndex:r}}function Li(t,e,n){const r=new Set;for(const o of t.matchAll(/lang=["']([\w-]+)["']/g))r.add(o[1]);for(const o of t.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(o[1]);for(const o of t.matchAll(/\\begin\{([\w-]+)\}/g))r.add(o[1]);if(!n)return Array.from(r);const i=n.getBundledLanguages();return Array.from(r).filter(o=>o&&i[o])}const it="light-dark()",Pi=["color","background-color"];function Ii(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function Oi(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const o=n.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,l)=>s-l);return o.length?Ii(i,o):i})):t}function Ni(t,e,n,r,i="css-vars"){const o={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(u=>ke(t.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const m=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[u]+(h==="color"?"":m)};return s.forEach((u,h)=>{for(const m of l){const p=u[m]||"inherit";if(h===0&&r&&Pi.includes(m))if(r===it&&s.length>1){const f=e.findIndex(_=>_==="light"),v=e.findIndex(_=>_==="dark");if(f===-1||v===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=s[f][m]||"inherit",y=s[v][m]||"inherit";a[m]=`light-dark(${b}, ${y})`,i==="css-vars"&&(a[c(h,m)]=p)}else a[m]=p;else i==="css-vars"&&(a[c(h,m)]=p)}}),o.htmlStyle=a,o}function ke(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&O.Italic&&(e["font-style"]="italic"),t.fontStyle&O.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&O.Underline&&n.push("underline"),t.fontStyle&O.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function Xe(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const dn=new WeakMap;function Re(t,e){dn.set(t,e)}function ie(t){return dn.get(t)}class X{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new X(Object.fromEntries(Ti(n).map(r=>[r,Fe])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return xi(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function xi(t){const e=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&e.push(o),i.parent&&r(i.parent)}return r(t),e}function Di(t,e){if(!(t instanceof X))throw new R("Invalid grammar state");return t.getInternalStack(e)}function Mi(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(s){if(typeof s=="number"){if(s<0||s>n.source.length)throw new R(`Invalid decoration offset: ${s}. Code length: ${n.source.length}`);return{...i.indexToPos(s),offset:s}}else{const l=i.lines[s.line];if(l===void 0)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new R(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:i.posToIndex(s.line,a)}}};const i=Ai(n.source),o=(n.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));Bi(o),t.set(n.meta,{decorations:o,converter:i,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const i=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Oi(n,i)},code(n){if(!this.options.decorations?.length)return;const r=e(this),i=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new R(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,h,m,p){const f=i[u];let v="",b=-1,y=-1;if(h===0&&(b=0),m===0&&(y=0),m===Number.POSITIVE_INFINITY&&(y=f.children.length),b===-1||y===-1)for(let S=0;S<f.children.length;S++)v+=pn(f.children[S]),b===-1&&v.length===h&&(b=S+1),y===-1&&v.length===m&&(y=S+1);if(b===-1)throw new R(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(y===-1)throw new R(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const _=f.children.slice(b,y);if(!p.alwaysWrap&&_.length===f.children.length)l(f,p,"line");else if(!p.alwaysWrap&&_.length===1&&_[0].type==="element")l(_[0],p,"token");else{const S={type:"element",tagName:"span",properties:{},children:_};l(S,p,"wrapper"),f.children.splice(b,_.length,S)}}function s(u,h){i[u]=l(i[u],h,"line")}function l(u,h,m){const p=h.properties||{},f=h.transform||(v=>v);return u.tagName=h.tagName||"span",u.properties={...u.properties,...p,class:u.properties.class},h.properties?.class&&hn(u,h.properties.class),u=f(u,m)||u,u}const a=[],c=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of c){const{start:h,end:m}=u;if(h.line===m.line)o(h.line,h.character,m.character,u);else if(h.line<m.line){o(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let p=h.line+1;p<m.line;p++)a.unshift(()=>s(p,u));o(m.line,0,m.character,u)}}a.forEach(u=>u())}}}function Bi(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new R(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,s=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,l=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,a=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||s||l||a){if(o&&s||l&&a||l&&n.start.offset===n.end.offset||s&&i.start.offset===i.end.offset)continue;throw new R(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function pn(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(pn).join(""):""}const Gi=[Mi()];function we(t){const e=Vi(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Gi]}function Vi(t){const e=[],n=[],r=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:e,post:n,normal:r}}var H=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ge={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ji(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function Tt(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function $i(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Ge[r]&&e.push({type:"setDecoration",value:Ge[r]});else if(r<=29){const i=Ge[r-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:H[r-30]}});else if(r===38){const i=Tt(t);i&&e.push({type:"setForegroundColor",value:i})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-40]}});else if(r===48){const i=Tt(t);i&&e.push({type:"setBackgroundColor",value:i})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:H[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:H[r-100+8]}})}return e}function Ui(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let o=0;do{const s=ji(r,o),l=s.sequence?r.substring(o,s.startPosition):r.substring(o);if(l.length>0&&i.push({value:l,foreground:t,background:e,decorations:new Set(n)}),s.sequence){const a=$i(s.sequence);for(const c of a)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}o=s.position}while(o<r.length);return i}}}var Hi={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 Wi(t=Hi){function e(l){return t[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c<H.length;c++)r.push(e(H[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(n([l[c],l[u],l[h]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(n([a,a,a]));return r}function o(l){return i()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:s}}function zi(t,e,n){const r=ve(t,n),i=Ce(e),o=Wi(Object.fromEntries(H.map(l=>[l,t.colors?.[`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`]]))),s=Ui();return i.map(l=>s.parse(l[0]).map(a=>{let c,u;a.decorations.has("reverse")?(c=a.background?o.value(a.background):t.bg,u=a.foreground?o.value(a.foreground):t.fg):(c=a.foreground?o.value(a.foreground):t.fg,u=a.background?o.value(a.background):void 0),c=j(c,r),u=j(u,r),a.decorations.has("dim")&&(c=Fi(c));let h=O.None;return a.decorations.has("bold")&&(h|=O.Bold),a.decorations.has("italic")&&(h|=O.Italic),a.decorations.has("underline")&&(h|=O.Underline),a.decorations.has("strikethrough")&&(h|=O.Strikethrough),{content:a.value,offset:l[1],color:c,bgColor:u,fontStyle:h}}))}function Fi(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function Te(t,e,n={}){const{lang:r="text",theme:i=t.getLoadedThemes()[0]}=n;if(nt(r)||rt(i))return Ce(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:s}=t.setTheme(i);if(r==="ansi")return zi(o,e,n);const l=t.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return qi(e,l,o,s,n)}function fn(...t){if(t.length===2)return ie(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:o=e.getLoadedThemes()[0]}=r;if(nt(i)||rt(o))throw new R("Plain language does not have grammar state");if(i==="ansi")throw new R("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(o),a=e.getLanguage(i);return new X(Ee(n,a,s,l,r).stateStack,a.name,s.name)}function qi(t,e,n,r,i){const o=Ee(t,e,n,r,i),s=new X(Ee(t,e,n,r,i).stateStack,e.name,n.name);return Re(o.tokens,s),o.tokens}function Ee(t,e,n,r,i){const o=ve(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=i,a=Ce(t);let c=i.grammarState?Di(i.grammarState,n.name)??Fe:i.grammarContextCode!=null?Ee(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Fe,u=[];const h=[];for(let m=0,p=a.length;m<p;m++){const[f,v]=a[m];if(f===""){u=[],h.push([]);continue}if(s>0&&f.length>=s){u=[],h.push([{content:f,offset:v,color:"",fontStyle:0}]);continue}let b,y,_;i.includeExplanation&&(b=e.tokenizeLine(f,c,l),y=b.tokens,_=0);const S=e.tokenizeLine2(f,c,l),T=S.tokens.length/2;for(let E=0;E<T;E++){const M=S.tokens[2*E],$=E+1<T?S.tokens[2*E+2]:f.length;if(M===$)continue;const lt=S.tokens[2*E+1],wn=j(r[Y.getForeground(lt)],o),En=Y.getFontStyle(lt),Pe={content:f.substring(M,$),offset:v+M,color:wn,fontStyle:En};if(i.includeExplanation){const ct=[];if(i.includeExplanation!=="scopeName")for(const V of n.settings){let z;switch(typeof V.scope){case"string":z=V.scope.split(/,/).map(Ie=>Ie.trim());break;case"object":z=V.scope;break;default:continue}ct.push({settings:V,selectors:z.map(Ie=>Ie.split(/ /))})}Pe.explanation=[];let ut=0;for(;M+ut<$;){const V=y[_],z=f.substring(V.startIndex,V.endIndex);ut+=z.length,Pe.explanation.push({content:z,scopes:i.includeExplanation==="scopeName"?Ki(V.scopes):Yi(ct,V.scopes)}),_+=1}}u.push(Pe)}h.push(u),u=[],c=S.ruleStack}return{tokens:h,stateStack:c}}function Ki(t){return t.map(e=>({scopeName:e}))}function Yi(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const o=e[r];n[r]={scopeName:o,themeMatches:Xi(t,o,e.slice(0,r))}}return n}function At(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Ji(t,e,n){if(!At(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)At(t[r],n[i])&&(r-=1),i-=1;return r===-1}function Xi(t,e,n){const r=[];for(const{selectors:i,settings:o}of t)for(const s of i)if(Ji(s,e,n)){r.push(o);break}return r}function ot(t,e,n){const r=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),i=r.map(a=>{const c=Te(t,e,{...n,theme:a.theme}),u=ie(c),h=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:h}}),o=Qi(...i.map(a=>a.tokens)),s=o[0].map((a,c)=>a.map((u,h)=>{const m={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=u.explanation),o.forEach((p,f)=>{const{content:v,explanation:b,offset:y,..._}=p[c][h];m.variants[r[f].color]=_}),m})),l=i[0].state?new X(Object.fromEntries(i.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),i[0].state.lang):void 0;return l&&Re(s,l),s}function Qi(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const s=i.map(()=>0),l=i.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),s[c]+=1,l[c]=i[c][s[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function oe(t,e,n){let r,i,o,s,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,m=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,_)=>y.color===c?-1:_.color===c?1:0);if(m.length===0)throw new R("`themes` option must not be empty");const p=ot(t,e,n);if(a=ie(p),c&&it!==c&&!m.find(y=>y.color===c))throw new R(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=m.map(y=>t.getTheme(y.theme)),v=m.map(y=>y.color);o=p.map(y=>y.map(_=>Ni(_,v,u,c,h))),a&&Re(o,a);const b=m.map(y=>ve(y.theme,n));i=Lt(m,f,b,u,c,"fg",h),r=Lt(m,f,b,u,c,"bg",h),s=`shiki-themes ${f.map(y=>y.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){const c=ve(n.theme,n);o=Te(t,e,n);const u=t.getTheme(n.theme);r=j(u.bg,c),i=j(u.fg,c),s=u.name,a=ie(o)}else throw new R("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:s,rootStyle:l,grammarState:a}}function Lt(t,e,n,r,i,o,s){return t.map((l,a)=>{const c=j(e[a][o],n[a])||"inherit",u=`${r+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===it&&t.length>1){const h=t.findIndex(v=>v.color==="light"),m=t.findIndex(v=>v.color==="dark");if(h===-1||m===-1)throw new R('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=j(e[h][o],n[h])||"inherit",f=j(e[m][o],n[m])||"inherit";return`light-dark(${p}, ${f});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function se(t,e,n,r={meta:{},options:n,codeToHast:(i,o)=>se(t,i,o),codeToTokens:(i,o)=>oe(t,i,o)}){let i=e;for(const f of we(n))i=f.preprocess?.call(r,i,n)||i;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=oe(t,i,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:m=!1}=n;h===!0?o=eo(o):h==="never"&&(o=to(o)),m&&(o=no(o));const p={...r,get source(){return i}};for(const f of we(n))o=f.tokens?.call(p,o)||o;return Zi(o,{...n,fg:s,bg:l,themeName:a,rootStyle:c},p,u)}function Zi(t,e,n,r=ie(t)){const i=we(e),o=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e;let c={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...a!==!1&&a!=null?{tabindex:a.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([f])=>!f.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:o};const h=[],m={...n,structure:l,addClassToHast:hn,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return c},get code(){return u},get lines(){return h}};if(t.forEach((f,v)=>{v&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
13
|
-
`}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const _ of f){let S={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const T=Xe(_.htmlStyle||ke(_));T&&(S.properties.style=T);for(const E of i)S=E?.span?.call(m,S,v+1,y,b,_)||S;l==="inline"?s.children.push(S):l==="classic"&&b.children.push(S),y+=_.content.length}if(l==="classic"){for(const _ of i)b=_?.line?.call(m,b,v+1)||b;h.push(b),o.push(b)}}),l==="classic"){for(const f of i)u=f?.code?.call(m,u)||u;c.children.push(u);for(const f of i)c=f?.pre?.call(m,c)||c;s.children.push(c)}let p=s;for(const f of i)p=f?.root?.call(m,p)||p;return r&&Re(p,r),p}function eo(t){return t.map(e=>{const n=[];let r="",i=0;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&O.Underline||o.fontStyle&O.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i||(i=o.offset),r+=o.content):r?(a?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=0,r=""):n.push(o)}),n})}function to(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,o,s]=r;if(!i&&!s)return n;const l=[{...n,offset:n.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:n.offset}),s&&l.push({content:s,offset:n.offset+i.length+o.length}),l}))}function no(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],o=Xe(i.htmlStyle||ke(i)),s=Xe(r.htmlStyle||ke(r)),l=i.fontStyle&&(i.fontStyle&O.Underline||i.fontStyle&O.Strikethrough),a=r.fontStyle&&(r.fontStyle&O.Underline||r.fontStyle&O.Strikethrough);!l&&!a&&o===s?i.content+=r.content:n.push({...r})}return n})}const ro=Ei;function mn(t,e,n){const r={meta:{},options:n,codeToHast:(o,s)=>se(t,o,s),codeToTokens:(o,s)=>oe(t,o,s)};let i=ro(se(t,e,n,r));for(const o of we(n))i=o.postprocess?.call(r,i,n)||i;return i}const Pt={light:"#333333",dark:"#bbbbbb"},It={light:"#fffffe",dark:"#1e1e1e"},Ot="__shiki_resolved";function st(t){if(t?.[Ot])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Pt.light:Pt.dark),n||(n=e.type==="light"?It.light:It.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=s(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=s(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,Ot,{enumerable:!1,writable:!1,value:!0}),e}async function gn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!cn(e)).map(async e=>await ln(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function _n(t){return(await Promise.all(t.map(async n=>un(n)?null:st(await ln(n))))).filter(n=>!!n)}let me=3,yn=!1;function Vo(t=!0,e=!1){me=t,yn=e}function io(t,e=3){if(me&&!(typeof me=="number"&&e>me)){if(yn)throw new Error(`[SHIKI DEPRECATE]: ${t}`);console.trace(`[SHIKI DEPRECATE]: ${t}`)}}let F=class extends Error{constructor(e){super(e),this.name="ShikiError"}};class oo extends ur{constructor(e,n,r,i={}){super(e),this._resolver=e,this._themes=n,this._langs=r,this._alias=i,this._themes.map(o=>this.loadTheme(o)),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 typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=st(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=ge.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){if(this._alias[e]){const n=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],n.has(e))throw new F(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,n.size)for(const o of n)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,o])=>!o);if(r.length){const i=n.filter(([o,s])=>s&&s.embeddedLangs?.some(l=>r.map(([a])=>a).includes(l))).filter(o=>!r.includes(o));throw new F(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of n)this._resolver.addLanguage(o);for(const[i,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const n of e.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class so{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,n){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}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(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Q=0;function bn(t){Q+=1,t.warnings!==!1&&Q>=10&&Q%10===0&&console.warn(`[Shiki] ${Q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new F("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(st),i=new so(t.engine,n),o=new oo(i,r,n,t.langAlias);let s;function l(_){b();const S=o.getGrammar(typeof _=="string"?_:_.name);if(!S)throw new F(`Language \`${_}\` not found, you may need to load it first`);return S}function a(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const S=o.getTheme(_);if(!S)throw new F(`Theme \`${_}\` not found, you may need to load it first`);return S}function c(_){b();const S=a(_);s!==_&&(o.setTheme(S),s=_);const T=o.getColorMap();return{theme:S,colorMap:T}}function u(){return b(),o.getLoadedThemes()}function h(){return b(),o.getLoadedLanguages()}function m(..._){b(),o.loadLanguages(_.flat(1))}async function p(..._){return m(await gn(_))}function f(..._){b();for(const S of _.flat(1))o.loadTheme(S)}async function v(..._){return b(),f(await _n(_))}function b(){if(e)throw new F("Shiki instance has been disposed")}function y(){e||(e=!0,o.dispose(),Q-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,loadLanguage:p,loadLanguageSync:m,loadTheme:v,loadThemeSync:f,dispose:y,[Symbol.dispose]:y}}async function ao(t){t.engine||io("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([_n(t.themes||[]),gn(t.langs||[]),t.engine]);return bn({...t,themes:e,langs:n,engine:r})}async function Sn(t){const e=await ao(t);return{getLastGrammarState:(...n)=>fn(e,...n),codeToTokensBase:(n,r)=>Te(e,n,r),codeToTokensWithThemes:(n,r)=>ot(e,n,r),codeToTokens:(n,r)=>oe(e,n,r),codeToHast:(n,r)=>se(e,n,r),codeToHtml:(n,r)=>mn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function $o(t){const e=bn(t);return{getLastGrammarState:(...n)=>fn(e,...n),codeToTokensBase:(n,r)=>Te(e,n,r),codeToTokensWithThemes:(n,r)=>ot(e,n,r),codeToTokens:(n,r)=>oe(e,n,r),codeToHast:(n,r)=>se(e,n,r),codeToHtml:(n,r)=>mn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function lo(t){let e;async function n(r){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else return e=t({...r,themes:r.themes||[],langs:r.langs||[]}),e}return n}const Uo=lo(Sn);function co(t){const e=t.langs,n=t.themes,r=t.engine;async function i(o){function s(h){if(typeof h=="string"){if(cn(h))return[];h=o.langAlias?.[h]||h;const m=e[h];if(!m)throw new R(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}function l(h){if(un(h))return"none";if(typeof h=="string"){const m=n[h];if(!m)throw new R(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}const a=(o.themes??[]).map(h=>l(h)),c=(o.langs??[]).map(h=>s(h)),u=await Sn({engine:o.engine??r(),...o,themes:a,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(s))},loadTheme(...h){return u.loadTheme(...h.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return i}function uo(t){let e;async function n(r={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else return e=t({...r,themes:r.themes||[],langs:r.langs||[]}),e}return n}function ho(t,e){const n=uo(t);async function r(i,o){const s=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),l=await e?.guessEmbeddedLanguages?.(i,o.lang,s);return l&&await s.loadLanguage(...l),s}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}function Ho(t={}){const{name:e="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=t,i=s=>t.variableDefaults?.[s]?`var(${n}${s}, ${t.variableDefaults[s]})`:`var(${n}${s})`,o={name:e,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return r||(o.tokenColors=o.tokenColors?.map(s=>(s.settings?.fontStyle&&delete s.settings.fontStyle,s))),o}const po=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>d(()=>import("./andromeeda-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>d(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>d(()=>import("./ayu-dark-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>d(()=>import("./catppuccin-frappe-BBxmzUt6.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>d(()=>import("./catppuccin-latte-Jep7L2Wt.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>d(()=>import("./catppuccin-macchiato-CIUZ1G5V.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>d(()=>import("./catppuccin-mocha-NBseiqgx.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>d(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>d(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>d(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>d(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>d(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>d(()=>import("./github-dark-nz1Ug7wa.js").then(t=>t.g),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>d(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>d(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>d(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>d(()=>import("./github-light-hIqfNsk6.js").then(t=>t.g),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>d(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>d(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-hard-D1uDOp7C.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-medium-DkhsQLT2.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>d(()=>import("./gruvbox-dark-soft-CcyOm34o.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>d(()=>import("./gruvbox-light-hard-DKzvysjW.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>d(()=>import("./gruvbox-light-medium-DPcUKYIF.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>d(()=>import("./gruvbox-light-soft-CGqH5EJj.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>d(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>d(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>d(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>d(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>d(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>d(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>d(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>d(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>d(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>d(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>d(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>d(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>d(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>d(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>d(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>d(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>d(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>d(()=>import("./one-light-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>d(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>d(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>d(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>d(()=>import("./rose-pine-BHrmToEH.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>d(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>d(()=>import("./rose-pine-moon-NleAzG8P.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>d(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>d(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>d(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>d(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>d(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>d(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>d(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>d(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>d(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>d(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>d(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],fo=Object.fromEntries(po.map(t=>[t.id,t.import]));class at extends Error{constructor(e){super(e),this.name="ShikiError"}}function mo(){return 2147483648}function go(){return typeof performance<"u"?performance.now():Date.now()}const _o=(t,e)=>t+(e-t%e)%e;async function yo(t){let e,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,f,v){r.HEAPU8.copyWithin(p,f,f+v)}function s(p){try{return e.grow(p-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(p){const f=r.HEAPU8.length;p=p>>>0;const v=mo();if(p>v)return!1;for(let b=1;b<=4;b*=2){let y=f*(1+.2/b);y=Math.min(y,p+100663296);const _=Math.min(v,_o(Math.max(p,y),65536));if(s(_))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,f,v=1024){const b=f+v;let y=f;for(;p[y]&&!(y>=b);)++y;if(y-f>16&&p.buffer&&a)return a.decode(p.subarray(f,y));let _="";for(;f<y;){let S=p[f++];if(!(S&128)){_+=String.fromCharCode(S);continue}const T=p[f++]&63;if((S&224)===192){_+=String.fromCharCode((S&31)<<6|T);continue}const E=p[f++]&63;if((S&240)===224?S=(S&15)<<12|T<<6|E:S=(S&7)<<18|T<<12|E<<6|p[f++]&63,S<65536)_+=String.fromCharCode(S);else{const M=S-65536;_+=String.fromCharCode(55296|M>>10,56320|M&1023)}}return _}function u(p,f){return p?c(r.HEAPU8,p,f):""}const h={emscripten_get_now:go,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function m(){const f=await t({env:h,wasi_snapshot_preview1:h});e=f.memory,i(e.buffer),Object.assign(r,f),r.UTF8ToString=u}return await m(),r}var bo=Object.defineProperty,So=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e,n)=>So(t,typeof e!="symbol"?e+"":e,n);let P=null;function vo(t){throw new at(t.UTF8ToString(t.getLastOnigError()))}class Ae{constructor(e){A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16Value"),A(this,"utf8Value"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16");const n=e.length,r=Ae._utf8ByteLength(e),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const l=new Uint8Array(r);let a=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let h=u,m=!1;if(u>=55296&&u<=56319&&c+1<n){const p=e.charCodeAt(c+1);p>=56320&&p<=57343&&(h=(u-55296<<10)+65536|p-56320,m=!0)}i&&(o[c]=a,m&&(o[c+1]=a),h<=127?s[a+0]=c:h<=2047?(s[a+0]=c,s[a+1]=c):h<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),h<=127?l[a++]=h:h<=2047?(l[a++]=192|(h&1984)>>>6,l[a++]=128|(h&63)>>>0):h<=65535?(l[a++]=224|(h&61440)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0):(l[a++]=240|(h&1835008)>>>18,l[a++]=128|(h&258048)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0),m&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const o=e.charCodeAt(r);let s=o,l=!1;if(o>=55296&&o<=56319&&r+1<i){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(o-55296<<10)+65536|a-56320,l=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,l&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const Le=class G{constructor(e){if(A(this,"id",++G.LAST_ID),A(this,"_onigBinding"),A(this,"content"),A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16"),A(this,"ptr"),!P)throw new at("Must invoke loadWasm first.");this._onigBinding=P,this.content=e;const n=new Ae(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!G._sharedPtrInUse?(G._sharedPtr||(G._sharedPtr=P.omalloc(1e4)),G._sharedPtrInUse=!0,P.HEAPU8.set(n.utf8Value,G._sharedPtr),this.ptr=G._sharedPtr):this.ptr=n.createString(P)}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===G._sharedPtr?G._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};A(Le,"LAST_ID",0);A(Le,"_sharedPtr",0);A(Le,"_sharedPtrInUse",!1);let vn=Le;class ko{constructor(e){if(A(this,"_onigBinding"),A(this,"_ptr"),!P)throw new at("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new Ae(e[l]);n[l]=c.createString(P),r[l]=c.utf8Length}const i=P.omalloc(4*e.length);P.HEAPU32.set(n,i/4);const o=P.omalloc(4*e.length);P.HEAPU32.set(r,o/4);const s=P.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)P.ofree(n[l]);P.ofree(o),P.ofree(i),s===0&&vo(P),this._onigBinding=P,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new vn(e);const o=this._findNextMatchSync(e,n,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],h=[];for(let m=0;m<u;m++){const p=e.convertUtf8OffsetToUtf16(l[a++]),f=e.convertUtf8OffsetToUtf16(l[a++]);h[m]={start:p,end:f,length:f-p}}return{index:c,captureIndices:h}}}function wo(t){return typeof t.instantiator=="function"}function Eo(t){return typeof t.default=="function"}function Co(t){return typeof t.data<"u"}function Ro(t){return typeof Response<"u"&&t instanceof Response}function To(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let de;function Ao(t){if(de)return de;async function e(){P=await yo(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),wo(r)?r=await r.instantiator(n):Eo(r)?r=await r.default(n):(Co(r)&&(r=r.data),Ro(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Lo(r)(n):r=await Po(r)(n):To(r)?r=await Ve(r)(n):r instanceof WebAssembly.Module?r=await Ve(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ve(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return de=e(),de}function Ve(t){return e=>WebAssembly.instantiate(t,e)}function Lo(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Po(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function Io(t){return t&&await Ao(t),{createScanner(e){return new ko(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new vn(e)}}}const kn=[{id:"angular-html",name:"Angular HTML",import:(()=>d(()=>import("./angular-html-BhtAKmdv.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>d(()=>import("./angular-ts-BeFqxUEK.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"astro",name:"Astro",import:(()=>d(()=>import("./astro-fnUV64w6.js"),__vite__mapDeps([6,7,2,8,3,9,10])))},{id:"blade",name:"Blade",import:(()=>d(()=>import("./blade-BXHw_pqF.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7])))},{id:"c",name:"C",import:(()=>d(()=>import("./c-BIGW1oBm.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>d(()=>import("./coffee-Bn-gRTwi.js"),__vite__mapDeps([16,2])))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>d(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([17,18,19,20,15])))},{id:"css",name:"CSS",import:(()=>d(()=>import("./css-DPfMkruS.js"),[]))},{id:"glsl",name:"GLSL",import:(()=>d(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([19,20])))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>d(()=>import("./graphql-DsDBh1Xd.js"),__vite__mapDeps([21,2,8,22,10])))},{id:"haml",name:"Ruby Haml",import:(()=>d(()=>import("./haml-DXac2MKr.js"),__vite__mapDeps([23,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>d(()=>import("./handlebars-DGp8LPLW.js"),__vite__mapDeps([24,1,2,3,25])))},{id:"html",name:"HTML",import:(()=>d(()=>import("./html-C3HxQsge.js").then(t=>t.a),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>d(()=>import("./html-derivative-BSjB4sSK.js"),__vite__mapDeps([12,1,2,3])))},{id:"http",name:"HTTP",import:(()=>d(()=>import("./http-DCi7G6X5.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10])))},{id:"imba",name:"Imba",import:(()=>d(()=>import("./imba-DGztddWO.js"),[]))},{id:"java",name:"Java",import:(()=>d(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js"],import:(()=>d(()=>import("./javascript-Bu8dFlWd.js").then(t=>t.a),[]))},{id:"jinja",name:"Jinja",import:(()=>d(()=>import("./jinja-DRFn41Dg.js"),__vite__mapDeps([28,1,2,3])))},{id:"jison",name:"Jison",import:(()=>d(()=>import("./jison-D2rCaaX8.js"),__vite__mapDeps([29,2])))},{id:"json",name:"JSON",import:(()=>d(()=>import("./json-BHNwtY8x.js").then(t=>t.a),[]))},{id:"json5",name:"JSON5",import:(()=>d(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>d(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>d(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>d(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>d(()=>import("./julia-CKK9Si6J.js"),__vite__mapDeps([30,17,18,19,20,15,31,2,32])))},{id:"less",name:"Less",import:(()=>d(()=>import("./less-B1dDrJ26.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>d(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>d(()=>import("./marko-oTM4hF24.js"),__vite__mapDeps([33,3,34,5,8])))},{id:"mdc",name:"MDC",import:(()=>d(()=>import("./mdc-CnEUHEQ0.js"),__vite__mapDeps([35,36,25,12,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>d(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"php",name:"PHP",import:(()=>d(()=>import("./php-BVkpE1Rs.js"),__vite__mapDeps([37,1,2,3,13,14,15,7])))},{id:"postcss",name:"PostCSS",import:(()=>d(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>d(()=>import("./pug-Cxa3IGBH.js"),__vite__mapDeps([38,2,3,1])))},{id:"python",name:"Python",aliases:["py"],import:(()=>d(()=>import("./python-B6aJPvgy.js"),[]))},{id:"r",name:"R",import:(()=>d(()=>import("./r-DiinP2Uv.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>d(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"sass",name:"Sass",import:(()=>d(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scss",name:"SCSS",import:(()=>d(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>d(()=>import("./bash-SHvotRv0.js").then(t=>t.a),[]))},{id:"sql",name:"SQL",import:(()=>d(()=>import("./sql-BLtJtn59.js"),[]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>d(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>d(()=>import("./svelte-Dn5bEqJ2.js"),__vite__mapDeps([39,2,8,3,9])))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>d(()=>import("./ts-tags-o7tE_SiD.js"),__vite__mapDeps([40,8,3,2,19,20,1,15,13,14])))},{id:"tsx",name:"TSX",import:(()=>d(()=>import("./tsx-D7BNtDUy.js").then(t=>t.a),[]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:(()=>d(()=>import("./typescript-DtkYWpva.js").then(t=>t.a),[]))},{id:"vue",name:"Vue",import:(()=>d(()=>import("./vue-CGSbC7ds.js").then(t=>t.a),__vite__mapDeps([41,3,2,8,7,12,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>d(()=>import("./vue-html-2e51hq9W.js"),__vite__mapDeps([42,41,3,2,8,7,12,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>d(()=>import("./vue-vine-BIRRuYKM.js"),__vite__mapDeps([43,3,5,34,44,9,41,2,8,7,12,1])))},{id:"wasm",name:"WebAssembly",import:(()=>d(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>d(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>d(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"xml",name:"XML",import:(()=>d(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([13,14])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>d(()=>import("./yaml-Buea-lGh.js"),[]))}],Oo=Object.fromEntries(kn.map(t=>[t.id,t.import])),No=Object.fromEntries(kn.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),xo={...Oo,...No},Do=co({langs:xo,themes:fo,engine:()=>Io(d(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Wo,codeToHast:zo,codeToTokensBase:Fo,codeToTokens:qo,codeToTokensWithThemes:Ko,getSingletonHighlighter:Yo,getLastGrammarState:Jo}=ho(Do,{guessEmbeddedLanguages:Li});export{R as ShikiError,hn as addClassToHast,j as applyColorReplacements,xo as bundledLanguages,No as bundledLanguagesAlias,Oo as bundledLanguagesBase,kn as bundledLanguagesInfo,fo as bundledThemes,po as bundledThemesInfo,zo as codeToHast,Wo as codeToHtml,qo as codeToTokens,Fo as codeToTokensBase,Ko as codeToTokensWithThemes,Ho as createCssVariablesTheme,Do as createHighlighter,Sn as createHighlighterCore,$o as createHighlighterCoreSync,Ai as createPositionConverter,ao as createShikiInternal,bn as createShikiInternalSync,ho as createSingletonShorthands,co as createdBundledHighlighter,Vo as enableDeprecationWarnings,Ni as flatTokenVariants,Jo as getLastGrammarState,Yo as getSingletonHighlighter,Uo as getSingletonHighlighterCore,ke as getTokenStyleObject,Li as guessEmbeddedLanguages,ro as hastToHtml,rt as isNoneTheme,nt as isPlainLang,cn as isSpecialLang,un as isSpecialTheme,uo as makeSingletonHighlighter,lo as makeSingletonHighlighterCore,ln as normalizeGetter,st as normalizeTheme,ve as resolveColorReplacements,Ce as splitLines,Ii as splitToken,Oi as splitTokens,Xe as stringifyTokenStyle,Ti as toArray,zi as tokenizeAnsiWithTheme,qi as tokenizeWithTheme,Zi as tokensToHast,Mi as transformerDecorations,io as warnDeprecated};
|
|
13
|
+
`}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const _ of f){let S={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const T=Xe(_.htmlStyle||ke(_));T&&(S.properties.style=T);for(const E of i)S=E?.span?.call(m,S,v+1,y,b,_)||S;l==="inline"?s.children.push(S):l==="classic"&&b.children.push(S),y+=_.content.length}if(l==="classic"){for(const _ of i)b=_?.line?.call(m,b,v+1)||b;h.push(b),o.push(b)}}),l==="classic"){for(const f of i)u=f?.code?.call(m,u)||u;c.children.push(u);for(const f of i)c=f?.pre?.call(m,c)||c;s.children.push(c)}let p=s;for(const f of i)p=f?.root?.call(m,p)||p;return r&&Re(p,r),p}function eo(t){return t.map(e=>{const n=[];let r="",i=0;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&O.Underline||o.fontStyle&O.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i||(i=o.offset),r+=o.content):r?(a?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=0,r=""):n.push(o)}),n})}function to(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,o,s]=r;if(!i&&!s)return n;const l=[{...n,offset:n.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:n.offset}),s&&l.push({content:s,offset:n.offset+i.length+o.length}),l}))}function no(t){return t.map(e=>{const n=[];for(const r of e){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],o=Xe(i.htmlStyle||ke(i)),s=Xe(r.htmlStyle||ke(r)),l=i.fontStyle&&(i.fontStyle&O.Underline||i.fontStyle&O.Strikethrough),a=r.fontStyle&&(r.fontStyle&O.Underline||r.fontStyle&O.Strikethrough);!l&&!a&&o===s?i.content+=r.content:n.push({...r})}return n})}const ro=Ei;function mn(t,e,n){const r={meta:{},options:n,codeToHast:(o,s)=>se(t,o,s),codeToTokens:(o,s)=>oe(t,o,s)};let i=ro(se(t,e,n,r));for(const o of we(n))i=o.postprocess?.call(r,i,n)||i;return i}const Pt={light:"#333333",dark:"#bbbbbb"},It={light:"#fffffe",dark:"#1e1e1e"},Ot="__shiki_resolved";function st(t){if(t?.[Ot])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Pt.light:Pt.dark),n||(n=e.type==="light"?It.light:It.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=s(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=s(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,Ot,{enumerable:!1,writable:!1,value:!0}),e}async function gn(t){return Array.from(new Set((await Promise.all(t.filter(e=>!cn(e)).map(async e=>await ln(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function _n(t){return(await Promise.all(t.map(async n=>un(n)?null:st(await ln(n))))).filter(n=>!!n)}let me=3,yn=!1;function Vo(t=!0,e=!1){me=t,yn=e}function io(t,e=3){if(me&&!(typeof me=="number"&&e>me)){if(yn)throw new Error(`[SHIKI DEPRECATE]: ${t}`);console.trace(`[SHIKI DEPRECATE]: ${t}`)}}let F=class extends Error{constructor(e){super(e),this.name="ShikiError"}};class oo extends ur{constructor(e,n,r,i={}){super(e),this._resolver=e,this._themes=n,this._langs=r,this._alias=i,this._themes.map(o=>this.loadTheme(o)),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 typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const n=st(e);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let n=this._textmateThemeCache.get(e);n||(n=ge.createFromRawTheme(e),this._textmateThemeCache.set(e,n)),this._syncRegistry.setTheme(n)}getGrammar(e){if(this._alias[e]){const n=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],n.has(e))throw new F(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const n=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,n.size)for(const o of n)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const n=Array.from(this._langGraph.entries()),r=n.filter(([i,o])=>!o);if(r.length){const i=n.filter(([o,s])=>s&&s.embeddedLangs?.some(l=>r.map(([a])=>a).includes(l))).filter(o=>!r.includes(o));throw new F(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of n)this._resolver.addLanguage(o);for(const[i,o]of n)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const n of e.embeddedLangs)this._langGraph.set(n,this._langMap.get(n))}}class so{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,n){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}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(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Q=0;function bn(t){Q+=1,t.warnings!==!1&&Q>=10&&Q%10===0&&console.warn(`[Shiki] ${Q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new F("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(st),i=new so(t.engine,n),o=new oo(i,r,n,t.langAlias);let s;function l(_){b();const S=o.getGrammar(typeof _=="string"?_:_.name);if(!S)throw new F(`Language \`${_}\` not found, you may need to load it first`);return S}function a(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const S=o.getTheme(_);if(!S)throw new F(`Theme \`${_}\` not found, you may need to load it first`);return S}function c(_){b();const S=a(_);s!==_&&(o.setTheme(S),s=_);const T=o.getColorMap();return{theme:S,colorMap:T}}function u(){return b(),o.getLoadedThemes()}function h(){return b(),o.getLoadedLanguages()}function m(..._){b(),o.loadLanguages(_.flat(1))}async function p(..._){return m(await gn(_))}function f(..._){b();for(const S of _.flat(1))o.loadTheme(S)}async function v(..._){return b(),f(await _n(_))}function b(){if(e)throw new F("Shiki instance has been disposed")}function y(){e||(e=!0,o.dispose(),Q-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,loadLanguage:p,loadLanguageSync:m,loadTheme:v,loadThemeSync:f,dispose:y,[Symbol.dispose]:y}}async function ao(t){t.engine||io("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([_n(t.themes||[]),gn(t.langs||[]),t.engine]);return bn({...t,themes:e,langs:n,engine:r})}async function Sn(t){const e=await ao(t);return{getLastGrammarState:(...n)=>fn(e,...n),codeToTokensBase:(n,r)=>Te(e,n,r),codeToTokensWithThemes:(n,r)=>ot(e,n,r),codeToTokens:(n,r)=>oe(e,n,r),codeToHast:(n,r)=>se(e,n,r),codeToHtml:(n,r)=>mn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function $o(t){const e=bn(t);return{getLastGrammarState:(...n)=>fn(e,...n),codeToTokensBase:(n,r)=>Te(e,n,r),codeToTokensWithThemes:(n,r)=>ot(e,n,r),codeToTokens:(n,r)=>oe(e,n,r),codeToHast:(n,r)=>se(e,n,r),codeToHtml:(n,r)=>mn(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function lo(t){let e;async function n(r){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else return e=t({...r,themes:r.themes||[],langs:r.langs||[]}),e}return n}const Uo=lo(Sn);function co(t){const e=t.langs,n=t.themes,r=t.engine;async function i(o){function s(h){if(typeof h=="string"){if(cn(h))return[];h=o.langAlias?.[h]||h;const m=e[h];if(!m)throw new R(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}function l(h){if(un(h))return"none";if(typeof h=="string"){const m=n[h];if(!m)throw new R(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}const a=(o.themes??[]).map(h=>l(h)),c=(o.langs??[]).map(h=>s(h)),u=await Sn({engine:o.engine??r(),...o,themes:a,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(s))},loadTheme(...h){return u.loadTheme(...h.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return i}function uo(t){let e;async function n(r={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else return e=t({...r,themes:r.themes||[],langs:r.langs||[]}),e}return n}function ho(t,e){const n=uo(t);async function r(i,o){const s=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),l=await e?.guessEmbeddedLanguages?.(i,o.lang,s);return l&&await s.loadLanguage(...l),s}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}function Ho(t={}){const{name:e="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=t,i=s=>t.variableDefaults?.[s]?`var(${n}${s}, ${t.variableDefaults[s]})`:`var(${n}${s})`,o={name:e,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return r||(o.tokenColors=o.tokenColors?.map(s=>(s.settings?.fontStyle&&delete s.settings.fontStyle,s))),o}const po=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>d(()=>import("./andromeeda-C-Jbm3Hp.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>d(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>d(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>d(()=>import("./catppuccin-frappe-BBxmzUt6.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>d(()=>import("./catppuccin-latte-Jep7L2Wt.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>d(()=>import("./catppuccin-macchiato-CIUZ1G5V.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>d(()=>import("./catppuccin-mocha-NBseiqgx.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>d(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>d(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>d(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>d(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>d(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>d(()=>import("./github-dark-nz1Ug7wa.js").then(t=>t.g),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>d(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>d(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>d(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>d(()=>import("./github-light-hIqfNsk6.js").then(t=>t.g),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>d(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>d(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>d(()=>import("./gruvbox-dark-hard-D1uDOp7C.js"),[])},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>d(()=>import("./gruvbox-dark-medium-DkhsQLT2.js"),[])},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>d(()=>import("./gruvbox-dark-soft-CcyOm34o.js"),[])},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>d(()=>import("./gruvbox-light-hard-DKzvysjW.js"),[])},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>d(()=>import("./gruvbox-light-medium-DPcUKYIF.js"),[])},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>d(()=>import("./gruvbox-light-soft-CGqH5EJj.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>d(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>d(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>d(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>d(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>d(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>d(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>d(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>d(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>d(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>d(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>d(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>d(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>d(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>d(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>d(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>d(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>d(()=>import("./one-dark-pro-DVMEJ2y_.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>d(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>d(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>d(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>d(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>d(()=>import("./rose-pine-BHrmToEH.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>d(()=>import("./rose-pine-dawn-CnK8MTSM.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>d(()=>import("./rose-pine-moon-NleAzG8P.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>d(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>d(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>d(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>d(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>d(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>d(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>d(()=>import("./tokyo-night-hegEt444.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>d(()=>import("./vesper-DU1UobuO.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>d(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>d(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>d(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],fo=Object.fromEntries(po.map(t=>[t.id,t.import]));class at extends Error{constructor(e){super(e),this.name="ShikiError"}}function mo(){return 2147483648}function go(){return typeof performance<"u"?performance.now():Date.now()}const _o=(t,e)=>t+(e-t%e)%e;async function yo(t){let e,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,f,v){r.HEAPU8.copyWithin(p,f,f+v)}function s(p){try{return e.grow(p-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(p){const f=r.HEAPU8.length;p=p>>>0;const v=mo();if(p>v)return!1;for(let b=1;b<=4;b*=2){let y=f*(1+.2/b);y=Math.min(y,p+100663296);const _=Math.min(v,_o(Math.max(p,y),65536));if(s(_))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,f,v=1024){const b=f+v;let y=f;for(;p[y]&&!(y>=b);)++y;if(y-f>16&&p.buffer&&a)return a.decode(p.subarray(f,y));let _="";for(;f<y;){let S=p[f++];if(!(S&128)){_+=String.fromCharCode(S);continue}const T=p[f++]&63;if((S&224)===192){_+=String.fromCharCode((S&31)<<6|T);continue}const E=p[f++]&63;if((S&240)===224?S=(S&15)<<12|T<<6|E:S=(S&7)<<18|T<<12|E<<6|p[f++]&63,S<65536)_+=String.fromCharCode(S);else{const M=S-65536;_+=String.fromCharCode(55296|M>>10,56320|M&1023)}}return _}function u(p,f){return p?c(r.HEAPU8,p,f):""}const h={emscripten_get_now:go,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function m(){const f=await t({env:h,wasi_snapshot_preview1:h});e=f.memory,i(e.buffer),Object.assign(r,f),r.UTF8ToString=u}return await m(),r}var bo=Object.defineProperty,So=(t,e,n)=>e in t?bo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A=(t,e,n)=>So(t,typeof e!="symbol"?e+"":e,n);let P=null;function vo(t){throw new at(t.UTF8ToString(t.getLastOnigError()))}class Ae{constructor(e){A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16Value"),A(this,"utf8Value"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16");const n=e.length,r=Ae._utf8ByteLength(e),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const l=new Uint8Array(r);let a=0;for(let c=0;c<n;c++){const u=e.charCodeAt(c);let h=u,m=!1;if(u>=55296&&u<=56319&&c+1<n){const p=e.charCodeAt(c+1);p>=56320&&p<=57343&&(h=(u-55296<<10)+65536|p-56320,m=!0)}i&&(o[c]=a,m&&(o[c+1]=a),h<=127?s[a+0]=c:h<=2047?(s[a+0]=c,s[a+1]=c):h<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),h<=127?l[a++]=h:h<=2047?(l[a++]=192|(h&1984)>>>6,l[a++]=128|(h&63)>>>0):h<=65535?(l[a++]=224|(h&61440)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0):(l[a++]=240|(h&1835008)>>>18,l[a++]=128|(h&258048)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0),m&&c++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const o=e.charCodeAt(r);let s=o,l=!1;if(o>=55296&&o<=56319&&r+1<i){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(o-55296<<10)+65536|a-56320,l=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,l&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const Le=class G{constructor(e){if(A(this,"id",++G.LAST_ID),A(this,"_onigBinding"),A(this,"content"),A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16"),A(this,"ptr"),!P)throw new at("Must invoke loadWasm first.");this._onigBinding=P,this.content=e;const n=new Ae(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!G._sharedPtrInUse?(G._sharedPtr||(G._sharedPtr=P.omalloc(1e4)),G._sharedPtrInUse=!0,P.HEAPU8.set(n.utf8Value,G._sharedPtr),this.ptr=G._sharedPtr):this.ptr=n.createString(P)}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===G._sharedPtr?G._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};A(Le,"LAST_ID",0);A(Le,"_sharedPtr",0);A(Le,"_sharedPtrInUse",!1);let vn=Le;class ko{constructor(e){if(A(this,"_onigBinding"),A(this,"_ptr"),!P)throw new at("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new Ae(e[l]);n[l]=c.createString(P),r[l]=c.utf8Length}const i=P.omalloc(4*e.length);P.HEAPU32.set(n,i/4);const o=P.omalloc(4*e.length);P.HEAPU32.set(r,o/4);const s=P.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)P.ofree(n[l]);P.ofree(o),P.ofree(i),s===0&&vo(P),this._onigBinding=P,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new vn(e);const o=this._findNextMatchSync(e,n,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],h=[];for(let m=0;m<u;m++){const p=e.convertUtf8OffsetToUtf16(l[a++]),f=e.convertUtf8OffsetToUtf16(l[a++]);h[m]={start:p,end:f,length:f-p}}return{index:c,captureIndices:h}}}function wo(t){return typeof t.instantiator=="function"}function Eo(t){return typeof t.default=="function"}function Co(t){return typeof t.data<"u"}function Ro(t){return typeof Response<"u"&&t instanceof Response}function To(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let de;function Ao(t){if(de)return de;async function e(){P=await yo(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),wo(r)?r=await r.instantiator(n):Eo(r)?r=await r.default(n):(Co(r)&&(r=r.data),Ro(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Lo(r)(n):r=await Po(r)(n):To(r)?r=await Ve(r)(n):r instanceof WebAssembly.Module?r=await Ve(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ve(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return de=e(),de}function Ve(t){return e=>WebAssembly.instantiate(t,e)}function Lo(t){return e=>WebAssembly.instantiateStreaming(t,e)}function Po(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function Io(t){return t&&await Ao(t),{createScanner(e){return new ko(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new vn(e)}}}const kn=[{id:"angular-html",name:"Angular HTML",import:()=>d(()=>import("./angular-html-BhtAKmdv.js").then(t=>t.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>d(()=>import("./angular-ts-BeFqxUEK.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"astro",name:"Astro",import:()=>d(()=>import("./astro-fnUV64w6.js"),__vite__mapDeps([6,7,2,8,3,9,10]))},{id:"blade",name:"Blade",import:()=>d(()=>import("./blade-BXHw_pqF.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7]))},{id:"c",name:"C",import:()=>d(()=>import("./c-BIGW1oBm.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>d(()=>import("./coffee-Bn-gRTwi.js"),__vite__mapDeps([16,2]))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>d(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([17,18,19,20,15]))},{id:"css",name:"CSS",import:()=>d(()=>import("./css-DPfMkruS.js"),[])},{id:"glsl",name:"GLSL",import:()=>d(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([19,20]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>d(()=>import("./graphql-DsDBh1Xd.js"),__vite__mapDeps([21,2,8,22,10]))},{id:"haml",name:"Ruby Haml",import:()=>d(()=>import("./haml-DXac2MKr.js"),__vite__mapDeps([23,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>d(()=>import("./handlebars-DGp8LPLW.js"),__vite__mapDeps([24,1,2,3,25]))},{id:"html",name:"HTML",import:()=>d(()=>import("./html-C3HxQsge.js").then(t=>t.a),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>d(()=>import("./html-derivative-BSjB4sSK.js"),__vite__mapDeps([12,1,2,3]))},{id:"http",name:"HTTP",import:()=>d(()=>import("./http-DCi7G6X5.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10]))},{id:"imba",name:"Imba",import:()=>d(()=>import("./imba-DGztddWO.js"),[])},{id:"java",name:"Java",import:()=>d(()=>import("./java-CylS5w8V.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>d(()=>import("./javascript-Bu8dFlWd.js").then(t=>t.a),[])},{id:"jinja",name:"Jinja",import:()=>d(()=>import("./jinja-DRFn41Dg.js"),__vite__mapDeps([28,1,2,3]))},{id:"jison",name:"Jison",import:()=>d(()=>import("./jison-D2rCaaX8.js"),__vite__mapDeps([29,2]))},{id:"json",name:"JSON",import:()=>d(()=>import("./json-BHNwtY8x.js").then(t=>t.a),[])},{id:"json5",name:"JSON5",import:()=>d(()=>import("./json5-C9tS-k6U.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>d(()=>import("./jsonc-Des-eS-w.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>d(()=>import("./jsonl-DcaNXYhu.js"),[])},{id:"jsx",name:"JSX",import:()=>d(()=>import("./jsx-g9-lgVsj.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>d(()=>import("./julia-CKK9Si6J.js"),__vite__mapDeps([30,17,18,19,20,15,31,2,32]))},{id:"less",name:"Less",import:()=>d(()=>import("./less-B1dDrJ26.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>d(()=>import("./markdown-Cvjx9yec.js"),[])},{id:"marko",name:"Marko",import:()=>d(()=>import("./marko-oTM4hF24.js"),__vite__mapDeps([33,3,34,5,8]))},{id:"mdc",name:"MDC",import:()=>d(()=>import("./mdc-CnEUHEQ0.js"),__vite__mapDeps([35,36,25,12,1,2,3]))},{id:"mdx",name:"MDX",import:()=>d(()=>import("./mdx-Cmh6b_Ma.js"),[])},{id:"php",name:"PHP",import:()=>d(()=>import("./php-BVkpE1Rs.js"),__vite__mapDeps([37,1,2,3,13,14,15,7]))},{id:"postcss",name:"PostCSS",import:()=>d(()=>import("./postcss-CXtECtnM.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>d(()=>import("./pug-Cxa3IGBH.js"),__vite__mapDeps([38,2,3,1]))},{id:"python",name:"Python",aliases:["py"],import:()=>d(()=>import("./python-B6aJPvgy.js"),[])},{id:"r",name:"R",import:()=>d(()=>import("./r-DiinP2Uv.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>d(()=>import("./regexp-CDVJQ6XC.js"),[])},{id:"sass",name:"Sass",import:()=>d(()=>import("./sass-Cj5Yp3dK.js"),[])},{id:"scss",name:"SCSS",import:()=>d(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>d(()=>import("./bash-SHvotRv0.js").then(t=>t.a),[])},{id:"sql",name:"SQL",import:()=>d(()=>import("./sql-BLtJtn59.js"),[])},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>d(()=>import("./stylus-BEDo0Tqx.js"),[])},{id:"svelte",name:"Svelte",import:()=>d(()=>import("./svelte-Dn5bEqJ2.js"),__vite__mapDeps([39,2,8,3,9]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>d(()=>import("./ts-tags-o7tE_SiD.js"),__vite__mapDeps([40,8,3,2,19,20,1,15,13,14]))},{id:"tsx",name:"TSX",import:()=>d(()=>import("./tsx-D7BNtDUy.js").then(t=>t.a),[])},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>d(()=>import("./typescript-DtkYWpva.js").then(t=>t.a),[])},{id:"vue",name:"Vue",import:()=>d(()=>import("./vue-CGSbC7ds.js").then(t=>t.a),__vite__mapDeps([41,3,2,8,7,12,1]))},{id:"vue-html",name:"Vue HTML",import:()=>d(()=>import("./vue-html-2e51hq9W.js"),__vite__mapDeps([42,41,3,2,8,7,12,1]))},{id:"vue-vine",name:"Vue Vine",import:()=>d(()=>import("./vue-vine-BIRRuYKM.js"),__vite__mapDeps([43,3,5,34,44,9,41,2,8,7,12,1]))},{id:"wasm",name:"WebAssembly",import:()=>d(()=>import("./wasm-MzD3tlZU.js"),[])},{id:"wgsl",name:"WGSL",import:()=>d(()=>import("./wgsl-Dx-B1_4e.js"),[])},{id:"wit",name:"WebAssembly Interface Types",import:()=>d(()=>import("./wit-5i3qLPDT.js"),[])},{id:"xml",name:"XML",import:()=>d(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([13,14]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>d(()=>import("./yaml-Buea-lGh.js"),[])}],Oo=Object.fromEntries(kn.map(t=>[t.id,t.import])),No=Object.fromEntries(kn.flatMap(t=>t.aliases?.map(e=>[e,t.import])||[])),xo={...Oo,...No},Do=co({langs:xo,themes:fo,engine:()=>Io(d(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:Wo,codeToHast:zo,codeToTokensBase:Fo,codeToTokens:qo,codeToTokensWithThemes:Ko,getSingletonHighlighter:Yo,getLastGrammarState:Jo}=ho(Do,{guessEmbeddedLanguages:Li});export{R as ShikiError,hn as addClassToHast,j as applyColorReplacements,xo as bundledLanguages,No as bundledLanguagesAlias,Oo as bundledLanguagesBase,kn as bundledLanguagesInfo,fo as bundledThemes,po as bundledThemesInfo,zo as codeToHast,Wo as codeToHtml,qo as codeToTokens,Fo as codeToTokensBase,Ko as codeToTokensWithThemes,Ho as createCssVariablesTheme,Do as createHighlighter,Sn as createHighlighterCore,$o as createHighlighterCoreSync,Ai as createPositionConverter,ao as createShikiInternal,bn as createShikiInternalSync,ho as createSingletonShorthands,co as createdBundledHighlighter,Vo as enableDeprecationWarnings,Ni as flatTokenVariants,Jo as getLastGrammarState,Yo as getSingletonHighlighter,Uo as getSingletonHighlighterCore,ke as getTokenStyleObject,Li as guessEmbeddedLanguages,ro as hastToHtml,rt as isNoneTheme,nt as isPlainLang,cn as isSpecialLang,un as isSpecialTheme,uo as makeSingletonHighlighter,lo as makeSingletonHighlighterCore,ln as normalizeGetter,st as normalizeTheme,ve as resolveColorReplacements,Ce as splitLines,Ii as splitToken,Oi as splitTokens,Xe as stringifyTokenStyle,Ti as toArray,zi as tokenizeAnsiWithTheme,qi as tokenizeWithTheme,Zi as tokensToHast,Mi as transformerDecorations,io as warnDeprecated};
|