@xano/xanoscript-monaco-editor 0.1.2 → 0.1.4
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/dist/.vite/manifest.json +49 -49
- package/dist/assets/{editor-4HUBGwOu.js → editor-Byod6NP8.js} +1 -1
- package/dist/assets/{files.contribution._fileEditorFactory-YNF_vxMj.js → files.contribution._fileEditorFactory-C85bkWoZ.js} +1 -1
- package/dist/assets/{iconv-lite-umd-BCZHOywd.js → iconv-lite-umd-DnjDMB5M.js} +1 -1
- package/dist/assets/{index-Cw1WVxjJ.js → index-BpQMGi_i.js} +1 -1
- package/dist/assets/{index-DSexFukl.js → index-By7ErQ-m.js} +245 -245
- package/dist/assets/{index-B7W-kS7G.js → index-C9rlpWKP.js} +1 -1
- package/dist/assets/{index-sQEJqDvC.js → index-Hz1e5lve.js} +1 -1
- package/dist/assets/{index-B48SQPT2.js → index-ONm7yPz5.js} +1 -1
- package/dist/assets/{index-r-mEMSNw.js → index-R8LYJ0J3.js} +2 -2
- package/dist/assets/{index-DV2XmbY1.js → index-TydmG5-L.js} +1 -1
- package/dist/assets/{index-CBODr4QR.js → index-WkWuUe65.js} +1 -1
- package/dist/assets/{index-9GTRLRSC.js → index-fP_JEi35.js} +1 -1
- package/dist/assets/{main--VvQJcub.js → main-B6LylQ0P.js} +1 -1
- package/dist/assets/{main-DWv94O3B.js → main-B9VgSj0j.js} +1 -1
- package/dist/assets/{tokenClassificationRegistry-CZyxOMX0.js → tokenClassificationRegistry-YXExWoc1.js} +1 -1
- package/dist/assets/{views-Bu3Oa5Y-.js → views-CDbAv1Ln.js} +1 -1
- package/dist/assets/workbenchThemeService.service-CipP-eMQ.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/workbenchThemeService.service-CXlQNmVU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ak as o,cc as d,oC as u,bW as p,mt as c,tx as G,tA as t,cR as e,tB as a,cy as h,bu as g,f as v,g as l,W as m}from"./index-
|
|
1
|
+
import{ak as o,cc as d,oC as u,bW as p,mt as c,tx as G,tA as t,cR as e,tB as a,cy as h,bu as g,f as v,g as l,W as m}from"./index-By7ErQ-m.js";import{T as D}from"./files.contribution._fileEditorFactory-C85bkWoZ.js";import{M as S,a as N,f as r}from"./editor-Byod6NP8.js";class y{constructor(){this.onWillDispose=e.None,this.hasMaximizedGroup=()=>!1,this.windowId=g.vscodeWindowId,this.onDidLayout=e.None,this.onDidScroll=e.None,this.isReady=!0,this.whenReady=Promise.resolve(),this.whenRestored=Promise.resolve(),this.hasRestorableState=!1,this.centerLayout=t,this.isLayoutCentered=t,this.enforcePartOptions=t,this.onDidChangeActiveGroup=e.None,this.onDidAddGroup=e.None,this.onDidRemoveGroup=e.None,this.onDidMoveGroup=e.None,this.onDidActivateGroup=e.None,this.onDidChangeGroupIndex=e.None,this.onDidChangeGroupLocked=e.None,this.onDidChangeGroupMaximized=e.None,this.activeGroup=r,this.groups=[r],this.count=0,this.orientation=h.HORIZONTAL,this.getGroups=()=>[],this.getGroup=()=>{},this.activateGroup=t,this.getSize=t,this.setSize=t,this.arrangeGroups=t,this.toggleMaximizeGroup=t,this.toggleExpandGroup=t,this.applyLayout=t,this.getLayout=t,this.setGroupOrientation=t,this.findGroup=()=>{},this.addGroup=t,this.removeGroup=t,this.moveGroup=t,this.mergeGroup=t,this.mergeAllGroups=t,this.copyGroup=t,this.partOptions=a,this.onDidChangeEditorPartOptions=e.None,this.createEditorDropTarget=t}get contentDimension(){return t()}get sideGroup(){return t()}}class f{constructor(){this.getScopedInstantiationService=t,this.registerContextKeyProvider=t,this.saveWorkingSet=t,this.getWorkingSets=t,this.applyWorkingSet=t,this.deleteWorkingSet=t,this.onDidCreateAuxiliaryEditorPart=e.None,this.mainPart=new y,this.activePart=this.mainPart,this.parts=[this.mainPart],this.getPart=t,this.createAuxiliaryEditorPart=t,this.onDidChangeGroupMaximized=e.None,this.toggleMaximizeGroup=t,this.toggleExpandGroup=t,this.partOptions=a,this.createEditorDropTarget=t,this._serviceBrand=void 0,this.getLayout=t,this.onDidChangeActiveGroup=e.None,this.onDidAddGroup=e.None,this.onDidRemoveGroup=e.None,this.onDidMoveGroup=e.None,this.onDidActivateGroup=e.None,this.onDidLayout=e.None,this.onDidScroll=e.None,this.onDidChangeGroupIndex=e.None,this.onDidChangeGroupLocked=e.None,this.activeGroup=r,this.groups=[r],this.count=0,this.orientation=h.HORIZONTAL,this.isReady=!1,this.whenReady=Promise.resolve(),this.whenRestored=Promise.resolve(),this.hasRestorableState=!1,this.getGroups=()=>[],this.getGroup=()=>{},this.activateGroup=t,this.getSize=t,this.setSize=t,this.arrangeGroups=t,this.applyLayout=t,this.centerLayout=t,this.isLayoutCentered=()=>!1,this.setGroupOrientation=t,this.findGroup=()=>{},this.addGroup=t,this.removeGroup=t,this.moveGroup=t,this.mergeGroup=t,this.mergeAllGroups=t,this.copyGroup=t,this.onDidChangeEditorPartOptions=e.None,this.enforcePartOptions=t}get contentDimension(){return t()}get sideGroup(){return t()}}let s=class extends N{constructor(n){super(n.createInstance(f),!0,n)}};s=v([l(0,m)],s);function O(i){return{[c.toString()]:new o(G,void 0,!0),[p.toString()]:new o(S,[i,()=>!1],!0),[u.toString()]:new o(D,[],!1),[d.toString()]:new o(s)}}export{S as MonacoEditorService,O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as M,D as L,w as T,$ as H,f as x,g as C,c1 as N,i as D,a6 as w,a7 as i,a8 as h,N as y,T as u,y as _,aa as k,ac as E,ad as A,ae as O,af as v,n as B,c2 as $,c3 as P,ah as I,ai as z,c4 as R,c5 as F,bT as K,c6 as W,c7 as V,c8 as b,c9 as j,ca as G}from"./index-
|
|
1
|
+
import{Z as M,D as L,w as T,$ as H,f as x,g as C,c1 as N,i as D,a6 as w,a7 as i,a8 as h,N as y,T as u,y as _,aa as k,ac as E,ad as A,ae as O,af as v,n as B,c2 as $,c3 as P,ah as I,ai as z,c4 as R,c5 as F,bT as K,c6 as W,c7 as V,c8 as b,c9 as j,ca as G}from"./index-By7ErQ-m.js";const U=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var f;M(U);var d;let c=(d=class extends L{static get(t){return t.getContribution(f.ID)}constructor(t,e,n){super(),this._editor=t,this._languageService=n,this._widget=null,this._register(this._editor.onDidChangeModel(o=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(o=>this.stop())),this._register(T.onDidChange(o=>this.stop())),this._register(this._editor.onKeyUp(o=>o.keyCode===H.Escape&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new S(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}},f=d,d.ID="editor.contrib.inspectTokens",d);c=f=x([C(1,N),C(2,D)],c);class Z extends z{constructor(){super({id:"editor.action.inspectTokens",label:R.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(t,e){c.get(e)?.launch()}}function q(g){let t="";for(let e=0,n=g.length;e<n;e++){const o=g.charCodeAt(e);switch(o){case I.Tab:t+="→";break;case I.Space:t+="·";break;default:t+=String.fromCharCode(o)}}return t}function J(g,t){const e=T.get(t);if(e)return e;const n=g.encodeLanguageId(t);return{getInitialState:()=>P,tokenize:(o,l,r)=>$(t,r),tokenizeEncoded:(o,l,r)=>B(n,r)}}const m=class m extends L{constructor(t,e){super(),this.allowEditorOverflow=!0,this._editor=t,this._languageService=e,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=J(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(n=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return m._ID}_compute(t){const e=this._getTokensAtLine(t.lineNumber);let n=0;for(let a=e.tokens1.length-1;a>=0;a--){const p=e.tokens1[a];if(t.column-1>=p.offset){n=a;break}}let o=0;for(let a=e.tokens2.length>>>1;a>=0;a--)if(t.column-1>=e.tokens2[a<<1]){o=a;break}const l=this._model.getLineContent(t.lineNumber);let r="";if(n<e.tokens1.length){const a=e.tokens1[n].offset,p=n+1<e.tokens1.length?e.tokens1[n+1].offset:l.length;r=l.substring(a,p)}w(this._domNode,i("h2.tm-token",void 0,q(r),i("span.tm-token-length",void 0,`${r.length} ${r.length===1?"char":"chars"}`))),h(this._domNode,i("hr.tokens-inspect-separator",{style:"clear:both"}));const s=(o<<1)+1<e.tokens2.length?this._decodeMetadata(e.tokens2[(o<<1)+1]):null;h(this._domNode,i("table.tm-metadata-table",void 0,i("tbody",void 0,i("tr",void 0,i("td.tm-metadata-key",void 0,"language"),i("td.tm-metadata-value",void 0,`${s?s.languageId:"-?-"}`)),i("tr",void 0,i("td.tm-metadata-key",void 0,"token type"),i("td.tm-metadata-value",void 0,`${s?this._tokenTypeToString(s.tokenType):"-?-"}`)),i("tr",void 0,i("td.tm-metadata-key",void 0,"font style"),i("td.tm-metadata-value",void 0,`${s?this._fontStyleToString(s.fontStyle):"-?-"}`)),i("tr",void 0,i("td.tm-metadata-key",void 0,"foreground"),i("td.tm-metadata-value",void 0,`${s?y.Format.CSS.formatHex(s.foreground):"-?-"}`)),i("tr",void 0,i("td.tm-metadata-key",void 0,"background"),i("td.tm-metadata-value",void 0,`${s?y.Format.CSS.formatHex(s.background):"-?-"}`))))),h(this._domNode,i("hr.tokens-inspect-separator")),n<e.tokens1.length&&h(this._domNode,i("span.tm-token-type",void 0,e.tokens1[n].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(t){const e=T.getColorMap(),n=u.getLanguageId(t),o=u.getTokenType(t),l=u.getFontStyle(t),r=u.getForeground(t),s=u.getBackground(t);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:o,fontStyle:l,foreground:e[r],background:e[s]}}_tokenTypeToString(t){switch(t){case _.Other:return"Other";case _.Comment:return"Comment";case _.String:return"String";case _.RegEx:return"RegEx";default:return"??"}}_fontStyleToString(t){let e="";return t&k.Italic&&(e+="italic "),t&k.Bold&&(e+="bold "),t&k.Underline&&(e+="underline "),t&k.Strikethrough&&(e+="strikethrough "),e.length===0&&(e="---"),e}_getTokensAtLine(t){const e=this._getStateBeforeLine(t),n=this._tokenizationSupport.tokenize(this._model.getLineContent(t),!0,e),o=this._tokenizationSupport.tokenizeEncoded(this._model.getLineContent(t),!0,e);return{startState:e,tokens1:n.tokens,tokens2:o.tokens,endState:n.endState}}_getStateBeforeLine(t){let e=this._tokenizationSupport.getInitialState();for(let n=1;n<t;n++)e=this._tokenizationSupport.tokenize(this._model.getLineContent(n),!0,e).endState;return e}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[E.BELOW,E.ABOVE]}}};m._ID="editor.contrib.inspectTokensWidget";let S=m;A(c.ID,c,O.Lazy);v(Z);class Q extends z{constructor(){super({id:"editor.action.toggleHighContrast",label:F.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(t,e){const n=t.get(N),o=n.getColorTheme();K(o.type)?(n.setTheme(this._originalThemeName||(b(o.type)?W:V)),this._originalThemeName=null):(n.setTheme(b(o.type)?j:G),this._originalThemeName=o.themeName)}}v(Q);function Y(){return{}}export{Y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./main
|
|
2
|
-
import{D as P,E as xe,S as Pe,a as pe,T as N,k as ve,n as De,b as Ne,o as Ae,c as Re,C as _e,L as Oe,l as ke,_ as ie,R as oe,d as B,e as je,F as Le,U as Fe,t as Be,f as X,g as m,I as Ce,h as le,i as ge,j as he,m as Ie,p as Z,q as l,s as $e,u as Ve,v as Ge,w as te,x as Me,y as v,P as We,z as He,A as qe,B as Ue,G as Je,H as Ke,J as Te,K as Ye,M as Qe,N as W,O as Xe,Q as Ze,V as et,W as ze,X as tt,Y as nt,Z as it,$ as ot,a0 as rt,a1 as me,a2 as st,a3 as at,a4 as ct,a5 as dt,a6 as Se,a7 as ut,a8 as p,a9 as lt,aa as G,ab as gt,ac as ye,ad as ht,ae as mt,af as ft,ag as pt,ah as be,ai as _t,aj as kt,ak as Tt,al as St,am as yt,an as bt,ao as wt,ap as vt}from"./index-DSexFukl.js";import{I as Ee}from"./workbenchThemeService.service-CXlQNmVU.js";import{t as $,g as Lt,S as Ct}from"./tokenClassificationRegistry-CZyxOMX0.js";class It extends P{constructor(e,t,n,o,i,s,r){super(),this._grammar=e,this._initialState=t,this._containsEmbeddedLanguages=n,this._createBackgroundTokenizer=o,this._backgroundTokenizerShouldOnlyVerifyTokens=i,this._reportTokenizationTime=s,this._reportSlowTokenization=r,this._seenLanguages=[],this._onDidEncounterLanguage=this._register(new xe),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event}get backgroundTokenizerShouldOnlyVerifyTokens(){return this._backgroundTokenizerShouldOnlyVerifyTokens()}getInitialState(){return this._initialState}tokenize(e,t,n){throw new Error("Not supported!")}createBackgroundTokenizer(e,t){if(this._createBackgroundTokenizer)return this._createBackgroundTokenizer(e,t)}tokenizeEncoded(e,t,n){const o=Math.random()*1e4<1,i=this._reportSlowTokenization||o,s=i?new Pe(!0):void 0,r=this._grammar.tokenizeLine2(e,n,500);if(i){const a=s.elapsed();(o||a>32)&&this._reportTokenizationTime(a,e.length,o)}if(r.stoppedEarly)return console.warn(`Time limit reached when tokenizing line: ${e.substring(0,100)}`),new pe(r.tokens,n);if(this._containsEmbeddedLanguages){const a=this._seenLanguages,u=r.tokens;for(let g=0,k=u.length>>>1;g<k;g++){const w=u[(g<<1)+1],y=N.getLanguageId(w);a[y]||(a[y]=!0,this._onDidEncounterLanguage.fire(y))}}let c;return n.equals(r.ruleStack)?c=n:c=r.ruleStack,new pe(r.tokens,c)}}class Mt extends P{get backgroundTokenizerShouldOnlyVerifyTokens(){return this._actual.backgroundTokenizerShouldOnlyVerifyTokens}constructor(e,t,n,o){super(),this._encodedLanguageId=e,this._actual=t,this._maxTokenizationLineLength=o,this._register(ve(this._maxTokenizationLineLength)),this._register(n)}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){throw new Error("Not supported!")}tokenizeEncoded(e,t,n){return e.length>=this._maxTokenizationLineLength.get()?De(this._encodedLanguageId,n):this._actual.tokenizeEncoded(e,t,n)}createBackgroundTokenizer(e,t){if(this._actual.createBackgroundTokenizer)return this._actual.createBackgroundTokenizer(e,t)}}const F=class F{static getChannel(e){return e.getChannel(F.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(F.CHANNEL_NAME,t)}};F.CHANNEL_NAME="textMateWorkerHost";let re=F;class U{static fromMany(e){const t=e.map(n=>new U(n));return new zt(t)}constructor(e){this.transformation=e,this.idx=0,this.offset=0}transform(e){let t=this.transformation.replacements.at(this.idx);for(;t&&t.replaceRange.endExclusive<=e;)this.offset+=t.getLengthDelta(),this.idx++,t=this.transformation.replacements.at(this.idx);if(!(t&&t.replaceRange.start<=e))return e+this.offset}}class zt{constructor(e){this.transformers=e}transform(e){for(const t of this.transformers){const n=t.transform(e);if(n===void 0)return;e=n}return e}}const Y=class Y extends P{constructor(e,t,n,o,i,s){super(),this._model=e,this._worker=t,this._languageIdCodec=n,this._backgroundTokenizationStore=o,this._configurationService=i,this._maxTokenizationLineLength=s,this.controllerId=Y._id++,this._pendingChanges=[],this._states=new Ne,this._loggingEnabled=Ae("editor.experimental.asyncTokenizationLogging",!1,this._configurationService),this._register(ve(this._loggingEnabled)),this._register(this._model.onDidChangeContent(a=>{this._shouldLog&&console.log("model change",{fileName:this._model.uri.fsPath.split("\\").pop(),changes:ne(a.changes)}),this._worker.$acceptModelChanged(this.controllerId,a),this._pendingChanges.push(a)})),this._register(this._model.onDidChangeLanguage(a=>{const u=this._model.getLanguageId(),g=this._languageIdCodec.encodeLanguageId(u);this._worker.$acceptModelLanguageChanged(this.controllerId,u,g)}));const r=this._model.getLanguageId(),c=this._languageIdCodec.encodeLanguageId(r);this._worker.$acceptNewModel({uri:this._model.uri,versionId:this._model.getVersionId(),lines:this._model.getLinesContent(),EOL:this._model.getEOL(),languageId:r,encodedLanguageId:c,maxTokenizationLineLength:this._maxTokenizationLineLength.get(),controllerId:this.controllerId}),this._register(Re(a=>{const u=this._maxTokenizationLineLength.read(a);this._worker.$acceptMaxTokenizationLineLength(this.controllerId,u)}))}dispose(){super.dispose(),this._worker.$acceptRemovedModel(this.controllerId)}requestTokens(e,t){this._worker.$retokenize(this.controllerId,e,t)}async setTokensAndStates(e,t,n,o){if(this.controllerId!==e)return;let i=_e.deserialize(new Uint8Array(n));if(this._shouldLog&&console.log("received background tokenization result",{fileName:this._model.uri.fsPath.split("\\").pop(),updatedTokenLines:i.map(r=>r.getLineRange()).join(" & "),updatedStateLines:o.map(r=>new Oe(r.startLineNumber,r.startLineNumber+r.stateDeltas.length).toString()).join(" & ")}),this._shouldLog){const r=this._pendingChanges.filter(c=>c.versionId<=t).map(c=>c.changes).map(c=>ne(c)).join(" then ");console.log("Applying changes to local states",r)}for(;this._pendingChanges.length>0&&this._pendingChanges[0].versionId<=t;){const r=this._pendingChanges.shift();this._states.acceptChanges(r.changes)}if(this._pendingChanges.length>0){if(this._shouldLog){const a=this._pendingChanges.map(u=>u.changes).map(u=>ne(u)).join(" then ");console.log("Considering non-processed changes",a)}const r=U.fromMany(this._pendingChanges.map(a=>ke(a.changes))),c=new _e;for(const a of i)for(let u=a.startLineNumber;u<=a.endLineNumber;u++)r.transform(u-1)!==void 0&&c.add(u,a.getLineTokens(u));i=c.finalize();for(const a of this._pendingChanges)for(const u of a.changes)for(let g=0;g<i.length;g++)i[g].applyEdit(u.range,u.text)}const s=U.fromMany(this._pendingChanges.map(r=>ke(r.changes)));if(!this._applyStateStackDiffFn||!this._initialState){const{applyStateStackDiff:r,INITIAL:c}=await ie(()=>import("./main--VvQJcub.js").then(a=>a.m),__vite__mapDeps([0,1,2]),import.meta.url).then(a=>a.default??a);this._applyStateStackDiffFn=r,this._initialState=c}for(const r of o){let c=r.startLineNumber<=1?this._initialState:this._states.getEndState(r.startLineNumber-1);for(let a=0;a<r.stateDeltas.length;a++){const u=r.stateDeltas[a];let g;u?(g=this._applyStateStackDiffFn(c,u),this._states.setEndState(r.startLineNumber+a,g)):g=this._states.getEndState(r.startLineNumber+a);const k=s.transform(r.startLineNumber+a-1);k!==void 0&&this._backgroundTokenizationStore.setEndState(k+1,g),r.startLineNumber+a>=this._model.getLineCount()-1&&this._backgroundTokenizationStore.backgroundTokenizationFinished(),c=g}}this._backgroundTokenizationStore.setTokens(i)}get _shouldLog(){return this._loggingEnabled.get()}};Y._id=0;let se=Y;function ne(h){return h.map(e=>oe.lift(e.range).toString()+" => "+e.text).join(" & ")}var H,z;let ae=(z=class{constructor(e,t,n,o,i,s,r){this._reportTokenizationTime=e,this._shouldTokenizeAsync=t,this._extensionResourceLoaderService=n,this._configurationService=o,this._languageService=i,this._notificationService=s,this._telemetryService=r,this._workerProxyPromise=null,this._worker=null,this._workerProxy=null,this._workerTokenizerControllers=new Map,this._currentTheme=null,this._currentTokenColorMap=null,this._grammarDefinitions=[]}dispose(){this._disposeWorker()}createBackgroundTokenizer(e,t,n){if(!this._shouldTokenizeAsync()||e.isTooLargeForSyncing())return;const o=new B,i=this._getWorkerProxy().then(s=>{if(o.isDisposed||!s)return;const r={controller:void 0,worker:this._worker};return o.add(Et(e,()=>{const c=new se(e,s,this._languageService.languageIdCodec,t,this._configurationService,n);return r.controller=c,this._workerTokenizerControllers.set(c.controllerId,c),Be(()=>{r.controller=void 0,this._workerTokenizerControllers.delete(c.controllerId),c.dispose()})})),r});return{dispose(){o.dispose()},requestTokens:async(s,r)=>{const c=await i;c?.controller&&c.worker===this._worker&&c.controller.requestTokens(s,r)},reportMismatchingTokens:s=>{H._reportedMismatchingTokens||(H._reportedMismatchingTokens=!0,this._notificationService.error({message:"Async Tokenization Token Mismatch in line "+s,name:"Async Tokenization Token Mismatch"}),this._telemetryService.publicLog2("asyncTokenizationMismatchingTokens",{}))}}}setGrammarDefinitions(e){this._grammarDefinitions=e,this._disposeWorker()}acceptTheme(e,t){this._currentTheme=e,this._currentTokenColorMap=t,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy&&this._workerProxy.$acceptTheme(this._currentTheme,this._currentTokenColorMap)}_getWorkerProxy(){return this._workerProxyPromise||(this._workerProxyPromise=this._createWorkerProxy()),this._workerProxyPromise}async _createWorkerProxy(){const e={grammarDefinitions:this._grammarDefinitions,onigurumaWASMUri:new URL(""+new URL("onig-Du5pRr7Y.wasm",import.meta.url).href,import.meta.url).href},t=this._worker=je(Le.asBrowserUri("vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain.js"),"TextMateWorker");return re.setChannel(t,{$readFile:async n=>{const o=Fe.revive(n);return this._extensionResourceLoaderService.readExtensionResource(o)},$setTokensAndStates:async(n,o,i,s)=>{const r=this._workerTokenizerControllers.get(n);r&&r.setTokensAndStates(n,o,i,s)},$reportTokenizationTime:(n,o,i,s,r)=>{this._reportTokenizationTime(n,o,i,s,r)}}),await t.proxy.$init(e),this._worker!==t?null:(this._workerProxy=t.proxy,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy.$acceptTheme(this._currentTheme,this._currentTokenColorMap),t.proxy)}_disposeWorker(){for(const e of this._workerTokenizerControllers.values())e.dispose();this._workerTokenizerControllers.clear(),this._worker&&(this._worker.dispose(),this._worker=null),this._workerProxy=null,this._workerProxyPromise=null}},H=z,z._reportedMismatchingTokens=!1,z);ae=H=X([m(2,Ce),m(3,le),m(4,ge),m(5,he),m(6,Ie)],ae);function Et(h,e){const t=new B,n=t.add(new B);function o(){h.isAttachedToEditor()?n.add(e()):n.clear()}return o(),t.add(h.onDidChangeAttached(()=>{o()})),t}class xt{constructor(){this._scopeNameToLanguageRegistration=Object.create(null)}reset(){this._scopeNameToLanguageRegistration=Object.create(null)}register(e){this._scopeNameToLanguageRegistration[e.scopeName]=e}getGrammarDefinition(e){return this._scopeNameToLanguageRegistration[e]||null}}const q="No TM Grammar registered for this language.";class Pt extends P{constructor(e,t,n,o){super(),this._host=e,this._initialState=n.INITIAL,this._scopeRegistry=new xt,this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._grammarRegistry=this._register(new n.Registry({onigLib:o,loadGrammar:async i=>{const s=this._scopeRegistry.getGrammarDefinition(i);if(!s)return this._host.logTrace(`No grammar found for scope ${i}`),null;const r=s.location;try{const c=await this._host.readFile(r);return n.parseRawGrammar(c,r.path)}catch(c){return this._host.logError(`Unable to load and parse grammar for scope ${i} from ${r}`,c),null}},getInjections:i=>{const s=i.split(".");let r=[];for(let c=1;c<=s.length;c++){const a=s.slice(0,c).join(".");r=[...r,...this._injections[a]||[]]}return r}}));for(const i of t){if(this._scopeRegistry.register(i),i.injectTo){for(const s of i.injectTo){let r=this._injections[s];r||(this._injections[s]=r=[]),r.push(i.scopeName)}if(i.embeddedLanguages)for(const s of i.injectTo){let r=this._injectedEmbeddedLanguages[s];r||(this._injectedEmbeddedLanguages[s]=r=[]),r.push(i.embeddedLanguages)}}i.language&&this._languageToScope.set(i.language,i.scopeName)}}has(e){return this._languageToScope.has(e)}setTheme(e,t){this._grammarRegistry.setTheme(e,t)}getColorMap(){return this._grammarRegistry.getColorMap()}async createGrammar(e,t){const n=this._languageToScope.get(e);if(typeof n!="string")throw new Error(q);const o=this._scopeRegistry.getGrammarDefinition(n);if(!o)throw new Error(q);const i=o.embeddedLanguages;if(this._injectedEmbeddedLanguages[n]){const c=this._injectedEmbeddedLanguages[n];for(const a of c)for(const u of Object.keys(a))i[u]=a[u]}const s=Object.keys(i).length>0;let r;try{r=await this._grammarRegistry.loadGrammarWithConfiguration(n,t,{embeddedLanguages:i,tokenTypes:o.tokenTypes,balancedBracketSelectors:o.balancedBracketSelectors,unbalancedBracketSelectors:o.unbalancedBracketSelectors})}catch(c){throw c.message&&c.message.startsWith("No grammar provided for")?new Error(q):c}return{languageId:e,grammar:r,initialState:this._initialState,containsEmbeddedLanguages:s,sourceExtensionId:o.sourceExtensionId}}}const M=Z.registerExtensionPoint({extensionPoint:"grammars",deps:[$e],jsonSchema:{description:l(12863,"Contributes textmate tokenizers."),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:l(12864,"Language identifier for which this syntax is contributed to."),type:"string"},scopeName:{description:l(12865,"Textmate scope name used by the tmLanguage file."),type:"string"},path:{description:l(12866,"Path of the tmLanguage file. The path is relative to the extension folder and typically starts with './syntaxes/'."),type:"string"},embeddedLanguages:{description:l(12867,"A map of scope name to language id if this grammar contains embedded languages."),type:"object"},tokenTypes:{description:l(12868,"A map of scope name to token types."),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:l(12869,"List of language scope names to which this grammar is injected to."),type:"array",items:{type:"string"}},balancedBracketScopes:{description:l(12870,"Defines which scope names contain balanced brackets."),type:"array",items:{type:"string"},default:["*"]},unbalancedBracketScopes:{description:l(12871,"Defines which scope names do not contain balanced brackets."),type:"array",items:{type:"string"},default:[]}},required:["scopeName","path"]}}});var A,E;let ce=(E=class extends P{constructor(e,t,n,o,i,s,r,c,a,u){super(),this._languageService=e,this._themeService=t,this._extensionResourceLoaderService=n,this._notificationService=o,this._logService=i,this._configurationService=s,this._progressService=r,this._environmentService=c,this._instantiationService=a,this._telemetryService=u,this._createdModes=[],this._encounteredLanguages=[],this._debugMode=!1,this._debugModePrintFunc=()=>{},this._grammarDefinitions=null,this._grammarFactory=null,this._tokenizersRegistrations=this._register(new B),this._currentTheme=null,this._currentTokenColorMap=null,this._threadedBackgroundTokenizerFactory=this._instantiationService.createInstance(ae,(g,k,w,y,T)=>this._reportTokenizationTime(g,k,w,y,!0,T),()=>this.getAsyncTokenizationEnabled()),this._vscodeOniguruma=null,this._styleElement=Ve(),this._styleElement.className="vscode-tokens-styles",M.setHandler(g=>this._handleGrammarsExtPoint(g)),this._updateTheme(this._themeService.getColorTheme(),!0),this._register(this._themeService.onDidColorThemeChange(()=>{this._updateTheme(this._themeService.getColorTheme(),!1)})),this._register(this._languageService.onDidRequestRichLanguageFeatures(g=>{this._createdModes.push(g)}))}getAsyncTokenizationEnabled(){return!!this._configurationService.getValue("editor.experimental.asyncTokenization")}getAsyncTokenizationVerification(){return!!this._configurationService.getValue("editor.experimental.asyncTokenizationVerification")}_handleGrammarsExtPoint(e){this._grammarDefinitions=null,this._grammarFactory&&(this._grammarFactory.dispose(),this._grammarFactory=null),this._tokenizersRegistrations.clear(),this._grammarDefinitions=[];for(const t of e){const n=t.value;for(const o of n){const i=this._validateGrammarDefinition(t,o);if(i&&(this._grammarDefinitions.push(i),i.language)){const s=new Ge(()=>this._createTokenizationSupport(i.language));this._tokenizersRegistrations.add(s),this._tokenizersRegistrations.add(te.registerFactory(i.language,s))}}}this._threadedBackgroundTokenizerFactory.setGrammarDefinitions(this._grammarDefinitions);for(const t of this._createdModes)te.getOrCreate(t)}_validateGrammarDefinition(e,t){if(!At(e.description.extensionLocation,t,e.collector,this._languageService))return null;const n=Me(e.description.extensionLocation,t.path),o=Object.create(null);if(t.embeddedLanguages){const c=Object.keys(t.embeddedLanguages);for(let a=0,u=c.length;a<u;a++){const g=c[a],k=t.embeddedLanguages[g];typeof k=="string"&&this._languageService.isRegisteredLanguageId(k)&&(o[g]=this._languageService.languageIdCodec.encodeLanguageId(k))}}const i=Object.create(null);if(t.tokenTypes){const c=Object.keys(t.tokenTypes);for(const a of c)switch(t.tokenTypes[a]){case"string":i[a]=v.String;break;case"other":i[a]=v.Other;break;case"comment":i[a]=v.Comment;break}}const s=t.language&&this._languageService.isRegisteredLanguageId(t.language)?t.language:void 0;function r(c,a){return!Array.isArray(c)||!c.every(u=>typeof u=="string")?a:c}return{location:n,language:s,scopeName:t.scopeName,embeddedLanguages:o,tokenTypes:i,injectTo:t.injectTo,balancedBracketSelectors:r(t.balancedBracketScopes,["*"]),unbalancedBracketSelectors:r(t.unbalancedBracketScopes,[]),sourceExtensionId:e.description.id}}startDebugMode(e,t){if(this._debugMode){this._notificationService.error(l(12852,"Already Logging."));return}this._debugModePrintFunc=e,this._debugMode=!0,this._debugMode&&this._progressService.withProgress({location:We.Notification,buttons:[l(12853,"Stop")]},n=>(n.report({message:l(12854,"Preparing to log TM Grammar parsing. Press Stop when finished.")}),this._getVSCodeOniguruma().then(o=>(o.setDefaultDebugCall(!0),n.report({message:l(12855,"Now logging TM Grammar parsing. Press Stop when finished.")}),new Promise((i,s)=>{})))),n=>{this._getVSCodeOniguruma().then(o=>{this._debugModePrintFunc=()=>{},this._debugMode=!1,o.setDefaultDebugCall(!1),t()})})}_canCreateGrammarFactory(){return!!this._grammarDefinitions}async _getOrCreateGrammarFactory(){if(this._grammarFactory)return this._grammarFactory;const[e,t]=await Promise.all([ie(()=>import("./main--VvQJcub.js").then(o=>o.m),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.default??o),this._getVSCodeOniguruma()]),n=Promise.resolve({createOnigScanner:o=>t.createOnigScanner(o),createOnigString:o=>t.createOnigString(o)});return this._grammarFactory?this._grammarFactory:(this._grammarFactory=new Pt({logTrace:o=>this._logService.trace(o),logError:(o,i)=>this._logService.error(o,i),readFile:o=>this._extensionResourceLoaderService.readExtensionResource(o)},this._grammarDefinitions||[],e,n),this._updateTheme(this._themeService.getColorTheme(),!0),this._grammarFactory)}async _createTokenizationSupport(e){if(!this._languageService.isRegisteredLanguageId(e)||!this._canCreateGrammarFactory())return null;try{const t=await this._getOrCreateGrammarFactory();if(!t.has(e))return null;const n=this._languageService.languageIdCodec.encodeLanguageId(e),o=await t.createGrammar(e,n);if(!o.grammar)return null;const i=Rt("editor.maxTokenizationLineLength",e,-1,this._configurationService),s=new B,r=s.add(new It(o.grammar,o.initialState,o.containsEmbeddedLanguages,(c,a)=>this._threadedBackgroundTokenizerFactory.createBackgroundTokenizer(c,a,i),()=>this.getAsyncTokenizationVerification(),(c,a,u)=>{this._reportTokenizationTime(c,e,o.sourceExtensionId,a,!1,u)},!0));return s.add(r.onDidEncounterLanguage(c=>{if(!this._encounteredLanguages[c]){const a=this._languageService.languageIdCodec.decodeLanguageId(c);this._encounteredLanguages[c]=!0,this._languageService.requestBasicLanguageFeatures(a)}})),new Mt(n,r,s,i)}catch(t){return t.message&&t.message===q||He(t),null}}_updateTheme(e,t){if(!t&&this._currentTheme&&this._currentTokenColorMap&&Nt(this._currentTheme.settings,e.tokenColors)&&qe(this._currentTokenColorMap,e.tokenColorMap))return;this._currentTheme={name:e.label,settings:e.tokenColors},this._currentTokenColorMap=e.tokenColorMap,this._grammarFactory?.setTheme(this._currentTheme,this._currentTokenColorMap);const n=Dt(this._currentTokenColorMap),o=Ue(n);this._styleElement.textContent=o,te.setColorMap(n),this._currentTheme&&this._currentTokenColorMap&&this._threadedBackgroundTokenizerFactory.acceptTheme(this._currentTheme,this._currentTokenColorMap)}async createTokenizer(e){if(!this._languageService.isRegisteredLanguageId(e))return null;const t=await this._getOrCreateGrammarFactory();if(!t.has(e))return null;const n=this._languageService.languageIdCodec.encodeLanguageId(e),{grammar:o}=await t.createGrammar(e,n);return o}_getVSCodeOniguruma(){return this._vscodeOniguruma||(this._vscodeOniguruma=(async()=>{const[e,t]=await Promise.all([ie(()=>import("./main-DWv94O3B.js").then(n=>n.m),__vite__mapDeps([3,1,2]),import.meta.url).then(n=>n.default??n),this._loadVSCodeOnigurumaWASM()]);return await e.loadWASM({data:t,print:n=>{this._debugModePrintFunc(n)}}),e})()),this._vscodeOniguruma}async _loadVSCodeOnigurumaWASM(){return Je?await(await fetch(new URL(""+new URL("onig-Du5pRr7Y.wasm",import.meta.url).href,import.meta.url).href)).arrayBuffer():await fetch(Le.asBrowserUri(`${Ke}/vscode-oniguruma/release/onig.wasm`).toString(!0))}_reportTokenizationTime(e,t,n,o,i,s){const r=i?"async":"sync";A.reportTokenizationTimeCounter[r]>50||(A.reportTokenizationTimeCounter[r]===0&&setTimeout(()=>{A.reportTokenizationTimeCounter[r]=0},1e3*60*60),A.reportTokenizationTimeCounter[r]++,this._telemetryService.publicLog2("editor.tokenizedLine",{timeMs:e,languageId:t,lineLength:o,fromWorker:i,sourceExtensionId:n,isRandomSample:s,tokenizationSetting:this.getAsyncTokenizationEnabled()?this.getAsyncTokenizationVerification()?2:1:0}))}},A=E,E.reportTokenizationTimeCounter={sync:0,async:0},E);ce=A=X([m(0,ge),m(1,Ee),m(2,Ce),m(3,he),m(4,Xe),m(5,le),m(6,Ze),m(7,et),m(8,ze),m(9,Ie)],ce);function Dt(h){const e=[null];for(let t=1,n=h.length;t<n;t++)e[t]=W.fromHex(h[t]);return e}function Nt(h,e){if(!e||!h||e.length!==h.length)return!1;for(let t=e.length-1;t>=0;t--){const n=e[t],o=h[t];if(n.scope!==o.scope)return!1;const i=n.settings,s=o.settings;if(i&&s){if(i.fontStyle!==s.fontStyle||i.foreground!==s.foreground||i.background!==s.background)return!1}else if(!i||!s)return!1}return!0}function At(h,e,t,n){if(e.language&&(typeof e.language!="string"||!n.isRegisteredLanguageId(e.language)))return t.error(l(12856,"Unknown language in `contributes.{0}.language`. Provided value: {1}",M.name,String(e.language))),!1;if(!e.scopeName||typeof e.scopeName!="string")return t.error(l(12857,"Expected string in `contributes.{0}.scopeName`. Provided value: {1}",M.name,String(e.scopeName))),!1;if(!e.path||typeof e.path!="string")return t.error(l(12858,"Expected string in `contributes.{0}.path`. Provided value: {1}",M.name,String(e.path))),!1;if(e.injectTo&&(!Array.isArray(e.injectTo)||e.injectTo.some(i=>typeof i!="string")))return t.error(l(12859,"Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",M.name,JSON.stringify(e.injectTo))),!1;if(e.embeddedLanguages&&!Te(e.embeddedLanguages))return t.error(l(12860,"Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",M.name,JSON.stringify(e.embeddedLanguages))),!1;if(e.tokenTypes&&!Te(e.tokenTypes))return t.error(l(12861,"Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",M.name,JSON.stringify(e.tokenTypes))),!1;const o=Me(h,e.path);return Ye(o,h)||t.warn(l(12862,"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",M.name,o.path,h.path)),!0}function Rt(h,e,t,n){return Qe(o=>n.onDidChangeConfiguration(i=>{i.affectsConfiguration(h,{overrideIdentifier:e})&&o(i)}),()=>n.getValue(h,{overrideIdentifier:e})??t)}const I=Lt(),Ot=Z.registerExtensionPoint({extensionPoint:"semanticTokenTypes",jsonSchema:{description:l(13059,"Contributes semantic token types."),type:"array",items:{type:"object",properties:{id:{type:"string",description:l(13060,"The identifier of the semantic token type"),pattern:$,patternErrorMessage:l(13061,"Identifiers should be in the form letterOrDigit[_-letterOrDigit]*")},superType:{type:"string",description:l(13062,"The super type of the semantic token type"),pattern:$,patternErrorMessage:l(13063,"Super types should be in the form letterOrDigit[_-letterOrDigit]*")},description:{type:"string",description:l(13064,"The description of the semantic token type")}}}}}),jt=Z.registerExtensionPoint({extensionPoint:"semanticTokenModifiers",jsonSchema:{description:l(13065,"Contributes semantic token modifiers."),type:"array",items:{type:"object",properties:{id:{type:"string",description:l(13066,"The identifier of the semantic token modifier"),pattern:$,patternErrorMessage:l(13067,"Identifiers should be in the form letterOrDigit[_-letterOrDigit]*")},description:{type:"string",description:l(13068,"The description of the semantic token modifier")}}}}}),Ft=Z.registerExtensionPoint({extensionPoint:"semanticTokenScopes",jsonSchema:{description:l(13069,"Contributes semantic token scope maps."),type:"array",items:{type:"object",properties:{language:{description:l(13070,"Lists the languge for which the defaults are."),type:"string"},scopes:{description:l(13071,"Maps a semantic token (described by semantic token selector) to one or more textMate scopes used to represent that token."),type:"object",additionalProperties:{type:"array",items:{type:"string"}}}}}}});class Bt{constructor(){function e(t,n,o){if(typeof t.id!="string"||t.id.length===0)return o.error(l(13072,"'configuration.{0}.id' must be defined and can not be empty",n)),!1;if(!t.id.match($))return o.error(l(13073,"'configuration.{0}.id' must follow the pattern letterOrDigit[-_letterOrDigit]*",n)),!1;const i=t.superType;return i&&!i.match($)?(o.error(l(13074,"'configuration.{0}.superType' must follow the pattern letterOrDigit[-_letterOrDigit]*",n)),!1):typeof t.description!="string"||t.id.length===0?(o.error(l(13075,"'configuration.{0}.description' must be defined and can not be empty",n)),!1):!0}Ot.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13076,"'configuration.semanticTokenType' must be an array"));return}for(const r of i)e(r,"semanticTokenType",s)&&I.registerTokenType(r.id,r.description,r.superType)}for(const o of n.removed){const i=o.value;for(const s of i)I.deregisterTokenType(s.id)}}),jt.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13077,"'configuration.semanticTokenModifier' must be an array"));return}for(const r of i)e(r,"semanticTokenModifier",s)&&I.registerTokenModifier(r.id,r.description)}for(const o of n.removed){const i=o.value;for(const s of i)I.deregisterTokenModifier(s.id)}}),Ft.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13078,"'configuration.semanticTokenScopes' must be an array"));return}for(const r of i){if(r.language&&typeof r.language!="string"){s.error(l(13079,"'configuration.semanticTokenScopes.language' must be a string"));continue}if(!r.scopes||typeof r.scopes!="object"){s.error(l(13080,"'configuration.semanticTokenScopes.scopes' must be defined as an object"));continue}for(const c in r.scopes){const a=r.scopes[c];if(!Array.isArray(a)||a.some(u=>typeof u!="string")){s.error(l(13081,"'configuration.semanticTokenScopes.scopes' values must be an array of strings"));continue}try{const u=I.parseTokenSelector(c,r.language);I.registerTokenStyleDefault(u,{scopesToProbe:a.map(g=>g.split(" "))})}catch{s.error(l(13082,"configuration.semanticTokenScopes.scopes': Problems parsing selector {0}.",c))}}}}for(const o of n.removed){const i=o.value;for(const s of i)for(const r in s.scopes){const c=s.scopes[r];try{const a=I.parseTokenSelector(r,s.language);I.registerTokenStyleDefault(a,{scopesToProbe:c.map(u=>u.split(" "))})}catch{}}}})}}var R;let J=(R=class{constructor(e){this.instantiationService=e,this.instantiationService.createInstance(Bt)}},R.ID="workbench.contrib.tokenClassificationExtensionPoint",R);J=X([m(0,ze)],J);tt(J.ID,J,nt.BlockStartup);const $t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Vt(h,e,t=!0){for(let n=e.length-1;n>=0;n--){const o=e.slice(0,n),i=e[n],s=Gt(h,i,o,t);if(s)return s}return null}function Gt(h,e,t,n){let o=null;for(let i=h.tokenColors.length-1;i>=0;i--){const s=h.tokenColors[i];if(n&&!s.settings.foreground)continue;let r;if(typeof s.scope=="string")r=s.scope.split(/,/).map(c=>c.trim());else if(Array.isArray(s.scope))r=s.scope;else continue;for(let c=0,a=r.length;c<a;c++){const u=r[c],g=new K(u,s.settings);g.matches(e,t)&&g.isMoreSpecific(o)&&(o=g)}}return o}class K{constructor(e,t){this.rawSelector=e,this.settings=t;const n=this.rawSelector.split(/ /);this.scope=n[n.length-1],this.parentScopes=n.slice(0,n.length-1)}matches(e,t){return K._matches(this.scope,this.parentScopes,e,t)}static _cmp(e,t){if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;if(e.scope.length!==t.scope.length)return e.scope.length-t.scope.length;const n=e.parentScopes.length,o=t.parentScopes.length;if(n!==o)return n-o;for(let i=0;i<n;i++){const s=e.parentScopes[i].length,r=t.parentScopes[i].length;if(s!==r)return s-r}return 0}isMoreSpecific(e){return K._cmp(this,e)>0}static _matchesOne(e,t){const n=e+".";return e===t||t.substring(0,n.length)===n}static _matches(e,t,n,o){if(!this._matchesOne(e,n))return!1;let i=t.length-1,s=o.length-1;for(;i>=0&&s>=0;)this._matchesOne(t[i],o[s])&&i--,s--;return i===-1}}var de;it($t);const d=ut;var x;let O=(x=class extends P{static get(e){return e.getContribution(de.ID)}constructor(e,t,n,o,i,s,r){super(),this._editor=e,this._textMateService=t,this._themeService=o,this._languageService=n,this._notificationService=i,this._configurationService=s,this._languageFeaturesService=r,this._widget=null,this._register(this._editor.onDidChangeModel(c=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(c=>this.stop())),this._register(this._editor.onKeyUp(c=>c.keyCode===ot.Escape&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&this._editor.getModel().uri.scheme!==rt.vscodeNotebookCell&&(this._widget=new ue(this._editor,this._textMateService,this._languageService,this._themeService,this._notificationService,this._configurationService,this._languageFeaturesService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}toggle(){this._widget?this.stop():this.launch()}},de=x,x.ID="editor.contrib.inspectEditorTokens",x);O=de=X([m(1,me),m(2,ge),m(3,Ee),m(4,he),m(5,le),m(6,st)],O);class Wt extends _t{constructor(){super({id:"editor.action.inspectTMScopes",label:kt(5274,"Developer: Inspect Editor Tokens and Scopes"),precondition:void 0})}run(e,t){O.get(t)?.toggle()}}function we(h){h.length>40&&(h=h.substr(0,20)+"…"+h.substr(h.length-20));let e="";for(let t=0,n=h.length;t<n;t++){const o=h.charCodeAt(t);switch(o){case be.Tab:e+="→";break;case be.Space:e+="·";break;default:e+=String.fromCharCode(o)}}return e}const Q=class Q extends P{constructor(e,t,n,o,i,s,r){super(),this.allowEditorOverflow=!0,this._isDisposed=!1,this._editor=e,this._languageService=n,this._themeService=o,this._textMateService=t,this._notificationService=i,this._configurationService=s,this._languageFeaturesService=r,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="token-inspect-widget",this._currentRequestCancellationTokenSource=new at,this._beginCompute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(c=>this._beginCompute(this._editor.getPosition()))),this._register(o.onDidColorThemeChange(c=>this._beginCompute(this._editor.getPosition()))),this._register(s.onDidChangeConfiguration(c=>c.affectsConfiguration("editor.semanticHighlighting.enabled")&&this._beginCompute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._isDisposed=!0,this._editor.removeContentWidget(this),this._currentRequestCancellationTokenSource.cancel(),super.dispose()}getId(){return Q._ID}_beginCompute(e){const t=this._textMateService.createTokenizer(this._model.getLanguageId()),n=this._computeSemanticTokens(e),o=this._model.tokenization.tokens.get(),i=o instanceof pt?o:void 0;ct(this._domNode),this._domNode.appendChild(document.createTextNode(l(5275,"Loading..."))),Promise.all([t,n]).then(([s,r])=>{if(this._isDisposed)return;const c=i?.tree.get();this._compute(s,r,c,e),this._domNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`,this._editor.layoutContentWidget(this)},s=>{this._notificationService.warn(s),setTimeout(()=>{O.get(this._editor)?.stop()})})}_isSemanticColoringEnabled(){const e=this._configurationService.getValue(dt,{overrideIdentifier:this._model.getLanguageId(),resource:this._model.uri})?.enabled;return typeof e=="boolean"?e:this._themeService.getColorTheme().semanticHighlighting}_compute(e,t,n,o){const i=e&&this._getTokensAtPosition(e,o),s=t&&this._getSemanticTokenAtPosition(t,o),r=n&&this._getTreeSitterTokenAtPosition(n,o);if(!i&&!s&&!r){Se(this._domNode,"No grammar or semantic tokens available.");return}const c=i?.metadata,a=s?.metadata,u=s&&we(this._model.getValueInRange(s.range)),g=i&&we(this._model.getLineContent(o.lineNumber).substring(i.token.startIndex,i.token.endIndex)),k=u||g||"";if(Se(this._domNode,d("h2.tiw-token",void 0,k,d("span.tiw-token-length",void 0,`${k.length} ${k.length===1?"char":"chars"}`))),p(this._domNode,d("hr.tiw-metadata-separator",{style:"clear:both"})),p(this._domNode,d("table.tiw-metadata-table",void 0,d("tbody",void 0,d("tr",void 0,d("td.tiw-metadata-key",void 0,"language"),d("td.tiw-metadata-value",void 0,c?.languageId||"")),d("tr",void 0,d("td.tiw-metadata-key",void 0,"standard token type"),d("td.tiw-metadata-value",void 0,this._tokenTypeToString(c?.tokenType||v.Other))),...this._formatMetadata(a,c)))),s){p(this._domNode,d("hr.tiw-metadata-separator"));const w=p(this._domNode,d("table.tiw-metadata-table",void 0)),y=p(w,d("tbody",void 0,d("tr",void 0,d("td.tiw-metadata-key",void 0,"semantic token type"),d("td.tiw-metadata-value",void 0,s.type))));if(s.modifiers.length&&p(y,d("tr",void 0,d("td.tiw-metadata-key",void 0,"modifiers"),d("td.tiw-metadata-value",void 0,s.modifiers.join(" ")))),s.metadata){const T=["foreground","bold","italic","underline","strikethrough"],S={},b=new Array;for(const f of T)if(s.metadata[f]!==void 0){const _=s.definitions[f],L=this._renderTokenStyleDefinition(_,f),C=L.map(V=>lt(V)?V.outerHTML:V).join();let j=S[C];j||(S[C]=j=[],b.push([L,C])),j.push(f)}for(const[f,_]of b)p(y,d("tr",void 0,d("td.tiw-metadata-key",void 0,S[_].join(", ")),d("td.tiw-metadata-value",void 0,...f)))}}if(i){const w=this._themeService.getColorTheme();p(this._domNode,d("hr.tiw-metadata-separator"));const y=p(this._domNode,d("table.tiw-metadata-table")),T=p(y,d("tbody"));g&&g!==k&&p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"textmate token"),d("td.tiw-metadata-value",void 0,`${g} (${g.length})`)));const S=new Array;for(let _=i.token.scopes.length-1;_>=0;_--)S.push(i.token.scopes[_]),_>0&&S.push(d("br"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"textmate scopes"),d("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...S)));const b=Vt(w,i.token.scopes,!1),f=s?.metadata?.foreground;if(b){if(f!==i.metadata.foreground){let _=d("code.tiw-theme-selector",void 0,b.rawSelector,d("br"),JSON.stringify(b.settings,null," "));f&&(_=d("s",void 0,_)),p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,_)))}}else f||p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,"No theme selector")))}if(r){const w=r[r.length-1];p(this._domNode,d("hr.tiw-metadata-separator"));const y=p(this._domNode,d("table.tiw-metadata-table")),T=p(y,d("tbody"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,`tree-sitter token ${w.id}`),d("td.tiw-metadata-value",void 0,`${w.text}`)));const S=new Array;let b=r.length-1,f=r[b];for(;f.parent||b>0;)S.push(f.type),f=f.parent??r[--b],f&&S.push(d("br"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"tree-sitter tree"),d("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...S)));const L=this._model.tokenization.tokens.get().tokenizationImpl.get()?.captureAtPosition(o.lineNumber,o.column);L&&L.length>0&&p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,L.map(C=>C.name).join(" "))))}}_formatMetadata(e,t){const n=new Array;function o(a){const u=e?.[a]||t?.[a];if(u!==void 0){const g=e?.[a]?"tiw-metadata-semantic":"";n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,a),d(`td.tiw-metadata-value.${g}`,void 0,u)))}return u}const i=o("foreground"),s=o("background");if(i&&s){const a=W.fromHex(s),u=W.fromHex(i);a.isOpaque()?n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"contrast ratio"),d("td.tiw-metadata-value",void 0,a.getContrastRatio(u.makeOpaque(a)).toFixed(2)))):n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"Contrast ratio cannot be precise for background colors that use transparency"),d("td.tiw-metadata-value")))}const r=new Array;function c(a){let u;e&&e[a]?u=d("span.tiw-metadata-semantic",void 0,a):t&&t[a]&&(u=a),u&&(r.length&&r.push(" "),r.push(u))}return c("bold"),c("italic"),c("underline"),c("strikethrough"),r.length&&n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"font style"),d("td.tiw-metadata-value",void 0,...r))),n}_decodeMetadata(e){const t=this._themeService.getColorTheme().tokenColorMap,n=N.getLanguageId(e),o=N.getTokenType(e),i=N.getFontStyle(e),s=N.getForeground(e),r=N.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:o,bold:i&G.Bold?!0:void 0,italic:i&G.Italic?!0:void 0,underline:i&G.Underline?!0:void 0,strikethrough:i&G.Strikethrough?!0:void 0,foreground:t[s],background:t[r]}}_tokenTypeToString(e){switch(e){case v.Other:return"Other";case v.Comment:return"Comment";case v.String:return"String";case v.RegEx:return"RegEx";default:return"??"}}_getTokensAtPosition(e,t){const n=t.lineNumber,o=this._getStateBeforeLine(e,n),i=e.tokenizeLine(this._model.getLineContent(n),o),s=e.tokenizeLine2(this._model.getLineContent(n),o);let r=0;for(let a=i.tokens.length-1;a>=0;a--){const u=i.tokens[a];if(t.column-1>=u.startIndex){r=a;break}}let c=0;for(let a=s.tokens.length>>>1;a>=0;a--)if(t.column-1>=s.tokens[a<<1]){c=a;break}return{token:i.tokens[r],metadata:this._decodeMetadata(s.tokens[(c<<1)+1])}}_getStateBeforeLine(e,t){let n=null;for(let o=1;o<t;o++)n=e.tokenizeLine(this._model.getLineContent(o),n).ruleStack;return n}isSemanticTokens(e){return e&&e.data}async _computeSemanticTokens(e){if(!this._isSemanticColoringEnabled())return null;const t=this._languageFeaturesService.documentSemanticTokensProvider.ordered(this._model);if(t.length){const o=t[0],i=await Promise.resolve(o.provideDocumentSemanticTokens(this._model,null,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(i))return{tokens:i,legend:o.getLegend()}}const n=this._languageFeaturesService.documentRangeSemanticTokensProvider.ordered(this._model);if(n.length){const o=n[0],i=e.lineNumber,s=new oe(i,1,i,this._model.getLineMaxColumn(i)),r=await Promise.resolve(o.provideDocumentRangeSemanticTokens(this._model,s,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(r))return{tokens:r,legend:o.getLegend()}}return null}_getSemanticTokenAtPosition(e,t){const n=e.tokens.data,o=this._model.getLanguageId();let i=0,s=0;const r=t.lineNumber-1,c=t.column-1;for(let a=0;a<n.length;a+=5){const u=n[a],g=n[a+1],k=n[a+2],w=n[a+3],y=n[a+4],T=i+u,S=u===0?s+g:g;if(r===T&&S<=c&&c<S+k){const b=e.legend.tokenTypes[w]||"not in legend (ignored)",f=[];let _=y;for(let ee=0;_>0&&ee<e.legend.tokenModifiers.length;ee++)_&1&&f.push(e.legend.tokenModifiers[ee]),_=_>>1;_>0&&f.push("not in legend (ignored)");const L=new oe(T+1,S+1,T+1,S+1+k),C={},j=this._themeService.getColorTheme().tokenColorMap,D=this._themeService.getColorTheme().getTokenStyleMetadata(b,f,o,!0,C);let fe;return D&&(fe={languageId:void 0,tokenType:v.Other,bold:D?.bold,italic:D?.italic,underline:D?.underline,strikethrough:D?.strikethrough,foreground:j[D?.foreground||gt.None],background:void 0}),{type:b,modifiers:f,range:L,metadata:fe,definitions:C}}i=T,s=S}return null}_walkTreeforPosition(e,t){const n=this._model.getOffsetAt(t);e.gotoFirstChild();let o=!1,i=null;do e.currentNode.startIndex<=n&&n<e.currentNode.endIndex?(o=!0,i=e.currentNode):o=!1;while(o?e.gotoFirstChild():e.gotoNextSibling());return i}_getTreeSitterTokenAtPosition(e,t){const n=[];let o=e?.tree.get();for(;o;){const i=o.walk(),s=this._walkTreeforPosition(i,t);i.delete(),s?(n.push(s),e=e?.getInjectionTrees(s.startIndex,e.languageId),o=e?.tree.get()):o=void 0}return n.length>0?n:null}_renderTokenStyleDefinition(e,t){const n=new Array;if(e===void 0)return n;const o=this._themeService.getColorTheme();if(Array.isArray(e)){const i={};o.resolveScopes(e,i);const s=i[t];if(s&&i.scope){const r=d("ul.tiw-metadata-values"),c=Array.isArray(s.scope)?s.scope:[String(s.scope)];for(const a of c)r.appendChild(d("li.tiw-metadata-value.tiw-metadata-scopes",void 0,a));return n.push(i.scope.join(" "),r,d("code.tiw-theme-selector",void 0,JSON.stringify(s.settings,null," "))),n}return n}else if(Ct.is(e)){const i=o.getTokenStylingRuleScope(e);return i==="setting"?(n.push(`User settings: ${e.selector.id} - ${this._renderStyleProperty(e.style,t)}`),n):(i==="theme"&&n.push(`Color theme: ${e.selector.id} - ${this._renderStyleProperty(e.style,t)}`),n)}else{const i=o.resolveTokenStyleValue(e);return n.push(`Default: ${i?this._renderStyleProperty(i,t):""}`),n}}_renderStyleProperty(e,t){return t==="foreground"?e.foreground?W.Format.CSS.formatHexA(e.foreground,!0):"":e[t]!==void 0?String(e[t]):""}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[ye.BELOW,ye.ABOVE]}}};Q._ID="editor.contrib.inspectEditorTokensWidget";let ue=Q;ht(O.ID,O,mt.Lazy);ft(Wt);yt(async h=>{h.get(bt).when(wt.Ready).then(()=>{vt.get(me)})});function Jt(){return{...St(),[me.toString()]:new Tt(ce,[],!1)}}export{me as ITextMateTokenizationService,Jt as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./main-B6LylQ0P.js","./index-By7ErQ-m.js","./index-B0wc3Rza.css","./main-B9VgSj0j.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{D as P,E as xe,S as Pe,a as pe,T as N,k as ve,n as De,b as Ne,o as Ae,c as Re,C as _e,L as Oe,l as ke,_ as ie,R as oe,d as B,e as je,F as Le,U as Fe,t as Be,f as X,g as m,I as Ce,h as le,i as ge,j as he,m as Ie,p as Z,q as l,s as $e,u as Ve,v as Ge,w as te,x as Me,y as v,P as We,z as He,A as qe,B as Ue,G as Je,H as Ke,J as Te,K as Ye,M as Qe,N as W,O as Xe,Q as Ze,V as et,W as ze,X as tt,Y as nt,Z as it,$ as ot,a0 as rt,a1 as me,a2 as st,a3 as at,a4 as ct,a5 as dt,a6 as Se,a7 as ut,a8 as p,a9 as lt,aa as G,ab as gt,ac as ye,ad as ht,ae as mt,af as ft,ag as pt,ah as be,ai as _t,aj as kt,ak as Tt,al as St,am as yt,an as bt,ao as wt,ap as vt}from"./index-By7ErQ-m.js";import{I as Ee}from"./workbenchThemeService.service-CipP-eMQ.js";import{t as $,g as Lt,S as Ct}from"./tokenClassificationRegistry-YXExWoc1.js";class It extends P{constructor(e,t,n,o,i,s,r){super(),this._grammar=e,this._initialState=t,this._containsEmbeddedLanguages=n,this._createBackgroundTokenizer=o,this._backgroundTokenizerShouldOnlyVerifyTokens=i,this._reportTokenizationTime=s,this._reportSlowTokenization=r,this._seenLanguages=[],this._onDidEncounterLanguage=this._register(new xe),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event}get backgroundTokenizerShouldOnlyVerifyTokens(){return this._backgroundTokenizerShouldOnlyVerifyTokens()}getInitialState(){return this._initialState}tokenize(e,t,n){throw new Error("Not supported!")}createBackgroundTokenizer(e,t){if(this._createBackgroundTokenizer)return this._createBackgroundTokenizer(e,t)}tokenizeEncoded(e,t,n){const o=Math.random()*1e4<1,i=this._reportSlowTokenization||o,s=i?new Pe(!0):void 0,r=this._grammar.tokenizeLine2(e,n,500);if(i){const a=s.elapsed();(o||a>32)&&this._reportTokenizationTime(a,e.length,o)}if(r.stoppedEarly)return console.warn(`Time limit reached when tokenizing line: ${e.substring(0,100)}`),new pe(r.tokens,n);if(this._containsEmbeddedLanguages){const a=this._seenLanguages,u=r.tokens;for(let g=0,k=u.length>>>1;g<k;g++){const w=u[(g<<1)+1],y=N.getLanguageId(w);a[y]||(a[y]=!0,this._onDidEncounterLanguage.fire(y))}}let c;return n.equals(r.ruleStack)?c=n:c=r.ruleStack,new pe(r.tokens,c)}}class Mt extends P{get backgroundTokenizerShouldOnlyVerifyTokens(){return this._actual.backgroundTokenizerShouldOnlyVerifyTokens}constructor(e,t,n,o){super(),this._encodedLanguageId=e,this._actual=t,this._maxTokenizationLineLength=o,this._register(ve(this._maxTokenizationLineLength)),this._register(n)}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,n){throw new Error("Not supported!")}tokenizeEncoded(e,t,n){return e.length>=this._maxTokenizationLineLength.get()?De(this._encodedLanguageId,n):this._actual.tokenizeEncoded(e,t,n)}createBackgroundTokenizer(e,t){if(this._actual.createBackgroundTokenizer)return this._actual.createBackgroundTokenizer(e,t)}}const F=class F{static getChannel(e){return e.getChannel(F.CHANNEL_NAME)}static setChannel(e,t){e.setChannel(F.CHANNEL_NAME,t)}};F.CHANNEL_NAME="textMateWorkerHost";let re=F;class U{static fromMany(e){const t=e.map(n=>new U(n));return new zt(t)}constructor(e){this.transformation=e,this.idx=0,this.offset=0}transform(e){let t=this.transformation.replacements.at(this.idx);for(;t&&t.replaceRange.endExclusive<=e;)this.offset+=t.getLengthDelta(),this.idx++,t=this.transformation.replacements.at(this.idx);if(!(t&&t.replaceRange.start<=e))return e+this.offset}}class zt{constructor(e){this.transformers=e}transform(e){for(const t of this.transformers){const n=t.transform(e);if(n===void 0)return;e=n}return e}}const Y=class Y extends P{constructor(e,t,n,o,i,s){super(),this._model=e,this._worker=t,this._languageIdCodec=n,this._backgroundTokenizationStore=o,this._configurationService=i,this._maxTokenizationLineLength=s,this.controllerId=Y._id++,this._pendingChanges=[],this._states=new Ne,this._loggingEnabled=Ae("editor.experimental.asyncTokenizationLogging",!1,this._configurationService),this._register(ve(this._loggingEnabled)),this._register(this._model.onDidChangeContent(a=>{this._shouldLog&&console.log("model change",{fileName:this._model.uri.fsPath.split("\\").pop(),changes:ne(a.changes)}),this._worker.$acceptModelChanged(this.controllerId,a),this._pendingChanges.push(a)})),this._register(this._model.onDidChangeLanguage(a=>{const u=this._model.getLanguageId(),g=this._languageIdCodec.encodeLanguageId(u);this._worker.$acceptModelLanguageChanged(this.controllerId,u,g)}));const r=this._model.getLanguageId(),c=this._languageIdCodec.encodeLanguageId(r);this._worker.$acceptNewModel({uri:this._model.uri,versionId:this._model.getVersionId(),lines:this._model.getLinesContent(),EOL:this._model.getEOL(),languageId:r,encodedLanguageId:c,maxTokenizationLineLength:this._maxTokenizationLineLength.get(),controllerId:this.controllerId}),this._register(Re(a=>{const u=this._maxTokenizationLineLength.read(a);this._worker.$acceptMaxTokenizationLineLength(this.controllerId,u)}))}dispose(){super.dispose(),this._worker.$acceptRemovedModel(this.controllerId)}requestTokens(e,t){this._worker.$retokenize(this.controllerId,e,t)}async setTokensAndStates(e,t,n,o){if(this.controllerId!==e)return;let i=_e.deserialize(new Uint8Array(n));if(this._shouldLog&&console.log("received background tokenization result",{fileName:this._model.uri.fsPath.split("\\").pop(),updatedTokenLines:i.map(r=>r.getLineRange()).join(" & "),updatedStateLines:o.map(r=>new Oe(r.startLineNumber,r.startLineNumber+r.stateDeltas.length).toString()).join(" & ")}),this._shouldLog){const r=this._pendingChanges.filter(c=>c.versionId<=t).map(c=>c.changes).map(c=>ne(c)).join(" then ");console.log("Applying changes to local states",r)}for(;this._pendingChanges.length>0&&this._pendingChanges[0].versionId<=t;){const r=this._pendingChanges.shift();this._states.acceptChanges(r.changes)}if(this._pendingChanges.length>0){if(this._shouldLog){const a=this._pendingChanges.map(u=>u.changes).map(u=>ne(u)).join(" then ");console.log("Considering non-processed changes",a)}const r=U.fromMany(this._pendingChanges.map(a=>ke(a.changes))),c=new _e;for(const a of i)for(let u=a.startLineNumber;u<=a.endLineNumber;u++)r.transform(u-1)!==void 0&&c.add(u,a.getLineTokens(u));i=c.finalize();for(const a of this._pendingChanges)for(const u of a.changes)for(let g=0;g<i.length;g++)i[g].applyEdit(u.range,u.text)}const s=U.fromMany(this._pendingChanges.map(r=>ke(r.changes)));if(!this._applyStateStackDiffFn||!this._initialState){const{applyStateStackDiff:r,INITIAL:c}=await ie(()=>import("./main-B6LylQ0P.js").then(a=>a.m),__vite__mapDeps([0,1,2]),import.meta.url).then(a=>a.default??a);this._applyStateStackDiffFn=r,this._initialState=c}for(const r of o){let c=r.startLineNumber<=1?this._initialState:this._states.getEndState(r.startLineNumber-1);for(let a=0;a<r.stateDeltas.length;a++){const u=r.stateDeltas[a];let g;u?(g=this._applyStateStackDiffFn(c,u),this._states.setEndState(r.startLineNumber+a,g)):g=this._states.getEndState(r.startLineNumber+a);const k=s.transform(r.startLineNumber+a-1);k!==void 0&&this._backgroundTokenizationStore.setEndState(k+1,g),r.startLineNumber+a>=this._model.getLineCount()-1&&this._backgroundTokenizationStore.backgroundTokenizationFinished(),c=g}}this._backgroundTokenizationStore.setTokens(i)}get _shouldLog(){return this._loggingEnabled.get()}};Y._id=0;let se=Y;function ne(h){return h.map(e=>oe.lift(e.range).toString()+" => "+e.text).join(" & ")}var H,z;let ae=(z=class{constructor(e,t,n,o,i,s,r){this._reportTokenizationTime=e,this._shouldTokenizeAsync=t,this._extensionResourceLoaderService=n,this._configurationService=o,this._languageService=i,this._notificationService=s,this._telemetryService=r,this._workerProxyPromise=null,this._worker=null,this._workerProxy=null,this._workerTokenizerControllers=new Map,this._currentTheme=null,this._currentTokenColorMap=null,this._grammarDefinitions=[]}dispose(){this._disposeWorker()}createBackgroundTokenizer(e,t,n){if(!this._shouldTokenizeAsync()||e.isTooLargeForSyncing())return;const o=new B,i=this._getWorkerProxy().then(s=>{if(o.isDisposed||!s)return;const r={controller:void 0,worker:this._worker};return o.add(Et(e,()=>{const c=new se(e,s,this._languageService.languageIdCodec,t,this._configurationService,n);return r.controller=c,this._workerTokenizerControllers.set(c.controllerId,c),Be(()=>{r.controller=void 0,this._workerTokenizerControllers.delete(c.controllerId),c.dispose()})})),r});return{dispose(){o.dispose()},requestTokens:async(s,r)=>{const c=await i;c?.controller&&c.worker===this._worker&&c.controller.requestTokens(s,r)},reportMismatchingTokens:s=>{H._reportedMismatchingTokens||(H._reportedMismatchingTokens=!0,this._notificationService.error({message:"Async Tokenization Token Mismatch in line "+s,name:"Async Tokenization Token Mismatch"}),this._telemetryService.publicLog2("asyncTokenizationMismatchingTokens",{}))}}}setGrammarDefinitions(e){this._grammarDefinitions=e,this._disposeWorker()}acceptTheme(e,t){this._currentTheme=e,this._currentTokenColorMap=t,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy&&this._workerProxy.$acceptTheme(this._currentTheme,this._currentTokenColorMap)}_getWorkerProxy(){return this._workerProxyPromise||(this._workerProxyPromise=this._createWorkerProxy()),this._workerProxyPromise}async _createWorkerProxy(){const e={grammarDefinitions:this._grammarDefinitions,onigurumaWASMUri:new URL(""+new URL("onig-Du5pRr7Y.wasm",import.meta.url).href,import.meta.url).href},t=this._worker=je(Le.asBrowserUri("vs/workbench/services/textMate/browser/backgroundTokenization/worker/textMateTokenizationWorker.workerMain.js"),"TextMateWorker");return re.setChannel(t,{$readFile:async n=>{const o=Fe.revive(n);return this._extensionResourceLoaderService.readExtensionResource(o)},$setTokensAndStates:async(n,o,i,s)=>{const r=this._workerTokenizerControllers.get(n);r&&r.setTokensAndStates(n,o,i,s)},$reportTokenizationTime:(n,o,i,s,r)=>{this._reportTokenizationTime(n,o,i,s,r)}}),await t.proxy.$init(e),this._worker!==t?null:(this._workerProxy=t.proxy,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy.$acceptTheme(this._currentTheme,this._currentTokenColorMap),t.proxy)}_disposeWorker(){for(const e of this._workerTokenizerControllers.values())e.dispose();this._workerTokenizerControllers.clear(),this._worker&&(this._worker.dispose(),this._worker=null),this._workerProxy=null,this._workerProxyPromise=null}},H=z,z._reportedMismatchingTokens=!1,z);ae=H=X([m(2,Ce),m(3,le),m(4,ge),m(5,he),m(6,Ie)],ae);function Et(h,e){const t=new B,n=t.add(new B);function o(){h.isAttachedToEditor()?n.add(e()):n.clear()}return o(),t.add(h.onDidChangeAttached(()=>{o()})),t}class xt{constructor(){this._scopeNameToLanguageRegistration=Object.create(null)}reset(){this._scopeNameToLanguageRegistration=Object.create(null)}register(e){this._scopeNameToLanguageRegistration[e.scopeName]=e}getGrammarDefinition(e){return this._scopeNameToLanguageRegistration[e]||null}}const q="No TM Grammar registered for this language.";class Pt extends P{constructor(e,t,n,o){super(),this._host=e,this._initialState=n.INITIAL,this._scopeRegistry=new xt,this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._grammarRegistry=this._register(new n.Registry({onigLib:o,loadGrammar:async i=>{const s=this._scopeRegistry.getGrammarDefinition(i);if(!s)return this._host.logTrace(`No grammar found for scope ${i}`),null;const r=s.location;try{const c=await this._host.readFile(r);return n.parseRawGrammar(c,r.path)}catch(c){return this._host.logError(`Unable to load and parse grammar for scope ${i} from ${r}`,c),null}},getInjections:i=>{const s=i.split(".");let r=[];for(let c=1;c<=s.length;c++){const a=s.slice(0,c).join(".");r=[...r,...this._injections[a]||[]]}return r}}));for(const i of t){if(this._scopeRegistry.register(i),i.injectTo){for(const s of i.injectTo){let r=this._injections[s];r||(this._injections[s]=r=[]),r.push(i.scopeName)}if(i.embeddedLanguages)for(const s of i.injectTo){let r=this._injectedEmbeddedLanguages[s];r||(this._injectedEmbeddedLanguages[s]=r=[]),r.push(i.embeddedLanguages)}}i.language&&this._languageToScope.set(i.language,i.scopeName)}}has(e){return this._languageToScope.has(e)}setTheme(e,t){this._grammarRegistry.setTheme(e,t)}getColorMap(){return this._grammarRegistry.getColorMap()}async createGrammar(e,t){const n=this._languageToScope.get(e);if(typeof n!="string")throw new Error(q);const o=this._scopeRegistry.getGrammarDefinition(n);if(!o)throw new Error(q);const i=o.embeddedLanguages;if(this._injectedEmbeddedLanguages[n]){const c=this._injectedEmbeddedLanguages[n];for(const a of c)for(const u of Object.keys(a))i[u]=a[u]}const s=Object.keys(i).length>0;let r;try{r=await this._grammarRegistry.loadGrammarWithConfiguration(n,t,{embeddedLanguages:i,tokenTypes:o.tokenTypes,balancedBracketSelectors:o.balancedBracketSelectors,unbalancedBracketSelectors:o.unbalancedBracketSelectors})}catch(c){throw c.message&&c.message.startsWith("No grammar provided for")?new Error(q):c}return{languageId:e,grammar:r,initialState:this._initialState,containsEmbeddedLanguages:s,sourceExtensionId:o.sourceExtensionId}}}const M=Z.registerExtensionPoint({extensionPoint:"grammars",deps:[$e],jsonSchema:{description:l(12863,"Contributes textmate tokenizers."),type:"array",defaultSnippets:[{body:[{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}]}],items:{type:"object",defaultSnippets:[{body:{language:"${1:id}",scopeName:"source.${2:id}",path:"./syntaxes/${3:id}.tmLanguage."}}],properties:{language:{description:l(12864,"Language identifier for which this syntax is contributed to."),type:"string"},scopeName:{description:l(12865,"Textmate scope name used by the tmLanguage file."),type:"string"},path:{description:l(12866,"Path of the tmLanguage file. The path is relative to the extension folder and typically starts with './syntaxes/'."),type:"string"},embeddedLanguages:{description:l(12867,"A map of scope name to language id if this grammar contains embedded languages."),type:"object"},tokenTypes:{description:l(12868,"A map of scope name to token types."),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:l(12869,"List of language scope names to which this grammar is injected to."),type:"array",items:{type:"string"}},balancedBracketScopes:{description:l(12870,"Defines which scope names contain balanced brackets."),type:"array",items:{type:"string"},default:["*"]},unbalancedBracketScopes:{description:l(12871,"Defines which scope names do not contain balanced brackets."),type:"array",items:{type:"string"},default:[]}},required:["scopeName","path"]}}});var A,E;let ce=(E=class extends P{constructor(e,t,n,o,i,s,r,c,a,u){super(),this._languageService=e,this._themeService=t,this._extensionResourceLoaderService=n,this._notificationService=o,this._logService=i,this._configurationService=s,this._progressService=r,this._environmentService=c,this._instantiationService=a,this._telemetryService=u,this._createdModes=[],this._encounteredLanguages=[],this._debugMode=!1,this._debugModePrintFunc=()=>{},this._grammarDefinitions=null,this._grammarFactory=null,this._tokenizersRegistrations=this._register(new B),this._currentTheme=null,this._currentTokenColorMap=null,this._threadedBackgroundTokenizerFactory=this._instantiationService.createInstance(ae,(g,k,w,y,T)=>this._reportTokenizationTime(g,k,w,y,!0,T),()=>this.getAsyncTokenizationEnabled()),this._vscodeOniguruma=null,this._styleElement=Ve(),this._styleElement.className="vscode-tokens-styles",M.setHandler(g=>this._handleGrammarsExtPoint(g)),this._updateTheme(this._themeService.getColorTheme(),!0),this._register(this._themeService.onDidColorThemeChange(()=>{this._updateTheme(this._themeService.getColorTheme(),!1)})),this._register(this._languageService.onDidRequestRichLanguageFeatures(g=>{this._createdModes.push(g)}))}getAsyncTokenizationEnabled(){return!!this._configurationService.getValue("editor.experimental.asyncTokenization")}getAsyncTokenizationVerification(){return!!this._configurationService.getValue("editor.experimental.asyncTokenizationVerification")}_handleGrammarsExtPoint(e){this._grammarDefinitions=null,this._grammarFactory&&(this._grammarFactory.dispose(),this._grammarFactory=null),this._tokenizersRegistrations.clear(),this._grammarDefinitions=[];for(const t of e){const n=t.value;for(const o of n){const i=this._validateGrammarDefinition(t,o);if(i&&(this._grammarDefinitions.push(i),i.language)){const s=new Ge(()=>this._createTokenizationSupport(i.language));this._tokenizersRegistrations.add(s),this._tokenizersRegistrations.add(te.registerFactory(i.language,s))}}}this._threadedBackgroundTokenizerFactory.setGrammarDefinitions(this._grammarDefinitions);for(const t of this._createdModes)te.getOrCreate(t)}_validateGrammarDefinition(e,t){if(!At(e.description.extensionLocation,t,e.collector,this._languageService))return null;const n=Me(e.description.extensionLocation,t.path),o=Object.create(null);if(t.embeddedLanguages){const c=Object.keys(t.embeddedLanguages);for(let a=0,u=c.length;a<u;a++){const g=c[a],k=t.embeddedLanguages[g];typeof k=="string"&&this._languageService.isRegisteredLanguageId(k)&&(o[g]=this._languageService.languageIdCodec.encodeLanguageId(k))}}const i=Object.create(null);if(t.tokenTypes){const c=Object.keys(t.tokenTypes);for(const a of c)switch(t.tokenTypes[a]){case"string":i[a]=v.String;break;case"other":i[a]=v.Other;break;case"comment":i[a]=v.Comment;break}}const s=t.language&&this._languageService.isRegisteredLanguageId(t.language)?t.language:void 0;function r(c,a){return!Array.isArray(c)||!c.every(u=>typeof u=="string")?a:c}return{location:n,language:s,scopeName:t.scopeName,embeddedLanguages:o,tokenTypes:i,injectTo:t.injectTo,balancedBracketSelectors:r(t.balancedBracketScopes,["*"]),unbalancedBracketSelectors:r(t.unbalancedBracketScopes,[]),sourceExtensionId:e.description.id}}startDebugMode(e,t){if(this._debugMode){this._notificationService.error(l(12852,"Already Logging."));return}this._debugModePrintFunc=e,this._debugMode=!0,this._debugMode&&this._progressService.withProgress({location:We.Notification,buttons:[l(12853,"Stop")]},n=>(n.report({message:l(12854,"Preparing to log TM Grammar parsing. Press Stop when finished.")}),this._getVSCodeOniguruma().then(o=>(o.setDefaultDebugCall(!0),n.report({message:l(12855,"Now logging TM Grammar parsing. Press Stop when finished.")}),new Promise((i,s)=>{})))),n=>{this._getVSCodeOniguruma().then(o=>{this._debugModePrintFunc=()=>{},this._debugMode=!1,o.setDefaultDebugCall(!1),t()})})}_canCreateGrammarFactory(){return!!this._grammarDefinitions}async _getOrCreateGrammarFactory(){if(this._grammarFactory)return this._grammarFactory;const[e,t]=await Promise.all([ie(()=>import("./main-B6LylQ0P.js").then(o=>o.m),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.default??o),this._getVSCodeOniguruma()]),n=Promise.resolve({createOnigScanner:o=>t.createOnigScanner(o),createOnigString:o=>t.createOnigString(o)});return this._grammarFactory?this._grammarFactory:(this._grammarFactory=new Pt({logTrace:o=>this._logService.trace(o),logError:(o,i)=>this._logService.error(o,i),readFile:o=>this._extensionResourceLoaderService.readExtensionResource(o)},this._grammarDefinitions||[],e,n),this._updateTheme(this._themeService.getColorTheme(),!0),this._grammarFactory)}async _createTokenizationSupport(e){if(!this._languageService.isRegisteredLanguageId(e)||!this._canCreateGrammarFactory())return null;try{const t=await this._getOrCreateGrammarFactory();if(!t.has(e))return null;const n=this._languageService.languageIdCodec.encodeLanguageId(e),o=await t.createGrammar(e,n);if(!o.grammar)return null;const i=Rt("editor.maxTokenizationLineLength",e,-1,this._configurationService),s=new B,r=s.add(new It(o.grammar,o.initialState,o.containsEmbeddedLanguages,(c,a)=>this._threadedBackgroundTokenizerFactory.createBackgroundTokenizer(c,a,i),()=>this.getAsyncTokenizationVerification(),(c,a,u)=>{this._reportTokenizationTime(c,e,o.sourceExtensionId,a,!1,u)},!0));return s.add(r.onDidEncounterLanguage(c=>{if(!this._encounteredLanguages[c]){const a=this._languageService.languageIdCodec.decodeLanguageId(c);this._encounteredLanguages[c]=!0,this._languageService.requestBasicLanguageFeatures(a)}})),new Mt(n,r,s,i)}catch(t){return t.message&&t.message===q||He(t),null}}_updateTheme(e,t){if(!t&&this._currentTheme&&this._currentTokenColorMap&&Nt(this._currentTheme.settings,e.tokenColors)&&qe(this._currentTokenColorMap,e.tokenColorMap))return;this._currentTheme={name:e.label,settings:e.tokenColors},this._currentTokenColorMap=e.tokenColorMap,this._grammarFactory?.setTheme(this._currentTheme,this._currentTokenColorMap);const n=Dt(this._currentTokenColorMap),o=Ue(n);this._styleElement.textContent=o,te.setColorMap(n),this._currentTheme&&this._currentTokenColorMap&&this._threadedBackgroundTokenizerFactory.acceptTheme(this._currentTheme,this._currentTokenColorMap)}async createTokenizer(e){if(!this._languageService.isRegisteredLanguageId(e))return null;const t=await this._getOrCreateGrammarFactory();if(!t.has(e))return null;const n=this._languageService.languageIdCodec.encodeLanguageId(e),{grammar:o}=await t.createGrammar(e,n);return o}_getVSCodeOniguruma(){return this._vscodeOniguruma||(this._vscodeOniguruma=(async()=>{const[e,t]=await Promise.all([ie(()=>import("./main-B9VgSj0j.js").then(n=>n.m),__vite__mapDeps([3,1,2]),import.meta.url).then(n=>n.default??n),this._loadVSCodeOnigurumaWASM()]);return await e.loadWASM({data:t,print:n=>{this._debugModePrintFunc(n)}}),e})()),this._vscodeOniguruma}async _loadVSCodeOnigurumaWASM(){return Je?await(await fetch(new URL(""+new URL("onig-Du5pRr7Y.wasm",import.meta.url).href,import.meta.url).href)).arrayBuffer():await fetch(Le.asBrowserUri(`${Ke}/vscode-oniguruma/release/onig.wasm`).toString(!0))}_reportTokenizationTime(e,t,n,o,i,s){const r=i?"async":"sync";A.reportTokenizationTimeCounter[r]>50||(A.reportTokenizationTimeCounter[r]===0&&setTimeout(()=>{A.reportTokenizationTimeCounter[r]=0},1e3*60*60),A.reportTokenizationTimeCounter[r]++,this._telemetryService.publicLog2("editor.tokenizedLine",{timeMs:e,languageId:t,lineLength:o,fromWorker:i,sourceExtensionId:n,isRandomSample:s,tokenizationSetting:this.getAsyncTokenizationEnabled()?this.getAsyncTokenizationVerification()?2:1:0}))}},A=E,E.reportTokenizationTimeCounter={sync:0,async:0},E);ce=A=X([m(0,ge),m(1,Ee),m(2,Ce),m(3,he),m(4,Xe),m(5,le),m(6,Ze),m(7,et),m(8,ze),m(9,Ie)],ce);function Dt(h){const e=[null];for(let t=1,n=h.length;t<n;t++)e[t]=W.fromHex(h[t]);return e}function Nt(h,e){if(!e||!h||e.length!==h.length)return!1;for(let t=e.length-1;t>=0;t--){const n=e[t],o=h[t];if(n.scope!==o.scope)return!1;const i=n.settings,s=o.settings;if(i&&s){if(i.fontStyle!==s.fontStyle||i.foreground!==s.foreground||i.background!==s.background)return!1}else if(!i||!s)return!1}return!0}function At(h,e,t,n){if(e.language&&(typeof e.language!="string"||!n.isRegisteredLanguageId(e.language)))return t.error(l(12856,"Unknown language in `contributes.{0}.language`. Provided value: {1}",M.name,String(e.language))),!1;if(!e.scopeName||typeof e.scopeName!="string")return t.error(l(12857,"Expected string in `contributes.{0}.scopeName`. Provided value: {1}",M.name,String(e.scopeName))),!1;if(!e.path||typeof e.path!="string")return t.error(l(12858,"Expected string in `contributes.{0}.path`. Provided value: {1}",M.name,String(e.path))),!1;if(e.injectTo&&(!Array.isArray(e.injectTo)||e.injectTo.some(i=>typeof i!="string")))return t.error(l(12859,"Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",M.name,JSON.stringify(e.injectTo))),!1;if(e.embeddedLanguages&&!Te(e.embeddedLanguages))return t.error(l(12860,"Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",M.name,JSON.stringify(e.embeddedLanguages))),!1;if(e.tokenTypes&&!Te(e.tokenTypes))return t.error(l(12861,"Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",M.name,JSON.stringify(e.tokenTypes))),!1;const o=Me(h,e.path);return Ye(o,h)||t.warn(l(12862,"Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",M.name,o.path,h.path)),!0}function Rt(h,e,t,n){return Qe(o=>n.onDidChangeConfiguration(i=>{i.affectsConfiguration(h,{overrideIdentifier:e})&&o(i)}),()=>n.getValue(h,{overrideIdentifier:e})??t)}const I=Lt(),Ot=Z.registerExtensionPoint({extensionPoint:"semanticTokenTypes",jsonSchema:{description:l(13059,"Contributes semantic token types."),type:"array",items:{type:"object",properties:{id:{type:"string",description:l(13060,"The identifier of the semantic token type"),pattern:$,patternErrorMessage:l(13061,"Identifiers should be in the form letterOrDigit[_-letterOrDigit]*")},superType:{type:"string",description:l(13062,"The super type of the semantic token type"),pattern:$,patternErrorMessage:l(13063,"Super types should be in the form letterOrDigit[_-letterOrDigit]*")},description:{type:"string",description:l(13064,"The description of the semantic token type")}}}}}),jt=Z.registerExtensionPoint({extensionPoint:"semanticTokenModifiers",jsonSchema:{description:l(13065,"Contributes semantic token modifiers."),type:"array",items:{type:"object",properties:{id:{type:"string",description:l(13066,"The identifier of the semantic token modifier"),pattern:$,patternErrorMessage:l(13067,"Identifiers should be in the form letterOrDigit[_-letterOrDigit]*")},description:{type:"string",description:l(13068,"The description of the semantic token modifier")}}}}}),Ft=Z.registerExtensionPoint({extensionPoint:"semanticTokenScopes",jsonSchema:{description:l(13069,"Contributes semantic token scope maps."),type:"array",items:{type:"object",properties:{language:{description:l(13070,"Lists the languge for which the defaults are."),type:"string"},scopes:{description:l(13071,"Maps a semantic token (described by semantic token selector) to one or more textMate scopes used to represent that token."),type:"object",additionalProperties:{type:"array",items:{type:"string"}}}}}}});class Bt{constructor(){function e(t,n,o){if(typeof t.id!="string"||t.id.length===0)return o.error(l(13072,"'configuration.{0}.id' must be defined and can not be empty",n)),!1;if(!t.id.match($))return o.error(l(13073,"'configuration.{0}.id' must follow the pattern letterOrDigit[-_letterOrDigit]*",n)),!1;const i=t.superType;return i&&!i.match($)?(o.error(l(13074,"'configuration.{0}.superType' must follow the pattern letterOrDigit[-_letterOrDigit]*",n)),!1):typeof t.description!="string"||t.id.length===0?(o.error(l(13075,"'configuration.{0}.description' must be defined and can not be empty",n)),!1):!0}Ot.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13076,"'configuration.semanticTokenType' must be an array"));return}for(const r of i)e(r,"semanticTokenType",s)&&I.registerTokenType(r.id,r.description,r.superType)}for(const o of n.removed){const i=o.value;for(const s of i)I.deregisterTokenType(s.id)}}),jt.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13077,"'configuration.semanticTokenModifier' must be an array"));return}for(const r of i)e(r,"semanticTokenModifier",s)&&I.registerTokenModifier(r.id,r.description)}for(const o of n.removed){const i=o.value;for(const s of i)I.deregisterTokenModifier(s.id)}}),Ft.setHandler((t,n)=>{for(const o of n.added){const i=o.value,s=o.collector;if(!i||!Array.isArray(i)){s.error(l(13078,"'configuration.semanticTokenScopes' must be an array"));return}for(const r of i){if(r.language&&typeof r.language!="string"){s.error(l(13079,"'configuration.semanticTokenScopes.language' must be a string"));continue}if(!r.scopes||typeof r.scopes!="object"){s.error(l(13080,"'configuration.semanticTokenScopes.scopes' must be defined as an object"));continue}for(const c in r.scopes){const a=r.scopes[c];if(!Array.isArray(a)||a.some(u=>typeof u!="string")){s.error(l(13081,"'configuration.semanticTokenScopes.scopes' values must be an array of strings"));continue}try{const u=I.parseTokenSelector(c,r.language);I.registerTokenStyleDefault(u,{scopesToProbe:a.map(g=>g.split(" "))})}catch{s.error(l(13082,"configuration.semanticTokenScopes.scopes': Problems parsing selector {0}.",c))}}}}for(const o of n.removed){const i=o.value;for(const s of i)for(const r in s.scopes){const c=s.scopes[r];try{const a=I.parseTokenSelector(r,s.language);I.registerTokenStyleDefault(a,{scopesToProbe:c.map(u=>u.split(" "))})}catch{}}}})}}var R;let J=(R=class{constructor(e){this.instantiationService=e,this.instantiationService.createInstance(Bt)}},R.ID="workbench.contrib.tokenClassificationExtensionPoint",R);J=X([m(0,ze)],J);tt(J.ID,J,nt.BlockStartup);const $t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Vt(h,e,t=!0){for(let n=e.length-1;n>=0;n--){const o=e.slice(0,n),i=e[n],s=Gt(h,i,o,t);if(s)return s}return null}function Gt(h,e,t,n){let o=null;for(let i=h.tokenColors.length-1;i>=0;i--){const s=h.tokenColors[i];if(n&&!s.settings.foreground)continue;let r;if(typeof s.scope=="string")r=s.scope.split(/,/).map(c=>c.trim());else if(Array.isArray(s.scope))r=s.scope;else continue;for(let c=0,a=r.length;c<a;c++){const u=r[c],g=new K(u,s.settings);g.matches(e,t)&&g.isMoreSpecific(o)&&(o=g)}}return o}class K{constructor(e,t){this.rawSelector=e,this.settings=t;const n=this.rawSelector.split(/ /);this.scope=n[n.length-1],this.parentScopes=n.slice(0,n.length-1)}matches(e,t){return K._matches(this.scope,this.parentScopes,e,t)}static _cmp(e,t){if(e===null&&t===null)return 0;if(e===null)return-1;if(t===null)return 1;if(e.scope.length!==t.scope.length)return e.scope.length-t.scope.length;const n=e.parentScopes.length,o=t.parentScopes.length;if(n!==o)return n-o;for(let i=0;i<n;i++){const s=e.parentScopes[i].length,r=t.parentScopes[i].length;if(s!==r)return s-r}return 0}isMoreSpecific(e){return K._cmp(this,e)>0}static _matchesOne(e,t){const n=e+".";return e===t||t.substring(0,n.length)===n}static _matches(e,t,n,o){if(!this._matchesOne(e,n))return!1;let i=t.length-1,s=o.length-1;for(;i>=0&&s>=0;)this._matchesOne(t[i],o[s])&&i--,s--;return i===-1}}var de;it($t);const d=ut;var x;let O=(x=class extends P{static get(e){return e.getContribution(de.ID)}constructor(e,t,n,o,i,s,r){super(),this._editor=e,this._textMateService=t,this._themeService=o,this._languageService=n,this._notificationService=i,this._configurationService=s,this._languageFeaturesService=r,this._widget=null,this._register(this._editor.onDidChangeModel(c=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(c=>this.stop())),this._register(this._editor.onKeyUp(c=>c.keyCode===ot.Escape&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&this._editor.getModel().uri.scheme!==rt.vscodeNotebookCell&&(this._widget=new ue(this._editor,this._textMateService,this._languageService,this._themeService,this._notificationService,this._configurationService,this._languageFeaturesService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}toggle(){this._widget?this.stop():this.launch()}},de=x,x.ID="editor.contrib.inspectEditorTokens",x);O=de=X([m(1,me),m(2,ge),m(3,Ee),m(4,he),m(5,le),m(6,st)],O);class Wt extends _t{constructor(){super({id:"editor.action.inspectTMScopes",label:kt(5274,"Developer: Inspect Editor Tokens and Scopes"),precondition:void 0})}run(e,t){O.get(t)?.toggle()}}function we(h){h.length>40&&(h=h.substr(0,20)+"…"+h.substr(h.length-20));let e="";for(let t=0,n=h.length;t<n;t++){const o=h.charCodeAt(t);switch(o){case be.Tab:e+="→";break;case be.Space:e+="·";break;default:e+=String.fromCharCode(o)}}return e}const Q=class Q extends P{constructor(e,t,n,o,i,s,r){super(),this.allowEditorOverflow=!0,this._isDisposed=!1,this._editor=e,this._languageService=n,this._themeService=o,this._textMateService=t,this._notificationService=i,this._configurationService=s,this._languageFeaturesService=r,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="token-inspect-widget",this._currentRequestCancellationTokenSource=new at,this._beginCompute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(c=>this._beginCompute(this._editor.getPosition()))),this._register(o.onDidColorThemeChange(c=>this._beginCompute(this._editor.getPosition()))),this._register(s.onDidChangeConfiguration(c=>c.affectsConfiguration("editor.semanticHighlighting.enabled")&&this._beginCompute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._isDisposed=!0,this._editor.removeContentWidget(this),this._currentRequestCancellationTokenSource.cancel(),super.dispose()}getId(){return Q._ID}_beginCompute(e){const t=this._textMateService.createTokenizer(this._model.getLanguageId()),n=this._computeSemanticTokens(e),o=this._model.tokenization.tokens.get(),i=o instanceof pt?o:void 0;ct(this._domNode),this._domNode.appendChild(document.createTextNode(l(5275,"Loading..."))),Promise.all([t,n]).then(([s,r])=>{if(this._isDisposed)return;const c=i?.tree.get();this._compute(s,r,c,e),this._domNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`,this._editor.layoutContentWidget(this)},s=>{this._notificationService.warn(s),setTimeout(()=>{O.get(this._editor)?.stop()})})}_isSemanticColoringEnabled(){const e=this._configurationService.getValue(dt,{overrideIdentifier:this._model.getLanguageId(),resource:this._model.uri})?.enabled;return typeof e=="boolean"?e:this._themeService.getColorTheme().semanticHighlighting}_compute(e,t,n,o){const i=e&&this._getTokensAtPosition(e,o),s=t&&this._getSemanticTokenAtPosition(t,o),r=n&&this._getTreeSitterTokenAtPosition(n,o);if(!i&&!s&&!r){Se(this._domNode,"No grammar or semantic tokens available.");return}const c=i?.metadata,a=s?.metadata,u=s&&we(this._model.getValueInRange(s.range)),g=i&&we(this._model.getLineContent(o.lineNumber).substring(i.token.startIndex,i.token.endIndex)),k=u||g||"";if(Se(this._domNode,d("h2.tiw-token",void 0,k,d("span.tiw-token-length",void 0,`${k.length} ${k.length===1?"char":"chars"}`))),p(this._domNode,d("hr.tiw-metadata-separator",{style:"clear:both"})),p(this._domNode,d("table.tiw-metadata-table",void 0,d("tbody",void 0,d("tr",void 0,d("td.tiw-metadata-key",void 0,"language"),d("td.tiw-metadata-value",void 0,c?.languageId||"")),d("tr",void 0,d("td.tiw-metadata-key",void 0,"standard token type"),d("td.tiw-metadata-value",void 0,this._tokenTypeToString(c?.tokenType||v.Other))),...this._formatMetadata(a,c)))),s){p(this._domNode,d("hr.tiw-metadata-separator"));const w=p(this._domNode,d("table.tiw-metadata-table",void 0)),y=p(w,d("tbody",void 0,d("tr",void 0,d("td.tiw-metadata-key",void 0,"semantic token type"),d("td.tiw-metadata-value",void 0,s.type))));if(s.modifiers.length&&p(y,d("tr",void 0,d("td.tiw-metadata-key",void 0,"modifiers"),d("td.tiw-metadata-value",void 0,s.modifiers.join(" ")))),s.metadata){const T=["foreground","bold","italic","underline","strikethrough"],S={},b=new Array;for(const f of T)if(s.metadata[f]!==void 0){const _=s.definitions[f],L=this._renderTokenStyleDefinition(_,f),C=L.map(V=>lt(V)?V.outerHTML:V).join();let j=S[C];j||(S[C]=j=[],b.push([L,C])),j.push(f)}for(const[f,_]of b)p(y,d("tr",void 0,d("td.tiw-metadata-key",void 0,S[_].join(", ")),d("td.tiw-metadata-value",void 0,...f)))}}if(i){const w=this._themeService.getColorTheme();p(this._domNode,d("hr.tiw-metadata-separator"));const y=p(this._domNode,d("table.tiw-metadata-table")),T=p(y,d("tbody"));g&&g!==k&&p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"textmate token"),d("td.tiw-metadata-value",void 0,`${g} (${g.length})`)));const S=new Array;for(let _=i.token.scopes.length-1;_>=0;_--)S.push(i.token.scopes[_]),_>0&&S.push(d("br"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"textmate scopes"),d("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...S)));const b=Vt(w,i.token.scopes,!1),f=s?.metadata?.foreground;if(b){if(f!==i.metadata.foreground){let _=d("code.tiw-theme-selector",void 0,b.rawSelector,d("br"),JSON.stringify(b.settings,null," "));f&&(_=d("s",void 0,_)),p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,_)))}}else f||p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,"No theme selector")))}if(r){const w=r[r.length-1];p(this._domNode,d("hr.tiw-metadata-separator"));const y=p(this._domNode,d("table.tiw-metadata-table")),T=p(y,d("tbody"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,`tree-sitter token ${w.id}`),d("td.tiw-metadata-value",void 0,`${w.text}`)));const S=new Array;let b=r.length-1,f=r[b];for(;f.parent||b>0;)S.push(f.type),f=f.parent??r[--b],f&&S.push(d("br"));p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"tree-sitter tree"),d("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...S)));const L=this._model.tokenization.tokens.get().tokenizationImpl.get()?.captureAtPosition(o.lineNumber,o.column);L&&L.length>0&&p(T,d("tr",void 0,d("td.tiw-metadata-key",void 0,"foreground"),d("td.tiw-metadata-value",void 0,L.map(C=>C.name).join(" "))))}}_formatMetadata(e,t){const n=new Array;function o(a){const u=e?.[a]||t?.[a];if(u!==void 0){const g=e?.[a]?"tiw-metadata-semantic":"";n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,a),d(`td.tiw-metadata-value.${g}`,void 0,u)))}return u}const i=o("foreground"),s=o("background");if(i&&s){const a=W.fromHex(s),u=W.fromHex(i);a.isOpaque()?n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"contrast ratio"),d("td.tiw-metadata-value",void 0,a.getContrastRatio(u.makeOpaque(a)).toFixed(2)))):n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"Contrast ratio cannot be precise for background colors that use transparency"),d("td.tiw-metadata-value")))}const r=new Array;function c(a){let u;e&&e[a]?u=d("span.tiw-metadata-semantic",void 0,a):t&&t[a]&&(u=a),u&&(r.length&&r.push(" "),r.push(u))}return c("bold"),c("italic"),c("underline"),c("strikethrough"),r.length&&n.push(d("tr",void 0,d("td.tiw-metadata-key",void 0,"font style"),d("td.tiw-metadata-value",void 0,...r))),n}_decodeMetadata(e){const t=this._themeService.getColorTheme().tokenColorMap,n=N.getLanguageId(e),o=N.getTokenType(e),i=N.getFontStyle(e),s=N.getForeground(e),r=N.getBackground(e);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(n),tokenType:o,bold:i&G.Bold?!0:void 0,italic:i&G.Italic?!0:void 0,underline:i&G.Underline?!0:void 0,strikethrough:i&G.Strikethrough?!0:void 0,foreground:t[s],background:t[r]}}_tokenTypeToString(e){switch(e){case v.Other:return"Other";case v.Comment:return"Comment";case v.String:return"String";case v.RegEx:return"RegEx";default:return"??"}}_getTokensAtPosition(e,t){const n=t.lineNumber,o=this._getStateBeforeLine(e,n),i=e.tokenizeLine(this._model.getLineContent(n),o),s=e.tokenizeLine2(this._model.getLineContent(n),o);let r=0;for(let a=i.tokens.length-1;a>=0;a--){const u=i.tokens[a];if(t.column-1>=u.startIndex){r=a;break}}let c=0;for(let a=s.tokens.length>>>1;a>=0;a--)if(t.column-1>=s.tokens[a<<1]){c=a;break}return{token:i.tokens[r],metadata:this._decodeMetadata(s.tokens[(c<<1)+1])}}_getStateBeforeLine(e,t){let n=null;for(let o=1;o<t;o++)n=e.tokenizeLine(this._model.getLineContent(o),n).ruleStack;return n}isSemanticTokens(e){return e&&e.data}async _computeSemanticTokens(e){if(!this._isSemanticColoringEnabled())return null;const t=this._languageFeaturesService.documentSemanticTokensProvider.ordered(this._model);if(t.length){const o=t[0],i=await Promise.resolve(o.provideDocumentSemanticTokens(this._model,null,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(i))return{tokens:i,legend:o.getLegend()}}const n=this._languageFeaturesService.documentRangeSemanticTokensProvider.ordered(this._model);if(n.length){const o=n[0],i=e.lineNumber,s=new oe(i,1,i,this._model.getLineMaxColumn(i)),r=await Promise.resolve(o.provideDocumentRangeSemanticTokens(this._model,s,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(r))return{tokens:r,legend:o.getLegend()}}return null}_getSemanticTokenAtPosition(e,t){const n=e.tokens.data,o=this._model.getLanguageId();let i=0,s=0;const r=t.lineNumber-1,c=t.column-1;for(let a=0;a<n.length;a+=5){const u=n[a],g=n[a+1],k=n[a+2],w=n[a+3],y=n[a+4],T=i+u,S=u===0?s+g:g;if(r===T&&S<=c&&c<S+k){const b=e.legend.tokenTypes[w]||"not in legend (ignored)",f=[];let _=y;for(let ee=0;_>0&&ee<e.legend.tokenModifiers.length;ee++)_&1&&f.push(e.legend.tokenModifiers[ee]),_=_>>1;_>0&&f.push("not in legend (ignored)");const L=new oe(T+1,S+1,T+1,S+1+k),C={},j=this._themeService.getColorTheme().tokenColorMap,D=this._themeService.getColorTheme().getTokenStyleMetadata(b,f,o,!0,C);let fe;return D&&(fe={languageId:void 0,tokenType:v.Other,bold:D?.bold,italic:D?.italic,underline:D?.underline,strikethrough:D?.strikethrough,foreground:j[D?.foreground||gt.None],background:void 0}),{type:b,modifiers:f,range:L,metadata:fe,definitions:C}}i=T,s=S}return null}_walkTreeforPosition(e,t){const n=this._model.getOffsetAt(t);e.gotoFirstChild();let o=!1,i=null;do e.currentNode.startIndex<=n&&n<e.currentNode.endIndex?(o=!0,i=e.currentNode):o=!1;while(o?e.gotoFirstChild():e.gotoNextSibling());return i}_getTreeSitterTokenAtPosition(e,t){const n=[];let o=e?.tree.get();for(;o;){const i=o.walk(),s=this._walkTreeforPosition(i,t);i.delete(),s?(n.push(s),e=e?.getInjectionTrees(s.startIndex,e.languageId),o=e?.tree.get()):o=void 0}return n.length>0?n:null}_renderTokenStyleDefinition(e,t){const n=new Array;if(e===void 0)return n;const o=this._themeService.getColorTheme();if(Array.isArray(e)){const i={};o.resolveScopes(e,i);const s=i[t];if(s&&i.scope){const r=d("ul.tiw-metadata-values"),c=Array.isArray(s.scope)?s.scope:[String(s.scope)];for(const a of c)r.appendChild(d("li.tiw-metadata-value.tiw-metadata-scopes",void 0,a));return n.push(i.scope.join(" "),r,d("code.tiw-theme-selector",void 0,JSON.stringify(s.settings,null," "))),n}return n}else if(Ct.is(e)){const i=o.getTokenStylingRuleScope(e);return i==="setting"?(n.push(`User settings: ${e.selector.id} - ${this._renderStyleProperty(e.style,t)}`),n):(i==="theme"&&n.push(`Color theme: ${e.selector.id} - ${this._renderStyleProperty(e.style,t)}`),n)}else{const i=o.resolveTokenStyleValue(e);return n.push(`Default: ${i?this._renderStyleProperty(i,t):""}`),n}}_renderStyleProperty(e,t){return t==="foreground"?e.foreground?W.Format.CSS.formatHexA(e.foreground,!0):"":e[t]!==void 0?String(e[t]):""}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[ye.BELOW,ye.ABOVE]}}};Q._ID="editor.contrib.inspectEditorTokensWidget";let ue=Q;ht(O.ID,O,mt.Lazy);ft(Wt);yt(async h=>{h.get(bt).when(wt.Ready).then(()=>{vt.get(me)})});function Jt(){return{...St(),[me.toString()]:new Tt(ce,[],!1)}}export{me as ITextMateTokenizationService,Jt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aq as O,ar as _e,N as z,as as nt,at as ot,au as wn,av as xn,aw as vn,ax as Dn,ay as An,az as On,aA as Mn,aB as Pn,aC as Ln,aD as Hn,aE as Fn,aF as Nn,aG as $n,aH as oe,J as Ne,aI as it,aJ as ge,aK as ut,aL as k,aM as H,aN as Bn,aO as ft,ah as j,aP as on,aQ as jn,aR as mt,q as r,aS as gt,aT as pt,x as ne,aU as Ge,aV as Tt,aW as st,aX as Ue,aY as rt,aZ as sn,a_ as St,a$ as Ct,b0 as y,b1 as ee,b2 as Pe,b3 as ue,b4 as Dt,b5 as At,b6 as Gn,b7 as Un,b8 as Kn,b9 as It,E as we,K as Ot,p as yt,ba as zn,ak as rn,D as an,bb as Wn,bc as se,bd as K,be as qn,G as cn,bf as Vn,bg as Mt,bh as at,bi as Jn,bj as Yn,bk as Qn,bl as Ye,bm as Pt,z as Ke,u as ln,bn as Xn,bo as Zn,bp as eo,bq as Lt,d as Et,br as to,bs as no,bt as oo,bu as bt,bv as io,f as kt,g as w,bw as so,bx as ro,h as hn,m as ao,by as co,bz as lo,I as Rt,bA as ho,O as dn,bB as uo,bC as fo,i as mo,bD as go,bE as ct,bF as _t,bG as po,bH as un,Q as To,bI as wt,bJ as So,W as Ae,bK as pe,bL as Te,bM as Co,bN as Io,bO as Se,aj as Ce,bP as Ht,$ as Ft,bQ as fn,bR as Nt,bS as $t,bT as yo,bU as Eo,bV as Bt,bW as bo,j as ko,bX as Ro,bY as xt,bZ as Oe,b_ as _o,a3 as wo,b$ as xo,P as vo,al as Do,c0 as Ao}from"./index-DSexFukl.js";import{g as Oo,T as ze,p as jt,S as Gt,a as mn}from"./tokenClassificationRegistry-CZyxOMX0.js";import{I as le}from"./workbenchThemeService.service-CXlQNmVU.js";const Mo="[",Po="]",Le="*",Lo=/\[(.+?)\]/g;var C;(function(i){i.COLOR_THEME="workbench.colorTheme",i.FILE_ICON_THEME="workbench.iconTheme",i.PRODUCT_ICON_THEME="workbench.productIconTheme",i.COLOR_CUSTOMIZATIONS="workbench.colorCustomizations",i.TOKEN_COLOR_CUSTOMIZATIONS="editor.tokenColorCustomizations",i.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS="editor.semanticTokenColorCustomizations",i.PREFERRED_DARK_THEME="workbench.preferredDarkColorTheme",i.PREFERRED_LIGHT_THEME="workbench.preferredLightColorTheme",i.PREFERRED_HC_DARK_THEME="workbench.preferredHighContrastColorTheme",i.PREFERRED_HC_LIGHT_THEME="workbench.preferredHighContrastLightColorTheme",i.DETECT_COLOR_SCHEME="window.autoDetectColorScheme",i.DETECT_HC="window.autoDetectHighContrast",i.SYSTEM_COLOR_THEME="window.systemColorTheme"})(C||(C={}));var P;(function(i){i.COLOR_THEME_DARK="Default Dark Modern",i.COLOR_THEME_LIGHT="Default Light Modern",i.COLOR_THEME_HC_DARK="Default High Contrast",i.COLOR_THEME_HC_LIGHT="Default High Contrast Light",i.COLOR_THEME_DARK_OLD="Default Dark+",i.COLOR_THEME_LIGHT_OLD="Default Light+",i.FILE_ICON_THEME="vs-seti",i.PRODUCT_ICON_THEME="Default"})(P||(P={}));const Ho={"activityBar.activeBorder":"#0078d4","activityBar.background":"#181818","activityBar.border":"#2b2b2b","activityBar.foreground":"#d7d7d7","activityBar.inactiveForeground":"#868686","editorGroup.border":"#ffffff17","editorGroupHeader.tabsBackground":"#181818","editorGroupHeader.tabsBorder":"#2b2b2b","statusBar.background":"#181818","statusBar.border":"#2b2b2b","statusBar.foreground":"#cccccc","statusBar.noFolderBackground":"#1f1f1f","tab.activeBackground":"#1f1f1f","tab.activeBorder":"#1f1f1f","tab.activeBorderTop":"#0078d4","tab.activeForeground":"#ffffff","tab.border":"#2b2b2b","textLink.foreground":"#4daafc","titleBar.activeBackground":"#181818","titleBar.activeForeground":"#cccccc","titleBar.border":"#2b2b2b","titleBar.inactiveBackground":"#1f1f1f","titleBar.inactiveForeground":"#9d9d9d","welcomePage.tileBackground":"#2b2b2b"},Fo={"activityBar.activeBorder":"#005FB8","activityBar.background":"#f8f8f8","activityBar.border":"#e5e5e5","activityBar.foreground":"#1f1f1f","activityBar.inactiveForeground":"#616161","editorGroup.border":"#e5e5e5","editorGroupHeader.tabsBackground":"#f8f8f8","editorGroupHeader.tabsBorder":"#e5e5e5","statusBar.background":"#f8f8f8","statusBar.border":"#e5e5e5","statusBar.foreground":"#3b3b3b","statusBar.noFolderBackground":"#f8f8f8","tab.activeBackground":"#ffffff","tab.activeBorder":"#f8f8f8","tab.activeBorderTop":"#005fb8","tab.activeForeground":"#3b3b3b","tab.border":"#e5e5e5","textLink.foreground":"#005fb8","titleBar.activeBackground":"#f8f8f8","titleBar.activeForeground":"#1e1e1e","titleBar.border":"#E5E5E5","titleBar.inactiveBackground":"#f8f8f8","titleBar.inactiveForeground":"#8b949e","welcomePage.tileBackground":"#f3f3f3"};var G;(function(i){function e(n){return n&&{_extensionId:n.extensionId,_extensionIsBuiltin:n.extensionIsBuiltin,_extensionName:n.extensionName,_extensionPublisher:n.extensionPublisher}}i.toJSONObject=e;function t(n){if(n&&O(n._extensionId)&&_e(n._extensionIsBuiltin)&&O(n._extensionName)&&O(n._extensionPublisher))return{extensionId:n._extensionId,extensionIsBuiltin:n._extensionIsBuiltin,extensionName:n._extensionName,extensionPublisher:n._extensionPublisher}}i.fromJSONObject=t;function o(n,s,a=!1){return{extensionPublisher:n,extensionId:`${n}.${s}`,extensionName:s,extensionIsBuiltin:a}}i.fromName=o})(G||(G={}));const lt={};function M(i,e){let t=lt[i];t||(lt[i]=t=[]),t.push(e)}function gn(i,e){for(const t of i)if(e.textMateRules.push(t),!t.scope){const o=t.settings;if(!o)t.settings={};else for(const n in o){const s=n,a=lt[s];if(a){const l=o[s];if(typeof l=="string"){const c=z.fromHex(l);for(const h of a)e.colors[h]=c}}s!=="foreground"&&s!=="background"&&s!=="fontStyle"&&delete o[s]}}}M("background",nt);M("foreground",ot);M("selection",wn);M("inactiveSelection",xn);M("selectionHighlightColor",vn);M("findMatchHighlight",Dn);M("currentFindMatchHighlight",An);M("hoverHighlight",On);M("wordHighlight","editor.wordHighlightBackground");M("wordHighlightStrong","editor.wordHighlightStrongBackground");M("findRangeHighlight",Mn);M("findMatchHighlight","peekViewResult.matchHighlightBackground");M("referenceHighlight","peekViewEditor.matchHighlightBackground");M("lineHighlight",Pn);M("rangeHighlight",Ln);M("caret",Hn);M("invisibles",Fn);M("guide",Nn);M("activeGuide",$n);const No=["ansiBlack","ansiRed","ansiGreen","ansiYellow","ansiBlue","ansiMagenta","ansiCyan","ansiWhite","ansiBrightBlack","ansiBrightRed","ansiBrightGreen","ansiBrightYellow","ansiBrightBlue","ansiBrightMagenta","ansiBrightCyan","ansiBrightWhite"];for(const i of No)M(i,"terminal."+i);var N;(function(i){i[i.BOM=65279]="BOM",i[i.SPACE=32]="SPACE",i[i.TAB=9]="TAB",i[i.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",i[i.LINE_FEED=10]="LINE_FEED",i[i.SLASH=47]="SLASH",i[i.LESS_THAN=60]="LESS_THAN",i[i.QUESTION_MARK=63]="QUESTION_MARK",i[i.EXCLAMATION_MARK=33]="EXCLAMATION_MARK"})(N||(N={}));var b;(function(i){i[i.ROOT_STATE=0]="ROOT_STATE",i[i.DICT_STATE=1]="DICT_STATE",i[i.ARR_STATE=2]="ARR_STATE"})(b||(b={}));function $o(i){return Bo(i)}function Bo(i,e,t){const o=i.length;let n=0;o>0&&i.charCodeAt(0)===N.BOM&&(n=1);function s(g){n=n+g}function a(g){n=g}function l(){for(;n<o;){const g=i.charCodeAt(n);if(g!==N.SPACE&&g!==N.TAB&&g!==N.CARRIAGE_RETURN&&g!==N.LINE_FEED)break;s(1)}}function c(g){return i.substr(n,g.length)===g?(s(g.length),!0):!1}function h(g){const v=i.indexOf(g,n);a(v!==-1?v+g.length:o)}function d(g){const v=i.indexOf(g,n);if(v!==-1){const D=i.substring(n,v);return a(v+g.length),D}else{const D=i.substr(n);return a(o),D}}let f=b.ROOT_STATE,u=null;const m=[],I=[];let p=null;function T(g,v){m.push(f),I.push(u),f=g,u=v}function R(){if(m.length===0)return S("illegal state stack");f=m.pop(),u=I.pop()}function S(g){throw new Error("Near offset "+n+": "+g+" ~~~"+i.substr(n,50)+"~~~")}const E={enterDict:function(){if(p===null)return S("missing <key>");const g={};u[p]=g,p=null,T(b.DICT_STATE,g)},enterArray:function(){if(p===null)return S("missing <key>");const g=[];u[p]=g,p=null,T(b.ARR_STATE,g)}},A={enterDict:function(){const g={};u.push(g),T(b.DICT_STATE,g)},enterArray:function(){const g=[];u.push(g),T(b.ARR_STATE,g)}};function U(){f===b.DICT_STATE?E.enterDict():f===b.ARR_STATE?A.enterDict():(u={},T(b.DICT_STATE,u))}function F(){if(f===b.DICT_STATE)R();else return f===b.ARR_STATE,S("unexpected </dict>")}function ye(){f===b.DICT_STATE?E.enterArray():f===b.ARR_STATE?A.enterArray():(u=[],T(b.ARR_STATE,u))}function de(){if(f===b.DICT_STATE)return S("unexpected </array>");if(f===b.ARR_STATE)R();else return S("unexpected </array>")}function Ee(g){if(f===b.DICT_STATE){if(p!==null)return S("too many <key>");p=g}else return f===b.ARR_STATE,S("unexpected <key>")}function be(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function J(g){if(isNaN(g))return S("cannot parse float");if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function ke(g){if(isNaN(g))return S("cannot parse integer");if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function Re(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function x(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function _(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function Y(g){return g.replace(/&#([0-9]+);/g,function(v,D){return String.fromCodePoint(parseInt(D,10))}).replace(/&#x([0-9a-f]+);/g,function(v,D){return String.fromCodePoint(parseInt(D,16))}).replace(/&|<|>|"|'/g,function(v){switch(v){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return v})}function Q(){let g=d(">"),v=!1;return g.charCodeAt(g.length-1)===N.SLASH&&(v=!0,g=g.substring(0,g.length-1)),{name:g.trim(),isClosed:v}}function L(g){if(g.isClosed)return"";const v=d("</");return h(">"),Y(v)}for(;n<o&&(l(),!(n>=o));){const g=i.charCodeAt(n);if(s(1),g!==N.LESS_THAN)return S("expected <");if(n>=o)return S("unexpected end of input");const v=i.charCodeAt(n);if(v===N.QUESTION_MARK){s(1),h("?>");continue}if(v===N.EXCLAMATION_MARK){if(s(1),c("--")){h("-->");continue}h(">");continue}if(v===N.SLASH){if(s(1),l(),c("plist")){h(">");continue}if(c("dict")){h(">"),F();continue}if(c("array")){h(">"),de();continue}return S("unexpected closed tag")}const D=Q();switch(D.name){case"dict":U(),D.isClosed&&F();continue;case"array":ye(),D.isClosed&&de();continue;case"key":Ee(L(D));continue;case"string":be(L(D));continue;case"real":J(parseFloat(L(D)));continue;case"integer":ke(parseInt(L(D),10));continue;case"date":Re(new Date(L(D)));continue;case"data":x(L(D));continue;case"true":L(D),_(!0);continue;case"false":L(D),_(!1);continue}if(!/^plist/.test(D.name))return S("unexpected opened tag "+D.name)}return u}function Ut(i,e,t){const o=jo(i);let n=o.next();for(;n!==null;){let c=0;if(n.length===2&&n.charAt(1)===":"){switch(n.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${n} in scope selector`)}n=o.next()}const h=a();if(h&&t.push({matcher:h,priority:c}),n!==",")break;n=o.next()}function s(){if(n==="-"){n=o.next();const c=s();return c?h=>c(h)<0?0:-1:null}if(n==="("){n=o.next();const c=l();return n===")"&&(n=o.next()),c}if(Kt(n)){const c=[];do c.push(n),n=o.next();while(Kt(n));return h=>e(c,h)}return null}function a(){let c=s();if(!c)return null;const h=[];for(;c;)h.push(c),c=s();return d=>{let f=h[0](d);for(let u=1;f>=0&&u<h.length;u++)f=Math.min(f,h[u](d));return f}}function l(){let c=a();if(!c)return null;const h=[];for(;c&&(h.push(c),n==="|"||n===",");){do n=o.next();while(n==="|"||n===",");c=a()}return d=>{let f=h[0](d);for(let u=1;u<h.length;u++)f=Math.max(f,h[u](d));return f}}}function Kt(i){return!!i&&!!i.match(/[\w\.:]+/)}function jo(i){const e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g;let t=e.exec(i);return{next:()=>{if(!t)return null;const o=t[0];return t=e.exec(i),o}}}const Go=oe.as(on.ColorContribution),$e=Oo(),zt={comments:["comment","punctuation.definition.comment"],strings:["string","meta.embedded.assembly"],keywords:["keyword - keyword.operator","keyword.control","storage","storage.type"],numbers:["constant.numeric"],types:["entity.name.type","entity.name.class","support.type","support.class"],functions:["entity.name.function","support.function"],variables:["variable","entity.name.variable"]},q=class q{constructor(e,t,o){this.themeTokenColors=[],this.customTokenColors=[],this.colorMap={},this.customColorMap={},this.semanticTokenRules=[],this.customSemanticTokenRules=[],this.textMateThemingRules=void 0,this.tokenColorIndex=void 0,this.id=e,this.label=t,this.settingsId=o,this.isLoaded=!1}get semanticHighlighting(){return this.customSemanticHighlighting!==void 0?this.customSemanticHighlighting:this.customSemanticHighlightingDeprecated!==void 0?this.customSemanticHighlightingDeprecated:!!this.themeSemanticHighlighting}get tokenColors(){if(!this.textMateThemingRules){let s=function(a){a.scope&&a.settings&&(a.scope==="token.info-token"&&(n=!0),e.push({scope:a.scope,settings:{foreground:fe(a.settings.foreground),background:fe(a.settings.background),fontStyle:a.settings.fontStyle}}))};const e=[],t=this.getColor(ot)||this.getDefault(ot),o=this.getColor(nt)||this.getDefault(nt);e.push({settings:{foreground:fe(t),background:fe(o)}});let n=!1;this.themeTokenColors.forEach(s),this.customTokenColors.forEach(s),n||Ko[this.type].forEach(s),this.textMateThemingRules=e}return this.textMateThemingRules}getColor(e,t){const o=this.customColorMap[e];if(o instanceof z)return o;if(o===void 0){const n=this.colorMap[e];if(n!==void 0)return n}if(t!==!1)return this.getDefault(e)}getTokenStyle(e,t,o,n=!0,s={}){const a={foreground:void 0,bold:void 0,underline:void 0,strikethrough:void 0,italic:void 0},l={foreground:-1,bold:-1,underline:-1,strikethrough:-1,italic:-1};function c(f,u,m){u.foreground&&l.foreground<=f&&(l.foreground=f,a.foreground=u.foreground,s.foreground=m);for(const I of["bold","underline","strikethrough","italic"]){const p=I,T=u[p];T!==void 0&&l[p]<=f&&(l[p]=f,a[p]=T,s[p]=m)}}function h(f){const u=f.selector.match(e,t,o);u>=0&&c(u,f.style,f)}this.semanticTokenRules.forEach(h),this.customSemanticTokenRules.forEach(h);let d=!1;for(const f in l){const u=f;l[u]===-1?d=!0:l[u]=Number.MAX_VALUE}if(d)for(const f of $e.getTokenStylingDefaultRules()){const u=f.selector.match(e,t,o);if(u>=0){let m;if(f.defaults.scopesToProbe&&(m=this.resolveScopes(f.defaults.scopesToProbe),m&&c(u,m,f.defaults.scopesToProbe)),!m&&n!==!1){const I=f.defaults[this.type];m=this.resolveTokenStyleValue(I),m&&c(u,m,I)}}}return ze.fromData(a)}resolveTokenStyleValue(e){if(e!==void 0){if(typeof e=="string"){const{type:t,modifiers:o,language:n}=jt(e,"");return this.getTokenStyle(t,o,n)}else if(typeof e=="object")return e}}getTokenColorIndex(){if(!this.tokenColorIndex){const e=new qo;this.tokenColors.forEach(t=>{e.add(t.settings.foreground),e.add(t.settings.background)}),this.semanticTokenRules.forEach(t=>e.add(t.style.foreground)),$e.getTokenStylingDefaultRules().forEach(t=>{const o=t.defaults[this.type];o&&typeof o=="object"&&e.add(o.foreground)}),this.customSemanticTokenRules.forEach(t=>e.add(t.style.foreground)),this.tokenColorIndex=e}return this.tokenColorIndex}get tokenColorMap(){return this.getTokenColorIndex().asArray()}getTokenStyleMetadata(e,t,o,n=!0,s={}){const{type:a,language:l}=jt(e,o),c=this.getTokenStyle(a,t,l,n,s);if(c)return{foreground:this.getTokenColorIndex().get(c.foreground),bold:c.bold,underline:c.underline,strikethrough:c.strikethrough,italic:c.italic}}getTokenStylingRuleScope(e){if(this.customSemanticTokenRules.indexOf(e)!==-1)return"setting";if(this.semanticTokenRules.indexOf(e)!==-1)return"theme"}getDefault(e){return Go.resolveDefaultColor(e,this)}resolveScopes(e,t){this.themeTokenScopeMatchers||(this.themeTokenScopeMatchers=this.themeTokenColors.map(Jt)),this.customTokenScopeMatchers||(this.customTokenScopeMatchers=this.customTokenColors.map(Jt));for(const o of e){let d=function(f,u){for(let m=0;m<f.length;m++){const I=f[m](o);if(I>=0){const p=u[m],T=u[m].settings;I>=a&&T.foreground&&(n=T.foreground,a=I,h=p),I>=l&&O(T.fontStyle)&&(s=T.fontStyle,l=I,c=p)}}},n,s,a=-1,l=-1,c,h;if(d(this.themeTokenScopeMatchers,this.themeTokenColors),d(this.customTokenScopeMatchers,this.customTokenColors),n!==void 0||s!==void 0)return t&&(t.foreground=h,t.bold=t.italic=t.underline=t.strikethrough=c,t.scope=o),ze.fromSettings(n,s)}}defines(e){const t=this.customColorMap[e];return t instanceof z?!0:t===void 0&&this.colorMap.hasOwnProperty(e)}setCustomizations(e){this.setCustomColors(e.colorCustomizations),this.setCustomTokenColors(e.tokenColorCustomizations),this.setCustomSemanticTokenColors(e.semanticTokenColorCustomizations)}setCustomColors(e){this.customColorMap={},this.overwriteCustomColors(e);const t=this.getThemeSpecificColors(e);Ne(t)&&this.overwriteCustomColors(t),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}overwriteCustomColors(e){for(const t in e){const o=e[t];o===it?this.customColorMap[t]=it:typeof o=="string"&&(this.customColorMap[t]=z.fromHex(o))}}setCustomTokenColors(e){this.customTokenColors=[],this.customSemanticHighlightingDeprecated=void 0,this.addCustomTokenColors(e);const t=this.getThemeSpecificColors(e);Ne(t)&&this.addCustomTokenColors(t),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}setCustomSemanticTokenColors(e){if(this.customSemanticTokenRules=[],this.customSemanticHighlighting=void 0,e){this.customSemanticHighlighting=e.enabled,e.rules&&this.readSemanticTokenRules(e.rules);const t=this.getThemeSpecificColors(e);Ne(t)&&(t.enabled!==void 0&&(this.customSemanticHighlighting=t.enabled),t.rules&&this.readSemanticTokenRules(t.rules))}this.tokenColorIndex=void 0,this.textMateThemingRules=void 0}isThemeScope(e){return e.charAt(0)===Mo&&e.charAt(e.length-1)===Po}isThemeScopeMatch(e){const t=e.charAt(0),o=e.charAt(e.length-1),n=e.slice(0,-1),s=e.slice(1,-1),a=e.slice(1);return e===this.settingsId||this.settingsId.includes(s)&&t===Le&&o===Le||this.settingsId.startsWith(n)&&o===Le||this.settingsId.endsWith(a)&&t===Le}getThemeSpecificColors(e){let t;for(const o in e){const n=e[o];if(this.isThemeScope(o)&&n instanceof Object&&!Array.isArray(n)){const s=o.match(Lo)||[];for(const a of s){const l=a.substring(1,a.length-1);if(this.isThemeScopeMatch(l)){t||(t={});const c=n;for(const h in c){const d=t[h],f=c[h];Array.isArray(d)&&Array.isArray(f)?t[h]=d.concat(f):f&&(t[h]=f)}}}}}return t}readSemanticTokenRules(e){for(const t in e)if(!this.isThemeScope(t))try{const o=Tn(t,e[t]);o&&this.customSemanticTokenRules.push(o)}catch{}}addCustomTokenColors(e){for(const t in zt){const o=t,n=e[o];if(n){const s=typeof n=="string"?{foreground:n}:n,a=zt[o];for(const l of a)this.customTokenColors.push({scope:l,settings:s})}}if(Array.isArray(e.textMateRules))for(const t of e.textMateRules)t.scope&&t.settings&&this.customTokenColors.push(t);e.semanticHighlighting!==void 0&&(this.customSemanticHighlightingDeprecated=e.semanticHighlighting)}ensureLoaded(e){return this.isLoaded?Promise.resolve(void 0):this.load(e)}reload(e){return this.load(e)}load(e){if(!this.location)return Promise.resolve(void 0);this.themeTokenColors=[],this.clearCaches();const t={colors:{},textMateRules:[],semanticTokenRules:[],semanticHighlighting:!1};return pn(e,this.location,t).then(o=>{this.isLoaded=!0,this.semanticTokenRules=t.semanticTokenRules,this.colorMap=t.colors,this.themeTokenColors=t.textMateRules,this.themeSemanticHighlighting=t.semanticHighlighting})}clearCaches(){this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.themeTokenScopeMatchers=void 0,this.customTokenScopeMatchers=void 0}toStorage(e){const t={};for(const n in this.colorMap)t[n]=z.Format.CSS.formatHexA(this.colorMap[n],!0);const o=JSON.stringify({id:this.id,label:this.label,settingsId:this.settingsId,themeTokenColors:this.themeTokenColors.map(n=>({settings:n.settings,scope:n.scope})),semanticTokenRules:this.semanticTokenRules.map(Gt.toJSONObject),extensionData:G.toJSONObject(this.extensionData),themeSemanticHighlighting:this.themeSemanticHighlighting,colorMap:t,watch:this.watch});e.store(q.STORAGE_KEY,o,ge.PROFILE,ut.USER)}get themeTypeSelector(){return this.classNames[0]}get classNames(){return this.id.split(" ")}get type(){switch(this.themeTypeSelector){case H.VS:return k.LIGHT;case H.HC_BLACK:return k.HIGH_CONTRAST_DARK;case H.HC_LIGHT:return k.HIGH_CONTRAST_LIGHT;default:return k.DARK}}static createUnloadedThemeForThemeType(e,t){return q.createUnloadedTheme(Bn(e),t)}static createUnloadedTheme(e,t){const o=new q(e,"","__"+e);if(o.isLoaded=!1,o.themeTokenColors=[],o.watch=!1,t)for(const n in t)o.colorMap[n]=z.fromHex(t[n]);return o}static createLoadedEmptyTheme(e,t){const o=new q(e,"",t);return o.isLoaded=!0,o.themeTokenColors=[],o.watch=!1,o}static fromStorageData(e){const t=e.get(q.STORAGE_KEY,ge.PROFILE);if(t)try{const o=JSON.parse(t),n=new q("","","");for(const s in o)switch(s){case"colorMap":{const a=o[s];for(const l in a)n.colorMap[l]=z.fromHex(a[l]);break}case"themeTokenColors":case"id":case"label":case"settingsId":case"watch":case"themeSemanticHighlighting":n[s]=o[s];break;case"semanticTokenRules":{const a=o[s];if(Array.isArray(a))for(const l of a){const c=Gt.fromJSONObject($e,l);c&&n.semanticTokenRules.push(c)}break}case"location":break;case"extensionData":n.extensionData=G.fromJSONObject(o.extensionData);break}return!n.id||!n.settingsId?void 0:n}catch{return}}static fromExtensionTheme(e,t,o){const n=e.uiTheme||"vs-dark",s=Uo(o.extensionId,e.path),a=`${n} ${s}`,l=e.label||ft(e.path),c=e.id||l,h=new q(a,l,c);return h.description=e.description,h.watch=e._watch===!0,h.location=t,h.extensionData=o,h.isLoaded=!1,h}};q.STORAGE_KEY="colorThemeData";let te=q;function Uo(i,e){e.startsWith("./")&&(e=e.substr(2));let t=`${i}-${e}`;return t=t.replace(/[^_a-zA-Z0-9-]/g,"-"),t.charAt(0).match(/[0-9-]/)&&(t="_"+t),t}async function pn(i,e,t){if(jn(e)===".json"){const o=await i.readExtensionResource(e),n=[],s=mt(o,n);if(n.length>0)return Promise.reject(new Error(r(12928,"Problems parsing JSON theme file: {0}",n.map(h=>gt(h.error)).join(", "))));if(pt(s)!=="object")return Promise.reject(new Error(r(12929,"Invalid format for JSON theme file: Object expected.")));if(s.include&&await pn(i,ne(Ge(e),s.include),t),Array.isArray(s.settings))return gn(s.settings,t),null;t.semanticHighlighting=t.semanticHighlighting||s.semanticHighlighting;const a=s.colors;if(a){if(typeof a!="object")return Promise.reject(new Error(r(12930,"Problem parsing color theme file: {0}. Property 'colors' is not of type 'object'.",e.toString())));for(const h in a){const d=a[h];d===it?delete t.colors[h]:typeof d=="string"&&(t.colors[h]=z.fromHex(a[h]))}}const l=s.tokenColors;if(l)if(Array.isArray(l))t.textMateRules.push(...l);else if(typeof l=="string")await Wt(i,ne(Ge(e),l),t);else return Promise.reject(new Error(r(12931,"Problem parsing color theme file: {0}. Property 'tokenColors' should be either an array specifying colors or a path to a TextMate theme file",e.toString())));const c=s.semanticTokenColors;if(c&&typeof c=="object")for(const h in c)try{const d=Tn(h,c[h]);d&&t.semanticTokenRules.push(d)}catch{return Promise.reject(new Error(r(12932,"Problem parsing color theme file: {0}. Property 'semanticTokenColors' contains a invalid selector",e.toString())))}}else return Wt(i,e,t)}function Wt(i,e,t){return i.readExtensionResource(e).then(o=>{try{const s=$o(o).settings;return Array.isArray(s)?(gn(s,t),Promise.resolve(null)):Promise.reject(new Error(r(12933,"Problem parsing tmTheme file: {0}. 'settings' is not array.")))}catch(n){return Promise.reject(new Error(r(12934,"Problems parsing tmTheme file: {0}",n.message)))}},o=>Promise.reject(new Error(r(12935,"Problems loading tmTheme file {0}: {1}",e.toString(),o.message))))}const Ko={light:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],dark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#f44747"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}],hcLight:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],hcDark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#008000"}},{scope:"token.error-token",settings:{foreground:"#FF0000"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}]},qt=i=>-1;function Vt(i,e){if(e.length<i.length)return-1;let t;return i.every(n=>{for(let s=e.length-1;s>=0;s--)if(zo(e[s],n))return t=(s+1)*65536+n.length,!0;return!1})&&t!==void 0?t:-1}function zo(i,e){if(!i)return!1;if(i===e)return!0;const t=e.length;return i.length>t&&i.substr(0,t)===e&&i[t]==="."}function Jt(i){const e=i.scope;if(!e||!i.settings)return qt;const t=[];if(Array.isArray(e))for(const o of e)Ut(o,Vt,t);else Ut(e,Vt,t);return t.length===0?qt:o=>{let n=t[0].matcher(o);for(let s=1;s<t.length;s++)n=Math.max(n,t[s].matcher(o));return n}}function Tn(i,e){const t=$e.parseTokenSelector(i);let o;if(typeof e=="string"?o=ze.fromSettings(e,void 0):Wo(e)&&(o=ze.fromSettings(e.foreground,e.fontStyle,e.bold,e.underline,e.strikethrough,e.italic)),o)return{selector:t,style:o}}function Wo(i){return i&&(O(i.foreground)||O(i.fontStyle)||_e(i.italic)||_e(i.underline)||_e(i.strikethrough)||_e(i.bold))}class qo{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null)}add(e){if(e=fe(e),e===void 0)return 0;let t=this._color2id[e];return t||(t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t)}get(e){if(e=fe(e),e===void 0)return 0;const t=this._color2id[e];return t||(console.log(`Color ${e} not in index.`),0)}asArray(){return this._id2color.slice(0)}}function fe(i){if(!i)return;typeof i!="string"&&(i=z.Format.CSS.formatHexA(i,!0));const e=i.length;if(i.charCodeAt(0)!==j.Hash||e!==4&&e!==5&&e!==7&&e!==9)return;const t=[j.Hash];for(let o=1;o<e;o++){const n=Vo(i.charCodeAt(o));if(!n)return;t.push(n),(e===4||e===5)&&t.push(n)}return t.length===9&&t[7]===j.F&&t[8]===j.F&&(t.length=7),String.fromCharCode(...t)}function Vo(i){return i>=j.Digit0&&i<=j.Digit9||i>=j.A&&i<=j.F?i:i>=j.a&&i<=j.f?i-j.a+j.A:0}const Jo="vscode://schemas/icon-theme",Yo={type:"object",allowComments:!0,allowTrailingCommas:!0,definitions:{folderExpanded:{type:"string",description:r(12949,"The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown.")},folder:{type:"string",description:r(12950,"The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders.")},file:{type:"string",description:r(12951,"The default file icon, shown for all files that don't match any extension, filename or language id.")},rootFolder:{type:"string",description:r(12952,"The folder icon for collapsed root folders, and if rootFolderExpanded is not set, also for expanded root folders.")},rootFolderExpanded:{type:"string",description:r(12953,"The folder icon for expanded root folders. The expanded root folder icon is optional. If not set, the icon defined for root folder will be shown.")},rootFolderNames:{type:"object",description:r(12954,"Associates root folder names to icons. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12955,"The ID of the icon definition for the association.")}},rootFolderNamesExpanded:{type:"object",description:r(12956,"Associates root folder names to icons for expanded root folders. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12957,"The ID of the icon definition for the association.")}},folderNames:{type:"object",description:r(12958,"Associates folder names to icons. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12955,"The ID of the icon definition for the association.")}},folderNamesExpanded:{type:"object",description:r(12959,"Associates folder names to icons for expanded folders. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12960,"The ID of the icon definition for the association.")}},fileExtensions:{type:"object",description:r(12961,"Associates file extensions to icons. The object key is the file extension name. The extension name is the last segment of a file name after the last dot (not including the dot). Extensions are compared case insensitive."),additionalProperties:{type:"string",description:r(12962,"The ID of the icon definition for the association.")}},fileNames:{type:"object",description:r(12963,"Associates file names to icons. The object key is the full file name, but not including any path segments. File name can include dots and a possible file extension. No patterns or wildcards are allowed. File name matching is case insensitive."),additionalProperties:{type:"string",description:r(12964,"The ID of the icon definition for the association.")}},languageIds:{type:"object",description:r(12965,"Associates languages to icons. The object key is the language id as defined in the language contribution point."),additionalProperties:{type:"string",description:r(12966,"The ID of the icon definition for the association.")}},associations:{type:"object",properties:{folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},rootFolder:{$ref:"#/definitions/rootFolder"},rootFolderExpanded:{$ref:"#/definitions/rootFolderExpanded"},rootFolderNames:{$ref:"#/definitions/rootFolderNames"},rootFolderNamesExpanded:{$ref:"#/definitions/rootFolderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"}}}},properties:{fonts:{type:"array",description:r(12967,"Fonts that are used in the icon definitions."),items:{type:"object",properties:{id:{type:"string",description:r(12968,"The ID of the font."),pattern:Ue.source,patternErrorMessage:st},src:{type:"array",description:r(12969,"The location of the font."),items:{type:"object",properties:{path:{type:"string",description:r(12970,"The font path, relative to the current file icon theme file.")},format:{type:"string",description:r(12971,"The format of the font."),enum:["woff","woff2","truetype","opentype","embedded-opentype","svg"]}},required:["path","format"]}},weight:{type:"string",description:r(12972,"The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values."),pattern:Ct.source},style:{type:"string",description:r(12973,"The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values."),pattern:St.source},size:{type:"string",description:r(12974,"The default size of the font. We strongly recommend using a percentage value, for example: 125%."),pattern:rt.source}},required:["id","src"]}},iconDefinitions:{type:"object",description:r(12975,"Description of all icons that can be used when associating files to icons."),additionalProperties:{type:"object",description:r(12976,"An icon definition. The object key is the ID of the definition."),properties:{iconPath:{type:"string",description:r(12977,"When using a SVG or PNG: The path to the image. The path is relative to the icon set file.")},fontCharacter:{type:"string",description:r(12978,"When using a glyph font: The character in the font to use.")},fontColor:{type:"string",format:"color-hex",description:r(12979,"When using a glyph font: The color to use."),pattern:sn.source},fontSize:{type:"string",description:r(12980,"When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition."),pattern:rt.source},fontId:{type:"string",description:r(12981,"When using a font: The id of the font. If not set, defaults to the first font definition."),pattern:Ue.source,patternErrorMessage:st}}}},folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},rootFolder:{$ref:"#/definitions/rootFolder"},rootFolderExpanded:{$ref:"#/definitions/rootFolderExpanded"},rootFolderNames:{$ref:"#/definitions/rootFolderNames"},rootFolderNamesExpanded:{$ref:"#/definitions/rootFolderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"},light:{$ref:"#/definitions/associations",description:r(12982,"Optional associations for file icons in light color themes.")},highContrast:{$ref:"#/definitions/associations",description:r(12983,"Optional associations for file icons in high contrast color themes.")},hidesExplorerArrows:{type:"boolean",description:r(12984,"Configures whether the file explorer's arrows should be hidden when this theme is active.")},showLanguageModeIcons:{type:"boolean",description:r(12985,"Configures whether the default language icons should be used if the theme does not define an icon for a language.")}}};function Qo(){oe.as(Tt.JSONContribution).registerSchema(Jo,Yo)}const $=class ${constructor(e,t,o){this.id=e,this.label=t,this.settingsId=o,this.isLoaded=!1,this.hasFileIcons=!1,this.hasFolderIcons=!1,this.hidesExplorerArrows=!1}ensureLoaded(e){return this.isLoaded?Promise.resolve(this.styleSheetContent):this.load(e)}reload(e){return this.load(e)}load(e){return e.load(this)}static fromExtensionTheme(e,t,o){const n=o.extensionId+"-"+e.id,s=e.label||ft(e.path),a=e.id,l=new $(n,s,a);return l.description=e.description,l.location=t,l.extensionData=o,l.watch=e._watch,l.isLoaded=!1,l}static get noIconTheme(){let e=$._noIconTheme;return e||(e=$._noIconTheme=new $("","",null),e.hasFileIcons=!1,e.hasFolderIcons=!1,e.hidesExplorerArrows=!1,e.isLoaded=!0,e.extensionData=void 0,e.watch=!1),e}static createUnloadedTheme(e){const t=new $(e,"","__"+e);return t.isLoaded=!1,t.hasFileIcons=!1,t.hasFolderIcons=!1,t.hidesExplorerArrows=!1,t.extensionData=void 0,t.watch=!1,t}static fromStorageData(e){const t=e.get($.STORAGE_KEY,ge.PROFILE);if(t)try{const o=JSON.parse(t),n=new $("","",null);for(const s in o)switch(s){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"hasFileIcons":case"hidesExplorerArrows":case"hasFolderIcons":case"watch":n[s]=o[s];break;case"location":break;case"extensionData":n.extensionData=G.fromJSONObject(o.extensionData);break}return n}catch{return}}toStorage(e){const t=JSON.stringify({id:this.id,label:this.label,description:this.description,settingsId:this.settingsId,styleSheetContent:this.styleSheetContent,hasFileIcons:this.hasFileIcons,hasFolderIcons:this.hasFolderIcons,hidesExplorerArrows:this.hidesExplorerArrows,extensionData:G.toJSONObject(this.extensionData),watch:this.watch});e.store($.STORAGE_KEY,t,ge.PROFILE,ut.MACHINE)}};$.STORAGE_KEY="iconThemeData",$._noIconTheme=null;let X=$;class Xo{constructor(e,t){this.fileService=e,this.languageService=t}load(e){return e.location?this.loadIconThemeDocument(e.location).then(t=>{const o=this.processIconThemeDocument(e.id,e.location,t);return e.styleSheetContent=o.content,e.hasFileIcons=o.hasFileIcons,e.hasFolderIcons=o.hasFolderIcons,e.hidesExplorerArrows=o.hidesExplorerArrows,e.isLoaded=!0,e.styleSheetContent}):Promise.resolve(e.styleSheetContent)}loadIconThemeDocument(e){return this.fileService.readExtensionResource(e).then(t=>{const o=[],n=mt(t,o);return o.length>0?Promise.reject(new Error(r(12891,"Problems parsing file icons file: {0}",o.map(s=>gt(s.error)).join(", ")))):pt(n)!=="object"?Promise.reject(new Error(r(12892,"Invalid format for file icons theme file: Object expected."))):Promise.resolve(n)})}processIconThemeDocument(e,t,o){const n={content:"",hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!!o.hidesExplorerArrows};let s=!1;if(!o.iconDefinitions)return n;const a={},l={},c=Ge(t);function h(T){return ne(c,T)}function d(T,R){function S(E,A){if(A){let U=a[A];U||(U=a[A]=new ee),U.push(E)}}if(T){let E=y`.show-file-icons`;R&&(E=y`${R} ${E}`);const A=y`.monaco-tl-twistie.collapsible:not(.collapsed) + .monaco-tl-contents`;T.folder&&(S(y`${E} .folder-icon::before`,T.folder),n.hasFolderIcons=!0),T.folderExpanded&&(S(y`${E} ${A} .folder-icon::before`,T.folderExpanded),n.hasFolderIcons=!0);const U=T.rootFolder||T.folder,F=T.rootFolderExpanded||T.folderExpanded;U&&(S(y`${E} .rootfolder-icon::before`,U),n.hasFolderIcons=!0),F&&(S(y`${E} ${A} .rootfolder-icon::before`,F),n.hasFolderIcons=!0),T.file&&(S(y`${E} .file-icon::before`,T.file),n.hasFileIcons=!0);const ye=T.folderNames;if(ye)for(const x in ye){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-folder-icon`),S(y`${E} ${_.join("")}.folder-icon::before`,ye[x]),n.hasFolderIcons=!0}const de=T.folderNamesExpanded;if(de)for(const x in de){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-folder-icon`),S(y`${E} ${A} ${_.join("")}.folder-icon::before`,de[x]),n.hasFolderIcons=!0}const Ee=T.rootFolderNames;if(Ee)for(const x in Ee){const _=x.toLowerCase();S(y`${E} .${W(_)}-root-name-folder-icon.rootfolder-icon::before`,Ee[x]),n.hasFolderIcons=!0}const be=T.rootFolderNamesExpanded;if(be)for(const x in be){const _=x.toLowerCase();S(y`${E} ${A} .${W(_)}-root-name-folder-icon.rootfolder-icon::before`,be[x]),n.hasFolderIcons=!0}const J=T.languageIds;if(J){!J.jsonc&&J.json&&(J.jsonc=J.json);for(const x in J)S(y`${E} .${W(x)}-lang-file-icon.file-icon::before`,J[x]),n.hasFileIcons=!0,s=!0,l[x]=!0}const ke=T.fileExtensions;if(ke)for(const x in ke){const _=new ee,Q=He(x.toLowerCase(),_).split(".");if(Q.length){for(let L=0;L<Q.length;L++)_.push(y`.${W(Q.slice(L).join("."))}-ext-file-icon`);_.push(y`.ext-file-icon`)}S(y`${E} ${_.join("")}.file-icon::before`,ke[x]),n.hasFileIcons=!0,s=!0}const Re=T.fileNames;if(Re)for(const x in Re){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-file-icon`),_.push(y`.name-file-icon`);const Q=Y.split(".");if(Q.length){for(let L=1;L<Q.length;L++)_.push(y`.${W(Q.slice(L).join("."))}-ext-file-icon`);_.push(y`.ext-file-icon`)}S(y`${E} ${_.join("")}.file-icon::before`,Re[x]),n.hasFileIcons=!0,s=!0}}}if(d(o),d(o.light,y`.vs`),d(o.highContrast,y`.hc-black`),d(o.highContrast,y`.hc-light`),!n.hasFileIcons&&!n.hasFolderIcons)return n;const f=o.showLanguageModeIcons===!0||s&&o.showLanguageModeIcons!==!1,u=new ee,m=o.fonts,I=new Map;if(Array.isArray(m)){const T=this.tryNormalizeFontSize(m[0].size)||"150%";m.forEach(R=>{const S=new ee;S.push(...R.src.map(A=>y`${Pe(h(A.path))} format(${ue(A.format)})`)),u.push(y`@font-face { src: ${S.join(", ")}; font-family: ${ue(R.id)}; font-weight: ${Dt(R.weight)}; font-style: ${Dt(R.style)}; font-display: block; }`);const E=this.tryNormalizeFontSize(R.size);E!==void 0&&E!==T&&I.set(R.id,E)}),u.push(y`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: ${ue(m[0].id)}; font-size: ${At(T)}; }`)}const p=ue("\\2001");for(const T in a){const R=a[T],S=o.iconDefinitions[T];if(S){if(S.iconPath)u.push(y`${R.join(", ")} { content: ${p}; background-image: ${Pe(h(S.iconPath))}; }`);else if(S.fontCharacter||S.fontColor){const E=new ee;S.fontColor&&S.fontColor.match(sn)&&E.push(y`color: ${Gn(S.fontColor)};`),S.fontCharacter&&E.push(y`content: ${ue(S.fontCharacter)};`);const A=S.fontSize??(S.fontId?I.get(S.fontId):void 0);A&&A.match(rt)&&E.push(y`font-size: ${At(A)};`),S.fontId&&E.push(y`font-family: ${ue(S.fontId)};`),f&&E.push(y`background-image: unset;`),u.push(y`${R.join(", ")} { ${E.join(" ")} }`)}}}if(f){for(const T of this.languageService.getRegisteredLanguageIds())if(!l[T]){const R=this.languageService.getIcon(T);if(R){const S=y`.show-file-icons .${W(T)}-lang-file-icon.file-icon::before`;u.push(y`${S} { content: ${p}; background-image: ${Pe(R.dark)}; }`),u.push(y`.vs ${S} { content: ${p}; background-image: ${Pe(R.light)}; }`)}}}return n.content=u.join(`
|
|
1
|
+
import{aq as O,ar as _e,N as z,as as nt,at as ot,au as wn,av as xn,aw as vn,ax as Dn,ay as An,az as On,aA as Mn,aB as Pn,aC as Ln,aD as Hn,aE as Fn,aF as Nn,aG as $n,aH as oe,J as Ne,aI as it,aJ as ge,aK as ut,aL as k,aM as H,aN as Bn,aO as ft,ah as j,aP as on,aQ as jn,aR as mt,q as r,aS as gt,aT as pt,x as ne,aU as Ge,aV as Tt,aW as st,aX as Ue,aY as rt,aZ as sn,a_ as St,a$ as Ct,b0 as y,b1 as ee,b2 as Pe,b3 as ue,b4 as Dt,b5 as At,b6 as Gn,b7 as Un,b8 as Kn,b9 as It,E as we,K as Ot,p as yt,ba as zn,ak as rn,D as an,bb as Wn,bc as se,bd as K,be as qn,G as cn,bf as Vn,bg as Mt,bh as at,bi as Jn,bj as Yn,bk as Qn,bl as Ye,bm as Pt,z as Ke,u as ln,bn as Xn,bo as Zn,bp as eo,bq as Lt,d as Et,br as to,bs as no,bt as oo,bu as bt,bv as io,f as kt,g as w,bw as so,bx as ro,h as hn,m as ao,by as co,bz as lo,I as Rt,bA as ho,O as dn,bB as uo,bC as fo,i as mo,bD as go,bE as ct,bF as _t,bG as po,bH as un,Q as To,bI as wt,bJ as So,W as Ae,bK as pe,bL as Te,bM as Co,bN as Io,bO as Se,aj as Ce,bP as Ht,$ as Ft,bQ as fn,bR as Nt,bS as $t,bT as yo,bU as Eo,bV as Bt,bW as bo,j as ko,bX as Ro,bY as xt,bZ as Oe,b_ as _o,a3 as wo,b$ as xo,P as vo,al as Do,c0 as Ao}from"./index-By7ErQ-m.js";import{g as Oo,T as ze,p as jt,S as Gt,a as mn}from"./tokenClassificationRegistry-YXExWoc1.js";import{I as le}from"./workbenchThemeService.service-CipP-eMQ.js";const Mo="[",Po="]",Le="*",Lo=/\[(.+?)\]/g;var C;(function(i){i.COLOR_THEME="workbench.colorTheme",i.FILE_ICON_THEME="workbench.iconTheme",i.PRODUCT_ICON_THEME="workbench.productIconTheme",i.COLOR_CUSTOMIZATIONS="workbench.colorCustomizations",i.TOKEN_COLOR_CUSTOMIZATIONS="editor.tokenColorCustomizations",i.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS="editor.semanticTokenColorCustomizations",i.PREFERRED_DARK_THEME="workbench.preferredDarkColorTheme",i.PREFERRED_LIGHT_THEME="workbench.preferredLightColorTheme",i.PREFERRED_HC_DARK_THEME="workbench.preferredHighContrastColorTheme",i.PREFERRED_HC_LIGHT_THEME="workbench.preferredHighContrastLightColorTheme",i.DETECT_COLOR_SCHEME="window.autoDetectColorScheme",i.DETECT_HC="window.autoDetectHighContrast",i.SYSTEM_COLOR_THEME="window.systemColorTheme"})(C||(C={}));var P;(function(i){i.COLOR_THEME_DARK="Default Dark Modern",i.COLOR_THEME_LIGHT="Default Light Modern",i.COLOR_THEME_HC_DARK="Default High Contrast",i.COLOR_THEME_HC_LIGHT="Default High Contrast Light",i.COLOR_THEME_DARK_OLD="Default Dark+",i.COLOR_THEME_LIGHT_OLD="Default Light+",i.FILE_ICON_THEME="vs-seti",i.PRODUCT_ICON_THEME="Default"})(P||(P={}));const Ho={"activityBar.activeBorder":"#0078d4","activityBar.background":"#181818","activityBar.border":"#2b2b2b","activityBar.foreground":"#d7d7d7","activityBar.inactiveForeground":"#868686","editorGroup.border":"#ffffff17","editorGroupHeader.tabsBackground":"#181818","editorGroupHeader.tabsBorder":"#2b2b2b","statusBar.background":"#181818","statusBar.border":"#2b2b2b","statusBar.foreground":"#cccccc","statusBar.noFolderBackground":"#1f1f1f","tab.activeBackground":"#1f1f1f","tab.activeBorder":"#1f1f1f","tab.activeBorderTop":"#0078d4","tab.activeForeground":"#ffffff","tab.border":"#2b2b2b","textLink.foreground":"#4daafc","titleBar.activeBackground":"#181818","titleBar.activeForeground":"#cccccc","titleBar.border":"#2b2b2b","titleBar.inactiveBackground":"#1f1f1f","titleBar.inactiveForeground":"#9d9d9d","welcomePage.tileBackground":"#2b2b2b"},Fo={"activityBar.activeBorder":"#005FB8","activityBar.background":"#f8f8f8","activityBar.border":"#e5e5e5","activityBar.foreground":"#1f1f1f","activityBar.inactiveForeground":"#616161","editorGroup.border":"#e5e5e5","editorGroupHeader.tabsBackground":"#f8f8f8","editorGroupHeader.tabsBorder":"#e5e5e5","statusBar.background":"#f8f8f8","statusBar.border":"#e5e5e5","statusBar.foreground":"#3b3b3b","statusBar.noFolderBackground":"#f8f8f8","tab.activeBackground":"#ffffff","tab.activeBorder":"#f8f8f8","tab.activeBorderTop":"#005fb8","tab.activeForeground":"#3b3b3b","tab.border":"#e5e5e5","textLink.foreground":"#005fb8","titleBar.activeBackground":"#f8f8f8","titleBar.activeForeground":"#1e1e1e","titleBar.border":"#E5E5E5","titleBar.inactiveBackground":"#f8f8f8","titleBar.inactiveForeground":"#8b949e","welcomePage.tileBackground":"#f3f3f3"};var G;(function(i){function e(n){return n&&{_extensionId:n.extensionId,_extensionIsBuiltin:n.extensionIsBuiltin,_extensionName:n.extensionName,_extensionPublisher:n.extensionPublisher}}i.toJSONObject=e;function t(n){if(n&&O(n._extensionId)&&_e(n._extensionIsBuiltin)&&O(n._extensionName)&&O(n._extensionPublisher))return{extensionId:n._extensionId,extensionIsBuiltin:n._extensionIsBuiltin,extensionName:n._extensionName,extensionPublisher:n._extensionPublisher}}i.fromJSONObject=t;function o(n,s,a=!1){return{extensionPublisher:n,extensionId:`${n}.${s}`,extensionName:s,extensionIsBuiltin:a}}i.fromName=o})(G||(G={}));const lt={};function M(i,e){let t=lt[i];t||(lt[i]=t=[]),t.push(e)}function gn(i,e){for(const t of i)if(e.textMateRules.push(t),!t.scope){const o=t.settings;if(!o)t.settings={};else for(const n in o){const s=n,a=lt[s];if(a){const l=o[s];if(typeof l=="string"){const c=z.fromHex(l);for(const h of a)e.colors[h]=c}}s!=="foreground"&&s!=="background"&&s!=="fontStyle"&&delete o[s]}}}M("background",nt);M("foreground",ot);M("selection",wn);M("inactiveSelection",xn);M("selectionHighlightColor",vn);M("findMatchHighlight",Dn);M("currentFindMatchHighlight",An);M("hoverHighlight",On);M("wordHighlight","editor.wordHighlightBackground");M("wordHighlightStrong","editor.wordHighlightStrongBackground");M("findRangeHighlight",Mn);M("findMatchHighlight","peekViewResult.matchHighlightBackground");M("referenceHighlight","peekViewEditor.matchHighlightBackground");M("lineHighlight",Pn);M("rangeHighlight",Ln);M("caret",Hn);M("invisibles",Fn);M("guide",Nn);M("activeGuide",$n);const No=["ansiBlack","ansiRed","ansiGreen","ansiYellow","ansiBlue","ansiMagenta","ansiCyan","ansiWhite","ansiBrightBlack","ansiBrightRed","ansiBrightGreen","ansiBrightYellow","ansiBrightBlue","ansiBrightMagenta","ansiBrightCyan","ansiBrightWhite"];for(const i of No)M(i,"terminal."+i);var N;(function(i){i[i.BOM=65279]="BOM",i[i.SPACE=32]="SPACE",i[i.TAB=9]="TAB",i[i.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",i[i.LINE_FEED=10]="LINE_FEED",i[i.SLASH=47]="SLASH",i[i.LESS_THAN=60]="LESS_THAN",i[i.QUESTION_MARK=63]="QUESTION_MARK",i[i.EXCLAMATION_MARK=33]="EXCLAMATION_MARK"})(N||(N={}));var b;(function(i){i[i.ROOT_STATE=0]="ROOT_STATE",i[i.DICT_STATE=1]="DICT_STATE",i[i.ARR_STATE=2]="ARR_STATE"})(b||(b={}));function $o(i){return Bo(i)}function Bo(i,e,t){const o=i.length;let n=0;o>0&&i.charCodeAt(0)===N.BOM&&(n=1);function s(g){n=n+g}function a(g){n=g}function l(){for(;n<o;){const g=i.charCodeAt(n);if(g!==N.SPACE&&g!==N.TAB&&g!==N.CARRIAGE_RETURN&&g!==N.LINE_FEED)break;s(1)}}function c(g){return i.substr(n,g.length)===g?(s(g.length),!0):!1}function h(g){const v=i.indexOf(g,n);a(v!==-1?v+g.length:o)}function d(g){const v=i.indexOf(g,n);if(v!==-1){const D=i.substring(n,v);return a(v+g.length),D}else{const D=i.substr(n);return a(o),D}}let f=b.ROOT_STATE,u=null;const m=[],I=[];let p=null;function T(g,v){m.push(f),I.push(u),f=g,u=v}function R(){if(m.length===0)return S("illegal state stack");f=m.pop(),u=I.pop()}function S(g){throw new Error("Near offset "+n+": "+g+" ~~~"+i.substr(n,50)+"~~~")}const E={enterDict:function(){if(p===null)return S("missing <key>");const g={};u[p]=g,p=null,T(b.DICT_STATE,g)},enterArray:function(){if(p===null)return S("missing <key>");const g=[];u[p]=g,p=null,T(b.ARR_STATE,g)}},A={enterDict:function(){const g={};u.push(g),T(b.DICT_STATE,g)},enterArray:function(){const g=[];u.push(g),T(b.ARR_STATE,g)}};function U(){f===b.DICT_STATE?E.enterDict():f===b.ARR_STATE?A.enterDict():(u={},T(b.DICT_STATE,u))}function F(){if(f===b.DICT_STATE)R();else return f===b.ARR_STATE,S("unexpected </dict>")}function ye(){f===b.DICT_STATE?E.enterArray():f===b.ARR_STATE?A.enterArray():(u=[],T(b.ARR_STATE,u))}function de(){if(f===b.DICT_STATE)return S("unexpected </array>");if(f===b.ARR_STATE)R();else return S("unexpected </array>")}function Ee(g){if(f===b.DICT_STATE){if(p!==null)return S("too many <key>");p=g}else return f===b.ARR_STATE,S("unexpected <key>")}function be(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function J(g){if(isNaN(g))return S("cannot parse float");if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function ke(g){if(isNaN(g))return S("cannot parse integer");if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function Re(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function x(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function _(g){if(f===b.DICT_STATE){if(p===null)return S("missing <key>");u[p]=g,p=null}else f===b.ARR_STATE?u.push(g):u=g}function Y(g){return g.replace(/&#([0-9]+);/g,function(v,D){return String.fromCodePoint(parseInt(D,10))}).replace(/&#x([0-9a-f]+);/g,function(v,D){return String.fromCodePoint(parseInt(D,16))}).replace(/&|<|>|"|'/g,function(v){switch(v){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return v})}function Q(){let g=d(">"),v=!1;return g.charCodeAt(g.length-1)===N.SLASH&&(v=!0,g=g.substring(0,g.length-1)),{name:g.trim(),isClosed:v}}function L(g){if(g.isClosed)return"";const v=d("</");return h(">"),Y(v)}for(;n<o&&(l(),!(n>=o));){const g=i.charCodeAt(n);if(s(1),g!==N.LESS_THAN)return S("expected <");if(n>=o)return S("unexpected end of input");const v=i.charCodeAt(n);if(v===N.QUESTION_MARK){s(1),h("?>");continue}if(v===N.EXCLAMATION_MARK){if(s(1),c("--")){h("-->");continue}h(">");continue}if(v===N.SLASH){if(s(1),l(),c("plist")){h(">");continue}if(c("dict")){h(">"),F();continue}if(c("array")){h(">"),de();continue}return S("unexpected closed tag")}const D=Q();switch(D.name){case"dict":U(),D.isClosed&&F();continue;case"array":ye(),D.isClosed&&de();continue;case"key":Ee(L(D));continue;case"string":be(L(D));continue;case"real":J(parseFloat(L(D)));continue;case"integer":ke(parseInt(L(D),10));continue;case"date":Re(new Date(L(D)));continue;case"data":x(L(D));continue;case"true":L(D),_(!0);continue;case"false":L(D),_(!1);continue}if(!/^plist/.test(D.name))return S("unexpected opened tag "+D.name)}return u}function Ut(i,e,t){const o=jo(i);let n=o.next();for(;n!==null;){let c=0;if(n.length===2&&n.charAt(1)===":"){switch(n.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${n} in scope selector`)}n=o.next()}const h=a();if(h&&t.push({matcher:h,priority:c}),n!==",")break;n=o.next()}function s(){if(n==="-"){n=o.next();const c=s();return c?h=>c(h)<0?0:-1:null}if(n==="("){n=o.next();const c=l();return n===")"&&(n=o.next()),c}if(Kt(n)){const c=[];do c.push(n),n=o.next();while(Kt(n));return h=>e(c,h)}return null}function a(){let c=s();if(!c)return null;const h=[];for(;c;)h.push(c),c=s();return d=>{let f=h[0](d);for(let u=1;f>=0&&u<h.length;u++)f=Math.min(f,h[u](d));return f}}function l(){let c=a();if(!c)return null;const h=[];for(;c&&(h.push(c),n==="|"||n===",");){do n=o.next();while(n==="|"||n===",");c=a()}return d=>{let f=h[0](d);for(let u=1;u<h.length;u++)f=Math.max(f,h[u](d));return f}}}function Kt(i){return!!i&&!!i.match(/[\w\.:]+/)}function jo(i){const e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g;let t=e.exec(i);return{next:()=>{if(!t)return null;const o=t[0];return t=e.exec(i),o}}}const Go=oe.as(on.ColorContribution),$e=Oo(),zt={comments:["comment","punctuation.definition.comment"],strings:["string","meta.embedded.assembly"],keywords:["keyword - keyword.operator","keyword.control","storage","storage.type"],numbers:["constant.numeric"],types:["entity.name.type","entity.name.class","support.type","support.class"],functions:["entity.name.function","support.function"],variables:["variable","entity.name.variable"]},q=class q{constructor(e,t,o){this.themeTokenColors=[],this.customTokenColors=[],this.colorMap={},this.customColorMap={},this.semanticTokenRules=[],this.customSemanticTokenRules=[],this.textMateThemingRules=void 0,this.tokenColorIndex=void 0,this.id=e,this.label=t,this.settingsId=o,this.isLoaded=!1}get semanticHighlighting(){return this.customSemanticHighlighting!==void 0?this.customSemanticHighlighting:this.customSemanticHighlightingDeprecated!==void 0?this.customSemanticHighlightingDeprecated:!!this.themeSemanticHighlighting}get tokenColors(){if(!this.textMateThemingRules){let s=function(a){a.scope&&a.settings&&(a.scope==="token.info-token"&&(n=!0),e.push({scope:a.scope,settings:{foreground:fe(a.settings.foreground),background:fe(a.settings.background),fontStyle:a.settings.fontStyle}}))};const e=[],t=this.getColor(ot)||this.getDefault(ot),o=this.getColor(nt)||this.getDefault(nt);e.push({settings:{foreground:fe(t),background:fe(o)}});let n=!1;this.themeTokenColors.forEach(s),this.customTokenColors.forEach(s),n||Ko[this.type].forEach(s),this.textMateThemingRules=e}return this.textMateThemingRules}getColor(e,t){const o=this.customColorMap[e];if(o instanceof z)return o;if(o===void 0){const n=this.colorMap[e];if(n!==void 0)return n}if(t!==!1)return this.getDefault(e)}getTokenStyle(e,t,o,n=!0,s={}){const a={foreground:void 0,bold:void 0,underline:void 0,strikethrough:void 0,italic:void 0},l={foreground:-1,bold:-1,underline:-1,strikethrough:-1,italic:-1};function c(f,u,m){u.foreground&&l.foreground<=f&&(l.foreground=f,a.foreground=u.foreground,s.foreground=m);for(const I of["bold","underline","strikethrough","italic"]){const p=I,T=u[p];T!==void 0&&l[p]<=f&&(l[p]=f,a[p]=T,s[p]=m)}}function h(f){const u=f.selector.match(e,t,o);u>=0&&c(u,f.style,f)}this.semanticTokenRules.forEach(h),this.customSemanticTokenRules.forEach(h);let d=!1;for(const f in l){const u=f;l[u]===-1?d=!0:l[u]=Number.MAX_VALUE}if(d)for(const f of $e.getTokenStylingDefaultRules()){const u=f.selector.match(e,t,o);if(u>=0){let m;if(f.defaults.scopesToProbe&&(m=this.resolveScopes(f.defaults.scopesToProbe),m&&c(u,m,f.defaults.scopesToProbe)),!m&&n!==!1){const I=f.defaults[this.type];m=this.resolveTokenStyleValue(I),m&&c(u,m,I)}}}return ze.fromData(a)}resolveTokenStyleValue(e){if(e!==void 0){if(typeof e=="string"){const{type:t,modifiers:o,language:n}=jt(e,"");return this.getTokenStyle(t,o,n)}else if(typeof e=="object")return e}}getTokenColorIndex(){if(!this.tokenColorIndex){const e=new qo;this.tokenColors.forEach(t=>{e.add(t.settings.foreground),e.add(t.settings.background)}),this.semanticTokenRules.forEach(t=>e.add(t.style.foreground)),$e.getTokenStylingDefaultRules().forEach(t=>{const o=t.defaults[this.type];o&&typeof o=="object"&&e.add(o.foreground)}),this.customSemanticTokenRules.forEach(t=>e.add(t.style.foreground)),this.tokenColorIndex=e}return this.tokenColorIndex}get tokenColorMap(){return this.getTokenColorIndex().asArray()}getTokenStyleMetadata(e,t,o,n=!0,s={}){const{type:a,language:l}=jt(e,o),c=this.getTokenStyle(a,t,l,n,s);if(c)return{foreground:this.getTokenColorIndex().get(c.foreground),bold:c.bold,underline:c.underline,strikethrough:c.strikethrough,italic:c.italic}}getTokenStylingRuleScope(e){if(this.customSemanticTokenRules.indexOf(e)!==-1)return"setting";if(this.semanticTokenRules.indexOf(e)!==-1)return"theme"}getDefault(e){return Go.resolveDefaultColor(e,this)}resolveScopes(e,t){this.themeTokenScopeMatchers||(this.themeTokenScopeMatchers=this.themeTokenColors.map(Jt)),this.customTokenScopeMatchers||(this.customTokenScopeMatchers=this.customTokenColors.map(Jt));for(const o of e){let d=function(f,u){for(let m=0;m<f.length;m++){const I=f[m](o);if(I>=0){const p=u[m],T=u[m].settings;I>=a&&T.foreground&&(n=T.foreground,a=I,h=p),I>=l&&O(T.fontStyle)&&(s=T.fontStyle,l=I,c=p)}}},n,s,a=-1,l=-1,c,h;if(d(this.themeTokenScopeMatchers,this.themeTokenColors),d(this.customTokenScopeMatchers,this.customTokenColors),n!==void 0||s!==void 0)return t&&(t.foreground=h,t.bold=t.italic=t.underline=t.strikethrough=c,t.scope=o),ze.fromSettings(n,s)}}defines(e){const t=this.customColorMap[e];return t instanceof z?!0:t===void 0&&this.colorMap.hasOwnProperty(e)}setCustomizations(e){this.setCustomColors(e.colorCustomizations),this.setCustomTokenColors(e.tokenColorCustomizations),this.setCustomSemanticTokenColors(e.semanticTokenColorCustomizations)}setCustomColors(e){this.customColorMap={},this.overwriteCustomColors(e);const t=this.getThemeSpecificColors(e);Ne(t)&&this.overwriteCustomColors(t),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}overwriteCustomColors(e){for(const t in e){const o=e[t];o===it?this.customColorMap[t]=it:typeof o=="string"&&(this.customColorMap[t]=z.fromHex(o))}}setCustomTokenColors(e){this.customTokenColors=[],this.customSemanticHighlightingDeprecated=void 0,this.addCustomTokenColors(e);const t=this.getThemeSpecificColors(e);Ne(t)&&this.addCustomTokenColors(t),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}setCustomSemanticTokenColors(e){if(this.customSemanticTokenRules=[],this.customSemanticHighlighting=void 0,e){this.customSemanticHighlighting=e.enabled,e.rules&&this.readSemanticTokenRules(e.rules);const t=this.getThemeSpecificColors(e);Ne(t)&&(t.enabled!==void 0&&(this.customSemanticHighlighting=t.enabled),t.rules&&this.readSemanticTokenRules(t.rules))}this.tokenColorIndex=void 0,this.textMateThemingRules=void 0}isThemeScope(e){return e.charAt(0)===Mo&&e.charAt(e.length-1)===Po}isThemeScopeMatch(e){const t=e.charAt(0),o=e.charAt(e.length-1),n=e.slice(0,-1),s=e.slice(1,-1),a=e.slice(1);return e===this.settingsId||this.settingsId.includes(s)&&t===Le&&o===Le||this.settingsId.startsWith(n)&&o===Le||this.settingsId.endsWith(a)&&t===Le}getThemeSpecificColors(e){let t;for(const o in e){const n=e[o];if(this.isThemeScope(o)&&n instanceof Object&&!Array.isArray(n)){const s=o.match(Lo)||[];for(const a of s){const l=a.substring(1,a.length-1);if(this.isThemeScopeMatch(l)){t||(t={});const c=n;for(const h in c){const d=t[h],f=c[h];Array.isArray(d)&&Array.isArray(f)?t[h]=d.concat(f):f&&(t[h]=f)}}}}}return t}readSemanticTokenRules(e){for(const t in e)if(!this.isThemeScope(t))try{const o=Tn(t,e[t]);o&&this.customSemanticTokenRules.push(o)}catch{}}addCustomTokenColors(e){for(const t in zt){const o=t,n=e[o];if(n){const s=typeof n=="string"?{foreground:n}:n,a=zt[o];for(const l of a)this.customTokenColors.push({scope:l,settings:s})}}if(Array.isArray(e.textMateRules))for(const t of e.textMateRules)t.scope&&t.settings&&this.customTokenColors.push(t);e.semanticHighlighting!==void 0&&(this.customSemanticHighlightingDeprecated=e.semanticHighlighting)}ensureLoaded(e){return this.isLoaded?Promise.resolve(void 0):this.load(e)}reload(e){return this.load(e)}load(e){if(!this.location)return Promise.resolve(void 0);this.themeTokenColors=[],this.clearCaches();const t={colors:{},textMateRules:[],semanticTokenRules:[],semanticHighlighting:!1};return pn(e,this.location,t).then(o=>{this.isLoaded=!0,this.semanticTokenRules=t.semanticTokenRules,this.colorMap=t.colors,this.themeTokenColors=t.textMateRules,this.themeSemanticHighlighting=t.semanticHighlighting})}clearCaches(){this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.themeTokenScopeMatchers=void 0,this.customTokenScopeMatchers=void 0}toStorage(e){const t={};for(const n in this.colorMap)t[n]=z.Format.CSS.formatHexA(this.colorMap[n],!0);const o=JSON.stringify({id:this.id,label:this.label,settingsId:this.settingsId,themeTokenColors:this.themeTokenColors.map(n=>({settings:n.settings,scope:n.scope})),semanticTokenRules:this.semanticTokenRules.map(Gt.toJSONObject),extensionData:G.toJSONObject(this.extensionData),themeSemanticHighlighting:this.themeSemanticHighlighting,colorMap:t,watch:this.watch});e.store(q.STORAGE_KEY,o,ge.PROFILE,ut.USER)}get themeTypeSelector(){return this.classNames[0]}get classNames(){return this.id.split(" ")}get type(){switch(this.themeTypeSelector){case H.VS:return k.LIGHT;case H.HC_BLACK:return k.HIGH_CONTRAST_DARK;case H.HC_LIGHT:return k.HIGH_CONTRAST_LIGHT;default:return k.DARK}}static createUnloadedThemeForThemeType(e,t){return q.createUnloadedTheme(Bn(e),t)}static createUnloadedTheme(e,t){const o=new q(e,"","__"+e);if(o.isLoaded=!1,o.themeTokenColors=[],o.watch=!1,t)for(const n in t)o.colorMap[n]=z.fromHex(t[n]);return o}static createLoadedEmptyTheme(e,t){const o=new q(e,"",t);return o.isLoaded=!0,o.themeTokenColors=[],o.watch=!1,o}static fromStorageData(e){const t=e.get(q.STORAGE_KEY,ge.PROFILE);if(t)try{const o=JSON.parse(t),n=new q("","","");for(const s in o)switch(s){case"colorMap":{const a=o[s];for(const l in a)n.colorMap[l]=z.fromHex(a[l]);break}case"themeTokenColors":case"id":case"label":case"settingsId":case"watch":case"themeSemanticHighlighting":n[s]=o[s];break;case"semanticTokenRules":{const a=o[s];if(Array.isArray(a))for(const l of a){const c=Gt.fromJSONObject($e,l);c&&n.semanticTokenRules.push(c)}break}case"location":break;case"extensionData":n.extensionData=G.fromJSONObject(o.extensionData);break}return!n.id||!n.settingsId?void 0:n}catch{return}}static fromExtensionTheme(e,t,o){const n=e.uiTheme||"vs-dark",s=Uo(o.extensionId,e.path),a=`${n} ${s}`,l=e.label||ft(e.path),c=e.id||l,h=new q(a,l,c);return h.description=e.description,h.watch=e._watch===!0,h.location=t,h.extensionData=o,h.isLoaded=!1,h}};q.STORAGE_KEY="colorThemeData";let te=q;function Uo(i,e){e.startsWith("./")&&(e=e.substr(2));let t=`${i}-${e}`;return t=t.replace(/[^_a-zA-Z0-9-]/g,"-"),t.charAt(0).match(/[0-9-]/)&&(t="_"+t),t}async function pn(i,e,t){if(jn(e)===".json"){const o=await i.readExtensionResource(e),n=[],s=mt(o,n);if(n.length>0)return Promise.reject(new Error(r(12928,"Problems parsing JSON theme file: {0}",n.map(h=>gt(h.error)).join(", "))));if(pt(s)!=="object")return Promise.reject(new Error(r(12929,"Invalid format for JSON theme file: Object expected.")));if(s.include&&await pn(i,ne(Ge(e),s.include),t),Array.isArray(s.settings))return gn(s.settings,t),null;t.semanticHighlighting=t.semanticHighlighting||s.semanticHighlighting;const a=s.colors;if(a){if(typeof a!="object")return Promise.reject(new Error(r(12930,"Problem parsing color theme file: {0}. Property 'colors' is not of type 'object'.",e.toString())));for(const h in a){const d=a[h];d===it?delete t.colors[h]:typeof d=="string"&&(t.colors[h]=z.fromHex(a[h]))}}const l=s.tokenColors;if(l)if(Array.isArray(l))t.textMateRules.push(...l);else if(typeof l=="string")await Wt(i,ne(Ge(e),l),t);else return Promise.reject(new Error(r(12931,"Problem parsing color theme file: {0}. Property 'tokenColors' should be either an array specifying colors or a path to a TextMate theme file",e.toString())));const c=s.semanticTokenColors;if(c&&typeof c=="object")for(const h in c)try{const d=Tn(h,c[h]);d&&t.semanticTokenRules.push(d)}catch{return Promise.reject(new Error(r(12932,"Problem parsing color theme file: {0}. Property 'semanticTokenColors' contains a invalid selector",e.toString())))}}else return Wt(i,e,t)}function Wt(i,e,t){return i.readExtensionResource(e).then(o=>{try{const s=$o(o).settings;return Array.isArray(s)?(gn(s,t),Promise.resolve(null)):Promise.reject(new Error(r(12933,"Problem parsing tmTheme file: {0}. 'settings' is not array.")))}catch(n){return Promise.reject(new Error(r(12934,"Problems parsing tmTheme file: {0}",n.message)))}},o=>Promise.reject(new Error(r(12935,"Problems loading tmTheme file {0}: {1}",e.toString(),o.message))))}const Ko={light:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],dark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#f44747"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}],hcLight:[{scope:"token.info-token",settings:{foreground:"#316bcd"}},{scope:"token.warn-token",settings:{foreground:"#cd9731"}},{scope:"token.error-token",settings:{foreground:"#cd3131"}},{scope:"token.debug-token",settings:{foreground:"#800080"}}],hcDark:[{scope:"token.info-token",settings:{foreground:"#6796e6"}},{scope:"token.warn-token",settings:{foreground:"#008000"}},{scope:"token.error-token",settings:{foreground:"#FF0000"}},{scope:"token.debug-token",settings:{foreground:"#b267e6"}}]},qt=i=>-1;function Vt(i,e){if(e.length<i.length)return-1;let t;return i.every(n=>{for(let s=e.length-1;s>=0;s--)if(zo(e[s],n))return t=(s+1)*65536+n.length,!0;return!1})&&t!==void 0?t:-1}function zo(i,e){if(!i)return!1;if(i===e)return!0;const t=e.length;return i.length>t&&i.substr(0,t)===e&&i[t]==="."}function Jt(i){const e=i.scope;if(!e||!i.settings)return qt;const t=[];if(Array.isArray(e))for(const o of e)Ut(o,Vt,t);else Ut(e,Vt,t);return t.length===0?qt:o=>{let n=t[0].matcher(o);for(let s=1;s<t.length;s++)n=Math.max(n,t[s].matcher(o));return n}}function Tn(i,e){const t=$e.parseTokenSelector(i);let o;if(typeof e=="string"?o=ze.fromSettings(e,void 0):Wo(e)&&(o=ze.fromSettings(e.foreground,e.fontStyle,e.bold,e.underline,e.strikethrough,e.italic)),o)return{selector:t,style:o}}function Wo(i){return i&&(O(i.foreground)||O(i.fontStyle)||_e(i.italic)||_e(i.underline)||_e(i.strikethrough)||_e(i.bold))}class qo{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null)}add(e){if(e=fe(e),e===void 0)return 0;let t=this._color2id[e];return t||(t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t)}get(e){if(e=fe(e),e===void 0)return 0;const t=this._color2id[e];return t||(console.log(`Color ${e} not in index.`),0)}asArray(){return this._id2color.slice(0)}}function fe(i){if(!i)return;typeof i!="string"&&(i=z.Format.CSS.formatHexA(i,!0));const e=i.length;if(i.charCodeAt(0)!==j.Hash||e!==4&&e!==5&&e!==7&&e!==9)return;const t=[j.Hash];for(let o=1;o<e;o++){const n=Vo(i.charCodeAt(o));if(!n)return;t.push(n),(e===4||e===5)&&t.push(n)}return t.length===9&&t[7]===j.F&&t[8]===j.F&&(t.length=7),String.fromCharCode(...t)}function Vo(i){return i>=j.Digit0&&i<=j.Digit9||i>=j.A&&i<=j.F?i:i>=j.a&&i<=j.f?i-j.a+j.A:0}const Jo="vscode://schemas/icon-theme",Yo={type:"object",allowComments:!0,allowTrailingCommas:!0,definitions:{folderExpanded:{type:"string",description:r(12949,"The folder icon for expanded folders. The expanded folder icon is optional. If not set, the icon defined for folder will be shown.")},folder:{type:"string",description:r(12950,"The folder icon for collapsed folders, and if folderExpanded is not set, also for expanded folders.")},file:{type:"string",description:r(12951,"The default file icon, shown for all files that don't match any extension, filename or language id.")},rootFolder:{type:"string",description:r(12952,"The folder icon for collapsed root folders, and if rootFolderExpanded is not set, also for expanded root folders.")},rootFolderExpanded:{type:"string",description:r(12953,"The folder icon for expanded root folders. The expanded root folder icon is optional. If not set, the icon defined for root folder will be shown.")},rootFolderNames:{type:"object",description:r(12954,"Associates root folder names to icons. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12955,"The ID of the icon definition for the association.")}},rootFolderNamesExpanded:{type:"object",description:r(12956,"Associates root folder names to icons for expanded root folders. The object key is the root folder name. No patterns or wildcards are allowed. Root folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12957,"The ID of the icon definition for the association.")}},folderNames:{type:"object",description:r(12958,"Associates folder names to icons. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12955,"The ID of the icon definition for the association.")}},folderNamesExpanded:{type:"object",description:r(12959,"Associates folder names to icons for expanded folders. The object key is the folder name, not including any path segments. No patterns or wildcards are allowed. Folder name matching is case insensitive."),additionalProperties:{type:"string",description:r(12960,"The ID of the icon definition for the association.")}},fileExtensions:{type:"object",description:r(12961,"Associates file extensions to icons. The object key is the file extension name. The extension name is the last segment of a file name after the last dot (not including the dot). Extensions are compared case insensitive."),additionalProperties:{type:"string",description:r(12962,"The ID of the icon definition for the association.")}},fileNames:{type:"object",description:r(12963,"Associates file names to icons. The object key is the full file name, but not including any path segments. File name can include dots and a possible file extension. No patterns or wildcards are allowed. File name matching is case insensitive."),additionalProperties:{type:"string",description:r(12964,"The ID of the icon definition for the association.")}},languageIds:{type:"object",description:r(12965,"Associates languages to icons. The object key is the language id as defined in the language contribution point."),additionalProperties:{type:"string",description:r(12966,"The ID of the icon definition for the association.")}},associations:{type:"object",properties:{folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},rootFolder:{$ref:"#/definitions/rootFolder"},rootFolderExpanded:{$ref:"#/definitions/rootFolderExpanded"},rootFolderNames:{$ref:"#/definitions/rootFolderNames"},rootFolderNamesExpanded:{$ref:"#/definitions/rootFolderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"}}}},properties:{fonts:{type:"array",description:r(12967,"Fonts that are used in the icon definitions."),items:{type:"object",properties:{id:{type:"string",description:r(12968,"The ID of the font."),pattern:Ue.source,patternErrorMessage:st},src:{type:"array",description:r(12969,"The location of the font."),items:{type:"object",properties:{path:{type:"string",description:r(12970,"The font path, relative to the current file icon theme file.")},format:{type:"string",description:r(12971,"The format of the font."),enum:["woff","woff2","truetype","opentype","embedded-opentype","svg"]}},required:["path","format"]}},weight:{type:"string",description:r(12972,"The weight of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight for valid values."),pattern:Ct.source},style:{type:"string",description:r(12973,"The style of the font. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-style for valid values."),pattern:St.source},size:{type:"string",description:r(12974,"The default size of the font. We strongly recommend using a percentage value, for example: 125%."),pattern:rt.source}},required:["id","src"]}},iconDefinitions:{type:"object",description:r(12975,"Description of all icons that can be used when associating files to icons."),additionalProperties:{type:"object",description:r(12976,"An icon definition. The object key is the ID of the definition."),properties:{iconPath:{type:"string",description:r(12977,"When using a SVG or PNG: The path to the image. The path is relative to the icon set file.")},fontCharacter:{type:"string",description:r(12978,"When using a glyph font: The character in the font to use.")},fontColor:{type:"string",format:"color-hex",description:r(12979,"When using a glyph font: The color to use."),pattern:sn.source},fontSize:{type:"string",description:r(12980,"When using a font: The font size in percentage to the text font. If not set, defaults to the size in the font definition."),pattern:rt.source},fontId:{type:"string",description:r(12981,"When using a font: The id of the font. If not set, defaults to the first font definition."),pattern:Ue.source,patternErrorMessage:st}}}},folderExpanded:{$ref:"#/definitions/folderExpanded"},folder:{$ref:"#/definitions/folder"},file:{$ref:"#/definitions/file"},folderNames:{$ref:"#/definitions/folderNames"},folderNamesExpanded:{$ref:"#/definitions/folderNamesExpanded"},rootFolder:{$ref:"#/definitions/rootFolder"},rootFolderExpanded:{$ref:"#/definitions/rootFolderExpanded"},rootFolderNames:{$ref:"#/definitions/rootFolderNames"},rootFolderNamesExpanded:{$ref:"#/definitions/rootFolderNamesExpanded"},fileExtensions:{$ref:"#/definitions/fileExtensions"},fileNames:{$ref:"#/definitions/fileNames"},languageIds:{$ref:"#/definitions/languageIds"},light:{$ref:"#/definitions/associations",description:r(12982,"Optional associations for file icons in light color themes.")},highContrast:{$ref:"#/definitions/associations",description:r(12983,"Optional associations for file icons in high contrast color themes.")},hidesExplorerArrows:{type:"boolean",description:r(12984,"Configures whether the file explorer's arrows should be hidden when this theme is active.")},showLanguageModeIcons:{type:"boolean",description:r(12985,"Configures whether the default language icons should be used if the theme does not define an icon for a language.")}}};function Qo(){oe.as(Tt.JSONContribution).registerSchema(Jo,Yo)}const $=class ${constructor(e,t,o){this.id=e,this.label=t,this.settingsId=o,this.isLoaded=!1,this.hasFileIcons=!1,this.hasFolderIcons=!1,this.hidesExplorerArrows=!1}ensureLoaded(e){return this.isLoaded?Promise.resolve(this.styleSheetContent):this.load(e)}reload(e){return this.load(e)}load(e){return e.load(this)}static fromExtensionTheme(e,t,o){const n=o.extensionId+"-"+e.id,s=e.label||ft(e.path),a=e.id,l=new $(n,s,a);return l.description=e.description,l.location=t,l.extensionData=o,l.watch=e._watch,l.isLoaded=!1,l}static get noIconTheme(){let e=$._noIconTheme;return e||(e=$._noIconTheme=new $("","",null),e.hasFileIcons=!1,e.hasFolderIcons=!1,e.hidesExplorerArrows=!1,e.isLoaded=!0,e.extensionData=void 0,e.watch=!1),e}static createUnloadedTheme(e){const t=new $(e,"","__"+e);return t.isLoaded=!1,t.hasFileIcons=!1,t.hasFolderIcons=!1,t.hidesExplorerArrows=!1,t.extensionData=void 0,t.watch=!1,t}static fromStorageData(e){const t=e.get($.STORAGE_KEY,ge.PROFILE);if(t)try{const o=JSON.parse(t),n=new $("","",null);for(const s in o)switch(s){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"hasFileIcons":case"hidesExplorerArrows":case"hasFolderIcons":case"watch":n[s]=o[s];break;case"location":break;case"extensionData":n.extensionData=G.fromJSONObject(o.extensionData);break}return n}catch{return}}toStorage(e){const t=JSON.stringify({id:this.id,label:this.label,description:this.description,settingsId:this.settingsId,styleSheetContent:this.styleSheetContent,hasFileIcons:this.hasFileIcons,hasFolderIcons:this.hasFolderIcons,hidesExplorerArrows:this.hidesExplorerArrows,extensionData:G.toJSONObject(this.extensionData),watch:this.watch});e.store($.STORAGE_KEY,t,ge.PROFILE,ut.MACHINE)}};$.STORAGE_KEY="iconThemeData",$._noIconTheme=null;let X=$;class Xo{constructor(e,t){this.fileService=e,this.languageService=t}load(e){return e.location?this.loadIconThemeDocument(e.location).then(t=>{const o=this.processIconThemeDocument(e.id,e.location,t);return e.styleSheetContent=o.content,e.hasFileIcons=o.hasFileIcons,e.hasFolderIcons=o.hasFolderIcons,e.hidesExplorerArrows=o.hidesExplorerArrows,e.isLoaded=!0,e.styleSheetContent}):Promise.resolve(e.styleSheetContent)}loadIconThemeDocument(e){return this.fileService.readExtensionResource(e).then(t=>{const o=[],n=mt(t,o);return o.length>0?Promise.reject(new Error(r(12891,"Problems parsing file icons file: {0}",o.map(s=>gt(s.error)).join(", ")))):pt(n)!=="object"?Promise.reject(new Error(r(12892,"Invalid format for file icons theme file: Object expected."))):Promise.resolve(n)})}processIconThemeDocument(e,t,o){const n={content:"",hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!!o.hidesExplorerArrows};let s=!1;if(!o.iconDefinitions)return n;const a={},l={},c=Ge(t);function h(T){return ne(c,T)}function d(T,R){function S(E,A){if(A){let U=a[A];U||(U=a[A]=new ee),U.push(E)}}if(T){let E=y`.show-file-icons`;R&&(E=y`${R} ${E}`);const A=y`.monaco-tl-twistie.collapsible:not(.collapsed) + .monaco-tl-contents`;T.folder&&(S(y`${E} .folder-icon::before`,T.folder),n.hasFolderIcons=!0),T.folderExpanded&&(S(y`${E} ${A} .folder-icon::before`,T.folderExpanded),n.hasFolderIcons=!0);const U=T.rootFolder||T.folder,F=T.rootFolderExpanded||T.folderExpanded;U&&(S(y`${E} .rootfolder-icon::before`,U),n.hasFolderIcons=!0),F&&(S(y`${E} ${A} .rootfolder-icon::before`,F),n.hasFolderIcons=!0),T.file&&(S(y`${E} .file-icon::before`,T.file),n.hasFileIcons=!0);const ye=T.folderNames;if(ye)for(const x in ye){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-folder-icon`),S(y`${E} ${_.join("")}.folder-icon::before`,ye[x]),n.hasFolderIcons=!0}const de=T.folderNamesExpanded;if(de)for(const x in de){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-folder-icon`),S(y`${E} ${A} ${_.join("")}.folder-icon::before`,de[x]),n.hasFolderIcons=!0}const Ee=T.rootFolderNames;if(Ee)for(const x in Ee){const _=x.toLowerCase();S(y`${E} .${W(_)}-root-name-folder-icon.rootfolder-icon::before`,Ee[x]),n.hasFolderIcons=!0}const be=T.rootFolderNamesExpanded;if(be)for(const x in be){const _=x.toLowerCase();S(y`${E} ${A} .${W(_)}-root-name-folder-icon.rootfolder-icon::before`,be[x]),n.hasFolderIcons=!0}const J=T.languageIds;if(J){!J.jsonc&&J.json&&(J.jsonc=J.json);for(const x in J)S(y`${E} .${W(x)}-lang-file-icon.file-icon::before`,J[x]),n.hasFileIcons=!0,s=!0,l[x]=!0}const ke=T.fileExtensions;if(ke)for(const x in ke){const _=new ee,Q=He(x.toLowerCase(),_).split(".");if(Q.length){for(let L=0;L<Q.length;L++)_.push(y`.${W(Q.slice(L).join("."))}-ext-file-icon`);_.push(y`.ext-file-icon`)}S(y`${E} ${_.join("")}.file-icon::before`,ke[x]),n.hasFileIcons=!0,s=!0}const Re=T.fileNames;if(Re)for(const x in Re){const _=new ee,Y=He(x.toLowerCase(),_);_.push(y`.${W(Y)}-name-file-icon`),_.push(y`.name-file-icon`);const Q=Y.split(".");if(Q.length){for(let L=1;L<Q.length;L++)_.push(y`.${W(Q.slice(L).join("."))}-ext-file-icon`);_.push(y`.ext-file-icon`)}S(y`${E} ${_.join("")}.file-icon::before`,Re[x]),n.hasFileIcons=!0,s=!0}}}if(d(o),d(o.light,y`.vs`),d(o.highContrast,y`.hc-black`),d(o.highContrast,y`.hc-light`),!n.hasFileIcons&&!n.hasFolderIcons)return n;const f=o.showLanguageModeIcons===!0||s&&o.showLanguageModeIcons!==!1,u=new ee,m=o.fonts,I=new Map;if(Array.isArray(m)){const T=this.tryNormalizeFontSize(m[0].size)||"150%";m.forEach(R=>{const S=new ee;S.push(...R.src.map(A=>y`${Pe(h(A.path))} format(${ue(A.format)})`)),u.push(y`@font-face { src: ${S.join(", ")}; font-family: ${ue(R.id)}; font-weight: ${Dt(R.weight)}; font-style: ${Dt(R.style)}; font-display: block; }`);const E=this.tryNormalizeFontSize(R.size);E!==void 0&&E!==T&&I.set(R.id,E)}),u.push(y`.show-file-icons .file-icon::before, .show-file-icons .folder-icon::before, .show-file-icons .rootfolder-icon::before { font-family: ${ue(m[0].id)}; font-size: ${At(T)}; }`)}const p=ue("\\2001");for(const T in a){const R=a[T],S=o.iconDefinitions[T];if(S){if(S.iconPath)u.push(y`${R.join(", ")} { content: ${p}; background-image: ${Pe(h(S.iconPath))}; }`);else if(S.fontCharacter||S.fontColor){const E=new ee;S.fontColor&&S.fontColor.match(sn)&&E.push(y`color: ${Gn(S.fontColor)};`),S.fontCharacter&&E.push(y`content: ${ue(S.fontCharacter)};`);const A=S.fontSize??(S.fontId?I.get(S.fontId):void 0);A&&A.match(rt)&&E.push(y`font-size: ${At(A)};`),S.fontId&&E.push(y`font-family: ${ue(S.fontId)};`),f&&E.push(y`background-image: unset;`),u.push(y`${R.join(", ")} { ${E.join(" ")} }`)}}}if(f){for(const T of this.languageService.getRegisteredLanguageIds())if(!l[T]){const R=this.languageService.getIcon(T);if(R){const S=y`.show-file-icons .${W(T)}-lang-file-icon.file-icon::before`;u.push(y`${S} { content: ${p}; background-image: ${Pe(R.dark)}; }`),u.push(y`.vs ${S} { content: ${p}; background-image: ${Pe(R.light)}; }`)}}}return n.content=u.join(`
|
|
2
2
|
`),n}tryNormalizeFontSize(e){if(!e)return;const t=13;if(e.endsWith("px")){const o=parseInt(e,10);if(!isNaN(o))return Math.round(o/t*100)+"%"}return e}}function He(i,e){const t=i.lastIndexOf("/");if(t>=0){const o=i.substring(0,t);return e.push(y`.${W(o)}-name-dir-icon`),i.substring(t+1)}return i}function W(i){return i=Un(i),Kn(i,!0)}const Yt=["comment","comment.block","comment.block.documentation","comment.line","constant","constant.character","constant.character.escape","constant.numeric","constant.numeric.integer","constant.numeric.float","constant.numeric.hex","constant.numeric.octal","constant.other","constant.regexp","constant.rgb-value","emphasis","entity","entity.name","entity.name.class","entity.name.function","entity.name.method","entity.name.section","entity.name.selector","entity.name.tag","entity.name.type","entity.other","entity.other.attribute-name","entity.other.inherited-class","invalid","invalid.deprecated","invalid.illegal","keyword","keyword.control","keyword.operator","keyword.operator.new","keyword.operator.assignment","keyword.operator.arithmetic","keyword.operator.logical","keyword.other","markup","markup.bold","markup.changed","markup.deleted","markup.heading","markup.inline.raw","markup.inserted","markup.italic","markup.list","markup.list.numbered","markup.list.unnumbered","markup.other","markup.quote","markup.raw","markup.underline","markup.underline.link","meta","meta.block","meta.cast","meta.class","meta.function","meta.function-call","meta.preprocessor","meta.return-type","meta.selector","meta.tag","meta.type.annotation","meta.type","punctuation.definition.string.begin","punctuation.definition.string.end","punctuation.separator","punctuation.separator.continuation","punctuation.terminator","storage","storage.modifier","storage.type","string","string.interpolated","string.other","string.quoted","string.quoted.double","string.quoted.other","string.quoted.single","string.quoted.triple","string.regexp","string.unquoted","strong","support","support.class","support.constant","support.function","support.other","support.type","support.type.property-name","support.variable","variable","variable.language","variable.name","variable.other","variable.other.readwrite","variable.parameter"],Ve="vscode://schemas/textmate-colors",Zo=`${Ve}#/definitions/colorGroup`,ei={type:"array",definitions:{colorGroup:{default:"#FF0000",anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/settings"}]},settings:{type:"object",description:r(12936,"Colors and styles for the token."),properties:{foreground:{type:"string",description:r(12937,"Foreground color for the token."),format:"color-hex",default:"#ff0000"},background:{type:"string",deprecationMessage:r(12938,"Token background colors are currently not supported.")},fontStyle:{type:"string",description:r(12939,"Font style of the rule: 'italic', 'bold', 'underline', 'strikethrough' or a combination. The empty string unsets inherited settings."),pattern:"^(\\s*\\b(italic|bold|underline|strikethrough))*\\s*$",patternErrorMessage:r(12940,"Font style must be 'italic', 'bold', 'underline', 'strikethrough' or a combination or the empty string."),defaultSnippets:[{label:r(12941,"None (clear inherited style)"),bodyText:'""'},{body:"italic"},{body:"bold"},{body:"underline"},{body:"strikethrough"},{body:"italic bold"},{body:"italic underline"},{body:"italic strikethrough"},{body:"bold underline"},{body:"bold strikethrough"},{body:"underline strikethrough"},{body:"italic bold underline"},{body:"italic bold strikethrough"},{body:"italic underline strikethrough"},{body:"bold underline strikethrough"},{body:"italic bold underline strikethrough"}]}},additionalProperties:!1,defaultSnippets:[{body:{foreground:"${1:#FF0000}",fontStyle:"${2:bold}"}}]}},items:{type:"object",defaultSnippets:[{body:{scope:"${1:keyword.operator}",settings:{foreground:"${2:#FF0000}"}}}],properties:{name:{type:"string",description:r(12942,"Description of the rule.")},scope:{description:r(12943,"Scope selector against which this rule matches."),anyOf:[{enum:Yt},{type:"string"},{type:"array",items:{enum:Yt}},{type:"array",items:{type:"string"}}]},settings:{$ref:"#/definitions/settings"}},required:["settings"],additionalProperties:!1}},Sn="vscode://schemas/color-theme",ti={type:"object",allowComments:!0,allowTrailingCommas:!0,properties:{colors:{description:r(12944,"Colors in the workbench"),$ref:It,additionalProperties:!1},tokenColors:{anyOf:[{type:"string",description:r(12945,"Path to a tmTheme file (relative to the current file).")},{description:r(12946,"Colors for syntax highlighting"),$ref:Ve}]},semanticHighlighting:{type:"boolean",description:r(12947,"Whether semantic highlighting should be enabled for this theme.")},semanticTokenColors:{type:"object",description:r(12948,"Colors for semantic tokens"),$ref:mn}}};function ni(){const i=oe.as(Tt.JSONContribution);i.registerSchema(Sn,ti),i.registerSchema(Ve,ei)}function oi(){return yt.registerExtensionPoint({extensionPoint:"themes",jsonSchema:{description:r(13038,"Contributes textmate color themes."),type:"array",items:{type:"object",defaultSnippets:[{body:{label:"${1:label}",id:"${2:id}",uiTheme:H.VS_DARK,path:"./themes/${3:id}.tmTheme."}}],properties:{id:{description:r(13039,"Id of the color theme as used in the user settings."),type:"string"},label:{description:r(13040,"Label of the color theme as shown in the UI."),type:"string"},uiTheme:{description:r(13041,"Base theme defining the colors around the editor: 'vs' is the light color theme, 'vs-dark' is the dark color theme. 'hc-black' is the dark high contrast theme, 'hc-light' is the light high contrast theme."),enum:[H.VS,H.VS_DARK,H.HC_BLACK,H.HC_LIGHT]},path:{description:r(13042,"Path of the tmTheme file. The path is relative to the extension folder and is typically './colorthemes/awesome-color-theme.json'."),type:"string"}},required:["path","uiTheme"]}}})}function ii(){return yt.registerExtensionPoint({extensionPoint:"iconThemes",jsonSchema:{description:r(13043,"Contributes file icon themes."),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:id}",label:"${2:label}",path:"./fileicons/${3:id}-icon-theme.json"}}],properties:{id:{description:r(13044,"Id of the file icon theme as used in the user settings."),type:"string"},label:{description:r(13045,"Label of the file icon theme as shown in the UI."),type:"string"},path:{description:r(13046,"Path of the file icon theme definition file. The path is relative to the extension folder and is typically './fileicons/awesome-icon-theme.json'."),type:"string"}},required:["path","id"]}}})}function si(){return yt.registerExtensionPoint({extensionPoint:"productIconThemes",jsonSchema:{description:r(13047,"Contributes product icon themes."),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:id}",label:"${2:label}",path:"./producticons/${3:id}-product-icon-theme.json"}}],properties:{id:{description:r(13048,"Id of the product icon theme as used in the user settings."),type:"string"},label:{description:r(13049,"Label of the product icon theme as shown in the UI."),type:"string"},path:{description:r(13050,"Path of the product icon theme definition file. The path is relative to the extension folder and is typically './producticons/awesome-product-icon-theme.json'."),type:"string"}},required:["path","id"]}}})}class ri extends an{constructor(){super(...arguments),this.type="markdown"}shouldRender(e){return!!e.contributes?.themes||!!e.contributes?.iconThemes||!!e.contributes?.productIconThemes}render(e){const t=new Wn;if(e.contributes?.themes){t.appendMarkdown(`### ${r(13051,"Color Themes")}
|
|
3
3
|
|
|
4
4
|
`);for(const o of e.contributes.themes)t.appendMarkdown(`- ${o.label}
|