(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,162377,e=>{"use strict";var t=e.i(487759);class n{constructor(e){this._ruleStack=e}get ruleStack(){return this._ruleStack}clone(){return new n(this._ruleStack)}equals(e){return!!e&&e instanceof n&&e===this&&e._ruleStack===this._ruleStack}}function r(e){if(Array.isArray(e)&&(e=e[0]),e)return(3===(e=(35===e.charCodeAt(0)?e.slice(1):e).toLowerCase()).length||4===e.length)&&(e=e.split("").map(e=>e+e).join("")),e}function o(e){let t="rules"in e?e.rules:void 0;if(!t)for(let{scope:n,settings:{foreground:o,background:i,fontStyle:l}={}}of(t=[],e.settings||e.tokenColors)){if(!o&&!i&&!l)continue;let e=Array.isArray(n)?n:n?[n]:[],a=s(l),u=r(o),h=r(i);t.push(...e.map(e=>({token:e,foreground:u,background:h,fontStyle:a})))}let n=Object.fromEntries(Object.entries(e.colors||{}).map(([e,t])=>[e,`#${r(t)}`]));return{base:"light"===e.type?"vs":"vs-dark",inherit:!1,colors:n,rules:t}}let i=["italic","bold","underline","strikethrough"],l={"line-through":"strikethrough"};function s(e){if(!e)return"";let t=new Set(e.split(/[\s,]+/).map(e=>e.trim().toLowerCase()).map(e=>l[e]||e).filter(Boolean));return i.filter(e=>t.has(e)).join(" ")}function a(e,t){return t?`${e}|${t}`:e}e.s(["shikiToMonaco",0,function(e,i,l={}){let u=new Map,h=e.getLoadedThemes();for(let t of h){let n=o(e.getTheme(t));u.set(t,n),i.editor.defineTheme(t,n)}let c=[],g=new Map,d=i.editor.setTheme.bind(i.editor);i.editor.setTheme=t=>{let n=e.setTheme(t),o=u.get(t);c.length=n.colorMap.length;for(let e=0;e<n.colorMap.length;e++)c[e]=n.colorMap[e];g.clear(),o?.rules.forEach(e=>{let t=r(e.foreground);if(!t)return;let n=a(t,s(e.fontStyle));g.has(n)||g.set(n,e.token)}),d(t)};let f=i.editor.create;i.editor.create=(e,t,n)=>(t?.theme&&i.editor.setTheme(t.theme),f(e,t,n)),i.editor.setTheme(h[0]);let{tokenizeMaxLineLength:k=2e4,tokenizeTimeLimit:p=500}=l,m=new Set(i.languages.getLanguages().map(e=>e.id));for(let o of e.getLoadedLanguages())m.has(o)&&i.languages.setTokensProvider(o,{getInitialState:()=>new n(t.INITIAL),tokenize(i,l){if(i.length>=k)return{endState:l,tokens:[{startIndex:0,scopes:""}]};let s=e.getLanguage(o).tokenizeLine2(i,l.ruleStack,p);s.stoppedEarly&&console.warn(`Time limit reached when tokenizing line: ${i.substring(0,100)}`);let u=s.tokens.length/2,h=[];for(let e=0;e<u;e++){let n=s.tokens[2*e],o=s.tokens[2*e+1],i=r(c[t.EncodedTokenMetadata.getForeground(o)]||""),l=t.EncodedTokenMetadata.getFontStyle(o),u=i&&function(e,n){let r=a(e,function(e){if(e<=t.FontStyle.None)return"";let n=[];return e&t.FontStyle.Italic&&n.push("italic"),e&t.FontStyle.Bold&&n.push("bold"),e&t.FontStyle.Underline&&n.push("underline"),e&t.FontStyle.Strikethrough&&n.push("strikethrough"),n.join(" ")}(n));return g.get(r)}(i,l)||"";h.push({startIndex:n,scopes:u})}return{endState:new n(s.ruleStack),tokens:h}}})},"textmateThemeToMonacoTheme",0,o])}]);