|
|
var vn=Object.defineProperty;var Zn=(t,e,n)=>e in t?vn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Z=(t,e,n)=>Zn(t,typeof e!="symbol"?e+"":e,n);import{_ as xn}from"./index-bVOhw2NF.js";import{l as Lt,C as jn,E as Cn,K as Fn,a as Sn,M as En,b as Tn,P as Nn,R as Rn,S as Bn,c as qn,T as Ln,U as Pn,e as In}from"./index-A2N58F4T.js";import"./vue-repl-jaFwbjhK.js";import"./index.vue_vue_type_script_setup_true_lang-Q6sPmgzz.js";import"./toggleHighContrast-BiNrcRtm.js";import"./editorWorker-UB-8rWUJ.js";import"./upload-DeP_4dQB.js";import"./http-D9Asdp-z.js";import"./light-Cua7cqmF.js";import"./context-KbjOeZY_.js";import"./_initCloneObject-K-Y0ueWp.js";import"./_baseFor-mOzdmxoL.js";import"./fade-in.cssr-CltBGdAW.js";import"./light-BKuBIbLH.js";import"./index-C-nsH7mf.js";import"./use-compitable-DMmt6sIs.js";import"./Loading-CByrJVhO.js";import"./icon-switch.cssr-BCTOxvoq.js";import"./use-is-mounted-wlrzLfZo.js";import"./use-style-qLHIyj3D.js";import"./Scrollbar-Db3aKfvv.js";import"./use-rtl-CRyak7TN.js";import"./light-uWHRDFKR.js";import"./light-CE5Kvs_2.js";import"./light-B00G814I.js";import"./Scrollbar-DVK2lT9w.js";import"./delegate-CI_DDEu_.js";import"./VResizeObserver-Tzd5ds8d.js";import"./get-precise-event-target-DhO46Lpt.js";import"./light-MOj96jwO.js";import"./use-locale-CFjRjALw.js";import"./index-Dn5RNViO.js";import"./use-merged-state-CzrzZJbg.js";import"./resolve-slot-Dzko3qih.js";import"./Input-CFQSA5NN.js";import"./browser-DLIXj5nt.js";import"./is-browser-DqcmxZSF.js";import"./use-form-item-CNgNT5jP.js";import"./use-memo-BgHp9YyU.js";import"./Suffix-BqBRFVnL.js";import"./Icon-Ck7Ij_E6.js";import"./upperFirst-Bq7Kgunw.js";import"./toString-eibgRg41.js";import"./call-f2ri57Kd.js";import"./Select-BpXzRZdb.js";import"./fade-in-scale-up.cssr-CTZmXn_X.js";import"./use-false-until-truthy-BNJRTcsy.js";import"./Follower-DJGS5Fnl.js";import"./cssr-CS9sbUmO.js";import"./utils-BKyMmInE.js";import"./render-BxFg9-7m.js";import"./light-BOD3MGQo.js";import"./color-to-class-B0iQgAn2.js";import"./Close-D6FODkWY.js";import"./Popover-DLIip8wF.js";import"./_baseEach-BwxcRWC6.js";import"./_getTag-BJ2nhJXz.js";import"./get-BuNGRF3A.js";import"./clickoutside-CCtiUDaG.js";import"./format-length-B-p6aW7q.js";import"./index-C9vhMoZJ.js";import"./flatten-7z_8MaI9.js";import"./index-L98eAIry.js";import"./keep-B1eBS8j0.js";import"./FocusDetector-DcygY9Tk.js";import"./happens-in-CM8LO42l.js";import"./index-DsSU6HIH.js";import"./Forward-B4Y9XmRi.js";import"./keysOf-HiGXOwLp.js";import"./omit-DbnPTcif.js";import"./context-CNWzaUOd.js";import"./Button-B7xQqa1N.js";import"./Tree-CzaEbcLe.js";import"./Checkbox-DAl6jmZx.js";import"./light-DU0-KyAX.js";import"./fade-in-height-expand.cssr-Bx380MfO.js";import"./light-D6zEcTvP.js";import"./FormItem-Cp_SJVoE.js";import"./Form-BZRGTIxb.js";import"./light-CUlEsFk3.js";import"./Modal-BHLPhdX-.js";import"./context-ELq7iLHP.js";import"./Card-BhgyLFi8.js";import"./light-BqIgj82_.js";import"./light-rvBL92Ju.js";import"./Warning-WCOp46KX.js";import"./Image-CAe7wDsQ.js";import"./light-jvBBpnb8.js";import"./light-C52Zdmem.js";import"./_createCompounder-D746aL6M.js";import"./Tooltip-C_3SXSAr.js";import"./download-C2161hUv.js";import"./noImage-CAsvTj-5.js";import"./light-Blmb_y9V.js";import"./Add-CgLKrdZy.js";import"./Progress-BpvQ1C2a.js";import"./light-DH15IGTV.js";import"./light-DWk6YUKo.js";import"./Icon-C8ZbiYW7.js";import"./light-DD97CHyt.js";import"./componentList-BKZexaIE.js";import"./dashboard-YyjCL4ge.js";import"./LayoutSider-DeJZf5oa.js";import"./ChevronRight-DjG_plXV.js";import"./light-kqX_tTNW.js";import"./helpers-CjmtV6uB.js";import"./common-CalHcBJp.js";import"./index-C8mAaM2V.js";import"./editor-ouq_SSv2.js";import"./cloneDeep-C6NKQlMO.js";import"./dayjs.min-tKPc2Ebd.js";import"./Tabs-ZZwx8VB9.js";import"./light-B52QuVq1.js";import"./toNumber-C7_OyJEx.js";import"./route-block-B_A1xBdJ.js";const On=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:jn,Emitter:Cn,KeyCode:Fn,KeyMod:Sn,MarkerSeverity:En,MarkerTag:Tn,Position:Nn,Range:Rn,Selection:Bn,Selecti`)}findNextMatchSync(t,e,n){const a=this.scanner.findNextMatchSync(t,e,n);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},He=class{constructor(t,e){this.languageId=t,this.tokenType=e}},nt=class Ve{constructor(e,n){this._getBasicScopeAttributes=new Mt(a=>{const s=this._scopeToLanguage(a),r=this._toStandardTokenType(a);return new He(s,r)}),this._defaultAttributes=new He(e,8),this._embeddedLanguagesMatcher=new Sa(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ve._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ve.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!")}};nt._NULL_SCOPE_METADATA=new He(0,0);nt.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;var Fa=nt,Sa=class{constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,a])=>Gt(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])}},yt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Yt(t,e,n,a,s,r,i,c){const o=e.content.length;let l=!1,d=-1;if(i){const p=Ea(t,e,n,a,s,r);s=p.stack,a=p.linePos,n=p.isFirstLine,d=p.anchorPosition}const u=Date.now();for(;!l;){if(c!==0&&Date.now()-u>c)return new yt(s,!0);m()}return new yt(s,!1);function m(){const p=Ta(t,e,n,a,s,d);if(!p){r.produce(s,o),l=!0;return}const g=p.captureIndices,$=p.matchedRuleId,f=g&&g.length>0?g[0].end>a:!1;if($===xa){const h=s.getRule(t);r.produce(s,g[0].start),s=s.withContentNameScopesList(s.nameScopesList),te(t,e,n,s,r,h.endCaptures,g),r.produce(s,g[0].end);const y=s;if(s=s.parent,d=y.getAnchorPos(),!f&&y.getEnterPos()===a){s=y,r.produce(s,o),l=!0;return}}else{const h=t.getRule($);r.produce(s,g[0].start);const y=s,_=h.getName(e.content,g),z=s.contentNameScopesList.pushAttributed(_,t);if(s=s.push($,a,d,g[0].end===o,null,z,z),h instanceof We){const k=h;te(t,e,n,s,r,k.beginCaptures,g),r.produce(s,g[0].end),d=g[0].end;const F=k.getContentName(e.content,g),v=z.pushAttributed(F,t);if(s=s.withContentNameScopesList(v),k.endHasBackReferences&&(s=s.withEndRule(k.getEndWithResolvedBackReferences(e.content,g))),!f&&y.hasSameRuleAs(s)){s=s.pop(),r.produce(s,o),l=!0;return}}else if(h instanceof ze){const k=h;te(t,e,n,s,r,k.beginCaptures,g),r.produce(s,g[0].end),d=g[0].end;const F=k.getContentName(e.content,g),v=z.pushAttributed(F,t);if(s=s.withContentNameScopesList(v),k.whileHasBackReferences&&(s=s.withEndRule(k.getWhileWithResolvedBackReferences(e.content,g))),!f&&y.hasSameRuleAs(s)){s=s.pop(),r.produce(s,o),l=!0;return}}else if(te(t,e,n,s,r,h.captures,g),r.produce(s,g[0].end),s=s.pop(),!f){s=s.safePop(),r.produce(s,o),l=!0;return}}g[0].end>a&&(a=g[0].end,n=!1)}}function Ea(t,e,n,a,s,r){let i=s.beginRuleCapturedEOL?0:-1;const c=[];for(let o=s;o;o=o.pop()){const l=o.getRule(t);l instanceof ze&&c.push({rule:l,stack:o})}for(let o=c.pop();o;o=c.pop()){const{ruleScanner:l,findOptions:d}=Ba(o.rule,t,o.stack.endRule,n,a===i),u=l.findNextMatchSync(e,a,d);if(u){if(u.ruleId!==Xt){s=o.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(r.produce(o.stack,u.captureIndices[0].start),te(t,e,n,o.stack,r,o.rule.whileCaptures,u.captureIndices),r.produce(o.stack,u.captureIndices[0].end),i=u.captureIndices[0].end,u.captureIndices[0].end>a&&(a=u.captureIndices[0].end,n=!1))}else{s=o.stack.pop();break}}return{stack:s,linePos:a,anchorPosition:i,isFirstLine:n}}function Ta(t,e,n,a,s,r){const i=Na(t,e,n,a,s,r),c=t.getInjections();if(c.length===0)return i;const o=Ra(c,t,e,n,a,s,r);if(!o)return i;if(!i)return o;const l=i.captureIndices[0].start,d=o.captureIndices[0].start;return d<l||o.priorityMatch&&d===l?o:i}function Na(t,
`;const r=this.createOnigString(t),i=r.content.length,c=new Da(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),o=Yt(this,r,s,0,e,c,!0,a);return Ht(r),{lineLength:i,lineTokens:c,ruleStack:o.stack,stoppedEarly:o.stoppedEarly}}};function $t(t,e){return t=ra(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 ne=class q{constructor(e,n,a){this.parent=e,this.scopePath=n,this.tokenAttributes=a}static fromExtension(e,n){let a=e,s=(e==null?void 0:e.scopePath)??null;for(const r of n)s=Le.push(s,r.scopeNames),a=new q(a,s,r.encodedTokenAttributes);return a}static createRoot(e,n){return new q(null,new Le(null,e),n)}static createRootAndLookUpScopeName(e,n,a){const s=a.getMetadataForScope(e),r=new Le(null,e),i=a.themeProvider.themeMatch(r),c=q.mergeAttributes(n,s,i);return new q(null,r,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return q.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,a){let s=-1,r=0,i=0;return a!==null&&(s=a.fontStyle,r=a.foregroundId,i=a.backgroundId),U.set(e,n.languageId,n.tokenType,null,s,r,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return q._pushAttributed(this,e,n);const a=e.split(/ /g);let s=this;for(const r of a)s=q._pushAttributed(s,r,n);return s}static _pushAttributed(e,n,a){const s=a.getMetadataForScope(n),r=e.scopePath.push(n),i=a.themeProvider.themeMatch(r),c=q.mergeAttributes(e.tokenAttributes,s,i);return new q(e,r,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var s;const n=[];let a=this;for(;a&&a!==e;)n.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(((s=a.parent)==null?void 0:s.scopePath)??null)}),a=a.parent;return a===e?n.reverse():void 0}},Xe=class V{constructor(e,n,a,s,r,i,c,o){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=r,this.endRule=i,this.nameScopesList=c,this.contentNameScopesList=o,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=s}equals(e){return e===null?!1:V._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ne.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(){V._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,a,s,r,i,c){return new V(this,e,n,a,s,r,i,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var a,s;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(a=this.nameScopesList)==null?void 0:a.toString()}, ${(s=this.contentNameScopesList)==null?void 0:s.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 V(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,a;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScope
\f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0 \f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Hs(t,e,n,a){const s=a.schema,r=s.space==="svg"?!1:a.settings.omitOptionalTags;let i=s.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(t.tagName.toLowerCase());const c=[];let o;s.space==="html"&&t.tagName==="svg"&&(a.schema=ln);const l=Vs(a,t.properties),d=a.all(s.space==="html"&&t.tagName==="template"?t.content:t);return a.schema=s,d&&(i=!1),(l||!r||!Os(t,e,n))&&(c.push("<",t.tagName,l?" "+l:""),i&&(s.space==="svg"||a.settings.closeSelfClosing)&&(o=l.charAt(l.length-1),(!a.settings.tightSelfClosing||o==="/"||o&&o!=='"'&&o!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(d),!i&&(!r||!rt(t,e,n))&&c.push("</"+t.tagName+">"),c.join("")}function Vs(t,e){const n=[];let a=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){const r=Xs(t,s,e[s]);r&&n.push(r)}}for(;++a<n.length;){const r=t.settings.tightAttributes?n[a].charAt(n[a].length-1):void 0;a!==n.length-1&&r!=='"'&&r!=="'"&&(n[a]+=" ")}return n.join("")}function Xs(t,e,n){const a=Ya(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,r=t.settings.allowDangerousCharacters?0:1;let i=t.quote,c;if(a.overloadedBoolean&&(n===a.attribute||n==="")?n=!0:(a.boolean||a.overloadedBoolean&&typeof n!="string")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const o=J(a.attribute,Object.assign({},t.settings.characterReferences,{subset:ge.name[s][r]}));return n===!0||(n=Array.isArray(n)?(a.commaSeparated?ks:vs)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?o:(t.settings.preferUnquoted&&(c=J(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:ge.unquoted[s][r]}))),c!==n&&(t.settings.quoteSmart&&vt(n,i)>vt(n,t.alternative)&&(i=t.alternative),c=i+J(n,Object.assign({},t.settings.characterReferences,{subset:(i==="'"?ge.single:ge.double)[s][r],attribute:!0}))+i),o+(c&&"="+c))}const Js=["<","&"];function gn(t,e,n,a){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:J(t.value,Object.assign({},a.settings.characterReferences,{subset:Js}))}function Ks(t,e,n,a){return a.settings.allowDangerousHtml?t.value:gn(t,e,n,a)}function Ys(t,e,n,a){return a.all(t)}const Qs=ns("type",{invalid:er,unknown:tr,handlers:{comment:zs,doctype:ws,element:Hs,raw:Ks,root:Ys,text:gn}});function er(t){throw new Error("Expected node, not `"+t+"`")}function tr(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const nr={},ar={},sr=[];function rr(t,e){const n=nr,a=n.quote||'"',s=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:ir,all:or,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||Ua,characterReferences:n.characterReferences||ar,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ln:ts,quote:a,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function ir(t,e,n){return Qs(t,e,n,this)}function or(t){const e=[],n=t&&t.children||sr;let a=-1;for(;++a<n.length;)e[a]=this.one(n[a],a,t);return e.join("")}function cr(t){return Array.isArray(t)?t:[t]}function Ee(t,e=!1){var r;const n=t.split(/(\r?\n)/g);let a=0;const s=[];for(let i=0;i<n.length;i+=2){const c=e?n[i]+(n[i+1]||""):n[i];s.push([c,a]),a+=n[i].length,a+=((r=n[i+1])==null?void 0:r.length)||0}return s}function it(t){return!t||["plaintext","txt",`}));let _={type:"element",tagName:"span",properties:{class:"line"},children:[]},z=0;for(const v of h){let L={type:"element",tagName:"span",properties:{...v.htmlAttrs},children:[{type:"text",value:v.content}]};v.htmlStyle;const ue=pr(v.htmlStyle||hn(v));ue&&(L.properties.style=ue);for(const Q of s)L=((k=Q==null?void 0:Q.span)==null?void 0:k.call(m,L,y+1,z,_,v))||L;c==="inline"?i.children.push(L):c==="classic"&&_.children.push(L),z+=v.content.length}if(c==="classic"){for(const v of s)_=((F=v==null?void 0:v.line)==null?void 0:F.call(m,_,y+1))||_;u.push(_),r.push(_)}}),c==="classic"){for(const h of s)d=((g=h==null?void 0:h.code)==null?void 0:g.call(m,d))||d;l.children.push(d);for(const h of s)l=(($=h==null?void 0:h.pre)==null?void 0:$.call(m,l))||l;i.children.push(l)}let p=i;for(const h of s)p=((f=h==null?void 0:h.root)==null?void 0:f.call(m,p))||p;return a&&Te(p,a),p}function qr(t){return t.map(e=>{const n=[];let a="",s=0;return e.forEach((r,i)=>{const o=!(r.fontStyle&&r.fontStyle&I.Underline);o&&r.content.match(/^\s+$/)&&e[i+1]?(s||(s=r.offset),a+=r.content):a?(o?n.push({...r,offset:s,content:a+r.content}):n.push({content:a,offset:s},r),s=0,a=""):n.push(r)}),n})}function Lr(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const a=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return n;const[,s,r,i]=a;if(!s&&!i)return n;const c=[{...n,offset:n.offset+s.length,content:r}];return s&&c.unshift({content:s,offset:n.offset}),i&&c.push({content:i,offset:n.offset+s.length+r.length}),c}))}function Pr(t,e,n){var r;const a={meta:{},options:n,codeToHast:(i,c)=>Ce(t,i,c),codeToTokens:(i,c)=>je(t,i,c)};let s=rr(Ce(t,e,n,a));for(const i of Ze(n))s=((r=i.postprocess)==null?void 0:r.call(a,s,n))||s;return s}const Tt={light:"#333333",dark:"#bbbbbb"},Nt={light:"#fffffe",dark:"#1e1e1e"},Rt="__shiki_resolved";function lt(t){var c,o,l,d,u;if(t!=null&&t[Rt])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:a}=e;if(!n||!a){const m=e.settings?e.settings.find(p=>!p.name&&!p.scope):void 0;(c=m==null?void 0:m.settings)!=null&&c.foreground&&(a=m.settings.foreground),(o=m==null?void 0:m.settings)!=null&&o.background&&(n=m.settings.background),!a&&((l=e==null?void 0:e.colors)!=null&&l["editor.foreground"])&&(a=e.colors["editor.foreground"]),!n&&((d=e==null?void 0:e.colors)!=null&&d["editor.background"])&&(n=e.colors["editor.background"]),a||(a=e.type==="light"?Tt.light:Tt.dark),n||(n=e.type==="light"?Nt.light:Nt.dark),e.fg=a,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 s=0;const r=new Map;function i(m){var g;if(r.has(m))return r.get(m);s+=1;const p=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return(g=e.colorReplacements)!=null&&g[`#${p}`]?i(m):(r.set(m,p),p)}e.settings=e.settings.map(m=>{var f,h;const p=((f=m.settings)==null?void 0:f.foreground)&&!m.settings.foreground.startsWith("#"),g=((h=m.settings)==null?void 0:h.background)&&!m.settings.background.startsWith("#");if(!p&&!g)return m;const $={...m,settings:{...m.settings}};if(p){const y=i(m.settings.foreground);e.colorReplacements[y]=m.settings.foreground,$.settings.foreground=y}if(g){const y=i(m.settings.background);e.colorReplacements[y]=m.settings.background,$.settings.background=y}return $});for(const m of Object.keys(e.colors||{}))if((m==="editor.foreground"||m==="editor.background"||m.startsWith("terminal.ansi"))&&!((u=e.colors[m])!=null&&u.startsWith("#"))){const p=i(e.colors[m]);e.colorReplacements[p]=e.colors[m],e.colors[m]=p}return Object.defineProperty(e,Rt,{enumerable:!1,writable:!1,value:!0}),e}async function An(t){return Array.from(new Set((await Promise.all(t.filter(e=>!lr(e)).map(async e=>await fn(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function zn(t){return(await Promise.all(t.map(async n=>ur(n)?null:lt(await fn(n))))).filter(n=>!!n)}var Ir=Object.defineProperty,Or=(t,e,n)=>e in t?Ir(t,e,{enumerable:
|