@opensumi/cli-engine 3.8.3-next-1742977855.0 → 3.8.3-next-1742981362.0

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.
@@ -31540,15 +31540,15 @@ ${a}`)}return this.keybindingsChanged.fire({affectsCommands:[E.command]}),{dispo
31540
31540
  `)}))}}}t.TextMateTokenizer=p},54324:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextmateService=void 0,t.getEncodedLanguageId=y,t.getLegalThemeName=A;const n=e(85608),r=e(27107),o=e(25726),c=e(76003),p=e(41869),v=e(6858),m=e(43718),_=e(42933),s=e(52902),g=e(33096),l=e(89944),h=e(96068),u=e(14162),d=e(16781),E=e(96689),f=e(41977),a=e(58837);let b=!1;function y(I){return s.monaco.languages.getEncodedLanguageId(I)}function A(I){return I.toLowerCase().replace(/[^a-z0-9-]/g,"-")}class S{createOnigScanner(O){return new r.OnigScanner(O)}createOnigString(O){return new r.OnigString(O)}}function w(I){if(!Array.isArray(I))return!1;for(let O=0,M=I.length;O<M;O++)if(typeof I[O]!="string")return!1;return!0}function T(I){return w(I)&&I.length===2}let D=class extends p.WithEventBus{constructor(){super(...arguments),this.registeredGrammarDisposableCollection=new Map,this.injections=new Map,this.activatedLanguage=new Set,this.languageConfigLocation=new Map,this.languageConfiguration=new Map,this.initialized=!1,this.dynamicLanguages=[]}init(){this.initGrammarRegistry(),this.listenThemeChange(),this.listenPreferenceChange()}listenThemeChange(){this.eventBus.on(l.ThemeChangedEvent,O=>{const M=O.payload.theme.themeData;M!==this.editorTheme&&(this.editorTheme=M,this.setTheme(M))})}async registerLanguage(O,M){return this.registerLanguages([O],M)}reviveLanguageConfiguration(O,M){return{wordPattern:this.createRegex(M.wordPattern),autoClosingPairs:this.extractValidAutoClosingPairs(O,M),brackets:this.extractValidBrackets(O,M),comments:this.extractValidCommentRule(O,M),folding:this.convertFolding(M.folding),surroundingPairs:this.extractValidSurroundingPairs(O,M),indentationRules:this.convertIndentationRules(M.indentationRules),autoCloseBefore:M.autoCloseBefore,colorizedBracketPairs:this.extractValidColorizedBracketPairs(O,M),onEnterRules:this.extractValidOnEnterRules(O,M)}}get monacoLanguageService(){return d.StandaloneServices.get(u.ILanguageService)}isEmbeddedLanguageOnly(O){return!O.filenames&&!O.extensions&&!O.filenamePatterns&&!O.firstLine&&!O.mimetypes&&(!O.aliases||O.aliases.length===0)}async registerLanguages(O,M){const R=O.map(P=>({id:P.id,aliases:P.aliases,extensions:P.extensions,filenamePatterns:P.filenamePatterns,filenames:P.filenames,firstLine:P.firstLine,mimetypes:P.mimetypes}));if(this.dynamicLanguages.push(...R.filter(P=>!this.isEmbeddedLanguageOnly(P))),this.monacoLanguageService._registry._registerLanguages(R),O.forEach(async P=>{this.languageConfigLocation.set(P.id,M),this.addDispose(s.monaco.languages.onLanguage(P.id,async()=>{await this.loadLanguageConfiguration(P,M),this.activateLanguage(P.id)})),this.languageConfiguration.set(P.id,P)}),this.initialized){const P=this.editorDocumentModelService.getAllModels().map(k=>k.uri);for(const k of P){const F=this.editorDocumentModelService.getModelReference(m.URI.parse(k.codeUri.toString()));if(F&&F.instance){const L=F.instance.getMonacoModel().getLanguageId();if(this.languageConfiguration.has(L)){const B=this.languageConfigLocation.get(L);await this.loadLanguageConfiguration(this.languageConfiguration.get(L),B),this.activateLanguage(L)}}F?.dispose()}}}async registerGrammar(O,M){if(O.path){const R=O.path.replace(/^\.\//,"");O.location=M.resolve(R)}this.doRegisterGrammar(O)}unregisterGrammar(O){const M=this.registeredGrammarDisposableCollection.get(O.scopeName);M&&M.dispose()}doRegisterGrammar(O){const M=new m.Disposable;if(O.injectTo)for(const R of O.injectTo){let P=this.injections.get(R);P||(P=[],M.addDispose(m.Disposable.create(()=>{this.injections.delete(R)})),this.injections.set(R,P)),P.push(O.scopeName)}M.addDispose(m.Disposable.create(this.textmateRegistry.registerTextmateGrammarScope(O.scopeName,{async getGrammarDefinition(){return{format:/\.json$/.test(O.path)?"json":"plist",location:O.location,content:await O.resolvedConfiguration}},getInjections:R=>{const P=R.split(".");let k=[];for(let F=1;F<=P.length;F++){const L=P.slice(0,F).join(".");k=[...k,...this.injections.get(L)||[]]}return k}}))),O.language&&(M.addDispose(m.Disposable.create(this.textmateRegistry.mapLanguageIdToTextmateGrammar(O.language,O.scopeName))),M.addDispose(m.Disposable.create(this.textmateRegistry.registerGrammarConfiguration(O.language,()=>({embeddedLanguages:this.convertEmbeddedLanguages(O.embeddedLanguages),tokenTypes:this.convertTokenTypes(O.tokenTypes),balancedBracketSelectors:(0,h.asStringArray)(O.balancedBracketScopes,["*"]),unbalancedBracketSelectors:(0,h.asStringArray)(O.unbalancedBracketScopes,[])}))))),this.registeredGrammarDisposableCollection.set(O.scopeName,M)}async loadLanguageConfiguration(O,M){let R;if(typeof O.resolvedConfiguration=="object"){const P=await O.resolvedConfiguration;R=this.reviveLanguageConfiguration(O.id,P)}else if(O.configuration){const P=O.configuration.replace(/^\.\//,""),k=M.resolve(P),L=(await this.fileServiceClient.resolveContent(k.toString())).content;if(L){const B=this.safeParseJSON(L);B&&(R=this.reviveLanguageConfiguration(O.id,B))}}R&&s.monaco.languages.setLanguageConfiguration(O.id,R)}async activateLanguage(O){this.eventBus.fire(new p.ExtensionActivateEvent({topic:"onLanguage",data:O})),!this.activatedLanguage.has(O)&&(this.activatedLanguage.add(O),this.setTokensProviderByLanguageId(O))}async setTokensProviderByLanguageId(O){const M=this.textmateRegistry.getScope(O);if(!M||!this.textmateRegistry.getProvider(M))return;const P={lineLimit:this.preferenceService.getValid("editor.maxTokenizationLineLength",2e4)},k=this.textmateRegistry.getGrammarConfiguration(O)(),F=y(O);try{const L=await this.grammarRegistry.loadGrammarWithConfiguration(M,F,k),B=k.tokenizerOption?k.tokenizerOption:P,j=k.embeddedLanguages&&Object.keys(k.embeddedLanguages).length>0;if(L){const W=new a.TextMateTokenizer(L,B,j);this.addDispose(W.onDidEncounterLanguage(async U=>{const Q=this.monacoLanguageService._registry.languageIdCodec.decodeLanguageId(U),V=this.languageConfigLocation.get(Q);V&&this.languageConfiguration.has(Q)&&(await this.loadLanguageConfiguration(this.languageConfiguration.get(Q),V),this.activateLanguage(Q))})),s.monaco.languages.setTokensProvider(O,W)}}catch(L){this.logger.warn("No grammar for this language id",O,L)}}setTheme(O){this.generateEncodedTokenColors(O),s.monaco.editor.defineTheme(A(O.name),O),s.monaco.editor.setTheme(A(O.name))}generateEncodedTokenColors(O){this.grammarRegistry.setTheme(O),O.encodedTokensColors=this.grammarRegistry.getColorMap(),O.encodedTokensColors[0]=null}createRegex(O){if(typeof O=="string")return new RegExp(O,"");if((0,m.isObject)(O)){if(typeof O.pattern!="string"||typeof O.flags<"u"&&typeof O.flags!="string")return;try{return new RegExp(O.pattern,O.flags)}catch{return}}}safeParseJSON(O){let M;try{return M=(0,p.parseWithComments)(O),M}catch(R){this.logger.error(`Language configuration file parsing error, ${R.stack}`);return}}convertFolding(O){if(!O)return;const M={offSide:O.offSide};return O.markers&&(M.markers={end:O.markers.end,start:O.markers.start}),M}convertIndentationRules(O){if(!O)return;const M={decreaseIndentPattern:this.createRegex(O.decreaseIndentPattern),increaseIndentPattern:this.createRegex(O.increaseIndentPattern)};return O.indentNextLinePattern&&(M.indentNextLinePattern=this.createRegex(O.indentNextLinePattern)),O.unIndentedLinePattern&&(M.unIndentedLinePattern=this.createRegex(O.unIndentedLinePattern)),M}convertEmbeddedLanguages(O){if(typeof O>"u"||O===null)return;const M=Object.create(null),R=Object.keys(O),P=R.length;for(let k=0;k<P;k++){const F=R[k],L=O[F];M[F]=y(L)}return M}convertTokenTypes(O){if(typeof O>"u"||O===null)return;const M=Object.create(null),R=Object.keys(O),P=R.length;for(let k=0;k<P;k++){const F=R[k];switch(O[F]){case"string":M[F]=2;break;case"other":M[F]=0;break;case"comment":M[F]=1;break}}return M}extractValidSurroundingPairs(O,M){if(!M)return;const R=M.surroundingPairs;if(typeof R>"u")return;if(!Array.isArray(R)){this.logger.warn(`[${O}: language configuration: expected \`surroundingPairs\` to be an array.`);return}let P;for(let k=0,F=R.length;k<F;k++){const L=R[k];if(Array.isArray(L)){if(!T(L)){this.logger.warn(`[${O}: language configuration: expected \`surroundingPairs[${k}]\` to be an array of two strings or an object.`);continue}P=P||[],P.push({open:L[0],close:L[1]})}else{if(typeof L!="object"){this.logger.warn(`[${O}: language configuration: expected \`surroundingPairs[${k}]\` to be an array of two strings or an object.`);continue}if(typeof L.open!="string"){this.logger.warn(`[${O}: language configuration: expected \`surroundingPairs[${k}].open\` to be a string.`);continue}if(typeof L.close!="string"){this.logger.warn(`[${O}: language configuration: expected \`surroundingPairs[${k}].close\` to be a string.`);continue}P=P||[],P.push({open:L.open,close:L.close})}}return P}extractValidColorizedBracketPairs(O,M){const R=M.colorizedBracketPairs;if(typeof R>"u")return;if(!Array.isArray(R)){this.logger.warn(`[${O}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const P=[];for(let k=0,F=R.length;k<F;k++){const L=R[k];if(!T(L)){this.logger.warn(`[${O}]: language configuration: expected \`colorizedBracketPairs[${k}]\` to be an array of two strings.`);continue}P.push([L[0],L[1]])}return P}extractValidOnEnterRules(O,M){const R=M.onEnterRules;if(typeof R>"u")return;if(!Array.isArray(R)){this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let P;for(let k=0,F=R.length;k<F;k++){const L=R[k];if(!(0,m.isObject)(L)){this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules[${k}]\` to be an object.`);continue}if(!(0,m.isObject)(L.action)){this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules[${k}].action\` to be an object.`);continue}let B;if(L.action.indent==="none")B=g.IndentAction.None;else if(L.action.indent==="indent")B=g.IndentAction.Indent;else if(L.action.indent==="indentOutdent")B=g.IndentAction.IndentOutdent;else if(L.action.indent==="outdent")B=g.IndentAction.Outdent;else{this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules[${k}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const j={indentAction:B};L.action.appendText&&(typeof L.action.appendText=="string"?j.appendText=L.action.appendText:this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules[${k}].action.appendText\` to be undefined or a string.`)),L.action.removeText&&(typeof L.action.removeText=="number"?j.removeText=L.action.removeText:this.logger.warn(`[${O}]: language configuration: expected \`onEnterRules[${k}].action.removeText\` to be undefined or a number.`));const W=this.createRegex(L.beforeText);if(!W)continue;const U={beforeText:W,action:j};if(L.afterText){const Q=this.createRegex(L.afterText);Q&&(U.afterText=Q)}if(L.previousLineText){const Q=this.createRegex(L.previousLineText);Q&&(U.previousLineText=Q)}P=P||[],P.push(U)}return P}extractValidBrackets(O,M){const R=M.brackets;if(typeof R>"u")return;if(!Array.isArray(R)){this.logger.warn(`[${O}]: language configuration: expected \`brackets\` to be an array.`);return}let P;for(let k=0,F=R.length;k<F;k++){const L=R[k];if(!T(L)){this.logger.warn(`[${O}]: language configuration: expected \`brackets[${k}]\` to be an array of two strings.`);continue}P=P||[],P.push(L)}return P}extractValidAutoClosingPairs(O,M){const R=M.autoClosingPairs;if(typeof R>"u")return;if(!Array.isArray(R)){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let P;for(let k=0,F=R.length;k<F;k++){const L=R[k];if(Array.isArray(L)){if(!T(L)){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs[${k}]\` to be an array of two strings or an object.`);continue}P=P||[],P.push({open:L[0],close:L[1]})}else{if(typeof L!="object"){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs[${k}]\` to be an array of two strings or an object.`);continue}if(typeof L.open!="string"){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs[${k}].open\` to be a string.`);continue}if(typeof L.close!="string"){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs[${k}].close\` to be a string.`);continue}if(typeof L.notIn<"u"&&!w(L.notIn)){this.logger.warn(`[${O}]: language configuration: expected \`autoClosingPairs[${k}].notIn\` to be a string array.`);continue}P=P||[],P.push({open:L.open,close:L.close,notIn:L.notIn})}}return P}extractValidCommentRule(O,M){const R=M.comments;if(typeof R>"u")return;if(typeof R!="object"){this.logger.warn(`[${O}]: language configuration: expected \`comments\` to be an object.`);return}let P;return typeof R.lineComment<"u"&&(typeof R.lineComment!="string"?this.logger.warn(`[${O}]: language configuration: expected \`comments.lineComment\` to be a string.`):(P=P||{},P.lineComment=R.lineComment)),typeof R.blockComment<"u"&&(T(R.blockComment)?(P=P||{},P.blockComment=R.blockComment):this.logger.warn(`[${O}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),P}async initGrammarRegistry(){this.grammarRegistry=new o.Registry({onigLib:this.getOnigLib(),loadGrammar:async O=>{const M=this.textmateRegistry.getProvider(O);if(M){const R=await M.getGrammarDefinition();if(!R.content){const F=(await this.fileServiceClient.resolveContent(R.location.toString())).content;R.content=R.format==="json"?this.safeParseJSON(F):F}let P;return typeof R.content=="string"?P=(0,o.parseRawGrammar)(R.content,R.format==="json"?"grammar.json":"grammar.plist"):P=R.content,P}},getInjections:O=>{const M=this.textmateRegistry.getProvider(O);return M&&M.getInjections?M.getInjections(O):[]}}),this.activateLanguages()}getLanguages(){return[...s.monaco.languages.getLanguages(),...this.dynamicLanguages]}activateLanguages(){for(const{id:O}of this.getLanguages())this.editorDocumentModelService.hasLanguage(O)&&this.activateLanguage(O)}async getOnigLib(){if(b)return new S;const O=await this.rendererRuntime.provideResourceUri(v.EKnownResources.OnigWasm),R=await(await fetch(O)).arrayBuffer();return await(0,r.loadWASM)(R),b=!0,new S}listenPreferenceChange(){this.preferenceService.onPreferenceChanged(O=>{if(O.preferenceName==="editor.maxTokenizationLineLength")for(const M of this.activatedLanguage)this.setTokensProviderByLanguageId(M)})}async testTokenize(O,M){const R=this.textmateRegistry.getScope(M);if(!R)return;const P=this.textmateRegistry.getGrammarConfiguration(M)(),k=y(M),F=await this.grammarRegistry.loadGrammarWithConfiguration(R,k,P);let L=o.INITIAL;const B=F.tokenizeLine(O,L),j=(0,p.getDebugLogger)("tokenize");j.log(`
31541
31541
  Tokenizing line: ${O}`);for(let W=0;W<B.tokens.length;W++){const U=B.tokens[W];j.log(` - token from ${U.startIndex} to ${U.endIndex} (${O.substring(U.startIndex,U.endIndex)}) with scopes ${U.scopes.join(", ")}`)}L=B.ruleStack}dispose(){super.dispose(),this.monacoLanguageService._requestedRichLanguages?this.monacoLanguageService._requestedRichLanguages.clear():this.logger.warn("monaco language service not found _requestedRichLanguages"),this.monacoLanguageService._requestedBasicLanguages?this.monacoLanguageService._requestedBasicLanguages.clear():this.logger.warn("monaco language service not found _requestedBasicLanguages")}};t.TextmateService=D,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",f.TextmateRegistry)],D.prototype,"textmateRegistry",void 0),n.__decorate([(0,c.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],D.prototype,"fileServiceClient",void 0),n.__decorate([(0,c.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],D.prototype,"preferenceService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],D.prototype,"logger",void 0),n.__decorate([(0,c.Autowired)(E.IEditorDocumentModelService),n.__metadata("design:type",Object)],D.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,c.Autowired)(v.RendererRuntime),n.__metadata("design:type",v.RendererRuntime)],D.prototype,"rendererRuntime",void 0),t.TextmateService=D=n.__decorate([(0,c.Injectable)()],D)},88412:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyContribution=t.executeProvideSubtypesCommand=t.executeProvideSupertypesCommand=t.executePrepareTypeHierarchyCommand=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(40191),p=e(28694),v=e(82196);t.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},t.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},t.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const m=new c.RawContextKey("editorHasCallHierarchyProvider",!1);let _=class{registerCommands(g){g.registerCommand(t.executePrepareTypeHierarchyCommand,{execute:(l,h)=>this.typeHierarchyService.prepareTypeHierarchyProvider(l,h)}),g.registerCommand(t.executeProvideSupertypesCommand,{execute:l=>this.typeHierarchyService.provideSupertypes(l)}),g.registerCommand(t.executeProvideSubtypesCommand,{execute:l=>this.typeHierarchyService.provideSubtypes(l)})}registerEditorFeature(g){this.ctxHasProvider=m.bind(this.contextKeyService),g.registerEditorFeatureContribution({contribute:l=>{const h=l.monacoEditor;return o.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,p.TypeHierarchyProviderRegistry.onDidChange)(()=>{h.hasModel()&&this.ctxHasProvider.set(p.TypeHierarchyProviderRegistry.has(h.getModel()))})}})}};t.TypeHierarchyContribution=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.ITypeHierarchyService),n.__metadata("design:type",Object)],_.prototype,"typeHierarchyService",void 0),t.TypeHierarchyContribution=_=n.__decorate([(0,o.Domain)(o.CommandContribution,v.BrowserEditorContribution)],_)},7795:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyService=t.TypeHierarchyModel=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(28694),p=e(96689),{isNonEmptyArray:v}=o.arrays;class m{static async create(g,l,h){const[u]=c.TypeHierarchyProviderRegistry.ordered(g);if(!u)return;const d=await u.prepareTypeHierarchy(g,l,h);if(d)return new m(d.roots.reduce((E,f)=>E+f._sessionId,""),u,d.roots,new o.RefCountedDisposable(d))}constructor(g,l,h,u){this.id=g,this.provider=l,this.roots=h,this.ref=u,this.root=h[0]}dispose(){this.ref.release()}fork(g){const l=this;return new class extends m{constructor(){super(l.id,l.provider,[g],l.ref.acquire())}}}async provideSupertypes(g,l){try{const h=await this.provider.provideSupertypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}async provideSubtypes(g,l){try{const h=await this.provider.provideSubtypes(g,l);if(v(h))return h}catch(h){(0,o.onUnexpectedExternalError)(h)}return[]}}t.TypeHierarchyModel=m;let _=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(g,l){c.TypeHierarchyProviderRegistry.register(g,l)}async prepareTypeHierarchyProvider(g,l){let h=this.modelService.getModelReference(o.URI.parse(g.toString())),u=h?.instance.getMonacoModel();if(h?.dispose(),!u){const d=await this.modelService.createModelReference(o.URI.parse(g.toString()));u=d.instance.getMonacoModel(),h=d}try{const d=await m.create(u,l,o.CancellationToken.None);return d?(this.models.set(d.id,d),this.models.forEach((E,f,a)=>{a.size>10&&(E.dispose(),this.models.delete(f))}),[d.root]):[]}finally{h?.dispose()}}async provideSupertypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSupertypes(g,o.CancellationToken.None)}async provideSubtypes(g){const l=this.models.get(g._sessionId);if(l)return l.provideSubtypes(g,o.CancellationToken.None)}};t.TypeHierarchyService=_,n.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],_.prototype,"modelService",void 0),t.TypeHierarchyService=_=n.__decorate([(0,r.Injectable)()],_)},93532:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NavigationMenuModel=t.NavigationBarViewService=t.NavigationMenuContainer=t.NavigationMenu=t.NavigationItem=t.NavigationBar=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(97267),v=e(41869),m=e(28423),_=e(26209),s=n.__importDefault(e(69418)),g=e(82196),l=e(50674),h=({editorGroup:a})=>{const b=(0,v.useInjectable)(g.IBreadCrumbService),y=(0,v.useDesignStyles)(s.default.navigation_container,"navigation_container"),A=(0,v.useDesignStyles)(s.default.navigation_icon,"navigation_icon");if((0,l.useUpdateOnGroupTabChange)(a),(0,v.useUpdateOnEvent)(b.onDidUpdateBreadCrumbResults,[],w=>{var T;const D=a.currentEditor&&a.currentEditor.currentDocumentModel?a.currentEditor:null,I=a.currentEditor&&a.currentEditor.currentDocumentModel?a.currentEditor.currentDocumentModel.uri:(T=a.currentResource)===null||T===void 0?void 0:T.uri;return!!I&&w.editor===D&&w.uri.isEqual(I)}),a.resources.length===0||!a.currentResource)return null;let S;return a.currentEditor&&a.currentEditor.currentDocumentModel?S=b.getBreadCrumbs(a.currentEditor.currentDocumentModel.uri,a.currentEditor):S=b.getBreadCrumbs(a.currentResource.uri,null),S?S.length===0?null:o.default.createElement("div",{className:(0,r.default)("kt-navigation-container",y),onContextMenu:w=>{w.preventDefault()}},S.map((w,T)=>o.default.createElement(o.default.Fragment,{key:T+"-crumb:"+w.name},T>0&&o.default.createElement(p.Icon,{icon:"right",size:"small",className:A}),o.default.createElement(t.NavigationItem,{part:w,editorGroup:a})))):null};t.NavigationBar=h,t.NavigationItem=(0,o.memo)(({part:a,editorGroup:b})=>{const y=(0,v.useInjectable)(E),A=(0,v.useInjectable)(_.BreadCrumbsMenuService),S=(0,o.useRef)(),w=(0,v.useDesignStyles)(s.default["navigation-part"],"navigation-part"),T=(0,o.useCallback)(async()=>{if(a.getSiblings&&S.current){const{left:D,top:I,height:O}=S.current.getBoundingClientRect(),M=await a.getSiblings();let R=D;window.innerWidth-R<210&&(R=window.innerWidth-200-5),y.showMenu(M.parts,R,I+O+5,M.currentIndex,a.uri,b)}},[S.current,a]);return o.default.createElement("span",{onClick:T,onContextMenu:D=>{!a.isSymbol&&a.uri&&A.show(D.nativeEvent.x,D.nativeEvent.y,b,a.uri),D.preventDefault()},className:w,ref:S},a.icon&&o.default.createElement("span",{className:a.icon}),o.default.createElement("span",null,a.name))});const u=({model:a})=>{let b=window.innerHeight-a.y-20,y=a.y;const A=a.parts.length*22;b<100&&b<A&&(b=100,y=window.innerHeight-20-b);const S=(0,o.useRef)(),w=(0,v.useDesignStyles)(s.default.navigation_menu,"navigation_menu"),T=(0,v.useDesignStyles)(s.default.navigation_menu_item,"navigation_menu_item"),D=(0,v.useInjectable)(E),I=(0,v.useAutorun)(a.subMenu),O=(0,o.useCallback)(()=>{v.fastdom.measure(()=>{try{if(S.current){const M=S.current.querySelector(`.${s.default.navigation_menu_item_current}`);M&&M.scrollIntoView({behavior:"auto",block:"center"})}}catch{}})},[S.current]);return o.default.createElement("div",{className:w,style:{left:a.x+"px",top:y+"px",maxHeight:b+"px",height:A+"px"}},o.default.createElement(p.Scrollbars,{className:s.default.navigation_menu_items,universal:!0,forwardedRef:M=>{S.current=M,O()}},a.parts.map((M,R)=>{let P;const k=M.getChildren?async()=>{if(P){const{left:L,top:B,width:j}=P.getBoundingClientRect();let W=L+j+5;window.innerWidth-W<210&&(W=L-j-5);const U=await M.getChildren();a.showSubMenu(U,W,B,a)}}:void 0,F=M.onClick?()=>{M.onClick(),D.dispose()}:void 0;return o.default.createElement("div",{onClick:F||k,ref:L=>P=L,className:(0,r.default)(T,{[s.default.navigation_menu_item_current]:R===a.initialIndex}),key:"menu-"+M.name},o.default.createElement("span",{className:M.icon||(0,v.getIcon)("smile")}),o.default.createElement("span",{className:s.default.navigation_menu_item_label},M.name),M.getChildren&&o.default.createElement("span",{className:s.default.navigation_right,onClick:F&&k?L=>{L.stopPropagation(),k()}:void 0},o.default.createElement(p.Icon,{icon:"right",size:"small"})))})),I&&o.default.createElement(t.NavigationMenu,{model:I}))};t.NavigationMenu=u;const d=()=>{const a=(0,o.useRef)(),b=(0,v.useInjectable)(E),y=(0,v.useAutorun)(b.current);return(0,o.useEffect)(()=>{if(a.current){const A=new v.Disposable;return A.addDispose(new v.DomListener(window,"mouseup",()=>{b.dispose()})),A.addDispose(new v.DomListener(a.current,"mouseup",S=>{S.stopPropagation()})),A.dispose.bind(A)}}),y?o.default.createElement("div",{tabIndex:1,ref:a},o.default.createElement(t.NavigationMenu,{model:y})):null};t.NavigationMenuContainer=d;let E=class{constructor(){this.current=(0,m.observableValue)(this,null)}showMenu(b,y,A,S,w,T){(0,m.transaction)(D=>{this.current.set(new f(b,y,A,S,w),D)})}dispose(){(0,m.transaction)(b=>{const y=this.current.get();y?.dispose(),this.current.set(null,b)})}};t.NavigationBarViewService=E,t.NavigationBarViewService=E=n.__decorate([(0,c.Injectable)()],E);class f{constructor(b,y,A,S=-1,w){this.parts=b,this.x=y,this.y=A,this.initialIndex=S,this.uri=w,this.subMenu=(0,m.observableValue)(this,null)}showSubMenu(b,y,A,S){(0,m.transaction)(w=>{this.subMenu.set(new f(b,y,A,-1,S),w)})}dispose(){(0,m.transaction)(b=>{const y=this.subMenu.get();y?.dispose(),this.subMenu.set(null,b)})}}t.NavigationMenuModel=f},71145:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookService=void 0;const n=e(85608),r=e(76003),o=e(41869);let c=class extends o.WithEventBus{constructor(){super(...arguments),this._onDidOpenNotebookDocument=new o.Emitter,this.onDidOpenNotebookDocument=this._onDidOpenNotebookDocument.event,this._onDidCloseNotebookDocument=new o.Emitter,this.onDidCloseNotebookDocument=this._onDidCloseNotebookDocument.event,this._onDidSaveNotebookDocument=new o.Emitter,this.onDidSaveNotebookDocument=this._onDidSaveNotebookDocument.event,this._onDidChangeNotebookDocument=new o.Emitter,this.onDidChangeNotebookDocument=this._onDidChangeNotebookDocument.event}};t.NotebookService=c,t.NotebookService=c=n.__decorate([(0,r.Injectable)()],c)},34885:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferenceContribution=void 0;const n=e(85608),r=e(41869),o=e(24328);let c=class{constructor(){this.schema=o.editorPreferenceSchema}};t.EditorPreferenceContribution=c,t.EditorPreferenceContribution=c=n.__decorate([(0,r.Domain)(r.PreferenceContribution)],c)},6043:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.diffEditorOptionsConverters=t.textModelUpdateOptionsConverters=t.editorOptionsConverters=void 0,t.isEditorOption=c,t.isDiffEditorOption=p,t.getConvertedMonacoOptions=s;const n=e(41869),{removeUndefined:r}=n.objects;t.editorOptionsConverters=new Map([["editor.ariaLabel",{monaco:"ariaLabel"}],["editor.rulers",{monaco:"rulers"}],["editor.wordSeparators",{monaco:"wordSeparators"}],["editor.selectionClipboard",{monaco:"selectionClipboard"}],["editor.lineNumbers",{monaco:"lineNumbers"}],["editor.renderFinalNewline",{monaco:"renderFinalNewline"}],["editor.selectOnLineNumbers",{monaco:"selectOnLineNumbers"}],["editor.lineNumbersMinChars",{monaco:"lineNumbersMinChars"}],["editor.glyphMargin",{monaco:"glyphMargin"}],["editor.lineDecorationsWidth",{monaco:"lineDecorationsWidth"}],["editor.revealHorizontalRightPadding",{monaco:"revealHorizontalRightPadding"}],["editor.roundedSelection",{monaco:"roundedSelection"}],["editor.extraEditorClassName",{monaco:"extraEditorClassName"}],["editor.readOnly",{monaco:"readOnly"}],["editor.scrollbar",{monaco:"scrollbar"}],["editor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["editor.find",{monaco:"find"}],["editor.fixedOverflowWidgets",{monaco:"fixedOverflowWidgets"}],["editor.overviewRulerLanes",{monaco:"overviewRulerLanes"}],["editor.overviewRulerBorder",{monaco:"overviewRulerBorder"}],["editor.cursorBlinking",{monaco:"cursorBlinking"}],["editor.mouseWheelZoom",{monaco:"mouseWheelZoom"}],["editor.cursorSmoothCaretAnimation",{monaco:"cursorSmoothCaretAnimation"}],["editor.cursorStyle",{monaco:"cursorStyle"}],["editor.cursorWidth",{monaco:"cursorWidth"}],["editor.fontLigatures",{monaco:"fontLigatures"}],["editor.columnSelection",{monaco:"columnSelection"}],["editor.disableLayerHinting",{monaco:"disableLayerHinting"}],["editor.disableMonospaceOptimizations",{monaco:"disableMonospaceOptimizations"}],["editor.hideCursorInOverviewRuler",{monaco:"hideCursorInOverviewRuler"}],["editor.scrollBeyondLastLine",{monaco:"scrollBeyondLastLine"}],["editor.scrollBeyondLastColumn",{monaco:"scrollBeyondLastColumn"}],["editor.smoothScrolling",{monaco:"smoothScrolling"}],["editor.automaticLayout",{monaco:"automaticLayout"}],["editor.wordWrap",{monaco:"wordWrap"}],["editor.wordWrapColumn",{monaco:"wordWrapColumn"}],["editor.wordWrapMinified",{monaco:"wordWrapMinified"}],["editor.wrappingIndent",{monaco:"wrappingIndent"}],["editor.wordWrapBreakBeforeCharacters",{monaco:"wordWrapBreakBeforeCharacters"}],["editor.wordWrapBreakAfterCharacters",{monaco:"wordWrapBreakAfterCharacters"}],["editor.wordWrapBreakObtrusiveCharacters",{monaco:"wordWrapBreakObtrusiveCharacters"}],["editor.stopRenderingLineAfter",{monaco:"stopRenderingLineAfter"}],["editor.hover",{monaco:"hover"}],["editor.links",{monaco:"links"}],["editor.colorDecorators",{monaco:"colorDecorators"}],["editor.contextmenu",{monaco:"contextmenu"}],["editor.mouseWheelScrollSensitivity",{monaco:"mouseWheelScrollSensitivity"}],["editor.fastScrollSensitivity",{monaco:"fastScrollSensitivity"}],["editor.multiCursorModifier",{monaco:"multiCursorModifier"}],["editor.multiCursorMergeOverlapping",{monaco:"multiCursorMergeOverlapping"}],["editor.accessibilitySupport",{monaco:"accessibilitySupport"}],["editor.suggest",{monaco:"suggest"}],["editor.gotoLocation",{monaco:"gotoLocation"}],["editor.quickSuggestions",{monaco:"quickSuggestions"}],["editor.quickSuggestionsDelay",{monaco:"quickSuggestionsDelay"}],["editor.parameterHints",{monaco:"parameterHints"}],["editor.autoClosingBrackets",{monaco:"autoClosingBrackets"}],["editor.autoClosingQuotes",{monaco:"autoClosingQuotes"}],["editor.autoSurround",{monaco:"autoSurround"}],["editor.autoIndent",{monaco:"autoIndent"}],["editor.formatOnType",{monaco:"formatOnType"}],["editor.formatOnPaste",{monaco:"formatOnPaste"}],["editor.dragAndDrop",{monaco:"dragAndDrop"}],["editor.suggestOnTriggerCharacters",{monaco:"suggestOnTriggerCharacters"}],["editor.acceptSuggestionOnEnter",{monaco:"acceptSuggestionOnEnter"}],["editor.acceptSuggestionOnCommitCharacter",{monaco:"acceptSuggestionOnCommitCharacter"}],["editor.snippetSuggestions",{monaco:"snippetSuggestions"}],["editor.emptySelectionClipboard",{monaco:"emptySelectionClipboard"}],["editor.copyWithSyntaxHighlighting",{monaco:"copyWithSyntaxHighlighting"}],["editor.wordBasedSuggestions",{monaco:"wordBasedSuggestions"}],["editor.suggestSelection",{monaco:"suggestSelection"}],["editor.suggestFontSize",{monaco:"suggestFontSize"}],["editor.suggestLineHeight",{monaco:"suggestLineHeight"}],["editor.tabCompletion",{monaco:"tabCompletion"}],["editor.selectionHighlight",{monaco:"selectionHighlight"}],["editor.occurrencesHighlight",{monaco:"occurrencesHighlight"}],["editor.codeLens",{monaco:"codeLens"}],["editor.lightbulb",{monaco:"lightbulb"}],["editor.codeActionsOnSave",{monaco:"codeActionsOnSave"}],["editor.codeActionsOnSaveTimeout",{monaco:"codeActionsOnSaveTimeout"}],["editor.folding",{monaco:"folding"}],["editor.foldingStrategy",{monaco:"foldingStrategy"}],["editor.showFoldingControls",{monaco:"showFoldingControls"}],["editor.matchBrackets",{monaco:"matchBrackets"}],["editor.renderWhitespace",{monaco:"renderWhitespace"}],["editor.renderControlCharacters",{monaco:"renderControlCharacters"}],["editor.renderIndentGuides",{monaco:"guides.indentation"}],["editor.highlightActiveIndentGuide",{monaco:"guides.highlightActiveIndentation"}],["editor.guides",{monaco:"guides"}],["editor.renderLineHighlight",{monaco:"renderLineHighlight"}],["editor.useTabStops",{monaco:"useTabStops"}],["editor.fontFamily",{monaco:"fontFamily"}],["editor.fontWeight",{monaco:"fontWeight"}],["editor.fontSize",{monaco:"fontSize"}],["editor.lineHeight",{monaco:"lineHeight"}],["editor.letterSpacing",{monaco:"letterSpacing"}],["editor.showUnused",{monaco:"showUnused"}],["editor.rename.enablePreview",{monaco:"editor.rename.enablePreview"}],["editor.semanticHighlighting",{monaco:"semanticHighlighting"}],["editor.bracketPairColorization",{monaco:"bracketPairColorization"}],["editor.wrappingStrategy",{monaco:"wrappingStrategy"}],["editor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["editor.forceReadOnly",{monaco:"readOnly",convert:g=>{if(g)return!0}}],["editor.unicodeHighlight",{monaco:"unicodeHighlight"}],["editor.inlineSuggest.showToolbar",{monaco:"inlineSuggest",convert:g=>{if(g)return{showToolbar:g}}}]]),t.textModelUpdateOptionsConverters=new Map([["editor.tabSize",{monaco:"tabSize"}],["editor.indentSize",{monaco:"indentSize"}],["editor.insertSpaces",{monaco:"insertSpaces"}],["editor.trimAutoWhitespace",{monaco:"trimAutoWhitespace"}]]),t.diffEditorOptionsConverters=new Map([["diffEditor.enableSplitViewResizing",{monaco:"enableSplitViewResizing"}],["diffEditor.renderSideBySide",{monaco:"renderSideBySide"}],["diffEditor.ignoreTrimWhitespace",{monaco:"ignoreTrimWhitespace"}],["diffEditor.renderIndicators",{monaco:"renderIndicators"}],["diffEditor.originalEditable",{monaco:"originalEditable"}],["diffEditor.minimap",{monaco:"minimap",convert:g=>({enabled:g})}],["diffEditor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:g=>({stickyScroll:{enabled:g}})}],["diffEditor.hideUnchangedRegions.enabled",{monaco:"hideUnchangedRegions",convert:g=>({enabled:g})}],["diffEditor.hideUnchangedRegions.revealLineCount",{monaco:"hideUnchangedRegions",convert:g=>({revealLineCount:g})}],["diffEditor.hideUnchangedRegions.minimumLineCount",{monaco:"hideUnchangedRegions",convert:g=>({minimumLineCount:g})}],["diffEditor.hideUnchangedRegions.contextLineCount",{monaco:"hideUnchangedRegions",convert:g=>({contextLineCount:g})}],["diffEditor.experimental.showMoves",{monaco:"experimental",convert:g=>({showMoves:g})}],["diffEditor.experimental.showEmptyDecorations",{monaco:"experimental",convert:g=>({showEmptyDecorations:g})}]]);function o(g,l){if(l.has(g))return!0;{const h=l.keys();for(const u of h)if(g.startsWith(u))return!0}return!1}function c(g){return o(g,t.editorOptionsConverters)||o(g,t.textModelUpdateOptionsConverters)||o(g,t.diffEditorOptionsConverters)}function p(g){return o(g,t.diffEditorOptionsConverters)}const v=[...t.editorOptionsConverters.keys()],m=[...t.textModelUpdateOptionsConverters.keys()],_=[...t.diffEditorOptionsConverters.keys()];function s(g,l,h,u){const d=l?n.Uri.parse(l):void 0,E=(w,T)=>w.reduce((D,I)=>{const O=g.getValue(I,{resource:d,overrideIdentifier:h});if(O!==void 0){const M=T.get(I);if(!M)return D[I]=O,D;const R=M?M.monaco:I,P=M?.convert?M.convert(O):O;D[R]?Object.assign(D[R],P):D[R]=P}return D},{}),f=u?u.filter(w=>t.editorOptionsConverters.has(w)):[...v],a=u?u.filter(w=>t.textModelUpdateOptionsConverters.has(w)):[...m],b=u?u.filter(w=>t.diffEditorOptionsConverters.has(w)):[..._],y=r(E(f,t.editorOptionsConverters)),A=r(E(a,t.textModelUpdateOptionsConverters)),S=r(E(b,t.diffEditorOptionsConverters));return{editorOptions:y,modelOptions:A,diffOptions:S}}},24328:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorPreferences=t.editorPreferenceSchema=t.DIFF_EDITOR_DEFAULTS=t.EDITOR_DEFAULTS=t.EDITOR_INLINE_SUGGEST_DEFAULTS=t.EDITOR_SUGGEST_DEFAULTS=t.EDITOR_MODEL_DEFAULTS=t.EDITOR_FONT_DEFAULTS=t.USUAL_WORD_SEPARATORS=void 0;const n=e(41869),r=e(82196);t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const o="Consolas, 'Courier New', monospace",c="Menlo, Monaco, 'Courier New', monospace",p="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";t.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?c:n.isLinux?p:o,fontWeight:"normal",fontSize:12,tabSize:2,renderWhitespace:!1,cursorStyle:"line",insertSpace:!0,wordWrap:"off",wordWrapColumn:80,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_SUGGEST_DEFAULTS={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,maxVisibleSuggestions:12,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0,detailsVisible:!0,preview:!0,statusBar:{visible:!1}},t.EDITOR_INLINE_SUGGEST_DEFAULTS={enabled:!0,showToolbar:"onHover"},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:t.USUAL_WORD_SEPARATORS,lineNumbersMinChars:3,lineDecorationsWidth:10,readOnly:!1,columnSelection:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!0,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",wordWrapBreakAfterCharacters:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"off",showUnused:!0,wrappingStrategy:"simple",viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:(0,n.localize)("editorViewAccessibleLabel","Editor Content"),renderLineNumbers:0,renderCustomLineNumbers:null,renderFinalNewline:!0,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorSmoothCaretAnimation:!1,cursorStyle:1,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderLineHighlight:"none",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1,fastScrollSensitivity:5},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},guides:{indentation:!0,highlightActiveIndentGuide:!0,bracketPairs:!0},fixedOverflowWidgets:!0},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!1,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",gotoLocation:{multiple:"peek"},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1,addExtraSpaceOnTop:!0},colorDecorators:!0,lightbulbEnabled:r.ShowLightbulbIconMode.On,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}},t.DIFF_EDITOR_DEFAULTS={renderIndicators:!0,minimap:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,hideUnchangedRegions:{enabled:!0,revealLineCount:20,minimumLineCount:3,contextLineCount:3},experimental:{showMoves:!1,showEmptyDecorations:!0,collapseUnchangedRegions:!0,stickyScroll:{enable:!1}}};const v={"editor.ariaLabel":{type:"string",default:t.EDITOR_DEFAULTS.viewInfo.ariaLabel,description:"%editor.configuration.ariaLabel%"},"editor.extraEditorClassName":{type:"string",description:"%editor.configuration.extraEditorClassName%"},"editor.fixedOverflowWidgets":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fixedOverflowWidgets,description:"%editor.configuration.fixedOverflowWidgets%"},"editor.revealHorizontalRightPadding":{type:"number",description:"%editor.configuration.revealHorizontalRightPadding%"},"editor.selectOnLineNumbers":{type:"boolean",description:"%editor.configuration.selectOnLineNumbers%"},"editor.wordWrapMinified":{type:"boolean",description:"%editor.configuration.wordWrapMinified%"},"editor.wordWrapBreakAfterCharacters":{type:"string",default:" })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63",description:"%editor.configuration.wordWrapBreakAfterCharacters%"},"editor.wrappingStrategy":{type:"string",enum:["advanced","simple"],default:"simple",description:"%editor.configuration.wrappingStrategy%"},"editor.wordWrapBreakBeforeCharacters":{type:"string",default:"([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B",description:"%editor.configuration.wordWrapBreakBeforeCharacters%"},"editor.lineNumbersMinChars":{type:"number",default:t.EDITOR_DEFAULTS.lineNumbersMinChars,description:"%editor.configuration.lineNumbersMinChars%"},"editor.lineDecorationsWidth":{type:"number",default:t.EDITOR_DEFAULTS.lineDecorationsWidth,description:"%editor.configuration.lineDecorationsWidth%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily,description:"%editor.configuration.fontFamily%"},"editor.fontWeight":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontWeight,description:"%editor.configuration.fontWeight%"},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,description:(0,n.localize)("fontSize","Controls the font size in pixels.")},"editor.lineHeight":{type:"number",default:t.EDITOR_FONT_DEFAULTS.lineHeight,description:(0,n.localize)("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")},"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[(0,n.localize)("editor.configuration.suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),(0,n.localize)("editor.configuration.suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:"insert",description:"%editor.configuration.suggest.insertMode%"},"editor.suggest.filterGraceful":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.filterGraceful,description:"%editor.configuration.suggest.filterGraceful%"},"editor.suggest.localityBonus":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.localityBonus,description:"%editor.configuration.suggest.localityBonus%"},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.shareSuggestSelections,description:"%editor.configuration.suggest.shareSuggestSelections%"},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.snippetsPreventQuickSuggestions,description:"%editor.configuration.suggest.snippetsPreventQuickSuggestions%"},"editor.suggest.showIcons":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.showIcons,description:"%editor.configuration.suggest.showIcons%"},"editor.suggest.maxVisibleSuggestions":{type:"number",default:t.EDITOR_SUGGEST_DEFAULTS.maxVisibleSuggestions,minimum:1,maximum:15,description:"%editor.configuration.suggest.maxVisibleSuggestions%"},"editor.suggest.showMethods":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showMethods%"},"editor.suggest.showFunctions":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFunctions%"},"editor.suggest.showConstructors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstructors%"},"editor.suggest.showFields":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFields%"},"editor.suggest.showVariables":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showVariables%"},"editor.suggest.showClasses":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showClasss%"},"editor.suggest.showStructs":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showStructs%"},"editor.suggest.showInterfaces":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showInterfaces%"},"editor.suggest.showModules":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showModules%"},"editor.suggest.showProperties":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showPropertys%"},"editor.suggest.showEvents":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEvents%"},"editor.suggest.showOperators":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showOperators%"},"editor.suggest.showUnits":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUnits%"},"editor.suggest.showValues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showValues%"},"editor.suggest.showConstants":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showConstants%"},"editor.suggest.showEnums":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnums%"},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showEnumMembers%"},"editor.suggest.showKeywords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showKeywords%"},"editor.suggest.showWords":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTexts%"},"editor.suggest.showColors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showColors%"},"editor.suggest.showFiles":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFiles%"},"editor.suggest.showReferences":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showReferences%"},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showCustomcolors%"},"editor.suggest.showFolders":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showFolders%"},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showTypeParameters%"},"editor.suggest.showSnippets":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showSnippets%"},"editor.suggest.showUsers":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showUsers%"},"editor.suggest.showIssues":{type:"boolean",default:!0,description:"%editor.configuration.suggest.showIssues%"},"editor.suggest.statusBar.visible":{type:"boolean",default:!1,description:"%editor.configuration.suggest.statusBar.visible%"},"editor.suggest.preview":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.preview,description:"%editor.configuration.suggest.preview%"},"editor.suggest.details.visible":{type:"boolean",default:t.EDITOR_SUGGEST_DEFAULTS.detailsVisible,description:"%editor.configuration.suggest.details.visible%"},"editor.inlineSuggest.enabled":{type:"boolean",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,description:"%editor.configuration.inlineSuggest.enabled%"},"editor.inlineSuggest.showToolbar":{type:"string",default:t.EDITOR_INLINE_SUGGEST_DEFAULTS.showToolbar,enum:["always","onHover","never"],enumDescriptions:[(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),(0,n.localize)("editor.configuration.inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:"%editor.configuration.inlineSuggest.showToolbar%"},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!0,description:"%editor.configuration.experimental.stickyScroll%"},"editor.customCodeActionMenu.showHeaders":{type:"boolean",default:!0,description:"%editor.configuration.customCodeActionMenu.showHeaders"},"editor.useCustomCodeActionMenu":{type:"boolean",default:!0,description:"%editor.configuration.useCustomCodeActionMenu%"},"editor.letterSpacing":{type:"number",default:t.EDITOR_FONT_DEFAULTS.letterSpacing,description:"%editor.configuration.letterSpacing%"},"editor.lineNumbers":{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[(0,n.localize)("editor.configuration.lineNumbers.off","Line numbers are not rendered."),(0,n.localize)("editor.configuration.lineNumbers.on","Line numbers are rendered as absolute number."),(0,n.localize)("editor.configuration.lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),(0,n.localize)("editor.configuration.lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:"%editor.configuration.lineNumbers%"},"editor.renderFinalNewline":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderFinalNewline,description:"%editor.configuration.renderFinalNewline%"},"editor.rulers":{type:"array",items:{type:"number"},default:t.EDITOR_DEFAULTS.viewInfo.rulers,description:"%editor.configuration.rulers%"},"editor.wordSeparators":{type:"string",default:t.EDITOR_DEFAULTS.wordSeparators,description:"%editor.configuration.wordSeparators%"},"editor.tabSize":{type:"number",default:t.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:"%editor.configuration.tabSize%"},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:"%editor.configuration.insertSpaces%"},"editor.detectIndentation":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:"%editor.configuration.detectIndentation%"},"editor.roundedSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.roundedSelection,description:"%editor.configuration.roundedSelection%"},"editor.scrollBeyondLastLine":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,description:"%editor.configuration.scrollBeyondLastLine%"},"editor.scrollBeyondLastColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,description:"%editor.configuration.scrollBeyondLastColumn%"},"editor.smoothScrolling":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.smoothScrolling,description:"%editor.configuration.smoothScrolling%"},"editor.minimap.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.enabled,description:"%editor.configuration.minimap.enabled%"},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.side,description:"%editor.configuration.minimap.side%"},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.viewInfo.minimap.showSlider,description:"%editor.configuration.minimap.showSlider%"},"editor.minimap.renderCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,description:"%editor.configuration.minimap.renderCharacters%"},"editor.minimap.maxColumn":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,description:"%editor.configuration.minimap.maxColumn%"},"editor.hover.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.enabled,description:"%editor.configuration.hover.enabled%"},"editor.hover.delay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.delay,description:"%editor.configuration.hover.delay%"},"editor.hover.sticky":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.sticky,description:"%editor.configuration.hover.sticky%"},"editor.hover.hidingDelay":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.hover.hidingDelay,description:"%editor.configuration.hover.hidingDelay%"},"editor.hover.above":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.hover.above,description:"%editor.configuration.hover.above%"},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,description:"%editor.configuration.find.seedSearchStringFromSelection%"},"editor.find.autoFindInSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,description:"%editor.configuration.find.autoFindInSelection%"},"editor.find.globalFindClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.find.globalFindClipboard,description:"%editor.configuration.find.globalFindClipboard%",included:n.isOSX},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:!0,description:"%editor.configuration.find.addExtraSpaceOnTop%"},"editor.wordWrap":{type:"string",enum:["off","on","wordWrapColumn","bounded"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.wordWrap.off","Lines will never wrap."),(0,n.localize)("editor.configuration.wordWrap.on","Lines will wrap at the viewport width."),(0,n.localize)("editor.configuration.wordWrap.wordWrapColumn","Lines will wrap at `#editor.wordWrapColumn#`."),(0,n.localize)("editor.configuration.wordWrap.bounded","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],default:t.EDITOR_DEFAULTS.wordWrap,description:"%editor.configuration.wordWrap%"},"editor.wordWrapColumn":{type:"integer",default:t.EDITOR_DEFAULTS.wordWrapColumn,minimum:1,markdownDescription:"%editor.configuration.wordWrapColumn%"},"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[(0,n.localize)("editor.configuration.wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),(0,n.localize)("editor.configuration.wrappingIndent.same","Wrapped lines get the same indentation as the parent."),(0,n.localize)("editor.configuration.wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),(0,n.localize)("editor.configuration.wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],default:"same",description:"%editor.configuration.wrappingIndent%"},"editor.mouseWheelScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,markdownDescription:"%editor.configuration.mouseWheelScrollSensitivity%"},"editor.fastScrollSensitivity":{type:"number",default:t.EDITOR_DEFAULTS.viewInfo.scrollbar.fastScrollSensitivity,markdownDescription:"%editor.configuration.fastScrollSensitivity%"},"editor.multiCursorModifier":{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,n.localize)("editor.configuration.multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"alt",markdownDescription:(0,n.localize)("multiCursorModifier","The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")},"editor.multiCursorMergeOverlapping":{type:"boolean",default:t.EDITOR_DEFAULTS.multiCursorMergeOverlapping,description:"%editor.configuration.multiCursorMergeOverlapping%"},"editor.quickSuggestions":{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:!1,description:(0,n.localize)("editor.configuration.quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:!0,description:"%editor.configuration.quickSuggestions.other%"}}}],default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestions,description:"%editor.configuration.quickSuggestions%"},"editor.quickSuggestionsDelay":{type:"integer",default:t.EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,minimum:0,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.parameterHints.enabled":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.enabled,description:"%editor.configuration.parameterHints.enabled%"},"editor.parameterHints.cycle":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.parameterHints.cycle,description:"%editor.configuration.parameterHints.cycle%"},"editor.autoClosingBrackets":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),(0,n.localize)("editor.configuration.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingBrackets,description:"%editor.configuration.autoClosingBrackets%"},"editor.autoClosingQuotes":{type:"string",enum:["always","languageDefined","beforeWhitespace","never"],enumDescriptions:["",(0,n.localize)("editor.configuration.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),(0,n.localize)("editor.configuration.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],default:t.EDITOR_DEFAULTS.autoClosingQuotes,description:"%editor.configuration.autoClosingQuotes%"},"editor.autoSurround":{type:"string",enum:["languageDefined","brackets","quotes","never"],enumDescriptions:[(0,n.localize)("editor.configuration.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),(0,n.localize)("editor.configuration.autoSurround.brackets","Surround with brackets but not quotes."),(0,n.localize)("editor.configuration.autoSurround.quotes","Surround with quotes but not brackets."),""],default:t.EDITOR_DEFAULTS.autoSurround,description:"%editor.configuration.autoSurround%"},"editor.formatOnType":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnType,description:"%editor.configuration.formatOnType%"},"editor.formatOnPaste":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.formatOnPaste,description:"%editor.configuration.formatOnPaste%"},"editor.autoIndent":{type:"boolean",default:t.EDITOR_DEFAULTS.autoIndent,description:"%editor.configuration.autoIndent%"},"editor.suggestOnTriggerCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,description:"%editor.configuration.suggestOnTriggerCharacters%"},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter,markdownEnumDescriptions:["",(0,n.localize)("editor.configuration.acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter,markdownDescription:(0,n.localize)("editor.configuration.acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],enumDescriptions:[(0,n.localize)("editor.configuration.snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.inline","Show snippets suggestions with other suggestions."),(0,n.localize)("editor.configuration.snippetSuggestions.none","Do not show snippet suggestions.")],default:"inline",description:"%editor.configuration.snippetSuggestions%"},"editor.emptySelectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.emptySelectionClipboard,description:"%editor.configuration.emptySelectionClipboard%"},"editor.copyWithSyntaxHighlighting":{type:"boolean",default:t.EDITOR_DEFAULTS.copyWithSyntaxHighlighting,description:"%editor.configuration.copyWithSyntaxHighlighting%"},"editor.wordBasedSuggestions":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions,description:"%editor.configuration.wordBasedSuggestions%"},"editor.suggestSelection":{type:"string",enum:["first","recentlyUsed","recentlyUsedByPrefix"],markdownEnumDescriptions:[(0,n.localize)("editor.configuration.suggestSelection.first","Always select the first suggestion."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),(0,n.localize)("editor.configuration.suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:"%editor.configuration.suggestSelection%"},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestFontSize%"},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:"%editor.configuration.suggestLineHeight%"},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[(0,n.localize)("editor.configuration.tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),(0,n.localize)("editor.configuration.tabCompletion.off","Disable tab completions."),(0,n.localize)("editor.configuration.tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:"%editor.configuration.tabCompletion%"},"editor.suggest.filteredTypes":{type:"object",default:{keyword:!0,snippet:!0},markdownDescription:"%editor.configuration.suggest.filtered%",properties:{method:{type:"boolean",default:!0,markdownDescription:(0,n.localize)("editor.configuration.suggest.filtered.method","When set to `false` IntelliSense never shows `method` suggestions.")},function:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.function%"},constructor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constructor%"},field:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.field%"},variable:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.variable%"},class:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.class%"},struct:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.struct%"},interface:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.interface%"},module:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.module%"},property:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.property%"},event:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.event%"},operator:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.operator%"},unit:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.unit%"},value:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.value"},constant:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.constant%"},enum:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enum%"},enumMember:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.enumMember%"},keyword:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.keyword%"},text:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.text%"},color:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.color%"},file:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.file%"},reference:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.reference%"},customcolor:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.customcolor%"},folder:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.folder%"},typeParameter:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.typeParameter%"},snippet:{type:"boolean",default:!0,markdownDescription:"%editor.configuration.suggest.filtered.snippet%"}}},"editor.gotoLocation.multiple":{description:"%editor.configuration.editor.gotoLocation.multiple%",type:"string",enum:["peek","gotoAndPeek","goto"],default:t.EDITOR_DEFAULTS.contribInfo.gotoLocation.multiple,enumDescriptions:[(0,n.localize)("editor.configuration.gotoLocation.multiple.peek","Show peek view of the results (default)"),(0,n.localize)("editor.configuration.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),(0,n.localize)("editor.configuration.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},"editor.selectionHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionHighlight,description:"%editor.configuration.selectionHighlight%"},"editor.columnSelection":{type:"boolean",default:t.EDITOR_DEFAULTS.columnSelection,description:"%editor.configuration.columnSelection%"},"editor.occurrencesHighlight":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,description:"%editor.configuration.occurrencesHighlight%"},"editor.overviewRulerLanes":{type:"integer",default:3,description:"%editor.configuration.overviewRulerLanes%"},"editor.overviewRulerBorder":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.overviewRulerBorder,description:"%editor.configuration.overviewRulerBorder%"},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:"blink",description:"%editor.configuration.cursorBlinking%"},"editor.mouseWheelZoom":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,markdownDescription:"%editor.configuration.mouseWheelZoom%"},"editor.cursorSmoothCaretAnimation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.cursorSmoothCaretAnimation,description:"%editor.configuration.cursorSmoothCaretAnimation%"},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle,description:"%editor.configuration.cursorStyle%"},"editor.cursorWidth":{type:"integer",default:t.EDITOR_DEFAULTS.viewInfo.cursorWidth,markdownDescription:"%editor.configuration.cursorWidth%"},"editor.fontLigatures":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.fontLigatures,description:"%editor.configuration.fontLigatures%"},"editor.hideCursorInOverviewRuler":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler,description:"%editor.configuration.hideCursorInOverviewRuler%"},"editor.renderWhitespace":{type:"string",enum:["none","boundary","selection","all"],enumDescriptions:["",(0,n.localize)("editor.configuration.renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),(0,n.localize)("editor.configuration.renderWhitespace.selection","Render whitespace characters only on selected text."),""],default:t.EDITOR_DEFAULTS.viewInfo.renderWhitespace,description:"%editor.configuration.renderWhitespace%"},"editor.rename.enablePreview":{type:"boolean",default:!0,description:"%editor.configuration.rename.enablePreview%"},"editor.renderControlCharacters":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.renderControlCharacters,description:"%editor.configuration.renderControlCharacters%"},"editor.guides.indentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.indentation,description:"%editor.configuration.guides.indentation%"},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.highlightActiveIndentGuide,description:"%editor.configuration.guides.highlightActiveIndentation%"},"editor.guides.bracketPairs":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.guides.bracketPairs,description:"%editor.configuration.guides.bracketPairs%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",(0,n.localize)("editor.configuration.renderLineHighlight.all","Highlights both the gutter and the current line.")],default:t.EDITOR_DEFAULTS.viewInfo.renderLineHighlight,description:"%editor.configuration.renderLineHighlight%"},"editor.codeLens":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.codeLens,description:"%editor.configuration.codeLens%"},"editor.folding":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.folding,description:"%editor.configuration.folding%"},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:t.EDITOR_DEFAULTS.contribInfo.foldingStrategy,markdownDescription:"%editor.configuration.foldingStrategy%"},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:t.EDITOR_DEFAULTS.contribInfo.showFoldingControls,description:"%editor.configuration.showFoldingControls%"},"editor.matchBrackets":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.matchBrackets,description:"%editor.configuration.matchBrackets%"},"editor.glyphMargin":{type:"boolean",default:t.EDITOR_DEFAULTS.viewInfo.glyphMargin,description:"%editor.configuration.glyphMargin%"},"editor.useTabStops":{type:"boolean",default:t.EDITOR_DEFAULTS.useTabStops,description:"%editor.configuration.useTabStops%"},"editor.trimAutoWhitespace":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:"%editor.configuration.trimAutoWhitespace%"},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.stablePeek%"},"editor.dragAndDrop":{type:"boolean",default:t.EDITOR_DEFAULTS.dragAndDrop,description:"%editor.configuration.dragAndDrop%"},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[(0,n.localize)("editor.configuration.accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),(0,n.localize)("editor.configuration.accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),(0,n.localize)("editor.configuration.accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:t.EDITOR_DEFAULTS.accessibilitySupport,description:(0,n.localize)("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:t.EDITOR_DEFAULTS.showUnused,description:"%editor.configuration.showUnused%"},"editor.comments.insertSpace":{type:"boolean",default:!0,description:"%editor.configuration.comments.insertSpace%"},"editor.comments.ignoreEmptyLines":{type:"boolean",default:!0,description:"%editor.configuration.comments.ignoreEmptyLines%"},"editor.links":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.links,description:"%editor.configuration.links%"},"editor.colorDecorators":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.colorDecorators,description:"%editor.configuration.colorDecorators%"},"editor.lightbulb.enabled":{type:"string",default:t.EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,enum:[r.ShowLightbulbIconMode.Off,r.ShowLightbulbIconMode.OnCode,r.ShowLightbulbIconMode.On],enumDescriptions:[],description:"%editor.configuration.lightbulb.enabled%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.organizeImports%"},"source.fixAll":{type:"boolean",description:"%editor.configuration.codeActionsOnSave.fixAll%"}},additionalProperties:{type:"boolean"},default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,description:"%editor.configuration.codeActionsOnSave%"},"editor.codeActionsOnSaveTimeout":{type:"number",default:t.EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,description:"%editor.configuration.codeActionsOnSaveTimeout%"},"editor.codeActionsOnSaveNotification":{type:"boolean",default:!0,description:"%editor.configuration.codeActionsOnSaveNotification%"},"editor.selectionClipboard":{type:"boolean",default:t.EDITOR_DEFAULTS.contribInfo.selectionClipboard,description:"%editor.configuration.selectionClipboard%",included:n.isLinux},"editor.largeFileOptimizations":{type:"boolean",default:t.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:"%editor.configuration.largeFileOptimizations%"},"editor.defaultFormatter":{type:"string",description:"%editor.configuration.defaultFormatter%"},"editor.unicodeHighlight.ambiguousCharacters":{type:"boolean",default:!0,description:"%editor.configuration.unicodeHighlight.ambiguousCharacters%"},"editor.unicodeHighlight.allowedCharacters":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedCharacters%"},"editor.unicodeHighlight.allowedLocales":{type:"object",default:{},description:"%editor.configuration.unicodeHighlight.allowedLocales%"},"diffEditor.renderIndicators":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderIndicators,description:"%editor.configuration.renderIndicators%"},"diffEditor.minimap":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.minimap},"diffEditor.experimental.stickyScroll.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.stickyScroll.enable}},m={"editor.tokenColorCustomizations":{type:"object",description:"%editor.configuration.tokenColorCustomizations%",default:{}},"editor.askIfDiff":{type:"boolean",default:!0,description:"%editor.configuration.askIfDiff%"},"editor.showActionWhenGroupEmpty":{type:"boolean",default:!1,description:"%editor.configuration.showActionWhenGroupEmpty%"},"editor.autoSave":{type:"string",enum:["off","afterDelay","editorFocusChange","windowLostFocus"],default:"off",description:"%editor.configuration.autoSave%"},"editor.autoSaveDelay":{type:"number",default:1e3,markdownDescription:"%editor.configuration.autoSaveDelay%"},"editor.preferredFormatter":{type:"object",default:{},description:"%editor.configuration.preferredFormatter%"},"editor.previewMode":{type:"boolean",default:!0,description:"%editor.configuration.previewMode%"},"editor.preventScrollAfterFocused":{type:"boolean",default:!1,description:"%editor.configuration.preventScrollAfterFocused%"},"editor.wrapTab":{type:"boolean",default:!1,description:"%editor.configuration.wrapTab%"},"editor.enablePreviewFromCodeNavigation":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.enablePreviewFromCodeNavigation%"},"editor.minimap":{type:"boolean",default:!0},"editor.forceReadOnly":{type:"boolean",default:!1,description:"%editor.configuration.forceReadOnly%"},"editor.languageFeatureEnabledMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.languageFeatureEnabledMaxSize%"},"editor.docExtHostSyncMaxSize":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.docExtHostSyncMaxSize%"},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:"all",description:"%editor.configuration.renderLineHighlight%"},"editor.fontFamily":{type:"string",default:t.EDITOR_FONT_DEFAULTS.fontFamily},"editor.fontSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.fontSize,minimum:6},"editor.tabSize":{type:"number",default:t.EDITOR_FONT_DEFAULTS.tabSize,minimum:1,description:"%editor.configuration.tabSize%"},"editor.formatOnPaste":{type:"boolean",default:!1},"editor.detectIndentation":{type:"boolean",default:!0},"editor.renderWhitespace":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.renderWhitespace},"editor.cursorStyle":{type:"string",enum:["line","block","block-outline","line-thin","underline","underline-thin"],default:t.EDITOR_FONT_DEFAULTS.cursorStyle},"editor.insertSpaces":{type:"boolean",default:t.EDITOR_FONT_DEFAULTS.insertSpace},"editor.wordWrap":{type:"string",enum:["off","on"],default:t.EDITOR_FONT_DEFAULTS.wordWrap},"editor.wordWrapColumn":{type:"number",default:t.EDITOR_FONT_DEFAULTS.wordWrapColumn,description:"%editor.configuration.wordWrapColumn%"},"editor.readonlyFiles":{type:"array",default:[],items:{type:"string"}},"editor.formatOnSave":{type:"boolean",default:!1,description:"%editor.configuration.formatOnSave%"},"editor.formatOnSaveTimeout":{type:"number",default:750,markdownDescription:"%editor.configuration.formatOnSaveTimeout%"},"editor.lineHeight":{type:"number",default:0,description:"%editor.lineHeight.description%"},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:"%editor.configuration.maxTokenizationLineLength%"},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[(0,n.localize)("editor.configuration.semanticHighlighting.true","Semantic highlighting enabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.false","Semantic highlighting disabled for all color themes."),(0,n.localize)("editor.configuration.semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:!0,description:"%editor.configuration.semanticHighlighting.enabled%"},"editor.bracketPairColorization.enabled":{type:"boolean",default:!0,description:"%editor.configuration.bracketPairColorization.enabled%"},"editor.largeFile":{type:"number",default:4*1024*1024*1024,description:"%editor.configuration.largeFileSize%"},"editor.quickSuggestionsDelay":{type:"integer",default:100,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.modelDisposeTime":{type:"integer",default:3e3},"workbench.editorAssociations":{type:"object",markdownDescription:"%editor.configuration.workbench.editorAssociations%",default:{},additionalProperties:{type:"string"}},"editor.experimental.stickyScroll.enabled":{type:"boolean",default:!1,description:"%editor.configuration.experimental.stickyScroll.enabled%"},"editor.mouseBackForwardToNavigate":{type:"boolean",default:!0,description:"%editor.configuration.mouseBackForwardToNavigate%"},"diffEditor.renderSideBySide":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.renderSideBySide,description:"%diffEditor.configuration.renderSideBySide%"},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.ignoreTrimWhitespace,description:"%diffEditor.configuration.ignoreTrimWhitespace%"},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.enabled,description:"Controls whether the diff editor shows unchanged regions."},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.revealLineCount,description:"Controls how many lines are used for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.minimumLineCount,description:"Controls how many lines are used as a minimum for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:t.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.contextLineCount,description:"Controls how many lines are used as context when comparing unchanged regions.",minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showMoves,description:"Controls whether the diff editor should show detected code moves."},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.showEmptyDecorations,description:"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."},"diffEditor.experimental.collapseUnchangedRegions":{type:"boolean",default:t.DIFF_EDITOR_DEFAULTS.experimental.collapseUnchangedRegions,description:"Controls whether the diff editor shows unchanged regions."}};t.editorPreferenceSchema={type:"object",properties:{...v,...m}},t.EditorPreferences=Symbol("EditorPreference")},90915:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createEditorPreferenceProxy=o;const n=e(41869),r=e(24328);function o(c,p,v){return(0,n.createPreferenceProxy)(c,r.editorPreferenceSchema,{resourceUri:p,overrideIdentifier:v})}},53135:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoToLineQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=n.__importStar(e(20868)),v=e(55979),m=e(82196);class _ extends v.AbstractGotoLineQuickAccessProvider{clearDecorations(l){super.clearDecorations(l)}preview(l,h){l.revealRangeInCenter(h,p.editor.ScrollType.Smooth),this.addDecorations(l,h)}goTo(l,h,u=!0){this.gotoLocation({editor:l},{range:h,preserveFocus:u,keyMods:{alt:!1,ctrlCmd:!1}})}}let s=class{constructor(){this.prefix=":",this.description=(0,o.localize)("quickopen.goToLine.desc"),this.quickAccess=new _}getFirstSelection(){const l=this.workbenchEditorService.currentEditor,h=l?.getSelections();return h?.[0]}getRange(l=1,h=1){return{startLineNumber:l,endLineNumber:l,startColumn:h,endColumn:h}}init(){var l;this.savedViewState=(0,o.withNullAsUndefined)((l=this.workbenchEditorService.currentEditor)===null||l===void 0?void 0:l.monacoEditor.saveViewState())}getModel(){var l,h,u,d,E;const f=this.workbenchEditorService.currentEditor,a=this.getFirstSelection();if(!a||!f)return{onType:(S,w)=>{w([new c.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const b=(l=a.positionLineNumber)!==null&&l!==void 0?l:1,y=(h=a.positionColumn)!==null&&h!==void 0?h:1,A=(E=(d=(u=f.currentDocumentModel)===null||u===void 0?void 0:u.getMonacoModel())===null||d===void 0?void 0:d.getLineCount())!==null&&E!==void 0?E:1;return{onType:(S,w)=>{const T=S.split(/,|:|#|:|,/).map(O=>parseInt(O,10)).filter(O=>!isNaN(O)),D=T[0],I=T[1];if(D){let O=(0,o.formatLocalize)("quickopen.goToLine.lineInfo",D);I&&(O+=(0,o.formatLocalize)("quickopen.goToLine.colInfo",I));const M=this.getRange(D,I);w([new c.QuickOpenItem({label:O,run:R=>R===c.Mode.PREVIEW?(this.quickAccess.preview(f.monacoEditor,M),!1):(this.quickAccess.goTo(f.monacoEditor,M,!0),!0)})])}else this.quickAccess.clearDecorations(f.monacoEditor),w([new c.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",b,y,A),run:()=>!1})])}}}getOptions(){return{}}onClose(l){const h=this.workbenchEditorService.currentEditor;h&&(h.monacoEditor.focus(),this.quickAccess.clearDecorations(h.monacoEditor),l&&this.savedViewState&&h.monacoEditor.restoreViewState(this.savedViewState))}};t.GoToLineQuickOpenHandler=s,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],s.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorService)],s.prototype,"workbenchEditorService",void 0),t.GoToLineQuickOpenHandler=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},50236:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymbolInformationQuickOpenItem=t.WorkspaceSymbolQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(97821),v=e(51500),m=e(40540),_=e(23418);let s=class extends p.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,c.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(d){await d.openSide()}};s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s);let g=class{hasActions(){return!0}getActions(){return[this.workspaceSymbolOpenSideActionOpen]}};n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s)],g.prototype,"workspaceSymbolOpenSideActionOpen",void 0),g=n.__decorate([(0,r.Injectable)()],g);let l=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,c.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(d,E)=>{if(d===""){E([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(d==="#")return void E([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){E([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const f=d[0]==="#",a=[];this.cancellationSource.cancel();const b=new o.CancellationTokenSource;this.cancellationSource=b;const y={query:f?d.slice(1):d},A=this.reporterService.time(c.REPORT_NAME.QUICK_OPEN_MEASURE);Promise.all(this.languageService.workspaceSymbolProviders.map(async S=>{let w=await S.provideWorkspaceSymbols(y,b.token);if(f&&(w=w?.filter(T=>T.kind===m.SymbolKind.Class)),w&&w.length&&!b.token.isCancellationRequested){const T=await Promise.all(w.map(async D=>{const I=await this.workspaceService.asRelativePath(new o.URI(D.location.uri).parent);return new h(D,S,this.workbenchEditorService,b.token,I?.path||"")}));a.push(...T),E(a,this.workspaceSymbolActionProvider)}return w})).catch(S=>{this.logger.log(S)}).finally(()=>{b.token.isCancellationRequested||(a.length||E([]),A.timeEnd(f?"class":"symbol",{lookFor:d,stat:{symbol:a.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(d,E)=>new o.QuickOpenItem({label:(0,c.localize)(E.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};t.WorkspaceSymbolQuickOpenHandler=l,n.__decorate([(0,r.Autowired)(_.ILanguageService),n.__metadata("design:type",Object)],l.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",_.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g)],l.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,r.Autowired)(c.IReporterService),n.__metadata("design:type",Object)],l.prototype,"reporterService",void 0),t.WorkspaceSymbolQuickOpenHandler=l=n.__decorate([(0,r.Injectable)()],l);class h extends o.QuickOpenItem{constructor(d,E,f,a,b){super({}),this.symbol=d,this.provider=E,this.workbenchEditorService=f,this.token=a,this.relativePath=b}getLabel(){return this.symbol.name}getUri(){return new o.URI(this.symbol.location.uri)}getIconClass(){return(0,o.getSymbolIcon)(this.symbol.kind)}getDescription(){const d=this.symbol.containerName;return`${d?`${d} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(d){if(!d)return;const{start:E,end:f}=d;return{startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:f.line+1,endColumn:f.character+1}}open(d,E){this.workbenchEditorService.open(d,{range:this.fromRange(E)})}run(d){const E=this.getUri();return d===o.QuickOpenMode.OPEN&&this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(f=>{f?this.open(E,f.location.range):this.open(E,this.symbol.location.range)}),!0}openSide(){const d=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(E=>{this.workbenchEditorService.open(d,{preview:!1,split:_.EditorGroupSplitAction.Right,range:this.fromRange(E?E.location.range:this.symbol.location.range),focus:!0})})}}t.SymbolInformationQuickOpenItem=h},80200:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(23418),{addElement:v}=c.arrays;let m=class extends o.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new c.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new c.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new c.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(l){const h=l.payload;if(this.resources.has(h.toString())){const u=this.resources.get(h.toString());this.doGetResource(h).then(d=>{u&&(Object.assign(u?.resource,d?.resource),u.provider=d?.provider),this.eventBus.fire(new p.ResourceDidUpdateEvent(h))})}}onResourceDecorationNeedChangeEvent(l){this.getResourceDecoration(l.payload.uri);let h=!1;const u=this.resourceDecoration.get(l.payload.uri.toString())||{};new Set([...Object.keys(u),...Object.keys(l.payload.decoration)]).forEach(d=>{u[d]!==l.payload.decoration[d]&&(h=!0)}),h&&(Object.assign(this.resourceDecoration.get(l.payload.uri.toString()),l.payload.decoration),this.eventBus.fire(new p.ResourceDecorationChangeEvent(l.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(l=>l.scheme).filter(Boolean)}async getResource(l){if(!this.resources.has(l.toString())){const h=await this.doGetResource(l);if(!h)return null;const u={resource:h.resource,provider:h.provider};this.resources.set(l.toString(),u)}return this.resources.get(l.toString()).resource}handlesUri(l){return!!this.calculateProvider(l)}async doGetResource(l){if(!this.gettingResources.has(l.toString())){const h=(async()=>{const u=this.calculateProvider(l);if(u){const d=await u.provideResource(l);return d.uri=l,{resource:d,provider:u}}else return this.logger.error("URI has no resource provider: "+l),null})();this.gettingResources.set(l.toString(),h),h.finally(()=>{this.gettingResources.delete(l.toString())})}return this.gettingResources.get(l.toString())}registerResourceProvider(l){this.onRegisterResourceProviderEmitter.fire(l);const h=new c.Disposable;return h.addDispose(v(this.providers,l)),h.addDispose({dispose:()=>{for(const u of this.resources.values())u.provider===l&&(u.provider=s,this.onUnregisterResourceProviderEmitter.fire(l));this.cachedProvider.clear()}}),this.cachedProvider.clear(),h}async shouldCloseResource(l,h){const u=this.getProvider(l.uri);return!u||!u.shouldCloseResource?!0:await u.shouldCloseResource(l,h)}async shouldCloseResourceWithoutConfirm(l){const h=this.getProvider(l.uri);return h&&h.shouldCloseResourceWithoutConfirm?await h.shouldCloseResourceWithoutConfirm(l):!1}async close(l,h){const u=this.getProvider(l.uri);return!u||!u.close?!0:await u.close(l,h)}calculateProvider(l){if(this.cachedProvider.has(l.toString()))return this.cachedProvider.get(l.toString());let h,u={weight:-1,index:-1};function d(E,f,a){u={weight:f,index:a},h=E}return this.providers.forEach((E,f)=>{let a=-1;E.handlesUri?a=E.handlesUri(l):E.scheme&&(a=E.scheme===l.scheme?10:-1),a>=0&&(a>u.weight||a===u.weight&&f>u.index)&&d(E,a,f)}),this.cachedProvider.set(l.toString(),h),h}getProvider(l){const h=this.resources.get(l.toString());if(h)return h.provider}getResourceDecoration(l){return this.resourceDecoration.has(l.toString())||this.resourceDecoration.set(l.toString(),{..._}),this.resourceDecoration.get(l.toString())}getResourceSubname(l,h){const u=this.getProvider(l.uri);return u&&u.provideResourceSubname?u.provideResourceSubname(l,h):null}disposeResource(l){const h=this.getProvider(l.uri);if(this.resources.delete(l.uri.toString()),this.resourceDecoration.delete(l.uri.toString()),!(!h||!h.onDisposeResource))return h.onDisposeResource(l)}};t.ResourceServiceImpl=m,n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),n.__decorate([(0,o.OnEvent)(p.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,o.OnEvent)(p.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onResourceDecorationNeedChangeEvent",null),t.ResourceServiceImpl=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m);const _={dirty:!1,readOnly:!1},s={handlesUri:()=>-1,provideResource:g=>({uri:g,name:"",icon:""})}},52795:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorActions=t.Tabs=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(25918),v=e(1149),m=e(63373),_=e(93899),s=e(48560),g=e(43718),l=e(23418),h=e(19352),u=n.__importDefault(e(62711)),d=e(78680),E=e(82196),f=e(50674),a=e(72570).UU,b=({group:A})=>{const S=(0,o.useRef)(),w=(0,o.useRef)(),T=(0,o.useRef)(),D=(0,o.useRef)(null),I=(0,o.useRef)(null),O=(0,s.useInjectable)(l.ResourceService),M=(0,s.useInjectable)(c.IEventBus),R=(0,o.useContext)(c.ConfigContext),P=(0,s.useInjectable)(l.WorkbenchEditorService),k=(0,s.useInjectable)(d.TabTitleMenuService),F=(0,s.useInjectable)(c.PreferenceService),L=(0,s.useInjectable)(_.IMenuRegistry),B=(0,s.useInjectable)(E.IEditorTabService),j=(0,s.useInjectable)(v.LayoutViewSizeConfig),W=(0,s.useInjectable)(c.ComponentRegistry),U=(0,c.useDesignStyles)(u.default.tab_right,"tab_right"),Q=(0,c.useDesignStyles)(u.default.close_tab,"close_tab"),V=(0,c.useDesignStyles)(u.default.kt_editor_close_icon,"kt_editor_close_icon"),$=(0,c.useDesignStyles)(u.default.kt_editor_tabs_content,"kt_editor_tabs_content"),Y=(0,c.useDesignStyles)(u.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),z=(0,c.useDesignStyles)(u.default.kt_editor_tab,"kt_editor_tab"),H=(0,c.useDesignStyles)(u.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),K=(0,c.useDesignStyles)(u.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),Z=(0,c.useDesignStyles)(u.default.kt_editor_tab_current,"kt_editor_tab_current"),X=(0,c.useDesignStyles)(u.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),ie=(0,c.useDesignStyles)(u.default.kt_editor_tabs,"kt_editor_tabs"),oe=(0,c.useDesignStyles)(u.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[le,pe]=(0,o.useState)({}),[q,Ee]=(0,o.useState)(!!F.get("editor.wrapTab")),[_e,te]=(0,o.useState)(new Map),[ge,Te]=(0,o.useState)(),Pe=(0,o.useMemo)(()=>(0,c.getSlotLocation)(a,R.layoutConfig),[]),Ae=o.default.useMemo(()=>{var Se,Fe;const Ge=(Fe=(Se=W.getComponentRegistryInfo(l.TabbarRightExtraContentId))===null||Se===void 0?void 0:Se.views)===null||Fe===void 0?void 0:Fe[0];if(Ge)return Ge},[]);(0,f.useUpdateOnGroupTabChange)(A),(0,s.useUpdateOnEventBusEvent)(l.ResourceDidUpdateEvent,[A.resources],Se=>!!T&&A.resources.findIndex(Fe=>Fe.uri.isEqual(Se))!==-1),(0,o.useEffect)(()=>{const Se=new c.Disposable;return Se.addDispose(A.onDidEditorGroupContentLoading(Fe=>{var Ge;(Ge=A.resourceStatus.get(Fe))===null||Ge===void 0||Ge.finally(()=>{pe(Object.assign({},le,{[Fe.uri.toString()]:!1}))}),pe(Object.assign({},le,{[Fe.uri.toString()]:!0}))})),Se.addDispose(A.onDidEditorGroupTabChanged(()=>{q||be()})),()=>{Se.dispose()}},[A]);const we=(0,o.useCallback)((Se,Fe,Ge)=>{if(Se.dataTransfer.getData("uri")){const Ke=new c.URI(Se.dataTransfer.getData("uri"));let ft;Se.dataTransfer.getData("uri-source-group")&&(ft=P.getEditorGroup(Se.dataTransfer.getData("uri-source-group"))),A.dropUri(Ke,E.DragOverPosition.CENTER,ft,Ge)}Se.dataTransfer.files.length>0&&M.fire(new E.EditorGroupFileDropEvent({group:A,tabIndex:Fe,files:Se.dataTransfer.files}))},[A]),be=(0,o.useCallback)(()=>{c.fastdom.measure(()=>{try{if(S.current&&A.currentResource){const Se=S.current.querySelector("."+u.default.kt_editor_tab+"[data-uri='"+A.currentResource.uri.toString()+"']");Se&&Se.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[A,S.current]),fe=(0,o.useCallback)(()=>{D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{c.fastdom.measure(()=>{var Se;const Fe=(Se=I.current)===null||Se===void 0?void 0:Se.offsetWidth;Fe!==ge&&Te(Fe)})},200)},[I.current,D.current,ge]);(0,o.useEffect)(()=>{q||queueMicrotask(()=>{be()})},[q,S.current]),(0,o.useEffect)(()=>{if(!q){const Se=new c.Disposable;return S.current&&Se.addDispose(new c.DomListener(S.current,"mousewheel",y)),Se.addDispose(M.onDirective(c.ResizeEvent.createDirective(Pe),()=>{be()})),Se.addDispose(M.onDirective(E.GridResizeEvent.createDirective(A.grid.uid),()=>{be()})),()=>{Se.dispose()}}},[q]);const xe=(0,o.useCallback)(()=>{c.fastdom.measureAtNextFrame(()=>{if(T.current&&q){const Se=new Map;let Fe,Ge;const Ke=Array.from(T.current.children);Ke.pop(),Ke.forEach(ft=>{ft.offsetTop!==Fe&&(Fe=ft.offsetTop,Ge&&Se.set(Ke.indexOf(Ge),!0)),Ge=ft,Se.set(Ke.indexOf(ft),!1)}),te(Se)}})},[T.current,q]);(0,o.useEffect)(()=>{fe()},[I.current,q]),(0,o.useEffect)(xe,[q,T.current,A,A.resources.length]),(0,o.useEffect)(()=>{const Se=new c.DisposableCollection;return Se.push(M.onDirective(c.ResizeEvent.createDirective(Pe),()=>{xe()})),Se.push(F.onPreferenceChanged(Fe=>{Fe.preferenceName==="editor.wrapTab"&&Ee(!!Fe.newValue)})),Se.push(P.onDidCurrentEditorGroupChanged(()=>{fe()})),Se.push(c.Event.debounce(c.Event.filter(L.onDidChangeMenu,Fe=>Fe===_.MenuId.EditorTitle),()=>{},200)(()=>{fe()})),()=>{Se.dispose()}},[]),(0,o.useEffect)(()=>{const Se=new c.DisposableCollection;return Se.push(A.onDidEditorFocusChange(()=>{fe()})),()=>{Se.dispose()}},[A]);const Re=(0,o.useCallback)(Se=>{Se.preventDefault(),Se.stopPropagation(),w.current&&w.current.classList.add(u.default.kt_on_drag_over)},[w.current]),Be=(0,o.useCallback)(Se=>{w.current&&w.current.classList.remove(u.default.kt_on_drag_over)},[w.current]),me=(0,o.useCallback)(Se=>{w.current&&w.current.classList.remove(u.default.kt_on_drag_over),we&&we(Se,-1)},[we,w.current]),re=(0,o.useCallback)(Se=>{Se.target===Se.currentTarget&&P.createUntitledResource()},[P]),he=o.default.useCallback((Se,Fe)=>{const Ge=O.getResourceDecoration(Se.uri),Ke=O.getResourceSubname(Se,A.resources);return B.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:le[Se.uri.toString()]?"loading_indicator":(0,r.default)(Se.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Fe?"true":"false"},Se.name),Ke?o.default.createElement("div",{className:u.default.subname},Ke):null,Ge.readOnly?o.default.createElement("span",{className:(0,r.default)((0,c.getExternalIcon)("lock"),u.default.editor_readonly_icon)}):null,o.default.createElement("div",{className:U},o.default.createElement("div",{className:(0,r.default)({[u.default.kt_hidden]:!Ge.dirty,[u.default.dirty]:!0})}),o.default.createElement("div",{className:Q,onMouseDown:ft=>{ft.stopPropagation(),A.close(Se.uri)}},B.renderTabCloseComponent(o.default.createElement("div",{className:(0,r.default)((0,c.getIcon)("close"),V),tabIndex:0,role:"button","aria-label":(0,g.formatLocalize)("editor.closeTab.title",Se.name)}))))),Fe)},[B]),Oe=()=>{const Se=A.resources.length===0,Fe=A.resources.findIndex(Ge=>A.currentResource===Ge);return o.default.createElement("div",{draggable:!1,className:(0,r.default)({[$]:!0,[u.default.kt_editor_tabs_content_empty]:Se,[Y]:Fe===A.resources.length-1}),ref:T,role:"tablist"},A.resources.map((Ge,Ke)=>{let ft;const ot=O.getResourceDecoration(Ge.uri);return o.default.createElement("div",{draggable:!0,title:Ge.title,className:(0,r.default)({[z]:!0,[u.default.last_in_row]:_e.get(Ke),[H]:Fe-1===Ke,[K]:Fe+1===Ke,[Z]:A.currentResource===Ge,[u.default.kt_editor_tab_preview]:A.previewURI&&A.previewURI.isEqual(Ge.uri),[X]:ot.dirty}),style:q&&Ke===A.resources.length-1?{marginRight:ge,height:j.editorTabsHeight}:{height:j.editorTabsHeight},onContextMenu:Mt=>{k.show(Mt.nativeEvent.x,Mt.nativeEvent.y,Ge&&Ge.uri,A),Mt.preventDefault()},key:Ge.uri.toString(),onMouseUp:Mt=>{Mt.nativeEvent.button===c.MouseEventButton.Middle&&(Mt.preventDefault(),Mt.stopPropagation(),A.close(Ge.uri))},onMouseDown:Mt=>{Mt.nativeEvent.button===c.MouseEventButton.Left&&A.open(Ge.uri,{focus:!0})},"data-uri":Ge.uri.toString(),onDragOver:Mt=>{Mt.preventDefault(),Mt.stopPropagation(),ft&&ft.classList.add(u.default.kt_on_drag_over)},onDragLeave:Mt=>{ft&&ft.classList.remove(u.default.kt_on_drag_over)},onDrop:Mt=>{ft&&ft.classList.remove(u.default.kt_on_drag_over),we&&we(Mt,Ke,Ge)},onDoubleClick:Mt=>{A.pinPreviewed(Ge.uri)},ref:Mt=>ft=Mt,onDragStart:Mt=>{Mt.dataTransfer.setData("uri",Ge.uri.toString()),Mt.dataTransfer.setData("uri-source-group",A.name)}},he(Ge,A.currentResource===Ge))}))};return o.default.createElement("div",{id:m.VIEW_CONTAINERS.EDITOR_TABS,className:ie},o.default.createElement("div",{className:oe,ref:w,onDragOver:Re,onDragLeave:Be,onDrop:me,onDoubleClick:re},q?o.default.createElement("div",{className:u.default.kt_editor_wrap_container},Oe()):o.default.createElement(h.Scroll,{forwardedRef:Se=>Se?S.current=Se:null,className:u.default.kt_editor_tabs_scroll},Oe())),o.default.createElement(t.EditorActions,{className:(0,r.default)({[u.default.kt_editor_wrap_mode_action]:q}),ref:I,group:A}),(0,c.renderView)(Ae))};t.Tabs=b,t.EditorActions=(0,o.forwardRef)((A,S)=>{const w=(0,c.useDesignStyles)(u.default.editor_actions,"editor_actions"),{group:T,className:D}=A,I=(0,o.useCallback)(()=>{var W,U;return T.currentResource?[T.currentResource.uri,T,((W=T.currentOrPreviousFocusedEditor)===null||W===void 0?void 0:W.currentUri)||((U=T.currentEditor)===null||U===void 0?void 0:U.currentUri)]:void 0},[T]),O=(0,s.useInjectable)(E.IEditorActionRegistry),M=(0,s.useInjectable)(l.WorkbenchEditorService),R=(0,s.useInjectable)(v.LayoutViewSizeConfig),P=O.getMenu(T),[k,F]=(0,o.useState)(M.currentEditorGroup===T),[L,B]=(0,o.useState)(I()),j=P.getMergedMenuNodes().length===0;return(0,o.useEffect)(()=>{const W=new c.DisposableCollection;return W.push(M.onDidCurrentEditorGroupChanged(()=>{F(M.currentEditorGroup===T)})),W.push(M.onActiveResourceChange(()=>{B(I())})),W.push(T.onDidEditorGroupTabChanged(()=>{B(I())})),()=>{W.dispose()}},[T]),o.default.createElement("div",{ref:S,className:(0,r.default)(w,D,{[u.default.editor_actions_no_actions]:j}),style:{height:R.editorTabsHeight}},o.default.createElement(p.InlineMenuBar,{menus:P,context:L,regroup:(W,U)=>k?[W,U]:[[],U]}))});function y(A){(this.offsetWidth+this.scrollLeft+A.deltaX>this.scrollWidth||this.scrollLeft+A.deltaX<0)&&A.preventDefault()}},82196:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEditorTabService=t.ResoucesOfActiveComponentChangedEvent=t.CodeEditorDidVisibleEvent=t.EditorComponentDisposeEvent=t.ResourceOpenTypeChangedEvent=t.IEditorFeatureRegistry=t.IBreadCrumbService=t.CompareResult=t.ICompareService=t.IEditorActionRegistry=t.EditorDecorationTypeRemovedEvent=t.EditorDecorationChangeEvent=t.EditorDecorationProviderRegistrationEvent=t.RegisterEditorSideComponentEvent=t.EditorGroupsResetSizeEvent=t.EditorGroupIndexChangedEvent=t.EditorConfigurationChangedEvent=t.EditorVisibleChangeEvent=t.EditorSelectionChangeEvent=t.IEditorDecorationCollectionService=t.EditorGroupFileDropEvent=t.EditorActiveResourceStateChangedEvent=t.EditorGroupChangeEvent=t.EditorGroupDisposeEvent=t.EditorGroupCloseEvent=t.EditorGroupOpenEvent=t.GridResizeEvent=t.BrowserEditorContribution=t.EditorComponentRegistry=t.RegisterEditorComponentEvent=t.RegisterEditorComponentResolverEvent=t.EditorComponentRenderMode=void 0;const n=e(85608),r=e(41869);n.__exportStar(e(23418),t);var o;(function(R){R[R.ONE_PER_RESOURCE=1]="ONE_PER_RESOURCE",R[R.ONE_PER_GROUP=2]="ONE_PER_GROUP",R[R.ONE_PER_WORKBENCH=3]="ONE_PER_WORKBENCH"})(o||(t.EditorComponentRenderMode=o={}));class c extends r.BasicEvent{}t.RegisterEditorComponentResolverEvent=c;class p extends r.BasicEvent{}t.RegisterEditorComponentEvent=p;class v{}t.EditorComponentRegistry=v,t.BrowserEditorContribution=Symbol("BrowserEditorContribution");class m extends r.BasicEvent{static createDirective(P){return`grid-resize-${P}`}}t.GridResizeEvent=m;class _ extends r.BasicEvent{}t.EditorGroupOpenEvent=_;class s extends r.BasicEvent{}t.EditorGroupCloseEvent=s;class g extends r.BasicEvent{}t.EditorGroupDisposeEvent=g;class l extends r.BasicEvent{}t.EditorGroupChangeEvent=l;class h extends r.BasicEvent{}t.EditorActiveResourceStateChangedEvent=h;class u extends r.BasicEvent{}t.EditorGroupFileDropEvent=u,t.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class d extends r.BasicEvent{}t.EditorSelectionChangeEvent=d;class E extends r.BasicEvent{}t.EditorVisibleChangeEvent=E;class f extends r.BasicEvent{}t.EditorConfigurationChangedEvent=f;class a extends r.BasicEvent{}t.EditorGroupIndexChangedEvent=a;class b extends r.BasicEvent{}t.EditorGroupsResetSizeEvent=b;class y extends r.BasicEvent{}t.RegisterEditorSideComponentEvent=y;class A extends r.BasicEvent{}t.EditorDecorationProviderRegistrationEvent=A;class S extends r.BasicEvent{}t.EditorDecorationChangeEvent=S;class w extends r.BasicEvent{}t.EditorDecorationTypeRemovedEvent=w,t.IEditorActionRegistry=Symbol("IEditorActionRegistry"),t.ICompareService=Symbol("ICompareService");var T;(function(R){R.revert="revert",R.accept="accept",R.cancel="cancel"})(T||(t.CompareResult=T={})),t.IBreadCrumbService=Symbol("IBreadScrumbService"),t.IEditorFeatureRegistry=Symbol("IEditorFeatureRegistry");class D extends r.BasicEvent{}t.ResourceOpenTypeChangedEvent=D;class I extends r.BasicEvent{}t.EditorComponentDisposeEvent=I;class O extends r.BasicEvent{}t.CodeEditorDidVisibleEvent=O;class M extends r.BasicEvent{}t.ResoucesOfActiveComponentChangedEvent=M,t.IEditorTabService=Symbol("IEditorTabService")},17878:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.UntitledSchemeResourceProvider=t.UntitledSchemeDocumentProvider=t.UntitledDocumentIdCounter=void 0;const r=e(85608),o=e(76003),c=e(41869),p=e(72665),v=e(51500),m=e(23418),_=e(96689);let s=n=class{constructor(){this._id=1}async update(){this._id=await this.getLatestUnitiedIndex()}async getLatestUnitiedIndex(u){var d;await this.workspaceService.whenReady;const a=(u||((d=this.workspaceService.workspace)===null||d===void 0?void 0:d.children)||[]).filter(b=>c.URI.file(b.uri).displayName.startsWith(n.UNTITLED_FILE_NAME_PREFIX)).map(b=>{const y=c.URI.file(b.uri).displayName.match(new RegExp(`^${n.UNTITLED_FILE_NAME_PREFIX}(\\d+)`,"i"));return y?parseInt(y[1],10):-1}).filter(b=>b!==-1);return a.length>0?Math.max(...a)+1:1}get id(){return this._id++}};t.UntitledDocumentIdCounter=s,s.UNTITLED_FILE_NAME_PREFIX="Untitled-",r.__decorate([(0,o.Autowired)(v.IWorkspaceService),r.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),t.UntitledDocumentIdCounter=s=n=r.__decorate([(0,o.Injectable)()],s);let g=class{constructor(){this._onDidChangeContent=new c.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(u){return u===c.Schemes.untitled}async provideEncoding(u){return this.preferenceService.get("files.encoding",void 0,u.toString(),(0,c.getLanguageIdFromMonaco)(u))||"utf8"}async provideEOL(u){const d=await this.applicationService.getBackendOS(),E=this.preferenceService.get("files.eol","auto",u.toString(),(0,c.getLanguageIdFromMonaco)(u));return E!=="auto"?E:d===c.OperatingSystem.Windows?`\r
31542
31542
  `:`
31543
- `}async provideEditorDocumentModelContent(u,d){return""}isReadonly(u){return!1}isAlwaysDirty(u){return!0}disposeEvenDirty(u){return!0}closeAutoSave(u){return!0}async saveDocumentModel(u,d,E,f,a,b=!1){const{name:y}=u.getParsedQuery(),A=u.path.toString()!=="/"?c.path.dirname(u.path.toString()):this.appConfig.workspaceDir,S=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:y||u.displayName,defaultUri:c.URI.file(c.isWindows?A.replaceAll("\\","/"):A)});return S&&(await this.editorDocumentModelService.saveEditorDocumentModel(S,d,E,f,a,b),await this.workbenchEditorService.open(S,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:c.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};t.UntitledSchemeDocumentProvider=g,r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],g.prototype,"editorDocumentModelService",void 0),r.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),r.__metadata("design:type",m.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(c.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(c.AppConfig),r.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(c.IApplicationService),r.__metadata("design:type",Object)],g.prototype,"applicationService",void 0),r.__decorate([(0,o.Autowired)(s),r.__metadata("design:type",s)],g.prototype,"untitledIndex",void 0),r.__decorate([(0,o.Autowired)(c.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),t.UntitledSchemeDocumentProvider=g=r.__decorate([(0,o.Injectable)()],g);let l=class extends c.WithEventBus{constructor(){super(...arguments),this.scheme=c.Schemes.untitled}provideResource(u){const{name:d}=u.getParsedQuery();return{name:d||u.displayName,uri:u,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");return!!(d&&d.dirty)}async close(u,d){const E=this.documentModelService.getModelReference(u.uri,"close-resource-check");if(!E)return!1;if(d===m.AskSaveResult.SAVE){const f=await E.instance.save();return E.dispose(),f}else return d===m.AskSaveResult.REVERT?(await E.instance.revert(),E.dispose(),!0):!d||d===m.AskSaveResult.CANCEL?(E.dispose(),!1):(E.dispose(),!0)}async shouldCloseResource(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");if(!d||!d.dirty)return!0;const E={[(0,c.localize)("file.prompt.dontSave","Don't Save")]:m.AskSaveResult.REVERT,[(0,c.localize)("file.prompt.save","Save")]:m.AskSaveResult.SAVE,[(0,c.localize)("file.prompt.cancel","Cancel")]:m.AskSaveResult.CANCEL},f=await this.dialogService.open({message:(0,c.formatLocalize)("saveChangesMessage",u.name),type:c.MessageType.Info,buttons:Object.keys(E)});return await this.close(u,E[f])}};t.UntitledSchemeResourceProvider=l,r.__decorate([(0,o.Autowired)(p.IDialogService),r.__metadata("design:type",Object)],l.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],l.prototype,"documentModelService",void 0),t.UntitledSchemeResourceProvider=l=r.__decorate([(0,o.Injectable)()],l)},33835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditor=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(23418),p=e(96689),v=m=>{const _=r.default.useRef(),s=(0,o.useInjectable)(c.EditorCollectionService),g=(0,o.useInjectable)(p.IEditorDocumentModelService),[l,h]=r.default.useState(void 0),[u,d]=r.default.useState(void 0),[E,f]=r.default.useState(void 0),[a,b]=r.default.useState(void 0);let y=!1;return r.default.useEffect(()=>{if(_.current){l&&l.dispose();const A=s.createCodeEditor(_.current,{automaticLayout:!0,...m.options});h(A),u&&A.open(u)}return()=>{y=!0,l&&l.dispose(),u&&u.dispose()}},[_.current]),m&&l&&m.editorRef&&m.editorRef(l),E&&a!==E&&(b(E),g.createModelReference(new o.URI(E),"editor-react-component").then(A=>{u&&u.dispose(),!y&&A.instance.uri.toString()===E?d(A):A.dispose()})),u&&l&&l.currentDocumentModel!==u.instance&&l.open(u),m.uri&&m.uri.toString()!==E&&f(m.uri.toString()),r.default.createElement("div",{ref:A=>A&&(_.current=A),...m})};t.CodeEditor=v},50674:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateOnGroupTabChange=r;const n=e(41869);function r(o){return(0,n.useUpdateOnEvent)(o.onDidEditorGroupTabChanged,[o])}},6670:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSuggestWidgetContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(76835);let v=class{contribute(_){const s=new o.DisposableCollection,g=_.monacoEditor.getContribution(p.SuggestController.ID);if(g&&g.widget&&g.widget.value){const l=g.widget.value;s.push(l.onDidSelect(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:h}))})),s.push(l.onDidHide(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:h}))})),s.push(l.onDidShow(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:h}))})),s.push(l.onDidFocus(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:h}))})),l&&l._setDetailsVisible&&l._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return s}};t.EditorSuggestWidgetContribution=v,n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),t.EditorSuggestWidgetContribution=v=n.__decorate([(0,r.Injectable)()],v)},67903:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTopPaddingContribution=void 0;class e{contribute(r){return r.monacoEditor.onDidChangeModel(()=>{r.monacoEditor.changeViewZones(o=>{o.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})})})}}t.EditorTopPaddingContribution=e},51553:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorGroup=t.WorkbenchEditorServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(91830),p=e(75524),v=e(43718),m=e(14951),_=n.__importStar(e(20868)),s=e(72665),g=e(23418),l=e(96689),h=e(76759),u=e(47049),d=e(82196),E=e(17878),f=10,a=w=>!!(w.supportsRevive&&!w.deleted);let b=class extends v.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new v.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new v.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new v.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new v.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new v.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new v.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new v.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.editorGroupIdGen=0,this.untitledIndex.update(),this.initialize()}setEditorContextKeyService(T){this.editorContextKeyService=T}setCurrentGroup(T){var D;if(T){if(this._currentEditorGroup===T)return;this._currentEditorGroup=T,this._onActiveResourceChange.fire(T.currentResource),this.eventBus.fire(new d.EditorActiveResourceStateChangedEvent({resource:T.currentResource,openType:T.currentOpenType,editorUri:(D=this.currentEditor)===null||D===void 0?void 0:D.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(T){var D;T.payload.group===this.currentEditorGroup&&this.eventBus.fire(new d.EditorActiveResourceStateChangedEvent({resource:T.payload.newResource,openType:T.payload.newOpenType,editorUri:(D=this.currentEditor)===null||D===void 0?void 0:D.currentUri}))}getAllOpenedUris(){const T=[];for(const D of this.editorGroups)for(const I of D.resources)T.findIndex(M=>M.isEqual(I.uri))===-1&&T.push(I.uri);return T}async getAllOpenedDocuments(){const T=[];for(const D of this.editorGroups)for(const I of D.resources){if(I.uri.scheme!=="file")continue;if(T.findIndex(M=>M.uri.isEqual(I.uri))===-1){const M=await D.getDocumentModelRef(I.uri);M&&T.push(M.instance)}}return T}async save(T){if(this.editorGroups.length)try{for(const D of this.editorGroups){const I=D.resources.find(O=>O.uri.isEqual(T));I&&await D.saveResource(I)}return T}catch(D){throw new Error(`Save Failed: ${D.message}`)}}getDefaultSavePath(T){const D=T.path.toString()!=="/"?v.path.dirname(T.path.toString()):this.appConfig.workspaceDir;return v.isWindows?D.replace(/\\/g,"/"):D}async saveAs(T){var D,I;if(!(!this._currentEditorGroup||!((D=this._currentEditorGroup.currentResource)===null||D===void 0)&&D.deleted))try{const O=this.getDefaultSavePath(T);return await this.windowDialogService.showSaveDialog({saveLabel:"SaveAs File:",showNameInput:!0,defaultFileName:(I=this._currentEditorGroup.currentResource)===null||I===void 0?void 0:I.name,defaultUri:v.URI.file(O),saveAs:!0})}catch(O){throw new Error(`SaveAs Failed: ${O.message}`)}}async saveAll(T,D){for(const I of this.editorGroups)await I.saveAll(T,D)}hasDirty(){for(const T of this.editorGroups)if(T.hasDirty())return!0;return!1}calcDirtyCount(){const T=new Set;return this.editorGroups.reduce((D,I)=>D+I.calcDirtyCount(T),0)}createEditorGroup(){const T=this.injector.get(y,[this.generateRandomEditorGroupName(),this.editorGroupIdGen++]);this.editorGroups.push(T);const D=new v.Disposable(T.onDidEditorGroupBodyChanged(()=>{T===this.currentEditorGroup&&(!T.currentOpenType&&T.currentResource||this._onActiveResourceChange.fire(T.currentResource))}),T.onDidEditorFocusChange(()=>{var O;T===this.currentEditorGroup&&(!T.currentOpenType&&T.currentResource||this._onActiveEditorUriChange.fire((O=T.currentOrPreviousFocusedEditor)===null||O===void 0?void 0:O.currentUri))}));T.addDispose({dispose:()=>{D.dispose()}});const I=T.onDidEditorGroupTabChanged(()=>{this.saveOpenedResourceState()});return T.addDispose({dispose:()=>{I.dispose()}}),T.onCurrentEditorCursorChange(O=>{this._currentEditorGroup===T&&this._onCursorChange.fire(O)}),T}generateRandomEditorGroupName(){let T=(0,v.makeRandomHexString)(5);for(;this.editorGroups.findIndex(D=>D.name===T)!==-1;)T=(0,v.makeRandomHexString)(5);return T}initialize(){return this.initializing||(this.initializing=this.doInitialize()),this.initializing}async doInitialize(){this.openedResourceState=await this.initializeState(),await this.contributionsReady.promise,await this.restoreState(),this._currentEditorGroup=this.editorGroups[0]}async initializeState(){return await this.getStorage(v.STORAGE_NAMESPACE.WORKBENCH)}get currentEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentEditor}get currentCodeEditor(){return this.currentEditorGroup.currentCodeEditor}get currentEditorGroup(){return this._currentEditorGroup}get currentOrPreviousFocusedEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentOrPreviousFocusedEditor}async open(T,D){await this.initialize();let I=this.currentEditorGroup,O;if(D&&typeof D.groupIndex<"u"?O=D.groupIndex:D&&D.relativeGroupIndex&&(O=this.currentEditorGroup.index+D.relativeGroupIndex),typeof O=="number"&&O>=0){if(O>=this.editorGroups.length)return I.open(T,Object.assign({},D,{split:g.EditorGroupSplitAction.Right}));I=this.sortedEditorGroups[O]||this.currentEditorGroup}return I.open(T,D)}async openUris(T){await this.initialize(),await this.currentEditorGroup.openUris(T)}getEditorGroup(T){return this.editorGroups.find(D=>D.name===T)}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(T){const D=this.editorGroups.findIndex(I=>I===T);if(D!==-1){if(this.editorGroups.length===1)return;this.editorGroups.splice(D,1),this.currentEditorGroup===T&&this.setCurrentGroup(this.editorGroups[0]);for(let I=D;I<this.editorGroups.length;I++)this.eventBus.fire(new d.EditorGroupIndexChangedEvent({group:this.editorGroups[I],index:I}))}}async saveOpenedResourceState(){if(this._restoring)return;const T=this.topGrid.serialize();await this.openedResourceState.set("grid",T)}prepareContextKeyService(){const T=I=>{let O=null;const M=this.documentModelManager.getModelDescription(I,"resourceContextKey");return M&&(O=M.languageId),O},D=new c.ResourceContextKey(this.editorContextKeyService,I=>{const O=T(I);return O||T(I)});this.onActiveResourceChange(I=>{this.currentEditor&&this.currentEditor.currentUri?D.set(this.currentEditor.currentUri):I?D.set(I.uri):D.reset()}),this.currentEditor&&this.currentEditor.currentUri?D.set(this.currentEditor.currentUri):this.currentResource?D.set(this.currentResource.uri):D.reset()}onDomCreated(T){this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(T)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let T={editorGroup:{uris:[],previewIndex:-1}};this.appConfig.disableRestoreEditorGroupState||(T=this.openedResourceState.get("grid",T)),this.topGrid=new u.EditorGrid,this.addDispose(this.topGrid),this.addDispose(this.topGrid.onDidGridAndDesendantStateChange(()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const D=[],I=this.topGrid.deserialize(T,()=>this.createEditorGroup(),D).then(()=>{this.topGrid.children.length===0&&!this.topGrid.editorGroup&&this.topGrid.setEditorGroup(this.createEditorGroup()),this.gridReady=!0,this._onDidGridReady.fire(),this.notifyGroupChanged()});return Promise.all(D).then(()=>{this._restoring=!1;for(const O of this.contributions.getContributions())O.onDidRestoreState&&O.onDidRestoreState()}),I}async closeAll(T,D){for(const I of this.editorGroups.slice(0))T?await I.close(T,{force:D}):await I.closeAll()}async closeAllOnlyConfirmOnce(){const T=[];for(const F of this.editorGroups)for(const L of F.resources)T.push(L);const I=(await Promise.all(T.map(async F=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(F),resource:F})))).filter(F=>F.shouldClose);if(I.length===0)return!1;const O={[(0,v.localize)("file.prompt.dontSave","Don't Save")]:d.AskSaveResult.REVERT,[(0,v.localize)("file.prompt.save","Save")]:d.AskSaveResult.SAVE,[(0,v.localize)("file.prompt.cancel","Cancel")]:d.AskSaveResult.CANCEL};let R=I.slice(0,f).map(F=>F.resource.name).join("\u3001");I.length>f&&(I.length-f===1?R+=(0,v.localize)("file.prompt.more.one"):R+=(0,v.formatLocalize)("file.prompt.more.number",I.length-f));const P=await this.dialogService.open({message:(0,o.toMarkdown)((0,v.formatLocalize)("saveNFilesChangesMessage",I.length,R),this.openner),type:v.MessageType.Info,buttons:Object.keys(O)}),k=O[P];return k===d.AskSaveResult.SAVE?(await Promise.all(I.map(F=>{var L,B;return(B=(L=this.resourceService).close)===null||B===void 0?void 0:B.call(L,F.resource,d.AskSaveResult.SAVE)})),!1):k===d.AskSaveResult.REVERT?(await Promise.all(I.map(F=>{var L,B;return(B=(L=this.resourceService).close)===null||B===void 0?void 0:B.call(L,F.resource,d.AskSaveResult.REVERT)})),!1):!0}async close(T,D){return this.closeAll(T,D)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(T){if(T.payload.resource.uri.scheme===v.Schemes.untitled){const{index:D}=T.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(D,10)),this.untitledCloseIndex.sort((I,O)=>I-O)}}createUntitledURI(){const T=this.untitledCloseIndex.shift()||this.untitledIndex.id;return new v.URI().withScheme(v.Schemes.untitled).withQuery(`name=${E.UntitledDocumentIdCounter.UNTITLED_FILE_NAME_PREFIX}${T}&index=${T}`)}createUntitledResource(T={uri:this.createUntitledURI()}){return this.open(T.uri,{preview:!1,focus:!0,...T.resourceOpenOptions})}};t.WorkbenchEditorServiceImpl=b,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],b.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(g.ResourceService),n.__metadata("design:type",g.ResourceService)],b.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],b.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.StorageProvider),n.__metadata("design:type",Function)],b.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(s.IDialogService),n.__metadata("design:type",Object)],b.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],b.prototype,"openner",void 0),n.__decorate([(0,r.Autowired)(d.BrowserEditorContribution),n.__metadata("design:type",Object)],b.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(l.IEditorDocumentModelService),n.__metadata("design:type",Object)],b.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(E.UntitledDocumentIdCounter),n.__metadata("design:type",E.UntitledDocumentIdCounter)],b.prototype,"untitledIndex",void 0),n.__decorate([(0,r.Autowired)(s.IWindowDialogService),n.__metadata("design:type",Object)],b.prototype,"windowDialogService",void 0),n.__decorate([(0,v.OnEvent)(d.EditorGroupChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorGroupChangeEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"onEditorGroupChangeEvent",null),n.__decorate([(0,v.OnEvent)(d.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"handleOnCloseUntitledResource",null),t.WorkbenchEditorServiceImpl=b=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],b);let y=class extends v.WithEventBus{constructor(T,D){super(),this.name=T,this.groupId=D,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new v.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new v.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupTabOperation=new v.Emitter,this.onDidEditorGroupTabOperation=this._onDidEditorGroupTabOperation.event,this._onDidEditorGroupBodyChanged=new v.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new v.Emitter,this.onDidEditorGroupContentLoading=this._onDidEditorGroupContentLoading.event,this.previewURI=null,this.resources=[],this.resourceStatus=new Map,this.cachedResourcesActiveOpenTypes=new Map,this.cachedResourcesOpenTypes=new Map,this.availableOpenTypes=[],this.activeComponents=new Map,this.activateComponentsProps=new Map,this.holdDocumentModelRefs=new Map,this.toDispose=[],this._prevDomHeight=0,this._prevDomWidth=0,this._onCurrentEditorCursorChange=new v.Emitter,this.onCurrentEditorCursorChange=this._onCurrentEditorCursorChange.event,this.resourceOpenHistory=[],this._domNode=null,this._diffEditorDomNode=null,this._diffEditorDomNodeAttached=!1,this._mergeEditorDomNode=null,this._mergeEditorDomNodeAttached=!1,this.codeEditorReady=new v.ReadyEvent,this.diffEditorReady=new v.ReadyEvent,this.diffEditorDomReady=new v.ReadyEvent,this.mergeEditorReady=new v.ReadyEvent,this.mergeEditorDomReady=new v.ReadyEvent,this._restoringState=!1,this.eventBus.onDirective(o.ResizeEvent.createDirective((0,o.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)),()=>{this.doLayoutEditors()}),this.eventBus.on(d.GridResizeEvent,I=>{I.payload.gridId===this.grid.uid&&this.doLayoutEditors()}),this.eventBus.on(d.EditorComponentDisposeEvent,I=>{this.activeComponents.delete(I.payload),this.activateComponentsProps.delete(I.payload)}),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged(T=>{T.preferenceName==="explorer.autoReveal"&&(this.explorerAutoRevealConfig=T.newValue)}))}attachDiffEditorDom(T){this._diffEditorDomNodeAttached||(this._diffEditorDomNode=T,this.diffEditorDomReady.ready(),this._diffEditorDomNodeAttached=!0)}attachMergeEditorDom(T){this._mergeEditorDomNodeAttached||(this._mergeEditorDomNode=T,this.mergeEditorDomReady.ready(),this._mergeEditorDomNodeAttached=!0)}attachToDom(T){this._domNode=T,T&&(this.contextKeyService.attachToDomNode(T),this.layoutEditors())}layoutEditors(){o.fastdom.measure(()=>{if(this._domNode){const T=this._domNode.offsetWidth,D=this._domNode.offsetHeight;(T!==this._prevDomWidth||D!==this._prevDomHeight)&&this.doLayoutEditors(),this._prevDomWidth=T,this._prevDomHeight=D}})}_layoutEditorWorker(){if(this.currentOpenType)switch(this.currentOpenType.type){case d.EditorOpenType.code:this.codeEditor&&this.codeEditor.layout();break;case d.EditorOpenType.diff:this.diffEditor&&this.diffEditor.layout();break;default:break}}doLayoutEditors(){this._measure&&this._measure.dispose(),this._measure=o.fastdom.mutate(()=>{this._layoutEditorWorker()})}setContextKeys(){var T;if(!this._resourceContext){const D=I=>{let O=null;const M=this.documentModelManager.getModelDescription(I,"resourceContextKey");return M&&(O=M.languageId),O};this._resourceContext=new c.ResourceContextKey(this.contextKeyService,I=>D(I)),this._diffResourceContextKey=new c.ResourceContextKey(this.contextKeyService,I=>D(I),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!1),this._activeEditorIsDirtyContextKey=this.contextKeyService.createKey("activeEditorIsDirty",!1),this._isInDiffRightEditorContextKey=this.contextKeyService.createKey("isInDiffRightEditor",!1),this._isInEditorComponentContextKey=this.contextKeyService.createKey("inEditorComponent",!1)}this.currentOrPreviousFocusedEditor&&this.currentOrPreviousFocusedEditor.currentUri?(this._resourceContext.set(this.currentOrPreviousFocusedEditor.currentUri),this.currentOrPreviousFocusedEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentOrPreviousFocusedEditor.currentDocumentModel.languageId)):this.currentEditor&&this.currentEditor.currentUri?(this._resourceContext.set(this.currentEditor.currentUri),this.currentEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentEditor.currentDocumentModel.languageId)):(this.currentResource?this._resourceContext.set(this.currentResource.uri):this._resourceContext.reset(),this._editorLangIDContextKey.reset()),this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty()),this._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set((T=this.currentResource)===null||T===void 0?void 0:T.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const T=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new v.Disposable(this.diffEditor.modifiedEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.modifiedEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.diffEditor.originalEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.originalEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onFocus(()=>{this.codeEditor.currentUri&&this.locateInFileTree(this.codeEditor.currentUri),this._currentOrPreviousFocusedEditor=this.codeEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onBlur(T),this.diffEditor.originalEditor.onBlur(T),this.diffEditor.modifiedEditor.onBlur(T)),this.addDispose(this.updateContextKeyWhenEditorChangesFocusDisposer)}get contextKeyService(){return this._contextKeyService||(this._contextKeyService=this.workbenchEditorService.editorContextKeyService.createScoped()),this._contextKeyService}get index(){return this.workbenchEditorService.sortedEditorGroups.indexOf(this)}onResourceDecorationChangeEvent(T){T.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(T.payload.uri)&&this.pinPreviewed(),this.resources.find(I=>I.uri.isEqual(T.payload.uri))&&this.notifyTabChanged()}resetOpenType(){this._currentOpenType=null}oResourceOpenTypeChangedEvent(T){const D=T.payload;this.cachedResourcesOpenTypes.has(D.toString())&&this.cachedResourcesOpenTypes.delete(D.toString()),this.currentResource&&this.currentResource.uri.isEqual(D)&&(this.resetOpenType(),this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const T=this.currentResource,D=await this.editorComponentRegistry.resolveEditorComponent(T);this.currentResource===T&&(this.availableOpenTypes=D,this.cachedResourcesOpenTypes.set(T.uri.toString(),D))}}pinPreviewed(T){const D=this.previewURI;T===void 0?this.previewURI=null:this.previewURI&&this.previewURI.isEqual(T)&&(this.previewURI=null),D!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(T){this._onDidEditorGroupContentLoading.fire(T)}get currentEditor(){return this.currentOpenType?this.currentOpenType.type===d.EditorOpenType.code?this.codeEditor:this.currentOpenType.type===d.EditorOpenType.diff?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType){if(this.currentOpenType.type===d.EditorOpenType.code){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if(this.currentOpenType.type===d.EditorOpenType.diff){if(this.diffEditor.modifiedEditor.monacoEditor.hasTextFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasTextFocus())return this.diffEditor.originalEditor;if(this.diffEditor.modifiedEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.originalEditor}}return null}get currentCodeEditor(){return this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code?this.codeEditor:null}createEditor(T){this.codeEditor=this.collectionService.createCodeEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.addDispose(this.codeEditor.onRefOpen(()=>{this.doLayoutEditors()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged(D=>{this._onCurrentEditorCursorChange.fire(D)})),this.toDispose.push(this.codeEditor.onSelectionsChanged(D=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:D.selections,source:D.source,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onVisibleRangesChanged(D=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:D,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))})),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.code,editorId:this.codeEditor.getId()})),this.toDispose.push(this.codeEditor.monacoEditor.onDidChangeModelContent(()=>{this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty())})),this.codeEditorReady.ready()}createMergeEditor(T){this.mergeEditor=this.collectionService.createMergeEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),this.mergeEditorReady.ready()}createDiffEditor(T){this.diffEditor=this.collectionService.createDiffEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.diffEditor.onRefOpen(()=>{this.doLayoutEditors()}),this.addDiffEditorEventListeners(this.diffEditor.originalEditor,"original"),this.addDiffEditorEventListeners(this.diffEditor.modifiedEditor,"modified"),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.diff,editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.diff,editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(T,D){this.toDispose.push(T.onSelectionsChanged(I=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:I.selections,source:I.source,editorUri:v.URI.from(T.monacoEditor.getModel().uri),side:D}))})),this.toDispose.push(T.onVisibleRangesChanged(I=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:I,editorUri:T.currentUri}))})),this.toDispose.push(T.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:T.currentUri}))}))}async split(T,D,I){var O,M,R;const P=this.workbenchEditorService.createEditorGroup(),k=T===g.EditorGroupSplitAction.Left||T===g.EditorGroupSplitAction.Right?u.SplitDirection.Horizontal:u.SplitDirection.Vertical,F=T===g.EditorGroupSplitAction.Left||T===g.EditorGroupSplitAction.Top;if(this.grid.split(k,P,F),I&&!I.scrollTop&&(I.scrollTop=(O=this.currentEditor)===null||O===void 0?void 0:O.monacoEditor.getScrollTop()),I&&!I.scrollLeft&&(I.scrollLeft=(M=this.currentEditor)===null||M===void 0?void 0:M.monacoEditor.getScrollLeft()),I&&!I?.range){const L=(R=this.currentCodeEditor)===null||R===void 0?void 0:R.monacoEditor.getSelection();L&&(I.range=new _.Range(L.startLineNumber,L.startColumn,L.endLineNumber,L.endColumn))}return P.open(D,{...I,preview:!1,revealRangeInCenter:!1})}async open(T,D={}){if(T.scheme===v.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(T.withoutFragment().toString()),D&&D.split)return this.split(D.split,T,Object.assign({},D,{split:void 0,preview:!1}));if(!this.openingPromise.has(T.toString())){const O=this.doOpen(T,D);this.openingPromise.set(T.toString(),O),O.then(()=>{this.openingPromise.delete(T.toString())},()=>{this.openingPromise.delete(T.toString())})}return this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(D.preview)?!0:D.preview)||this.openingPromise.get(T.toString()).then(()=>{this.pinPreviewed(T)}),this.openingPromise.get(T.toString())}async pin(T){return this.pinPreviewed(T)}getPreventScrollOption(T={}){var D;return(D=T.preventScroll)!==null&&D!==void 0?D:this.preferenceService.get("editor.preventScrollAfterFocused")}async doOpen(T,D={}){var I,O,M;if(!this.resourceService.handlesUri(T))return this.openerService.open(T),!1;let R;try{const P=this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(D.preview)?!0:D.preview);if(this.currentResource&&this.currentResource.uri.isEqual(T)&&(!D.forceOpenType||D.forceOpenType.type===((I=this.currentOpenType)===null||I===void 0?void 0:I.type))){if(D.focus&&this.currentEditor){const k=this.getPreventScrollOption(D);(O=this._domNode)===null||O===void 0||O.focus({preventScroll:k}),this.currentEditor.monacoEditor.focus()}return D.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(D.range),setTimeout(()=>{var k;(k=this.currentEditor)===null||k===void 0||k.monacoEditor.revealRangeInCenter(D.range,0)},0)),this.locationInTree(D,T),this.notifyTabChanged(),{group:this,resource:this.currentResource}}else{const k=this._currentOpenType,F=this._currentResource;let L=null,B=this.resources.find(U=>U.uri.toString()===T.toString());if(!B){if(B=await this.resourceService.getResource(T),!B)throw new Error("This uri cannot be opened!: "+T);if(B.deleted){if(D.deletedPolicy==="fail")throw new Error("resource deleted "+T);if(D.deletedPolicy==="skip")return!1}D&&D.label&&(B.name=D.label),D&&(0,v.isDefined)(D.supportsRevive)&&(B.supportsRevive=D.supportsRevive);let U=null;if(D&&D.index!==void 0&&D.index<this.resources.length)U=this.resources[D.index],this.resources.splice(D.index,0,B),L={type:"open",resource:B,index:D.index};else if(this.currentResource){const Q=this.resources.indexOf(this.currentResource);this.resources.splice(Q+1,0,B),L={type:"open",resource:B,index:Q+1},U=this.currentResource}else this.resources.push(B),L={type:"open",resource:B,index:this.resources.length-1};P&&(this.previewURI&&await this.close(this.previewURI,{treatAsNotCurrent:!0,force:D.forceClose}),this.previewURI=B.uri),D.replace&&U&&await this.close(U.uri,{treatAsNotCurrent:!0,force:D.forceClose})}if(D.backend)return this.notifyTabChanged(),!1;if(F&&this.resourceOpenHistory[this.resourceOpenHistory.length-1]!==F.uri){this.resourceOpenHistory.push(F.uri);const U=(M=this.currentCodeEditor)===null||M===void 0?void 0:M.getSelections();U&&U.length>0&&this.recentFilesManager.updateMostRecentlyOpenedFile(F.uri.toString(),{lineNumber:U[0].selectionStartLineNumber,column:U[0].selectionStartColumn})}this._currentOpenType=null,this._currentResource=B;const j=this.reporterService.time(v.REPORT_NAME.EDITOR_REACTIVE);R=new v.Deferred,this.resourceStatus.set(B,R.promise);const W=setTimeout(()=>{this.notifyTabLoading(B)},60);this.notifyTabChanged(),this.notifyBodyChanged();try{await this.displayResourceComponent(B,D)}finally{L&&this._onDidEditorGroupTabOperation.fire(L)}return this._currentOrPreviousFocusedEditor=this.currentEditor,clearTimeout(W),R.resolve(),j.timeEnd(B.uri.toString()),this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new d.EditorGroupOpenEvent({group:this,resource:B})),this.locationInTree(D,T),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:k,oldResource:F})),{group:this,resource:B}}}catch(P){return(0,v.getDebugLogger)().error(P),R&&R.reject(),(0,h.isEditorError)(P,h.EditorTabChangedError)||this.messageService.error((0,v.formatLocalize)("editor.failToOpen",T.displayName,P.message),[],!0),!1}}locationInTree(T,D){T?.backend||(T?.disableNavigate||this.locateInFileTree(D),T.disableNavigateOnOpendEditor||this.locateInOpenedEditor(D))}locateInFileTree(T){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.FILE_COMMANDS.LOCATION.id,T)}locateInOpenedEditor(T){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.OPEN_EDITORS_COMMANDS.LOCATION.id,T)}async openUris(T){for(const D of T)await this.open(D)}async getDocumentModelRef(T){const D=T.toString();return this.holdDocumentModelRefs.has(D)||this.holdDocumentModelRefs.set(D,await this.documentModelManager.createModelReference(T,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(D)}disposeDocumentRef(T){if(T.scheme==="diff"){const D=T.getParsedQuery();this.doDisposeDocRef(new v.URI(D.original)),this.doDisposeDocRef(new v.URI(D.modified))}else T.scheme==="mergeEditor"?this.mergeEditor&&this.mergeEditor.dispose():this.doDisposeDocRef(T)}doDisposeDocRef(T){const D=T.toString();this.holdDocumentModelRefs.has(D)&&(this.holdDocumentModelRefs.get(D).dispose(),this.holdDocumentModelRefs.delete(D))}async openCodeEditor(T,D){this.resolveTabChanged(T,this.currentResource),await this.codeEditorReady.onceReady(async()=>{var I;const O=await this.getDocumentModelRef(T.uri);if(await this.codeEditor.open(O),D.range){const M=new _.Range(D.range.startLineNumber,D.range.startColumn,D.range.endLineNumber,D.range.endColumn);this.codeEditor.monacoEditor.setSelection(M),D.revealRangeInCenter&&setTimeout(()=>{this.codeEditor.monacoEditor.revealRangeInCenter(M,1)})}if(queueMicrotask(()=>{D.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(D.scrollTop),D.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(D.scrollLeft)}),D.focus){const M=this.getPreventScrollOption(D);(I=this._domNode)===null||I===void 0||I.focus({preventScroll:M});const R=this.eventBus.on(d.CodeEditorDidVisibleEvent,P=>{var k;if(P.payload.groupName===this.name&&P.payload.type===d.EditorOpenType.code){if(R.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(!((k=this.codeEditor.currentUri)===null||k===void 0)&&k.isEqual(T.uri)))try{this.codeEditor.focus()}catch{}}})}O.instance.dirty&&this.pinPreviewed(T.uri)})}async openDiffEditor(T,D){this.diffEditor||await this.diffEditorDomReady.onceReady(()=>{var R;const P=document.createElement("div");(R=this._diffEditorDomNode)===null||R===void 0||R.appendChild(P),this.createDiffEditor(P)});const I=T,[O,M]=await Promise.all([this.getDocumentModelRef(I.metadata.original),this.getDocumentModelRef(I.metadata.modified)]);await this.diffEditorReady.onceReady(async()=>{var R;if(!(!O||!M)&&(await this.diffEditor.compare(O,M,D,T.uri),D.focus)){const P=this.getPreventScrollOption(D);(R=this._domNode)===null||R===void 0||R.focus({preventScroll:P});const k=this.eventBus.on(d.CodeEditorDidVisibleEvent,F=>{if(F.payload.groupName===this.name&&F.payload.type===d.EditorOpenType.diff){if(k.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch{}}})}})}async openMergeEditor(T){const{metadata:D}=T;if(!D)return;this.mergeEditor||await this.mergeEditorDomReady.onceReady(()=>{var W;const U=document.createElement("div");(W=this._mergeEditorDomNode)===null||W===void 0||W.appendChild(U),this.createMergeEditor(U)});const{ancestor:I,input1:O,input2:M,output:R}=D,P=p.MergeEditorInputData.from(O),k=p.MergeEditorInputData.from(M),[F,L,B,j]=await Promise.all([this.getDocumentModelRef(v.URI.parse(I)),this.getDocumentModelRef(P.uri),this.getDocumentModelRef(v.URI.parse(R)),this.getDocumentModelRef(k.uri)]);await this.mergeEditorReady.onceReady(async()=>{await this.mergeEditor.open({ancestor:{uri:v.URI.parse(D.ancestor),textModel:F.instance.getMonacoModel(),baseContent:F.instance.baseContent||""},input1:P.setTextModel(L.instance.getMonacoModel()),input2:k.setTextModel(j.instance.getMonacoModel()),output:{uri:v.URI.parse(D.output),textModel:B.instance.getMonacoModel()}})})}async openCustomEditor(T,D){const I=this.editorComponentRegistry.getEditorComponent(D),O=this.editorComponentRegistry.getEditorInitialProps(D);if(I){if(this.activateComponentsProps.set(I,O),I.renderMode===d.EditorComponentRenderMode.ONE_PER_RESOURCE){const M=this.activeComponents.get(I)||[];M.findIndex(P=>P.uri.toString()===T.uri.toString())===-1&&M.push(T),this.activeComponents.set(I,M)}else if(I.renderMode===d.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(I,[T]);else if(I.renderMode===d.EditorComponentRenderMode.ONE_PER_WORKBENCH){const M=[];this.workbenchEditorService.editorGroups.forEach(R=>{if(R===this)return;const P=R.resources.find(k=>k.uri.isEqual(T.uri));P&&M.push(R.close(P.uri))}),await Promise.all(M).catch((0,v.getDebugLogger)().error),this.activeComponents.set(I,[T])}}else throw new Error("Cannot find Editor Component with id: "+D);this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}async displayResourceComponent(T,D){D.revealRangeInCenter===void 0&&(D.revealRangeInCenter=!0);const I=T,O=await this.resolveOpenType(T,D);if(O){const{activeOpenType:M,openTypes:R}=O;switch(this.availableOpenTypes=R,D.preserveFocus&&(D.focus=!1),M.type){case d.EditorOpenType.code:await this.openCodeEditor(T,D);break;case d.EditorOpenType.diff:await this.openDiffEditor(T,D);break;case d.EditorOpenType.mergeEditor:await this.openMergeEditor(T);break;case d.EditorOpenType.component:await this.openCustomEditor(T,M.componentId);break;default:return}this.resolveTabChanged(I,this.currentResource),this._currentOpenType=M,this.notifyBodyChanged(),this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(T.uri.toString(),M)}}resolveTabChanged(T,D){if(T!==D)throw new h.EditorTabChangedError}getLastOpenType(T){return this.cachedResourcesActiveOpenTypes.get(T.uri.toString())}async resolveOpenType(T,D){const I=this.cachedResourcesOpenTypes.get(T.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(T),O=this.preferenceService.get("workbench.editorAssociations"),M=A(I,this.cachedResourcesActiveOpenTypes.get(T.uri.toString()),T,O,D.forceOpenType);return this.cachedResourcesOpenTypes.set(T.uri.toString(),I),{activeOpenType:M,openTypes:I}}async close(T,{treatAsNotCurrent:D,force:I}={}){const O=this.resources.findIndex(M=>M.uri.toString()===T.toString());if(O!==-1){const M=this.resources[O];if(!I&&!await this.shouldClose(M))return!1;if(this.resources.splice(O,1),this._onDidEditorGroupTabOperation.fire({type:"close",resource:M,index:O}),this.eventBus.fire(new d.EditorGroupCloseEvent({group:this,resource:M})),this.previewURI&&this.previewURI.isEqual(T)&&(this.previewURI=null),M===this.currentResource&&!D){let R;for(;this.resourceOpenHistory.length>0;)if(this.resources.findIndex(P=>P.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1])!==-1){R=this.resourceOpenHistory.pop();break}else this.resourceOpenHistory.pop();if(R)this.open(R);else{let P=O;for(;P>0&&!this.resources[P];)P--;this.resources[P]?this.open(this.resources[P].uri):this.backToEmpty()}}else this.notifyTabChanged();this.removeResouceFromActiveComponents(M),this.disposeDocumentRef(T)}return this.resources.length===0&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[]),!0}removeResouceFromActiveComponents(T){this.activeComponents.forEach((D,I)=>{const O=D.indexOf(T);O!==-1&&(D.splice(O,1),this.eventBus.fire(new d.ResoucesOfActiveComponentChangedEvent({component:I,resources:D})))})}async shouldClose(T){const D=this.workbenchEditorService.editorGroups.map(I=>I.resources);if(await this.resourceService.shouldCloseResource(T,D)){let I=0;for(const O of D)for(const M of O)if(M.uri.isEqual(T.uri)&&(I++,I>=2))break;return I<=1&&this.resourceService.disposeResource(T),!0}else return!1}backToEmpty(){const T=this._currentOpenType,D=this._currentResource;this._currentResource=null,this.resetOpenType(),this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:T,oldResource:D}))}async closeAll(){for(const D of this.resources)if(!await this.shouldClose(D))return!1;return this.resources.splice(0,this.resources.length).reverse().forEach((D,I)=>{this.clearResourceOnClose(D),this._onDidEditorGroupTabOperation.fire({type:"close",resource:D,index:I})}),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty(),!0}async closeSaved(){const T=this.resources.filter(D=>{const I=this.resourceService.getResourceDecoration(D.uri);if(!I||!I.dirty)return!0});for(const D of T)if(!await this.shouldClose(D))return;for(const D of T)await this.close(D.uri)}async closeToRight(T){const D=this.resources.findIndex(I=>I.uri.toString()===T.toString());if(D!==-1){const I=this.resources.slice(D+1);for(const O of I)if(!await this.shouldClose(O))return;this.resources.splice(D+1),I.reverse().forEach((O,M)=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:O,index:D+1+(I.length-1-M)})});for(const O of I)this.clearResourceOnClose(O);this.open(T)}}clearResourceOnClose(T){this.eventBus.fire(new d.EditorGroupCloseEvent({group:this,resource:T})),this.removeResouceFromActiveComponents(T)}async closeOthers(T){const D=this.resources.findIndex(I=>I.uri.toString()===T.toString());if(D!==-1){const I=this.resources.filter((M,R)=>R!==D);for(const M of I)if(!await this.shouldClose(M))return;const O=this.resources;this.resources=[this.resources[D]],I.reverse().forEach(M=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:M,index:O.indexOf(M)})});for(const M of I)this.clearResourceOnClose(M);await this.open(T)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(T){const D=this.availableOpenTypes.find(O=>O.type===T||O.componentId===T);if(!D||!this.currentResource||S(D,this.currentOpenType))return;const I=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:D}),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:I,oldResource:this.currentResource}))}async dropUri(T,D,I,O){if(D!==d.DragOverPosition.CENTER)await this.split((0,g.getSplitActionFromDragDrop)(D),T,{preview:!1,focus:!0});else if(!O)await this.open(T,{preview:!1,focus:!0});else{const M=this.resources.indexOf(O);if(M===-1)await this.open(T,{preview:!1,focus:!0});else{const R=this.resources.findIndex(P=>P.uri.toString()===T.toString());if(R===-1)await this.open(T,{index:M,preview:!1});else{const P=this.resources[R];R>M?(this.resources.splice(R,1),this.resources.splice(M,0,P),this._onDidEditorGroupTabOperation.fire({type:"move",resource:P,oldIndex:R,index:M}),await this.open(T,{preview:!1})):R<M&&(this.resources.splice(M+1,0,P),this.resources.splice(R,1),this._onDidEditorGroupTabOperation.fire({type:"move",resource:P,oldIndex:R,index:M}),await this.open(T,{preview:!1}))}}}I&&(I!==this?await I.close(T):D!==d.DragOverPosition.CENTER&&await this.close(T))}gainFocus(){this.workbenchEditorService.setCurrentGroup(this)}focus(){this.gainFocus(),this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.codeEditor.focus(),this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.diffEditor.focus()}dispose(){var T;(T=this.grid)===null||T===void 0||T.dispose(),this.workbenchEditorService.removeGroup(this),super.dispose(),this.codeEditor&&this.codeEditor.dispose(),this.diffEditor&&this.diffEditor.dispose(),this.toDispose.forEach(D=>D.dispose()),this.eventBus.fire(new d.EditorGroupDisposeEvent({group:this}))}getState(){const T=this.resources.filter(a).map(D=>D.uri.toString());return{uris:T,current:this.currentResource&&a(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?T.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code}isDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff}activeEditorIsDirty(){return this.hasDirty()&&this.workbenchEditorService.currentEditorGroup===this}isComponentMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.component}async restoreState(T){this._restoringState=!0,this.previewURI=T.uris[T.previewIndex]?new v.URI(T.uris[T.previewIndex]):null;for(const I of T.uris)await this.doOpen(new v.URI(I),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"});let D;T.current?D=new v.URI(T.current):T.uris.length>0&&(D=new v.URI(T.uris[T.uris.length-1])),D&&(await this.open(D,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(T,D){for(const I of this.resources)!T&&I.uri.scheme===v.Schemes.untitled||await this.saveResource(I,D)}async saveResource(T,D=g.SaveReason.Manual){if(await this.saveByOpenType(T,D))return;const I=this.documentModelManager.getModelReference(T.uri);I&&(await I.instance.save(void 0,D),I.dispose())}async saveByOpenType(T,D){const I=this.cachedResourcesActiveOpenTypes.get(T.uri.toString());if(I&&I.saveResource)try{return await I.saveResource(T,D),!0}catch(O){this.logger.error(O)}return!1}async saveCurrent(T=g.SaveReason.Manual){const D=this.currentResource;if(D&&!await this.saveByOpenType(D,T)&&this.currentEditor)return this.currentEditor.save()}hasDirty(){for(const T of this.resources){const D=this.documentModelManager.getModelDescription(T.uri);if(D&&D.dirty)return!0}return!1}calcDirtyCount(T=new Set){let D=0;for(const I of this.resources){const O=this.documentModelManager.getModelDescription(I.uri,"calc-dirty-count");T.has(I.uri.toString())||(T.add(I.uri.toString()),O&&O.dirty&&(D+=1))}return D}componentUndo(){const T=this.currentOpenType;T?.undo&&T.undo(this.currentResource)}componentRedo(){const T=this.currentOpenType;T?.redo&&T.redo(this.currentResource)}toJSON(){return{name:this.name}}};t.EditorGroup=y,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g.EditorCollectionService)],y.prototype,"collectionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",d.EditorComponentRegistry)],y.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",b)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(v.CommandService),n.__metadata("design:type",Object)],y.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],y.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.RecentFilesManager),n.__metadata("design:type",o.RecentFilesManager)],y.prototype,"recentFilesManager",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],y.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],y.prototype,"openerService",void 0),n.__decorate([(0,r.Autowired)(v.ILogger),n.__metadata("design:type",Object)],y.prototype,"logger",void 0),n.__decorate([(0,v.OnEvent)(g.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],y.prototype,"onResourceDecorationChangeEvent",null),n.__decorate([(0,v.OnEvent)(d.ResourceOpenTypeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.ResourceOpenTypeChangedEvent]),n.__metadata("design:returntype",void 0)],y.prototype,"oResourceOpenTypeChangedEvent",null),n.__decorate([(0,v.OnEvent)(d.RegisterEditorComponentEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],y.prototype,"onRegisterEditorComponentEvent",null),t.EditorGroup=y=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Number])],y);function A(w,T,D,I,O){if(O)return w.find(M=>S(M,O))||w[0];if(T)return w.find(M=>S(M,T))||w[0];if(I){const M=w.find(R=>{const P=Object.keys(I).find(L=>(0,v.match)(L,D.uri.path.toString().toLowerCase())||(0,v.match)(L,D.uri.path.base.toLowerCase())),k=P&&I[P];if(!k)return!1;const F=`${v.CUSTOM_EDITOR_SCHEME}-${k}`;return R.componentId===F});if(M)return M}return w[0]}function S(w,T){return w.type===T.type&&(w.type!==d.EditorOpenType.component||w.componentId===T.componentId)}},94180:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarLeftExtraContentId=t.TabbarRightExtraContentId=void 0,t.TabbarRightExtraContentId="tabbar-right-extra-content",t.TabbarLeftExtraContentId="tabbar-left-extra-content"},93107:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDocPersistentCacheProvider=void 0,t.isDocContentCache=e,t.isDocChangesCache=n,t.parseCacheValueFrom=r,t.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider");function e(o){return o.hasOwnProperty("content")}function n(o){return o.hasOwnProperty("changeMatrix")}function r(o){const c=o.text,p=o.range.startLineNumber,v=o.range.startColumn,m=o.range.endLineNumber,_=o.range.endColumn;return[c,p,v,m,_]}},55113:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AUTO_SAVE_MODE=t.SaveReason=t.Direction=t.EditorGroupSplitAction=t.DragOverPosition=t.EditorOpenType=t.IEditorPriority=t.OverviewRulerLane=t.WorkbenchEditorService=t.DidApplyEditorDecorationFromProvider=t.DidChangeEditorGroupUriEvent=t.CollectionEditorsUpdateEvent=t.EditorCollectionService=t.EditorType=t.ShowLightbulbIconMode=void 0,t.getSimpleEditorOptions=y,t.isTextEditorViewState=A;const n=e(85608),r=e(76003),o=e(43718);var c=e(20868);Object.defineProperty(t,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return c.ShowLightbulbIconMode}});var p;(function(S){S[S.CODE=0]="CODE",S[S.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",S[S.MODIFIED_DIFF=2]="MODIFIED_DIFF",S.MERGE_EDITOR_DIFF="MERGE_EDITOR_DIFF"})(p||(t.EditorType=p={}));let v=class{};t.EditorCollectionService=v,t.EditorCollectionService=v=n.__decorate([(0,r.Injectable)()],v);class m extends o.BasicEvent{}t.CollectionEditorsUpdateEvent=m;class _ extends o.BasicEvent{}t.DidChangeEditorGroupUriEvent=_;class s extends o.BasicEvent{}t.DidApplyEditorDecorationFromProvider=s;class g{}t.WorkbenchEditorService=g;var l;(function(S){S[S.Left=1]="Left",S[S.Center=2]="Center",S[S.Right=4]="Right",S[S.Full=7]="Full"})(l||(t.OverviewRulerLane=l={}));var h;(function(S){S.builtin="builtin",S.option="option",S.exclusive="exclusive",S.default="default"})(h||(t.IEditorPriority=h={}));var u;(function(S){S.code="code",S.diff="diff",S.mergeEditor="mergeEditor",S.component="component"})(u||(t.EditorOpenType=u={}));var d;(function(S){S.LEFT="left",S.RIGHT="right",S.TOP="top",S.BOTTOM="bottom",S.CENTER="center"})(d||(t.DragOverPosition=d={}));var E;(function(S){S[S.Top=1]="Top",S[S.Bottom=2]="Bottom",S[S.Left=3]="Left",S[S.Right=4]="Right"})(E||(t.EditorGroupSplitAction=E={}));var f;(function(S){S.UP="up",S.DOWN="down",S.LEFT="left",S.RIGHT="right"})(f||(t.Direction=f={}));var a;(function(S){S[S.Manual=1]="Manual",S[S.AfterDelay=2]="AfterDelay",S[S.FocusOut=3]="FocusOut"})(a||(t.SaveReason=a={}));var b;(function(S){S.OFF="off",S.AFTER_DELAY="afterDelay",S.EDITOR_FOCUS_CHANGE="editorFocusChange",S.WINDOWS_LOST_FOCUS="windowLostFocus"})(b||(t.AUTO_SAVE_MODE=b={}));function y(){return{fontSize:12,fontWeight:"normal",lineHeight:0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1},guides:{highlightActiveIndentation:!1,indentation:!1,bracketPairs:!1}}}function A(S){const w=S;if(!w)return!1;const T=w;if(T.modified)return A(T.modified);const D=w;return!!(D.contributionsState&&D.viewState&&Array.isArray(D.cursorState))}},23418:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(94180),t),n.__exportStar(e(93107),t),n.__exportStar(e(55113),t),n.__exportStar(e(23950),t),n.__exportStar(e(27693),t),n.__exportStar(e(46225),t),n.__exportStar(e(4308),t),n.__exportStar(e(39467),t)},27693:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILanguageStatusService=void 0,t.ILanguageStatusService=Symbol("ILanguageStatusService")},23950:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticTag=t.DiagnosticSeverity=t.ILanguageService=void 0,t.asSeverity=c,t.asRelatedInformations=p,t.asRelatedInformation=v,t.asMonacoDiagnostics=m,t.asMonacoDiagnostic=_;const n=e(43718);t.ILanguageService=Symbol("ILanguageService");var r;(function(s){s[s.Error=1]="Error",s[s.Warning=2]="Warning",s[s.Information=3]="Information",s[s.Hint=4]="Hint"})(r||(t.DiagnosticSeverity=r={}));var o;(function(s){s[s.Unnecessary=1]="Unnecessary",s[s.Deprecated=2]="Deprecated"})(o||(t.DiagnosticTag=o={}));function c(s){return s===1?n.MarkerSeverity.Error:s===2?n.MarkerSeverity.Warning:s===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}function p(s){if(s)return s.map(g=>v(g))}function v(s){return{resource:n.Uri.parse(s.location.uri),startLineNumber:s.location.range.start.line+1,startColumn:s.location.range.start.character+1,endLineNumber:s.location.range.end.line+1,endColumn:s.location.range.end.character+1,message:s.message}}function m(s){if(s)return s.map(g=>_(g))}function _(s){return{code:typeof s.code=="number"?s.code.toString():typeof s.code=="object"?{value:s.code.value.toString(),target:s.code.target}:s.code,severity:c(s.severity),message:s.message,source:s.source,startLineNumber:s.range.start.line+1,startColumn:s.range.start.character+1,endLineNumber:s.range.end.line+1,endColumn:s.range.end.character+1,relatedInformation:p(s.relatedInformation),tags:s.tags}}},46225:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notebookCellScheme=t.INotebookService=t.CellKind=t.NotebookCellsChangeType=void 0;var e;(function(r){r[r.ModelChange=1]="ModelChange",r[r.Move=2]="Move",r[r.ChangeCellLanguage=5]="ChangeCellLanguage",r[r.Initialize=6]="Initialize",r[r.ChangeCellMetadata=7]="ChangeCellMetadata",r[r.Output=8]="Output",r[r.OutputItem=9]="OutputItem",r[r.ChangeCellContent=10]="ChangeCellContent",r[r.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",r[r.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",r[r.ChangeCellMime=13]="ChangeCellMime",r[r.Unknown=100]="Unknown"})(e||(t.NotebookCellsChangeType=e={}));var n;(function(r){r[r.Markup=1]="Markup",r[r.Code=2]="Code"})(n||(t.CellKind=n={})),t.INotebookService=Symbol("INotebookService"),t.notebookCellScheme="vscode-notebook-cell"},4308:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AskSaveResult=t.DIFF_SCHEME=t.ResourceDecorationNeedChangeEvent=t.ResourceDecorationChangeEvent=t.ResourceRemoveEvent=t.ResourceDidUpdateEvent=t.ResourceNeedUpdateEvent=t.ResourceService=void 0,t.isDiffResource=_;const n=e(43718);class r{}t.ResourceService=r;class o extends n.BasicEvent{}t.ResourceNeedUpdateEvent=o;class c extends n.BasicEvent{}t.ResourceDidUpdateEvent=c;class p extends n.BasicEvent{}t.ResourceRemoveEvent=p;class v extends n.BasicEvent{}t.ResourceDecorationChangeEvent=v;class m extends n.BasicEvent{}t.ResourceDecorationNeedChangeEvent=m,t.DIFF_SCHEME="diff";function _(g){return g.uri.scheme===t.DIFF_SCHEME}var s;(function(g){g[g.REVERT=1]="REVERT",g[g.SAVE=2]="SAVE",g[g.CANCEL=3]="CANCEL"})(s||(t.AskSaveResult=s={}))},39467:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSplitActionFromDragDrop=r;const n=e(55113);function r(o){return{[n.DragOverPosition.LEFT]:n.EditorGroupSplitAction.Left,[n.DragOverPosition.RIGHT]:n.EditorGroupSplitAction.Right,[n.DragOverPosition.BOTTOM]:n.EditorGroupSplitAction.Bottom,[n.DragOverPosition.TOP]:n.EditorGroupSplitAction.Top}[o]}},54414:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(23418),t)},32595:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerContribution=t.EXPLORER_CONTAINER_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144);Object.defineProperty(t,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return c.EXPLORER_CONTAINER_ID}});const p=e(21634),v=e(68456),m=e(43718);let _=class{registerComponent(g){g.register("@opensumi/ide-explorer",[],{iconClass:(0,o.getIcon)("explorer"),title:(0,o.localize)("explorer.title"),priority:10,containerId:c.EXPLORER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+e"})}onStart(){this.extensionsSchemaService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:c.EXPLORER_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:{...p.browserViews.properties,description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))}})}};t.ExplorerContribution=_,n.__decorate([(0,r.Autowired)(m.IExtensionsSchemaService),n.__metadata("design:type",Object)],_.prototype,"extensionsSchemaService",void 0),t.ExplorerContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.ComponentContribution)],_)},59027:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(32595);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c.ExplorerContribution]}};t.ExplorerModule=p,t.ExplorerModule=p=n.__decorate([(0,r.Injectable)()],p)},18531:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressFileServerContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(32242),p=e(90242);let v=class{registerStaticResolver(_){_.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:s=>{const g=new o.URI(this.appConfig.staticServicePath||p.EXPRESS_SERVER_PATH),[l,h]=s.codeUri.path.split("?");return g.resolve(`assets${decodeURIComponent(l)}`).withQuery(h)},roots:[this.appConfig.staticServicePath||p.EXPRESS_SERVER_PATH]})}};t.ExpressFileServerContribution=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.ExpressFileServerContribution=v=n.__decorate([(0,o.Domain)(c.StaticResourceContribution)],v)},98885:(x,t,e)=>{"use strict";var n;n={value:!0},t.Q=void 0;const r=e(85608),o=e(76003),c=e(41869),p=e(18531);let v=class extends c.BrowserModule{constructor(){super(...arguments),this.providers=[p.ExpressFileServerContribution]}};t.Q=v,t.Q=v=r.__decorate([(0,o.Injectable)()],v)},90242:(x,t,e)=>{"use strict";var n=e(39907);Object.defineProperty(t,"__esModule",{value:!0}),t.ALLOW_MIME=t.EXPRESS_SERVER_PATH=t.EXPRESS_SERVER_PORT=void 0,t.EXPRESS_SERVER_PORT=8e3,t.EXPRESS_SERVER_PATH=n.env.STATIC_SERVER_PATH||`http://127.0.0.1:${t.EXPRESS_SERVER_PORT}/`,t.ALLOW_MIME={gif:"image/gif",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",svg:"image/svg+xml",ttf:"font/ttf",eot:"font/eot",otf:"font/otf",woff:"font/woff",woff2:"font/woff2",js:"application/javascript",css:"text/css",mp4:"video/mp4",ogg:"video/ogg",webm:"video/webm"}},21082:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_SCHEME=t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=void 0;const n=e(30144);t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=n.EXTENSION_CONTAINER_ID,t.EXTENSION_SCHEME="extension"},6449:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionOverview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(68974),p=e(95422),v=e(43718),m=e(93374),_=e(29150),s=n.__importDefault(e(40769));var g;(function(u){u.details="Details",u.changelog="ChangeLog",u.deps="Dependencies"})(g||(g={}));const l=[g.details,g.changelog,g.deps],h=({resource:u})=>{var d,E,f,a,b,y,A,S,w,T,D,I,O,M,R,P,k,F,L,B,j,W,U,Q,V;const $=(0,p.useInjectable)(_.VSXExtensionServiceToken),[Y,z]=(0,r.useState)(!0),[H,K]=(0,r.useState)(((d=u.metadata)===null||d===void 0?void 0:d.state)===_.InstallState.INSTALLED?4:0),[Z,X]=(0,r.useState)(g.details),[ie,oe]=(0,r.useState)({}),le=(0,r.useCallback)(te=>{const ge=l[te];ge&&X(ge)},[]),pe=(0,r.useCallback)(async()=>{var te;const ge=await $.getRemoteRawExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);if(ge){const Te=["readme","changelog"].map(we=>{var be,fe;const xe=(be=ge.files)===null||be===void 0?void 0:be[we];return xe?fetch(xe).then(Re=>Re.text()):(fe=ge[we])!==null&&fe!==void 0?fe:""}),[Pe,Ae]=await Promise.all(Te);oe({readme:Pe,changelog:Ae,downloadCount:ge.downloadCount})}z(!1)},[u]),q=(0,r.useCallback)(async()=>{var te;const ge=await $.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);ge&&(K(1),$.install(ge).finally(()=>{K(4)}))},[u]),Ee=(0,r.useCallback)(async()=>{var te;const ge=await $.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);ge&&(K(2),$.uninstall(ge).finally(()=>{K(3)}))},[u]);(0,r.useEffect)(()=>{pe()},[u]);const _e=(0,r.useMemo)(()=>{var te,ge,Te;const Pe=[];if(((te=u.metadata)===null||te===void 0?void 0:te.state)!==_.InstallState.NOT_INSTALLED)if(H!==3)Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:Ee,disabled:H===2},(0,v.localize)(H===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,v.localize)("marketplace.extension.uninstalled"))),Pe;return((ge=u.metadata)===null||ge===void 0?void 0:ge.state)===_.InstallState.NOT_INSTALLED?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"install",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.installing":"marketplace.extension.install"))):((Te=u.metadata)===null||Te===void 0?void 0:Te.state)===_.InstallState.SHOULD_UPDATE?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"update",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.updating":"marketplace.extension.update"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))),Pe},[u,H]);return r.default.createElement("div",{className:s.default.extension_overview_container},r.default.createElement(c.Progress,{loading:Y}),r.default.createElement("div",{className:s.default.extension_overview_header},!((E=u.metadata)===null||E===void 0)&&E.iconUrl?r.default.createElement("img",{src:(f=u.metadata)===null||f===void 0?void 0:f.iconUrl,alt:(0,v.replaceLocalizePlaceholder)((a=u.metadata)===null||a===void 0?void 0:a.displayName,(b=u.metadata)===null||b===void 0?void 0:b.extensionId)}):r.default.createElement("div",{className:s.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:s.default.extension_detail},r.default.createElement("div",{className:s.default.extension_name},r.default.createElement("h1",null,r.default.createElement("a",{href:`${(y=u.metadata)===null||y===void 0?void 0:y.openVSXRegistry}/extension/${(A=u.metadata)===null||A===void 0?void 0:A.namespace.toLowerCase()}/${(S=u.metadata)===null||S===void 0?void 0:S.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer"},(0,v.replaceLocalizePlaceholder)((w=u.metadata)===null||w===void 0?void 0:w.displayName,(T=u.metadata)===null||T===void 0?void 0:T.extensionId)||((D=u.metadata)===null||D===void 0?void 0:D.name))),r.default.createElement("span",{className:s.default.extension_id},((I=u.metadata)===null||I===void 0?void 0:I.namespace.toLowerCase())+"."+((O=u.metadata)===null||O===void 0?void 0:O.name.toLowerCase()))),r.default.createElement("div",{className:s.default.manifest},r.default.createElement("span",null,r.default.createElement("a",{href:(M=u.metadata)===null||M===void 0?void 0:M.namespaceUrl,target:"_blank",rel:"noopener noreferrer"},(R=u.metadata)===null||R===void 0?void 0:R.namespace)),r.default.createElement("span",null,r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),((P=u.metadata)===null||P===void 0?void 0:P.downloadCount)||ie.downloadCount),((k=u.metadata)===null||k===void 0?void 0:k.averageRating)&&r.default.createElement("span",null,(F=u.metadata)===null||F===void 0?void 0:F.averageRating),((L=u.metadata)===null||L===void 0?void 0:L.repository)&&r.default.createElement("span",null,r.default.createElement("a",{href:(B=u.metadata)===null||B===void 0?void 0:B.repository,target:"blank"},"Repository")),((j=u.metadata)===null||j===void 0?void 0:j.license)&&r.default.createElement("span",null,r.default.createElement("a",{href:(W=u.metadata)===null||W===void 0?void 0:W.files.license,target:"blank"},"License")),r.default.createElement("span",null,"v",(U=u.metadata)===null||U===void 0?void 0:U.version)),r.default.createElement("div",{className:s.default.description},(0,v.replaceLocalizePlaceholder)((Q=u.metadata)===null||Q===void 0?void 0:Q.description,(V=u.metadata)===null||V===void 0?void 0:V.extensionId)),r.default.createElement("div",{className:s.default.buttons},_e))),r.default.createElement("div",{className:s.default.extension_overview_body},r.default.createElement(o.Tabs,{className:s.default.tabs,value:Z,onChange:le,tabs:[g.details,g.changelog]}),r.default.createElement("div",{className:s.default.extension_content},Z===g.details&&ie.readme&&r.default.createElement(m.Markdown,{content:ie.readme}),Z===g.changelog&&ie.changelog&&r.default.createElement(m.Markdown,{content:ie.changelog}))))};t.ExtensionOverview=h},87791:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=t.ExtensionViewType=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(43718),v=e(29150),m=n.__importDefault(e(90425));var _;(function(s){s[s.MARKETPLACE=0]="MARKETPLACE",s[s.INSTALLED=1]="INSTALLED"})(_||(t.ExtensionViewType=_={})),t.Extension=r.default.memo(({extension:s,onInstall:g,onClick:l,type:h,installedExtensions:u,openVSXRegistry:d})=>{const E=(0,c.useDesignStyles)(m.default.extension_item,"extension_item"),[f,a]=(0,r.useState)(),b=u?.find(I=>I.namespace===s.namespace&&I.name===s.name),y=!!(h===_.INSTALLED||b),A=y&&h===_.MARKETPLACE&&b?.version!==s.version,[S,w]=(0,r.useState)(y),T=(0,r.useCallback)(I=>{I.stopPropagation(),a(!0),g(s).then(()=>{a(!1),w(!0)})},[s]),D=(0,r.useCallback)(()=>{l(s,S?A?v.InstallState.SHOULD_UPDATE:v.InstallState.INSTALLED:v.InstallState.NOT_INSTALLED)},[s]);return r.default.createElement("div",{className:E,onClick:D},s.iconUrl?r.default.createElement("img",{className:m.default.icon,src:s.iconUrl,alt:(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)}):r.default.createElement("div",{className:m.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:m.default.extension_detail},r.default.createElement("div",{className:m.default.base_info},r.default.createElement("span",{className:m.default.display_name},(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)||s.name),r.default.createElement("span",{className:m.default.version},s.version),!S&&r.default.createElement("span",{className:m.default.download_count},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),s.downloadCount)),r.default.createElement("span",{className:m.default.description},(0,p.replaceLocalizePlaceholder)(s.description,`${s.publisher}.${s.name}`)),r.default.createElement("div",{className:m.default.footer},r.default.createElement("span",{className:m.default.namespace},s.namespace),h===_.MARKETPLACE&&(y?A?r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:f},(0,p.localize)(f?"marketplace.extension.updating":"marketplace.extension.update")):r.default.createElement("span",{className:m.default.state_text},(0,p.localize)("marketplace.extension.installed")):r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:f},(0,p.localize)(f?"marketplace.extension.installing":"marketplace.extension.install"))),h===_.INSTALLED&&r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:!0},(0,p.localize)("marketplace.extension.installed")))))})},38105:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenVsxExtensionManagerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(29150),p=e(70274),v=e(67761);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.VSXExtensionContribution,{token:c.VSXExtensionServiceToken,useClass:v.VSXExtensionService}],this.backServices=[{servicePath:c.VSXExtensionServicePath}]}};t.OpenVsxExtensionManagerModule=m,t.OpenVsxExtensionManagerModule=m=n.__decorate([(0,r.Injectable)()],m)},70274:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(57517),v=e(63067),m=e(52416),_=e(29150),s=e(21082),g=e(6449),l=e(73689);let h=class{initialize(){}onDidRender(){const d=this.mainLayoutService.getTabbarHandler(s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);d&&(d.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):d.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(d){d.registerResourceProvider({scheme:s.EXTENSION_SCHEME,provideResource:async E=>{const{extensionId:f,state:a}=E.getParsedQuery(),b=await this.vsxExtensionService.getLocalExtension(f),y=this.iconService.fromIcon("",b?.iconUrl,m.IconType.Background);return{uri:E,metadata:{...b,extensionId:f,state:a,openVSXRegistry:this.vsxExtensionService.openVSXRegistry},icon:y||(0,o.getIcon)("extension"),name:(0,c.replaceLocalizePlaceholder)(b?.displayName,f)||""}}})}registerEditorComponent(d){const E=`${s.EXTENSION_SCHEME}_detail`;d.registerEditorComponent({component:g.ExtensionOverview,uid:E,scheme:s.EXTENSION_SCHEME}),d.registerEditorComponentResolver(s.EXTENSION_SCHEME,(f,a,b)=>{b?.([{type:p.EditorOpenType.component,componentId:E}])})}registerComponent(d){d.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,c.localize)("marketplace.extension.container"),priority:5,containerId:s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:l.VSXExtensionView,activateKeyBinding:"ctrlcmd+shift+x"})}};t.VSXExtensionContribution=h,n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],h.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(_.VSXExtensionServiceToken),n.__metadata("design:type",Object)],h.prototype,"vsxExtensionService",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],h.prototype,"iconService",void 0),t.VSXExtensionContribution=h=n.__decorate([(0,c.Domain)(o.ClientAppContribution,v.MainLayoutContribution,o.ComponentContribution,p.BrowserEditorContribution)],h)},67761:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(57517),p=e(98453),v=e(71354),m=e(28423),_=e(52416),s=e(12456),g=e(29150);let l=class extends o.Disposable{get extensions(){return this.extensionsObservable.get()}get installedExtensions(){return this.installedExtensionsObservable.get()}get openVSXRegistry(){return this.openVSXRegistryObservable.get()}constructor(){super(),this.extensionsObservable=(0,m.observableValue)(this,[]),this.installedExtensionsObservable=(0,m.observableValue)(this,[]),this.openVSXRegistryObservable=(0,m.observableValue)(this,""),this.tasks=new Map,this.getInstalledExtensions(),this.disposables.push(this.extensionInstanceService.onDidChange(()=>{this.getInstalledExtensions(),this.search(this.searchValue)}))}updateStatusBar(){if(this.tasks.size===0){this.installStatus&&(this.installStatus.dispose(),this.installStatus=void 0);return}const u="sumi-upload-file-status";if(this.tasks.size===1){const d=(0,o.localize)("marketplace.extension.installing"),E={text:d,alignment:o.StatusBarAlignment.RIGHT,tooltip:d,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(u,E)}}async install(u){var d,E;const f=this.getExtensionId(u);if(this.tasks.has(f)||!u.downloadUrl)return;const a=this.backService.install({id:f,name:(d=u.name)!==null&&d!==void 0?d:"-",url:u.downloadUrl,version:(E=u.version)!==null&&E!==void 0?E:"-"});return this.tasks.set(f,a),this.updateStatusBar(),a.then(async b=>{if(this.tasks.delete(f),this.updateStatusBar(),await this.extensionManagementService.postChangedExtension(!1,b),this.themeService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.iconService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.productIconService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.PRODUCT_ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}})}async uninstall(u){u&&u.path&&await this.extensionManagementService.postUninstallExtension(u.path)}async disable(u){u&&u.path&&this.extensionManagementService.postDisableExtension(u.path)}async enable(u){u&&u.path&&this.extensionManagementService.postEnableExtension(u.path)}getExtensionId(u){var d,E,f;return(d=u?.extensionId)!==null&&d!==void 0?d:((E=u?.namespace)===null||E===void 0?void 0:E.toLowerCase())+"."+((f=u?.name)===null||f===void 0?void 0:f.toLowerCase())}async getLocalExtension(u){return u?this.extensions.find(E=>this.getExtensionId(E)===u)||this.installedExtensions.find(E=>this.getExtensionId(E)===u):void 0}async getRemoteRawExtension(u){if(!u)return;const d={extensionId:u},E=await this.backService.getExtension(d);if(E&&E.extensions&&E.extensions.length>=1)return Object.assign({},E.extensions[0])}async getOpenVSXRegistry(){const u=await this.backService.getOpenVSXRegistry();(0,m.transaction)(d=>{this.openVSXRegistryObservable.set(u,d)})}async openExtensionEditor(u,d){this.workbenchEditorService.open(new o.URI(`extension://?extensionId=${u}&state=${d}`),{preview:!0})}async search(u){const d={query:u,size:50,sortBy:"downloadCount"};this.searchValue=u;const E=await this.backService.search(d);E.extensions&&(0,m.transaction)(f=>{this.extensionsObservable.set(E.extensions.filter(a=>!this.installedExtensions.find(b=>this.getExtensionId(b)===this.getExtensionId(a))).map(a=>({...a,publisher:a.namespace,iconUrl:a.files.icon,downloadUrl:a.files.download,readme:a.files.readme})),f)})}async searchInstalledExtensions(u){(0,m.transaction)(d=>{const E=this.installedExtensions;this.installedExtensionsObservable.set(E.sort((f,a)=>{const b=(0,o.fuzzyScore)(u,u.toLowerCase(),0,f.name,f.name.toLowerCase(),0,!0),y=(0,o.fuzzyScore)(u,u.toLowerCase(),0,a.name,a.name.toLowerCase(),0,!0);return b?y?y[0]-b[0]:-1:1}),d)})}getInstalledExtensions(){const u=this.extensionInstanceService.getExtensionInstances().map(d=>{const E=d.extensionId;return{namespace:E&&E.includes(".")?E.split(".")[0]:d.packageJSON.publisher,name:d.packageJSON.name,id:d.extensionId,version:d.packageJSON.version,displayName:d.packageJSON.displayName,description:d.packageJSON.description,publisher:d.packageJSON.publisher,iconUrl:d.packageJSON.icon&&d.extensionLocation.toString()+`/${d.packageJSON.icon}`,path:d.path,realpath:d.realPath}});(0,m.transaction)(d=>{this.installedExtensionsObservable.set(u,d)})}};t.VSXExtensionService=l,n.__decorate([(0,r.Autowired)(g.VSXExtensionServicePath),n.__metadata("design:type",Object)],l.prototype,"backService",void 0),n.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),n.__metadata("design:type",c.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],l.prototype,"extensionInstanceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ExtensionManagementService)],l.prototype,"extensionManagementService",void 0),n.__decorate([(0,r.Autowired)(_.IThemeService),n.__metadata("design:type",Object)],l.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.IProductIconService),n.__metadata("design:type",Object)],l.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],l.prototype,"statusBarService",void 0),n.__decorate([(0,o.pMemoize)(h=>h),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],l.prototype,"search",null),t.VSXExtensionService=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l)},73689:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionView=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importStar(e(14041)),c=e(14041),p=e(97267),v=e(41869),m=e(68974),_=e(43718),s=e(5567),g=e(29150),l=e(21082),h=e(87791),u=n.__importDefault(e(68143)),d=[g.TabActiveKey.MARKETPLACE,g.TabActiveKey.INSTALLED],E=()=>{const[f,a]=(0,c.useState)(g.TabActiveKey.MARKETPLACE),[b,y]=(0,c.useState)(!1),A=(0,v.useInjectable)(g.VSXExtensionServiceToken),S=(0,v.useAutorun)(A.extensionsObservable),w=(0,v.useAutorun)(A.installedExtensionsObservable),T=(0,v.useAutorun)(A.openVSXRegistryObservable),D=(0,r.default)(R=>{y(!0);let P;f===g.TabActiveKey.MARKETPLACE?P=A.search(R):P=A.searchInstalledExtensions(R),typeof P=="object"&&P.then&&P.then(()=>{y(!1)})},500),I=(0,c.useCallback)(R=>A.install(R),[]),O=(0,c.useCallback)((R,P)=>{const k=A.getExtensionId(R);A.openExtensionEditor(k,P)},[]),M=(0,c.useCallback)(R=>{const P=d[R];P&&a(P)},[]);return o.createElement("div",{className:u.default.panel},o.createElement(p.Tabs,{mini:!0,className:u.default.tabs,value:d.indexOf(f),onChange:M,tabs:[(0,_.localize)("marketplace.panel.tab.marketplace"),(0,_.localize)("marketplace.tab.installed")]}),o.createElement("div",{style:{padding:"8px"}},o.createElement(s.AutoFocusedInput,{containerId:l.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,_.localize)("marketplace.panel.tab.placeholder.search"),value:"",onChange:R=>D(R.target.value)})),f===g.TabActiveKey.MARKETPLACE&&o.createElement("div",{className:u.default.extensions_view},o.createElement(m.Progress,{loading:b}),S.map((R,P)=>o.createElement(h.Extension,{key:`${P}:${R.namespace}-${R.name}`,onClick:O,onInstall:I,extension:R,type:h.ExtensionViewType.MARKETPLACE,installedExtensions:w,openVSXRegistry:T}))),f===g.TabActiveKey.INSTALLED&&o.createElement("div",{className:u.default.extensions_view},w.map((R,P)=>o.createElement(h.Extension,{key:`${P}:${R.namespace}-${R.name}`,onClick:O,onInstall:I,extension:R,type:h.ExtensionViewType.INSTALLED,openVSXRegistry:T}))))};t.VSXExtensionView=E},29150:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOpenvsxMarketplaceService=t.VSXExtensionServicePath=t.VSXExtensionServiceToken=t.VSXExtension=t.InstallState=t.TabActiveKey=t.EnableScope=void 0;var e;(function(c){c.GLOBAL="GLOBAL",c.WORKSPACE="WORKSPACE"})(e||(t.EnableScope=e={}));var n;(function(c){c.MARKETPLACE="marketplace",c.INSTALLED="installed"})(n||(t.TabActiveKey=n={}));var r;(function(c){c.INSTALLED="INSTALLED",c.NOT_INSTALLED="NOT_INSTALLED",c.SHOULD_UPDATE="SHOULD_UPDATE"})(r||(t.InstallState=r={}));class o{}t.VSXExtension=o,o.KEYS=new Set(["version","iconUrl","publisher","name","displayName","description","averageRating","downloadCount","downloadUrl","readmeUrl","licenseUrl","repository","license","readme","preview","namespaceAccess","publishedBy"]),t.VSXExtensionServiceToken=Symbol("VSXExtensionSerivceToken"),t.VSXExtensionServicePath="VSXExtensionServicePath",t.IOpenvsxMarketplaceService=Symbol("IOpenvsxMarketplaceService")},53599:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageContribution=t.ExtensionStorageModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93584),p=e(7446),v=e(16132),m=e(10207),_=e(19227);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IExtensionStorageService,useClass:m.ExtensionStorageService},{token:c.IExtensionStoragePathServer,useClass:v.ExtensionStoragePathServer},{token:c.IExtensionStorageServer,useClass:p.ExtensionStorageServer},g]}};t.ExtensionStorageModule=s,t.ExtensionStorageModule=s=n.__decorate([(0,o.Domain)(_.name)],s);let g=class{onReconnect(){this.extensionStorageService.reConnectInit()}};t.ExtensionStorageContribution=g,n.__decorate([(0,r.Autowired)(c.IExtensionStorageService),n.__metadata("design:type",Object)],g.prototype,"extensionStorageService",void 0),t.ExtensionStorageContribution=g=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],g),n.__exportStar(e(10207),t)},16132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStoragePathServer=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(96405),v=e(14951),m=e(73344),_=e(51500),{Path:s}=c.path;let g=class{constructor(){this.windowsDataFolders=[c.StoragePaths.WINDOWS_APP_DATA_DIR,c.StoragePaths.WINDOWS_ROAMING_DIR],this.deferredWorkspaceStoragePath=new c.Deferred,this.deferredStoragePath=new c.Deferred,this.storagePathInitialized=!1}get workspaceSuffixName(){return this.appConfig.workspaceSuffixName||_.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const h=await this.getLogsDirPath();if(!h)throw new Error("Unable to get parent log directory");const u=h,d=c.URI.file(u).toString();return await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),new c.URI(h)}async provideHostStoragePath(h,u,d){const E=await this.getWorkspaceStorageDirPath(d);if(!E)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(c.URI.file(E).toString())||await this.fileSystem.createFolder(c.URI.file(E).toString());const f=await this.buildWorkspaceId(h,u,d),a=new s(E).join(f).toString();await this.fileSystem.access(c.URI.file(a).toString())||await this.fileSystem.createFolder(c.URI.file(a).toString());const b=new c.URI(a);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(b.path.toString()),this.deferredStoragePath.resolve(E),this.storagePathInitialized=!0),this.cachedStoragePath=b}async getLastWorkspaceStoragePath(){var h;return this.storagePathInitialized?(h=this.cachedStoragePath)===null||h===void 0?void 0:h.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(h){return this.hashCalculateService.calculate(h)}async buildWorkspaceId(h,u,d){const E=await this.getUserHomeDir(),f=y=>y.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(c.Schemes.file),a=y=>y.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}`).withScheme(c.Schemes.file);if(!h){const y=a(new c.URI(E));return this.doHash(y.toString())}if(f(new c.URI(E)).toString()===h.uri){const y=u.map(A=>A.uri).sort().join(",");return this.doHash(y)}else{const y=new c.URI(h.uri);return this.doHash(y.toString())}}async getLogsDirPath(){const h=await this.loggerManager.getLogFolder();return new s(h).join(c.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(h){const u=await this.getWorkspaceDataDirPath(h);return new s(u).join(c.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(h){const u=await this.getUserHomeDir(),d=h;return new s(u).join(...c.isWindows?this.windowsDataFolders:[""],d).toString()}async getUserHomeDir(){const h=await this.fileSystem.getCurrentUserHome();if(!h)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(h.uri)}};t.ExtensionStoragePathServer=g,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(m.ILoggerManagerClient),n.__metadata("design:type",Object)],g.prototype,"loggerManager",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(p.IHashCalculateService),n.__metadata("design:type",Object)],g.prototype,"hashCalculateService",void 0),t.ExtensionStoragePathServer=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},7446:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageServer=void 0;const r=e(85608),o=e(76003),c=e(43718),p=e(14951),v=e(93584),{Path:m}=c.path;let _=n=class{constructor(){this.deferredWorkspaceDataDirPath=new c.Deferred,this.storageThrottler=new c.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(g,l,h){return this.storageDelayer=new c.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(g,l,h||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(g,l){if(l)return await this.fileSystem.access(g);if(!this.storageExistPromises.has(g)){const h=this.fileSystem.access(g);this.storageExistPromises.set(g,h)}return await this.storageExistPromises.get(g)}async setupDirectories(g,l,h){const u=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(h),d=c.URI.file(u).toString();await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),this.workspaceDataDirPath=u,this.globalDataPath=new m(this.workspaceDataDirPath).join(c.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const E=c.URI.file(this.globalDataPath).toString();await this.fileSystem.access(E)||await this.fileSystem.createFolder(E),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const f=await this.extensionStoragePathsServer.provideHostLogPath(),a=await this.extensionStoragePathsServer.provideHostStoragePath(g,l,h);return{logUri:f.codeUri,storageUri:a.codeUri,globalStorageUri:c.Uri.file(this.globalDataPath)}}async resolveStorageTask(g){const l=Object.keys(g);for(const h of l){const u=await this.readFromFile(h);for(const{key:d,value:E}of g[h])E===void 0||(0,c.isEmptyObject)(E)?delete u[d]:u[d]=E;await this.writeToFile(h,u)}}doSet(){const g={...this.storageTasks};return this.storageTasks={},this.resolveStorageTask(g)}async set(g,l,h){const u=await this.getDataPath(h);if(!u)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[u]||(this.storageTasks[u]=[]),this.storageTasks[u].push({key:g,value:l}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(g,l){const h=await this.getDataPath(l);return h?(await this.readFromFile(h))[g]:{}}async getAll(g){const l=await this.getDataPath(g);return l?await this.readFromFile(l):{}}async getDataPath(g){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,g)return new m(this.globalDataPath).join("global-state.json").toString();{const l=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return l?new m(l).join("workspace-state.json").toString():void 0}}async readFromFile(g){const l=c.URI.file(g);if(!await this.asAccess(l.toString(),!0))return{};try{const{content:u}=await this.fileSystem.readFile(l.toString());return JSON.parse(u.toString())}catch(u){return this.logger.error('Failed to parse data from "',l.toString(),'". Reason:',u),{}}}async writeToFile(g,l){const h=c.URI.file(g);await this.asAccess(h.parent.toString())||await this.fileSystem.createFolder(h.parent.toString());const d=JSON.stringify(l);let E=await this.fileSystem.getFileStat(h.toString());E||(E=await this.fileSystem.createFile(h.toString())),await this.fileSystem.setContent(E,d)}};t.ExtensionStorageServer=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(v.IExtensionStoragePathServer),r.__metadata("design:type",Object)],_.prototype,"extensionStoragePathsServer",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],_.prototype,"fileSystem",void 0),r.__decorate([(0,o.Autowired)(c.ILogger),r.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.ExtensionStorageServer=_=n=r.__decorate([(0,o.Injectable)()],_)},10207:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(51500),v=e(93584);let m=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}async updateEnvState(){await this.get(c.firstSessionDateStorageKey,!0)===void 0&&await this.set(c.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(s,g,l){return this.extensionStorageServer.set(s,g,l)}get(s,g){return this.extensionStorageServer.get(s,g)}getAll(s=!1){return this.extensionStorageServer.getAll(s)}async reConnectInit(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}};t.ExtensionStorageService=m,n.__decorate([(0,r.Autowired)(v.IExtensionStorageServer),n.__metadata("design:type",Object)],m.prototype,"extensionStorageServer",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceService),n.__metadata("design:type",Object)],m.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ExtensionStorageService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},93584:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(85853),t),n.__exportStar(e(56969),t),n.__exportStar(e(23618),t)},85853:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=t.IExtensionStoragePathServer=void 0,t.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},56969:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionStorageService=t.IExtensionStorageServer=void 0,t.IExtensionStorageServer=Symbol("ExtensionStorageServer"),t.IExtensionStorageService=Symbol("ExtensionStorageService")},23618:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50492:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93584),t)},57962:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivationEventServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(80076)),o=e(76003),c=e(43718);let p=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new c.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(m){return this.collectTopicData.get(m)||[]}async fireEvent(m,_=""){this.activatedEventSet.add(JSON.stringify({topic:m,data:_}));let s;if(this.wildCardTopics.has(m)?s=this.eventListeners.get(m):this.eventListeners.has(m)?s=this.eventListeners.get(m):s=this.eventListeners.get(m+":"+_),s){const g=await Promise.allSettled(s.map(l=>this.tryRun(m,_,l)));for(const l of g)l.status==="rejected"&&this.logger.error(`fire event ${m}:${_} error: ${l.reason}`)}}addWildCardTopic(m){return this.wildCardTopics.add(m),{dispose:()=>{this.wildCardTopics.delete(m)}}}onEvent(m,_){const s=m.indexOf(":");let g,l;return s===-1?(g=m,l=""):(g=m.substr(0,s),l=m.substr(s+1)),this.addListener(g,{topic:g,data:l,execute:_})}addListener(m,_){if(this.collectTopicData.set(_.topic,_.data),this.wildCardTopics.has(m))return this.eventListeners.has(m)||this.eventListeners.set(m,[]),this.eventListeners.get(m).push(_),{dispose:()=>{const s=this.eventListeners.get(m).indexOf(_);s!==-1&&this.eventListeners.get(m).splice(s,1)}};{const s=m+":"+_.data;return this.eventListeners.has(s)||this.eventListeners.set(s,[]),this.eventListeners.get(s).push(_),{dispose:()=>{const g=this.eventListeners.get(s).indexOf(_);g!==-1&&this.eventListeners.get(s).splice(g,1)}}}}async tryRun(m,_,s){this.wildCardTopics.has(m)?(0,r.default)(s.data)(_)&&await s.execute():await s.execute()}};t.ActivationEventServiceImpl=p,n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.ActivationEventServiceImpl=p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p)},63056:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionNoExportsView=t.ExtensionLoadingView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(68974),p=n.__importDefault(e(17267)),v=({style:_})=>r.default.createElement("div",{style:_||{},className:p.default.kt_extension_view},r.default.createElement(c.Progress,{loading:!0}));t.ExtensionLoadingView=v;const m=(_,s)=>r.default.createElement("div",{className:p.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",_,s));t.ExtensionNoExportsView=m},56405:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PortalRoot=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(87420),v=e(25600),m=_=>{var s;const[g,l]=o.default.useState(null),h=(0,c.useInjectable)(v.AbstractViewExtProcessService),u=(0,c.useInjectable)(p.IThemeService);o.default.useEffect(()=>{const E=new c.DisposableCollection;return u.getCurrentTheme().then(f=>l(f.type)),E.push(u.onThemeChange(f=>{f.type&&f.type!==g&&l(f.type)})),E.dispose.bind(E)},[]);const d=_.original;return o.default.createElement(d,{..._.otherProps,className:(0,r.default)((s=_.otherProps)===null||s===void 0?void 0:s.className,(0,p.getThemeTypeSelector)(g)),getContainer:()=>h.getPortalShadowRoot(_.extensionId)})};t.PortalRoot=m},82443:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TREE_VIEW_NODE_HEIGHT=t.TreeViewNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(93899),_=e(95422),s=e(69589),g=e(42912),l=n.__importDefault(e(50790)),h=({item:u,onClick:d,onChange:E,onContextMenu:f,itemType:a,leftPadding:b=8,onTwistierClick:y,decorations:A,defaultLeftPadding:S=8,treeViewId:w,decorationService:T,draggable:D,onDragStart:I,onDragEnter:O,onDragLeave:M,onDragOver:R,onDrop:P})=>{const k=(0,_.useInjectable)(g.IIconService),F=(0,p.useDesignStyles)(l.default.expansion_toggle,"expansion_toggle"),L=(0,p.useDesignStyles)(l.default.tree_view_node,"tree_view_node"),[B,j]=(0,o.useState)(u.uri&&T.getDecoration(u.uri,!1));(0,o.useEffect)(()=>{const we=T.onDidChangeDecorations(be=>{u.uri&&be.affectsResource(u.uri)&&j(T.getDecoration(u.uri,!1))});return()=>{we.dispose()}},[]);const W=(0,_.useInjectable)(g.IThemeService),U=(0,o.useCallback)(we=>{(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&d(we,u,a)},[u,a,d]),Q=(0,o.useCallback)(we=>{(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&(y?y(we,u,a):d(we,u,a))},[u,a,y,d]),V=(0,o.useCallback)(we=>{we.nativeEvent.which===0||!f||(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&f(we,u,a)},[u,a,f]),$=(0,o.useCallback)(we=>{I&&I(we,u)},[u,I]),Y=(0,o.useCallback)(we=>{O&&O(we,u)},[u,O]),z=(0,o.useCallback)(we=>{M&&M(we,u)},[u,M]),H=(0,o.useCallback)(we=>{R&&R(we,u)},[u,R]),K=(0,o.useCallback)(we=>{P&&P(we,u)},[u,P]),Z=(0,o.useCallback)(we=>{E(u),we.stopPropagation()},[u,E]),X=a===c.TreeNodeType.CompositeTreeNode,ie=X?`${S+(u.depth||0)*(b||0)}px`:`${S+(u.depth||0)*(b||0)+8}px`,oe={height:t.TREE_VIEW_NODE_HEIGHT,lineHeight:`${t.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:ie},le=(we,be)=>A&&A?.classlist.indexOf(l.default.mod_loading)>-1?o.default.createElement(c.Loading,null):o.default.createElement("div",{onClick:be,className:(0,r.default)(l.default.tree_view_node_segment,F,(0,p.getIcon)("arrow-right"),{[`${l.default.mod_collapsed}`]:!we.expanded})}),pe=we=>o.default.createElement("div",{className:(0,r.default)(l.default.file_icon,we.icon),style:{maxHeight:t.TREE_VIEW_NODE_HEIGHT}}),q=we=>{var be;return we.checkboxInfo===void 0?null:o.default.createElement(c.CheckBox,{"data-node-id":we.treeItemId,readOnly:!0,onChange:fe=>Z(fe),checked:!!we.checkboxInfo.checked,id:we.treeItemId,role:(be=we.checkboxInfo.accessibilityInformation)===null||be===void 0?void 0:be.role,title:we.checkboxInfo.tooltip})},Ee=we=>{const be=()=>{if(we.highlights){let fe=[],xe=0;const Re=we.highlights.sort((Be,me)=>Be[0]-me[0]);return fe=Re.map((Be,me)=>{const[re,he]=Be,Oe=we.displayName.slice(xe,re);xe=he;const Se=we.displayName.slice(re,he),Fe=[o.default.createElement("span",{key:`line_begin_${me}_${Oe}`},Oe),o.default.createElement("span",{className:l.default.highlight,key:`line_hightlight_${me}_${Se}`},Se)];if(me===Re.length-1){const Ge=we.displayName.slice(he);Fe.push(o.default.createElement("span",{key:`line_end_${me}_${Ge}`},Ge))}return Fe}),fe}else return we.displayName};return o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_displayname,we.strikethrough&&l.default.strikethrough)},be())},_e=()=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_tail)},te()),te=()=>{if(u.actions.length>0)return o.default.createElement("div",{className:l.default.tree_view_actions},o.default.createElement(v.TitleActionList,{className:l.default.inlineMenu,context:[{treeViewId:w,treeItemId:u.treeItemId}],nav:u.actions,menuId:m.MenuId.ViewItemContext}))},ge=we=>{if(X)return le(we,Q)},Te=()=>u.tooltip||u.name,Pe=we=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment_grow,l.default.tree_view_node_description)},!we.name&&!we.description?"\u2014\u2014":we.description),Ae=()=>{if(!B)return null;const we=B.badge||"",be=B.color,fe=be&&W.getColor({id:be});return o.default.createElement("div",{className:l.default.tree_view_node_tail,style:{color:fe}},(0,s.transformLabelWithCodicon)(we.slice(),{},k.fromString.bind(k)))};return o.default.createElement("div",{key:u.id,onClick:U,onContextMenu:V,onDragStart:$,onDragOver:H,onDragEnter:Y,onDragLeave:z,onDrop:K,title:Te(),className:(0,r.default)(L,A?A.classlist:null),"data-id":u.id,style:oe,draggable:D},o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_content)},ge(u),q(u),pe(u),o.default.createElement("div",{className:l.default.tree_view_node_overflow_wrap},Ee(u),Pe(u)),_e(),Ae()))};t.TreeViewNode=h,t.TREE_VIEW_NODE_HEIGHT=22},81302:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTabBarTreeView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(68974),v=e(41893),m=e(24429),_=e(72260),s=e(82443),g=n.__importDefault(e(17267)),l=({viewState:d,model:E,dataProvider:f,treeViewId:a})=>{const b=(0,c.useInjectable)(_.IMainLayoutService),y=(0,c.useInjectable)(v.IDecorationsService),A=(0,r.useMemo)(()=>b.getViewAccordionService(a),[]),S=(0,r.useMemo)(()=>{const $=A?.getViewState(a);return $?!$.collapsed&&!$.hidden:!1},[A]),{height:w}=d,{canSelectMany:T}=E.treeViewOptions||{},D=(0,r.useRef)(null),I=(0,r.useCallback)($=>{E.handleTreeHandler({...$,getModel:()=>E.treeModel,hasDirectFocus:()=>D.current===document.activeElement})},[E]),O=(0,r.useCallback)(($,Y)=>{$.stopPropagation();const{toggleDirectory:z}=E;z(Y)},[E]),M=(0,r.useCallback)($=>R($)?!1:$.shiftKey,[]),R=(0,r.useCallback)($=>{const{metaKey:Y,ctrlKey:z}=$;return c.isOSX&&Y||z},[]),P=(0,r.useCallback)(($,Y,z)=>{$.stopPropagation();const{handleItemClick:H,handleItemToggleClick:K,handleItemRangeClick:Z}=E;if(!Y)return;const X=M(event),ie=R(event);T?X?Z(Y,z):ie?K(Y,z):H(Y,z):H(Y,z)},[T,E]),k=(0,r.useCallback)($=>{const{handleCheckBoxChange:Y}=E;$&&Y($)},[E]),F=(0,r.useCallback)(($,Y)=>{const{handleContextMenu:z}=E;z($,Y)},[E]),L=$=>{const{handleContextMenu:Y}=E;Y($)},B=(0,r.useCallback)(()=>{const{enactiveNodeDecoration:$}=E;$()},[E]),j=(0,r.useCallback)(($,Y)=>{const{handleDragStart:z}=E;z($,Y)},[E]),W=(0,r.useCallback)(($,Y)=>{const{handleDragOver:z}=E;z($,Y)},[E]),U=(0,r.useCallback)(($,Y)=>{const{handleDragEnter:z}=E;z($,Y)},[E]),Q=(0,r.useCallback)(($,Y)=>{const{handleDrop:z}=E;z($,Y)},[E]),V=(0,r.useCallback)(($,Y)=>{const{handleDragLeave:z}=E;z($,Y)},[E]);return(0,r.useEffect)(()=>{var $;const Y=()=>{E.handleTreeBlur()};return($=D.current)===null||$===void 0||$.addEventListener("blur",Y,!0),()=>{var z;(z=D.current)===null||z===void 0||z.removeEventListener("blur",Y,!0)}},[D.current]),r.default.createElement("div",{className:g.default.kt_extension_view,tabIndex:-1,ref:D,onContextMenu:L,onClick:B,"data-tree-view-id":a},r.default.createElement(u,{height:w,isVisible:S,handleTreeReady:I,handleItemClicked:P,handleCheckBoxChange:k,handleTwistierClick:O,handleContextMenu:F,handleDragStart:j,handleDragOver:W,handleDragEnter:U,handleDragLeave:V,handleDrop:Q,draggable:E.draggable,treeViewId:a,model:E,dataProvider:f,decorationService:y}))};t.ExtensionTabBarTreeView=l;function h(d,E){return d.isVisible===E.isVisible&&d.model===E.model&&d.treeViewId===E.treeViewId&&d.height===E.height}const u=(0,r.memo)(({model:d,treeViewId:E,height:f,isVisible:a,dataProvider:b,handleTreeReady:y,handleItemClicked:A,handleCheckBoxChange:S,handleTwistierClick:w,handleContextMenu:T,handleDragStart:D,handleDragOver:I,handleDragEnter:O,handleDragLeave:M,handleDrop:R,draggable:P,decorationService:k})=>{const[F,L]=(0,r.useState)(!1),[B,j]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let U=!1;return(async()=>(await d.whenReady,d.treeModel&&a&&await d.treeModel.ensureReady,U||L(!0)))(),()=>{U=!0,d&&d.removeNodeDecoration()}},[d,a]),(0,r.useEffect)(()=>{const U=b.onDidChangeEmpty(()=>{b.isTreeEmpty!==B&&j(b.isTreeEmpty)});return()=>U.dispose()},[]);const W=(0,r.useCallback)(U=>r.default.createElement(s.TreeViewNode,{item:U.item,itemType:U.itemType,decorations:d.decorations.getDecorations(U.item),onClick:A,onChange:S,onTwistierClick:w,onContextMenu:T,onDragStart:D,onDragOver:I,onDragEnter:O,onDragLeave:M,onDrop:R,defaultLeftPadding:8,leftPadding:8,treeViewId:E,draggable:P,decorationService:k}),[d.treeModel]);if(F){if(B)return r.default.createElement(m.WelcomeView,{viewId:E});if(d.treeModel)return r.default.createElement(o.RecycleTree,{height:f,itemHeight:s.TREE_VIEW_NODE_HEIGHT,onReady:y,model:d.treeModel},W)}else return r.default.createElement(p.Progress,{loading:!0});return null},h);u.displayName="ExtensionsTreeView"},88341:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionWebviewView=t.WebviewViewShouldShowEvent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(99220);class p extends o.BasicEvent{}t.WebviewViewShouldShowEvent=p;const v=({viewId:m})=>{const _=r.default.useRef(null),s=(0,o.useInjectable)(o.IEventBus),g=(0,o.useInjectable)(c.ExtensionService);return r.default.useEffect(()=>{const l=new o.CancellationTokenSource,h=new o.Disposable({dispose:()=>l.cancel()});return g.eagerExtensionsActivated.promise.then(()=>{l.token.isCancellationRequested||_.current&&s.fire(new p({viewType:m,container:_.current,title:"",cancellationToken:l.token,disposer:h}))}),()=>{h.dispose()}},[]),r.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:_})};t.ExtensionWebviewView=v},17428:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(81302),t),n.__exportStar(e(63056),t)},21167:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkthroughsEditorView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(93374),m=e(52416),_=e(99220),s=e(17441),g=n.__importDefault(e(42076)),l=({resource:{uri:E}})=>{const f=(0,p.useInjectable)(s.WalkthroughsService),a=(0,p.useInjectable)(p.IContextKeyService),{query:b,authority:y}=E,[A,S]=(0,o.useState)(),[w,T]=(0,o.useState)();(0,o.useEffect)(()=>{A&&A.steps.length>0&&(w||T(A.steps[0].id))},[A,w]),(0,o.useEffect)(()=>{b&&S(f.getWalkthrough(b))},[b,A]);const D=(0,o.useCallback)(()=>{var I;return A&&((I=A.steps.find(O=>O.id===w))===null||I===void 0?void 0:I.media)},[w,A]);return o.default.createElement("div",{className:g.default.getting_started_container},o.default.createElement("div",{className:g.default.getting_started_detailsContent},o.default.createElement("div",{className:g.default.category_container},o.default.createElement("div",{className:g.default.category_icon},A&&A.icon.type==="image"&&o.default.createElement("img",{src:A.icon.path})),o.default.createElement("div",{className:g.default.category_description_container},o.default.createElement("h2",{className:g.default.category_title},A?.title),o.default.createElement("div",{className:g.default.category_description},A?.description))),o.default.createElement("div",{className:g.default.steps_container},o.default.createElement("div",{className:g.default.getting_started_detail_container},o.default.createElement("div",{className:g.default.step_list_container},A?A.steps.filter(I=>a.match(I.when)).map(I=>o.default.createElement(h,{key:I.id,step:I,isExpanded:I.id===w,onSelected:T})):null))),o.default.createElement("div",{className:g.default.getting_started_media},w&&o.default.createElement(u,{media:D(),extensionId:y,stepId:w}))))};t.WalkthroughsEditorView=l;const h=({step:E,isExpanded:f,onSelected:a})=>{const b=(0,p.useInjectable)(p.IOpenerService),y=(0,p.useInjectable)(s.WalkthroughsService),A=(0,p.useInjectable)(m.IIconService),[S,w]=(0,o.useState)(!1),{description:T}=E;(0,o.useEffect)(()=>{const R=y.onDidProgressStep(P=>{const{id:k,done:F}=P;k===E.id&&F&&w(F)});return()=>R.dispose()},[]);const D=(0,o.useCallback)(()=>{w(!S),y.progressByEvent(_.CompletionEventsType.stepSelected+":"+E.id)},[S,E.id]),I=(0,o.useCallback)(R=>{const{href:P}=R;b.open(P),/^http(s)?:\/\//.test(P)&&y.progressByEvent(_.CompletionEventsType.onLink+":"+P)},[]),O=(0,o.useCallback)(()=>{if(T.length===0)return null;const R=[];return T.map((P,k)=>{if(P.nodes.length===1&&typeof P.nodes[0]!="string"){const F=P.nodes[0];R.push(o.default.createElement("div",{key:k.toString()+R.length,title:F.title},o.default.createElement(c.Button,{onClick:()=>I(F)},(0,p.transformLabelWithCodicon)(F.label,{},A.fromString.bind(A)))))}else{const F=P.nodes.map((L,B)=>typeof L=="string"?L:o.default.createElement("a",{key:L.label+"#"+B,title:L.title,onClick:()=>I(L)},L.label));R.push(o.default.createElement("p",{key:k.toString()+R.length.toString()+F.length.toString()},F))}}),o.default.createElement("div",{className:g.default.step_description_container},o.default.createElement(o.default.Fragment,null,R))},[T]),M=(0,o.useCallback)(()=>(0,p.transformLabelWithCodicon)(E.title,{},A.fromString.bind(A)),[E.title]);return o.default.createElement("div",{className:(0,r.default)(g.default.getting_started_step,f&&g.default.expanded),onClick:()=>a(E.id)},o.default.createElement("div",{className:g.default.checkbox},o.default.createElement(c.CheckBox,{id:E.id,onChange:D,checked:S})),o.default.createElement("div",{className:g.default.step_container},o.default.createElement("h3",{className:g.default.step_title},M()),f&&O()))},u=({media:E,extensionId:f,stepId:a})=>{const b=(0,p.useInjectable)(m.IThemeService),y=(0,p.useInjectable)(s.WalkthroughsService),[A,S]=(0,o.useState)(""),[w,T]=(0,o.useState)(""),D=(0,o.useCallback)(async I=>E?.type==="image"?"":I?(await y.getFileContent(f,I)).toString():"",[E]);if((0,o.useEffect)(()=>{const I=y.getStepsByExtension(a);I&&(E&&E.type==="svg"&&I.media.svg&&D(I.media.svg).then(S),E&&E.type==="markdown"&&I.media.markdown&&D(I.media.markdown).then(T))},[E,a]),!E)return null;if(E.type==="image"){const I=b.getCurrentThemeSync().type,O=E.path[I].toString(!0).replace(/ /g,"%20");return o.default.createElement(o.default.Fragment,null,o.default.createElement("img",{alt:E.altText,srcSet:O.toLowerCase().endsWith(".svg")?O:O+" 1.5x"}))}return E.type==="svg"?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:g.default.media_svg_container,dangerouslySetInnerHTML:{__html:A}})):E.type==="markdown"?o.default.createElement(o.default.Fragment,null,o.default.createElement(d,{content:w,media:E})):null},d=({content:E,media:f})=>{const a=(0,p.useInjectable)(p.IOpenerService);if(f.type!=="markdown")return null;const b=(0,o.useCallback)(()=>f.base.resolve("/").toString(),[f,E]);return o.default.createElement(v.Markdown,{content:E,options:{baseUrl:b()},onLinkClick:y=>a.open(y)})}},87444:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtCommandManagementImpl=void 0;const n=e(85608),r=e(76003),o=e(43718);let c=class extends o.Disposable{constructor(){super(...arguments),this.commandEnvRegistry=new Map,this.proxyCommandExecutorRegistry=new Map}dispose(){this.commandEnvRegistry.clear(),this.proxyCommandExecutorRegistry.clear()}registerProxyCommandExecutor(v,m){this.proxyCommandExecutorRegistry.set(v,m)}async executeExtensionCommand(v,m,_){const s=this.proxyCommandExecutorRegistry.get(v);if(!s)throw new Error('Proxy command executor "'+v+'" is not existed');return s.$executeExtensionCommand(m,..._)}registerExtensionCommandEnv(v,m="node"){return this.commandEnvRegistry.set(v,m),{dispose:()=>{this.commandEnvRegistry.delete(v)}}}getExtensionCommandEnv(v){return this.commandEnvRegistry.get(v)}};t.ExtCommandManagementImpl=c,t.ExtCommandManagementImpl=c=n.__decorate([(0,r.Injectable)()],c)},49413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtInstanceManagementService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(99220),v=e(42734);let m=class extends o.Disposable{constructor(){super(),this.onDidChangeEmitter=new c.Emitter,this.extensionMap=new Map,this._whenReady=this.init()}async init(){this.workspaceStorage=await this.storageProvider(o.STORAGE_NAMESPACE.EXTENSIONS),this.globalStorage=await this.storageProvider(o.STORAGE_NAMESPACE.GLOBAL_EXTENSIONS)}get whenReady(){return this._whenReady}get onDidChange(){return this.onDidChangeEmitter.event}dispose(){this.disposeExtensionInstances()}getExtensionInstances(){return Array.from(this.extensionMap.values())}disposeExtensionInstances(){for(const s of this.extensionMap.values())s.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(s){s.forEach(g=>{var l;(l=this.extensionMap.get(g))===null||l===void 0||l.dispose()})}resetExtensionInstances(){for(const s of this.extensionMap.values())s.reset()}getExtensionInstanceByPath(s){return this.extensionMap.get(s)}getExtensionInstanceByExtId(s){for(const g of this.extensionMap.values())if(g.id===s)return g}deleteExtensionInstanceByPath(s){this.extensionMap.delete(s),this.onDidChangeEmitter.fire()}addExtensionInstance(s){this.extensionMap.set(s.path,s),this.onDidChangeEmitter.fire()}async checkExtensionEnable(s){await this.whenReady;const g=this.globalStorage.get(s.extensionId,p.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(s.extensionId,g)===p.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(s,g,l){const h=typeof s=="string"?await this.extensionNodeClient.getExtension(s,(0,c.getLanguageId)(),{}):s;if(h)return this.injector.get(v.Extension,[h,await this.checkExtensionEnable(h),g||(this.appConfig.extensionDir?h.realPath.startsWith(this.appConfig.extensionDir):!1),!!l])}checkIsBuiltin(s){const g=this.getExtensionCandidateByPath(s.realPath);return(this.appConfig.extensionDir?s.realPath.startsWith(this.appConfig.extensionDir):!1)||(g?g.isBuiltin:!1)}checkIsDevelopment(s){const g=this.getExtensionCandidateByPath(s.realPath);return!!g?.isDevelopment}getExtensionCandidateByPath(s){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find(g=>g.path===s)}};t.ExtInstanceManagementService=m,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],m.prototype,"extensionNodeClient",void 0),t.ExtInstanceManagementService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},98453:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionManagementService=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(14951),p=e(99220),v=e(82389),m=e(71354),_=e(35321);let s=class extends o.WithEventBus{async getExtensionProps(l,h){const u=await this.extensionNodeClient.getExtension(l,(0,o.getLanguageId)(),h);if(u){const d=this.getExtensionByPath(l);if(d)return{...d.toJSON(),extraMetadata:u.extraMetadata}}}getExtensionByPath(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.path)}getExtensionByExtId(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.id)}async postChangedExtension(l,h,u){const{upgrade:d,extensionPath:E,oldExtensionPath:f,isBuiltin:a}=typeof l=="boolean"?{upgrade:l,extensionPath:h,oldExtensionPath:u,isBuiltin:!1}:l,b=this.extInstanceManagementService.getExtensionInstanceByPath(E);if(b){this.logger.warn(`Extension ${b.id} already exists, skip activate`);return}const y=await this.extInstanceManagementService.createExtensionInstance(E,!!a);if(y)return d&&this.disableExtension(f),await this.enableExtension(y)}async postEnableExtension(l){const h=await this.extInstanceManagementService.getExtensionInstanceByPath(l);if(h)return await this.enableExtension(h)}async postDisableExtension(l){return this.disableExtension(l)}async postUninstallExtension(l){return this.uninstallExtension(l)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(l=>l.toJSON())}disableExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l))}async enableExtension(l){this.extInstanceManagementService.addExtensionInstance(l),l.enable(),await l.initialize(),this.eventBus.fire(new m.ExtensionDidEnabledEvent(l.toJSON())),this.sumiContributesService.register(l.id,l.packageJSON.sumiContributes||{}),this.contributesService.register(l.id,l.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(l){try{return await this.fileService.delete(o.URI.file(l).toString()),!0}catch(h){return this.logger.error(h),!1}}async uninstallExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l)),await this.removeExtension(l),this.eventBus.fire(new m.ExtensionDidUninstalledEvent)}};t.ExtensionManagementService=s,n.__decorate([(0,r.Autowired)(m.AbstractExtInstanceManagementService),n.__metadata("design:type",m.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],s.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(_.VSCodeContributesServiceToken),n.__metadata("design:type",_.VSCodeContributesService)],s.prototype,"contributesService",void 0),n.__decorate([(0,r.Autowired)(v.SumiContributionsServiceToken),n.__metadata("design:type",v.SumiContributionsService)],s.prototype,"sumiContributesService",void 0),n.__decorate([(0,r.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),t.ExtensionManagementService=s=n.__decorate([(0,r.Injectable)()],s)},20670:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeExtProcessService=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(18740),p=e(41869),v=e(99220),m=e(72464),_=e(46147),s=e(37846),g=e(28949),l=e(51072),h=e(17802);let u=class{constructor(){this._apiFactoryDisposables=new p.DisposableStore,this.ready=new p.Deferred,this._extHostUpdated=new p.Deferred,this.extensions=[]}disposeApiFactory(){this._apiFactoryDisposables.clear()}async disposeProcess(){this.disposeApiFactory(),await this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}async activate(){return await this.createExtProcess(),this.protocol&&(this.ready.resolve(),await this.createBrowserMainThreadAPI(),await(await this.getProxy()).$updateExtHostData(),this._extHostUpdated.resolve()),this.protocol}async activeExtension(E,f){!this.appConfig.noExtHost&&!f&&(await this._extHostUpdated.promise,await(await this.getProxy()).$activateExtension(E.id))}async updateExtensionData(E){if(this.extensions=E,this.protocol){const f=await this.getProxy();await f.$updateExtHostData(),f.$fireChangeEvent()}}getExtension(E){return this.extensions.find(f=>f.id===E)}async $activateExtension(E){const f=this.extensions.find(a=>a.path===E);f&&await f.activate()}async $getExtensions(){return this.extensions.map(E=>E.toJSON())}async getProxy(){return await this.ready.promise,this.protocol.getProxy(_.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const E=(0,h.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(E),this._apiFactoryDisposables.add((0,p.toDisposable)((0,l.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,p.toDisposable)((0,g.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await E.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const E=new p.Disposable,f=this.mainThreadExtenderContributionProvider.getContributions();for(const b of f)b.registerMainThreadExtender(this.mainThreadExtenderService);const a=this.mainThreadExtenderService.getMainThreadExtenders();for(const b of a){const y=this.injector.get(b.serviceClass,[this.protocol]);this.protocol.set(b.identifier,y),E.addDispose(y)}return E}async getActivatedExtensions(){return await(await this.getProxy()).$getActivatedExtensions()}get clientId(){return this.applicationService.clientId}async createExtProcess(){await this.extensionNodeClient.createProcess(this.clientId,{enableDebugExtensionHost:this.appConfig.enableDebugExtensionHost,inspectExtensionHost:this.appConfig.inspectExtensionHost,extensionConnectOption:this.appConfig.extensionConnectOption,extHostSpawnOptions:this.getSpawnOptions()}),await this.initExtProtocol()}async initExtProtocol(){var E,f;this.channel&&this.channel.dispose(),this.protocol&&((f=(E=this.protocol).dispose)===null||f===void 0||f.call(E)),this.channel=await this.channelHandler.openChannel(v.CONNECTION_HANDLE_BETWEEN_EXTENSION_AND_MAIN_THREAD),this.connection=this.channel.createConnection(),this.protocol=new o.SumiConnectionMultiplexer(this.connection,{timeout:this.appConfig.rpcMessageTimeout,name:"node-ext-host",io:(0,o.createExtMessageIO)(s.knownProtocols)})}};t.NodeExtProcessService=u,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],u.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(p.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(c.WSChannelHandler),n.__metadata("design:type",c.WSChannelHandler)],u.prototype,"channelHandler",void 0),n.__decorate([(0,r.Autowired)(m.IMainThreadExtenderService),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,r.Autowired)(m.MainThreadExtenderContribution),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderContributionProvider",void 0),t.NodeExtProcessService=u=n.__decorate([(0,r.Injectable)()],u)},90731:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ViewExtProcessService=void 0;const r=e(85608),o=e(76003),c=e(65973),p=e(8919),v=e(41869),m=e(40827),_=e(43718),s=e(61656),g=e(99220),l=e(25600),h=e(17428),u=e(54107),d=e(9438),E=e(8403),f=e(31738),{Path:a,posix:b}=v.path,y="load";let A=n=class extends _.Disposable{constructor(){super(...arguments),this.debugLogger=(0,_.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(w){return this.extensions.find(T=>T.id===w)}async initExtension(w){this.extensions=w}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(w){}async $getExtensions(){return this.extensions.map(w=>w.toJSON())}async disposeProcess(){}activate(){const w=this.requireInterceptorContributionProvider.getContributions();for(const T of w)T.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(w,T)=>{let D,I=`Error: ${w.message}`;for(const O of T)if(I+=`
31543
+ `}async provideEditorDocumentModelContent(u,d){return""}isReadonly(u){return!1}isAlwaysDirty(u){return!0}disposeEvenDirty(u){return!0}closeAutoSave(u){return!0}async saveDocumentModel(u,d,E,f,a,b=!1){const{name:y}=u.getParsedQuery(),A=u.path.toString()!=="/"?c.path.dirname(u.path.toString()):this.appConfig.workspaceDir,S=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:y||u.displayName,defaultUri:c.URI.file(c.isWindows?A.replaceAll("\\","/"):A)});return S&&(await this.editorDocumentModelService.saveEditorDocumentModel(S,d,E,f,a,b),await this.workbenchEditorService.open(S,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:c.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};t.UntitledSchemeDocumentProvider=g,r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],g.prototype,"editorDocumentModelService",void 0),r.__decorate([(0,o.Autowired)(m.WorkbenchEditorService),r.__metadata("design:type",m.WorkbenchEditorService)],g.prototype,"workbenchEditorService",void 0),r.__decorate([(0,o.Autowired)(c.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(c.AppConfig),r.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(c.IApplicationService),r.__metadata("design:type",Object)],g.prototype,"applicationService",void 0),r.__decorate([(0,o.Autowired)(s),r.__metadata("design:type",s)],g.prototype,"untitledIndex",void 0),r.__decorate([(0,o.Autowired)(c.PreferenceService),r.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),t.UntitledSchemeDocumentProvider=g=r.__decorate([(0,o.Injectable)()],g);let l=class extends c.WithEventBus{constructor(){super(...arguments),this.scheme=c.Schemes.untitled}provideResource(u){const{name:d}=u.getParsedQuery();return{name:d||u.displayName,uri:u,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");return!!(d&&d.dirty)}async close(u,d){const E=this.documentModelService.getModelReference(u.uri,"close-resource-check");if(!E)return!1;if(d===m.AskSaveResult.SAVE){const f=await E.instance.save();return E.dispose(),f}else return d===m.AskSaveResult.REVERT?(await E.instance.revert(),E.dispose(),!0):!d||d===m.AskSaveResult.CANCEL?(E.dispose(),!1):(E.dispose(),!0)}async shouldCloseResource(u){const d=this.documentModelService.getModelDescription(u.uri,"close-resource-check");if(!d||!d.dirty)return!0;const E={[(0,c.localize)("file.prompt.dontSave","Don't Save")]:m.AskSaveResult.REVERT,[(0,c.localize)("file.prompt.save","Save")]:m.AskSaveResult.SAVE,[(0,c.localize)("file.prompt.cancel","Cancel")]:m.AskSaveResult.CANCEL},f=await this.dialogService.open({message:(0,c.formatLocalize)("saveChangesMessage",u.name),type:c.MessageType.Info,buttons:Object.keys(E)});return await this.close(u,E[f])}};t.UntitledSchemeResourceProvider=l,r.__decorate([(0,o.Autowired)(p.IDialogService),r.__metadata("design:type",Object)],l.prototype,"dialogService",void 0),r.__decorate([(0,o.Autowired)(_.IEditorDocumentModelService),r.__metadata("design:type",Object)],l.prototype,"documentModelService",void 0),t.UntitledSchemeResourceProvider=l=r.__decorate([(0,o.Injectable)()],l)},33835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditor=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(23418),p=e(96689),v=m=>{const _=r.default.useRef(),s=(0,o.useInjectable)(c.EditorCollectionService),g=(0,o.useInjectable)(p.IEditorDocumentModelService),[l,h]=r.default.useState(void 0),[u,d]=r.default.useState(void 0),[E,f]=r.default.useState(void 0),[a,b]=r.default.useState(void 0);let y=!1;return r.default.useEffect(()=>{if(_.current){l&&l.dispose();const A=s.createCodeEditor(_.current,{automaticLayout:!0,...m.options});h(A),u&&A.open(u)}return()=>{y=!0,l&&l.dispose(),u&&u.dispose()}},[_.current]),m&&l&&m.editorRef&&m.editorRef(l),E&&a!==E&&(b(E),g.createModelReference(new o.URI(E),"editor-react-component").then(A=>{u&&u.dispose(),!y&&A.instance.uri.toString()===E?d(A):A.dispose()})),u&&l&&l.currentDocumentModel!==u.instance&&l.open(u),m.uri&&m.uri.toString()!==E&&f(m.uri.toString()),r.default.createElement("div",{ref:A=>A&&(_.current=A),...m})};t.CodeEditor=v},50674:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateOnGroupTabChange=r;const n=e(41869);function r(o){return(0,n.useUpdateOnEvent)(o.onDidEditorGroupTabChanged,[o])}},6670:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSuggestWidgetContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(76835);let v=class{contribute(_){const s=new o.DisposableCollection,g=_.monacoEditor.getContribution(p.SuggestController.ID);if(g&&g.widget&&g.widget.value){const l=g.widget.value;s.push(l.onDidSelect(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:h}))})),s.push(l.onDidHide(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:h}))})),s.push(l.onDidShow(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:h}))})),s.push(l.onDidFocus(h=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:h}))})),l&&l._setDetailsVisible&&l._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return s}};t.EditorSuggestWidgetContribution=v,n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],v.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),t.EditorSuggestWidgetContribution=v=n.__decorate([(0,r.Injectable)()],v)},67903:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorTopPaddingContribution=void 0;class e{contribute(r){return r.monacoEditor.onDidChangeModel(()=>{r.monacoEditor.changeViewZones(o=>{o.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})})})}}t.EditorTopPaddingContribution=e},51553:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorGroup=t.WorkbenchEditorServiceImpl=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(91830),p=e(75524),v=e(43718),m=e(14951),_=n.__importStar(e(20868)),s=e(72665),g=e(23418),l=e(96689),h=e(76759),u=e(47049),d=e(82196),E=e(17878),f=10,a=w=>!!(w.supportsRevive&&!w.deleted);let b=class extends v.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new v.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new v.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new v.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new v.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new v.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new v.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new v.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.editorGroupIdGen=0,this.untitledIndex.update(),this.initialize()}setEditorContextKeyService(T){this.editorContextKeyService=T}setCurrentGroup(T){var D;if(T){if(this._currentEditorGroup===T)return;this._currentEditorGroup=T,this._onActiveResourceChange.fire(T.currentResource),this.eventBus.fire(new d.EditorActiveResourceStateChangedEvent({resource:T.currentResource,openType:T.currentOpenType,editorUri:(D=this.currentEditor)===null||D===void 0?void 0:D.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(T){var D;T.payload.group===this.currentEditorGroup&&this.eventBus.fire(new d.EditorActiveResourceStateChangedEvent({resource:T.payload.newResource,openType:T.payload.newOpenType,editorUri:(D=this.currentEditor)===null||D===void 0?void 0:D.currentUri}))}getAllOpenedUris(){const T=[];for(const D of this.editorGroups)for(const I of D.resources)T.findIndex(M=>M.isEqual(I.uri))===-1&&T.push(I.uri);return T}async getAllOpenedDocuments(){const T=[];for(const D of this.editorGroups)for(const I of D.resources){if(I.uri.scheme!=="file")continue;if(T.findIndex(M=>M.uri.isEqual(I.uri))===-1){const M=await D.getDocumentModelRef(I.uri);M&&T.push(M.instance)}}return T}async save(T){if(this.editorGroups.length)try{for(const D of this.editorGroups){const I=D.resources.find(O=>O.uri.isEqual(T));I&&await D.saveResource(I)}return T}catch(D){throw new Error(`Save Failed: ${D.message}`)}}getDefaultSavePath(T){const D=T.path.toString()!=="/"?v.path.dirname(T.path.toString()):this.appConfig.workspaceDir;return v.isWindows?D.replace(/\\/g,"/"):D}async saveAs(T){var D,I;if(!(!this._currentEditorGroup||!((D=this._currentEditorGroup.currentResource)===null||D===void 0)&&D.deleted))try{const O=this.getDefaultSavePath(T);return await this.windowDialogService.showSaveDialog({saveLabel:"SaveAs File:",showNameInput:!0,defaultFileName:(I=this._currentEditorGroup.currentResource)===null||I===void 0?void 0:I.name,defaultUri:v.URI.file(O),saveAs:!0})}catch(O){throw new Error(`SaveAs Failed: ${O.message}`)}}async saveAll(T,D){for(const I of this.editorGroups)await I.saveAll(T,D)}hasDirty(){for(const T of this.editorGroups)if(T.hasDirty())return!0;return!1}calcDirtyCount(){const T=new Set;return this.editorGroups.reduce((D,I)=>D+I.calcDirtyCount(T),0)}createEditorGroup(){const T=this.injector.get(y,[this.generateRandomEditorGroupName(),this.editorGroupIdGen++]);this.editorGroups.push(T);const D=new v.Disposable(T.onDidEditorGroupBodyChanged(()=>{T===this.currentEditorGroup&&(!T.currentOpenType&&T.currentResource||this._onActiveResourceChange.fire(T.currentResource))}),T.onDidEditorFocusChange(()=>{var O;T===this.currentEditorGroup&&(!T.currentOpenType&&T.currentResource||this._onActiveEditorUriChange.fire((O=T.currentOrPreviousFocusedEditor)===null||O===void 0?void 0:O.currentUri))}));T.addDispose({dispose:()=>{D.dispose()}});const I=T.onDidEditorGroupTabChanged(()=>{this.saveOpenedResourceState()});return T.addDispose({dispose:()=>{I.dispose()}}),T.onCurrentEditorCursorChange(O=>{this._currentEditorGroup===T&&this._onCursorChange.fire(O)}),T}generateRandomEditorGroupName(){let T=(0,v.makeRandomHexString)(5);for(;this.editorGroups.findIndex(D=>D.name===T)!==-1;)T=(0,v.makeRandomHexString)(5);return T}initialize(){return this.initializing||(this.initializing=this.doInitialize()),this.initializing}async doInitialize(){this.openedResourceState=await this.initializeState(),await this.contributionsReady.promise,await this.restoreState(),this._currentEditorGroup=this.editorGroups[0]}async initializeState(){return await this.getStorage(v.STORAGE_NAMESPACE.WORKBENCH)}get currentEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentEditor}get currentCodeEditor(){return this.currentEditorGroup.currentCodeEditor}get currentEditorGroup(){return this._currentEditorGroup}get currentOrPreviousFocusedEditor(){return this.currentEditorGroup&&this.currentEditorGroup.currentOrPreviousFocusedEditor}async open(T,D){await this.initialize();let I=this.currentEditorGroup,O;if(D&&typeof D.groupIndex<"u"?O=D.groupIndex:D&&D.relativeGroupIndex&&(O=this.currentEditorGroup.index+D.relativeGroupIndex),typeof O=="number"&&O>=0){if(O>=this.editorGroups.length)return I.open(T,Object.assign({},D,{split:g.EditorGroupSplitAction.Right}));I=this.sortedEditorGroups[O]||this.currentEditorGroup}return I.open(T,D)}async openUris(T){await this.initialize(),await this.currentEditorGroup.openUris(T)}getEditorGroup(T){return this.editorGroups.find(D=>D.name===T)}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(T){const D=this.editorGroups.findIndex(I=>I===T);if(D!==-1){if(this.editorGroups.length===1)return;this.editorGroups.splice(D,1),this.currentEditorGroup===T&&this.setCurrentGroup(this.editorGroups[0]);for(let I=D;I<this.editorGroups.length;I++)this.eventBus.fire(new d.EditorGroupIndexChangedEvent({group:this.editorGroups[I],index:I}))}}async saveOpenedResourceState(){if(this._restoring)return;const T=this.topGrid.serialize();await this.openedResourceState.set("grid",T)}prepareContextKeyService(){const T=I=>{let O=null;const M=this.documentModelManager.getModelDescription(I,"resourceContextKey");return M&&(O=M.languageId),O},D=new c.ResourceContextKey(this.editorContextKeyService,I=>{const O=T(I);return O||T(I)});this.onActiveResourceChange(I=>{this.currentEditor&&this.currentEditor.currentUri?D.set(this.currentEditor.currentUri):I?D.set(I.uri):D.reset()}),this.currentEditor&&this.currentEditor.currentUri?D.set(this.currentEditor.currentUri):this.currentResource?D.set(this.currentResource.uri):D.reset()}onDomCreated(T){this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(T)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let T={editorGroup:{uris:[],previewIndex:-1}};this.appConfig.disableRestoreEditorGroupState||(T=this.openedResourceState.get("grid",T)),this.topGrid=new u.EditorGrid,this.addDispose(this.topGrid),this.addDispose(this.topGrid.onDidGridAndDesendantStateChange(()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const D=[],I=this.topGrid.deserialize(T,()=>this.createEditorGroup(),D).then(()=>{this.topGrid.children.length===0&&!this.topGrid.editorGroup&&this.topGrid.setEditorGroup(this.createEditorGroup()),this.gridReady=!0,this._onDidGridReady.fire(),this.notifyGroupChanged()});return Promise.all(D).then(()=>{this._restoring=!1;for(const O of this.contributions.getContributions())O.onDidRestoreState&&O.onDidRestoreState()}),I}async closeAll(T,D){for(const I of this.editorGroups.slice(0))T?await I.close(T,{force:D}):await I.closeAll()}async closeAllOnlyConfirmOnce(){const T=[];for(const F of this.editorGroups)for(const L of F.resources)T.push(L);const I=(await Promise.all(T.map(async F=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(F),resource:F})))).filter(F=>F.shouldClose);if(I.length===0)return!1;const O={[(0,v.localize)("file.prompt.dontSave","Don't Save")]:d.AskSaveResult.REVERT,[(0,v.localize)("file.prompt.save","Save")]:d.AskSaveResult.SAVE,[(0,v.localize)("file.prompt.cancel","Cancel")]:d.AskSaveResult.CANCEL};let R=I.slice(0,f).map(F=>F.resource.name).join("\u3001");I.length>f&&(I.length-f===1?R+=(0,v.localize)("file.prompt.more.one"):R+=(0,v.formatLocalize)("file.prompt.more.number",I.length-f));const P=await this.dialogService.open({message:(0,o.toMarkdown)((0,v.formatLocalize)("saveNFilesChangesMessage",I.length,R),this.openner),type:v.MessageType.Info,buttons:Object.keys(O)}),k=O[P];return k===d.AskSaveResult.SAVE?(await Promise.all(I.map(F=>{var L,B;return(B=(L=this.resourceService).close)===null||B===void 0?void 0:B.call(L,F.resource,d.AskSaveResult.SAVE)})),!1):k===d.AskSaveResult.REVERT?(await Promise.all(I.map(F=>{var L,B;return(B=(L=this.resourceService).close)===null||B===void 0?void 0:B.call(L,F.resource,d.AskSaveResult.REVERT)})),!1):!0}async close(T,D){return this.closeAll(T,D)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(T){if(T.payload.resource.uri.scheme===v.Schemes.untitled){const{index:D}=T.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(D,10)),this.untitledCloseIndex.sort((I,O)=>I-O)}}createUntitledURI(){const T=this.untitledCloseIndex.shift()||this.untitledIndex.id;return new v.URI().withScheme(v.Schemes.untitled).withQuery(`name=${E.UntitledDocumentIdCounter.UNTITLED_FILE_NAME_PREFIX}${T}&index=${T}`)}createUntitledResource(T={uri:this.createUntitledURI()}){return this.open(T.uri,{preview:!1,focus:!0,...T.resourceOpenOptions})}};t.WorkbenchEditorServiceImpl=b,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],b.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(g.ResourceService),n.__metadata("design:type",g.ResourceService)],b.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],b.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.StorageProvider),n.__metadata("design:type",Function)],b.prototype,"getStorage",void 0),n.__decorate([(0,r.Autowired)(s.IDialogService),n.__metadata("design:type",Object)],b.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],b.prototype,"openner",void 0),n.__decorate([(0,r.Autowired)(d.BrowserEditorContribution),n.__metadata("design:type",Object)],b.prototype,"contributions",void 0),n.__decorate([(0,r.Autowired)(l.IEditorDocumentModelService),n.__metadata("design:type",Object)],b.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(E.UntitledDocumentIdCounter),n.__metadata("design:type",E.UntitledDocumentIdCounter)],b.prototype,"untitledIndex",void 0),n.__decorate([(0,r.Autowired)(s.IWindowDialogService),n.__metadata("design:type",Object)],b.prototype,"windowDialogService",void 0),n.__decorate([(0,v.OnEvent)(d.EditorGroupChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorGroupChangeEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"onEditorGroupChangeEvent",null),n.__decorate([(0,v.OnEvent)(d.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],b.prototype,"handleOnCloseUntitledResource",null),t.WorkbenchEditorServiceImpl=b=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],b);let y=class extends v.WithEventBus{constructor(T,D){super(),this.name=T,this.groupId=D,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new v.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new v.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupTabOperation=new v.Emitter,this.onDidEditorGroupTabOperation=this._onDidEditorGroupTabOperation.event,this._onDidEditorGroupBodyChanged=new v.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new v.Emitter,this.onDidEditorGroupContentLoading=this._onDidEditorGroupContentLoading.event,this.previewURI=null,this.resources=[],this.resourceStatus=new Map,this.cachedResourcesActiveOpenTypes=new Map,this.cachedResourcesOpenTypes=new Map,this.availableOpenTypes=[],this.activeComponents=new Map,this.activateComponentsProps=new Map,this.holdDocumentModelRefs=new Map,this.toDispose=[],this._prevDomHeight=0,this._prevDomWidth=0,this._onCurrentEditorCursorChange=new v.Emitter,this.onCurrentEditorCursorChange=this._onCurrentEditorCursorChange.event,this.resourceOpenHistory=[],this._domNode=null,this._diffEditorDomNode=null,this._diffEditorDomNodeAttached=!1,this._mergeEditorDomNode=null,this._mergeEditorDomNodeAttached=!1,this.codeEditorReady=new v.ReadyEvent,this.diffEditorReady=new v.ReadyEvent,this.diffEditorDomReady=new v.ReadyEvent,this.mergeEditorReady=new v.ReadyEvent,this.mergeEditorDomReady=new v.ReadyEvent,this._restoringState=!1,this.eventBus.onDirective(o.ResizeEvent.createDirective((0,o.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)),()=>{this.doLayoutEditors()}),this.eventBus.on(d.GridResizeEvent,I=>{I.payload.gridId===this.grid.uid&&this.doLayoutEditors()}),this.eventBus.on(d.EditorComponentDisposeEvent,I=>{this.activeComponents.delete(I.payload),this.activateComponentsProps.delete(I.payload)}),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged(T=>{T.preferenceName==="explorer.autoReveal"&&(this.explorerAutoRevealConfig=T.newValue)}))}attachDiffEditorDom(T){this._diffEditorDomNodeAttached||(this._diffEditorDomNode=T,this.diffEditorDomReady.ready(),this._diffEditorDomNodeAttached=!0)}attachMergeEditorDom(T){this._mergeEditorDomNodeAttached||(this._mergeEditorDomNode=T,this.mergeEditorDomReady.ready(),this._mergeEditorDomNodeAttached=!0)}attachToDom(T){this._domNode=T,T&&(this.contextKeyService.attachToDomNode(T),this.layoutEditors())}layoutEditors(){o.fastdom.measure(()=>{if(this._domNode){const T=this._domNode.offsetWidth,D=this._domNode.offsetHeight;(T!==this._prevDomWidth||D!==this._prevDomHeight)&&this.doLayoutEditors(),this._prevDomWidth=T,this._prevDomHeight=D}})}_layoutEditorWorker(){if(this.currentOpenType)switch(this.currentOpenType.type){case d.EditorOpenType.code:this.codeEditor&&this.codeEditor.layout();break;case d.EditorOpenType.diff:this.diffEditor&&this.diffEditor.layout();break;default:break}}doLayoutEditors(){this._measure&&this._measure.dispose(),this._measure=o.fastdom.mutate(()=>{this._layoutEditorWorker()})}setContextKeys(){var T;if(!this._resourceContext){const D=I=>{let O=null;const M=this.documentModelManager.getModelDescription(I,"resourceContextKey");return M&&(O=M.languageId),O};this._resourceContext=new c.ResourceContextKey(this.contextKeyService,I=>D(I)),this._diffResourceContextKey=new c.ResourceContextKey(this.contextKeyService,I=>D(I),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!1),this._activeEditorIsDirtyContextKey=this.contextKeyService.createKey("activeEditorIsDirty",!1),this._isInDiffRightEditorContextKey=this.contextKeyService.createKey("isInDiffRightEditor",!1),this._isInEditorComponentContextKey=this.contextKeyService.createKey("inEditorComponent",!1)}this.currentOrPreviousFocusedEditor&&this.currentOrPreviousFocusedEditor.currentUri?(this._resourceContext.set(this.currentOrPreviousFocusedEditor.currentUri),this.currentOrPreviousFocusedEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentOrPreviousFocusedEditor.currentDocumentModel.languageId)):this.currentEditor&&this.currentEditor.currentUri?(this._resourceContext.set(this.currentEditor.currentUri),this.currentEditor.currentDocumentModel&&this._editorLangIDContextKey.set(this.currentEditor.currentDocumentModel.languageId)):(this.currentResource?this._resourceContext.set(this.currentResource.uri):this._resourceContext.reset(),this._editorLangIDContextKey.reset()),this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty()),this._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set((T=this.currentResource)===null||T===void 0?void 0:T.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const T=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new v.Disposable(this.diffEditor.modifiedEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.modifiedEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.diffEditor.originalEditor.onFocus(()=>{this._currentOrPreviousFocusedEditor=this.diffEditor.originalEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onFocus(()=>{this.codeEditor.currentUri&&this.locateInFileTree(this.codeEditor.currentUri),this._currentOrPreviousFocusedEditor=this.codeEditor,this.setContextKeys(),this._onDidEditorFocusChange.fire()}),this.codeEditor.onBlur(T),this.diffEditor.originalEditor.onBlur(T),this.diffEditor.modifiedEditor.onBlur(T)),this.addDispose(this.updateContextKeyWhenEditorChangesFocusDisposer)}get contextKeyService(){return this._contextKeyService||(this._contextKeyService=this.workbenchEditorService.editorContextKeyService.createScoped()),this._contextKeyService}get index(){return this.workbenchEditorService.sortedEditorGroups.indexOf(this)}onResourceDecorationChangeEvent(T){T.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(T.payload.uri)&&this.pinPreviewed(),this.resources.find(I=>I.uri.isEqual(T.payload.uri))&&this.notifyTabChanged()}resetOpenType(){this._currentOpenType=null}oResourceOpenTypeChangedEvent(T){const D=T.payload;this.cachedResourcesOpenTypes.has(D.toString())&&this.cachedResourcesOpenTypes.delete(D.toString()),this.currentResource&&this.currentResource.uri.isEqual(D)&&(this.resetOpenType(),this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const T=this.currentResource,D=await this.editorComponentRegistry.resolveEditorComponent(T);this.currentResource===T&&(this.availableOpenTypes=D,this.cachedResourcesOpenTypes.set(T.uri.toString(),D))}}pinPreviewed(T){const D=this.previewURI;T===void 0?this.previewURI=null:this.previewURI&&this.previewURI.isEqual(T)&&(this.previewURI=null),D!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(T){this._onDidEditorGroupContentLoading.fire(T)}get currentEditor(){return this.currentOpenType?this.currentOpenType.type===d.EditorOpenType.code?this.codeEditor:this.currentOpenType.type===d.EditorOpenType.diff?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType){if(this.currentOpenType.type===d.EditorOpenType.code){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if(this.currentOpenType.type===d.EditorOpenType.diff){if(this.diffEditor.modifiedEditor.monacoEditor.hasTextFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasTextFocus())return this.diffEditor.originalEditor;if(this.diffEditor.modifiedEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.modifiedEditor;if(this.diffEditor.originalEditor.monacoEditor.hasWidgetFocus())return this.diffEditor.originalEditor}}return null}get currentCodeEditor(){return this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code?this.codeEditor:null}createEditor(T){this.codeEditor=this.collectionService.createCodeEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.addDispose(this.codeEditor.onRefOpen(()=>{this.doLayoutEditors()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged(D=>{this._onCurrentEditorCursorChange.fire(D)})),this.toDispose.push(this.codeEditor.onSelectionsChanged(D=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:D.selections,source:D.source,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onVisibleRangesChanged(D=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:D,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.eventBus.fire(new d.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))})),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.code,editorId:this.codeEditor.getId()})),this.toDispose.push(this.codeEditor.monacoEditor.onDidChangeModelContent(()=>{this._activeEditorIsDirtyContextKey.set(this.activeEditorIsDirty())})),this.codeEditorReady.ready()}createMergeEditor(T){this.mergeEditor=this.collectionService.createMergeEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),this.mergeEditorReady.ready()}createDiffEditor(T){this.diffEditor=this.collectionService.createDiffEditor(T,{},{[o.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.diffEditor.onRefOpen(()=>{this.doLayoutEditors()}),this.addDiffEditorEventListeners(this.diffEditor.originalEditor,"original"),this.addDiffEditorEventListeners(this.diffEditor.modifiedEditor,"modified"),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.diff,editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new d.CodeEditorDidVisibleEvent({groupName:this.name,type:d.EditorOpenType.diff,editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(T,D){this.toDispose.push(T.onSelectionsChanged(I=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:I.selections,source:I.source,editorUri:v.URI.from(T.monacoEditor.getModel().uri),side:D}))})),this.toDispose.push(T.onVisibleRangesChanged(I=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:I,editorUri:T.currentUri}))})),this.toDispose.push(T.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.eventBus.fire(new d.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:T.currentUri}))}))}async split(T,D,I){var O,M,R;const P=this.workbenchEditorService.createEditorGroup(),k=T===g.EditorGroupSplitAction.Left||T===g.EditorGroupSplitAction.Right?u.SplitDirection.Horizontal:u.SplitDirection.Vertical,F=T===g.EditorGroupSplitAction.Left||T===g.EditorGroupSplitAction.Top;if(this.grid.split(k,P,F),I&&!I.scrollTop&&(I.scrollTop=(O=this.currentEditor)===null||O===void 0?void 0:O.monacoEditor.getScrollTop()),I&&!I.scrollLeft&&(I.scrollLeft=(M=this.currentEditor)===null||M===void 0?void 0:M.monacoEditor.getScrollLeft()),I&&!I?.range){const L=(R=this.currentCodeEditor)===null||R===void 0?void 0:R.monacoEditor.getSelection();L&&(I.range=new _.Range(L.startLineNumber,L.startColumn,L.endLineNumber,L.endColumn))}return P.open(D,{...I,preview:!1,revealRangeInCenter:!1})}async open(T,D={}){if(T.scheme===v.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(T.withoutFragment().toString()),D&&D.split)return this.split(D.split,T,Object.assign({},D,{split:void 0,preview:!1}));if(!this.openingPromise.has(T.toString())){const O=this.doOpen(T,D);this.openingPromise.set(T.toString(),O),O.then(()=>{this.openingPromise.delete(T.toString())},()=>{this.openingPromise.delete(T.toString())})}return this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(D.preview)?!0:D.preview)||this.openingPromise.get(T.toString()).then(()=>{this.pinPreviewed(T)}),this.openingPromise.get(T.toString())}async pin(T){return this.pinPreviewed(T)}getPreventScrollOption(T={}){var D;return(D=T.preventScroll)!==null&&D!==void 0?D:this.preferenceService.get("editor.preventScrollAfterFocused")}async doOpen(T,D={}){var I,O,M;if(!this.resourceService.handlesUri(T))return this.openerService.open(T),!1;let R;try{const P=this.preferenceService.get("editor.previewMode")&&((0,v.isUndefinedOrNull)(D.preview)?!0:D.preview);if(this.currentResource&&this.currentResource.uri.isEqual(T)&&(!D.forceOpenType||D.forceOpenType.type===((I=this.currentOpenType)===null||I===void 0?void 0:I.type))){if(D.focus&&this.currentEditor){const k=this.getPreventScrollOption(D);(O=this._domNode)===null||O===void 0||O.focus({preventScroll:k}),this.currentEditor.monacoEditor.focus()}return D.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(D.range),setTimeout(()=>{var k;(k=this.currentEditor)===null||k===void 0||k.monacoEditor.revealRangeInCenter(D.range,0)},0)),this.locationInTree(D,T),this.notifyTabChanged(),{group:this,resource:this.currentResource}}else{const k=this._currentOpenType,F=this._currentResource;let L=null,B=this.resources.find(U=>U.uri.toString()===T.toString());if(!B){if(B=await this.resourceService.getResource(T),!B)throw new Error("This uri cannot be opened!: "+T);if(B.deleted){if(D.deletedPolicy==="fail")throw new Error("resource deleted "+T);if(D.deletedPolicy==="skip")return!1}D&&D.label&&(B.name=D.label),D&&(0,v.isDefined)(D.supportsRevive)&&(B.supportsRevive=D.supportsRevive);let U=null;if(D&&D.index!==void 0&&D.index<this.resources.length)U=this.resources[D.index],this.resources.splice(D.index,0,B),L={type:"open",resource:B,index:D.index};else if(this.currentResource){const Q=this.resources.indexOf(this.currentResource);this.resources.splice(Q+1,0,B),L={type:"open",resource:B,index:Q+1},U=this.currentResource}else this.resources.push(B),L={type:"open",resource:B,index:this.resources.length-1};P&&(this.previewURI&&await this.close(this.previewURI,{treatAsNotCurrent:!0,force:D.forceClose}),this.previewURI=B.uri),D.replace&&U&&await this.close(U.uri,{treatAsNotCurrent:!0,force:D.forceClose})}if(D.backend)return this.notifyTabChanged(),!1;if(F&&this.resourceOpenHistory[this.resourceOpenHistory.length-1]!==F.uri){this.resourceOpenHistory.push(F.uri);const U=(M=this.currentCodeEditor)===null||M===void 0?void 0:M.getSelections();U&&U.length>0&&this.recentFilesManager.updateMostRecentlyOpenedFile(F.uri.toString(),{lineNumber:U[0].selectionStartLineNumber,column:U[0].selectionStartColumn})}this._currentOpenType=null,this._currentResource=B;const j=this.reporterService.time(v.REPORT_NAME.EDITOR_REACTIVE);R=new v.Deferred,this.resourceStatus.set(B,R.promise);const W=setTimeout(()=>{this.notifyTabLoading(B)},60);this.notifyTabChanged(),this.notifyBodyChanged();try{await this.displayResourceComponent(B,D)}finally{L&&this._onDidEditorGroupTabOperation.fire(L)}return this._currentOrPreviousFocusedEditor=this.currentEditor,clearTimeout(W),R.resolve(),j.timeEnd(B.uri.toString()),this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new d.EditorGroupOpenEvent({group:this,resource:B})),this.locationInTree(D,T),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:k,oldResource:F})),{group:this,resource:B}}}catch(P){return(0,v.getDebugLogger)().error(P),R&&R.reject(),(0,h.isEditorError)(P,h.EditorTabChangedError)||this.messageService.error((0,v.formatLocalize)("editor.failToOpen",T.displayName,P.message),[],!0),!1}}locationInTree(T,D){T?.backend||(T?.disableNavigate||this.locateInFileTree(D),T.disableNavigateOnOpendEditor||this.locateInOpenedEditor(D))}locateInFileTree(T){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.FILE_COMMANDS.LOCATION.id,T)}locateInOpenedEditor(T){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(o.OPEN_EDITORS_COMMANDS.LOCATION.id,T)}async openUris(T){for(const D of T)await this.open(D)}async getDocumentModelRef(T){const D=T.toString();return this.holdDocumentModelRefs.has(D)||this.holdDocumentModelRefs.set(D,await this.documentModelManager.createModelReference(T,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(D)}disposeDocumentRef(T){if(T.scheme==="diff"){const D=T.getParsedQuery();this.doDisposeDocRef(new v.URI(D.original)),this.doDisposeDocRef(new v.URI(D.modified))}else T.scheme==="mergeEditor"?this.mergeEditor&&this.mergeEditor.dispose():this.doDisposeDocRef(T)}doDisposeDocRef(T){const D=T.toString();this.holdDocumentModelRefs.has(D)&&(this.holdDocumentModelRefs.get(D).dispose(),this.holdDocumentModelRefs.delete(D))}async openCodeEditor(T,D){this.resolveTabChanged(T,this.currentResource),await this.codeEditorReady.onceReady(async()=>{var I;const O=await this.getDocumentModelRef(T.uri);if(await this.codeEditor.open(O),D.range){const M=new _.Range(D.range.startLineNumber,D.range.startColumn,D.range.endLineNumber,D.range.endColumn);this.codeEditor.monacoEditor.setSelection(M),D.revealRangeInCenter&&setTimeout(()=>{this.codeEditor.monacoEditor.revealRangeInCenter(M,1)})}if(queueMicrotask(()=>{D.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(D.scrollTop),D.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(D.scrollLeft)}),D.focus){const M=this.getPreventScrollOption(D);(I=this._domNode)===null||I===void 0||I.focus({preventScroll:M});const R=this.eventBus.on(d.CodeEditorDidVisibleEvent,P=>{var k;if(P.payload.groupName===this.name&&P.payload.type===d.EditorOpenType.code){if(R.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(!((k=this.codeEditor.currentUri)===null||k===void 0)&&k.isEqual(T.uri)))try{this.codeEditor.focus()}catch{}}})}O.instance.dirty&&this.pinPreviewed(T.uri)})}async openDiffEditor(T,D){this.diffEditor||await this.diffEditorDomReady.onceReady(()=>{var R;const P=document.createElement("div");(R=this._diffEditorDomNode)===null||R===void 0||R.appendChild(P),this.createDiffEditor(P)});const I=T,[O,M]=await Promise.all([this.getDocumentModelRef(I.metadata.original),this.getDocumentModelRef(I.metadata.modified)]);await this.diffEditorReady.onceReady(async()=>{var R;if(!(!O||!M)&&(await this.diffEditor.compare(O,M,D,T.uri),D.focus)){const P=this.getPreventScrollOption(D);(R=this._domNode)===null||R===void 0||R.focus({preventScroll:P});const k=this.eventBus.on(d.CodeEditorDidVisibleEvent,F=>{if(F.payload.groupName===this.name&&F.payload.type===d.EditorOpenType.diff){if(k.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch{}}})}})}async openMergeEditor(T){const{metadata:D}=T;if(!D)return;this.mergeEditor||await this.mergeEditorDomReady.onceReady(()=>{var W;const U=document.createElement("div");(W=this._mergeEditorDomNode)===null||W===void 0||W.appendChild(U),this.createMergeEditor(U)});const{ancestor:I,input1:O,input2:M,output:R}=D,P=p.MergeEditorInputData.from(O),k=p.MergeEditorInputData.from(M),[F,L,B,j]=await Promise.all([this.getDocumentModelRef(v.URI.parse(I)),this.getDocumentModelRef(P.uri),this.getDocumentModelRef(v.URI.parse(R)),this.getDocumentModelRef(k.uri)]);await this.mergeEditorReady.onceReady(async()=>{await this.mergeEditor.open({ancestor:{uri:v.URI.parse(D.ancestor),textModel:F.instance.getMonacoModel(),baseContent:F.instance.baseContent||""},input1:P.setTextModel(L.instance.getMonacoModel()),input2:k.setTextModel(j.instance.getMonacoModel()),output:{uri:v.URI.parse(D.output),textModel:B.instance.getMonacoModel()}})})}async openCustomEditor(T,D){const I=this.editorComponentRegistry.getEditorComponent(D),O=this.editorComponentRegistry.getEditorInitialProps(D);if(I){if(this.activateComponentsProps.set(I,O),I.renderMode===d.EditorComponentRenderMode.ONE_PER_RESOURCE){const M=this.activeComponents.get(I)||[];M.findIndex(P=>P.uri.toString()===T.uri.toString())===-1&&M.push(T),this.activeComponents.set(I,M)}else if(I.renderMode===d.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(I,[T]);else if(I.renderMode===d.EditorComponentRenderMode.ONE_PER_WORKBENCH){const M=[];this.workbenchEditorService.editorGroups.forEach(R=>{if(R===this)return;const P=R.resources.find(k=>k.uri.isEqual(T.uri));P&&M.push(R.close(P.uri))}),await Promise.all(M).catch((0,v.getDebugLogger)().error),this.activeComponents.set(I,[T])}}else throw new Error("Cannot find Editor Component with id: "+D);this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}async displayResourceComponent(T,D){D.revealRangeInCenter===void 0&&(D.revealRangeInCenter=!0);const I=T,O=await this.resolveOpenType(T,D);if(O){const{activeOpenType:M,openTypes:R}=O;switch(this.availableOpenTypes=R,D.preserveFocus&&(D.focus=!1),M.type){case d.EditorOpenType.code:await this.openCodeEditor(T,D);break;case d.EditorOpenType.diff:await this.openDiffEditor(T,D);break;case d.EditorOpenType.mergeEditor:await this.openMergeEditor(T);break;case d.EditorOpenType.component:await this.openCustomEditor(T,M.componentId);break;default:return}this.resolveTabChanged(I,this.currentResource),this._currentOpenType=M,this.notifyBodyChanged(),this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(T.uri.toString(),M)}}resolveTabChanged(T,D){if(T!==D)throw new h.EditorTabChangedError}getLastOpenType(T){return this.cachedResourcesActiveOpenTypes.get(T.uri.toString())}async resolveOpenType(T,D){const I=this.cachedResourcesOpenTypes.get(T.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(T),O=this.preferenceService.get("workbench.editorAssociations"),M=A(I,this.cachedResourcesActiveOpenTypes.get(T.uri.toString()),T,O,D.forceOpenType);return this.cachedResourcesOpenTypes.set(T.uri.toString(),I),{activeOpenType:M,openTypes:I}}async close(T,{treatAsNotCurrent:D,force:I}={}){const O=this.resources.findIndex(M=>M.uri.toString()===T.toString());if(O!==-1){const M=this.resources[O];if(!I&&!await this.shouldClose(M))return!1;if(this.resources.splice(O,1),this._onDidEditorGroupTabOperation.fire({type:"close",resource:M,index:O}),this.eventBus.fire(new d.EditorGroupCloseEvent({group:this,resource:M})),this.previewURI&&this.previewURI.isEqual(T)&&(this.previewURI=null),M===this.currentResource&&!D){let R;for(;this.resourceOpenHistory.length>0;)if(this.resources.findIndex(P=>P.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1])!==-1){R=this.resourceOpenHistory.pop();break}else this.resourceOpenHistory.pop();if(R)this.open(R);else{let P=O;for(;P>0&&!this.resources[P];)P--;this.resources[P]?this.open(this.resources[P].uri):this.backToEmpty()}}else this.notifyTabChanged();this.removeResouceFromActiveComponents(M),this.disposeDocumentRef(T)}return this.resources.length===0&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[]),!0}removeResouceFromActiveComponents(T){this.activeComponents.forEach((D,I)=>{const O=D.indexOf(T);O!==-1&&(D.splice(O,1),this.eventBus.fire(new d.ResoucesOfActiveComponentChangedEvent({component:I,resources:D})))})}async shouldClose(T){const D=this.workbenchEditorService.editorGroups.map(I=>I.resources);if(await this.resourceService.shouldCloseResource(T,D)){let I=0;for(const O of D)for(const M of O)if(M.uri.isEqual(T.uri)&&(I++,I>=2))break;return I<=1&&this.resourceService.disposeResource(T),!0}else return!1}backToEmpty(){const T=this._currentOpenType,D=this._currentResource;this._currentResource=null,this.resetOpenType(),this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:T,oldResource:D}))}async closeAll(){for(const D of this.resources)if(!await this.shouldClose(D))return!1;return this.resources.splice(0,this.resources.length).reverse().forEach((D,I)=>{this.clearResourceOnClose(D),this._onDidEditorGroupTabOperation.fire({type:"close",resource:D,index:I})}),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty(),!0}async closeSaved(){const T=this.resources.filter(D=>{const I=this.resourceService.getResourceDecoration(D.uri);if(!I||!I.dirty)return!0});for(const D of T)if(!await this.shouldClose(D))return;for(const D of T)await this.close(D.uri)}async closeToRight(T){const D=this.resources.findIndex(I=>I.uri.toString()===T.toString());if(D!==-1){const I=this.resources.slice(D+1);for(const O of I)if(!await this.shouldClose(O))return;this.resources.splice(D+1),I.reverse().forEach((O,M)=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:O,index:D+1+(I.length-1-M)})});for(const O of I)this.clearResourceOnClose(O);this.open(T)}}clearResourceOnClose(T){this.eventBus.fire(new d.EditorGroupCloseEvent({group:this,resource:T})),this.removeResouceFromActiveComponents(T)}async closeOthers(T){const D=this.resources.findIndex(I=>I.uri.toString()===T.toString());if(D!==-1){const I=this.resources.filter((M,R)=>R!==D);for(const M of I)if(!await this.shouldClose(M))return;const O=this.resources;this.resources=[this.resources[D]],I.reverse().forEach(M=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:M,index:O.indexOf(M)})});for(const M of I)this.clearResourceOnClose(M);await this.open(T)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(T){const D=this.availableOpenTypes.find(O=>O.type===T||O.componentId===T);if(!D||!this.currentResource||S(D,this.currentOpenType))return;const I=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:D}),this.eventBus.fire(new d.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:I,oldResource:this.currentResource}))}async dropUri(T,D,I,O){if(D!==d.DragOverPosition.CENTER)await this.split((0,g.getSplitActionFromDragDrop)(D),T,{preview:!1,focus:!0});else if(!O)await this.open(T,{preview:!1,focus:!0});else{const M=this.resources.indexOf(O);if(M===-1)await this.open(T,{preview:!1,focus:!0});else{const R=this.resources.findIndex(P=>P.uri.toString()===T.toString());if(R===-1)await this.open(T,{index:M,preview:!1});else{const P=this.resources[R];R>M?(this.resources.splice(R,1),this.resources.splice(M,0,P),this._onDidEditorGroupTabOperation.fire({type:"move",resource:P,oldIndex:R,index:M}),await this.open(T,{preview:!1})):R<M&&(this.resources.splice(M+1,0,P),this.resources.splice(R,1),this._onDidEditorGroupTabOperation.fire({type:"move",resource:P,oldIndex:R,index:M}),await this.open(T,{preview:!1}))}}}I&&(I!==this?await I.close(T):D!==d.DragOverPosition.CENTER&&await this.close(T))}gainFocus(){this.workbenchEditorService.setCurrentGroup(this)}focus(){this.gainFocus(),this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code&&this.codeEditor.focus(),this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff&&this.diffEditor.focus()}dispose(){var T;(T=this.grid)===null||T===void 0||T.dispose(),this.workbenchEditorService.removeGroup(this),super.dispose(),this.codeEditor&&this.codeEditor.dispose(),this.diffEditor&&this.diffEditor.dispose(),this.toDispose.forEach(D=>D.dispose()),this.eventBus.fire(new d.EditorGroupDisposeEvent({group:this}))}getState(){const T=this.resources.filter(a).map(D=>D.uri.toString());return{uris:T,current:this.currentResource&&a(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?T.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.code}isDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.diff}activeEditorIsDirty(){return this.hasDirty()&&this.workbenchEditorService.currentEditorGroup===this}isComponentMode(){return!!this.currentOpenType&&this.currentOpenType.type===d.EditorOpenType.component}async restoreState(T){this._restoringState=!0,this.previewURI=T.uris[T.previewIndex]?new v.URI(T.uris[T.previewIndex]):null;for(const I of T.uris)await this.doOpen(new v.URI(I),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"});let D;T.current?D=new v.URI(T.current):T.uris.length>0&&(D=new v.URI(T.uris[T.uris.length-1])),D&&(await this.open(D,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(T,D){for(const I of this.resources)!T&&I.uri.scheme===v.Schemes.untitled||await this.saveResource(I,D)}async saveResource(T,D=g.SaveReason.Manual){if(await this.saveByOpenType(T,D))return;const I=this.documentModelManager.getModelReference(T.uri);I&&(await I.instance.save(void 0,D),I.dispose())}async saveByOpenType(T,D){const I=this.cachedResourcesActiveOpenTypes.get(T.uri.toString());if(I&&I.saveResource)try{return await I.saveResource(T,D),!0}catch(O){this.logger.error(O)}return!1}async saveCurrent(T=g.SaveReason.Manual){const D=this.currentResource;if(D&&!await this.saveByOpenType(D,T)&&this.currentEditor)return this.currentEditor.save()}hasDirty(){for(const T of this.resources){const D=this.documentModelManager.getModelDescription(T.uri);if(D&&D.dirty)return!0}return!1}calcDirtyCount(T=new Set){let D=0;for(const I of this.resources){const O=this.documentModelManager.getModelDescription(I.uri,"calc-dirty-count");T.has(I.uri.toString())||(T.add(I.uri.toString()),O&&O.dirty&&(D+=1))}return D}componentUndo(){const T=this.currentOpenType;T?.undo&&T.undo(this.currentResource)}componentRedo(){const T=this.currentOpenType;T?.redo&&T.redo(this.currentResource)}toJSON(){return{name:this.name}}};t.EditorGroup=y,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g.EditorCollectionService)],y.prototype,"collectionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",g.ResourceService)],y.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",d.EditorComponentRegistry)],y.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",b)],y.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.IEditorDocumentModelService),n.__metadata("design:type",Object)],y.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(v.CommandService),n.__metadata("design:type",Object)],y.prototype,"commands",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],y.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.RecentFilesManager),n.__metadata("design:type",o.RecentFilesManager)],y.prototype,"recentFilesManager",void 0),n.__decorate([(0,r.Autowired)(s.IMessageService),n.__metadata("design:type",Object)],y.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(v.IReporterService),n.__metadata("design:type",Object)],y.prototype,"reporterService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],y.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],y.prototype,"openerService",void 0),n.__decorate([(0,r.Autowired)(v.ILogger),n.__metadata("design:type",Object)],y.prototype,"logger",void 0),n.__decorate([(0,v.OnEvent)(g.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],y.prototype,"onResourceDecorationChangeEvent",null),n.__decorate([(0,v.OnEvent)(d.ResourceOpenTypeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.ResourceOpenTypeChangedEvent]),n.__metadata("design:returntype",void 0)],y.prototype,"oResourceOpenTypeChangedEvent",null),n.__decorate([(0,v.OnEvent)(d.RegisterEditorComponentEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],y.prototype,"onRegisterEditorComponentEvent",null),t.EditorGroup=y=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Number])],y);function A(w,T,D,I,O){if(O)return w.find(M=>S(M,O))||w[0];if(T)return w.find(M=>S(M,T))||w[0];if(I){const M=w.find(R=>{const P=Object.keys(I).find(L=>(0,v.match)(L,D.uri.path.toString().toLowerCase())||(0,v.match)(L,D.uri.path.base.toLowerCase())),k=P&&I[P];if(!k)return!1;const F=`${v.CUSTOM_EDITOR_SCHEME}-${k}`;return R.componentId===F});if(M)return M}return w[0]}function S(w,T){return w.type===T.type&&(w.type!==d.EditorOpenType.component||w.componentId===T.componentId)}},94180:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarLeftExtraContentId=t.TabbarRightExtraContentId=void 0,t.TabbarRightExtraContentId="tabbar-right-extra-content",t.TabbarLeftExtraContentId="tabbar-left-extra-content"},93107:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDocPersistentCacheProvider=void 0,t.isDocContentCache=e,t.isDocChangesCache=n,t.parseCacheValueFrom=r,t.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider");function e(o){return o.hasOwnProperty("content")}function n(o){return o.hasOwnProperty("changeMatrix")}function r(o){const c=o.text,p=o.range.startLineNumber,v=o.range.startColumn,m=o.range.endLineNumber,_=o.range.endColumn;return[c,p,v,m,_]}},55113:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AUTO_SAVE_MODE=t.SaveReason=t.Direction=t.EditorGroupSplitAction=t.DragOverPosition=t.EditorOpenType=t.IEditorPriority=t.OverviewRulerLane=t.WorkbenchEditorService=t.DidApplyEditorDecorationFromProvider=t.DidChangeEditorGroupUriEvent=t.CollectionEditorsUpdateEvent=t.EditorCollectionService=t.EditorType=t.ShowLightbulbIconMode=void 0,t.getSimpleEditorOptions=y,t.isTextEditorViewState=A;const n=e(85608),r=e(76003),o=e(43718);var c=e(20868);Object.defineProperty(t,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return c.ShowLightbulbIconMode}});var p;(function(S){S[S.CODE=0]="CODE",S[S.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",S[S.MODIFIED_DIFF=2]="MODIFIED_DIFF",S.MERGE_EDITOR_DIFF="MERGE_EDITOR_DIFF"})(p||(t.EditorType=p={}));let v=class{};t.EditorCollectionService=v,t.EditorCollectionService=v=n.__decorate([(0,r.Injectable)()],v);class m extends o.BasicEvent{}t.CollectionEditorsUpdateEvent=m;class _ extends o.BasicEvent{}t.DidChangeEditorGroupUriEvent=_;class s extends o.BasicEvent{}t.DidApplyEditorDecorationFromProvider=s;class g{}t.WorkbenchEditorService=g;var l;(function(S){S[S.Left=1]="Left",S[S.Center=2]="Center",S[S.Right=4]="Right",S[S.Full=7]="Full"})(l||(t.OverviewRulerLane=l={}));var h;(function(S){S.builtin="builtin",S.option="option",S.exclusive="exclusive",S.default="default"})(h||(t.IEditorPriority=h={}));var u;(function(S){S.code="code",S.diff="diff",S.mergeEditor="mergeEditor",S.component="component"})(u||(t.EditorOpenType=u={}));var d;(function(S){S.LEFT="left",S.RIGHT="right",S.TOP="top",S.BOTTOM="bottom",S.CENTER="center"})(d||(t.DragOverPosition=d={}));var E;(function(S){S[S.Top=1]="Top",S[S.Bottom=2]="Bottom",S[S.Left=3]="Left",S[S.Right=4]="Right"})(E||(t.EditorGroupSplitAction=E={}));var f;(function(S){S.UP="up",S.DOWN="down",S.LEFT="left",S.RIGHT="right"})(f||(t.Direction=f={}));var a;(function(S){S[S.Manual=1]="Manual",S[S.AfterDelay=2]="AfterDelay",S[S.FocusOut=3]="FocusOut"})(a||(t.SaveReason=a={}));var b;(function(S){S.OFF="off",S.AFTER_DELAY="afterDelay",S.EDITOR_FOCUS_CHANGE="editorFocusChange",S.WINDOWS_LOST_FOCUS="windowLostFocus"})(b||(t.AUTO_SAVE_MODE=b={}));function y(){return{fontSize:12,fontWeight:"normal",lineHeight:0,wordWrap:"on",overviewRulerLanes:0,glyphMargin:!1,lineNumbers:"off",folding:!1,selectOnLineNumbers:!1,hideCursorInOverviewRuler:!0,selectionHighlight:!1,scrollbar:{horizontal:"hidden"},lineDecorationsWidth:0,overviewRulerBorder:!1,scrollBeyondLastLine:!1,renderLineHighlight:"none",fixedOverflowWidgets:!0,acceptSuggestionOnEnter:"smart",minimap:{enabled:!1},guides:{highlightActiveIndentation:!1,indentation:!1,bracketPairs:!1}}}function A(S){const w=S;if(!w)return!1;const T=w;if(T.modified)return A(T.modified);const D=w;return!!(D.contributionsState&&D.viewState&&Array.isArray(D.cursorState))}},23418:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(94180),t),n.__exportStar(e(93107),t),n.__exportStar(e(55113),t),n.__exportStar(e(23950),t),n.__exportStar(e(27693),t),n.__exportStar(e(46225),t),n.__exportStar(e(4308),t),n.__exportStar(e(39467),t)},27693:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILanguageStatusService=void 0,t.ILanguageStatusService=Symbol("ILanguageStatusService")},23950:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticTag=t.DiagnosticSeverity=t.ILanguageService=void 0,t.asSeverity=c,t.asRelatedInformations=p,t.asRelatedInformation=v,t.asMonacoDiagnostics=m,t.asMonacoDiagnostic=_;const n=e(43718);t.ILanguageService=Symbol("ILanguageService");var r;(function(s){s[s.Error=1]="Error",s[s.Warning=2]="Warning",s[s.Information=3]="Information",s[s.Hint=4]="Hint"})(r||(t.DiagnosticSeverity=r={}));var o;(function(s){s[s.Unnecessary=1]="Unnecessary",s[s.Deprecated=2]="Deprecated"})(o||(t.DiagnosticTag=o={}));function c(s){return s===1?n.MarkerSeverity.Error:s===2?n.MarkerSeverity.Warning:s===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}function p(s){if(s)return s.map(g=>v(g))}function v(s){return{resource:n.Uri.parse(s.location.uri),startLineNumber:s.location.range.start.line+1,startColumn:s.location.range.start.character+1,endLineNumber:s.location.range.end.line+1,endColumn:s.location.range.end.character+1,message:s.message}}function m(s){if(s)return s.map(g=>_(g))}function _(s){return{code:typeof s.code=="number"?s.code.toString():typeof s.code=="object"?{value:s.code.value.toString(),target:s.code.target}:s.code,severity:c(s.severity),message:s.message,source:s.source,startLineNumber:s.range.start.line+1,startColumn:s.range.start.character+1,endLineNumber:s.range.end.line+1,endColumn:s.range.end.character+1,relatedInformation:p(s.relatedInformation),tags:s.tags}}},46225:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notebookCellScheme=t.INotebookService=t.CellKind=t.NotebookCellsChangeType=void 0;var e;(function(r){r[r.ModelChange=1]="ModelChange",r[r.Move=2]="Move",r[r.ChangeCellLanguage=5]="ChangeCellLanguage",r[r.Initialize=6]="Initialize",r[r.ChangeCellMetadata=7]="ChangeCellMetadata",r[r.Output=8]="Output",r[r.OutputItem=9]="OutputItem",r[r.ChangeCellContent=10]="ChangeCellContent",r[r.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",r[r.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",r[r.ChangeCellMime=13]="ChangeCellMime",r[r.Unknown=100]="Unknown"})(e||(t.NotebookCellsChangeType=e={}));var n;(function(r){r[r.Markup=1]="Markup",r[r.Code=2]="Code"})(n||(t.CellKind=n={})),t.INotebookService=Symbol("INotebookService"),t.notebookCellScheme="vscode-notebook-cell"},4308:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AskSaveResult=t.DIFF_SCHEME=t.ResourceDecorationNeedChangeEvent=t.ResourceDecorationChangeEvent=t.ResourceRemoveEvent=t.ResourceDidUpdateEvent=t.ResourceNeedUpdateEvent=t.ResourceService=void 0,t.isDiffResource=_;const n=e(43718);class r{}t.ResourceService=r;class o extends n.BasicEvent{}t.ResourceNeedUpdateEvent=o;class c extends n.BasicEvent{}t.ResourceDidUpdateEvent=c;class p extends n.BasicEvent{}t.ResourceRemoveEvent=p;class v extends n.BasicEvent{}t.ResourceDecorationChangeEvent=v;class m extends n.BasicEvent{}t.ResourceDecorationNeedChangeEvent=m,t.DIFF_SCHEME="diff";function _(g){return g.uri.scheme===t.DIFF_SCHEME}var s;(function(g){g[g.REVERT=1]="REVERT",g[g.SAVE=2]="SAVE",g[g.CANCEL=3]="CANCEL"})(s||(t.AskSaveResult=s={}))},39467:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSplitActionFromDragDrop=r;const n=e(55113);function r(o){return{[n.DragOverPosition.LEFT]:n.EditorGroupSplitAction.Left,[n.DragOverPosition.RIGHT]:n.EditorGroupSplitAction.Right,[n.DragOverPosition.BOTTOM]:n.EditorGroupSplitAction.Bottom,[n.DragOverPosition.TOP]:n.EditorGroupSplitAction.Top}[o]}},54414:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(23418),t)},32595:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerContribution=t.EXPLORER_CONTAINER_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144);Object.defineProperty(t,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return c.EXPLORER_CONTAINER_ID}});const p=e(21634),v=e(68456),m=e(43718);let _=class{registerComponent(g){g.register("@opensumi/ide-explorer",[],{iconClass:(0,o.getIcon)("explorer"),title:(0,o.localize)("explorer.title"),priority:10,containerId:c.EXPLORER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+e"})}onStart(){this.extensionsSchemaService.appendExtensionPoint(["browserViews","properties"],{extensionPoint:c.EXPLORER_CONTAINER_ID,frameworkKind:["opensumi"],jsonSchema:{...p.browserViews.properties,description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))}})}};t.ExplorerContribution=_,n.__decorate([(0,r.Autowired)(m.IExtensionsSchemaService),n.__metadata("design:type",Object)],_.prototype,"extensionsSchemaService",void 0),t.ExplorerContribution=_=n.__decorate([(0,o.Domain)(o.ClientAppContribution,v.ComponentContribution)],_)},59027:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(32595);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c.ExplorerContribution]}};t.ExplorerModule=p,t.ExplorerModule=p=n.__decorate([(0,r.Injectable)()],p)},18531:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressFileServerContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(32242),p=e(90242);let v=class{registerStaticResolver(_){_.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:s=>{const g=new o.URI(this.appConfig.staticServicePath||p.EXPRESS_SERVER_PATH),[l,h]=s.codeUri.path.split("?");return g.resolve(`assets${decodeURIComponent(l)}`).withQuery(h)},roots:[this.appConfig.staticServicePath||p.EXPRESS_SERVER_PATH]})}};t.ExpressFileServerContribution=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.ExpressFileServerContribution=v=n.__decorate([(0,o.Domain)(c.StaticResourceContribution)],v)},98885:(x,t,e)=>{"use strict";var n;n={value:!0},t.Q=void 0;const r=e(85608),o=e(76003),c=e(41869),p=e(18531);let v=class extends c.BrowserModule{constructor(){super(...arguments),this.providers=[p.ExpressFileServerContribution]}};t.Q=v,t.Q=v=r.__decorate([(0,o.Injectable)()],v)},90242:(x,t,e)=>{"use strict";var n=e(39907);Object.defineProperty(t,"__esModule",{value:!0}),t.ALLOW_MIME=t.EXPRESS_SERVER_PATH=t.EXPRESS_SERVER_PORT=void 0,t.EXPRESS_SERVER_PORT=8e3,t.EXPRESS_SERVER_PATH=n.env.STATIC_SERVER_PATH||`http://127.0.0.1:${t.EXPRESS_SERVER_PORT}/`,t.ALLOW_MIME={gif:"image/gif",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",svg:"image/svg+xml",ttf:"font/ttf",eot:"font/eot",otf:"font/otf",woff:"font/woff",woff2:"font/woff2",js:"application/javascript",css:"text/css",mp4:"video/mp4",ogg:"video/ogg",webm:"video/webm"}},21082:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXTENSION_SCHEME=t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=void 0;const n=e(30144);t.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=n.EXTENSION_CONTAINER_ID,t.EXTENSION_SCHEME="extension"},6449:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionOverview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(68974),p=e(95422),v=e(43718),m=e(93374),_=e(29150),s=n.__importDefault(e(40769));var g;(function(u){u.details="Details",u.changelog="ChangeLog",u.deps="Dependencies"})(g||(g={}));const l=[g.details,g.changelog,g.deps],h=({resource:u})=>{var d,E,f,a,b,y,A,S,w,T,D,I,O,M,R,P,k,F,L,B,j,W,U,Q,V;const $=(0,p.useInjectable)(_.VSXExtensionServiceToken),[Y,z]=(0,r.useState)(!0),[H,K]=(0,r.useState)(((d=u.metadata)===null||d===void 0?void 0:d.state)===_.InstallState.INSTALLED?4:0),[Z,X]=(0,r.useState)(g.details),[ie,oe]=(0,r.useState)({}),le=(0,r.useCallback)(te=>{const ge=l[te];ge&&X(ge)},[]),pe=(0,r.useCallback)(async()=>{var te;const ge=await $.getRemoteRawExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);if(ge){const Te=["readme","changelog"].map(we=>{var be,fe;const xe=(be=ge.files)===null||be===void 0?void 0:be[we];return xe?fetch(xe).then(Re=>Re.text()):(fe=ge[we])!==null&&fe!==void 0?fe:""}),[Pe,Ae]=await Promise.all(Te);oe({readme:Pe,changelog:Ae,downloadCount:ge.downloadCount})}z(!1)},[u]),q=(0,r.useCallback)(async()=>{var te;const ge=await $.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);ge&&(K(1),$.install(ge).finally(()=>{K(4)}))},[u]),Ee=(0,r.useCallback)(async()=>{var te;const ge=await $.getLocalExtension((te=u.metadata)===null||te===void 0?void 0:te.extensionId);ge&&(K(2),$.uninstall(ge).finally(()=>{K(3)}))},[u]);(0,r.useEffect)(()=>{pe()},[u]);const _e=(0,r.useMemo)(()=>{var te,ge,Te;const Pe=[];if(((te=u.metadata)===null||te===void 0?void 0:te.state)!==_.InstallState.NOT_INSTALLED)if(H!==3)Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:Ee,disabled:H===2},(0,v.localize)(H===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return Pe.push(r.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,v.localize)("marketplace.extension.uninstalled"))),Pe;return((ge=u.metadata)===null||ge===void 0?void 0:ge.state)===_.InstallState.NOT_INSTALLED?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"install",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.installing":"marketplace.extension.install"))):((Te=u.metadata)===null||Te===void 0?void 0:Te.state)===_.InstallState.SHOULD_UPDATE?H===4?Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"update",onClick:q,disabled:H!==0},(0,v.localize)(H===1?"marketplace.extension.updating":"marketplace.extension.update"))):Pe.push(r.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,v.localize)("marketplace.extension.installed"))),Pe},[u,H]);return r.default.createElement("div",{className:s.default.extension_overview_container},r.default.createElement(c.Progress,{loading:Y}),r.default.createElement("div",{className:s.default.extension_overview_header},!((E=u.metadata)===null||E===void 0)&&E.iconUrl?r.default.createElement("img",{src:(f=u.metadata)===null||f===void 0?void 0:f.iconUrl,alt:(0,v.replaceLocalizePlaceholder)((a=u.metadata)===null||a===void 0?void 0:a.displayName,(b=u.metadata)===null||b===void 0?void 0:b.extensionId)}):r.default.createElement("div",{className:s.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:s.default.extension_detail},r.default.createElement("div",{className:s.default.extension_name},r.default.createElement("h1",null,r.default.createElement("a",{href:`${(y=u.metadata)===null||y===void 0?void 0:y.openVSXRegistry}/extension/${(A=u.metadata)===null||A===void 0?void 0:A.namespace.toLowerCase()}/${(S=u.metadata)===null||S===void 0?void 0:S.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer"},(0,v.replaceLocalizePlaceholder)((w=u.metadata)===null||w===void 0?void 0:w.displayName,(T=u.metadata)===null||T===void 0?void 0:T.extensionId)||((D=u.metadata)===null||D===void 0?void 0:D.name))),r.default.createElement("span",{className:s.default.extension_id},((I=u.metadata)===null||I===void 0?void 0:I.namespace.toLowerCase())+"."+((O=u.metadata)===null||O===void 0?void 0:O.name.toLowerCase()))),r.default.createElement("div",{className:s.default.manifest},r.default.createElement("span",null,r.default.createElement("a",{href:(M=u.metadata)===null||M===void 0?void 0:M.namespaceUrl,target:"_blank",rel:"noopener noreferrer"},(R=u.metadata)===null||R===void 0?void 0:R.namespace)),r.default.createElement("span",null,r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),((P=u.metadata)===null||P===void 0?void 0:P.downloadCount)||ie.downloadCount),((k=u.metadata)===null||k===void 0?void 0:k.averageRating)&&r.default.createElement("span",null,(F=u.metadata)===null||F===void 0?void 0:F.averageRating),((L=u.metadata)===null||L===void 0?void 0:L.repository)&&r.default.createElement("span",null,r.default.createElement("a",{href:(B=u.metadata)===null||B===void 0?void 0:B.repository,target:"blank"},"Repository")),((j=u.metadata)===null||j===void 0?void 0:j.license)&&r.default.createElement("span",null,r.default.createElement("a",{href:(W=u.metadata)===null||W===void 0?void 0:W.files.license,target:"blank"},"License")),r.default.createElement("span",null,"v",(U=u.metadata)===null||U===void 0?void 0:U.version)),r.default.createElement("div",{className:s.default.description},(0,v.replaceLocalizePlaceholder)((Q=u.metadata)===null||Q===void 0?void 0:Q.description,(V=u.metadata)===null||V===void 0?void 0:V.extensionId)),r.default.createElement("div",{className:s.default.buttons},_e))),r.default.createElement("div",{className:s.default.extension_overview_body},r.default.createElement(o.Tabs,{className:s.default.tabs,value:Z,onChange:le,tabs:[g.details,g.changelog]}),r.default.createElement("div",{className:s.default.extension_content},Z===g.details&&ie.readme&&r.default.createElement(m.Markdown,{content:ie.readme}),Z===g.changelog&&ie.changelog&&r.default.createElement(m.Markdown,{content:ie.changelog}))))};t.ExtensionOverview=h},87791:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=t.ExtensionViewType=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(43718),v=e(29150),m=n.__importDefault(e(90425));var _;(function(s){s[s.MARKETPLACE=0]="MARKETPLACE",s[s.INSTALLED=1]="INSTALLED"})(_||(t.ExtensionViewType=_={})),t.Extension=r.default.memo(({extension:s,onInstall:g,onClick:l,type:h,installedExtensions:u,openVSXRegistry:d})=>{const E=(0,c.useDesignStyles)(m.default.extension_item,"extension_item"),[f,a]=(0,r.useState)(),b=u?.find(I=>I.namespace===s.namespace&&I.name===s.name),y=!!(h===_.INSTALLED||b),A=y&&h===_.MARKETPLACE&&b?.version!==s.version,[S,w]=(0,r.useState)(y),T=(0,r.useCallback)(I=>{I.stopPropagation(),a(!0),g(s).then(()=>{a(!1),w(!0)})},[s]),D=(0,r.useCallback)(()=>{l(s,S?A?v.InstallState.SHOULD_UPDATE:v.InstallState.INSTALLED:v.InstallState.NOT_INSTALLED)},[s]);return r.default.createElement("div",{className:E,onClick:D},s.iconUrl?r.default.createElement("img",{className:m.default.icon,src:s.iconUrl,alt:(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)}):r.default.createElement("div",{className:m.default.default_icon},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),r.default.createElement("div",{className:m.default.extension_detail},r.default.createElement("div",{className:m.default.base_info},r.default.createElement("span",{className:m.default.display_name},(0,p.replaceLocalizePlaceholder)(s.displayName,`${s.publisher}.${s.name}`)||s.name),r.default.createElement("span",{className:m.default.version},s.version),!S&&r.default.createElement("span",{className:m.default.download_count},r.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),s.downloadCount)),r.default.createElement("span",{className:m.default.description},(0,p.replaceLocalizePlaceholder)(s.description,`${s.publisher}.${s.name}`)),r.default.createElement("div",{className:m.default.footer},r.default.createElement("span",{className:m.default.namespace},s.namespace),h===_.MARKETPLACE&&(y?A?r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:f},(0,p.localize)(f?"marketplace.extension.updating":"marketplace.extension.update")):r.default.createElement("span",{className:m.default.state_text},(0,p.localize)("marketplace.extension.installed")):r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:f},(0,p.localize)(f?"marketplace.extension.installing":"marketplace.extension.install"))),h===_.INSTALLED&&r.default.createElement(o.Button,{type:"primary",size:"small",onClick:T,disabled:!0},(0,p.localize)("marketplace.extension.installed")))))})},38105:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenVsxExtensionManagerModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(29150),p=e(70274),v=e(67761);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[p.VSXExtensionContribution,{token:c.VSXExtensionServiceToken,useClass:v.VSXExtensionService}],this.backServices=[{servicePath:c.VSXExtensionServicePath}]}};t.OpenVsxExtensionManagerModule=m,t.OpenVsxExtensionManagerModule=m=n.__decorate([(0,r.Injectable)()],m)},70274:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(57517),v=e(63067),m=e(52416),_=e(29150),s=e(21082),g=e(6449),l=e(73689);let h=class{initialize(){}onDidRender(){const d=this.mainLayoutService.getTabbarHandler(s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);d&&(d.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):d.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(d){d.registerResourceProvider({scheme:s.EXTENSION_SCHEME,provideResource:async E=>{const{extensionId:f,state:a}=E.getParsedQuery(),b=await this.vsxExtensionService.getLocalExtension(f),y=this.iconService.fromIcon("",b?.iconUrl,m.IconType.Background);return{uri:E,metadata:{...b,extensionId:f,state:a,openVSXRegistry:this.vsxExtensionService.openVSXRegistry},icon:y||(0,o.getIcon)("extension"),name:(0,c.replaceLocalizePlaceholder)(b?.displayName,f)||""}}})}registerEditorComponent(d){const E=`${s.EXTENSION_SCHEME}_detail`;d.registerEditorComponent({component:g.ExtensionOverview,uid:E,scheme:s.EXTENSION_SCHEME}),d.registerEditorComponentResolver(s.EXTENSION_SCHEME,(f,a,b)=>{b?.([{type:p.EditorOpenType.component,componentId:E}])})}registerComponent(d){d.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,c.localize)("marketplace.extension.container"),priority:5,containerId:s.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:l.VSXExtensionView,activateKeyBinding:"ctrlcmd+shift+x"})}};t.VSXExtensionContribution=h,n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],h.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(_.VSXExtensionServiceToken),n.__metadata("design:type",Object)],h.prototype,"vsxExtensionService",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],h.prototype,"iconService",void 0),t.VSXExtensionContribution=h=n.__decorate([(0,c.Domain)(o.ClientAppContribution,v.MainLayoutContribution,o.ComponentContribution,p.BrowserEditorContribution)],h)},67761:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(57517),p=e(98453),v=e(71354),m=e(28423),_=e(52416),s=e(12456),g=e(29150);let l=class extends o.Disposable{get extensions(){return this.extensionsObservable.get()}get installedExtensions(){return this.installedExtensionsObservable.get()}get openVSXRegistry(){return this.openVSXRegistryObservable.get()}constructor(){super(),this.extensionsObservable=(0,m.observableValue)(this,[]),this.installedExtensionsObservable=(0,m.observableValue)(this,[]),this.openVSXRegistryObservable=(0,m.observableValue)(this,""),this.tasks=new Map,this.getInstalledExtensions(),this.disposables.push(this.extensionInstanceService.onDidChange(()=>{this.getInstalledExtensions(),this.search(this.searchValue)}))}updateStatusBar(){if(this.tasks.size===0){this.installStatus&&(this.installStatus.dispose(),this.installStatus=void 0);return}const u="sumi-upload-file-status";if(this.tasks.size===1){const d=(0,o.localize)("marketplace.extension.installing"),E={text:d,alignment:o.StatusBarAlignment.RIGHT,tooltip:d,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(u,E)}}async install(u){var d,E;const f=this.getExtensionId(u);if(this.tasks.has(f)||!u.downloadUrl)return;const a=this.backService.install({id:f,name:(d=u.name)!==null&&d!==void 0?d:"-",url:u.downloadUrl,version:(E=u.version)!==null&&E!==void 0?E:"-"});return this.tasks.set(f,a),this.updateStatusBar(),a.then(async b=>{if(this.tasks.delete(f),this.updateStatusBar(),await this.extensionManagementService.postChangedExtension(!1,b),this.themeService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.iconService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}if(this.productIconService.getAvailableThemeInfos().some(w=>w.extensionId===u.originId)){this.commandService.executeCommand(s.PRODUCT_ICON_THEME_TOGGLE_COMMAND.id,{extensionId:u.originId});return}})}async uninstall(u){u&&u.path&&await this.extensionManagementService.postUninstallExtension(u.path)}async disable(u){u&&u.path&&this.extensionManagementService.postDisableExtension(u.path)}async enable(u){u&&u.path&&this.extensionManagementService.postEnableExtension(u.path)}getExtensionId(u){var d,E,f;return(d=u?.extensionId)!==null&&d!==void 0?d:((E=u?.namespace)===null||E===void 0?void 0:E.toLowerCase())+"."+((f=u?.name)===null||f===void 0?void 0:f.toLowerCase())}async getLocalExtension(u){return u?this.extensions.find(E=>this.getExtensionId(E)===u)||this.installedExtensions.find(E=>this.getExtensionId(E)===u):void 0}async getRemoteRawExtension(u){if(!u)return;const d={extensionId:u},E=await this.backService.getExtension(d);if(E&&E.extensions&&E.extensions.length>=1)return Object.assign({},E.extensions[0])}async getOpenVSXRegistry(){const u=await this.backService.getOpenVSXRegistry();(0,m.transaction)(d=>{this.openVSXRegistryObservable.set(u,d)})}async openExtensionEditor(u,d){this.workbenchEditorService.open(new o.URI(`extension://?extensionId=${u}&state=${d}`),{preview:!0})}async search(u){const d={query:u,size:50,sortBy:"downloadCount"};this.searchValue=u;const E=await this.backService.search(d);E.extensions&&(0,m.transaction)(f=>{this.extensionsObservable.set(E.extensions.filter(a=>!this.installedExtensions.find(b=>this.getExtensionId(b)===this.getExtensionId(a))).map(a=>({...a,publisher:a.namespace,iconUrl:a.files.icon,downloadUrl:a.files.download,readme:a.files.readme})),f)})}async searchInstalledExtensions(u){(0,m.transaction)(d=>{const E=this.installedExtensions;this.installedExtensionsObservable.set(E.sort((f,a)=>{const b=(0,o.fuzzyScore)(u,u.toLowerCase(),0,f.name,f.name.toLowerCase(),0,!0),y=(0,o.fuzzyScore)(u,u.toLowerCase(),0,a.name,a.name.toLowerCase(),0,!0);return b?y?y[0]-b[0]:-1:1}),d)})}getInstalledExtensions(){const u=this.extensionInstanceService.getExtensionInstances().map(d=>{const E=d.extensionId;return{namespace:E&&E.includes(".")?E.split(".")[0]:d.packageJSON.publisher,name:d.packageJSON.name,id:d.extensionId,version:d.packageJSON.version,displayName:d.packageJSON.displayName,description:d.packageJSON.description,publisher:d.packageJSON.publisher,iconUrl:d.packageJSON.icon&&d.extensionLocation.toString()+`/${d.packageJSON.icon}`,path:d.path,realpath:d.realPath}});(0,m.transaction)(d=>{this.installedExtensionsObservable.set(u,d)})}};t.VSXExtensionService=l,n.__decorate([(0,r.Autowired)(g.VSXExtensionServicePath),n.__metadata("design:type",Object)],l.prototype,"backService",void 0),n.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),n.__metadata("design:type",c.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],l.prototype,"extensionInstanceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ExtensionManagementService)],l.prototype,"extensionManagementService",void 0),n.__decorate([(0,r.Autowired)(_.IThemeService),n.__metadata("design:type",Object)],l.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.IProductIconService),n.__metadata("design:type",Object)],l.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],l.prototype,"statusBarService",void 0),n.__decorate([(0,o.pMemoize)(h=>h),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],l.prototype,"search",null),t.VSXExtensionService=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l)},73689:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSXExtensionView=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importStar(e(14041)),c=e(14041),p=e(97267),v=e(41869),m=e(68974),_=e(43718),s=e(5567),g=e(29150),l=e(21082),h=e(87791),u=n.__importDefault(e(68143)),d=[g.TabActiveKey.MARKETPLACE,g.TabActiveKey.INSTALLED],E=()=>{const[f,a]=(0,c.useState)(g.TabActiveKey.MARKETPLACE),[b,y]=(0,c.useState)(!1),A=(0,v.useInjectable)(g.VSXExtensionServiceToken),S=(0,v.useAutorun)(A.extensionsObservable),w=(0,v.useAutorun)(A.installedExtensionsObservable),T=(0,v.useAutorun)(A.openVSXRegistryObservable),D=(0,r.default)(R=>{y(!0);let P;f===g.TabActiveKey.MARKETPLACE?P=A.search(R):P=A.searchInstalledExtensions(R),typeof P=="object"&&P.then&&P.then(()=>{y(!1)})},500),I=(0,c.useCallback)(R=>A.install(R),[]),O=(0,c.useCallback)((R,P)=>{const k=A.getExtensionId(R);A.openExtensionEditor(k,P)},[]),M=(0,c.useCallback)(R=>{const P=d[R];P&&a(P)},[]);return o.createElement("div",{className:u.default.panel},o.createElement(p.Tabs,{mini:!0,className:u.default.tabs,value:d.indexOf(f),onChange:M,tabs:[(0,_.localize)("marketplace.panel.tab.marketplace"),(0,_.localize)("marketplace.tab.installed")]}),o.createElement("div",{style:{padding:"8px"}},o.createElement(s.AutoFocusedInput,{containerId:l.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,_.localize)("marketplace.panel.tab.placeholder.search"),value:"",onChange:R=>D(R.target.value)})),f===g.TabActiveKey.MARKETPLACE&&o.createElement("div",{className:u.default.extensions_view},o.createElement(m.Progress,{loading:b}),S.map((R,P)=>o.createElement(h.Extension,{key:`${P}:${R.namespace}-${R.name}`,onClick:O,onInstall:I,extension:R,type:h.ExtensionViewType.MARKETPLACE,installedExtensions:w,openVSXRegistry:T}))),f===g.TabActiveKey.INSTALLED&&o.createElement("div",{className:u.default.extensions_view},w.map((R,P)=>o.createElement(h.Extension,{key:`${P}:${R.namespace}-${R.name}`,onClick:O,onInstall:I,extension:R,type:h.ExtensionViewType.INSTALLED,openVSXRegistry:T}))))};t.VSXExtensionView=E},29150:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IOpenvsxMarketplaceService=t.VSXExtensionServicePath=t.VSXExtensionServiceToken=t.VSXExtension=t.InstallState=t.TabActiveKey=t.EnableScope=void 0;var e;(function(c){c.GLOBAL="GLOBAL",c.WORKSPACE="WORKSPACE"})(e||(t.EnableScope=e={}));var n;(function(c){c.MARKETPLACE="marketplace",c.INSTALLED="installed"})(n||(t.TabActiveKey=n={}));var r;(function(c){c.INSTALLED="INSTALLED",c.NOT_INSTALLED="NOT_INSTALLED",c.SHOULD_UPDATE="SHOULD_UPDATE"})(r||(t.InstallState=r={}));class o{}t.VSXExtension=o,o.KEYS=new Set(["version","iconUrl","publisher","name","displayName","description","averageRating","downloadCount","downloadUrl","readmeUrl","licenseUrl","repository","license","readme","preview","namespaceAccess","publishedBy"]),t.VSXExtensionServiceToken=Symbol("VSXExtensionSerivceToken"),t.VSXExtensionServicePath="VSXExtensionServicePath",t.IOpenvsxMarketplaceService=Symbol("IOpenvsxMarketplaceService")},53599:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageContribution=t.ExtensionStorageModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93584),p=e(7446),v=e(16132),m=e(10207),_=e(19227);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IExtensionStorageService,useClass:m.ExtensionStorageService},{token:c.IExtensionStoragePathServer,useClass:v.ExtensionStoragePathServer},{token:c.IExtensionStorageServer,useClass:p.ExtensionStorageServer},g]}};t.ExtensionStorageModule=s,t.ExtensionStorageModule=s=n.__decorate([(0,o.Domain)(_.name)],s);let g=class{onReconnect(){this.extensionStorageService.reConnectInit()}};t.ExtensionStorageContribution=g,n.__decorate([(0,r.Autowired)(c.IExtensionStorageService),n.__metadata("design:type",Object)],g.prototype,"extensionStorageService",void 0),t.ExtensionStorageContribution=g=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],g),n.__exportStar(e(10207),t)},16132:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStoragePathServer=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(96405),v=e(14951),m=e(73344),_=e(51500),{Path:s}=c.path;let g=class{constructor(){this.windowsDataFolders=[c.StoragePaths.WINDOWS_APP_DATA_DIR,c.StoragePaths.WINDOWS_ROAMING_DIR],this.deferredWorkspaceStoragePath=new c.Deferred,this.deferredStoragePath=new c.Deferred,this.storagePathInitialized=!1}get workspaceSuffixName(){return this.appConfig.workspaceSuffixName||_.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const h=await this.getLogsDirPath();if(!h)throw new Error("Unable to get parent log directory");const u=h,d=c.URI.file(u).toString();return await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),new c.URI(h)}async provideHostStoragePath(h,u,d){const E=await this.getWorkspaceStorageDirPath(d);if(!E)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(c.URI.file(E).toString())||await this.fileSystem.createFolder(c.URI.file(E).toString());const f=await this.buildWorkspaceId(h,u,d),a=new s(E).join(f).toString();await this.fileSystem.access(c.URI.file(a).toString())||await this.fileSystem.createFolder(c.URI.file(a).toString());const b=new c.URI(a);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(b.path.toString()),this.deferredStoragePath.resolve(E),this.storagePathInitialized=!0),this.cachedStoragePath=b}async getLastWorkspaceStoragePath(){var h;return this.storagePathInitialized?(h=this.cachedStoragePath)===null||h===void 0?void 0:h.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(h){return this.hashCalculateService.calculate(h)}async buildWorkspaceId(h,u,d){const E=await this.getUserHomeDir(),f=y=>y.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(c.Schemes.file),a=y=>y.resolve(d||_.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${_.UNTITLED_WORKSPACE}`).withScheme(c.Schemes.file);if(!h){const y=a(new c.URI(E));return this.doHash(y.toString())}if(f(new c.URI(E)).toString()===h.uri){const y=u.map(A=>A.uri).sort().join(",");return this.doHash(y)}else{const y=new c.URI(h.uri);return this.doHash(y.toString())}}async getLogsDirPath(){const h=await this.loggerManager.getLogFolder();return new s(h).join(c.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(h){const u=await this.getWorkspaceDataDirPath(h);return new s(u).join(c.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(h){const u=await this.getUserHomeDir(),d=h;return new s(u).join(...c.isWindows?this.windowsDataFolders:[""],d).toString()}async getUserHomeDir(){const h=await this.fileSystem.getCurrentUserHome();if(!h)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(h.uri)}};t.ExtensionStoragePathServer=g,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(m.ILoggerManagerClient),n.__metadata("design:type",Object)],g.prototype,"loggerManager",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],g.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(p.IHashCalculateService),n.__metadata("design:type",Object)],g.prototype,"hashCalculateService",void 0),t.ExtensionStoragePathServer=g=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],g)},7446:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageServer=void 0;const r=e(85608),o=e(76003),c=e(43718),p=e(14951),v=e(93584),{Path:m}=c.path;let _=n=class{constructor(){this.deferredWorkspaceDataDirPath=new c.Deferred,this.storageThrottler=new c.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(g,l,h){return this.storageDelayer=new c.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(g,l,h||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(g,l){if(l)return await this.fileSystem.access(g);if(!this.storageExistPromises.has(g)){const h=this.fileSystem.access(g);this.storageExistPromises.set(g,h)}return await this.storageExistPromises.get(g)}async setupDirectories(g,l,h){const u=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(h),d=c.URI.file(u).toString();await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),this.workspaceDataDirPath=u,this.globalDataPath=new m(this.workspaceDataDirPath).join(c.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const E=c.URI.file(this.globalDataPath).toString();await this.fileSystem.access(E)||await this.fileSystem.createFolder(E),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const f=await this.extensionStoragePathsServer.provideHostLogPath(),a=await this.extensionStoragePathsServer.provideHostStoragePath(g,l,h);return{logUri:f.codeUri,storageUri:a.codeUri,globalStorageUri:c.Uri.file(this.globalDataPath)}}async resolveStorageTask(g){const l=Object.keys(g);for(const h of l){const u=await this.readFromFile(h);for(const{key:d,value:E}of g[h])E===void 0||(0,c.isEmptyObject)(E)?delete u[d]:u[d]=E;await this.writeToFile(h,u)}}doSet(){const g={...this.storageTasks};return this.storageTasks={},this.resolveStorageTask(g)}async set(g,l,h){const u=await this.getDataPath(h);if(!u)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[u]||(this.storageTasks[u]=[]),this.storageTasks[u].push({key:g,value:l}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(g,l){const h=await this.getDataPath(l);return h?(await this.readFromFile(h))[g]:{}}async getAll(g){const l=await this.getDataPath(g);return l?await this.readFromFile(l):{}}async getDataPath(g){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,g)return new m(this.globalDataPath).join("global-state.json").toString();{const l=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return l?new m(l).join("workspace-state.json").toString():void 0}}async readFromFile(g){const l=c.URI.file(g);if(!await this.asAccess(l.toString(),!0))return{};try{const{content:u}=await this.fileSystem.readFile(l.toString());return JSON.parse(u.toString())}catch(u){return this.logger.error('Failed to parse data from "',l.toString(),'". Reason:',u),{}}}async writeToFile(g,l){const h=c.URI.file(g);await this.asAccess(h.parent.toString())||await this.fileSystem.createFolder(h.parent.toString());const d=JSON.stringify(l);let E=await this.fileSystem.getFileStat(h.toString());E||(E=await this.fileSystem.createFile(h.toString())),await this.fileSystem.setContent(E,d)}};t.ExtensionStorageServer=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(v.IExtensionStoragePathServer),r.__metadata("design:type",Object)],_.prototype,"extensionStoragePathsServer",void 0),r.__decorate([(0,o.Autowired)(p.IFileServiceClient),r.__metadata("design:type",Object)],_.prototype,"fileSystem",void 0),r.__decorate([(0,o.Autowired)(c.ILogger),r.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.ExtensionStorageServer=_=n=r.__decorate([(0,o.Injectable)()],_)},10207:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionStorageService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(51500),v=e(93584);let m=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}async updateEnvState(){await this.get(c.firstSessionDateStorageKey,!0)===void 0&&await this.set(c.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(s,g,l){return this.extensionStorageServer.set(s,g,l)}get(s,g){return this.extensionStorageServer.get(s,g)}getAll(s=!1){return this.extensionStorageServer.getAll(s)}async reConnectInit(){const s=await this.workspaceService.roots,g=this.workspaceService.workspace,l=this.appConfig.extensionStorageDirName||v.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(g,s,l),this._extensionStoragePath}};t.ExtensionStorageService=m,n.__decorate([(0,r.Autowired)(v.IExtensionStorageServer),n.__metadata("design:type",Object)],m.prototype,"extensionStorageServer",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceService),n.__metadata("design:type",Object)],m.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),t.ExtensionStorageService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},93584:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(85853),t),n.__exportStar(e(56969),t),n.__exportStar(e(23618),t)},85853:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=t.IExtensionStoragePathServer=void 0,t.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),t.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},56969:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IExtensionStorageService=t.IExtensionStorageServer=void 0,t.IExtensionStorageServer=Symbol("ExtensionStorageServer"),t.IExtensionStorageService=Symbol("ExtensionStorageService")},23618:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50492:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(93584),t)},57962:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActivationEventServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(80076)),o=e(76003),c=e(43718);let p=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new c.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(m){return this.collectTopicData.get(m)||[]}async fireEvent(m,_=""){this.activatedEventSet.add(JSON.stringify({topic:m,data:_}));let s;if(this.wildCardTopics.has(m)?s=this.eventListeners.get(m):this.eventListeners.has(m)?s=this.eventListeners.get(m):s=this.eventListeners.get(m+":"+_),s){const g=await Promise.allSettled(s.map(l=>this.tryRun(m,_,l)));for(const l of g)l.status==="rejected"&&this.logger.error(`fire event ${m}:${_} error: ${l.reason}`)}}addWildCardTopic(m){return this.wildCardTopics.add(m),{dispose:()=>{this.wildCardTopics.delete(m)}}}onEvent(m,_){const s=m.indexOf(":");let g,l;return s===-1?(g=m,l=""):(g=m.substr(0,s),l=m.substr(s+1)),this.addListener(g,{topic:g,data:l,execute:_})}addListener(m,_){if(this.collectTopicData.set(_.topic,_.data),this.wildCardTopics.has(m))return this.eventListeners.has(m)||this.eventListeners.set(m,[]),this.eventListeners.get(m).push(_),{dispose:()=>{const s=this.eventListeners.get(m).indexOf(_);s!==-1&&this.eventListeners.get(m).splice(s,1)}};{const s=m+":"+_.data;return this.eventListeners.has(s)||this.eventListeners.set(s,[]),this.eventListeners.get(s).push(_),{dispose:()=>{const g=this.eventListeners.get(s).indexOf(_);g!==-1&&this.eventListeners.get(s).splice(g,1)}}}}async tryRun(m,_,s){this.wildCardTopics.has(m)?(0,r.default)(s.data)(_)&&await s.execute():await s.execute()}};t.ActivationEventServiceImpl=p,n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.ActivationEventServiceImpl=p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p)},63056:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionNoExportsView=t.ExtensionLoadingView=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(68974),p=n.__importDefault(e(17267)),v=({style:_})=>r.default.createElement("div",{style:_||{},className:p.default.kt_extension_view},r.default.createElement(c.Progress,{loading:!0}));t.ExtensionLoadingView=v;const m=(_,s)=>r.default.createElement("div",{className:p.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",_,s));t.ExtensionNoExportsView=m},56405:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PortalRoot=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(87420),v=e(25600),m=_=>{var s;const[g,l]=o.default.useState(null),h=(0,c.useInjectable)(v.AbstractViewExtProcessService),u=(0,c.useInjectable)(p.IThemeService);o.default.useEffect(()=>{const E=new c.DisposableCollection;return u.getCurrentTheme().then(f=>l(f.type)),E.push(u.onThemeChange(f=>{f.type&&f.type!==g&&l(f.type)})),E.dispose.bind(E)},[]);const d=_.original;return o.default.createElement(d,{..._.otherProps,className:(0,r.default)((s=_.otherProps)===null||s===void 0?void 0:s.className,(0,p.getThemeTypeSelector)(g)),getContainer:()=>h.getPortalShadowRoot(_.extensionId)})};t.PortalRoot=m},82443:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TREE_VIEW_NODE_HEIGHT=t.TreeViewNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(93899),_=e(95422),s=e(69589),g=e(42912),l=n.__importDefault(e(50790)),h=({item:u,onClick:d,onChange:E,onContextMenu:f,itemType:a,leftPadding:b=8,onTwistierClick:y,decorations:A,defaultLeftPadding:S=8,treeViewId:w,decorationService:T,draggable:D,onDragStart:I,onDragEnter:O,onDragLeave:M,onDragOver:R,onDrop:P})=>{const k=(0,_.useInjectable)(g.IIconService),F=(0,p.useDesignStyles)(l.default.expansion_toggle,"expansion_toggle"),L=(0,p.useDesignStyles)(l.default.tree_view_node,"tree_view_node"),[B,j]=(0,o.useState)(u.uri&&T.getDecoration(u.uri,!1));(0,o.useEffect)(()=>{const we=T.onDidChangeDecorations(be=>{u.uri&&be.affectsResource(u.uri)&&j(T.getDecoration(u.uri,!1))});return()=>{we.dispose()}},[]);const W=(0,_.useInjectable)(g.IThemeService),U=(0,o.useCallback)(we=>{(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&d(we,u,a)},[u,a,d]),Q=(0,o.useCallback)(we=>{(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&(y?y(we,u,a):d(we,u,a))},[u,a,y,d]),V=(0,o.useCallback)(we=>{we.nativeEvent.which===0||!f||(a===c.TreeNodeType.TreeNode||a===c.TreeNodeType.CompositeTreeNode)&&f(we,u,a)},[u,a,f]),$=(0,o.useCallback)(we=>{I&&I(we,u)},[u,I]),Y=(0,o.useCallback)(we=>{O&&O(we,u)},[u,O]),z=(0,o.useCallback)(we=>{M&&M(we,u)},[u,M]),H=(0,o.useCallback)(we=>{R&&R(we,u)},[u,R]),K=(0,o.useCallback)(we=>{P&&P(we,u)},[u,P]),Z=(0,o.useCallback)(we=>{E(u),we.stopPropagation()},[u,E]),X=a===c.TreeNodeType.CompositeTreeNode,ie=X?`${S+(u.depth||0)*(b||0)}px`:`${S+(u.depth||0)*(b||0)+8}px`,oe={height:t.TREE_VIEW_NODE_HEIGHT,lineHeight:`${t.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:ie},le=(we,be)=>A&&A?.classlist.indexOf(l.default.mod_loading)>-1?o.default.createElement(c.Loading,null):o.default.createElement("div",{onClick:be,className:(0,r.default)(l.default.tree_view_node_segment,F,(0,p.getIcon)("arrow-right"),{[`${l.default.mod_collapsed}`]:!we.expanded})}),pe=we=>o.default.createElement("div",{className:(0,r.default)(l.default.file_icon,we.icon),style:{maxHeight:t.TREE_VIEW_NODE_HEIGHT}}),q=we=>{var be;return we.checkboxInfo===void 0?null:o.default.createElement(c.CheckBox,{"data-node-id":we.treeItemId,readOnly:!0,onChange:fe=>Z(fe),checked:!!we.checkboxInfo.checked,id:we.treeItemId,role:(be=we.checkboxInfo.accessibilityInformation)===null||be===void 0?void 0:be.role,title:we.checkboxInfo.tooltip})},Ee=we=>{const be=()=>{if(we.highlights){let fe=[],xe=0;const Re=we.highlights.sort((Be,me)=>Be[0]-me[0]);return fe=Re.map((Be,me)=>{const[re,he]=Be,Oe=we.displayName.slice(xe,re);xe=he;const Se=we.displayName.slice(re,he),Fe=[o.default.createElement("span",{key:`line_begin_${me}_${Oe}`},Oe),o.default.createElement("span",{className:l.default.highlight,key:`line_hightlight_${me}_${Se}`},Se)];if(me===Re.length-1){const Ge=we.displayName.slice(he);Fe.push(o.default.createElement("span",{key:`line_end_${me}_${Ge}`},Ge))}return Fe}),fe}else return we.displayName};return o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_displayname,we.strikethrough&&l.default.strikethrough)},be())},_e=()=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment,l.default.tree_view_node_tail)},te()),te=()=>{if(u.actions.length>0)return o.default.createElement("div",{className:l.default.tree_view_actions},o.default.createElement(v.TitleActionList,{className:l.default.inlineMenu,context:[{treeViewId:w,treeItemId:u.treeItemId}],nav:u.actions,menuId:m.MenuId.ViewItemContext}))},ge=we=>{if(X)return le(we,Q)},Te=()=>u.tooltip||u.name,Pe=we=>o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_segment_grow,l.default.tree_view_node_description)},!we.name&&!we.description?"\u2014\u2014":we.description),Ae=()=>{if(!B)return null;const we=B.badge||"",be=B.color,fe=be&&W.getColor({id:be});return o.default.createElement("div",{className:l.default.tree_view_node_tail,style:{color:fe}},(0,s.transformLabelWithCodicon)(we.slice(),{},k.fromString.bind(k)))};return o.default.createElement("div",{key:u.id,onClick:U,onContextMenu:V,onDragStart:$,onDragOver:H,onDragEnter:Y,onDragLeave:z,onDrop:K,title:Te(),className:(0,r.default)(L,A?A.classlist:null),"data-id":u.id,style:oe,draggable:D},o.default.createElement("div",{className:(0,r.default)(l.default.tree_view_node_content)},ge(u),q(u),pe(u),o.default.createElement("div",{className:l.default.tree_view_node_overflow_wrap},Ee(u),Pe(u)),_e(),Ae()))};t.TreeViewNode=h,t.TREE_VIEW_NODE_HEIGHT=22},81302:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTabBarTreeView=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(68974),v=e(41893),m=e(24429),_=e(72260),s=e(82443),g=n.__importDefault(e(17267)),l=({viewState:d,model:E,dataProvider:f,treeViewId:a})=>{const b=(0,c.useInjectable)(_.IMainLayoutService),y=(0,c.useInjectable)(v.IDecorationsService),A=(0,r.useMemo)(()=>b.getViewAccordionService(a),[]),S=(0,r.useMemo)(()=>{const $=A?.getViewState(a);return $?!$.collapsed&&!$.hidden:!1},[A]),{height:w}=d,{canSelectMany:T}=E.treeViewOptions||{},D=(0,r.useRef)(null),I=(0,r.useCallback)($=>{E.handleTreeHandler({...$,getModel:()=>E.treeModel,hasDirectFocus:()=>D.current===document.activeElement})},[E]),O=(0,r.useCallback)(($,Y)=>{$.stopPropagation();const{toggleDirectory:z}=E;z(Y)},[E]),M=(0,r.useCallback)($=>R($)?!1:$.shiftKey,[]),R=(0,r.useCallback)($=>{const{metaKey:Y,ctrlKey:z}=$;return c.isOSX&&Y||z},[]),P=(0,r.useCallback)(($,Y,z)=>{$.stopPropagation();const{handleItemClick:H,handleItemToggleClick:K,handleItemRangeClick:Z}=E;if(!Y)return;const X=M(event),ie=R(event);T?X?Z(Y,z):ie?K(Y,z):H(Y,z):H(Y,z)},[T,E]),k=(0,r.useCallback)($=>{const{handleCheckBoxChange:Y}=E;$&&Y($)},[E]),F=(0,r.useCallback)(($,Y)=>{const{handleContextMenu:z}=E;z($,Y)},[E]),L=$=>{const{handleContextMenu:Y}=E;Y($)},B=(0,r.useCallback)(()=>{const{enactiveNodeDecoration:$}=E;$()},[E]),j=(0,r.useCallback)(($,Y)=>{const{handleDragStart:z}=E;z($,Y)},[E]),W=(0,r.useCallback)(($,Y)=>{const{handleDragOver:z}=E;z($,Y)},[E]),U=(0,r.useCallback)(($,Y)=>{const{handleDragEnter:z}=E;z($,Y)},[E]),Q=(0,r.useCallback)(($,Y)=>{const{handleDrop:z}=E;z($,Y)},[E]),V=(0,r.useCallback)(($,Y)=>{const{handleDragLeave:z}=E;z($,Y)},[E]);return(0,r.useEffect)(()=>{var $;const Y=()=>{E.handleTreeBlur()};return($=D.current)===null||$===void 0||$.addEventListener("blur",Y,!0),()=>{var z;(z=D.current)===null||z===void 0||z.removeEventListener("blur",Y,!0)}},[D.current]),r.default.createElement("div",{className:g.default.kt_extension_view,tabIndex:-1,ref:D,onContextMenu:L,onClick:B,"data-tree-view-id":a},r.default.createElement(u,{height:w,isVisible:S,handleTreeReady:I,handleItemClicked:P,handleCheckBoxChange:k,handleTwistierClick:O,handleContextMenu:F,handleDragStart:j,handleDragOver:W,handleDragEnter:U,handleDragLeave:V,handleDrop:Q,draggable:E.draggable,treeViewId:a,model:E,dataProvider:f,decorationService:y}))};t.ExtensionTabBarTreeView=l;function h(d,E){return d.isVisible===E.isVisible&&d.model===E.model&&d.treeViewId===E.treeViewId&&d.height===E.height}const u=(0,r.memo)(({model:d,treeViewId:E,height:f,isVisible:a,dataProvider:b,handleTreeReady:y,handleItemClicked:A,handleCheckBoxChange:S,handleTwistierClick:w,handleContextMenu:T,handleDragStart:D,handleDragOver:I,handleDragEnter:O,handleDragLeave:M,handleDrop:R,draggable:P,decorationService:k})=>{const[F,L]=(0,r.useState)(!1),[B,j]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let U=!1;return(async()=>(await d.whenReady,d.treeModel&&a&&await d.treeModel.ensureReady,U||L(!0)))(),()=>{U=!0,d&&d.removeNodeDecoration()}},[d,a]),(0,r.useEffect)(()=>{const U=b.onDidChangeEmpty(()=>{b.isTreeEmpty!==B&&j(b.isTreeEmpty)});return()=>U.dispose()},[]);const W=(0,r.useCallback)(U=>r.default.createElement(s.TreeViewNode,{item:U.item,itemType:U.itemType,decorations:d.decorations.getDecorations(U.item),onClick:A,onChange:S,onTwistierClick:w,onContextMenu:T,onDragStart:D,onDragOver:I,onDragEnter:O,onDragLeave:M,onDrop:R,defaultLeftPadding:8,leftPadding:8,treeViewId:E,draggable:P,decorationService:k}),[d.treeModel]);if(F){if(B)return r.default.createElement(m.WelcomeView,{viewId:E});if(d.treeModel)return r.default.createElement(o.RecycleTree,{height:f,itemHeight:s.TREE_VIEW_NODE_HEIGHT,onReady:y,model:d.treeModel},W)}else return r.default.createElement(p.Progress,{loading:!0});return null},h);u.displayName="ExtensionsTreeView"},88341:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionWebviewView=t.WebviewViewShouldShowEvent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(99220);class p extends o.BasicEvent{}t.WebviewViewShouldShowEvent=p;const v=({viewId:m})=>{const _=r.default.useRef(null),s=(0,o.useInjectable)(o.IEventBus),g=(0,o.useInjectable)(c.ExtensionService);return r.default.useEffect(()=>{const l=new o.CancellationTokenSource,h=new o.Disposable({dispose:()=>l.cancel()});return g.eagerExtensionsActivated.promise.then(()=>{l.token.isCancellationRequested||_.current&&s.fire(new p({viewType:m,container:_.current,title:"",cancellationToken:l.token,disposer:h}))}),()=>{h.dispose()}},[]),r.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:_})};t.ExtensionWebviewView=v},17428:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(81302),t),n.__exportStar(e(63056),t)},21167:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkthroughsEditorView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(93374),m=e(52416),_=e(99220),s=e(17441),g=n.__importDefault(e(42076)),l=({resource:{uri:E}})=>{const f=(0,p.useInjectable)(s.WalkthroughsService),a=(0,p.useInjectable)(p.IContextKeyService),{query:b,authority:y}=E,[A,S]=(0,o.useState)(),[w,T]=(0,o.useState)();(0,o.useEffect)(()=>{A&&A.steps.length>0&&(w||T(A.steps[0].id))},[A,w]),(0,o.useEffect)(()=>{b&&S(f.getWalkthrough(b))},[b,A]);const D=(0,o.useCallback)(()=>{var I;return A&&((I=A.steps.find(O=>O.id===w))===null||I===void 0?void 0:I.media)},[w,A]);return o.default.createElement("div",{className:g.default.getting_started_container},o.default.createElement("div",{className:g.default.getting_started_detailsContent},o.default.createElement("div",{className:g.default.category_container},o.default.createElement("div",{className:g.default.category_icon},A&&A.icon.type==="image"&&o.default.createElement("img",{src:A.icon.path})),o.default.createElement("div",{className:g.default.category_description_container},o.default.createElement("h2",{className:g.default.category_title},A?.title),o.default.createElement("div",{className:g.default.category_description},A?.description))),o.default.createElement("div",{className:g.default.steps_container},o.default.createElement("div",{className:g.default.getting_started_detail_container},o.default.createElement("div",{className:g.default.step_list_container},A?A.steps.filter(I=>a.match(I.when)).map(I=>o.default.createElement(h,{key:I.id,step:I,isExpanded:I.id===w,onSelected:T})):null))),o.default.createElement("div",{className:g.default.getting_started_media},w&&o.default.createElement(u,{media:D(),extensionId:y,stepId:w}))))};t.WalkthroughsEditorView=l;const h=({step:E,isExpanded:f,onSelected:a})=>{const b=(0,p.useInjectable)(p.IOpenerService),y=(0,p.useInjectable)(s.WalkthroughsService),A=(0,p.useInjectable)(m.IIconService),[S,w]=(0,o.useState)(!1),{description:T}=E;(0,o.useEffect)(()=>{const R=y.onDidProgressStep(P=>{const{id:k,done:F}=P;k===E.id&&F&&w(F)});return()=>R.dispose()},[]);const D=(0,o.useCallback)(()=>{w(!S),y.progressByEvent(_.CompletionEventsType.stepSelected+":"+E.id)},[S,E.id]),I=(0,o.useCallback)(R=>{const{href:P}=R;b.open(P),/^http(s)?:\/\//.test(P)&&y.progressByEvent(_.CompletionEventsType.onLink+":"+P)},[]),O=(0,o.useCallback)(()=>{if(T.length===0)return null;const R=[];return T.map((P,k)=>{if(P.nodes.length===1&&typeof P.nodes[0]!="string"){const F=P.nodes[0];R.push(o.default.createElement("div",{key:k.toString()+R.length,title:F.title},o.default.createElement(c.Button,{onClick:()=>I(F)},(0,p.transformLabelWithCodicon)(F.label,{},A.fromString.bind(A)))))}else{const F=P.nodes.map((L,B)=>typeof L=="string"?L:o.default.createElement("a",{key:L.label+"#"+B,title:L.title,onClick:()=>I(L)},L.label));R.push(o.default.createElement("p",{key:k.toString()+R.length.toString()+F.length.toString()},F))}}),o.default.createElement("div",{className:g.default.step_description_container},o.default.createElement(o.default.Fragment,null,R))},[T]),M=(0,o.useCallback)(()=>(0,p.transformLabelWithCodicon)(E.title,{},A.fromString.bind(A)),[E.title]);return o.default.createElement("div",{className:(0,r.default)(g.default.getting_started_step,f&&g.default.expanded),onClick:()=>a(E.id)},o.default.createElement("div",{className:g.default.checkbox},o.default.createElement(c.CheckBox,{id:E.id,onChange:D,checked:S})),o.default.createElement("div",{className:g.default.step_container},o.default.createElement("h3",{className:g.default.step_title},M()),f&&O()))},u=({media:E,extensionId:f,stepId:a})=>{const b=(0,p.useInjectable)(m.IThemeService),y=(0,p.useInjectable)(s.WalkthroughsService),[A,S]=(0,o.useState)(""),[w,T]=(0,o.useState)(""),D=(0,o.useCallback)(async I=>E?.type==="image"?"":I?(await y.getFileContent(f,I)).toString():"",[E]);if((0,o.useEffect)(()=>{const I=y.getStepsByExtension(a);I&&(E&&E.type==="svg"&&I.media.svg&&D(I.media.svg).then(S),E&&E.type==="markdown"&&I.media.markdown&&D(I.media.markdown).then(T))},[E,a]),!E)return null;if(E.type==="image"){const I=b.getCurrentThemeSync().type,O=E.path[I].toString(!0).replace(/ /g,"%20");return o.default.createElement(o.default.Fragment,null,o.default.createElement("img",{alt:E.altText,srcSet:O.toLowerCase().endsWith(".svg")?O:O+" 1.5x"}))}return E.type==="svg"?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:g.default.media_svg_container,dangerouslySetInnerHTML:{__html:A}})):E.type==="markdown"?o.default.createElement(o.default.Fragment,null,o.default.createElement(d,{content:w,media:E})):null},d=({content:E,media:f})=>{const a=(0,p.useInjectable)(p.IOpenerService);if(f.type!=="markdown")return null;const b=(0,o.useCallback)(()=>f.base.resolve("/").toString(),[f,E]);return o.default.createElement(v.Markdown,{content:E,options:{baseUrl:b()},onLinkClick:y=>a.open(y)})}},87444:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtCommandManagementImpl=void 0;const n=e(85608),r=e(76003),o=e(43718);let c=class extends o.Disposable{constructor(){super(...arguments),this.commandEnvRegistry=new Map,this.proxyCommandExecutorRegistry=new Map}dispose(){this.commandEnvRegistry.clear(),this.proxyCommandExecutorRegistry.clear()}registerProxyCommandExecutor(v,m){this.proxyCommandExecutorRegistry.set(v,m)}async executeExtensionCommand(v,m,_){const s=this.proxyCommandExecutorRegistry.get(v);if(!s)throw new Error('Proxy command executor "'+v+'" is not existed');return s.$executeExtensionCommand(m,..._)}registerExtensionCommandEnv(v,m="node"){return this.commandEnvRegistry.set(v,m),{dispose:()=>{this.commandEnvRegistry.delete(v)}}}getExtensionCommandEnv(v){return this.commandEnvRegistry.get(v)}};t.ExtCommandManagementImpl=c,t.ExtCommandManagementImpl=c=n.__decorate([(0,r.Injectable)()],c)},49413:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtInstanceManagementService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(99220),v=e(42734);let m=class extends o.Disposable{constructor(){super(),this.onDidChangeEmitter=new c.Emitter,this.extensionMap=new Map,this._whenReady=this.init()}async init(){this.workspaceStorage=await this.storageProvider(o.STORAGE_NAMESPACE.EXTENSIONS),this.globalStorage=await this.storageProvider(o.STORAGE_NAMESPACE.GLOBAL_EXTENSIONS)}get whenReady(){return this._whenReady}get onDidChange(){return this.onDidChangeEmitter.event}dispose(){this.disposeExtensionInstances()}getExtensionInstances(){return Array.from(this.extensionMap.values())}disposeExtensionInstances(){for(const s of this.extensionMap.values())s.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(s){s.forEach(g=>{this.extensionMap.has(g)&&this.extensionMap.get(g).dispose()})}resetExtensionInstances(){for(const s of this.extensionMap.values())s.reset()}getExtensionInstanceByPath(s){return this.extensionMap.get(s)}getExtensionInstanceByExtId(s){for(const g of this.extensionMap.values())if(g.id===s)return g}deleteExtensionInstanceByPath(s){this.extensionMap.delete(s),this.onDidChangeEmitter.fire()}addExtensionInstance(s){this.extensionMap.set(s.path,s),this.onDidChangeEmitter.fire()}async checkExtensionEnable(s){await this.whenReady;const g=this.globalStorage.get(s.extensionId,p.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(s.extensionId,g)===p.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(s,g,l){const h=typeof s=="string"?await this.extensionNodeClient.getExtension(s,(0,c.getLanguageId)(),{}):s;if(h)return this.injector.get(v.Extension,[h,await this.checkExtensionEnable(h),g||(this.appConfig.extensionDir?h.realPath.startsWith(this.appConfig.extensionDir):!1),!!l])}checkIsBuiltin(s){const g=this.getExtensionCandidateByPath(s.realPath);return(this.appConfig.extensionDir?s.realPath.startsWith(this.appConfig.extensionDir):!1)||(g?g.isBuiltin:!1)}checkIsDevelopment(s){const g=this.getExtensionCandidateByPath(s.realPath);return!!g?.isDevelopment}getExtensionCandidateByPath(s){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find(g=>g.path===s)}};t.ExtInstanceManagementService=m,n.__decorate([(0,r.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],m.prototype,"extensionNodeClient",void 0),t.ExtInstanceManagementService=m=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],m)},98453:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionManagementService=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(14951),p=e(99220),v=e(82389),m=e(71354),_=e(35321);let s=class extends o.WithEventBus{async getExtensionProps(l,h){const u=await this.extensionNodeClient.getExtension(l,(0,o.getLanguageId)(),h);if(u){const d=this.getExtensionByPath(l);if(d)return{...d.toJSON(),extraMetadata:u.extraMetadata}}}getExtensionByPath(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.path)}getExtensionByExtId(l){return this.extInstanceManagementService.getExtensionInstances().find(h=>l===h.id)}async postChangedExtension(l,h,u){const{upgrade:d,extensionPath:E,oldExtensionPath:f,isBuiltin:a}=typeof l=="boolean"?{upgrade:l,extensionPath:h,oldExtensionPath:u,isBuiltin:!1}:l,b=this.extInstanceManagementService.getExtensionInstanceByPath(E);if(b){this.logger.warn(`Extension ${b.id} already exists, skip activate`);return}const y=await this.extInstanceManagementService.createExtensionInstance(E,!!a);if(y)return d&&this.disableExtension(f),await this.enableExtension(y)}async postEnableExtension(l){const h=await this.extInstanceManagementService.getExtensionInstanceByPath(l);if(h)return await this.enableExtension(h)}async postDisableExtension(l){return this.disableExtension(l)}async postUninstallExtension(l){return this.uninstallExtension(l)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(l=>l.toJSON())}disableExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l))}async enableExtension(l){this.extInstanceManagementService.addExtensionInstance(l),l.enable(),await l.initialize(),this.eventBus.fire(new m.ExtensionDidEnabledEvent(l.toJSON())),this.sumiContributesService.register(l.id,l.packageJSON.sumiContributes||{}),this.contributesService.register(l.id,l.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(l){try{return await this.fileService.delete(o.URI.file(l).toString()),!0}catch(h){return this.logger.error(h),!1}}async uninstallExtension(l){const h=this.extInstanceManagementService.getExtensionInstanceByPath(l);h&&(h.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(l)),await this.removeExtension(l),this.eventBus.fire(new m.ExtensionDidUninstalledEvent)}};t.ExtensionManagementService=s,n.__decorate([(0,r.Autowired)(m.AbstractExtInstanceManagementService),n.__metadata("design:type",m.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],s.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(_.VSCodeContributesServiceToken),n.__metadata("design:type",_.VSCodeContributesService)],s.prototype,"contributesService",void 0),n.__decorate([(0,r.Autowired)(v.SumiContributionsServiceToken),n.__metadata("design:type",v.SumiContributionsService)],s.prototype,"sumiContributesService",void 0),n.__decorate([(0,r.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),t.ExtensionManagementService=s=n.__decorate([(0,r.Injectable)()],s)},20670:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeExtProcessService=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(18740),p=e(41869),v=e(99220),m=e(72464),_=e(46147),s=e(37846),g=e(28949),l=e(51072),h=e(17802);let u=class{constructor(){this._apiFactoryDisposables=new p.DisposableStore,this.ready=new p.Deferred,this._extHostUpdated=new p.Deferred,this.extensions=[]}disposeApiFactory(){this._apiFactoryDisposables.clear()}async disposeProcess(){this.disposeApiFactory(),await this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}async activate(){return await this.createExtProcess(),this.protocol&&(this.ready.resolve(),await this.createBrowserMainThreadAPI(),await(await this.getProxy()).$updateExtHostData(),this._extHostUpdated.resolve()),this.protocol}async activeExtension(E,f){!this.appConfig.noExtHost&&!f&&(await this._extHostUpdated.promise,await(await this.getProxy()).$activateExtension(E.id))}async updateExtensionData(E){if(this.extensions=E,this.protocol){const f=await this.getProxy();await f.$updateExtHostData(),f.$fireChangeEvent()}}getExtension(E){return this.extensions.find(f=>f.id===E)}async $activateExtension(E){const f=this.extensions.find(a=>a.path===E);f&&await f.activate()}async $getExtensions(){return this.extensions.map(E=>E.toJSON())}async getProxy(){return await this.ready.promise,this.protocol.getProxy(_.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const E=(0,h.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(E),this._apiFactoryDisposables.add((0,p.toDisposable)((0,l.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,p.toDisposable)((0,g.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await E.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const E=new p.Disposable,f=this.mainThreadExtenderContributionProvider.getContributions();for(const b of f)b.registerMainThreadExtender(this.mainThreadExtenderService);const a=this.mainThreadExtenderService.getMainThreadExtenders();for(const b of a){const y=this.injector.get(b.serviceClass,[this.protocol]);this.protocol.set(b.identifier,y),E.addDispose(y)}return E}async getActivatedExtensions(){return await(await this.getProxy()).$getActivatedExtensions()}get clientId(){return this.applicationService.clientId}async createExtProcess(){await this.extensionNodeClient.createProcess(this.clientId,{enableDebugExtensionHost:this.appConfig.enableDebugExtensionHost,inspectExtensionHost:this.appConfig.inspectExtensionHost,extensionConnectOption:this.appConfig.extensionConnectOption,extHostSpawnOptions:this.getSpawnOptions()}),await this.initExtProtocol()}async initExtProtocol(){var E,f;this.channel&&this.channel.dispose(),this.protocol&&((f=(E=this.protocol).dispose)===null||f===void 0||f.call(E)),this.channel=await this.channelHandler.openChannel(v.CONNECTION_HANDLE_BETWEEN_EXTENSION_AND_MAIN_THREAD),this.connection=this.channel.createConnection(),this.protocol=new o.SumiConnectionMultiplexer(this.connection,{timeout:this.appConfig.rpcMessageTimeout,name:"node-ext-host",io:(0,o.createExtMessageIO)(s.knownProtocols)})}};t.NodeExtProcessService=u,n.__decorate([(0,r.Autowired)(p.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],u.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],u.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(p.IApplicationService),n.__metadata("design:type",Object)],u.prototype,"applicationService",void 0),n.__decorate([(0,r.Autowired)(c.WSChannelHandler),n.__metadata("design:type",c.WSChannelHandler)],u.prototype,"channelHandler",void 0),n.__decorate([(0,r.Autowired)(m.IMainThreadExtenderService),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,r.Autowired)(m.MainThreadExtenderContribution),n.__metadata("design:type",Object)],u.prototype,"mainThreadExtenderContributionProvider",void 0),t.NodeExtProcessService=u=n.__decorate([(0,r.Injectable)()],u)},90731:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ViewExtProcessService=void 0;const r=e(85608),o=e(76003),c=e(65973),p=e(8919),v=e(41869),m=e(40827),_=e(43718),s=e(61656),g=e(99220),l=e(25600),h=e(17428),u=e(54107),d=e(9438),E=e(8403),f=e(31738),{Path:a,posix:b}=v.path,y="load";let A=n=class extends _.Disposable{constructor(){super(...arguments),this.debugLogger=(0,_.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(w){return this.extensions.find(T=>T.id===w)}async initExtension(w){this.extensions=w}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(w){}async $getExtensions(){return this.extensions.map(w=>w.toJSON())}async disposeProcess(){}activate(){const w=this.requireInterceptorContributionProvider.getContributions();for(const T of w)T.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(w,T)=>{let D,I=`Error: ${w.message}`;for(const O of T)if(I+=`
31544
31544
  at ${O.toString()}`,!D&&O.isEval()){const M=O.getEvalOrigin(),R=this.getExtension.apply(this,[M]);if(R){D=R;const P=O.getColumnNumber(),k=O.getLineNumber();I=`
31545
31545
  at ${D.name} (${D.workerScriptPath}:${k}:${P})`+I}}if(D){const O=`${D&&D.name} - ${w.name||"Error"}: ${w.message||""}${I}`;return this.debugLogger.log("get error",O),this.reportRuntimeError(w,D,O),O}return w.stack}}reportRuntimeError(w,T,D){var I;w&&w.message&&this.reporterService.point(_.REPORT_NAME.RUNTIME_ERROR_EXTENSION,T.id,{stackTraceMessage:D,error:w.message,version:(I=T.packageJSON)===null||I===void 0?void 0:I.version})}getRegisterViewKind(w){return n.tabBarLocation.includes(w)?"replace":"add"}async activeExtension(w,T){var D;const{extendConfig:I,packageJSON:O,contributes:M}=w;if(!((D=I?.browser)===null||D===void 0)&&D.main){(0,c.warning)(!1,"[Deprecated warning]: kaitian.js is deprecated, please use `package.json#sumiContributes` instead"),await this.activateExtensionByDeprecatedExtendConfig(w);return}O.sumiContributes&&M?.browserMain&&await this.activeExtensionContributes(w)}async activeExtensionContributes(w){var T;const{contributes:D}=w,I=new v.URI(w.extensionLocation.with({path:b.join(w.extensionLocation.path,D.browserMain)})),{moduleExports:O,proxiedHead:M}=await this.getExtensionModuleExports(I.toString(),w);if(D.browserViews){const{browserViews:P}=D;this.appConfig.useExperimentalShadowDom&&this.registerPortalShadowRoot(w.id);const k=Object.keys(P).reduce((F,L)=>(F[L]={type:this.getRegisterViewKind(L),view:P[L].view.map(({id:B,titleComponentId:j,title:W,...U})=>({...U,title:(0,_.replaceLocalizePlaceholder)(W,w.id),id:B,component:this.getModuleExportsComponent(O,w,B,M),titleComponent:j&&this.getModuleExportsComponent(O,w,j,M)}))},F),{});this.registerBrowserComponent(k,w)}if(D.toolbar&&(!((T=D.toolbar)===null||T===void 0)&&T.actions)){for(const P of D.toolbar.actions)if(P.type==="button"&&P.popoverComponent){const k=O[P.popoverComponent];if(!k){this.logger.error(`Can not find CustomPopover from extension ${w.id}, id: ${P.popoverComponent}`);continue}if(this.appConfig.useExperimentalShadowDom){const F=L=>(0,E.getShadowRoot)(k,w,L,P.popoverComponent,M,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet);this.toolbarPopoverRegistry.registerComponent(`${w.id}:${P.popoverComponent}`,F)}else this.toolbarPopoverRegistry.registerComponent(`${w.id}:${P.popoverComponent}`,k)}}const R=P=>{if(D.scm&&D.scm.additional){const{input:k}=D.scm.additional;if(!k)return;const{addonBefore:F,addonAfter:L}=k,B=(j,W)=>{j.forEach(U=>{const Q=O[U];if(Q||this.logger.error(`Can not find ${W} from extension ${w.id}, id: ${Q}`),this.appConfig.useExperimentalShadowDom){const V=$=>(0,E.getShadowRoot)(Q,w,$,j,M,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet);P.input.appendProps({[W]:V})}else P.input.appendProps({[W]:Q})})};F&&B(F,"addonBefore"),L&&B(L,"addonAfter")}};this.addDispose(this.scmService.onDidAddRepository(P=>{R(P)})),this.scmService.repositories.forEach(P=>{R(P)})}async activateExtensionByDeprecatedExtendConfig(w){const{extendConfig:T}=w;this.logger.verbose(`register view by Deprecated config ${w.id}`);const D=await this.staticResourceService.resolveStaticResource(v.URI.file(new a(w.path).join(T.browser.main).toString()));try{const I=w;if(this.appConfig.useExperimentalShadowDom){this.registerPortalShadowRoot(w.id);const{moduleExports:O,proxiedHead:M}=await this.loadBrowserModuleUseInterceptor(D.toString(),w,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(O,w,M),I)}else{const{moduleExports:O}=await this.loadBrowserModule(D.toString(),w,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(O,w),I)}}catch(I){I.errorCode===y?this.logger.error(`[Extension-Host] failed to load ${w.name} - browser module, path:
31546
31546
 
31547
31547
  ${I.moduleId}`):this.logger.error(I)}}async getExtensionModuleExports(w,T){if(this.appConfig.useExperimentalShadowDom)return await this.loadBrowserModuleUseInterceptor(w,T,!1);const{moduleExports:D}=await this.loadBrowserModule(w,T,!1);return{moduleExports:D}}registerBrowserComponent(w,T){this.activatedViewExtensionMap.set(T.path,T),w.default&&(w=w.default);const D=w;T.addDispose(this.injector.get(f.SumiBrowserContributionRunner,[T,D]).run({getExtensionExtendService:this.getExtensionExtendService.bind(this)}))}getExtensionExtendService(w,T){const D=this.createExtensionExtendProtocol(w,T);return this.logger.log(`bind extend service for ${w.id}:${T}`),{extendProtocol:D,extendService:D.getProxy(g.MOCK_EXTENSION_EXTEND_PROXY_IDENTIFIER)}}createExtensionExtendProtocol(w,T){const{id:D}=w;return new Proxy(Object.create(null),{get:(O,M)=>{if(typeof M=="symbol")return O[M];if(M==="getProxy")return()=>{let R,P;return this.nodeExtensionService.protocol&&(R=this.createExtendProxy(this.nodeExtensionService.protocol,D)),this.workerExtensionService.protocol&&(P=this.createExtendProxy(this.workerExtensionService.protocol,D)),{node:R,worker:P}};if(M==="set"){const R={serviceId:`${g.EXTENSION_EXTEND_SERVICE_PREFIX}:${D}:${T}`};return P=>{const k={};for(const F in P)P.hasOwnProperty(F)&&(k[`$${F}`]=P[F]);if(this.logger.log("componentProxyIdentifier",R,"service",k),this.workerExtensionService.protocol&&this.workerExtensionService.protocol.set(R,k),this.nodeExtensionService.protocol)return this.nodeExtensionService.protocol.set(R,k)}}}})}createExtendProxy(w,T){const D=w.getProxy(new p.ProxyIdentifier(`${g.EXTENSION_EXTEND_SERVICE_PREFIX}:${T}`));return this.dollarProxy(D)}dollarProxy(w){return new Proxy(w,{get:(T,D)=>typeof D=="symbol"?T[D]:T[`$${D}`]})}getModuleExportsComponent(w,T,D,I){return w[D]?this.appConfig.useExperimentalShadowDom?O=>(0,E.getShadowRoot)(w[D],T,O,D,I,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet):w[D]:()=>(0,h.ExtensionNoExportsView)(T.id,D)}registerPortalShadowRoot(w){if(!this.portalShadowRootMap.has(w)){const T=document.createElement("div");T.setAttribute("id",`portal-shadow-root-${w}`),document.body.appendChild(T);const D=T.attachShadow({mode:"open"});(0,d.retargetEvents)(D),this.portalShadowRootMap.set(w,D)}}getPortalShadowRoot(w){return this.portalShadowRootMap.get(w)}getShadowRootBody(w){return this.shadowRootBodyMap.get(w)}doFetch(w){const T={};return this.appConfig.extensionFetchCredentials&&(T.credentials=this.appConfig.extensionFetchCredentials),fetch(w,T)}getSumiAMDLoader(w,T){const D={};return{_module:{exports:D},_exports:D,_require:M=>{const R=this.requireInterceptorService.getRequireInterceptor(M);return R?.load({injector:this.injector,extension:w,rpcProtocol:T})}}}async loadBrowserModule(w,T,D){const I=this.reporterService.time(_.REPORT_NAME.LOAD_EXTENSION_MAIN),O=await this.doFetch(decodeURIComponent(w));I.timeEnd(T.id);const{_module:M,_exports:R,_require:P}=this.getSumiAMDLoader(T,this.nodeExtensionService.protocol);return new Function("module","exports","require",await O.text()+`
31548
31548
  //# sourceURL=${T.id}`)(M,R,P),{moduleExports:D?M.exports.default:M.exports}}normalizeDeprecatedViewsConfig(w,T,D){if(this.appConfig.useExperimentalShadowDom)return Object.keys(w).filter(I=>w[I]&&Array.isArray(w[I].component)).reduce((I,O)=>(I[O]={view:w[O].component.map(({panel:M,id:R,...P})=>({...P,id:R,component:k=>(0,E.getShadowRoot)(M,T,k,R,D,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet)}))},I),{});{const I=w.default?w.default:w;return Object.keys(I).filter(O=>I[O]&&Array.isArray(I[O].component)).reduce((O,M)=>(O[M]={view:I[M].component.map(({panel:R,...P})=>({...P,component:R}))},O),{})}}async loadBrowserModuleUseInterceptor(w,T,D){const I=this.reporterService.time(_.REPORT_NAME.LOAD_EXTENSION_MAIN),O=await this.doFetch(decodeURIComponent(w));I.timeEnd(T.id);const{_module:M,_exports:R,_require:P}=this.getSumiAMDLoader(T,this.nodeExtensionService.protocol),k=[],F=document.createElement("head"),L=(0,u.createProxiedDocument)(F),B=(0,u.createProxiedWindow)(L,F);return new Function("module","exports","require","styles","document","window",await O.text()+`
31549
- //# sourceURL=${T.id}`)(M,R,P,k,L,B),{moduleExports:D?M.exports.default:M.exports,proxiedHead:F}}};t.ViewExtProcessService=A,A.tabBarLocation=["left","right"],r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],A.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(_.ILogger),r.__metadata("design:type",Object)],A.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(v.AppConfig),r.__metadata("design:type",Object)],A.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(v.IToolbarPopoverRegistry),r.__metadata("design:type",Object)],A.prototype,"toolbarPopoverRegistry",void 0),r.__decorate([(0,o.Autowired)(l.AbstractWorkerExtProcessService),r.__metadata("design:type",l.AbstractWorkerExtProcessService)],A.prototype,"workerExtensionService",void 0),r.__decorate([(0,o.Autowired)(l.AbstractNodeExtProcessService),r.__metadata("design:type",l.AbstractNodeExtProcessService)],A.prototype,"nodeExtensionService",void 0),r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",m.StaticResourceService)],A.prototype,"staticResourceService",void 0),r.__decorate([(0,o.Autowired)(g.RequireInterceptorContribution),r.__metadata("design:type",Object)],A.prototype,"requireInterceptorContributionProvider",void 0),r.__decorate([(0,o.Autowired)(g.IRequireInterceptorService),r.__metadata("design:type",Object)],A.prototype,"requireInterceptorService",void 0),r.__decorate([(0,o.Autowired)(_.IReporterService),r.__metadata("design:type",Object)],A.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(s.SCMService),r.__metadata("design:type",s.SCMService)],A.prototype,"scmService",void 0),t.ViewExtProcessService=A=n=r.__decorate([(0,o.Injectable)()],A)},98736:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerExtProcessService=void 0;const n=e(85608),r=e(76003),o=e(84605),c=e(8919),p=e(92917),v=e(41869),m=e(43718),_=e(99220),s=e(37846),g=e(30824),l=e(28949),h=e(51072),u=e(17802),d=e(65055),{posix:E}=m.path;let f=class extends m.Disposable{constructor(){super(...arguments),this.ready=new v.Deferred,this._extHostUpdated=new v.Deferred,this.extensions=[],this.apiFactoryDisposable=new m.DisposableStore}disposeApiFactory(){var b,y;this.apiFactoryDisposable.clear(),this.protocol&&((y=(b=this.protocol).dispose)===null||y===void 0||y.call(b)),this.connection&&this.connection.dispose()}disposeProcess(){this.disposeApiFactory()}async activate(b){if(this.protocol=await this.createExtProcess(b),this.protocol){this.ready.resolve(),this.logger.log("[Worker Host] init worker thread api proxy");const y=(0,u.initSharedAPIProxy)(this.protocol,this.injector);this.apiFactoryDisposable.add(y),this.apiFactoryDisposable.add((0,m.toDisposable)((0,h.initWorkerThreadAPIProxy)(this.protocol,this.injector,this))),this.apiFactoryDisposable.add((0,m.toDisposable)((0,l.createSumiAPIFactory)(this.protocol,this.injector))),await y.setup(),await this.getProxy().$updateExtHostData(),this._extHostUpdated.resolve()}return this.protocol}async activeExtension(b,y){var A,S;const{extendConfig:w,packageJSON:T,id:D}=b;if(!((A=w?.worker)===null||A===void 0)&&A.main){(0,o.warning)(!1,`[Deprecated warning]: ${D}: kaitian.js is deprecated, please use \`package.json#sumiContributes\` instead`),await this.doActivateExtension(b);return}(T.sumiContributes&&(!((S=b.contributes)===null||S===void 0)&&S.workerMain)||y&&T.browser)&&await this.doActivateExtension(b)}async doActivateExtension(b){this.appConfig.extWorkerHost&&(await this._extHostUpdated.promise,await this.getProxy().$activateExtension(b.id))}async updateExtensionData(b){this.extensions=b,this.protocol&&this.getProxy().$updateExtHostData()}getExtension(b){return this.extensions.find(y=>y.id===b)}async $activateExtension(b){const y=this.extensions.find(A=>A.workerScriptPath===b);y&&await y.activate()}async $getExtensions(){return this.extensions.map(b=>b.contributes&&b.contributes.workerMain?this.getWorkerExtensionProps(b,b.contributes.workerMain):b.packageJSON.browser?this.getWorkerExtensionProps(b,b.packageJSON.browser):b.extendConfig&&b.extendConfig.worker&&b.extendConfig.worker.main?this.getWorkerExtensionProps(b,b.extendConfig.worker.main):b.toJSON())}async $getStaticServicePath(){return this.appConfig.staticServicePath||`http://${window.location.hostname}:8000`}async createExtProcess(b){const y=(0,g.getWorkerBootstrapUrl)(this.appConfig.extWorkerHost,"ExtensionWorkerHost",b);return await this.initWorkerProtocol(y)}async initWorkerProtocol(b){return this.logger.log("[Worker Host] init web worker extension host"),new Promise((y,A)=>{const S=new v.Deferred;if(this.appConfig.useIframeWrapWorkerHost){const{iframe:w,extHostUuid:T}=(0,d.startInsideIframe)(b),D=I=>{if(I.source===w.contentWindow&&I.data.kaitianWebWorkerExtHostId===T&&I.data.data instanceof MessagePort){S.resolve(I.data.data);return}};window.addEventListener("message",D),this.apiFactoryDisposable.add({dispose:()=>{window.removeEventListener("message",D),w.remove()}}),S.promise.then(I=>{y(this.createProtocol(I))})}else try{const w=new Worker(b,{name:"KaitianWorkerExtensionHost"});w.onmessage=T=>{T.data instanceof MessagePort&&S.resolve(T.data)},w.onerror=T=>{A(T)},this.apiFactoryDisposable.add({dispose:()=>{w.terminate(),w.onmessage=null,w.onerror=null}}),S.promise.then(T=>{y(this.createProtocol(T))})}catch(w){A(w)}})}createProtocol(b){this.connection=new p.MessagePortConnection(b);const y=new c.SumiConnectionMultiplexer(this.connection,{timeout:this.appConfig.rpcMessageTimeout,name:"worker-ext-host",io:(0,c.createExtMessageIO)(s.knownProtocols)});return this.logger.log("[Worker Host] web worker extension host ready"),y}getActivatedExtensions(){return this.getProxy().$getActivatedExtensions()}getProxy(){return this.protocol.getProxy(_.WorkerHostAPIIdentifier.ExtWorkerHostExtensionService)}getWorkerExtensionProps(b,y){let A=y;A.endsWith(".js")||(A+=".js");const S=new v.URI(b.extensionLocation.with({path:E.join(b.extensionLocation.path,A)})).toString();return Object.assign({},b.toJSON(),{workerScriptPath:S})}getSpawnOptions(){return{}}dispose(){super.dispose(),this.disposeApiFactory()}};t.WorkerExtProcessService=f,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),t.WorkerExtProcessService=f=n.__decorate([(0,r.Injectable)()],f)},62040:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionCommandContribution=t.ExtensionClientAppContribution=t.getClientId=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(29220),p=e(54414),v=e(55113),m=e(72665),_=e(65046),s=e(99220),g=e(53043),l=e(71354),h=n.__importStar(e(72980)),u=e(17441),d=a=>a.get(o.IApplicationService).clientId;t.getClientId=d;let E=class{initialize(){this.extensionService.activate().then(()=>{const b=this.webviewService.registerWebviewReviver({handles:()=>0,revive:async y=>new Promise(A=>{this.eventBus.on(l.ExtensionApiReadyEvent,()=>{b.dispose(),A(this.webviewService.tryReviveWebviewComponent(y))})})})})}async onStart(){(0,o.runWhenIdle)(()=>{this.extensionService.runExtensionContributes()}),this.preferenceSettingsService.registerSettingGroup({id:"extension",title:(0,o.localize)("settings.group.extension"),iconClass:(0,o.getIcon)("extension")})}onDisposeSideEffects(){this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}onReconnect(){this.extensionService.restartExtProcess(s.ERestartPolicy.WhenExit)}get clientId(){return(0,t.getClientId)(this.injector)}};t.ExtensionClientAppContribution=E,n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],E.prototype,"preferenceSettingsService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],E.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],E.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],E.prototype,"statusBar",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],E.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(_.IWebviewService),n.__metadata("design:type",Object)],E.prototype,"webviewService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionService),n.__metadata("design:type",s.ExtensionService)],E.prototype,"extensionService",void 0),t.ExtensionClientAppContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],E);let f=class{registerCommands(b){b.registerCommand({id:"ext.restart",label:"%extension.host.restart%"},{execute:async()=>{this.logger.log("start restart ext host process"),await this.extensionService.restartExtProcess(),this.logger.log("end restart ext host process")}}),b.registerCommand(h.GET_EXTENSION,{execute:async y=>{const A=this.extensionInstanceManageService.getExtensionInstanceByExtId(y);return A&&A.toJSON()}}),this.registerVSCBuiltinCommands(b)}registerVSCBuiltinCommands(b){b.registerCommand(h.SET_CONTEXT,{execute:(y,A)=>{this.contextKeyService.createKey(String(y),A)}}),b.registerCommand(h.RELOAD_WINDOW_COMMAND,{execute:()=>{this.clientApp.fireOnReload()}}),b.registerCommand(s.EMIT_EXT_HOST_EVENT,{execute:async(y,...A)=>{await this.activationEventService.fireEvent("onEvent:"+y);const S=await this.eventBus.fireAndAwait(new l.ExtHostEvent({eventName:y,eventArgs:A})),w=[];return S.forEach(T=>{T.err?w.push(T):w.push(...T.result||[])}),w}}),b.registerCommand(h.SHOW_RUN_TIME_EXTENSION,{execute:async()=>{const y=await this.extensionService.getActivatedExtensions();this.quickOpenService.open({onType:(A,S)=>S(this.asQuickOpenItems(y))},{placeholder:"\u8FD0\u884C\u4E2D\u7684\u63D2\u4EF6",fuzzyMatchLabel:{enableSeparateSubstringMatching:!0}})}}),b.registerCommand(h.START_EXTENSION_HOST_PROFILER,{execute:async()=>{this.cpuProfileStatus||(this.cpuProfileStatus=this.statusBar.addElement("ExtensionHostProfile",{tooltip:(0,o.formatLocalize)("extension.profiling.clickStop","Click to stop profiling."),text:`$(sync~spin) ${(0,o.formatLocalize)("extension.profilingExtensionHost","Profiling Extension Host")}`,alignment:c.StatusBarAlignment.RIGHT,command:h.STOP_EXTENSION_HOST_PROFILER.id})),await this.extensionProfiler.$startProfile(this.clientId)},isPermitted:()=>!1}),b.registerCommand(h.STOP_EXTENSION_HOST_PROFILER,{execute:async()=>{const y=await this.extensionProfiler.$stopProfile(this.clientId);if(this.cpuProfileStatus&&(this.cpuProfileStatus.dispose(),this.cpuProfileStatus=null),y){const A=await this.dialogService.showSaveDialog({saveLabel:(0,o.formatLocalize)("extension.profile.save","Save Extension Host Profile"),showNameInput:!0,defaultFileName:`CPU-${new Date().toISOString().replace(/[\-:]/g,"")}.cpuprofile`});A?.codeUri&&await this.extensionProfiler.$saveLastProfile(A?.codeUri.fsPath)}},isPermitted:()=>!1}),b.registerCommand(h.COPY_FILE_PATH,{execute:async y=>{await this.commandService.executeCommand(o.FILE_COMMANDS.COPY_PATH.id,o.URI.from(y))}}),b.registerCommand(h.COPY_RELATIVE_FILE_PATH,{execute:async y=>{await this.commandService.executeCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,o.URI.from(y))}}),b.registerCommand(h.OPEN,{execute:(y,A,S)=>{const w=o.URI.from(y);return this.doOpenWith(w,A,S,void 0)}}),b.registerCommand(h.OPEN_WITH,{execute:(y,A,S)=>{const w=o.URI.from(y),T=A==="default"?void 0:{type:v.EditorOpenType.component,componentId:`${o.CUSTOM_EDITOR_SCHEME}-${A}`};return this.doOpenWith(w,S,void 0,T)}}),b.registerCommand(h.DIFF,{execute:(y,A,S,w)=>{const T={...(0,g.viewColumnToResourceOpenOptions)(w?.viewColumn),revealFirstDiff:!0,...w};return this.commandService.executeCommand(o.EDITOR_COMMANDS.COMPARE.id,{original:o.URI.from(y),modified:o.URI.from(A),name:S},T)}}),b.registerCommand({id:h.WALKTHROUGHS_COMMAND_GET_STARTED.id,category:(0,o.localize)("walkthroughs.welcome"),label:(0,o.localize)("walkthroughs.get.started")},{execute:async y=>{const A=this.walkthroughsService.getWalkthroughs();if(y)this.walkthroughsService.openWalkthroughEditor(y);else{const S=await this.quickPickService.show(A.map(w=>({label:w.title,value:w.id,description:w.source,detail:w.description})));S&&this.walkthroughsService.openWalkthroughEditor(S)}}}),[h.LAYOUT_COMMAND_MAXIMIZE_EDITOR,h.WORKBENCH_CLOSE_ACTIVE_EDITOR,h.REVERT_AND_CLOSE_ACTIVE_EDITOR,h.SPLIT_EDITOR_RIGHT,h.SPLIT_EDITOR_DOWN,h.EDITOR_NAVIGATE_BACK,h.EDITOR_NAVIGATE_FORWARD,h.EDITOR_SAVE_ALL,h.CLOSE_ALL_EDITORS,h.PREVIOUS_EDITOR,h.PREVIOUS_EDITOR_IN_GROUP,h.NEXT_EDITOR,h.NEXT_EDITOR_IN_GROUP,h.EVEN_EDITOR_WIDTH,h.CLOSE_OTHER_GROUPS,h.CLOSE_UNMODIFIED_EDITORS,h.LAST_EDITOR_IN_GROUP,h.OPEN_EDITOR_AT_INDEX,h.CLOSE_OTHER_EDITORS,h.NEW_UNTITLED_FILE,h.FILE_SAVE,h.SPLIT_EDITOR,h.SPLIT_EDITOR_ORTHOGONAL,h.NAVIGATE_LEFT,h.NAVIGATE_RIGHT,h.NAVIGATE_UP,h.NAVIGATE_DOWN,h.NAVIGATE_NEXT,h.REVERT_FILES,h.WORKBENCH_FOCUS_FILES_EXPLORER,h.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP,h.API_OPEN_EDITOR_COMMAND_ID,h.API_OPEN_DIFF_EDITOR_COMMAND_ID,h.API_OPEN_WITH_EDITOR_COMMAND_ID,h.DEBUG_START,h.DEBUG_ADD,h.DEBUG_COMMAND_STEP_INTO,h.DEBUG_COMMAND_STEP_OVER,h.DEBUG_COMMAND_STEP_OUT,h.DEBUG_COMMAND_CONTINUE,h.DEBUG_COMMAND_RUN,h.DEBUG_COMMAND_START,h.DEBUG_COMMAND_PAUSE,h.DEBUG_COMMAND_RESTART,h.DEBUG_COMMAND_STOP,h.EDITOR_SHOW_ALL_SYMBOLS,h.SEARCH_COMMAND_OPEN_SEARCH,h.REVEAL_IN_EXPLORER,h.OPEN_FOLDER,h.SIDEBAR_TOGGLE_VISIBILITY,h.CLEAR_TERMINAL,h.TERMINAL_COMMAND_FOCUS,h.TERMINAL_COMMAND_TOGGLE_VISIBILITY,h.NEW_WORKBENCH_VIEW_TERMINAL,h.FILE_COMMAND_RENAME_FILE,h.MARKER_COMMAND_SHOW_ERRORS_WARNINGS,h.MARKER_COMMAND_TOGGLE_SHOW_ERRORS_WARNINGS,h.RELOAD_WINDOW,h.SETTINGS_COMMAND_OPEN_SETTINGS,h.SETTINGS_COMMAND_OPEN_GLOBAL_SETTINGS,h.SETTINGS_COMMAND_OPEN_SETTINGS_JSON,h.SETTINGS_COMMAND_OPEN_GLOBAL_OPEN_KEYMAPS,h.THEME_COMMAND_QUICK_SELECT,h.OPEN_MERGEEDITOR].forEach(y=>{b.registerCommand(y)})}doOpenWith(b,y,A,S){const[w,T]=y??[],D={};if(typeof w=="number"&&(D.groupIndex=w),T){if(D.focus=D.preserveFocus=T.preserveFocus,T.selection&&(0,g.isLikelyVscodeRange)(T.selection)&&(T.selection=(0,g.fromRange)(T.selection)),Array.isArray(T.selection)&&T.selection.length===2){const[I,O]=T.selection;D.range={startLineNumber:I.line+1,startColumn:I.character+1,endLineNumber:O.line+1,endColumn:O.character+1}}else D.range=T.selection;D.preview=T.preview}return S&&(D.forceOpenType=S),A&&(D.label=A),this.workbenchEditorService.open(b,D)}asQuickOpenItems(b){const y=b.node?b.node.map((S,w)=>this.toQuickOpenItem(S,"Node.js",w===0)):[],A=b.worker?b.worker.map((S,w)=>this.toQuickOpenItem(S,"Web Worker",w===0)):[];return[...y,...A]}toQuickOpenItem(b,y,A){const S=this.extensionInstanceManageService.getExtensionInstanceByExtId(b.id);return new o.QuickOpenItem({groupLabel:A?y:void 0,showBorder:!!A,label:(0,o.replaceLocalizePlaceholder)(b.displayName,b.id),description:(0,o.replaceLocalizePlaceholder)(b.description,b.id),detail:S?.realPath})}get clientId(){return(0,t.getClientId)(this.injector)}};t.ExtensionCommandContribution=f,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],f.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.IActivationEventService),n.__metadata("design:type",l.IActivationEventService)],f.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],f.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.QuickPickService),n.__metadata("design:type",Object)],f.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionHostProfilerServicePath),n.__metadata("design:type",Object)],f.prototype,"extensionProfiler",void 0),n.__decorate([(0,r.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],f.prototype,"statusBar",void 0),n.__decorate([(0,r.Autowired)(m.IWindowDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],f.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],f.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IWebviewService),n.__metadata("design:type",Object)],f.prototype,"webviewService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionService),n.__metadata("design:type",s.ExtensionService)],f.prototype,"extensionService",void 0),n.__decorate([(0,r.Autowired)(l.AbstractExtInstanceManagementService),n.__metadata("design:type",l.AbstractExtInstanceManagementService)],f.prototype,"extensionInstanceManageService",void 0),n.__decorate([(0,r.Autowired)(u.WalkthroughsService),n.__metadata("design:type",u.WalkthroughsService)],f.prototype,"walkthroughsService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),t.ExtensionCommandContribution=f=n.__decorate([(0,o.Domain)(o.CommandContribution)],f)},42734:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(40827),p=e(69734),v=e(99220),m=e(9663),_=e(71354),s=Symbol.for("metaDataSymbol");let g=class extends o.WithEventBus{constructor(h,u,d,E){super(),this.extensionData=h,this.isUseEnable=u,this.isBuiltin=d,this.isDevelopment=E,this.extraMetadata={},this._activated=!1,this.logger=(0,o.getDebugLogger)(),this.pkgLocalizedField=new Map,this._enabled=u,this.packageJSON=this.extensionData.packageJSON,this.defaultPkgNlsJSON=this.extensionData.defaultPkgNlsJSON,this.packageNlsJSON=this.extensionData.packageNlsJSON,this.id=this.extensionData.id,this.extensionId=this.extensionData.extensionId,this.name=this.packageJSON.name,this.extraMetadata=this.extensionData.extraMetadata,this.path=this.extensionData.path,this.uri=this.extensionData.uri,this.realPath=this.extensionData.realPath,this.extendConfig=this.extensionData.extendConfig||{},this.enableProposedApi=!!this.extensionData.packageJSON.enableProposedApi,this.extensionLocation=this.staticResourceService.resolveStaticResource(o.URI.from(this.uri)).codeUri,this.initialize()}localize(h){if(!this.pkgLocalizedField.get(h)){const u=(0,o.replaceNlsField)(this.packageJSON[h],this.id);return this.pkgLocalizedField.set(h,u),u||this.packageJSON[h]}return this.pkgLocalizedField.get(h)}get activated(){return this._activated}get enabled(){return this._enabled}set enabled(h){this._enabled=h}get icon(){return this.packageJSON.icon&&this.uri&&this.extensionLocation.toString()+`/${this.packageJSON.icon}`}async getDefaultIcon(){return await this.extensionNodeClient.getOpenVSXRegistry()+"/default-icon.png"}disable(){this._enabled&&(this.extMetadataService.dispose(),this._enabled=!1,super.dispose())}enable(){this._enabled||(this._enabled=!0)}initialize(){this._enabled&&(this.addDispose(this.extMetadataService),this.packageNlsJSON&&(0,o.registerLocalizationBundle)({...(0,o.getCurrentLanguageInfo)(),contents:this.packageNlsJSON},this.id),this.defaultPkgNlsJSON&&(0,o.registerLocalizationBundle)({languageId:"default",languageName:p.LOCALE_TYPES.EN_US,localizedLanguageName:"English",contents:this.defaultPkgNlsJSON},this.id),this.extMetadataService.initialize(this))}async activate(h=new Set){var u;const d=((u=this.packageJSON)===null||u===void 0?void 0:u.extensionDependencies)||[];h.add(this.extensionId);for(const f of d){const a=typeof f=="string"?f:Object.keys(f)[0];if(h.has(a))continue;const b=this.extensionInstanceManageService.getExtensionInstanceByExtId(a);b&&await b.activate(h)}if(this._activated)return;const E=await this.eventBus.fireAndAwait(new _.ExtensionWillActivateEvent(this));return E.length>0&&E[0].result?(this._activated=!0,Promise.resolve()):this._activating?this._activating.promise:(this._activating=new o.Deferred,this.extensionService.activeExtension(this).then(()=>{var f;this._activated=!0,this.eventBus.fire(new _.ExtensionDidActivatedEvent(this.toJSON())),(f=this._activating)===null||f===void 0||f.resolve()}).catch(f=>{var a;this.logger.error(f),this._activated=!1,(a=this._activating)===null||a===void 0||a.reject(f)}),this._activating.promise)}get contributes(){return this.packageJSON.contributes}reset(){this._activated=!1,this._activating=void 0}get displayName(){return this.localize("displayName")}toJSON(){return{id:this.id,extensionId:this.extensionId,name:this.name,displayName:this.displayName,activated:this.activated,enabled:this.enabled,packageJSON:this.packageJSON,defaultPkgNlsJSON:this.defaultPkgNlsJSON,packageNlsJSON:this.packageNlsJSON,path:this.path,realPath:this.realPath,isUseEnable:this.isUseEnable,extendConfig:this.extendConfig,enableProposedApi:this.enableProposedApi,extraMetadata:this.extraMetadata,isBuiltin:this.isBuiltin,isDevelopment:this.isDevelopment,extensionLocation:this.extensionLocation}}};t.Extension=g,n.__decorate([(0,r.Autowired)(m.ExtensionMetadataService),n.__metadata("design:type",m.ExtensionMetadataService)],g.prototype,"extMetadataService",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionService),n.__metadata("design:type",v.ExtensionService)],g.prototype,"extensionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",c.StaticResourceService)],g.prototype,"staticResourceService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],g.prototype,"extensionInstanceManageService",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],g.prototype,"extensionNodeClient",void 0),t.Extension=g=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(s)),n.__param(1,(0,r.Optional)(Symbol())),n.__param(2,(0,r.Optional)(Symbol())),n.__param(3,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object,Boolean,Boolean,Boolean])],g)},87543:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionServiceImpl=void 0;const r=e(85608),o=r.__importDefault(e(12784)),c=e(76003),p=e(18740),v=e(76271),m=e(41869),_=e(68969),s=e(43718),g=e(66482),l=e(50492),h=e(84660),u=e(14951),d=e(72665),E=e(51500),f=e(99220),a=e(25600),b=e(46147),y=e(57962),A=e(82389),S=e(71354),w=e(35321);let T=n=class extends s.WithEventBus{constructor(){super(),this.ready=new Map,this.isExtProcessRestarting=!1,this.isProgressShowing=!1,this.eagerExtensionsActivated=new m.Deferred,this.extensionScanDir=new Set,this.extensionCandidatePath=new Set,this.restartProgress=async(I=f.ERestartPolicy.Always)=>{const O=async R=>{this.disposeAllOverlayWindow(),R.onCancellationRequested(()=>{this.logger.log("[ext-restart]: ext process restart canceled"),this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=void 0,this.isProgressShowing=!1});try{await this.startExtProcess(!1)}catch(P){this.logger.error(`[ext-restart]: ext-host restart failure, error: ${P}`)}this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=void 0,this.isProgressShowing=!1,this.disposeAllOverlayWindow()};await this.channelHandler.awaitChannelReady(v.RPCServiceChannelPath);const M=this.isExtProcessWaitingForRestart||I;switch(this.logger.log("[ext-restart]: restart ext process, restart policy:",M),M){case f.ERestartPolicy.WhenExit:if(await this.getExtProcessPID()){this.logger.log("[ext-restart]: ext process is still running, skip");break}case f.ERestartPolicy.Always:if(this.isProgressShowing){this.logger.log("[ext-restart]: progress is already showing, skip");return}this.isProgressShowing=!0,await this.progressService.withProgress({location:s.ProgressLocation.Notification,title:(0,s.localize)("extension.exthostRestarting.content"),buttons:[{id:"extension.reload",label:(0,s.localize)("preference.general.language.change.refresh.now"),primary:!0,run:async()=>{this.clientApp.fireOnReload()},dispose:()=>{}}]},async()=>{this.extProcessRestartPromise=(0,s.createCancelablePromise)(O),await this.extProcessRestartPromise});break}this.isExtProcessRestarting=!1},this.restartDebounced=(0,o.default)(async()=>{await this.restartProgress()},500),this.addDispose(this.fileServiceClient.onWillActivateFileSystemProvider(async()=>(this.extensionMetaDataArr||await this.initExtensionMetaData(),this.activationEventService.getTopicsData("onFileSystem"))))}async getActivatedExtensions(){const I={};return this.nodeExtensionService.protocol&&(I.node=await this.nodeExtensionService.getActivatedExtensions()),this.workerExtensionService.protocol&&(I.worker=await this.workerExtensionService.getActivatedExtensions()),I}async onActivateExtension(I){await this.activationEventService.fireEvent(I.payload.topic,I.payload.data)}async onExtensionEnabled(I){const O=I.payload;await this.updateExtHostData(),await this.fireActivationEventsIfNeed(O.packageJSON.activationEvents)}async onExtensionUninstalled(){await this.updateExtHostData()}async activate(){await this.initExtensionMetaData(),await this.initExtensionInstanceData(),await this.runEagerExtensionsContributes(),await this.setupExtensionNLSConfig(),this.doActivate();const I=()=>{this.logger.log("[ext-restart]: page visibility change, current:",document.visibilityState,"is waiting:",this.isExtProcessWaitingForRestart,"is restarting:",this.isExtProcessRestarting),document.visibilityState==="visible"&&this.isExtProcessWaitingForRestart&&!this.isExtProcessRestarting&&this.extProcessRestartHandler(this.isExtProcessWaitingForRestart)};document.addEventListener("visibilitychange",I,!1),this.addDispose(m.Disposable.create(()=>{document.removeEventListener("visibilitychange",I)}))}async setupExtensionNLSConfig(){const I=await this.extensionStoragePathServer.getLastStoragePath()||"",O=this.preferenceService.get(s.GeneralSettingsId.Language)||(0,s.getLanguageId)();await this.extensionNodeClient.setupNLSConfig(O,I)}async initExtensionMetaData(){const{extensionDir:I,extensionCandidate:O}=this.appConfig;I&&this.extensionScanDir.add(I),O&&O.forEach(M=>{this.extensionCandidatePath.add(M.path)}),await this.getExtensionsMetaData(Array.from(this.extensionScanDir),Array.from(this.extensionCandidatePath))}async initExtensionInstanceData(){for(const O of this.extensionMetaDataArr){const M=this.extensionInstanceManageService.checkIsBuiltin(O),R=this.extensionInstanceManageService.checkIsDevelopment(O),P=await this.extensionInstanceManageService.createExtensionInstance(O,M,R);P&&this.extensionInstanceManageService.addExtensionInstance(P),P?.contributes&&P.enabled&&(this.contributesService.register(P.id,P.contributes),this.sumiContributesService.register(P.id,P.packageJSON.sumiContributes||{}))}this.eventBus.fire(new S.ExtensionsInitializedEvent(this.extensionInstanceManageService.getExtensionInstances())),this.eventBus.fire(new g.DebugConfigurationsReadyEvent(void 0));const I=this.extensionInstanceManageService.getExtensionInstances();this.nodeExtensionService.updateExtensionData(I),this.workerExtensionService.updateExtensionData(I),this.viewExtensionService.initExtension(I)}async doActivate(){await this.workspaceService.whenReady,await this.extensionStorageService.whenReady,await this.viewExtensionService.activate(),await this.startExtProcess(!0);try{await this.eventBus.fireAndAwait(new S.ExtensionBeforeActivateEvent),await this.activationEventService.fireEvent("*")}catch(I){this.logger.error(`[Extension Activate Error],
31549
+ //# sourceURL=${T.id}`)(M,R,P,k,L,B),{moduleExports:D?M.exports.default:M.exports,proxiedHead:F}}};t.ViewExtProcessService=A,A.tabBarLocation=["left","right"],r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],A.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(_.ILogger),r.__metadata("design:type",Object)],A.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(v.AppConfig),r.__metadata("design:type",Object)],A.prototype,"appConfig",void 0),r.__decorate([(0,o.Autowired)(v.IToolbarPopoverRegistry),r.__metadata("design:type",Object)],A.prototype,"toolbarPopoverRegistry",void 0),r.__decorate([(0,o.Autowired)(l.AbstractWorkerExtProcessService),r.__metadata("design:type",l.AbstractWorkerExtProcessService)],A.prototype,"workerExtensionService",void 0),r.__decorate([(0,o.Autowired)(l.AbstractNodeExtProcessService),r.__metadata("design:type",l.AbstractNodeExtProcessService)],A.prototype,"nodeExtensionService",void 0),r.__decorate([(0,o.Autowired)(),r.__metadata("design:type",m.StaticResourceService)],A.prototype,"staticResourceService",void 0),r.__decorate([(0,o.Autowired)(g.RequireInterceptorContribution),r.__metadata("design:type",Object)],A.prototype,"requireInterceptorContributionProvider",void 0),r.__decorate([(0,o.Autowired)(g.IRequireInterceptorService),r.__metadata("design:type",Object)],A.prototype,"requireInterceptorService",void 0),r.__decorate([(0,o.Autowired)(_.IReporterService),r.__metadata("design:type",Object)],A.prototype,"reporterService",void 0),r.__decorate([(0,o.Autowired)(s.SCMService),r.__metadata("design:type",s.SCMService)],A.prototype,"scmService",void 0),t.ViewExtProcessService=A=n=r.__decorate([(0,o.Injectable)()],A)},98736:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerExtProcessService=void 0;const n=e(85608),r=e(76003),o=e(84605),c=e(8919),p=e(92917),v=e(41869),m=e(43718),_=e(99220),s=e(37846),g=e(30824),l=e(28949),h=e(51072),u=e(17802),d=e(65055),{posix:E}=m.path;let f=class extends m.Disposable{constructor(){super(...arguments),this.ready=new v.Deferred,this._extHostUpdated=new v.Deferred,this.extensions=[],this.apiFactoryDisposable=new m.DisposableStore}disposeApiFactory(){var b,y;this.apiFactoryDisposable.clear(),this.protocol&&((y=(b=this.protocol).dispose)===null||y===void 0||y.call(b)),this.connection&&this.connection.dispose()}disposeProcess(){this.disposeApiFactory()}async activate(b){if(this.protocol=await this.createExtProcess(b),this.protocol){this.ready.resolve(),this.logger.log("[Worker Host] init worker thread api proxy");const y=(0,u.initSharedAPIProxy)(this.protocol,this.injector);this.apiFactoryDisposable.add(y),this.apiFactoryDisposable.add((0,m.toDisposable)((0,h.initWorkerThreadAPIProxy)(this.protocol,this.injector,this))),this.apiFactoryDisposable.add((0,m.toDisposable)((0,l.createSumiAPIFactory)(this.protocol,this.injector))),await y.setup(),await this.getProxy().$updateExtHostData(),this._extHostUpdated.resolve()}return this.protocol}async activeExtension(b,y){var A,S;const{extendConfig:w,packageJSON:T,id:D}=b;if(!((A=w?.worker)===null||A===void 0)&&A.main){(0,o.warning)(!1,`[Deprecated warning]: ${D}: kaitian.js is deprecated, please use \`package.json#sumiContributes\` instead`),await this.doActivateExtension(b);return}(T.sumiContributes&&(!((S=b.contributes)===null||S===void 0)&&S.workerMain)||y&&T.browser)&&await this.doActivateExtension(b)}async doActivateExtension(b){this.appConfig.extWorkerHost&&(await this._extHostUpdated.promise,await this.getProxy().$activateExtension(b.id))}async updateExtensionData(b){this.extensions=b,this.protocol&&this.getProxy().$updateExtHostData()}getExtension(b){return this.extensions.find(y=>y.id===b)}async $activateExtension(b){const y=this.extensions.find(A=>A.workerScriptPath===b);y&&await y.activate()}async $getExtensions(){return this.extensions.map(b=>b.contributes&&b.contributes.workerMain?this.getWorkerExtensionProps(b,b.contributes.workerMain):b.packageJSON.browser?this.getWorkerExtensionProps(b,b.packageJSON.browser):b.extendConfig&&b.extendConfig.worker&&b.extendConfig.worker.main?this.getWorkerExtensionProps(b,b.extendConfig.worker.main):b.toJSON())}async $getStaticServicePath(){return this.appConfig.staticServicePath||`http://${window.location.hostname}:8000`}async createExtProcess(b){const y=(0,g.getWorkerBootstrapUrl)(this.appConfig.extWorkerHost,"ExtensionWorkerHost",b);return await this.initWorkerProtocol(y)}async initWorkerProtocol(b){return this.logger.log("[Worker Host] init web worker extension host"),new Promise((y,A)=>{const S=new v.Deferred;if(this.appConfig.useIframeWrapWorkerHost){const{iframe:w,extHostUuid:T}=(0,d.startInsideIframe)(b),D=I=>{if(I.source===w.contentWindow&&I.data.kaitianWebWorkerExtHostId===T&&I.data.data instanceof MessagePort){S.resolve(I.data.data);return}};window.addEventListener("message",D),this.apiFactoryDisposable.add({dispose:()=>{window.removeEventListener("message",D),w.remove()}}),S.promise.then(I=>{y(this.createProtocol(I))})}else try{const w=new Worker(b,{name:"KaitianWorkerExtensionHost"});w.onmessage=T=>{T.data instanceof MessagePort&&S.resolve(T.data)},w.onerror=T=>{A(T)},this.apiFactoryDisposable.add({dispose:()=>{w.terminate(),w.onmessage=null,w.onerror=null}}),S.promise.then(T=>{y(this.createProtocol(T))})}catch(w){A(w)}})}createProtocol(b){this.connection=new p.MessagePortConnection(b);const y=new c.SumiConnectionMultiplexer(this.connection,{timeout:this.appConfig.rpcMessageTimeout,name:"worker-ext-host",io:(0,c.createExtMessageIO)(s.knownProtocols)});return this.logger.log("[Worker Host] web worker extension host ready"),y}getActivatedExtensions(){return this.getProxy().$getActivatedExtensions()}getProxy(){return this.protocol.getProxy(_.WorkerHostAPIIdentifier.ExtWorkerHostExtensionService)}getWorkerExtensionProps(b,y){let A=y;A.endsWith(".js")||(A+=".js");const S=new v.URI(b.extensionLocation.with({path:E.join(b.extensionLocation.path,A)})).toString();return Object.assign({},b.toJSON(),{workerScriptPath:S})}getSpawnOptions(){return{}}dispose(){super.dispose(),this.disposeApiFactory()}};t.WorkerExtProcessService=f,n.__decorate([(0,r.Autowired)(v.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),t.WorkerExtProcessService=f=n.__decorate([(0,r.Injectable)()],f)},62040:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionCommandContribution=t.ExtensionClientAppContribution=t.getClientId=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(29220),p=e(54414),v=e(55113),m=e(72665),_=e(65046),s=e(99220),g=e(53043),l=e(71354),h=n.__importStar(e(72980)),u=e(17441),d=a=>a.get(o.IApplicationService).clientId;t.getClientId=d;let E=class{initialize(){this.extensionService.activate().then(()=>{const b=this.webviewService.registerWebviewReviver({handles:()=>0,revive:async y=>new Promise(A=>{this.eventBus.on(l.ExtensionApiReadyEvent,()=>{b.dispose(),A(this.webviewService.tryReviveWebviewComponent(y))})})})})}async onStart(){(0,o.runWhenIdle)(()=>{this.extensionService.runExtensionContributes()}),this.preferenceSettingsService.registerSettingGroup({id:"extension",title:(0,o.localize)("settings.group.extension"),iconClass:(0,o.getIcon)("extension")})}onDisposeSideEffects(){this.extensionNodeClient.disposeClientExtProcess(this.clientId,!1)}onReconnect(){this.extensionService.restartExtProcess(s.ERestartPolicy.WhenExit)}get clientId(){return(0,t.getClientId)(this.injector)}};t.ExtensionClientAppContribution=E,n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],E.prototype,"preferenceSettingsService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],E.prototype,"extensionNodeClient",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],E.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],E.prototype,"statusBar",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],E.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(_.IWebviewService),n.__metadata("design:type",Object)],E.prototype,"webviewService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionService),n.__metadata("design:type",s.ExtensionService)],E.prototype,"extensionService",void 0),t.ExtensionClientAppContribution=E=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],E);let f=class{registerCommands(b){b.registerCommand({id:"ext.restart",label:"%extension.host.restart%"},{execute:async()=>{this.logger.log("start restart ext host process"),await this.extensionService.restartExtProcess(),this.logger.log("end restart ext host process")}}),b.registerCommand(h.GET_EXTENSION,{execute:async y=>{const A=this.extensionInstanceManageService.getExtensionInstanceByExtId(y);return A&&A.toJSON()}}),this.registerVSCBuiltinCommands(b)}registerVSCBuiltinCommands(b){b.registerCommand(h.SET_CONTEXT,{execute:(y,A)=>{this.contextKeyService.createKey(String(y),A)}}),b.registerCommand(h.RELOAD_WINDOW_COMMAND,{execute:()=>{this.clientApp.fireOnReload()}}),b.registerCommand(s.EMIT_EXT_HOST_EVENT,{execute:async(y,...A)=>{await this.activationEventService.fireEvent("onEvent:"+y);const S=await this.eventBus.fireAndAwait(new l.ExtHostEvent({eventName:y,eventArgs:A})),w=[];return S.forEach(T=>{T.err?w.push(T):w.push(...T.result||[])}),w}}),b.registerCommand(h.SHOW_RUN_TIME_EXTENSION,{execute:async()=>{const y=await this.extensionService.getActivatedExtensions();this.quickOpenService.open({onType:(A,S)=>S(this.asQuickOpenItems(y))},{placeholder:"\u8FD0\u884C\u4E2D\u7684\u63D2\u4EF6",fuzzyMatchLabel:{enableSeparateSubstringMatching:!0}})}}),b.registerCommand(h.START_EXTENSION_HOST_PROFILER,{execute:async()=>{this.cpuProfileStatus||(this.cpuProfileStatus=this.statusBar.addElement("ExtensionHostProfile",{tooltip:(0,o.formatLocalize)("extension.profiling.clickStop","Click to stop profiling."),text:`$(sync~spin) ${(0,o.formatLocalize)("extension.profilingExtensionHost","Profiling Extension Host")}`,alignment:c.StatusBarAlignment.RIGHT,command:h.STOP_EXTENSION_HOST_PROFILER.id})),await this.extensionProfiler.$startProfile(this.clientId)},isPermitted:()=>!1}),b.registerCommand(h.STOP_EXTENSION_HOST_PROFILER,{execute:async()=>{const y=await this.extensionProfiler.$stopProfile(this.clientId);if(this.cpuProfileStatus&&(this.cpuProfileStatus.dispose(),this.cpuProfileStatus=null),y){const A=await this.dialogService.showSaveDialog({saveLabel:(0,o.formatLocalize)("extension.profile.save","Save Extension Host Profile"),showNameInput:!0,defaultFileName:`CPU-${new Date().toISOString().replace(/[\-:]/g,"")}.cpuprofile`});A?.codeUri&&await this.extensionProfiler.$saveLastProfile(A?.codeUri.fsPath)}},isPermitted:()=>!1}),b.registerCommand(h.COPY_FILE_PATH,{execute:async y=>{await this.commandService.executeCommand(o.FILE_COMMANDS.COPY_PATH.id,o.URI.from(y))}}),b.registerCommand(h.COPY_RELATIVE_FILE_PATH,{execute:async y=>{await this.commandService.executeCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,o.URI.from(y))}}),b.registerCommand(h.OPEN,{execute:(y,A,S)=>{const w=o.URI.from(y);return this.doOpenWith(w,A,S,void 0)}}),b.registerCommand(h.OPEN_WITH,{execute:(y,A,S)=>{const w=o.URI.from(y),T=A==="default"?void 0:{type:v.EditorOpenType.component,componentId:`${o.CUSTOM_EDITOR_SCHEME}-${A}`};return this.doOpenWith(w,S,void 0,T)}}),b.registerCommand(h.DIFF,{execute:(y,A,S,w)=>{const T={...(0,g.viewColumnToResourceOpenOptions)(w?.viewColumn),revealFirstDiff:!0,...w};return this.commandService.executeCommand(o.EDITOR_COMMANDS.COMPARE.id,{original:o.URI.from(y),modified:o.URI.from(A),name:S},T)}}),b.registerCommand({id:h.WALKTHROUGHS_COMMAND_GET_STARTED.id,category:(0,o.localize)("walkthroughs.welcome"),label:(0,o.localize)("walkthroughs.get.started")},{execute:async y=>{const A=this.walkthroughsService.getWalkthroughs();if(y)this.walkthroughsService.openWalkthroughEditor(y);else{const S=await this.quickPickService.show(A.map(w=>({label:w.title,value:w.id,description:w.source,detail:w.description})));S&&this.walkthroughsService.openWalkthroughEditor(S)}}}),[h.LAYOUT_COMMAND_MAXIMIZE_EDITOR,h.WORKBENCH_CLOSE_ACTIVE_EDITOR,h.REVERT_AND_CLOSE_ACTIVE_EDITOR,h.SPLIT_EDITOR_RIGHT,h.SPLIT_EDITOR_DOWN,h.EDITOR_NAVIGATE_BACK,h.EDITOR_NAVIGATE_FORWARD,h.EDITOR_SAVE_ALL,h.CLOSE_ALL_EDITORS,h.PREVIOUS_EDITOR,h.PREVIOUS_EDITOR_IN_GROUP,h.NEXT_EDITOR,h.NEXT_EDITOR_IN_GROUP,h.EVEN_EDITOR_WIDTH,h.CLOSE_OTHER_GROUPS,h.CLOSE_UNMODIFIED_EDITORS,h.LAST_EDITOR_IN_GROUP,h.OPEN_EDITOR_AT_INDEX,h.CLOSE_OTHER_EDITORS,h.NEW_UNTITLED_FILE,h.FILE_SAVE,h.SPLIT_EDITOR,h.SPLIT_EDITOR_ORTHOGONAL,h.NAVIGATE_LEFT,h.NAVIGATE_RIGHT,h.NAVIGATE_UP,h.NAVIGATE_DOWN,h.NAVIGATE_NEXT,h.REVERT_FILES,h.WORKBENCH_FOCUS_FILES_EXPLORER,h.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP,h.API_OPEN_EDITOR_COMMAND_ID,h.API_OPEN_DIFF_EDITOR_COMMAND_ID,h.API_OPEN_WITH_EDITOR_COMMAND_ID,h.DEBUG_START,h.DEBUG_ADD,h.DEBUG_COMMAND_STEP_INTO,h.DEBUG_COMMAND_STEP_OVER,h.DEBUG_COMMAND_STEP_OUT,h.DEBUG_COMMAND_CONTINUE,h.DEBUG_COMMAND_RUN,h.DEBUG_COMMAND_START,h.DEBUG_COMMAND_PAUSE,h.DEBUG_COMMAND_RESTART,h.DEBUG_COMMAND_STOP,h.EDITOR_SHOW_ALL_SYMBOLS,h.SEARCH_COMMAND_OPEN_SEARCH,h.REVEAL_IN_EXPLORER,h.OPEN_FOLDER,h.SIDEBAR_TOGGLE_VISIBILITY,h.CLEAR_TERMINAL,h.TERMINAL_COMMAND_FOCUS,h.TERMINAL_COMMAND_TOGGLE_VISIBILITY,h.NEW_WORKBENCH_VIEW_TERMINAL,h.FILE_COMMAND_RENAME_FILE,h.MARKER_COMMAND_SHOW_ERRORS_WARNINGS,h.MARKER_COMMAND_TOGGLE_SHOW_ERRORS_WARNINGS,h.RELOAD_WINDOW,h.SETTINGS_COMMAND_OPEN_SETTINGS,h.SETTINGS_COMMAND_OPEN_GLOBAL_SETTINGS,h.SETTINGS_COMMAND_OPEN_SETTINGS_JSON,h.SETTINGS_COMMAND_OPEN_GLOBAL_OPEN_KEYMAPS,h.THEME_COMMAND_QUICK_SELECT,h.OPEN_MERGEEDITOR].forEach(y=>{b.registerCommand(y)})}doOpenWith(b,y,A,S){const[w,T]=y??[],D={};if(typeof w=="number"&&(D.groupIndex=w),T){if(D.focus=D.preserveFocus=T.preserveFocus,T.selection&&(0,g.isLikelyVscodeRange)(T.selection)&&(T.selection=(0,g.fromRange)(T.selection)),Array.isArray(T.selection)&&T.selection.length===2){const[I,O]=T.selection;D.range={startLineNumber:I.line+1,startColumn:I.character+1,endLineNumber:O.line+1,endColumn:O.character+1}}else D.range=T.selection;D.preview=T.preview}return S&&(D.forceOpenType=S),A&&(D.label=A),this.workbenchEditorService.open(b,D)}asQuickOpenItems(b){const y=b.node?b.node.map((S,w)=>this.toQuickOpenItem(S,"Node.js",w===0)):[],A=b.worker?b.worker.map((S,w)=>this.toQuickOpenItem(S,"Web Worker",w===0)):[];return[...y,...A]}toQuickOpenItem(b,y,A){const S=this.extensionInstanceManageService.getExtensionInstanceByExtId(b.id);return new o.QuickOpenItem({groupLabel:A?y:void 0,showBorder:!!A,label:(0,o.replaceLocalizePlaceholder)(b.displayName,b.id),description:(0,o.replaceLocalizePlaceholder)(b.description,b.id),detail:S?.realPath})}get clientId(){return(0,t.getClientId)(this.injector)}};t.ExtensionCommandContribution=f,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],f.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(l.IActivationEventService),n.__metadata("design:type",l.IActivationEventService)],f.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],f.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(o.QuickPickService),n.__metadata("design:type",Object)],f.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionHostProfilerServicePath),n.__metadata("design:type",Object)],f.prototype,"extensionProfiler",void 0),n.__decorate([(0,r.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],f.prototype,"statusBar",void 0),n.__decorate([(0,r.Autowired)(m.IWindowDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClientApp),n.__metadata("design:type",Object)],f.prototype,"clientApp",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],f.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],f.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IWebviewService),n.__metadata("design:type",Object)],f.prototype,"webviewService",void 0),n.__decorate([(0,r.Autowired)(s.ExtensionService),n.__metadata("design:type",s.ExtensionService)],f.prototype,"extensionService",void 0),n.__decorate([(0,r.Autowired)(l.AbstractExtInstanceManagementService),n.__metadata("design:type",l.AbstractExtInstanceManagementService)],f.prototype,"extensionInstanceManageService",void 0),n.__decorate([(0,r.Autowired)(u.WalkthroughsService),n.__metadata("design:type",u.WalkthroughsService)],f.prototype,"walkthroughsService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),t.ExtensionCommandContribution=f=n.__decorate([(0,o.Domain)(o.CommandContribution)],f)},42734:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extension=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(40827),p=e(69734),v=e(99220),m=e(9663),_=e(71354),s=Symbol.for("metaDataSymbol");let g=class extends o.WithEventBus{constructor(h,u,d,E){super(),this.extensionData=h,this.isUseEnable=u,this.isBuiltin=d,this.isDevelopment=E,this.extraMetadata={},this._activated=!1,this.logger=(0,o.getDebugLogger)(),this.pkgLocalizedField=new Map,this._enabled=u,this.packageJSON=this.extensionData.packageJSON,this.defaultPkgNlsJSON=this.extensionData.defaultPkgNlsJSON,this.packageNlsJSON=this.extensionData.packageNlsJSON,this.id=this.extensionData.id,this.extensionId=this.extensionData.extensionId,this.name=this.packageJSON.name,this.extraMetadata=this.extensionData.extraMetadata,this.path=this.extensionData.path,this.uri=this.extensionData.uri,this.realPath=this.extensionData.realPath,this.extendConfig=this.extensionData.extendConfig||{},this.enableProposedApi=!!this.extensionData.packageJSON.enableProposedApi,this.extensionLocation=this.staticResourceService.resolveStaticResource(o.URI.from(this.uri)).codeUri,this.initialize()}localize(h){if(!this.pkgLocalizedField.get(h)){const u=(0,o.replaceNlsField)(this.packageJSON[h],this.id);return this.pkgLocalizedField.set(h,u),u||this.packageJSON[h]}return this.pkgLocalizedField.get(h)}get activated(){return this._activated}get enabled(){return this._enabled}set enabled(h){this._enabled=h}get icon(){return this.packageJSON.icon&&this.uri&&this.extensionLocation.toString()+`/${this.packageJSON.icon}`}async getDefaultIcon(){return await this.extensionNodeClient.getOpenVSXRegistry()+"/default-icon.png"}disable(){this._enabled&&(this.extMetadataService.dispose(),this._enabled=!1,super.dispose())}enable(){this._enabled||(this._enabled=!0)}initialize(){this._enabled&&(this.addDispose(this.extMetadataService),this.packageNlsJSON&&(0,o.registerLocalizationBundle)({...(0,o.getCurrentLanguageInfo)(),contents:this.packageNlsJSON},this.id),this.defaultPkgNlsJSON&&(0,o.registerLocalizationBundle)({languageId:"default",languageName:p.LOCALE_TYPES.EN_US,localizedLanguageName:"English",contents:this.defaultPkgNlsJSON},this.id),this.extMetadataService.initialize(this))}async activate(h=new Set){var u;const d=((u=this.packageJSON)===null||u===void 0?void 0:u.extensionDependencies)||[];h.add(this.extensionId);for(const f of d){const a=typeof f=="string"?f:Object.keys(f)[0];if(h.has(a))continue;const b=this.extensionInstanceManageService.getExtensionInstanceByExtId(a);b&&await b.activate(h)}if(this._activated)return;const E=await this.eventBus.fireAndAwait(new _.ExtensionWillActivateEvent(this));return E.length>0&&E[0].result?(this._activated=!0,Promise.resolve()):this._activating?this._activating.promise:(this._activating=new o.Deferred,this.extensionService.activeExtension(this).then(()=>{var f;this._activated=!0,this.eventBus.fire(new _.ExtensionDidActivatedEvent(this.toJSON())),(f=this._activating)===null||f===void 0||f.resolve()}).catch(f=>{var a;this.logger.error(f),this._activated=!1,(a=this._activating)===null||a===void 0||a.reject(f)}),this._activating.promise)}get contributes(){return this.packageJSON.contributes}reset(){this._activated=!1,this._activating=void 0}get displayName(){return this.localize("displayName")}toJSON(){return{id:this.id,extensionId:this.extensionId,name:this.name,displayName:this.displayName,activated:this.activated,enabled:this.enabled,packageJSON:this.packageJSON,defaultPkgNlsJSON:this.defaultPkgNlsJSON,packageNlsJSON:this.packageNlsJSON,path:this.path,realPath:this.realPath,isUseEnable:this.isUseEnable,extendConfig:this.extendConfig,enableProposedApi:this.enableProposedApi,extraMetadata:this.extraMetadata,isBuiltin:this.isBuiltin,isDevelopment:this.isDevelopment,extensionLocation:this.extensionLocation}}};t.Extension=g,n.__decorate([(0,r.Autowired)(m.ExtensionMetadataService),n.__metadata("design:type",m.ExtensionMetadataService)],g.prototype,"extMetadataService",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionService),n.__metadata("design:type",v.ExtensionService)],g.prototype,"extensionService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",c.StaticResourceService)],g.prototype,"staticResourceService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],g.prototype,"extensionInstanceManageService",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],g.prototype,"extensionNodeClient",void 0),t.Extension=g=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(s)),n.__param(1,(0,r.Optional)(Symbol())),n.__param(2,(0,r.Optional)(Symbol())),n.__param(3,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object,Boolean,Boolean,Boolean])],g)},87543:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionServiceImpl=void 0;const r=e(85608),o=r.__importDefault(e(12784)),c=e(76003),p=e(18740),v=e(76271),m=e(41869),_=e(68969),s=e(43718),g=e(66482),l=e(50492),h=e(84660),u=e(14951),d=e(72665),E=e(51500),f=e(99220),a=e(25600),b=e(46147),y=e(57962),A=e(82389),S=e(71354),w=e(35321);let T=n=class extends s.WithEventBus{constructor(){super(),this.ready=new Map,this.isExtProcessRestarting=!1,this.eagerExtensionsActivated=new m.Deferred,this.extensionScanDir=new Set,this.extensionCandidatePath=new Set,this.restartProgress=async(I=f.ERestartPolicy.Always)=>{const O=async R=>{this.disposeAllOverlayWindow(),R.onCancellationRequested(()=>{this.logger.log("[ext-restart]: ext process restart canceled"),this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=void 0});try{await this.startExtProcess(!1)}catch(P){this.logger.error(`[ext-restart]: ext-host restart failure, error: ${P}`)}this.isExtProcessRestarting=!1,this.isExtProcessWaitingForRestart=void 0,this.disposeAllOverlayWindow()};await this.channelHandler.awaitChannelReady(v.RPCServiceChannelPath);const M=this.isExtProcessWaitingForRestart||I;switch(this.logger.log("[ext-restart]: restart ext process, restart policy:",M),M){case f.ERestartPolicy.WhenExit:if(await this.getExtProcessPID()){this.logger.log("[ext-restart]: ext process is still running, skip");break}case f.ERestartPolicy.Always:await this.progressService.withProgress({location:s.ProgressLocation.Notification,title:(0,s.localize)("extension.exthostRestarting.content"),buttons:[{id:"extension.reload",label:(0,s.localize)("preference.general.language.change.refresh.now"),primary:!0,run:async()=>{this.clientApp.fireOnReload()},dispose:()=>{}}]},async()=>{this.extProcessRestartPromise&&this.extProcessRestartPromise.cancel(),this.extProcessRestartPromise=(0,s.createCancelablePromise)(O),await this.extProcessRestartPromise});break}this.isExtProcessRestarting=!1},this.restartDebounced=(0,o.default)(async()=>{await this.restartProgress()},500),this.addDispose(this.fileServiceClient.onWillActivateFileSystemProvider(async()=>(this.extensionMetaDataArr||await this.initExtensionMetaData(),this.activationEventService.getTopicsData("onFileSystem"))))}async getActivatedExtensions(){const I={};return this.nodeExtensionService.protocol&&(I.node=await this.nodeExtensionService.getActivatedExtensions()),this.workerExtensionService.protocol&&(I.worker=await this.workerExtensionService.getActivatedExtensions()),I}async onActivateExtension(I){await this.activationEventService.fireEvent(I.payload.topic,I.payload.data)}async onExtensionEnabled(I){const O=I.payload;await this.updateExtHostData(),await this.fireActivationEventsIfNeed(O.packageJSON.activationEvents)}async onExtensionUninstalled(){await this.updateExtHostData()}async activate(){await this.initExtensionMetaData(),await this.initExtensionInstanceData(),await this.runEagerExtensionsContributes(),await this.setupExtensionNLSConfig(),this.doActivate();const I=()=>{this.logger.log("[ext-restart]: page visibility change, current:",document.visibilityState,"is waiting:",this.isExtProcessWaitingForRestart,"is restarting:",this.isExtProcessRestarting),document.visibilityState==="visible"&&this.isExtProcessWaitingForRestart&&!this.isExtProcessRestarting&&this.extProcessRestartHandler(this.isExtProcessWaitingForRestart)};document.addEventListener("visibilitychange",I,!1),this.addDispose(m.Disposable.create(()=>{document.removeEventListener("visibilitychange",I)}))}async setupExtensionNLSConfig(){const I=await this.extensionStoragePathServer.getLastStoragePath()||"",O=this.preferenceService.get(s.GeneralSettingsId.Language)||(0,s.getLanguageId)();await this.extensionNodeClient.setupNLSConfig(O,I)}async initExtensionMetaData(){const{extensionDir:I,extensionCandidate:O}=this.appConfig;I&&this.extensionScanDir.add(I),O&&O.forEach(M=>{this.extensionCandidatePath.add(M.path)}),await this.getExtensionsMetaData(Array.from(this.extensionScanDir),Array.from(this.extensionCandidatePath))}async initExtensionInstanceData(){for(const O of this.extensionMetaDataArr){const M=this.extensionInstanceManageService.checkIsBuiltin(O),R=this.extensionInstanceManageService.checkIsDevelopment(O),P=await this.extensionInstanceManageService.createExtensionInstance(O,M,R);P&&this.extensionInstanceManageService.addExtensionInstance(P),P?.contributes&&P.enabled&&(this.contributesService.register(P.id,P.contributes),this.sumiContributesService.register(P.id,P.packageJSON.sumiContributes||{}))}this.eventBus.fire(new S.ExtensionsInitializedEvent(this.extensionInstanceManageService.getExtensionInstances())),this.eventBus.fire(new g.DebugConfigurationsReadyEvent(void 0));const I=this.extensionInstanceManageService.getExtensionInstances();this.nodeExtensionService.updateExtensionData(I),this.workerExtensionService.updateExtensionData(I),this.viewExtensionService.initExtension(I)}async doActivate(){await this.workspaceService.whenReady,await this.extensionStorageService.whenReady,await this.viewExtensionService.activate(),await this.startExtProcess(!0);try{await this.eventBus.fireAndAwait(new S.ExtensionBeforeActivateEvent),await this.activationEventService.fireEvent("*")}catch(I){this.logger.error(`[Extension Activate Error],
31550
31550
  ${I.message||I}`)}finally{this.eagerExtensionsActivated.resolve(),this.activationEventService.fireEvent("onStartupFinished"),this.eventBus.fire(new S.ExtensionApiReadyEvent)}}async restartExtProcess(I=f.ERestartPolicy.Always){document.visibilityState==="visible"?this.extProcessRestartHandler(I):(this.logger.log("[ext-restart]: page is not visible, waiting for restart, policy:",I),this.isExtProcessWaitingForRestart=I)}disposeAllOverlayWindow(){var I,O;this.pCrashMessageModel&&((O=(I=this.pCrashMessageModel).cancel)===null||O===void 0||O.call(I),this.pCrashMessageModel=void 0)}async extProcessRestartHandler(I=f.ERestartPolicy.Always){if(this.isExtProcessRestarting&&I!==f.ERestartPolicy.Always){this.logger.log("[ext-restart]: ext process is restarting, skip");return}this.isExtProcessRestarting=!0,this.isExtProcessWaitingForRestart?this.restartDebounced():this.restartProgress(I)}async getExtProcessPID(){return await Promise.race([this.extensionNodeClient.pid().catch(async I=>(this.logger.error(`[ext-restart]: get ext process pid error, ${I}`),await(0,s.sleep)(200),null)),(0,s.sleep)(1e3).then(()=>null)])}async startExtProcess(I){if(I||(this.resetExtensionInstances(),this.disposeSumiViewExtension(),await this.disposeExtProcess()),await Promise.all([this.startNodeExtHost(I),this.startWorkerExtHost(I)]),!I&&(await this.rerunSumiViewExtensionContributes(),this.activationEventService.activatedEventSet.size)){const O=Array.from(this.activationEventService.activatedEventSet);this.activationEventService.activatedEventSet.clear(),await Promise.allSettled(O.map(M=>{const{topic:R,data:P}=JSON.parse(M);return this.logger.verbose("fireEvent","event.topic",R,"event.data",P),this.activationEventService.fireEvent(R,P)}))}}async startNodeExtHost(I){if(this.appConfig.noExtHost)return;const O=await this.nodeExtensionService.activate();this.extensionCommandManager.registerProxyCommandExecutor("node",O.get(b.MainThreadAPIIdentifier.MainThreadCommands)),I&&this.ready.set("node",this.nodeExtensionService.ready)}async startWorkerExtHost(I){if(this.appConfig.extWorkerHost)try{const O=await this.workerExtensionService.activate(this.appConfig.ignoreWorkerHostCors);this.extensionCommandManager.registerProxyCommandExecutor("worker",O.get(b.MainThreadAPIIdentifier.MainThreadCommands)),I&&this.ready.set("worker",this.workerExtensionService.ready)}catch(O){this.logger.error(`Worker host activate fail,
31551
- ${O.message}`)}}async updateExtHostData(){const I=this.extensionInstanceManageService.getExtensionInstances();this.appConfig.noExtHost||await this.nodeExtensionService.updateExtensionData(I),this.appConfig.extWorkerHost&&await this.workerExtensionService.updateExtensionData(I)}async fireActivationEventsIfNeed(I){if(!Array.isArray(I)||!I.length)return;const O=["*","onStartupFinished"],M=I.filter(P=>P!=="*"),R=Array.from(this.activationEventService.activatedEventSet).map(P=>JSON.parse(P)).filter(({topic:P,data:k})=>M.find(F=>F===`${P}:${k}`));for(const P of O)I.includes(P)&&(this.logger.verbose(`Fire activation event ${P}`),this.activationEventService.fireEvent(P));for(const P of R){const{topic:k,data:F}=P;this.logger.verbose(`Fire activation event ${k}:${F}`),this.activationEventService.fireEvent(k,F)}await this.activateByWorkspaceContains(I)}async activateByWorkspaceContains(I){if(!Array.isArray(I)||!I.length)return;const O=[],M=[];for(const P of I)if(/^workspaceContains:/.test(P)){const k=P.substr(18);k.indexOf("*")>=0||k.indexOf("?")>=0?M.push(k):O.push(k)}const R=[];O.length&&R.push(this.workspaceService.containsSome(O)),M.length&&R.push((async()=>{try{return(await this.fileSearchService.find("",{rootUris:this.workspaceService.tryGetRoots().map(k=>new s.URI(k.uri).codeUri.fsPath),includePatterns:M,limit:1})).length>0}catch(P){return this.logger.error(P),!1}})()),R.length&&await Promise.all(R).then(P=>P.some(k=>k))&&this.activationEventService.fireEvent("workspaceContains",[...O,...M][0])}async getExtensionsMetaData(I,O){if(!this.extensionMetaDataArr){const M=await this.extensionNodeClient.getAllExtensions(I,O,(0,s.getLanguageId)(),n.extraMetadata);this.extensionMetaDataArr=M}return this.logger.log("extensions count:",this.extensionMetaDataArr.length),this.extensionMetaDataArr}async runEagerExtensionsContributes(){await Promise.all([this.contributesService.initialize(),this.sumiContributesService.initialize()]),this.commandRegistry.beforeExecuteCommand(async(I,O)=>(await this.activationEventService.fireEvent("onCommand",I),O)),this.eventBus.fire(new s.ExtensionDidContributes)}async runExtensionContributes(){const I=Array.from(this.extensionInstanceManageService.getExtensionInstances());Promise.all(I.map(O=>this.activateByWorkspaceContains(O.packageJSON.activationEvents))).catch(O=>this.logger.error(O))}whetherWebExtension({packageJSON:I}){const{browser:O,main:M}=I||{},R=!!this.appConfig.noExtHost;if(O&&!M)return!0;if(O&&M)return R;if(!O&&M)return!1;if(typeof I.contributes<"u"){for(const P of["debuggers","terminal","typescriptServerPlugins"])if(I.contributes.hasOwnProperty(P))return!1}return R}async activeExtension(I){const O=this.whetherWebExtension(I);O&&!this.appConfig.extWorkerHost&&this.logger.error("[extension.service]: has no ext worker host"),await Promise.all([this.nodeExtensionService.activeExtension(I,O),this.workerExtensionService.activeExtension(I,O)]),await this.viewExtensionService.activeExtension(I,this.nodeExtensionService.protocol),this.eventBus.fire(new s.ExtensionActivatedEvent({topic:"onExtensionActivated",data:{id:I.id}}))}resetExtensionInstances(){this.extensionInstanceManageService.resetExtensionInstances(),this.nodeExtensionService.disposeApiFactory(),this.workerExtensionService.disposeApiFactory()}disposeSumiViewExtension(){const I=Array.from(this.viewExtensionService.activatedViewExtensionMap.keys());this.extensionInstanceManageService.disposeExtensionInstancesByPath(I)}async rerunSumiViewExtensionContributes(){const{activatedViewExtensionMap:I}=this.viewExtensionService,O=Array.from(I.keys());await Promise.all(O.map(M=>{const R=this.extensionInstanceManageService.getExtensionInstanceByPath(M);R&&(R.initialize(),this.sumiContributesService.register(R.id,R.packageJSON.sumiContributes||{}))})),I.clear(),await Promise.all([this.contributesService.initialize(),this.sumiContributesService.initialize()])}async disposeExtProcess(){await this.nodeExtensionService.disposeProcess(),await this.workerExtensionService.disposeProcess()}async disposeExtensions(){this.extensionInstanceManageService.disposeExtensionInstances()}async executeExtensionCommand(I,O){var M;const R=this.extensionCommandManager.getExtensionCommandEnv(I);if(!R)throw new Error('No Command with id "'+I+'" is declared by extensions');return await((M=this.ready.get(R))===null||M===void 0?void 0:M.promise),this.extensionCommandManager.executeExtensionCommand(R,I,O)}get invalidReloadStrategy(){return this.corePreferences["application.invalidExthostReload"]}async $restartExtProcess(){this.logger.log("[ext-restart]: receive the command from the node side to restart the process"),await this.restartExtProcess(f.ERestartPolicy.Always)}async $processNotExist(){return this.logger.log("[ext-restart]: receive the command from the node side that the process does not exist"),this.$restartExtProcess(),"ok"}async showReloadWindow(){const I=(0,s.localize)("extension.invalidExthostReload.confirm.ok"),O=[I],M=this.invalidReloadStrategy==="ifRequired";M&&O.unshift((0,s.localize)("extension.invalidExthostReload.confirm.cancel")),await this.dialogService.info((0,s.localize)("extension.invalidExthostReload.confirm.content"),O,!!M)===I&&this.clientApp.fireOnReload()}async $processCrashRestart(){var I,O;this.pCrashMessageModel&&((O=(I=this.pCrashMessageModel).cancel)===null||O===void 0||O.call(I));const M=(0,s.localize)("common.yes"),R=[M],P=this.invalidReloadStrategy==="ifRequired";P&&R.unshift((0,s.localize)("common.no")),this.pCrashMessageModel=this.messageService.info((0,s.localize)("extension.crashedExthostReload.confirm"),R,!!P);const k=await this.pCrashMessageModel;this.pCrashMessageModel=void 0,k===M&&await this.restartExtProcess(f.ERestartPolicy.Always)}};t.ExtensionServiceImpl=T,T.extraMetadata={[f.LANGUAGE_BUNDLE_FIELD]:"./package.nls.json"},r.__decorate([(0,c.Autowired)(f.ExtensionNodeServiceServerPath),r.__metadata("design:type",Object)],T.prototype,"extensionNodeClient",void 0),r.__decorate([(0,c.Autowired)(m.AppConfig),r.__metadata("design:type",Object)],T.prototype,"appConfig",void 0),r.__decorate([(0,c.Autowired)(m.CommandRegistry),r.__metadata("design:type",Object)],T.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(S.IActivationEventService),r.__metadata("design:type",y.ActivationEventServiceImpl)],T.prototype,"activationEventService",void 0),r.__decorate([(0,c.Autowired)(E.IWorkspaceService),r.__metadata("design:type",Object)],T.prototype,"workspaceService",void 0),r.__decorate([(0,c.Autowired)(l.IExtensionStorageService),r.__metadata("design:type",Object)],T.prototype,"extensionStorageService",void 0),r.__decorate([(0,c.Autowired)(_.IProgressService),r.__metadata("design:type",Object)],T.prototype,"progressService",void 0),r.__decorate([(0,c.Autowired)(d.IDialogService),r.__metadata("design:type",Object)],T.prototype,"dialogService",void 0),r.__decorate([(0,c.Autowired)(m.IClientApp),r.__metadata("design:type",Object)],T.prototype,"clientApp",void 0),r.__decorate([(0,c.Autowired)(m.ILogger),r.__metadata("design:type",Object)],T.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(d.IMessageService),r.__metadata("design:type",Object)],T.prototype,"messageService",void 0),r.__decorate([(0,c.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],T.prototype,"corePreferences",void 0),r.__decorate([(0,c.Autowired)(a.AbstractWorkerExtProcessService),r.__metadata("design:type",a.AbstractWorkerExtProcessService)],T.prototype,"workerExtensionService",void 0),r.__decorate([(0,c.Autowired)(a.AbstractNodeExtProcessService),r.__metadata("design:type",a.AbstractNodeExtProcessService)],T.prototype,"nodeExtensionService",void 0),r.__decorate([(0,c.Autowired)(a.AbstractViewExtProcessService),r.__metadata("design:type",a.AbstractViewExtProcessService)],T.prototype,"viewExtensionService",void 0),r.__decorate([(0,c.Autowired)(f.IExtCommandManagement),r.__metadata("design:type",f.IExtCommandManagement)],T.prototype,"extensionCommandManager",void 0),r.__decorate([(0,c.Autowired)(S.AbstractExtInstanceManagementService),r.__metadata("design:type",S.AbstractExtInstanceManagementService)],T.prototype,"extensionInstanceManageService",void 0),r.__decorate([(0,c.Autowired)(h.FileSearchServicePath),r.__metadata("design:type",Object)],T.prototype,"fileSearchService",void 0),r.__decorate([(0,c.Autowired)(w.VSCodeContributesServiceToken),r.__metadata("design:type",w.VSCodeContributesService)],T.prototype,"contributesService",void 0),r.__decorate([(0,c.Autowired)(A.SumiContributionsServiceToken),r.__metadata("design:type",A.SumiContributionsService)],T.prototype,"sumiContributesService",void 0),r.__decorate([(0,c.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],T.prototype,"preferenceService",void 0),r.__decorate([(0,c.Autowired)(l.IExtensionStoragePathServer),r.__metadata("design:type",Object)],T.prototype,"extensionStoragePathServer",void 0),r.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),r.__metadata("design:type",c.Injector)],T.prototype,"injector",void 0),r.__decorate([(0,c.Autowired)(u.IFileServiceClient),r.__metadata("design:type",Object)],T.prototype,"fileServiceClient",void 0),r.__decorate([(0,c.Autowired)(p.WSChannelHandler),r.__metadata("design:type",p.WSChannelHandler)],T.prototype,"channelHandler",void 0),r.__decorate([(0,s.OnEvent)(m.ExtensionActivateEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[m.ExtensionActivateEvent]),r.__metadata("design:returntype",Promise)],T.prototype,"onActivateExtension",null),r.__decorate([(0,s.OnEvent)(S.ExtensionDidEnabledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[S.ExtensionDidEnabledEvent]),r.__metadata("design:returntype",Promise)],T.prototype,"onExtensionEnabled",null),r.__decorate([(0,s.OnEvent)(S.ExtensionDidUninstalledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Promise)],T.prototype,"onExtensionUninstalled",null),t.ExtensionServiceImpl=T=n=r.__decorate([(0,c.Injectable)(),r.__metadata("design:paramtypes",[])],T)},40731:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(97186),p=e(64582),v=e(84660),m=e(99220),_=e(25600),s=e(72464),g=e(57962),l=e(87444),h=e(49413),u=e(98453),d=e(20670),E=e(90731),f=e(98736),a=e(62040),b=e(87543),y=e(70108),A=e(82389),S=e(71354),w=e(77385),T=e(35321);let D=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[m.RequireInterceptorContribution,s.MainThreadExtenderContribution],this.providers=[{token:m.ExtensionService,useClass:b.ExtensionServiceImpl},{token:p.IDebugServer,useClass:w.ExtensionDebugService,override:!0},{token:c.DebugSessionContributionRegistry,useClass:w.ExtensionDebugSessionContributionRegistry,override:!0},{token:S.IActivationEventService,useClass:g.ActivationEventServiceImpl},{token:m.IExtCommandManagement,useClass:l.ExtCommandManagementImpl},{token:S.AbstractExtInstanceManagementService,useClass:h.ExtInstanceManagementService},{token:m.AbstractExtensionManagementService,useClass:u.ExtensionManagementService},{token:_.AbstractNodeExtProcessService,useClass:d.NodeExtProcessService},{token:_.AbstractWorkerExtProcessService,useClass:f.WorkerExtProcessService},{token:_.AbstractViewExtProcessService,useClass:E.ViewExtProcessService},{token:m.IRequireInterceptorService,useClass:m.RequireInterceptorService},{token:T.VSCodeContributesServiceToken,useClass:T.VSCodeContributesService},{token:A.SumiContributionsServiceToken,useClass:A.SumiContributionsService},{token:s.IMainThreadExtenderService,useClass:s.MainThreadExtenderService},a.ExtensionCommandContribution,a.ExtensionClientAppContribution,y.BrowserRequireInterceptorContribution],this.backServices=[{servicePath:m.ExtensionNodeServiceServerPath,clientToken:m.ExtensionService},{servicePath:v.FileSearchServicePath},{servicePath:m.ExtensionHostProfilerServicePath}]}};t.ExtensionModule=D,t.ExtensionModule=D=n.__decorate([(0,r.Injectable)()],D)},30824:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkerBootstrapUrl=void 0;var n=e(41869);Object.defineProperty(t,"getWorkerBootstrapUrl",{enumerable:!0,get:function(){return n.getWorkerBootstrapUrl}})},9663:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionMetadataService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(71354);let p=class extends o.Disposable{initialize(m){this.eventBus.fire(new o.ExtensionEnabledEvent(m.toJSON())),this.addDispose(this.registerActivationEvent(m))}registerActivationEvent(m){const{activationEvents:_=[]}=m.packageJSON,s=new o.Disposable;return _.forEach(g=>{g==="onUri"&&(g=`onUri:${m.id}`),s.addDispose(this.activationService.onEvent(g,async()=>{await m.activate()}))}),s}};t.ExtensionMetadataService=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",c.IActivationEventService)],p.prototype,"activationService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ExtensionMetadataService=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},54107:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProxiedDocument=r,t.createProxiedWindow=o;function e(){}function n(c,p){return typeof c[p]=="function"&&/^[a-z]/.test(p)?c[p].bind&&c[p].bind(c):c[p]}function r(c){return new Proxy(document,{get:(p,v)=>{switch(v){case"write":case"writeln":return e;case"querySelector":return m=>m==="head"?c:n(p,v)(m);default:return n(p,v)}}})}function o(c,p){return new Proxy(window,{get:(v,m)=>{switch(m){case"document":return c||r(p);default:return n(v,m)}}})}},70108:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRequireInterceptorContribution=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(43144)),c=n.__importDefault(e(25873)),p=e(41869),v=e(89953),m=e(57996),_={...o.default,...c.default};let s=class{registerRequireInterceptor(l){l.registerRequireInterceptor({moduleName:"React",load:()=>r.default}),l.registerRequireInterceptor({moduleName:"ReactDOM",load:()=>_}),l.registerRequireInterceptor({moduleName:"ReactDOMClient",load:()=>c.default}),l.registerRequireInterceptor({moduleName:"kaitian-browser",load:h=>(0,m.createBrowserApi)(h.injector,h.extension,h.rpcProtocol)}),l.registerRequireInterceptor({moduleName:"sumi-browser",load:h=>(0,m.createBrowserApi)(h.injector,h.extension,h.rpcProtocol)})}};t.BrowserRequireInterceptorContribution=s,t.BrowserRequireInterceptorContribution=s=n.__decorate([(0,p.Domain)(v.RequireInterceptorContribution)],s)},9438:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retargetEvents=o;const e=["onAbort","onAnimationCancel","onAnimationEnd","onAnimationIteration","onAuxClick","onBlur","onChange","onClick","onClose","onContextMenu","onDoubleClick","onError","onFocus","onGotPointerCapture","onInput","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadEnd","onLoadStart","onLostPointerCapture","onMouseDown","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onReset","onResize","onScroll","onSelect","onSelectionChange","onSelectStart","onSubmit","onTouchCancel","onTouchMove","onTouchStart","onTouchEnd","onTransitionCancel","onTransitionEnd","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onFocusOut"],n={onDoubleClick:"dblclick"},r={onInput:"onChange",onFocusOut:"onBlur",onSelectionChange:"onSelect"};function o(l){const h=[];return e.forEach(u=>{const d=s(u);function E(f){f.nativeEvent=f;const a=f.path||f.composedPath&&f.composedPath()||g(f.target);for(const b of a){let y=null;const A=p(b),S=c(b);if(S?y=S:y=m(A),A&&y&&_(f,u,y),A&&y&&r[u]&&_(f,r[u],y),f.cancelBubble||b===l)break}}l.addEventListener(d,E,!1),h.push(()=>{l.removeEventListener(d,E,!1)})}),()=>{h.forEach(u=>{u()})}}function c(l){return v(l,"__reactEventHandlers")}function p(l){return v(l,"_reactInternal")}function v(l,h){for(const u in l)if(l.hasOwnProperty(u)&&u.indexOf(h)!==-1)return l[u]}function m(l){if(l){if(l.memoizedProps)return l.memoizedProps;if(l._currentElement&&l._currentElement.props)return l._currentElement.props}}function _(l,h,u){l.persist=()=>{l.isPersistent=()=>!0},u[h]&&u[h](l)}function s(l){return n[l]?n[l]:l.replace(/^on/,"").toLowerCase()}function g(l){const h=[];for(;l;){if(h.push(l),l.tagName==="HTML")return h.push(document),h.push(window),h;l=l.parentElement}}},8403:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRoot=b;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=n.__importDefault(e(43144)),p=e(97267),v=e(41869),m=e(43718),_=e(52416),s=e(25600),g=e(26351),l=({root:y,children:A})=>c.default.createPortal(A,y);function h(y){return y.cloneNode(!0)}function u(y,A){const S=new MutationObserver(w=>{for(const T of w)if(T.type==="childList"){if(T.addedNodes.length>0)for(const D of Array.from(T.addedNodes))A.appendChild(D.cloneNode(!0));if(T.removedNodes.length>0)for(const D of Array.from(T.removedNodes))A.contains(D)&&A.removeChild(D)}});return S.observe(y,{childList:!0,subtree:!0}),{dispose:()=>{S.disconnect()}}}const d="@opensumi/ide-components";function E(y,A,S="alipay"){return(0,v.getCDNHref)(d,y,A,S)}function f(y){const A=document.createElement("link");return A.setAttribute("href",y),A.setAttribute("rel","stylesheet"),A}const a=({id:y,extensionId:A,children:S,proxiedHead:w,cdnType:T,styleSheet:D})=>{const I=(0,o.useRef)(null),[O,M]=o.default.useState(null),R=(0,v.useInjectable)(s.AbstractViewExtProcessService),P=(0,v.useInjectable)(_.IThemeService),k=(0,v.useInjectable)(_.IIconService),F=(0,v.useInjectable)(_.IProductIconService),[L,B]=(0,o.useState)(null);return(0,o.useEffect)(()=>{var j,W;const U=new v.DisposableCollection;if(I.current){const Q=I.current.attachShadow({mode:"open"});if(w){D?(w.appendChild(f(D.componentUri)),w.appendChild(f(D.iconfontUri))):(w.appendChild(f(E("dist/index.css",g.version,T))),w.appendChild(f(E("lib/icon/iconfont/iconfont.css",g.version,T))));const V=h(w);U.push(u(w,V));const $=document.createElement("style");$.id="icon-style",$.innerHTML=(j=k.currentTheme)===null||j===void 0?void 0:j.styleSheetContent,V.appendChild($);const Y=document.createElement("style");Y.id=_.PRODUCT_ICON_STYLE_ID,Y.innerHTML=((W=F.currentTheme)===null||W===void 0?void 0:W.styleSheetContent)||"",V.appendChild(Y),U.pushAll([k.onThemeChange(H=>{$.innerHTML=H.styleSheetContent})]),Q.appendChild(V);const z=R.getPortalShadowRoot(A);z&&z.appendChild(w)}return O||M(Q),P.getCurrentTheme().then(V=>B(V.type)),U.push(P.onThemeChange(V=>{V.type&&V.type!==L&&B(V.type)})),U.dispose.bind(U)}},[]),o.default.createElement("div",{id:y,style:{width:"100%",height:"100%"},ref:I},O&&o.default.createElement(l,{root:O},o.default.createElement("div",{className:(0,r.default)((0,_.getThemeTypeSelector)(L),"shadow-context-wrapper","show-file-icons"),style:{width:"100%",height:"100%"}},S)))};function b(y,A,S,w,T,D,I){const O=y,{getIcon:M}=o.default.useContext(p.IconContext),R=(0,v.useInjectable)(v.LabelService),P=(0,o.useCallback)((k,F)=>R.getIcon(m.URI.parse(k),F),[]);return o.default.createElement(p.ComponentContextProvider,{value:{getIcon:M,localize:m.localize,getResourceIcon:P}},o.default.createElement(a,{id:`${A.id}-${w}`,extensionId:A.id,proxiedHead:T,cdnType:D,styleSheet:I},o.default.createElement(O,{...S})))}},31381:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KaitianBrowserCommand=void 0,t.createBrowserCommandsApiFactory=_;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(21880),v=e(46147);let m=class{constructor(g){this.rpcProtocol=g,this.rpcProtocol&&(this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostCommands))}async executeCommand(g,l,...h){const u={id:l.id,extensionId:l.extensionId,isBuiltin:l.isBuiltin},d=this.commandRegistry.getCommand(g);if(this.proxy&&d)return this.proxy.$executeCommandWithExtensionInfo(g,u,...h);if(!this.commandRegistry.isPermittedCommand(g,u,...h))throw new Error(`Extension ${u.id} has not permit to execute ${g}`);try{return await this.monacoCommandService.executeCommand(g,...h)}catch(f){throw this.logger.error(f),f}}};t.KaitianBrowserCommand=m,n.__decorate([(0,r.Autowired)(p.ICommandServiceToken),n.__metadata("design:type",Object)],m.prototype,"monacoCommandService",void 0),n.__decorate([(0,r.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],m.prototype,"commandRegistry",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),t.KaitianBrowserCommand=m=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],m);function _(s,g,l){const h=s.get(m,[l]);return{executeCommand(u,...d){return h.executeCommand(u,g,...d)}}}},25367:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserComponents=v;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=n.__importStar(e(81878)),p=e(56405);function v(m,_){return m.get(o.AppConfig).useExperimentalShadowDom?new Proxy(c,{get(g,l){if(l==="Dialog"||l==="Overlay"){const h=c[l];return u=>r.default.createElement(p.PortalRoot,{otherProps:u,extensionId:_.id,original:h})}return g[l]}}):c}},73566:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(97558);let p=class extends c.AbstractSumiBrowserContributionRunner{run(m){const _=new o.Disposable;if(!this.injector.creatorMap.has(o.ChatAgentViewServiceToken))return this.logger.warn("Not found ChatAgentViewServiceToken"),_;const{chat:s}=this.contribution;return!s||!Array.isArray(s.view)||s.view.forEach(g=>{if(!g.id||!g.component)return;const{extendProtocol:l,extendService:h}=m.getExtensionExtendService(this.extension,g.id),u=`${this.extension.id}:${g.id}`;_.addDispose(this.chatAgentViewService.registerChatComponent({id:u,component:g.component,initialProps:{kaitianExtendService:h,kaitianExtendSet:l,sumiExtendService:h,sumiExtendSet:l}}))}),_}};t.ChatBrowserContributionRunner=p,n.__decorate([(0,r.Autowired)(o.ChatAgentViewServiceToken),n.__metadata("design:type",Object)],p.prototype,"chatAgentViewService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.ChatBrowserContributionRunner=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},23561:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(54414),p=e(57517),v=e(63067),m=e(52416),_=e(97558);let s=class extends _.AbstractSumiBrowserContributionRunner{run(l){const h=new o.Disposable;return this.contribution.editor&&this.contribution.editor.view.forEach(u=>{h.addDispose(this.registerEditorComponent(u,l))}),h}registerEditorComponent(l,h){const u=new o.Disposable,{extendProtocol:d,extendService:E}=h.getExtensionExtendService(this.extension,l.id),f=l.scheme||o.Schemes.file;return u.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:l.id,scheme:f,component:l.component,renderMode:l.renderMode},{kaitianExtendService:E,kaitianExtendSet:d,sumiExtendService:E,sumiExtendSet:d})),f===o.Schemes.file?u.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(f,(a,b)=>{let y=!1;if(l.fileExt&&l.fileExt.indexOf(a.uri.path.ext)>-1){if(!l.shouldPreview)return;l.shouldPreview(a.uri.path)&&(y=!0)}l.handles&&l.handles(a.uri.codeUri)&&(y=!0),y&&b.push({type:p.EditorOpenType.component,componentId:l.id,title:l.title||"\u9884\u89C8",weight:l.priority||10})})):u.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(f,(a,b)=>{l.handles&&!l.handles(a.uri.codeUri)||b.push({type:p.EditorOpenType.component,componentId:l.id,title:l.title||l.id,weight:l.priority||10})})),this.resourceService.registerResourceProvider({scheme:f,provideResource:a=>({uri:a,name:l.tabTitle||l.id,icon:l.tabIconPath?this.iconService.fromIcon(this.extension.path,l.tabIconPath,m.IconType.Background):""})}),u}};t.EditorBrowserContributionRunner=s,n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(c.ResourceService),n.__metadata("design:type",c.ResourceService)],s.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.EditorComponentRegistry),n.__metadata("design:type",p.EditorComponentRegistry)],s.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.EditorBrowserContributionRunner=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},85406:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSideBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(54414),p=e(57517),v=e(51553),m=e(97558);let _=class extends m.AbstractSumiBrowserContributionRunner{run(g){const l=new o.Disposable,h=this.contribution.editorSide;return h&&h.view.forEach(u=>{l.addDispose(this.registerEditorSideComponent(u,g))}),l}registerEditorSideComponent(g,l){const h=new o.Disposable,{extendProtocol:u,extendService:d}=l.getExtensionExtendService(this.extension,g.id);return h.addDispose(this.editorComponentRegistry.registerEditorSideWidget({id:g.id,side:g.side,component:g.component,initialProps:{kaitianExtendService:d,kaitianExtendSet:u,sumiExtendService:d,sumiExtendSet:u},displaysOnResource:()=>this.editorService.editorContextKeyService.match(g?.when)})),h}};t.EditorSideBrowserContributionRunner=_,n.__decorate([(0,r.Autowired)(p.EditorComponentRegistry),n.__metadata("design:type",p.EditorComponentRegistry)],_.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorServiceImpl)],_.prototype,"editorService",void 0),t.EditorSideBrowserContributionRunner=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},31738:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(97558),p=e(73566),v=e(23561),m=e(85406),_=e(53728),s=e(15765);let g=class extends c.AbstractSumiBrowserContributionRunner{run(h){const u=new o.Disposable;return u.addDispose(this.injector.get(_.TabbarBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(v.EditorBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(m.EditorSideBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(s.ToolBarBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(p.ChatBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u}};t.SumiBrowserContributionRunner=g,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),t.SumiBrowserContributionRunner=g=n.__decorate([(0,r.Injectable)({multiple:!0})],g)},53728:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(63067),v=e(52416),m=e(97558),_=["left","right","bottom","editor","toolBar"];let s=class extends m.AbstractSumiBrowserContributionRunner{run(l){const h=new c.Disposable;return this.contribution.left&&this.contribution.left.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.left)===null||d===void 0?void 0:d.type,"left"))}),this.contribution.right&&this.contribution.right.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.right)===null||d===void 0?void 0:d.type,"right"))}),this.contribution.bottom&&this.contribution.bottom.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.bottom)===null||d===void 0?void 0:d.type,"bottom"))}),Object.keys(this.contribution).forEach(u=>{var d;_.indexOf(u)===-1&&((d=this.contribution[u])===null||d===void 0?void 0:d.view).forEach(E=>{h.addDispose(this.registerTabBar(E,l,"replace"))})}),h}registerTabBar(l,h,u="add",d){const{extendProtocol:E,extendService:f}=h.getExtensionExtendService(this.extension,l.id),a=`${this.extension.id}:${l.id}`,b={kaitianExtendService:f,kaitianExtendSet:E,sumiExtendService:f,sumiExtendSet:E};return this.layoutService.viewReady.promise.then(()=>{var y;if(u==="add"){const{component:A,titleComponent:S}=l;this.layoutService.collectTabbarComponent([{id:a}],{...l,iconClass:l.icon?(0,o.getIcon)(l.icon):l.iconPath?this.iconService.fromIcon(this.extension.path,l.iconPath):"",containerId:a,component:A,titleComponent:S,titleProps:b,initialProps:b,fromExtension:!0},d)}else this.layoutService.replaceViewComponent(l,b),l.titleComponent&&((y=this.layoutService.getTabbarHandler(a))===null||y===void 0||y.setTitleComponent(l.titleComponent,b))}),{dispose:()=>{const y=this.layoutService.getTabbarHandler(a);y&&y.dispose()}}}};t.TabbarBrowserContributionRunner=s,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.TabbarBrowserContributionRunner=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},15765:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolBarBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(63067),p=e(52416),v=e(47289),m=e(97558);let _=class extends m.AbstractSumiBrowserContributionRunner{run(g){const l=new o.Disposable;return this.injector.creatorMap.has(v.IToolBarViewService)?(this.contribution.toolBar&&this.contribution.toolBar.view.forEach(h=>{const{extendProtocol:u,extendService:d}=g.getExtensionExtendService(this.extension,h.id),E=this.toolBarViewService.registerToolBarElement({type:"component",component:h.component,position:h.position||this.contribution.toolBar.position||v.ToolBarPosition.LEFT,initialProps:{kaitianExtendService:d,kaitianExtendSet:u,sumiExtendService:d,sumiExtendSet:u},description:h.description,order:h.order,weight:h.weight});E&&l.addDispose(E)}),l):(this.logger.warn("\u6CA1\u6709\u627E\u5230 toolbarViewService"),l)}};t.ToolBarBrowserContributionRunner=_,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IToolBarViewService),n.__metadata("design:type",v.IToolBarViewService)],_.prototype,"toolBarViewService",void 0),n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),t.ToolBarBrowserContributionRunner=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},57996:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserApi=g;const n=e(41869),r=e(81878),o=e(57517),c=e(52416),p=e(16762),v=e(65046),m=e(31381),_=e(25367),{format:s}=n.strings;function g(l,h,u){const d=(0,m.createBrowserCommandsApiFactory)(l,h,u),E=(0,_.createBrowserComponents)(l,h),f=l.get(n.IReporterService);return{...E,commands:d,ResizeHandleHorizontal:r.ResizeHandleHorizontal,ResizeHandleVertical:r.ResizeHandleVertical,PlainWebview:v.PlainWebview,URI:n.URI,localize:(a,b)=>(0,n.localize)(a,b,h.id),formatLocalize:(a,...b)=>s((0,n.localize)(a,void 0,h.id),...b),getIcon:n.getIcon,getThemeColors:()=>{const b=l.get(c.IThemeService).getCurrentThemeSync();return(0,c.getColorRegistry)().getColors().reduce((A,S)=>{const w=b.getColor(S.id);return w&&(A[S.id.replace(".","-")]=w.toString()),A},{})},ToolBarPosition:p.ToolBarPosition,EditorComponentRenderMode:o.EditorComponentRenderMode,reporter:f}}},97558:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSumiBrowserContributionRunner=void 0;class e{constructor(r,o){this.extension=r,this.contribution=o}}t.AbstractSumiBrowserContributionRunner=e},56543:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.BrowserMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/browser/index.js"}],description:(0,o.localize)("sumiContributes.browserMain")},t.BrowserMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("browserMain"),(0,c.LifeCycle)(4)],p)},88770:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserViewContributionPoint=void 0;const r=e(85608),o=e(76003),c=e(41869),p=e(21634),v=e(43718),m=e(63067),_=e(52416),s=e(99220),g=e(17428),l=e(71354),h=["left","right","bottom","editor","toolBar","editorSide","chat"];let u=n=class extends s.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new v.DisposableCollection}contribute(){return new Promise(E=>{this.mainLayoutService.viewReady.promise.then(()=>{var f;for(const a of this.contributesMap){const{extensionId:b,contributes:y}=a,A=this.extensionManageService.getExtensionInstanceByExtId(b);if(!A)continue;const S=Object.keys(y).filter(w=>!n.unsupportLocation.includes(w));for(let w of S){const T=y[w].view.map(D=>({...D,component:g.ExtensionLoadingView}));if(!h.includes(w))if(!this.mainLayoutService.getTabbarHandler(w))w="left";else{for(const D of T){D.titleComponentId&&(0,v.getDebugLogger)().warn(`custom title component '${D.titleComponentId}' is not allowed for built-in container ${w}!`);const{title:I,id:O,priority:M,component:R,when:P,weight:k}=D,F=((f=this.mainLayoutService.getTabbarHandler(w))===null||f===void 0?void 0:f.containerId)||w,L=this.mainLayoutService.collectViewComponent({id:O,priority:M,component:R,name:I,when:P,weight:k},F,{},{fromExtension:!0});this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(L).disposeView(O)}})}continue}for(const D of T){const{title:I,icon:O,iconPath:M,id:R,priority:P,component:k,expanded:F,noResize:L,when:B,weight:j,hideTab:W}=D,U=`${b}:${R}`,Q=this.mainLayoutService.collectTabbarComponent([{id:R,priority:P,component:k,when:B,weight:j}],{iconClass:M?this.iconService.fromIcon(A.path,M):(0,c.getIcon)(O),title:I&&this.getLocalizeFromNlsJSON(I,b),priority:P,expanded:F,containerId:U,noResize:L,fromExtension:!0,hideTab:W},w);this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(Q).dispose()}})}}}E()})})}};t.BrowserViewContributionPoint=u,u.schema=p.browserViews.schema,u.unsupportLocation=["bottom","editor","toolBar","chat"],r.__decorate([(0,o.Autowired)(m.IMainLayoutService),r.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(_.IIconService),r.__metadata("design:type",Object)],u.prototype,"iconService",void 0),r.__decorate([(0,o.Autowired)(l.AbstractExtInstanceManagementService),r.__metadata("design:type",l.AbstractExtInstanceManagementService)],u.prototype,"extensionManageService",void 0),t.BrowserViewContributionPoint=u=n=r.__decorate([(0,o.Injectable)(),(0,s.Contributes)("browserViews"),(0,s.LifeCycle)(3)],u)},82389:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiContributionsService=t.SumiContributionsServiceToken=void 0;const n=e(85608),r=e(76003),o=e(99220),c=e(56543),p=e(88770),v=e(35307),m=e(92097),_=e(75591),s=e(68360),g=e(52750),l=e(8678),h=e(43066),u=e(29337);t.SumiContributionsServiceToken=Symbol("SumiContributionsService");let d=class extends o.ExtensionContributesService{constructor(){super(...arguments),this.ContributionPoints=[p.BrowserViewContributionPoint,c.BrowserMainContributionPoint,_.NodeMainContributionPoint,u.WorkerMainContributionPoint,h.ViewsProxiesContributionPoint,m.MenubarsContributionPoint,g.SubmenusContributionPoint,l.ToolbarContributionPoint,v.MenuExtendContributionPoint,s.SCMContributionPoint]}};t.SumiContributionsService=d,t.SumiContributionsService=d=n.__decorate([(0,r.Injectable)()],d)},35307:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuExtendContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(93899),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){for(const m of this.contributesMap){const{extensionId:_,contributes:s}=m;for(const g of Object.keys(s)){const l=s[g];this.addDispose(this.menuRegistry.registerMenuExtendInfo(g,l.map(h=>{var u;return{...h,extraDesc:this.getLocalizeFromNlsJSON((u=h?.extraDesc)!==null&&u!==void 0?u:"",_)}})))}}}};t.MenuExtendContributionPoint=p,n.__decorate([(0,r.Autowired)(o.IMenuRegistry),n.__metadata("design:type",o.IMenuRegistry)],p.prototype,"menuRegistry",void 0),t.MenuExtendContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("menu-extend"),(0,c.LifeCycle)(3)],p)},92097:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenubarsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(93899),p=e(43718),v=e(52416),m=e(99220),_=e(71354);let s=class extends m.VSCodeContributePoint{contribute(){for(const l of this.contributesMap){const{extensionId:h,contributes:u}=l,d=this.extensionManageService.getExtensionInstanceByExtId(h);if(d)for(const E of u){const f=d.icon?this.iconService.fromIcon("",d.icon,v.IconType.Background):(0,o.getIcon)("default-menu-icon");this.addDispose(this.menuRegistry.registerMenubarItem(E.id,{label:this.getLocalizeFromNlsJSON(E.title,h),order:E.order,nativeRole:E.nativeRole,iconClass:f}))}}}};t.MenubarsContributionPoint=s,s.schema={description:(0,p.localize)("sumiContributes.menubars"),type:"array",items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"${1}",title:"${2}"}}],properties:{id:{type:"string",description:(0,p.localize)("sumiContributes.menubars.id")},title:{type:"string",description:(0,p.localize)("sumiContributes.menubars.title")},order:{type:"number",description:(0,p.localize)("sumiContributes.menubars.order")},nativeRole:{type:"string",description:(0,p.localize)("sumiContributes.menubars.order")}}}},n.__decorate([(0,r.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],s.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extensionManageService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.MenubarsContributionPoint=s=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("menubars"),(0,m.LifeCycle)(3)],s)},75591:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.NodeMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/node/index.js"}],description:(0,o.localize)("sumiContributes.nodeMain")},t.NodeMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("nodeMain"),(0,c.LifeCycle)(4)],p)},68360:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCMContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(61656),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{contributes:s}=_;if(s.additional){const{additional:g}=s;if(!g.input)return;const{input:l}=g;if(l.addonAfter||l.addonBefore)return;this.scmService.appendInputProps(l)}}}};t.SCMContributionPoint=v,v.schema={description:(0,o.localize)("sumiContributes.SCM"),type:"object",defaultSnippets:[{body:{additional:{input:{}}}}],properties:{additional:{type:"object",description:(0,o.localize)("sumiContributes.SCM.additional"),properties:{input:{type:"object",description:(0,o.localize)("sumiContributes.SCM.additional.input")}}}}},n.__decorate([(0,r.Autowired)(c.SCMService),n.__metadata("design:type",c.SCMService)],v.prototype,"scmService",void 0),t.SCMContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("scm"),(0,p.LifeCycle)(3)],v)},52750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenusContributionPoint=void 0,t.isValidSubmenu=g;const n=e(85608),r=e(76003),o=e(57559),c=e(93899),p=e(43718),v=e(52416),m=e(99220),_=e(71354),s=e(35166);function g(h,u){if(!Array.isArray(h))return u.error((0,p.formatLocalize)("requirearray")),!1;for(const d of h){if(typeof d.id!="string")return u.error((0,p.formatLocalize)("requirestring","id")),!1;if(d.title&&typeof d.title!="string")return u.error((0,p.formatLocalize)("optstring","title")),!1;if(d.when&&typeof d.when!="string")return u.error((0,p.formatLocalize)("optstring","when")),!1;if(d.group&&typeof d.group!="string")return u.error((0,p.formatLocalize)("optstring","group")),!1}return!0}let l=class extends m.VSCodeContributePoint{contribute(){const u=console;for(const d of this.contributesMap){const{extensionId:E,contributes:f}=d,a=this.extensionManageService.getExtensionInstanceByExtId(E);if(a)for(const b of Object.keys(f)){const y=f[b];if(!g(y,console))return;const A=(0,s.parseMenuId)(b);if((0,p.isUndefined)(A)){u.warn((0,p.formatLocalize)("menuId.invalid","`{0}` is not a valid submenu identifier",b));return}for(const S of y){const[w,T]=(0,s.parseMenuGroup)(S.group);this.addDispose(this.menuRegistry.registerMenuItem(A,{submenu:S.id,label:S.title&&this.getLocalizeFromNlsJSON(S.title,E),iconClass:this.iconService.fromIcon(a.path,S.icon,v.IconType.Background),when:S.when,group:w,order:T,nativeRole:S.nativeRole}))}}}}};t.SubmenusContributionPoint=l,l.schema=o.menus.subMenusSchema,n.__decorate([(0,r.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],l.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],l.prototype,"extensionManageService",void 0),t.SubmenusContributionPoint=l=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("submenus"),(0,m.LifeCycle)(3)],l)},8678:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(9905),p=e(99220),v=e(71354),m=e(96710);let _=class extends p.VSCodeContributePoint{toLocalized(g,l,h){return l.reduce((u,d)=>(u[d]&&(u[d]=this.getLocalizeFromNlsJSON(u[d],h)),u),g)}contribute(){for(const g of this.contributesMap){const{extensionId:l,contributes:h}=g,u=this.extensionManageService.getExtensionInstanceByExtId(l);if(u){if(h.groups)for(const d of h.groups)this.addDispose(this.toolbarRegistry.registerToolbarActionGroup({id:d.id,preferredLocation:d.preferredLocation,weight:d.weight}));if(h.actions)for(const d of h.actions)switch(d.type){case"button":this.addDispose(this.kaitianExtToolbarService.registerToolbarButton(l,u.path,this.toLocalized(d,["title"],l)));break;case"select":this.addDispose(this.kaitianExtToolbarService.registerToolbarSelect(l,u.path,this.toLocalized(d,["description"],l)));break;case"dropdownButton":this.addDispose(this.kaitianExtToolbarService.registerToolbarDropdownButton(l,u.path,this.toLocalized(d,["description"],l)));break}}}}};t.ToolbarContributionPoint=_,_.schema=c.toolbar.schema,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",m.KaitianExtensionToolbarService)],_.prototype,"kaitianExtToolbarService",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarRegistry",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],_.prototype,"extensionManageService",void 0),t.ToolbarContributionPoint=_=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("toolbar"),(0,p.LifeCycle)(3)],_)},43066:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsProxiesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.ViewsProxiesContributionPoint=p,p.schema={type:"array",markdownDescription:(0,o.localize)("sumiContributes.viewsProxies"),defaultSnippets:[{body:["${1}"]}],items:{type:"string"}},t.ViewsProxiesContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("viewsProxies"),(0,c.LifeCycle)(3)],p)},29337:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.WorkerMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/worker/index.js"}],description:(0,o.localize)("sumiContributes.workerMain")},t.WorkerMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("workerMain"),(0,c.LifeCycle)(4)],p)},28949:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSumiAPIFactory=g;const n=e(43718),r=e(95507),o=e(41062),c=e(59860),p=e(29127),v=e(13877),m=e(25740),_=e(96710),s=e(43837);function g(l,h){const u=new n.Disposable,d=h.get(v.MainThreadLifeCycle,[h]),E=h.get(m.MainThreadTheme,[l,h]);u.addDispose(E);const f=h.get(p.MainThreadLayout,[l]);u.addDispose(f);const a=h.get(c.MainThreadCommon,[l,h]);u.addDispose(a);const b=h.get(_.MainThreadToolbar);u.addDispose(b);const y=h.get(s.MainThreadIDEWindow,[l]);u.addDispose(y);const A=h.get(o.MainThreadChatAgents,[l,h]);return u.addDispose(A),l.set(r.MainThreadSumiAPIIdentifier.MainThreadLifecycle,d),l.set(r.MainThreadSumiAPIIdentifier.MainThreadTheme,E),l.set(r.MainThreadSumiAPIIdentifier.MainThreadLayout,f),l.set(r.MainThreadSumiAPIIdentifier.MainThreadCommon,a),l.set(r.MainThreadSumiAPIIdentifier.MainThreadToolbar,b),l.set(r.MainThreadSumiAPIIdentifier.MainThreadIDEWindow,y),l.set(r.MainThreadSumiAPIIdentifier.MainThreadChatAgents,A),()=>{u.dispose()}}},41062:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadChatAgents=void 0;const r=e(85608),o=e(76003),c=e(59347),p=e(77633),v=e(40111),m=e(19413),_=e(8919),s=e(43718),g=e(93062),l=e(95507);let h=class{get chatAgentService(){try{return this.injector.get(m.IChatAgentService)}catch{return null}}get inlineChatFeatureRegistry(){try{return this.injector.get(s.InlineChatFeatureRegistryToken)}catch{return null}}get chatInternalService(){try{return this.injector.get(c.ChatInternalService)}catch{return null}}constructor(d,E){this.injector=E,n.set(this,void 0),this.agents=new Map,this.pendingProgress=new Map,this.responsePartHandlePool=0,this.activeResponsePartPromises=new Map,r.__classPrivateFieldSet(this,n,d.getProxy(l.ExtHostSumiAPIIdentifier.ExtHostChatAgents),"f")}$registerInlineChatProvider(d,E,f){if(!this.inlineChatFeatureRegistry||!this.chatInternalService)return;const a=this.inlineChatFeatureRegistry.registerInteractiveInput({handleStrategy:()=>p.ERunStrategy.PREVIEW},{providePreviewStrategy:async(b,y,A,S)=>{var w;const T=new v.InlineChatController({enableCodeblockRender:!!f.enableCodeblockRender}),D=this.chatInternalService.createRequest(A,E),I=new g.SumiReadableStream;T.mountReadable(I);const O=R=>{if(S.isCancellationRequested){I.abort();return}I.emitData(R)};this.pendingProgress.set(D.requestId,O);const M={sessionId:(w=this.chatInternalService)===null||w===void 0?void 0:w.sessionModel.sessionId,requestId:D.requestId,message:D.message.prompt,command:D.message.command};return r.__classPrivateFieldGet(this,n,"f").$invokeAgent(d,M,{history:[]},S).then(R=>{if(!R){I.end();return}S.isCancellationRequested?I.abort():(R.errorDetails&&D.response.setErrorDetails(R.errorDetails),I.end())}).finally(()=>{this.pendingProgress.delete(D.requestId)}),T}});this.agents.set(d,{name:E,dispose:a.dispose})}$registerAgent(d,E,f){if(!this.chatAgentService)return;const a=this.chatAgentService.registerAgent({id:E,metadata:f,invoke:async(b,y,A,S)=>{var w;this.pendingProgress.set(b.requestId,y);try{return(w=await r.__classPrivateFieldGet(this,n,"f").$invokeAgent(d,b,{history:A.map(T=>({role:s.CoreMessgaeRoleMap[T.role],content:T.content.toString()}))},S))!==null&&w!==void 0?w:{}}finally{this.pendingProgress.delete(b.requestId)}},provideSlashCommands:async b=>{var y;return!((y=this.agents.get(d))===null||y===void 0)&&y.hasSlashCommands?r.__classPrivateFieldGet(this,n,"f").$provideSlashCommands(d,b):[]},provideFollowups:async(b,y)=>{var A;return!((A=this.agents.get(d))===null||A===void 0)&&A.hasFollowups?r.__classPrivateFieldGet(this,n,"f").$provideFollowups(d,b,y):[]},provideSampleQuestions:async b=>{var y;return!((y=this.agents.get(d))===null||y===void 0)&&y.hasSampleQuestions?r.__classPrivateFieldGet(this,n,"f").$provideSampleQuestions(d,b):[]},provideChatWelcomeMessage:async b=>{var y;if(!((y=this.agents.get(d))===null||y===void 0)&&y.hasChatWelcomMessage)return r.__classPrivateFieldGet(this,n,"f").$provideChatWelcomeMessage(d,b)}});this.agents.set(d,{name:E,dispose:a.dispose,hasSlashCommands:f.hasSlashCommands,hasFollowups:f.hasFollowups})}$updateAgent(d,E){if(!this.chatAgentService)return;const f=this.agents.get(d);if(!f)throw new Error(`No agent with handle ${d} registered`);f.hasSlashCommands=E.hasSlashCommands,f.hasFollowups=E.hasFollowups,f.hasSampleQuestions=E.hasSampleQuestions,f.hasChatWelcomMessage=E.hasChatWelcomMessage,f.isDefault=E.isDefault,this.chatAgentService.updateAgent(f.name,E)}async $handleProgressChunk(d,E,f){var a,b;if(E.kind==="asyncContent"){const y=++this.responsePartHandlePool,A=`${d}_${y}`,S=new s.Deferred;return this.activeResponsePartPromises.set(A,S),(a=this.pendingProgress.get(d))===null||a===void 0||a({...E,resolvedContent:S.promise}),y}else if(typeof f=="number"){const y=`${d}_${f}`,A=this.activeResponsePartPromises.get(y);return A&&(E.kind==="content"?A.resolve(E.content):E.kind==="treeData"&&A.resolve(E),this.activeResponsePartPromises.delete(y)),f}(b=this.pendingProgress.get(d))===null||b===void 0||b(E)}$unregisterAgent(d){var E;(E=this.agents.get(d))===null||E===void 0||E.dispose(),this.agents.delete(d)}$populateChatInput(d,E){if(!this.chatAgentService)return;const f=this.agents.get(d);if(!f)throw new Error(`No agent with handle ${d} registered`);this.chatAgentService.populateChatInput(f.name,{command:E.command,message:E.prompt})}$sendMessage(d){this.chatAgentService&&this.chatAgentService.sendMessage(d)}dispose(){this.agents.forEach(d=>{d.dispose()}),this.agents.clear()}};t.MainThreadChatAgents=h,n=new WeakMap,t.MainThreadChatAgents=h=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object,o.Injector])],h)},59860:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommon=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(95507),m=e(71354);let _=class extends c.WithEventBus{constructor(g,l){super(),this.rpcProtocol=g,this.injector=l,this.subscribedEvent=new Set,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostCommon)}onExtHostEvent(g){if(this.subscribedEvent.has(g.payload.eventName))return this._proxy.$acceptEvent(g.payload.eventName,g.payload.eventArgs)}async $subscribeEvent(g){this.subscribedEvent.add(g),this.addDispose(p.Disposable.create(()=>{this.$unSubscribeEvent(g)}))}async $unSubscribeEvent(g){this.subscribedEvent.delete(g)}};t.MainThreadCommon=_,n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],_.prototype,"themeService",void 0),n.__decorate([(0,c.OnEvent)(m.ExtHostEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[m.ExtHostEvent]),n.__metadata("design:returntype",void 0)],_.prototype,"onExtHostEvent",null),t.MainThreadCommon=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,r.Injector])],_)},29127:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLayout=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(63067),v=e(52416),m=e(95507);let _=class extends c.Disposable{constructor(g){super(),this.handlerMap=new Map,this.proxy=g.getProxy(m.ExtHostSumiAPIIdentifier.ExtHostLayout)}$setTitle(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.updateTitle(l)}$setIcon(g,l){var h;const u=this.iconService.fromIcon("",l,v.IconType.Background,v.IconShape.Square);(h=this.getHandler(g))===null||h===void 0||h.setIconClass(u)}$setSize(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.setSize(l)}$activate(g){var l;(l=this.getHandler(g))===null||l===void 0||l.activate()}$deactivate(g){var l;(l=this.getHandler(g))===null||l===void 0||l.deactivate()}$setBadge(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.setBadge(l)}async $setVisible(g,l){var h,u,d,E;l?(h=this.getHandler(g))===null||h===void 0||h.show():(!((u=this.getHandler(g))===null||u===void 0)&&u.isActivated()&&((d=this.getHandler(g))===null||d===void 0||d.deactivate()),(E=this.getHandler(g))===null||E===void 0||E.hide())}async $connectTabbar(g){if(!this.handlerMap.has(g)){const l=this.layoutService.getTabbarHandler(g);if(l)this.bindHandleEvents(l);else{const h=this.eventBus.on(p.TabBarRegistrationEvent,u=>{if(u.payload.tabBarId===g){const d=this.layoutService.getTabbarHandler(g);d&&this.bindHandleEvents(d),h.dispose()}});this.addDispose(h)}}}async $isAttached(g){return!!this.layoutService.getTabbarHandler(g)}bindHandleEvents(g){this.handlerMap.set(g.containerId,g),g.onActivate(()=>{this.proxy.$acceptMessage(g.containerId,"activate")}),g.onInActivate(()=>{this.proxy.$acceptMessage(g.containerId,"deactivate")})}getHandler(g){const l=this.layoutService.getTabbarHandler(g);return l||this.logger.warn(`Could not find a handler with \`${g}\``),l}};t.MainThreadLayout=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.MainThreadLayout=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],_)},13877:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLifeCycle=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(37406),p=e(39156);let v=class{constructor(_){this.injector=_}$setExtensionCandidate(_){this.appConfig.isElectronRenderer?this.injector.get(c.IElectronMainLifeCycleService).setExtensionCandidate(_,o.electronEnv.currentWindowId):(0,p.throwNonElectronError)("MainThreadLifeCycle.$setExtensionCandidate")}$setExtensionDir(_){this.appConfig.isElectronRenderer?this.injector.get(c.IElectronMainLifeCycleService).setExtensionDir(_,o.electronEnv.currentWindowId):(0,p.throwNonElectronError)("MainThreadLifeCycle.$setExtensionDir")}};t.MainThreadLifeCycle=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.MainThreadLifeCycle=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[r.Injector])],v)},25740:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTheme=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(52416),v=e(95507);let m=class extends c.Disposable{constructor(s,g){super(),this.rpcProtocol=s,this.injector=g,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostTheme),this.addDispose(this.themeService.onThemeChange(()=>{this._proxy.$notifyThemeChanged()}))}async $getThemeColors(){const s=this.themeService.getCurrentThemeSync();return(0,p.getColorRegistry)().getColors().reduce((l,h)=>{const u=s.getColor(h.id);return u&&(l[h.id.replace(".","-")]=u.toString()),l},{})}};t.MainThreadTheme=m,n.__decorate([(0,r.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),t.MainThreadTheme=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,r.Injector])],m)},96710:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadToolbar=t.KaitianExtensionToolbarService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(52416),p=e(99220),v=e(90888),m=e(17428);let _=class{constructor(){this.btnDelegates=new Map,this.selectDelegates=new Map,this.dropdownButtonDelegates=new Map,this.connected=new Set,this.commandRegistry.registerCommand({id:v.BUTTON_SET_STATE_ID},{execute:(l,h,u)=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).setState(h,u)}}),this.commandRegistry.registerCommand({id:v.BUTTON_SET_CONTEXT_ID},{execute:(l,h)=>{if(this.btnDelegates.has(l)){const u=this.btnDelegates.get(l);u&&u.setContext(h)}}}),this.commandRegistry.registerCommand({id:v.BUTTON_CONNECT_HANDLE_ID},{execute:l=>{this.connected.has(l)||(this.doConnectToolbarButtonHandle(l),this.connected.add(l))}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_STATE_ID},{execute:(l,h)=>{this.selectDelegates.has(l)&&this.selectDelegates.get(l).setState(h)}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_OPTIONS},{execute:(l,h,u)=>{this.selectDelegates.has(l)&&(u.forEach(d=>{d.iconPath&&(d.iconClass=this.iconService.fromIcon(h,d.iconPath,d.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.selectDelegates.get(l).setOptions(u))}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_SELECT_ID},{execute:(l,h)=>{this.selectDelegates.has(l)&&this.selectDelegates.get(l).setSelect(h)}}),this.commandRegistry.registerCommand({id:v.SELECT_CONNECT_HANDLE_ID},{execute:l=>{if(this.connected.has(l)||(this.doConnectToolbarSelectHandle(l),this.connected.add(l)),this.selectDelegates.get(l))return this.selectDelegates.get(l).getValue()}}),this.commandRegistry.registerCommand({id:v.SHOW_POPOVER_ID},{execute:(l,h)=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).showPopOver(h)}}),this.commandRegistry.registerCommand({id:v.HIDE_POPOVER_ID},{execute:l=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).hidePopOver()}})}getPopoverComponent(l,h){const u=()=>{var d,E,f,a;return(0,m.ExtensionLoadingView)({style:{minHeight:!((d=h.popoverStyle)===null||d===void 0)&&d.minHeight?Number((E=h.popoverStyle)===null||E===void 0?void 0:E.minHeight):200,minWidth:!((f=h.popoverStyle)===null||f===void 0)&&f.minWidth?Number((a=h.popoverStyle)===null||a===void 0?void 0:a.minWidth):300}})};return this.toolbarPopover.getComponent(l)||u}registerToolbarButton(l,h,u){const d=l+"."+u.id,E={};return u.states&&Object.keys(u.states).forEach(f=>{const a=u.states[f];E[f]={...a},a.iconPath&&(E[f].iconClass=this.iconService.fromIcon(h,a.iconPath,a.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description||u.title||d,weight:u.weight,when:u.when,component:(0,o.createToolbarActionBtn)({id:d,popoverId:`${l}:${u.popoverComponent}`,title:u.title,styles:E,defaultState:u.defaultState,iconClass:this.iconService.fromIcon(h,u.iconPath,u.iconMaskMode?c.IconType.Mask:c.IconType.Background),popoverComponent:u.popoverComponent?this.getPopoverComponent(`${l}:${u.popoverComponent}`,u):void 0,popoverStyle:u.popoverStyle||{noContainerStyle:!1},delegate:f=>{f&&(this.btnDelegates.set(d,f),u.command&&f.onClick(async()=>{f.showPopOver(),await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onAction",data:u.id})),this.commandService.executeCommand(u.command)}),this.connected.has(d)&&this.doConnectToolbarButtonHandle(d))}})})}doConnectToolbarButtonHandle(l){const h=this.btnDelegates.get(l);h&&(h.onClick(()=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.BUTTON_CLICK_ID,l)),h.onChangeState(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.BUTTON_STATE_CHANGE_ID,l,u)))}registerToolbarSelect(l,h,u){const d=l+"."+u.id,E=u.options||[];return E.forEach(f=>{f.iconPath&&(f.iconClass=this.iconService.fromIcon(h,f.iconPath,f.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description,component:(0,o.createToolbarActionSelect)({styles:u.states,options:E,defaultState:u.defaultState,defaultValue:u.defaultValue,equals:u.optionEqualityKey?(f,a)=>{const b=u.optionEqualityKey;return!f||!a?f===a:f[b]===a[b]}:void 0,delegate:f=>{f&&(this.selectDelegates.set(d,f),u.command&&f.onSelect(a=>{this.commandService.executeCommand(u.command,a)}),this.connected.has(d)&&this.doConnectToolbarSelectHandle(d))}})})}doConnectToolbarSelectHandle(l){const h=this.selectDelegates.get(l);h&&(h.onSelect(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.SELECT_ON_SELECT_ID,l,u)),h.onChangeState(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.SELECT_STATE_CHANGE_ID,l,u)))}registerToolbarDropdownButton(l,h,u){const d=l+"."+u.id,E=u.options||[];return this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description,component:(0,o.createToolbarActionDropdownButton)({options:E,trigger:u.trigger,delegate:f=>{f&&(this.dropdownButtonDelegates.set(d,f),u.command&&f.onSelect(a=>{this.commandService.executeCommand(u.command,a)}),this.connected.has(d)&&this.doConnectToolbarDropdownButtonHandle(d))}})})}doConnectToolbarDropdownButtonHandle(l){const h=this.selectDelegates.get(l);h&&h.onSelect(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.DROPDOWN_BUTTON_ON_SELECT_ID,l,u))}};t.KaitianExtensionToolbarService=_,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarPopoverRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarPopover",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarRegistry",void 0),n.__decorate([(0,r.Autowired)(c.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],_.prototype,"commandRegistry",void 0),t.KaitianExtensionToolbarService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_);let s=class extends o.Disposable{$registerToolbarButtonAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarButton(l,h,u)),Promise.resolve()}$registerToolbarSelectAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarSelect(l,h,u)),Promise.resolve()}$registerDropdownButtonAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarDropdownButton(l,h,u)),Promise.resolve()}};t.MainThreadToolbar=s,n.__decorate([(0,r.Autowired)(_),n.__metadata("design:type",_)],s.prototype,"toolbarService",void 0),t.MainThreadToolbar=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},43837:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadIDEWindow=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(65046),v=e(95507);let m=class extends c.Disposable{constructor(s){super(),this.rpcProtocol=s,this._plainWebviewWindowMap=new Map,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostIDEWindow),window.onbeforeunload=()=>{this.dispose()}}async $createWebviewWindow(s,g,l){let h;return this._plainWebviewWindowMap.has(s)?h=this._plainWebviewWindowMap.get(s):(h=this.webviewService.createWebviewWindow(g,l),h&&(this.disposables.push(h.onMessage(u=>{this._proxy.$postMessage(s,u)})),this.disposables.push(h.onClosed(u=>{this._proxy.$dispatchClosed(s),this.$destroy(s)})),this.disposables.push(h),this._plainWebviewWindowMap.set(s,h))),await h.ready,{windowId:h.windowId,webContentsId:h.webContentsId}}async $show(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.show()}}async $hide(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.hide()}}async $setSize(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.setSize(g)}}async $postMessage(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.postMessage(g)}}async $setAlwaysOnTop(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.setAlwaysOnTop(g)}}async $loadURL(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.loadURL(g)}}async $destroy(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.dispose(),this._plainWebviewWindowMap.delete(s)}}};t.MainThreadIDEWindow=m,n.__decorate([(0,r.Autowired)(p.IWebviewService),n.__metadata("design:type",Object)],m.prototype,"webviewService",void 0),t.MainThreadIDEWindow=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m)},71354:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDidEnabledEvent=t.ExtensionDidUninstalledEvent=t.ExtensionsInitializedEvent=t.ExtensionDidActivatedEvent=t.ExtensionWillContributeEvent=t.ExtensionWillActivateEvent=t.ExtensionBeforeActivateEvent=t.ExtensionApiReadyEvent=t.AbstractExtInstanceManagementService=t.IActivationEventService=t.ExtHostEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class c extends o.BasicEvent{}t.ExtHostEvent=c;let p=class{};t.IActivationEventService=p,t.IActivationEventService=p=n.__decorate([(0,r.Injectable)()],p);class v{}t.AbstractExtInstanceManagementService=v;class m extends o.BasicEvent{}t.ExtensionApiReadyEvent=m;class _ extends o.BasicEvent{}t.ExtensionBeforeActivateEvent=_;class s extends o.BasicEvent{}t.ExtensionWillActivateEvent=s;class g extends o.BasicEvent{}t.ExtensionWillContributeEvent=g;class l extends o.BasicEvent{}t.ExtensionDidActivatedEvent=l;class h extends o.BasicEvent{}t.ExtensionsInitializedEvent=h;class u extends o.BasicEvent{}t.ExtensionDidUninstalledEvent=u;class d extends o.BasicEvent{}t.ExtensionDidEnabledEvent=d},21259:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugAdapterContribution=void 0;class e{constructor(r,o,c){this.description=r,this.extDebug=o,this.activationEventService=c}get type(){return this.description.type}get label(){return this.description.label}get languages(){return this.extDebug.$getSupportedLanguages(this.type)}async getSchemaAttributes(){return await this.extDebug.$getSchemaAttributes(this.type)}async getConfigurationSnippets(){return await this.extDebug.$getConfigurationSnippets(this.type)}async provideDebugConfigurations(r,o,c){return await this.extDebug.$provideDebugConfigurations(this.type,r,o,c)}async getDebugConfigurationProvidersCount(r){return await this.extDebug.$getDebugConfigurationProvidersCount(this.type,r)}async resolveDebugConfiguration(r,o){return await this.extDebug.$resolveDebugConfigurations(r,o)}async resolveDebugConfigurationWithSubstitutedVariables(r,o){return await this.extDebug.$resolveDebugConfigurationWithSubstitutedVariables(r,o)}async createDebugSession(r){const{configuration:o}=r;return await this.activationEventService.fireEvent("onDebugAdapterProtocolTracker",o.type),await this.extDebug.$createDebugSession({...r,parentSession:void 0,parent:r.parentSession?r.parentSession.id:void 0})}async terminateDebugSession(r){await this.extDebug.$terminateDebugSession(r)}}t.ExtensionDebugAdapterContribution=e},90384:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(66482),p=e(37499),v=e(51500),m=e(51328),_=e(71354);let s=class{constructor(){this.contributors=new Map,this.toDispose=new o.DisposableCollection,this.sessionId2contrib=new Map,this.activationEvents=new Set,this.init()}init(){this.debugSessionManager.onWillStartDebugSession(l=>this.ensureDebugActivation(l)),this.debugSessionManager.onWillResolveDebugConfiguration(l=>this.ensureDebugActivation(l,"onDebugResolve",l.debugType)),this.debugConfigurationManager.onWillProvideDebugConfiguration(l=>this.ensureDebugActivation(l,"onDebugInitialConfigurations")),this.toDispose.pushAll([o.Disposable.create(()=>{for(const l of this.sessionId2contrib.keys())this.sessionId2contrib.get(l).terminateDebugSession(l);this.sessionId2contrib.clear()})])}registerDebugAdapterContribution(l){const{type:h}=l;return this.contributors.has(h)?(this.logger.warn(`Debugger with type '${h}' already registered.`),o.Disposable.NULL):(this.contributors.set(h,l),o.Disposable.create(()=>this.unregisterDebugAdapterContribution(h)))}unregisterDebugAdapterContribution(l){this.contributors.delete(l)}ensureDebugActivation(l,h,u){typeof l.waitUntil=="function"&&l.waitUntil(this.activateByDebug(h,u))}async activateByDebug(l,h){const u=[this.activationEventService.fireEvent("onDebug")];l&&(u.push(this.activationEventService.fireEvent(l)),h&&u.push(this.activationEventService.fireEvent(l,h))),await Promise.all(u)}async debugTypes(){return Array.from(this.contributors.keys())}async provideDebugConfigurations(l,h,u){const d=this.contributors.get(l);return d?d.provideDebugConfigurations&&d.provideDebugConfigurations(h,void 0,u)||[]:[]}async getDynamicConfigurationsSupportTypes(){const l=new Set;this.extInstanceManagementService.getExtensionInstances().forEach(h=>{var u,d;const E=h.packageJSON,f="onDebugDynamicConfigurations";if(!E.activationEvents)return;const a=[];let b=!1;for(const y of E.activationEvents)y===f?b=!0:y.startsWith(`${f}:`)&&a.push(y.slice(f.length+1));if(a.length)a.forEach(y=>l.add(y));else if(b){const y=(d=(u=E.contributes)===null||u===void 0?void 0:u.debuggers)===null||d===void 0?void 0:d[0].type;y&&l.add(y)}});for(const[h,u]of this.contributors)await u.getDebugConfigurationProvidersCount(m.DebugConfigurationProviderTriggerKind.Dynamic)>0&&l.add(h);return Array.from(l)}async resolveDebugConfiguration(l,h){const u=this.contributors.get(l.type);if(u)try{return await u.resolveDebugConfiguration(l,h)}catch(d){this.logger.error(d)}}async resolveDebugConfigurationWithSubstitutedVariables(l,h){const u=this.contributors.get(l.type);if(u)try{return await u.resolveDebugConfigurationWithSubstitutedVariables(l,h)}catch(d){this.logger.error(d)}}async getDebuggersForLanguage(l){const h=[];for(const u of this.contributors.values()){const d=await u.languages;if(d&&d.indexOf(l)!==-1){const{type:E}=u;h.push({type:E,label:await u.label||E})}}return h}async getSchemaAttributes(l){const h=this.contributors.get(l);return h?h.getSchemaAttributes&&h.getSchemaAttributes()||[]:[]}async getConfigurationSnippets(){let l=[];for(const h of this.contributors.values())h.getConfigurationSnippets&&(l=l.concat(await h.getConfigurationSnippets()));return l}async createDebugSession(l){const{configuration:h}=l,u=this.contributors.get(h.type);if(u){const d=await u.createDebugSession(l);return this.sessionId2contrib.set(d,u),d}}async terminateDebugSession(l){const h=this.sessionId2contrib.get(l);if(h)return this.sessionId2contrib.delete(l),h.terminateDebugSession(l)}dispose(){this.toDispose.dispose()}};t.ExtensionDebugService=s,n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.IDebugSessionManager),n.__metadata("design:type",Object)],s.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(p.DebugConfigurationManager),n.__metadata("design:type",p.DebugConfigurationManager)],s.prototype,"debugConfigurationManager",void 0),n.__decorate([(0,r.Autowired)(_.IActivationEventService),n.__metadata("design:type",_.IActivationEventService)],s.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),t.ExtensionDebugService=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},40576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionContributionRegistry=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(97186);let p=class{constructor(){this.contribs=new Map,this.debug=(0,o.getDebugLogger)(),this.init()}init(){for(const m of this.contributions.getContributions())this.contribs.set(m.debugType,m)}get(m){return this.contribs.get(m)}registerDebugSessionContribution(m){const{debugType:_}=m;return this.contribs.has(_)?(this.debug.warn(`Debug session contribution already registered for ${_}`),o.Disposable.NULL):(this.contribs.set(_,m),o.Disposable.create(()=>this.unregisterDebugSessionContribution(_)))}unregisterDebugSessionContribution(m){this.contribs.delete(m)}};t.ExtensionDebugSessionContributionRegistry=p,n.__decorate([(0,r.Autowired)(c.DebugSessionContribution),n.__metadata("design:type",Object)],p.prototype,"contributions",void 0),t.ExtensionDebugSessionContributionRegistry=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},76452:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionFactory=t.ExtensionDebugSession=void 0;const n=e(43718),r=e(29539),o=e(3520),c=e(51328);class p extends r.DebugSession{constructor(_,s,g,l,h,u,d,E,f,a,b,y){super(_,s,g,l,h,u,d,E,f,a,b),this.id=_,this.options=s,this.connection=g,this.terminalService=l,this.editorService=h,this.breakpointManager=u,this.modelManager=d,this.labelService=E,this.messageService=f,this.fileSystem=a,this.sessionManager=b,this.terminalOptionsExt=y}async doRunInTerminal(_){_.name||(_.name=(0,n.localize)("debug.terminal.title","Debug Process")),_.iconPath||(_.iconPath=new c.ThemeIcon("debug"));const s={..._,...this.terminalOptionsExt};return super.doRunInTerminal(s)}}t.ExtensionDebugSession=p;class v{constructor(_,s,g,l,h,u,d,E,f,a,b,y,A,S){this.editorManager=_,this.breakpoints=s,this.modelManager=g,this.terminalService=l,this.labelService=h,this.messageService=u,this.debugPreferences=d,this.connectionFactory=E,this.fileSystem=f,this.terminalOptionsExt=a,this.debugPreference=b,this.outputService=y,this.injector=A,this.sessionManager=S}get(_,s){const g=this.injector.get(o.DebugSessionConnection,[_,this.connectionFactory,this.getTraceOutputChannel()]);return new p(_,s,g,this.terminalService,this.editorManager,this.breakpoints,this.modelManager,this.labelService,this.messageService,this.fileSystem,this.sessionManager,this.terminalOptionsExt)}getTraceOutputChannel(){if(this.debugPreferences["debug.trace"])return this.outputService.getChannel("Debug adapters")}}t.ExtensionDebugSessionFactory=v},77385:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(76452),t),n.__exportStar(e(40576),t),n.__exportStar(e(90384),t),n.__exportStar(e(21259),t)},51072:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initNodeThreadAPIProxy=g,t.initWorkerThreadAPIProxy=l;const n=e(46147),r=e(57484),o=e(10273),c=e(24060),p=e(69696),v=e(53191),m=e(4321),_=e(43812),s=e(38408);function g(h,u,d){h.set(n.MainThreadAPIIdentifier.MainThreadExtensionService,d);const E=u.get(m.MainThreadTreeView,[h,"node"]),f=u.get(s.MainThreadWindowState,[h]),a=u.get(_.MainThreadWindow,[h]),b=u.get(r.MainThreadConnection,[h]),y=u.get(o.MainThreadDebug,[h,b]),A=u.get(p.MainThreadTerminal,[h]),S=u.get(c.MainThreadTasks,[h]),w=u.get(v.MainThreadTestsImpl,[h]);return h.set(n.MainThreadAPIIdentifier.MainThreadTreeView,E),h.set(n.MainThreadAPIIdentifier.MainThreadWindowState,f),h.set(n.MainThreadAPIIdentifier.MainThreadWindow,a),h.set(n.MainThreadAPIIdentifier.MainThreadConnection,b),h.set(n.MainThreadAPIIdentifier.MainThreadDebug,y),h.set(n.MainThreadAPIIdentifier.MainThreadTerminal,A),h.set(n.MainThreadAPIIdentifier.MainThreadTasks,S),h.set(n.MainThreadAPIIdentifier.MainThreadTests,w),()=>{E.dispose(),f.dispose(),a.dispose(),b.dispose(),y.dispose(),A.dispose(),S.dispose(),w.dispose()}}function l(h,u,d){h.set(n.MainThreadAPIIdentifier.MainThreadExtensionService,d);const E=u.get(m.MainThreadTreeView,[h,"worker"]);return h.set(n.MainThreadAPIIdentifier.MainThreadTreeView,E),()=>{E.dispose()}}},2717:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadProgress=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(68969),p=e(43718),v=e(46147);let m=class{constructor(s){this.rpcProtocol=s,this.progress=new Map,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostProgress)}$startProgress(s,g,l){const h=this.createTask(s);g.location===p.ProgressLocation.Notification&&l&&(g={...g,location:p.ProgressLocation.Notification}),this.progressService.withProgress(g,h,()=>this.proxy.$acceptProgressCanceled(s))}$progressReport(s,g){const l=this.progress.get(s);l&&l.progress.report(g)}$progressEnd(s){const g=this.progress.get(s);g&&(g.resolve(),this.progress.delete(s))}dispose(){this.progress.forEach(s=>s.resolve()),this.progress.clear()}createTask(s){return g=>new Promise(l=>{this.progress.set(s,{resolve:l,progress:g})})}};t.MainThreadProgress=m,n.__decorate([(0,r.Autowired)(c.IProgressService),n.__metadata("design:type",Object)],m.prototype,"progressService",void 0),t.MainThreadProgress=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],m)},17802:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSharedAPIProxy=F;const n=e(71742),r=e(46147),o=e(2717),c=e(62783),p=e(61528),v=e(14678),m=e(33530),_=e(23105),s=e(78690),g=e(84680),l=e(85589),h=e(11646),u=e(22869),d=e(14382),E=e(13335),f=e(89626),a=e(977),b=e(43404),y=e(48721),A=e(62909),S=e(39261),w=e(87781),T=e(79813),D=e(33111),I=e(62876),O=e(93633),M=e(49731),R=e(31968),P=e(73082),k=e(13643);function F(L,B){const j=B.get(f.MainThreadLanguages,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadLanguages,j);const W=B.get(v.MainThreadCommands,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadCommands,W);const U=B.get(g.MainThreadExtensionDocumentData,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadDocuments,U);const Q=B.get(l.MainThreadEditorService,[L,U]);L.set(r.MainThreadAPIIdentifier.MainThreadEditors,Q);const V=B.get(A.MainThreadExtensionNotebook,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadNotebook,V);const $=B.get(O.MainThreadStatusBar,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadStatusBar,$);const Y=B.get(y.MainThreadMessage,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadMessages,Y);const z=B.get(M.MainThreadStorage,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadStorage,z);const H=B.get(k.MainThreadWorkspace,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadWorkspace,H);const K=B.get(T.MainThreadQuickOpen,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadQuickOpen,K);const Z=B.get(w.MainThreadPreference,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadPreference,Z);const X=B.get(u.MainThreadEnv,[L,z]);L.set(r.MainThreadAPIIdentifier.MainThreadEnv,X);const ie=B.get(b.MainThreadExtensionLog);L.set(n.MainThreadExtensionLogIdentifier,ie);const oe=B.get(o.MainThreadProgress,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadProgress,oe);const le=B.get(S.MainThreadOutput);L.set(r.MainThreadAPIIdentifier.MainThreadOutput,le);const pe=B.get(d.MainThreadFileSystem,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadFileSystem,pe);const q=B.get(E.MainThreadFileSystemEvent,[L]),Ee=B.get(c.MainThreadWebview,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadWebview,Ee);const _e=B.get(c.MainThreadWebviewView,[L,Ee]);L.set(r.MainThreadAPIIdentifier.MainThreadWebviewView,_e);const te=B.get(P.MainThreadUrls,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadUrls,te);const ge=B.get(m.MainThreadComments,[L,W]);L.set(r.MainThreadAPIIdentifier.MainThreadComments,ge);const Te=B.get(p.MainThreadAuthentication,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadAuthentication,Te);const Pe=B.get(a.MainThreadLocalization,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadLocalization,Pe);const Ae=B.get(h.MainThreadEditorTabsService,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadEditorTabs,Ae);const we=B.get(D.MainThreadSCM,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadSCM,we);const be=B.get(I.MainThreadSecret,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadSecret,be);const fe=B.get(s.MainThreadDecorations,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadDecorations,fe);const xe=B.get(R.MainThreadTheming,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadTheming,xe);const Re=B.get(_.MainThreadCustomEditor,[L,Ee]);return L.set(r.MainThreadAPIIdentifier.MainThreadCustomEditor,Re),{setup:async()=>{await Ee.init()},dispose:()=>{j.dispose(),W.dispose(),$.dispose(),U.dispose(),V.dispose(),Q.dispose(),Y.dispose(),z.dispose(),H.dispose(),K.dispose(),Z.dispose(),X.dispose(),oe.dispose(),le.dispose(),pe.dispose(),q.dispose(),Ee.dispose(),_e.dispose(),te.dispose(),Te.dispose(),ge.dispose(),Ae.dispose(),we.dispose(),be.dispose(),fe.dispose(),xe.dispose(),Re.dispose()}}}},62783:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWebviewView=t.MainThreadWebview=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=e(76003),c=e(8919),p=e(41869),v=e(74654),m=e(19805),_=e(40827),s=e(43718),g=e(54414),l=e(57517),h=e(63067),u=e(52416),d=e(65046),E=e(46147),f=e(53043),a=e(88341),b=e(71354),{addMapElement:y}=p.arrays;let A=class extends p.Disposable{constructor(I){super(),this.rpcProtocol=I,this.webviewPanels=new Map,this.webviews=new Map,this.plainWebviews=new Map,this.webviewPanelStates=new Map,this._hasSerializer=new Set,this.statePersister=new Map,this.proxy=this.rpcProtocol.getProxy(E.ExtHostAPIIdentifier.ExtHostWebview),this.sumiProxy=this.rpcProtocol.getProxy(E.ExtHostAPIIdentifier.SumiExtHostWebview),this.initEvents(),this.extWebviewStorage=this.getStorage(new p.URI("extension-webview-panels").withScheme(p.STORAGE_SCHEMA.SCOPE)),this.webviewService.registerWebviewReviver({revive:O=>this.reviveWebview(O),handles:async O=>(await this.extWebviewStorage).get(O)?10:-1})}async init(){await this.proxy.$init()}isSupportedLink(I,O,M){if(m.HttpOpener.standardSupportedLinkSchemes.has(I.scheme))return!0;if(O.enableCommandUris&&I.scheme===p.Schemes.command){const{id:R,args:P}=v.CommandOpener.parseURI(I);if(!this.commandRegistry.isPermittedCommand(R,M,...P))throw new Error(`Extension ${M.id} has not permit to execute ${R}`);return!0}return!1}initEvents(){this.addDispose(this.editorService.onActiveResourceChange(()=>{this.onChange()})),this.addDispose(this.eventBus.on(l.EditorGroupChangeEvent,()=>{this.onChange()}))}isActive(I,O,M){return I.resourceState.uri.isEqual(O?.uri)&&I.resourceState.openTypeId===M?.componentId}onChange(){const I=this.editorService.currentResource,O=this.editorService.currentEditorGroup.currentOpenType,M=this.editorService.editorGroups.map(R=>({resource:R.currentResource,openType:R.currentOpenType,index:R.index+1}));this.webviewPanelStates.forEach((R,P)=>{if(!this.hasWebviewPanel(P))return;let k=!1;const F=this.getWebviewPanel(P);if(R.active?(!I||!this.isActive(F,I,O))&&(R.active=!1,k=!0):I&&this.isActive(F,I,O)&&(R.active=!0,k=!0),R.visible){const L=M.find(B=>B.resource&&this.isActive(F,B.resource,B.openType));L?L.index!==R.position&&(R.position=L.index,k=!0):(R.visible=!1,R.position=-1,k=!0)}else{const L=M.find(B=>B.resource&&this.isActive(F,B.resource,B.openType));L&&(R.visible=!0,R.position=L.index,k=!0)}k&&(this.proxy.$onDidChangeWebviewPanelViewState(P,R),R.position!==this.getWebviewPanel(P).viewColumn&&(this.getWebviewPanel(P).viewColumn=R.position,this._persistWebviewPanelMeta(P)))})}$createWebviewPanel(I,O,M,R={},P={},k){this.doCreateWebviewPanel(I,O,M,R,P,k)}pipeBrowserHostedWebviewPanel(I,O,M,R,P){const k=I.id,F=new S(k,M,O,{},{},P,I);this.onCreateWebviewPanel(F),this.proxy.$pipeBrowserHostedWebviewPanel(k,M)}async reviveWebview(I){var O;const M=(await this.extWebviewStorage).get(I);if(!M)throw new Error("No revival info for webview "+I);const{viewType:R,webviewOptions:P,extensionInfo:k,title:F}=M;await this.activation.fireEvent("onWebviewPanel",R);const L=await this.getPersistedWebviewState(R,I),B=this.webviewService.createEditorWebviewComponent({allowScripts:P.enableScripts,allowForms:(O=P.enableForms)!==null&&O!==void 0?O:P.enableScripts,longLive:P.retainContextWhenHidden},I,{extWebview:R}),j=B.group?B.group.index+1:M.viewColumn;await this.doCreateWebviewPanel(I,R,F,{viewColumn:j},P,k,L),await this.proxy.$deserializeWebviewPanel(I,R,F,await this.getPersistedWebviewState(R,I),j,P)}onCreateWebviewPanel(I){this.webviewPanels.set(I.id,I);const O=I.webview,M=I.id;I.editorWebview&&I.addDispose(I.editorWebview),I.addDispose(this.connectWebview(I.id,I.webview)),I.addDispose(O.onRemove(()=>{O.dispose(),this.proxy.$onDidDisposeWebviewPanel(M)})),this.webviewPanelStates.set(I.id,{active:!1,visible:!1,position:-1}),this.addDispose({dispose:()=>{this.webviewPanels.has(M)&&this.getWebviewPanel(M).dispose()}}),O.onDidClickLink(R=>{this.isSupportedLink(R,I.options,I.extensionInfo)&&this.openerService.open(R)}),this.addDispose(O.onDidUpdateState(R=>{this._hasSerializer.has(I.viewType)&&this.persistWebviewState(I.viewType,M,R)})),this._persistWebviewPanelMeta(M)}async doCreateWebviewPanel(I,O,M,R={},P={},k,F){var L;const B=this.webviewService.createEditorWebviewComponent({allowScripts:P.enableScripts,allowForms:(L=P.enableForms)!==null&&L!==void 0?L:P.enableScripts,longLive:P.retainContextWhenHidden},I,{extWebview:O}),j=new S(I,O,{uri:B.webviewUri,openTypeId:B.componentId},R,P,k,B.webview,B);B.title=M,this.onCreateWebviewPanel(j),B.supportsRevive=this._hasSerializer.has(j.viewType);const W=(0,f.viewColumnToResourceOpenOptions)(R.viewColumn);B.open(W),F&&(j.webview.state=F)}getWebviewPanel(I){if(!this.webviewPanels.has(I))throw new Error(`No Webview with id: ${I} was found in the browser process.`);return this.webviewPanels.get(I)}hasWebviewPanel(I){return this.webviewPanels.has(I)}$disposeWebview(I){this.getWebviewPanel(I).dispose(),this.webviewPanels.delete(I),this._persistWebviewPanelMeta(I)}$reveal(I,O={}){var M;const R=this.getWebviewPanel(I),P=Object.assign({},R.showOptions,O).viewColumn;(M=R.editorWebview)===null||M===void 0||M.open((0,f.viewColumnToResourceOpenOptions)(P))}$setTitle(I,O){const M=this.getWebviewPanel(I);M.editorWebview&&(M.editorWebview.title=O,M.title=O,this._persistWebviewPanelMeta(I))}$setIconPath(I,O){const M=this.getWebviewPanel(I);M.editorWebview&&(O?M.editorWebview.icon=this.iconService.fromIcon("",O,u.IconType.Background)+" background-tab-icon":M.editorWebview.icon="")}connectWebview(I,O){this.webviews.set(I,O);const M=new p.Disposable;return M.addDispose(O.onMessage(R=>{this.proxy.$onMessage(I,R)})),M.addDispose(y(this.webviews,I,O)),O.onDispose(()=>{M.dispose()}),M}getWebview(I){return this.webviews.get(I)}$setHtml(I,O){var M;(M=this.getWebview(I))===null||M===void 0||M.setContent(O)}$setOptions(I,O){var M;(M=this.getWebview(I))===null||M===void 0||M.updateOptions({allowScripts:O.enableScripts,allowForms:O.enableForms})}async $postMessage(I,O){var M;try{return await((M=this.getWebview(I))===null||M===void 0?void 0:M.postMessage(O)),!0}catch{return!1}}$registerSerializer(I){this._hasSerializer.add(I),this.webviewPanels.forEach(O=>{O.viewType===I&&O.editorWebview&&(O.editorWebview.supportsRevive=!0)})}$unregisterSerializer(I){this._hasSerializer.add(I)}_persistWebviewPanelMeta(I){return this.extWebviewStorage.then(O=>{this.webviewPanels.has(I)?O.set(I,this.getWebviewPanel(I).toJSON()):O.delete(I)})}async persistWebviewState(I,O,M){this.statePersister.has(I)||this.statePersister.set(I,this.getStorage(new p.URI("extension-webview/"+I).withScheme(p.STORAGE_SCHEMA.SCOPE)).then(R=>{const P=(0,r.default)(k=>R.set(O,k),500);return async k=>{await P(k)}})),(await this.statePersister.get(I))(M)}async getPersistedWebviewState(I,O){return(await this.getStorage(new p.URI("extension-webview/"+I).withScheme(p.STORAGE_SCHEMA.SCOPE))).get(O)}$connectPlainWebview(I){if(!this.plainWebviews.has(I)){const O=this.webviewService.getEditorPlainWebviewComponent(I)||this.webviewService.getOrCreatePlainWebviewComponent(I);O&&(this.plainWebviews.set(I,O),O.webview.onMessage(M=>{this.sumiProxy.$acceptMessage(I,M)}),O.webview.onDispose(()=>{this.plainWebviews.delete(I)}))}}async $postMessageToPlainWebview(I,O){if(this.plainWebviews.has(I))try{return await this.plainWebviews.get(I).webview.postMessage(O),!0}catch(M){return this.logger.error(M),!1}return!1}async $createPlainWebview(I,O,M){const R=this.webviewService.createEditorPlainWebviewComponent({},I);R.title=O,M&&(R.icon=this.iconService.fromIcon("",M)||""),this.$connectPlainWebview(I)}async $plainWebviewLoadUrl(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);await this.plainWebviews.get(I).webview.loadURL(O)}async $setPlainWebviewPartition(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);this.plainWebviews.get(I).webview.setPartition(O??I)}async $disposePlainWebview(I){var O;this.plainWebviews.has(I)&&((O=this.plainWebviews.get(I))===null||O===void 0||O.dispose())}async $revealPlainWebview(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);const M=this.plainWebviews.get(I);if(!M.open)throw new Error("not able to open plain webview id:"+I);await M.open({groupIndex:O})}async $getWebviewResourceRoots(){return Array.from(this.staticResourceService.resourceRoots)}};t.MainThreadWebview=A,n.__decorate([(0,o.Autowired)(d.IWebviewService),n.__metadata("design:type",Object)],A.prototype,"webviewService",void 0),n.__decorate([(0,o.Autowired)(b.IActivationEventService),n.__metadata("design:type",b.IActivationEventService)],A.prototype,"activation",void 0),n.__decorate([(0,o.Autowired)(p.StorageProvider),n.__metadata("design:type",Function)],A.prototype,"getStorage",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",g.WorkbenchEditorService)],A.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(u.IIconService),n.__metadata("design:type",Object)],A.prototype,"iconService",void 0),n.__decorate([(0,o.Autowired)(p.IEventBus),n.__metadata("design:type",Object)],A.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(p.ILogger),n.__metadata("design:type",Object)],A.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(_.StaticResourceService),n.__metadata("design:type",_.StaticResourceService)],A.prototype,"staticResourceService",void 0),n.__decorate([(0,o.Autowired)(p.IOpenerService),n.__metadata("design:type",Object)],A.prototype,"openerService",void 0),n.__decorate([(0,o.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],A.prototype,"commandRegistry",void 0),t.MainThreadWebview=A=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__param(0,(0,o.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],A);class S extends p.Disposable{constructor(I,O,M,R,P,k,F,L){super(),this.id=I,this.viewType=O,this.resourceState=M,this.showOptions=R,this.options=P,this.extensionInfo=k,this.webview=F,this.editorWebview=L}toJSON(){return{id:this.id,viewType:this.viewType,viewColumn:this.viewColumn,extensionInfo:this.extensionInfo,webviewOptions:this.options,title:this.title}}}class w extends p.Disposable{constructor(I,O,M,R){super(),this.id=I,this.viewType=O,this.extension=M,this.webview=R}}let T=class extends s.WithEventBus{constructor(I,O){super(),this.mainThreadWebview=O,this._webviewViews=new Map,this._resolvers=new Map,this.proxy=I.getProxy(E.ExtHostAPIIdentifier.ExtHostWebviewView)}$registerWebviewViewProvider(I,O,M={}){this._resolvers.set(O,{extension:I,options:M}),this.eventBus.fire(new E.WebviewViewResolverRegistrationEvent({viewType:O,options:M}))}$unregisterWebviewViewProvider(I){this._resolvers.delete(I),this.eventBus.fire(new E.WebviewViewResolverRegistrationRemovalEvent({viewType:I}))}$setWebviewViewTitle(I,O){var M;const R=this._webviewViews.get(I);R&&((M=this.mainLayout.getTabbarHandler(R.viewType))===null||M===void 0||M.updateViewTitle(R.viewType,O||""))}$setWebviewViewDescription(I,O){const M=this._webviewViews.get(I)}onWebviewViewShouldShow(I){const O=I.payload.viewType;this._resolvers.has(O)?I.payload.disposer.addDispose(this.resolveWebviewView(I.payload.container,O,I.payload.title,I.payload.cancellationToken)):this.addDispose(this.eventBus.on(E.WebviewViewResolverRegistrationEvent,M=>{M.payload.viewType===O&&this._resolvers.has(O)&&I.payload.disposer.addDispose(this.resolveWebviewView(I.payload.container,O,I.payload.title,I.payload.cancellationToken))}))}resolveWebviewView(I,O,M,R){var P;const k=new p.Disposable,F=this.webviewService.createWebview(),L=(P=this._resolvers.get(O))===null||P===void 0?void 0:P.options,B=this._resolvers.get(O).extension,j=F.id,W=new w(j,O,B,F);W.addDispose(this.mainThreadWebview.connectWebview(j,F)),W.addDispose(y(this._webviewViews,j,W)),W.addDispose(F);const U=()=>{const $=this.mainLayout.isViewVisible(O);this.proxy.$onDidChangeWebviewViewVisibility(j,$),L?.retainContextWhenHidden||($?(F.appendTo(I),W.addDispose(this.mainThreadWebview.connectWebview(j,F))):F.remove())};k.addDispose(this.eventBus.on(h.ViewCollapseChangedEvent,$=>{$.payload.viewId===O&&U()}));const Q=this.mainLayout.getTabbarHandler(O);Q&&(k.addDispose(Q?.onActivate(()=>{U()})),k.addDispose(Q?.onInActivate(()=>{U()}))),this.proxy.$resolveWebviewView(j,O,M,F.state,R);const V=this.mainLayout.isViewVisible(O);return this.proxy.$onDidChangeWebviewViewVisibility(j,V),(L?.retainContextWhenHidden||V)&&F.appendTo(I),k.addDispose(W),{dispose:()=>W.dispose()}}$setBadge(I,O){const M=this._webviewViews.get(I);if(M){M.badge=O;const R=this.mainLayout.getTabbarHandler(M.viewType);R&&(R.setBadge(O||""),R.accordionService.updateViewBadge(M.viewType,O||""))}}$show(I,O){const M=this._webviewViews.get(I);M&&this.mainLayout.revealView(M.viewType)}};t.MainThreadWebviewView=T,n.__decorate([(0,o.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],T.prototype,"mainLayout",void 0),n.__decorate([(0,o.Autowired)(d.IWebviewService),n.__metadata("design:type",Object)],T.prototype,"webviewService",void 0),n.__decorate([(0,s.OnEvent)(a.WebviewViewShouldShowEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[a.WebviewViewShouldShowEvent]),n.__metadata("design:returntype",void 0)],T.prototype,"onWebviewViewShouldShow",null),t.MainThreadWebviewView=T=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,A])],T)},61528:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadAuthentication=t.MainThreadAuthenticationProvider=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(72665),m=e(46147),_=e(71354);let s=class extends c.Disposable{constructor(h,u,d,E){super(),this._proxy=h,this.id=u,this.label=d,this.supportsMultipleAccounts=E,this._accounts=new Map,this._sessions=new Map}async initialize(){return this.registerCommandsAndContextMenuItems()}async manageTrustedExtensions(h){const u=await this.authenticationService.getAllowedExtensions(this.id,h);if(!u.length){this.dialogService.info((0,c.localize)("authentication.noTrustedExtensions"));return}const d=await this.authenticationService.getAccountUsages(this.id,h),E=u.map(a=>{const b=d.find(y=>a.id===y.extensionId);return{label:a.name,description:b?(0,c.localize)("authentication.accountLastUsedDate"):(0,c.localize)("authentication.notUsed"),value:a}}),f=await this.quickPickService.show(E,{title:(0,c.localize)("authentication.manageTrustedExtensions"),placeholder:(0,c.localize)("authentication.manageExtensions")});f&&await this.authenticationService.setAllowedExtensions(this.id,h,[f])}async signOut(h){const u=await this.authenticationService.getAccountUsages(this.id,h),d=this._accounts.get(h),E=u.length?(0,c.formatLocalize)("authentication.signOutMessage",h,u.map(a=>a.extensionName).join(`
31551
+ ${O.message}`)}}async updateExtHostData(){const I=this.extensionInstanceManageService.getExtensionInstances();this.appConfig.noExtHost||await this.nodeExtensionService.updateExtensionData(I),this.appConfig.extWorkerHost&&await this.workerExtensionService.updateExtensionData(I)}async fireActivationEventsIfNeed(I){if(!Array.isArray(I)||!I.length)return;const O=["*","onStartupFinished"],M=I.filter(P=>P!=="*"),R=Array.from(this.activationEventService.activatedEventSet).map(P=>JSON.parse(P)).filter(({topic:P,data:k})=>M.find(F=>F===`${P}:${k}`));for(const P of O)I.includes(P)&&(this.logger.verbose(`Fire activation event ${P}`),this.activationEventService.fireEvent(P));for(const P of R){const{topic:k,data:F}=P;this.logger.verbose(`Fire activation event ${k}:${F}`),this.activationEventService.fireEvent(k,F)}await this.activateByWorkspaceContains(I)}async activateByWorkspaceContains(I){if(!Array.isArray(I)||!I.length)return;const O=[],M=[];for(const P of I)if(/^workspaceContains:/.test(P)){const k=P.substr(18);k.indexOf("*")>=0||k.indexOf("?")>=0?M.push(k):O.push(k)}const R=[];O.length&&R.push(this.workspaceService.containsSome(O)),M.length&&R.push((async()=>{try{return(await this.fileSearchService.find("",{rootUris:this.workspaceService.tryGetRoots().map(k=>new s.URI(k.uri).codeUri.fsPath),includePatterns:M,limit:1})).length>0}catch(P){return this.logger.error(P),!1}})()),R.length&&await Promise.all(R).then(P=>P.some(k=>k))&&this.activationEventService.fireEvent("workspaceContains",[...O,...M][0])}async getExtensionsMetaData(I,O){if(!this.extensionMetaDataArr){const M=await this.extensionNodeClient.getAllExtensions(I,O,(0,s.getLanguageId)(),n.extraMetadata);this.extensionMetaDataArr=M}return this.logger.log("extensions count:",this.extensionMetaDataArr.length),this.extensionMetaDataArr}async runEagerExtensionsContributes(){await Promise.all([this.contributesService.initialize(),this.sumiContributesService.initialize()]),this.commandRegistry.beforeExecuteCommand(async(I,O)=>(await this.activationEventService.fireEvent("onCommand",I),O)),this.eventBus.fire(new s.ExtensionDidContributes)}async runExtensionContributes(){const I=Array.from(this.extensionInstanceManageService.getExtensionInstances());Promise.all(I.map(O=>this.activateByWorkspaceContains(O.packageJSON.activationEvents))).catch(O=>this.logger.error(O))}whetherWebExtension({packageJSON:I}){const{browser:O,main:M}=I||{},R=!!this.appConfig.noExtHost;if(O&&!M)return!0;if(O&&M)return R;if(!O&&M)return!1;if(typeof I.contributes<"u"){for(const P of["debuggers","terminal","typescriptServerPlugins"])if(I.contributes.hasOwnProperty(P))return!1}return R}async activeExtension(I){const O=this.whetherWebExtension(I);O&&!this.appConfig.extWorkerHost&&this.logger.error("[extension.service]: has no ext worker host"),await Promise.all([this.nodeExtensionService.activeExtension(I,O),this.workerExtensionService.activeExtension(I,O)]),await this.viewExtensionService.activeExtension(I,this.nodeExtensionService.protocol),this.eventBus.fire(new s.ExtensionActivatedEvent({topic:"onExtensionActivated",data:{id:I.id}}))}resetExtensionInstances(){this.extensionInstanceManageService.resetExtensionInstances(),this.nodeExtensionService.disposeApiFactory(),this.workerExtensionService.disposeApiFactory()}disposeSumiViewExtension(){const I=Array.from(this.viewExtensionService.activatedViewExtensionMap.keys());this.extensionInstanceManageService.disposeExtensionInstancesByPath(I)}async rerunSumiViewExtensionContributes(){const{activatedViewExtensionMap:I}=this.viewExtensionService,O=Array.from(I.keys());await Promise.all(O.map(M=>{const R=this.extensionInstanceManageService.getExtensionInstanceByPath(M);R&&(R.initialize(),this.contributesService.register(R.id,R.contributes),this.sumiContributesService.register(R.id,R.packageJSON.sumiContributes||{}))})),I.clear(),await Promise.all([this.contributesService.initialize(),this.sumiContributesService.initialize()])}async disposeExtProcess(){await this.nodeExtensionService.disposeProcess(),await this.workerExtensionService.disposeProcess()}async disposeExtensions(){this.extensionInstanceManageService.disposeExtensionInstances()}async executeExtensionCommand(I,O){var M;const R=this.extensionCommandManager.getExtensionCommandEnv(I);if(!R)throw new Error('No Command with id "'+I+'" is declared by extensions');return await((M=this.ready.get(R))===null||M===void 0?void 0:M.promise),this.extensionCommandManager.executeExtensionCommand(R,I,O)}get invalidReloadStrategy(){return this.corePreferences["application.invalidExthostReload"]}async $restartExtProcess(){this.logger.log("[ext-restart]: receive the command from the node side to restart the process"),await this.restartExtProcess(f.ERestartPolicy.Always)}async $processNotExist(){return this.logger.log("[ext-restart]: receive the command from the node side that the process does not exist"),this.$restartExtProcess(),"ok"}async showReloadWindow(){const I=(0,s.localize)("extension.invalidExthostReload.confirm.ok"),O=[I],M=this.invalidReloadStrategy==="ifRequired";M&&O.unshift((0,s.localize)("extension.invalidExthostReload.confirm.cancel")),await this.dialogService.info((0,s.localize)("extension.invalidExthostReload.confirm.content"),O,!!M)===I&&this.clientApp.fireOnReload()}async $processCrashRestart(){var I,O;this.pCrashMessageModel&&((O=(I=this.pCrashMessageModel).cancel)===null||O===void 0||O.call(I));const M=(0,s.localize)("common.yes"),R=[M],P=this.invalidReloadStrategy==="ifRequired";P&&R.unshift((0,s.localize)("common.no")),this.pCrashMessageModel=this.messageService.info((0,s.localize)("extension.crashedExthostReload.confirm"),R,!!P);const k=await this.pCrashMessageModel;this.pCrashMessageModel=void 0,k===M&&await this.restartExtProcess(f.ERestartPolicy.Always)}};t.ExtensionServiceImpl=T,T.extraMetadata={[f.LANGUAGE_BUNDLE_FIELD]:"./package.nls.json"},r.__decorate([(0,c.Autowired)(f.ExtensionNodeServiceServerPath),r.__metadata("design:type",Object)],T.prototype,"extensionNodeClient",void 0),r.__decorate([(0,c.Autowired)(m.AppConfig),r.__metadata("design:type",Object)],T.prototype,"appConfig",void 0),r.__decorate([(0,c.Autowired)(m.CommandRegistry),r.__metadata("design:type",Object)],T.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(S.IActivationEventService),r.__metadata("design:type",y.ActivationEventServiceImpl)],T.prototype,"activationEventService",void 0),r.__decorate([(0,c.Autowired)(E.IWorkspaceService),r.__metadata("design:type",Object)],T.prototype,"workspaceService",void 0),r.__decorate([(0,c.Autowired)(l.IExtensionStorageService),r.__metadata("design:type",Object)],T.prototype,"extensionStorageService",void 0),r.__decorate([(0,c.Autowired)(_.IProgressService),r.__metadata("design:type",Object)],T.prototype,"progressService",void 0),r.__decorate([(0,c.Autowired)(d.IDialogService),r.__metadata("design:type",Object)],T.prototype,"dialogService",void 0),r.__decorate([(0,c.Autowired)(m.IClientApp),r.__metadata("design:type",Object)],T.prototype,"clientApp",void 0),r.__decorate([(0,c.Autowired)(m.ILogger),r.__metadata("design:type",Object)],T.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(d.IMessageService),r.__metadata("design:type",Object)],T.prototype,"messageService",void 0),r.__decorate([(0,c.Autowired)(m.CorePreferences),r.__metadata("design:type",Object)],T.prototype,"corePreferences",void 0),r.__decorate([(0,c.Autowired)(a.AbstractWorkerExtProcessService),r.__metadata("design:type",a.AbstractWorkerExtProcessService)],T.prototype,"workerExtensionService",void 0),r.__decorate([(0,c.Autowired)(a.AbstractNodeExtProcessService),r.__metadata("design:type",a.AbstractNodeExtProcessService)],T.prototype,"nodeExtensionService",void 0),r.__decorate([(0,c.Autowired)(a.AbstractViewExtProcessService),r.__metadata("design:type",a.AbstractViewExtProcessService)],T.prototype,"viewExtensionService",void 0),r.__decorate([(0,c.Autowired)(f.IExtCommandManagement),r.__metadata("design:type",f.IExtCommandManagement)],T.prototype,"extensionCommandManager",void 0),r.__decorate([(0,c.Autowired)(S.AbstractExtInstanceManagementService),r.__metadata("design:type",S.AbstractExtInstanceManagementService)],T.prototype,"extensionInstanceManageService",void 0),r.__decorate([(0,c.Autowired)(h.FileSearchServicePath),r.__metadata("design:type",Object)],T.prototype,"fileSearchService",void 0),r.__decorate([(0,c.Autowired)(w.VSCodeContributesServiceToken),r.__metadata("design:type",w.VSCodeContributesService)],T.prototype,"contributesService",void 0),r.__decorate([(0,c.Autowired)(A.SumiContributionsServiceToken),r.__metadata("design:type",A.SumiContributionsService)],T.prototype,"sumiContributesService",void 0),r.__decorate([(0,c.Autowired)(m.PreferenceService),r.__metadata("design:type",Object)],T.prototype,"preferenceService",void 0),r.__decorate([(0,c.Autowired)(l.IExtensionStoragePathServer),r.__metadata("design:type",Object)],T.prototype,"extensionStoragePathServer",void 0),r.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),r.__metadata("design:type",c.Injector)],T.prototype,"injector",void 0),r.__decorate([(0,c.Autowired)(u.IFileServiceClient),r.__metadata("design:type",Object)],T.prototype,"fileServiceClient",void 0),r.__decorate([(0,c.Autowired)(p.WSChannelHandler),r.__metadata("design:type",p.WSChannelHandler)],T.prototype,"channelHandler",void 0),r.__decorate([(0,s.OnEvent)(m.ExtensionActivateEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[m.ExtensionActivateEvent]),r.__metadata("design:returntype",Promise)],T.prototype,"onActivateExtension",null),r.__decorate([(0,s.OnEvent)(S.ExtensionDidEnabledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[S.ExtensionDidEnabledEvent]),r.__metadata("design:returntype",Promise)],T.prototype,"onExtensionEnabled",null),r.__decorate([(0,s.OnEvent)(S.ExtensionDidUninstalledEvent),r.__metadata("design:type",Function),r.__metadata("design:paramtypes",[]),r.__metadata("design:returntype",Promise)],T.prototype,"onExtensionUninstalled",null),t.ExtensionServiceImpl=T=n=r.__decorate([(0,c.Injectable)(),r.__metadata("design:paramtypes",[])],T)},40731:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(97186),p=e(64582),v=e(84660),m=e(99220),_=e(25600),s=e(72464),g=e(57962),l=e(87444),h=e(49413),u=e(98453),d=e(20670),E=e(90731),f=e(98736),a=e(62040),b=e(87543),y=e(70108),A=e(82389),S=e(71354),w=e(77385),T=e(35321);let D=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[m.RequireInterceptorContribution,s.MainThreadExtenderContribution],this.providers=[{token:m.ExtensionService,useClass:b.ExtensionServiceImpl},{token:p.IDebugServer,useClass:w.ExtensionDebugService,override:!0},{token:c.DebugSessionContributionRegistry,useClass:w.ExtensionDebugSessionContributionRegistry,override:!0},{token:S.IActivationEventService,useClass:g.ActivationEventServiceImpl},{token:m.IExtCommandManagement,useClass:l.ExtCommandManagementImpl},{token:S.AbstractExtInstanceManagementService,useClass:h.ExtInstanceManagementService},{token:m.AbstractExtensionManagementService,useClass:u.ExtensionManagementService},{token:_.AbstractNodeExtProcessService,useClass:d.NodeExtProcessService},{token:_.AbstractWorkerExtProcessService,useClass:f.WorkerExtProcessService},{token:_.AbstractViewExtProcessService,useClass:E.ViewExtProcessService},{token:m.IRequireInterceptorService,useClass:m.RequireInterceptorService},{token:T.VSCodeContributesServiceToken,useClass:T.VSCodeContributesService},{token:A.SumiContributionsServiceToken,useClass:A.SumiContributionsService},{token:s.IMainThreadExtenderService,useClass:s.MainThreadExtenderService},a.ExtensionCommandContribution,a.ExtensionClientAppContribution,y.BrowserRequireInterceptorContribution],this.backServices=[{servicePath:m.ExtensionNodeServiceServerPath,clientToken:m.ExtensionService},{servicePath:v.FileSearchServicePath},{servicePath:m.ExtensionHostProfilerServicePath}]}};t.ExtensionModule=D,t.ExtensionModule=D=n.__decorate([(0,r.Injectable)()],D)},30824:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWorkerBootstrapUrl=void 0;var n=e(41869);Object.defineProperty(t,"getWorkerBootstrapUrl",{enumerable:!0,get:function(){return n.getWorkerBootstrapUrl}})},9663:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionMetadataService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(71354);let p=class extends o.Disposable{initialize(m){this.eventBus.fire(new o.ExtensionEnabledEvent(m.toJSON())),this.addDispose(this.registerActivationEvent(m))}registerActivationEvent(m){const{activationEvents:_=[]}=m.packageJSON,s=new o.Disposable;return _.forEach(g=>{g==="onUri"&&(g=`onUri:${m.id}`),s.addDispose(this.activationService.onEvent(g,async()=>{await m.activate()}))}),s}};t.ExtensionMetadataService=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",c.IActivationEventService)],p.prototype,"activationService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),t.ExtensionMetadataService=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},54107:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProxiedDocument=r,t.createProxiedWindow=o;function e(){}function n(c,p){return typeof c[p]=="function"&&/^[a-z]/.test(p)?c[p].bind&&c[p].bind(c):c[p]}function r(c){return new Proxy(document,{get:(p,v)=>{switch(v){case"write":case"writeln":return e;case"querySelector":return m=>m==="head"?c:n(p,v)(m);default:return n(p,v)}}})}function o(c,p){return new Proxy(window,{get:(v,m)=>{switch(m){case"document":return c||r(p);default:return n(v,m)}}})}},70108:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRequireInterceptorContribution=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=n.__importDefault(e(43144)),c=n.__importDefault(e(25873)),p=e(41869),v=e(89953),m=e(57996),_={...o.default,...c.default};let s=class{registerRequireInterceptor(l){l.registerRequireInterceptor({moduleName:"React",load:()=>r.default}),l.registerRequireInterceptor({moduleName:"ReactDOM",load:()=>_}),l.registerRequireInterceptor({moduleName:"ReactDOMClient",load:()=>c.default}),l.registerRequireInterceptor({moduleName:"kaitian-browser",load:h=>(0,m.createBrowserApi)(h.injector,h.extension,h.rpcProtocol)}),l.registerRequireInterceptor({moduleName:"sumi-browser",load:h=>(0,m.createBrowserApi)(h.injector,h.extension,h.rpcProtocol)})}};t.BrowserRequireInterceptorContribution=s,t.BrowserRequireInterceptorContribution=s=n.__decorate([(0,p.Domain)(v.RequireInterceptorContribution)],s)},9438:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retargetEvents=o;const e=["onAbort","onAnimationCancel","onAnimationEnd","onAnimationIteration","onAuxClick","onBlur","onChange","onClick","onClose","onContextMenu","onDoubleClick","onError","onFocus","onGotPointerCapture","onInput","onKeyDown","onKeyPress","onKeyUp","onLoad","onLoadEnd","onLoadStart","onLostPointerCapture","onMouseDown","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onReset","onResize","onScroll","onSelect","onSelectionChange","onSelectStart","onSubmit","onTouchCancel","onTouchMove","onTouchStart","onTouchEnd","onTransitionCancel","onTransitionEnd","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onFocusOut"],n={onDoubleClick:"dblclick"},r={onInput:"onChange",onFocusOut:"onBlur",onSelectionChange:"onSelect"};function o(l){const h=[];return e.forEach(u=>{const d=s(u);function E(f){f.nativeEvent=f;const a=f.path||f.composedPath&&f.composedPath()||g(f.target);for(const b of a){let y=null;const A=p(b),S=c(b);if(S?y=S:y=m(A),A&&y&&_(f,u,y),A&&y&&r[u]&&_(f,r[u],y),f.cancelBubble||b===l)break}}l.addEventListener(d,E,!1),h.push(()=>{l.removeEventListener(d,E,!1)})}),()=>{h.forEach(u=>{u()})}}function c(l){return v(l,"__reactEventHandlers")}function p(l){return v(l,"_reactInternal")}function v(l,h){for(const u in l)if(l.hasOwnProperty(u)&&u.indexOf(h)!==-1)return l[u]}function m(l){if(l){if(l.memoizedProps)return l.memoizedProps;if(l._currentElement&&l._currentElement.props)return l._currentElement.props}}function _(l,h,u){l.persist=()=>{l.isPersistent=()=>!0},u[h]&&u[h](l)}function s(l){return n[l]?n[l]:l.replace(/^on/,"").toLowerCase()}function g(l){const h=[];for(;l;){if(h.push(l),l.tagName==="HTML")return h.push(document),h.push(window),h;l=l.parentElement}}},8403:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShadowRoot=b;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=n.__importDefault(e(43144)),p=e(97267),v=e(41869),m=e(43718),_=e(52416),s=e(25600),g=e(26351),l=({root:y,children:A})=>c.default.createPortal(A,y);function h(y){return y.cloneNode(!0)}function u(y,A){const S=new MutationObserver(w=>{for(const T of w)if(T.type==="childList"){if(T.addedNodes.length>0)for(const D of Array.from(T.addedNodes))A.appendChild(D.cloneNode(!0));if(T.removedNodes.length>0)for(const D of Array.from(T.removedNodes))A.contains(D)&&A.removeChild(D)}});return S.observe(y,{childList:!0,subtree:!0}),{dispose:()=>{S.disconnect()}}}const d="@opensumi/ide-components";function E(y,A,S="alipay"){return(0,v.getCDNHref)(d,y,A,S)}function f(y){const A=document.createElement("link");return A.setAttribute("href",y),A.setAttribute("rel","stylesheet"),A}const a=({id:y,extensionId:A,children:S,proxiedHead:w,cdnType:T,styleSheet:D})=>{const I=(0,o.useRef)(null),[O,M]=o.default.useState(null),R=(0,v.useInjectable)(s.AbstractViewExtProcessService),P=(0,v.useInjectable)(_.IThemeService),k=(0,v.useInjectable)(_.IIconService),F=(0,v.useInjectable)(_.IProductIconService),[L,B]=(0,o.useState)(null);return(0,o.useEffect)(()=>{var j,W;const U=new v.DisposableCollection;if(I.current){const Q=I.current.attachShadow({mode:"open"});if(w){D?(w.appendChild(f(D.componentUri)),w.appendChild(f(D.iconfontUri))):(w.appendChild(f(E("dist/index.css",g.version,T))),w.appendChild(f(E("lib/icon/iconfont/iconfont.css",g.version,T))));const V=h(w);U.push(u(w,V));const $=document.createElement("style");$.id="icon-style",$.innerHTML=(j=k.currentTheme)===null||j===void 0?void 0:j.styleSheetContent,V.appendChild($);const Y=document.createElement("style");Y.id=_.PRODUCT_ICON_STYLE_ID,Y.innerHTML=((W=F.currentTheme)===null||W===void 0?void 0:W.styleSheetContent)||"",V.appendChild(Y),U.pushAll([k.onThemeChange(H=>{$.innerHTML=H.styleSheetContent})]),Q.appendChild(V);const z=R.getPortalShadowRoot(A);z&&z.appendChild(w)}return O||M(Q),P.getCurrentTheme().then(V=>B(V.type)),U.push(P.onThemeChange(V=>{V.type&&V.type!==L&&B(V.type)})),U.dispose.bind(U)}},[]),o.default.createElement("div",{id:y,style:{width:"100%",height:"100%"},ref:I},O&&o.default.createElement(l,{root:O},o.default.createElement("div",{className:(0,r.default)((0,_.getThemeTypeSelector)(L),"shadow-context-wrapper","show-file-icons"),style:{width:"100%",height:"100%"}},S)))};function b(y,A,S,w,T,D,I){const O=y,{getIcon:M}=o.default.useContext(p.IconContext),R=(0,v.useInjectable)(v.LabelService),P=(0,o.useCallback)((k,F)=>R.getIcon(m.URI.parse(k),F),[]);return o.default.createElement(p.ComponentContextProvider,{value:{getIcon:M,localize:m.localize,getResourceIcon:P}},o.default.createElement(a,{id:`${A.id}-${w}`,extensionId:A.id,proxiedHead:T,cdnType:D,styleSheet:I},o.default.createElement(O,{...S})))}},31381:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KaitianBrowserCommand=void 0,t.createBrowserCommandsApiFactory=_;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(21880),v=e(46147);let m=class{constructor(g){this.rpcProtocol=g,this.rpcProtocol&&(this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostCommands))}async executeCommand(g,l,...h){const u={id:l.id,extensionId:l.extensionId,isBuiltin:l.isBuiltin},d=this.commandRegistry.getCommand(g);if(this.proxy&&d)return this.proxy.$executeCommandWithExtensionInfo(g,u,...h);if(!this.commandRegistry.isPermittedCommand(g,u,...h))throw new Error(`Extension ${u.id} has not permit to execute ${g}`);try{return await this.monacoCommandService.executeCommand(g,...h)}catch(f){throw this.logger.error(f),f}}};t.KaitianBrowserCommand=m,n.__decorate([(0,r.Autowired)(p.ICommandServiceToken),n.__metadata("design:type",Object)],m.prototype,"monacoCommandService",void 0),n.__decorate([(0,r.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],m.prototype,"commandRegistry",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),t.KaitianBrowserCommand=m=n.__decorate([(0,r.Injectable)(),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[Object])],m);function _(s,g,l){const h=s.get(m,[l]);return{executeCommand(u,...d){return h.executeCommand(u,g,...d)}}}},25367:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserComponents=v;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=n.__importStar(e(81878)),p=e(56405);function v(m,_){return m.get(o.AppConfig).useExperimentalShadowDom?new Proxy(c,{get(g,l){if(l==="Dialog"||l==="Overlay"){const h=c[l];return u=>r.default.createElement(p.PortalRoot,{otherProps:u,extensionId:_.id,original:h})}return g[l]}}):c}},73566:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(97558);let p=class extends c.AbstractSumiBrowserContributionRunner{run(m){const _=new o.Disposable;if(!this.injector.creatorMap.has(o.ChatAgentViewServiceToken))return this.logger.warn("Not found ChatAgentViewServiceToken"),_;const{chat:s}=this.contribution;return!s||!Array.isArray(s.view)||s.view.forEach(g=>{if(!g.id||!g.component)return;const{extendProtocol:l,extendService:h}=m.getExtensionExtendService(this.extension,g.id),u=`${this.extension.id}:${g.id}`;_.addDispose(this.chatAgentViewService.registerChatComponent({id:u,component:g.component,initialProps:{kaitianExtendService:h,kaitianExtendSet:l,sumiExtendService:h,sumiExtendSet:l}}))}),_}};t.ChatBrowserContributionRunner=p,n.__decorate([(0,r.Autowired)(o.ChatAgentViewServiceToken),n.__metadata("design:type",Object)],p.prototype,"chatAgentViewService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0),t.ChatBrowserContributionRunner=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},23561:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(54414),p=e(57517),v=e(63067),m=e(52416),_=e(97558);let s=class extends _.AbstractSumiBrowserContributionRunner{run(l){const h=new o.Disposable;return this.contribution.editor&&this.contribution.editor.view.forEach(u=>{h.addDispose(this.registerEditorComponent(u,l))}),h}registerEditorComponent(l,h){const u=new o.Disposable,{extendProtocol:d,extendService:E}=h.getExtensionExtendService(this.extension,l.id),f=l.scheme||o.Schemes.file;return u.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:l.id,scheme:f,component:l.component,renderMode:l.renderMode},{kaitianExtendService:E,kaitianExtendSet:d,sumiExtendService:E,sumiExtendSet:d})),f===o.Schemes.file?u.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(f,(a,b)=>{let y=!1;if(l.fileExt&&l.fileExt.indexOf(a.uri.path.ext)>-1){if(!l.shouldPreview)return;l.shouldPreview(a.uri.path)&&(y=!0)}l.handles&&l.handles(a.uri.codeUri)&&(y=!0),y&&b.push({type:p.EditorOpenType.component,componentId:l.id,title:l.title||"\u9884\u89C8",weight:l.priority||10})})):u.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(f,(a,b)=>{l.handles&&!l.handles(a.uri.codeUri)||b.push({type:p.EditorOpenType.component,componentId:l.id,title:l.title||l.id,weight:l.priority||10})})),this.resourceService.registerResourceProvider({scheme:f,provideResource:a=>({uri:a,name:l.tabTitle||l.id,icon:l.tabIconPath?this.iconService.fromIcon(this.extension.path,l.tabIconPath,m.IconType.Background):""})}),u}};t.EditorBrowserContributionRunner=s,n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(c.ResourceService),n.__metadata("design:type",c.ResourceService)],s.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.EditorComponentRegistry),n.__metadata("design:type",p.EditorComponentRegistry)],s.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(m.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.EditorBrowserContributionRunner=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},85406:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditorSideBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(54414),p=e(57517),v=e(51553),m=e(97558);let _=class extends m.AbstractSumiBrowserContributionRunner{run(g){const l=new o.Disposable,h=this.contribution.editorSide;return h&&h.view.forEach(u=>{l.addDispose(this.registerEditorSideComponent(u,g))}),l}registerEditorSideComponent(g,l){const h=new o.Disposable,{extendProtocol:u,extendService:d}=l.getExtensionExtendService(this.extension,g.id);return h.addDispose(this.editorComponentRegistry.registerEditorSideWidget({id:g.id,side:g.side,component:g.component,initialProps:{kaitianExtendService:d,kaitianExtendSet:u,sumiExtendService:d,sumiExtendSet:u},displaysOnResource:()=>this.editorService.editorContextKeyService.match(g?.when)})),h}};t.EditorSideBrowserContributionRunner=_,n.__decorate([(0,r.Autowired)(p.EditorComponentRegistry),n.__metadata("design:type",p.EditorComponentRegistry)],_.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(c.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorServiceImpl)],_.prototype,"editorService",void 0),t.EditorSideBrowserContributionRunner=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},31738:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(97558),p=e(73566),v=e(23561),m=e(85406),_=e(53728),s=e(15765);let g=class extends c.AbstractSumiBrowserContributionRunner{run(h){const u=new o.Disposable;return u.addDispose(this.injector.get(_.TabbarBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(v.EditorBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(m.EditorSideBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(s.ToolBarBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u.addDispose(this.injector.get(p.ChatBrowserContributionRunner,[this.extension,this.contribution]).run(h)),u}};t.SumiBrowserContributionRunner=g,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),t.SumiBrowserContributionRunner=g=n.__decorate([(0,r.Injectable)({multiple:!0})],g)},53728:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(63067),v=e(52416),m=e(97558),_=["left","right","bottom","editor","toolBar"];let s=class extends m.AbstractSumiBrowserContributionRunner{run(l){const h=new c.Disposable;return this.contribution.left&&this.contribution.left.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.left)===null||d===void 0?void 0:d.type,"left"))}),this.contribution.right&&this.contribution.right.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.right)===null||d===void 0?void 0:d.type,"right"))}),this.contribution.bottom&&this.contribution.bottom.view.forEach(u=>{var d;h.addDispose(this.registerTabBar(u,l,(d=this.contribution.bottom)===null||d===void 0?void 0:d.type,"bottom"))}),Object.keys(this.contribution).forEach(u=>{var d;_.indexOf(u)===-1&&((d=this.contribution[u])===null||d===void 0?void 0:d.view).forEach(E=>{h.addDispose(this.registerTabBar(E,l,"replace"))})}),h}registerTabBar(l,h,u="add",d){const{extendProtocol:E,extendService:f}=h.getExtensionExtendService(this.extension,l.id),a=`${this.extension.id}:${l.id}`,b={kaitianExtendService:f,kaitianExtendSet:E,sumiExtendService:f,sumiExtendSet:E};return this.layoutService.viewReady.promise.then(()=>{var y;if(u==="add"){const{component:A,titleComponent:S}=l;this.layoutService.collectTabbarComponent([{id:a}],{...l,iconClass:l.icon?(0,o.getIcon)(l.icon):l.iconPath?this.iconService.fromIcon(this.extension.path,l.iconPath):"",containerId:a,component:A,titleComponent:S,titleProps:b,initialProps:b,fromExtension:!0},d)}else this.layoutService.replaceViewComponent(l,b),l.titleComponent&&((y=this.layoutService.getTabbarHandler(a))===null||y===void 0||y.setTitleComponent(l.titleComponent,b))}),{dispose:()=>{const y=this.layoutService.getTabbarHandler(a);y&&y.dispose()}}}};t.TabbarBrowserContributionRunner=s,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.TabbarBrowserContributionRunner=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},15765:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolBarBrowserContributionRunner=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(63067),p=e(52416),v=e(47289),m=e(97558);let _=class extends m.AbstractSumiBrowserContributionRunner{run(g){const l=new o.Disposable;return this.injector.creatorMap.has(v.IToolBarViewService)?(this.contribution.toolBar&&this.contribution.toolBar.view.forEach(h=>{const{extendProtocol:u,extendService:d}=g.getExtensionExtendService(this.extension,h.id),E=this.toolBarViewService.registerToolBarElement({type:"component",component:h.component,position:h.position||this.contribution.toolBar.position||v.ToolBarPosition.LEFT,initialProps:{kaitianExtendService:d,kaitianExtendSet:u,sumiExtendService:d,sumiExtendSet:u},description:h.description,order:h.order,weight:h.weight});E&&l.addDispose(E)}),l):(this.logger.warn("\u6CA1\u6709\u627E\u5230 toolbarViewService"),l)}};t.ToolBarBrowserContributionRunner=_,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IToolBarViewService),n.__metadata("design:type",v.IToolBarViewService)],_.prototype,"toolBarViewService",void 0),n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],_.prototype,"injector",void 0),t.ToolBarBrowserContributionRunner=_=n.__decorate([(0,r.Injectable)({multiple:!0})],_)},57996:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createBrowserApi=g;const n=e(41869),r=e(81878),o=e(57517),c=e(52416),p=e(16762),v=e(65046),m=e(31381),_=e(25367),{format:s}=n.strings;function g(l,h,u){const d=(0,m.createBrowserCommandsApiFactory)(l,h,u),E=(0,_.createBrowserComponents)(l,h),f=l.get(n.IReporterService);return{...E,commands:d,ResizeHandleHorizontal:r.ResizeHandleHorizontal,ResizeHandleVertical:r.ResizeHandleVertical,PlainWebview:v.PlainWebview,URI:n.URI,localize:(a,b)=>(0,n.localize)(a,b,h.id),formatLocalize:(a,...b)=>s((0,n.localize)(a,void 0,h.id),...b),getIcon:n.getIcon,getThemeColors:()=>{const b=l.get(c.IThemeService).getCurrentThemeSync();return(0,c.getColorRegistry)().getColors().reduce((A,S)=>{const w=b.getColor(S.id);return w&&(A[S.id.replace(".","-")]=w.toString()),A},{})},ToolBarPosition:p.ToolBarPosition,EditorComponentRenderMode:o.EditorComponentRenderMode,reporter:f}}},97558:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractSumiBrowserContributionRunner=void 0;class e{constructor(r,o){this.extension=r,this.contribution=o}}t.AbstractSumiBrowserContributionRunner=e},56543:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.BrowserMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/browser/index.js"}],description:(0,o.localize)("sumiContributes.browserMain")},t.BrowserMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("browserMain"),(0,c.LifeCycle)(4)],p)},88770:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserViewContributionPoint=void 0;const r=e(85608),o=e(76003),c=e(41869),p=e(21634),v=e(43718),m=e(63067),_=e(52416),s=e(99220),g=e(17428),l=e(71354),h=["left","right","bottom","editor","toolBar","editorSide","chat"];let u=n=class extends s.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new v.DisposableCollection}contribute(){return new Promise(E=>{this.mainLayoutService.viewReady.promise.then(()=>{var f;for(const a of this.contributesMap){const{extensionId:b,contributes:y}=a,A=this.extensionManageService.getExtensionInstanceByExtId(b);if(!A)continue;const S=Object.keys(y).filter(w=>!n.unsupportLocation.includes(w));for(let w of S){const T=y[w].view.map(D=>({...D,component:g.ExtensionLoadingView}));if(!h.includes(w))if(!this.mainLayoutService.getTabbarHandler(w))w="left";else{for(const D of T){D.titleComponentId&&(0,v.getDebugLogger)().warn(`custom title component '${D.titleComponentId}' is not allowed for built-in container ${w}!`);const{title:I,id:O,priority:M,component:R,when:P,weight:k}=D,F=((f=this.mainLayoutService.getTabbarHandler(w))===null||f===void 0?void 0:f.containerId)||w,L=this.mainLayoutService.collectViewComponent({id:O,priority:M,component:R,name:I,when:P,weight:k},F,{},{fromExtension:!0});this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(L).disposeView(O)}})}continue}for(const D of T){const{title:I,icon:O,iconPath:M,id:R,priority:P,component:k,expanded:F,noResize:L,when:B,weight:j,hideTab:W}=D,U=`${b}:${R}`,Q=this.mainLayoutService.collectTabbarComponent([{id:R,priority:P,component:k,when:B,weight:j}],{iconClass:M?this.iconService.fromIcon(A.path,M):(0,c.getIcon)(O),title:I&&this.getLocalizeFromNlsJSON(I,b),priority:P,expanded:F,containerId:U,noResize:L,fromExtension:!0,hideTab:W},w);this.disposableCollection.push({dispose:()=>{this.mainLayoutService.getTabbarHandler(Q).dispose()}})}}}E()})})}};t.BrowserViewContributionPoint=u,u.schema=p.browserViews.schema,u.unsupportLocation=["bottom","editor","toolBar","chat"],r.__decorate([(0,o.Autowired)(m.IMainLayoutService),r.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(_.IIconService),r.__metadata("design:type",Object)],u.prototype,"iconService",void 0),r.__decorate([(0,o.Autowired)(l.AbstractExtInstanceManagementService),r.__metadata("design:type",l.AbstractExtInstanceManagementService)],u.prototype,"extensionManageService",void 0),t.BrowserViewContributionPoint=u=n=r.__decorate([(0,o.Injectable)(),(0,s.Contributes)("browserViews"),(0,s.LifeCycle)(3)],u)},82389:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SumiContributionsService=t.SumiContributionsServiceToken=void 0;const n=e(85608),r=e(76003),o=e(99220),c=e(56543),p=e(88770),v=e(35307),m=e(92097),_=e(75591),s=e(68360),g=e(52750),l=e(8678),h=e(43066),u=e(29337);t.SumiContributionsServiceToken=Symbol("SumiContributionsService");let d=class extends o.ExtensionContributesService{constructor(){super(...arguments),this.ContributionPoints=[p.BrowserViewContributionPoint,c.BrowserMainContributionPoint,_.NodeMainContributionPoint,u.WorkerMainContributionPoint,h.ViewsProxiesContributionPoint,m.MenubarsContributionPoint,g.SubmenusContributionPoint,l.ToolbarContributionPoint,v.MenuExtendContributionPoint,s.SCMContributionPoint]}};t.SumiContributionsService=d,t.SumiContributionsService=d=n.__decorate([(0,r.Injectable)()],d)},35307:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenuExtendContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(93899),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){for(const m of this.contributesMap){const{extensionId:_,contributes:s}=m;for(const g of Object.keys(s)){const l=s[g];this.addDispose(this.menuRegistry.registerMenuExtendInfo(g,l.map(h=>{var u;return{...h,extraDesc:this.getLocalizeFromNlsJSON((u=h?.extraDesc)!==null&&u!==void 0?u:"",_)}})))}}}};t.MenuExtendContributionPoint=p,n.__decorate([(0,r.Autowired)(o.IMenuRegistry),n.__metadata("design:type",o.IMenuRegistry)],p.prototype,"menuRegistry",void 0),t.MenuExtendContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("menu-extend"),(0,c.LifeCycle)(3)],p)},92097:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenubarsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(93899),p=e(43718),v=e(52416),m=e(99220),_=e(71354);let s=class extends m.VSCodeContributePoint{contribute(){for(const l of this.contributesMap){const{extensionId:h,contributes:u}=l,d=this.extensionManageService.getExtensionInstanceByExtId(h);if(d)for(const E of u){const f=d.icon?this.iconService.fromIcon("",d.icon,v.IconType.Background):(0,o.getIcon)("default-menu-icon");this.addDispose(this.menuRegistry.registerMenubarItem(E.id,{label:this.getLocalizeFromNlsJSON(E.title,h),order:E.order,nativeRole:E.nativeRole,iconClass:f}))}}}};t.MenubarsContributionPoint=s,s.schema={description:(0,p.localize)("sumiContributes.menubars"),type:"array",items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"${1}",title:"${2}"}}],properties:{id:{type:"string",description:(0,p.localize)("sumiContributes.menubars.id")},title:{type:"string",description:(0,p.localize)("sumiContributes.menubars.title")},order:{type:"number",description:(0,p.localize)("sumiContributes.menubars.order")},nativeRole:{type:"string",description:(0,p.localize)("sumiContributes.menubars.order")}}}},n.__decorate([(0,r.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],s.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extensionManageService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),t.MenubarsContributionPoint=s=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("menubars"),(0,m.LifeCycle)(3)],s)},75591:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.NodeMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/node/index.js"}],description:(0,o.localize)("sumiContributes.nodeMain")},t.NodeMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("nodeMain"),(0,c.LifeCycle)(4)],p)},68360:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCMContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(61656),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{contributes:s}=_;if(s.additional){const{additional:g}=s;if(!g.input)return;const{input:l}=g;if(l.addonAfter||l.addonBefore)return;this.scmService.appendInputProps(l)}}}};t.SCMContributionPoint=v,v.schema={description:(0,o.localize)("sumiContributes.SCM"),type:"object",defaultSnippets:[{body:{additional:{input:{}}}}],properties:{additional:{type:"object",description:(0,o.localize)("sumiContributes.SCM.additional"),properties:{input:{type:"object",description:(0,o.localize)("sumiContributes.SCM.additional.input")}}}}},n.__decorate([(0,r.Autowired)(c.SCMService),n.__metadata("design:type",c.SCMService)],v.prototype,"scmService",void 0),t.SCMContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("scm"),(0,p.LifeCycle)(3)],v)},52750:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubmenusContributionPoint=void 0,t.isValidSubmenu=g;const n=e(85608),r=e(76003),o=e(57559),c=e(93899),p=e(43718),v=e(52416),m=e(99220),_=e(71354),s=e(35166);function g(h,u){if(!Array.isArray(h))return u.error((0,p.formatLocalize)("requirearray")),!1;for(const d of h){if(typeof d.id!="string")return u.error((0,p.formatLocalize)("requirestring","id")),!1;if(d.title&&typeof d.title!="string")return u.error((0,p.formatLocalize)("optstring","title")),!1;if(d.when&&typeof d.when!="string")return u.error((0,p.formatLocalize)("optstring","when")),!1;if(d.group&&typeof d.group!="string")return u.error((0,p.formatLocalize)("optstring","group")),!1}return!0}let l=class extends m.VSCodeContributePoint{contribute(){const u=console;for(const d of this.contributesMap){const{extensionId:E,contributes:f}=d,a=this.extensionManageService.getExtensionInstanceByExtId(E);if(a)for(const b of Object.keys(f)){const y=f[b];if(!g(y,console))return;const A=(0,s.parseMenuId)(b);if((0,p.isUndefined)(A)){u.warn((0,p.formatLocalize)("menuId.invalid","`{0}` is not a valid submenu identifier",b));return}for(const S of y){const[w,T]=(0,s.parseMenuGroup)(S.group);this.addDispose(this.menuRegistry.registerMenuItem(A,{submenu:S.id,label:S.title&&this.getLocalizeFromNlsJSON(S.title,E),iconClass:this.iconService.fromIcon(a.path,S.icon,v.IconType.Background),when:S.when,group:w,order:T,nativeRole:S.nativeRole}))}}}}};t.SubmenusContributionPoint=l,l.schema=o.menus.subMenusSchema,n.__decorate([(0,r.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],l.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],l.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],l.prototype,"extensionManageService",void 0),t.SubmenusContributionPoint=l=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("submenus"),(0,m.LifeCycle)(3)],l)},8678:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(9905),p=e(99220),v=e(71354),m=e(96710);let _=class extends p.VSCodeContributePoint{toLocalized(g,l,h){return l.reduce((u,d)=>(u[d]&&(u[d]=this.getLocalizeFromNlsJSON(u[d],h)),u),g)}contribute(){for(const g of this.contributesMap){const{extensionId:l,contributes:h}=g,u=this.extensionManageService.getExtensionInstanceByExtId(l);if(u){if(h.groups)for(const d of h.groups)this.addDispose(this.toolbarRegistry.registerToolbarActionGroup({id:d.id,preferredLocation:d.preferredLocation,weight:d.weight}));if(h.actions)for(const d of h.actions)switch(d.type){case"button":this.addDispose(this.kaitianExtToolbarService.registerToolbarButton(l,u.path,this.toLocalized(d,["title"],l)));break;case"select":this.addDispose(this.kaitianExtToolbarService.registerToolbarSelect(l,u.path,this.toLocalized(d,["description"],l)));break;case"dropdownButton":this.addDispose(this.kaitianExtToolbarService.registerToolbarDropdownButton(l,u.path,this.toLocalized(d,["description"],l)));break}}}}};t.ToolbarContributionPoint=_,_.schema=c.toolbar.schema,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",m.KaitianExtensionToolbarService)],_.prototype,"kaitianExtToolbarService",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarRegistry",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],_.prototype,"extensionManageService",void 0),t.ToolbarContributionPoint=_=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("toolbar"),(0,p.LifeCycle)(3)],_)},43066:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsProxiesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.ViewsProxiesContributionPoint=p,p.schema={type:"array",markdownDescription:(0,o.localize)("sumiContributes.viewsProxies"),defaultSnippets:[{body:["${1}"]}],items:{type:"string"}},t.ViewsProxiesContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("viewsProxies"),(0,c.LifeCycle)(3)],p)},29337:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMainContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){}};t.WorkerMainContributionPoint=p,p.schema={type:"string",defaultSnippets:[{body:"./out/worker/index.js"}],description:(0,o.localize)("sumiContributes.workerMain")},t.WorkerMainContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("workerMain"),(0,c.LifeCycle)(4)],p)},28949:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSumiAPIFactory=g;const n=e(43718),r=e(95507),o=e(41062),c=e(59860),p=e(29127),v=e(13877),m=e(25740),_=e(96710),s=e(43837);function g(l,h){const u=new n.Disposable,d=h.get(v.MainThreadLifeCycle,[h]),E=h.get(m.MainThreadTheme,[l,h]);u.addDispose(E);const f=h.get(p.MainThreadLayout,[l]);u.addDispose(f);const a=h.get(c.MainThreadCommon,[l,h]);u.addDispose(a);const b=h.get(_.MainThreadToolbar);u.addDispose(b);const y=h.get(s.MainThreadIDEWindow,[l]);u.addDispose(y);const A=h.get(o.MainThreadChatAgents,[l,h]);return u.addDispose(A),l.set(r.MainThreadSumiAPIIdentifier.MainThreadLifecycle,d),l.set(r.MainThreadSumiAPIIdentifier.MainThreadTheme,E),l.set(r.MainThreadSumiAPIIdentifier.MainThreadLayout,f),l.set(r.MainThreadSumiAPIIdentifier.MainThreadCommon,a),l.set(r.MainThreadSumiAPIIdentifier.MainThreadToolbar,b),l.set(r.MainThreadSumiAPIIdentifier.MainThreadIDEWindow,y),l.set(r.MainThreadSumiAPIIdentifier.MainThreadChatAgents,A),()=>{u.dispose()}}},41062:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadChatAgents=void 0;const r=e(85608),o=e(76003),c=e(59347),p=e(77633),v=e(40111),m=e(19413),_=e(8919),s=e(43718),g=e(93062),l=e(95507);let h=class{get chatAgentService(){try{return this.injector.get(m.IChatAgentService)}catch{return null}}get inlineChatFeatureRegistry(){try{return this.injector.get(s.InlineChatFeatureRegistryToken)}catch{return null}}get chatInternalService(){try{return this.injector.get(c.ChatInternalService)}catch{return null}}constructor(d,E){this.injector=E,n.set(this,void 0),this.agents=new Map,this.pendingProgress=new Map,this.responsePartHandlePool=0,this.activeResponsePartPromises=new Map,r.__classPrivateFieldSet(this,n,d.getProxy(l.ExtHostSumiAPIIdentifier.ExtHostChatAgents),"f")}$registerInlineChatProvider(d,E,f){if(!this.inlineChatFeatureRegistry||!this.chatInternalService)return;const a=this.inlineChatFeatureRegistry.registerInteractiveInput({handleStrategy:()=>p.ERunStrategy.PREVIEW},{providePreviewStrategy:async(b,y,A,S)=>{var w;const T=new v.InlineChatController({enableCodeblockRender:!!f.enableCodeblockRender}),D=this.chatInternalService.createRequest(A,E),I=new g.SumiReadableStream;T.mountReadable(I);const O=R=>{if(S.isCancellationRequested){I.abort();return}I.emitData(R)};this.pendingProgress.set(D.requestId,O);const M={sessionId:(w=this.chatInternalService)===null||w===void 0?void 0:w.sessionModel.sessionId,requestId:D.requestId,message:D.message.prompt,command:D.message.command};return r.__classPrivateFieldGet(this,n,"f").$invokeAgent(d,M,{history:[]},S).then(R=>{if(!R){I.end();return}S.isCancellationRequested?I.abort():(R.errorDetails&&D.response.setErrorDetails(R.errorDetails),I.end())}).finally(()=>{this.pendingProgress.delete(D.requestId)}),T}});this.agents.set(d,{name:E,dispose:a.dispose})}$registerAgent(d,E,f){if(!this.chatAgentService)return;const a=this.chatAgentService.registerAgent({id:E,metadata:f,invoke:async(b,y,A,S)=>{var w;this.pendingProgress.set(b.requestId,y);try{return(w=await r.__classPrivateFieldGet(this,n,"f").$invokeAgent(d,b,{history:A.map(T=>({role:s.CoreMessgaeRoleMap[T.role],content:T.content.toString()}))},S))!==null&&w!==void 0?w:{}}finally{this.pendingProgress.delete(b.requestId)}},provideSlashCommands:async b=>{var y;return!((y=this.agents.get(d))===null||y===void 0)&&y.hasSlashCommands?r.__classPrivateFieldGet(this,n,"f").$provideSlashCommands(d,b):[]},provideFollowups:async(b,y)=>{var A;return!((A=this.agents.get(d))===null||A===void 0)&&A.hasFollowups?r.__classPrivateFieldGet(this,n,"f").$provideFollowups(d,b,y):[]},provideSampleQuestions:async b=>{var y;return!((y=this.agents.get(d))===null||y===void 0)&&y.hasSampleQuestions?r.__classPrivateFieldGet(this,n,"f").$provideSampleQuestions(d,b):[]},provideChatWelcomeMessage:async b=>{var y;if(!((y=this.agents.get(d))===null||y===void 0)&&y.hasChatWelcomMessage)return r.__classPrivateFieldGet(this,n,"f").$provideChatWelcomeMessage(d,b)}});this.agents.set(d,{name:E,dispose:a.dispose,hasSlashCommands:f.hasSlashCommands,hasFollowups:f.hasFollowups})}$updateAgent(d,E){if(!this.chatAgentService)return;const f=this.agents.get(d);if(!f)throw new Error(`No agent with handle ${d} registered`);f.hasSlashCommands=E.hasSlashCommands,f.hasFollowups=E.hasFollowups,f.hasSampleQuestions=E.hasSampleQuestions,f.hasChatWelcomMessage=E.hasChatWelcomMessage,f.isDefault=E.isDefault,this.chatAgentService.updateAgent(f.name,E)}async $handleProgressChunk(d,E,f){var a,b;if(E.kind==="asyncContent"){const y=++this.responsePartHandlePool,A=`${d}_${y}`,S=new s.Deferred;return this.activeResponsePartPromises.set(A,S),(a=this.pendingProgress.get(d))===null||a===void 0||a({...E,resolvedContent:S.promise}),y}else if(typeof f=="number"){const y=`${d}_${f}`,A=this.activeResponsePartPromises.get(y);return A&&(E.kind==="content"?A.resolve(E.content):E.kind==="treeData"&&A.resolve(E),this.activeResponsePartPromises.delete(y)),f}(b=this.pendingProgress.get(d))===null||b===void 0||b(E)}$unregisterAgent(d){var E;(E=this.agents.get(d))===null||E===void 0||E.dispose(),this.agents.delete(d)}$populateChatInput(d,E){if(!this.chatAgentService)return;const f=this.agents.get(d);if(!f)throw new Error(`No agent with handle ${d} registered`);this.chatAgentService.populateChatInput(f.name,{command:E.command,message:E.prompt})}$sendMessage(d){this.chatAgentService&&this.chatAgentService.sendMessage(d)}dispose(){this.agents.forEach(d=>{d.dispose()}),this.agents.clear()}};t.MainThreadChatAgents=h,n=new WeakMap,t.MainThreadChatAgents=h=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object,o.Injector])],h)},59860:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommon=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(95507),m=e(71354);let _=class extends c.WithEventBus{constructor(g,l){super(),this.rpcProtocol=g,this.injector=l,this.subscribedEvent=new Set,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostCommon)}onExtHostEvent(g){if(this.subscribedEvent.has(g.payload.eventName))return this._proxy.$acceptEvent(g.payload.eventName,g.payload.eventArgs)}async $subscribeEvent(g){this.subscribedEvent.add(g),this.addDispose(p.Disposable.create(()=>{this.$unSubscribeEvent(g)}))}async $unSubscribeEvent(g){this.subscribedEvent.delete(g)}};t.MainThreadCommon=_,n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],_.prototype,"themeService",void 0),n.__decorate([(0,c.OnEvent)(m.ExtHostEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[m.ExtHostEvent]),n.__metadata("design:returntype",void 0)],_.prototype,"onExtHostEvent",null),t.MainThreadCommon=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,r.Injector])],_)},29127:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLayout=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(63067),v=e(52416),m=e(95507);let _=class extends c.Disposable{constructor(g){super(),this.handlerMap=new Map,this.proxy=g.getProxy(m.ExtHostSumiAPIIdentifier.ExtHostLayout)}$setTitle(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.updateTitle(l)}$setIcon(g,l){var h;const u=this.iconService.fromIcon("",l,v.IconType.Background,v.IconShape.Square);(h=this.getHandler(g))===null||h===void 0||h.setIconClass(u)}$setSize(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.setSize(l)}$activate(g){var l;(l=this.getHandler(g))===null||l===void 0||l.activate()}$deactivate(g){var l;(l=this.getHandler(g))===null||l===void 0||l.deactivate()}$setBadge(g,l){var h;(h=this.getHandler(g))===null||h===void 0||h.setBadge(l)}async $setVisible(g,l){var h,u,d,E;l?(h=this.getHandler(g))===null||h===void 0||h.show():(!((u=this.getHandler(g))===null||u===void 0)&&u.isActivated()&&((d=this.getHandler(g))===null||d===void 0||d.deactivate()),(E=this.getHandler(g))===null||E===void 0||E.hide())}async $connectTabbar(g){if(!this.handlerMap.has(g)){const l=this.layoutService.getTabbarHandler(g);if(l)this.bindHandleEvents(l);else{const h=this.eventBus.on(p.TabBarRegistrationEvent,u=>{if(u.payload.tabBarId===g){const d=this.layoutService.getTabbarHandler(g);d&&this.bindHandleEvents(d),h.dispose()}});this.addDispose(h)}}}async $isAttached(g){return!!this.layoutService.getTabbarHandler(g)}bindHandleEvents(g){this.handlerMap.set(g.containerId,g),g.onActivate(()=>{this.proxy.$acceptMessage(g.containerId,"activate")}),g.onInActivate(()=>{this.proxy.$acceptMessage(g.containerId,"deactivate")})}getHandler(g){const l=this.layoutService.getTabbarHandler(g);return l||this.logger.warn(`Could not find a handler with \`${g}\``),l}};t.MainThreadLayout=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.MainThreadLayout=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],_)},13877:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLifeCycle=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(37406),p=e(39156);let v=class{constructor(_){this.injector=_}$setExtensionCandidate(_){this.appConfig.isElectronRenderer?this.injector.get(c.IElectronMainLifeCycleService).setExtensionCandidate(_,o.electronEnv.currentWindowId):(0,p.throwNonElectronError)("MainThreadLifeCycle.$setExtensionCandidate")}$setExtensionDir(_){this.appConfig.isElectronRenderer?this.injector.get(c.IElectronMainLifeCycleService).setExtensionDir(_,o.electronEnv.currentWindowId):(0,p.throwNonElectronError)("MainThreadLifeCycle.$setExtensionDir")}};t.MainThreadLifeCycle=v,n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],v.prototype,"appConfig",void 0),t.MainThreadLifeCycle=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[r.Injector])],v)},25740:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTheme=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(52416),v=e(95507);let m=class extends c.Disposable{constructor(s,g){super(),this.rpcProtocol=s,this.injector=g,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostTheme),this.addDispose(this.themeService.onThemeChange(()=>{this._proxy.$notifyThemeChanged()}))}async $getThemeColors(){const s=this.themeService.getCurrentThemeSync();return(0,p.getColorRegistry)().getColors().reduce((l,h)=>{const u=s.getColor(h.id);return u&&(l[h.id.replace(".","-")]=u.toString()),l},{})}};t.MainThreadTheme=m,n.__decorate([(0,r.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),t.MainThreadTheme=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,r.Injector])],m)},96710:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadToolbar=t.KaitianExtensionToolbarService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(52416),p=e(99220),v=e(90888),m=e(17428);let _=class{constructor(){this.btnDelegates=new Map,this.selectDelegates=new Map,this.dropdownButtonDelegates=new Map,this.connected=new Set,this.commandRegistry.registerCommand({id:v.BUTTON_SET_STATE_ID},{execute:(l,h,u)=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).setState(h,u)}}),this.commandRegistry.registerCommand({id:v.BUTTON_SET_CONTEXT_ID},{execute:(l,h)=>{if(this.btnDelegates.has(l)){const u=this.btnDelegates.get(l);u&&u.setContext(h)}}}),this.commandRegistry.registerCommand({id:v.BUTTON_CONNECT_HANDLE_ID},{execute:l=>{this.connected.has(l)||(this.doConnectToolbarButtonHandle(l),this.connected.add(l))}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_STATE_ID},{execute:(l,h)=>{this.selectDelegates.has(l)&&this.selectDelegates.get(l).setState(h)}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_OPTIONS},{execute:(l,h,u)=>{this.selectDelegates.has(l)&&(u.forEach(d=>{d.iconPath&&(d.iconClass=this.iconService.fromIcon(h,d.iconPath,d.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.selectDelegates.get(l).setOptions(u))}}),this.commandRegistry.registerCommand({id:v.SELECT_SET_SELECT_ID},{execute:(l,h)=>{this.selectDelegates.has(l)&&this.selectDelegates.get(l).setSelect(h)}}),this.commandRegistry.registerCommand({id:v.SELECT_CONNECT_HANDLE_ID},{execute:l=>{if(this.connected.has(l)||(this.doConnectToolbarSelectHandle(l),this.connected.add(l)),this.selectDelegates.get(l))return this.selectDelegates.get(l).getValue()}}),this.commandRegistry.registerCommand({id:v.SHOW_POPOVER_ID},{execute:(l,h)=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).showPopOver(h)}}),this.commandRegistry.registerCommand({id:v.HIDE_POPOVER_ID},{execute:l=>{this.btnDelegates.has(l)&&this.btnDelegates.get(l).hidePopOver()}})}getPopoverComponent(l,h){const u=()=>{var d,E,f,a;return(0,m.ExtensionLoadingView)({style:{minHeight:!((d=h.popoverStyle)===null||d===void 0)&&d.minHeight?Number((E=h.popoverStyle)===null||E===void 0?void 0:E.minHeight):200,minWidth:!((f=h.popoverStyle)===null||f===void 0)&&f.minWidth?Number((a=h.popoverStyle)===null||a===void 0?void 0:a.minWidth):300}})};return this.toolbarPopover.getComponent(l)||u}registerToolbarButton(l,h,u){const d=l+"."+u.id,E={};return u.states&&Object.keys(u.states).forEach(f=>{const a=u.states[f];E[f]={...a},a.iconPath&&(E[f].iconClass=this.iconService.fromIcon(h,a.iconPath,a.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description||u.title||d,weight:u.weight,when:u.when,component:(0,o.createToolbarActionBtn)({id:d,popoverId:`${l}:${u.popoverComponent}`,title:u.title,styles:E,defaultState:u.defaultState,iconClass:this.iconService.fromIcon(h,u.iconPath,u.iconMaskMode?c.IconType.Mask:c.IconType.Background),popoverComponent:u.popoverComponent?this.getPopoverComponent(`${l}:${u.popoverComponent}`,u):void 0,popoverStyle:u.popoverStyle||{noContainerStyle:!1},delegate:f=>{f&&(this.btnDelegates.set(d,f),u.command&&f.onClick(async()=>{f.showPopOver(),await this.eventBus.fireAndAwait(new o.ExtensionActivateEvent({topic:"onAction",data:u.id})),this.commandService.executeCommand(u.command)}),this.connected.has(d)&&this.doConnectToolbarButtonHandle(d))}})})}doConnectToolbarButtonHandle(l){const h=this.btnDelegates.get(l);h&&(h.onClick(()=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.BUTTON_CLICK_ID,l)),h.onChangeState(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.BUTTON_STATE_CHANGE_ID,l,u)))}registerToolbarSelect(l,h,u){const d=l+"."+u.id,E=u.options||[];return E.forEach(f=>{f.iconPath&&(f.iconClass=this.iconService.fromIcon(h,f.iconPath,f.iconMaskMode?c.IconType.Mask:c.IconType.Background))}),this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description,component:(0,o.createToolbarActionSelect)({styles:u.states,options:E,defaultState:u.defaultState,defaultValue:u.defaultValue,equals:u.optionEqualityKey?(f,a)=>{const b=u.optionEqualityKey;return!f||!a?f===a:f[b]===a[b]}:void 0,delegate:f=>{f&&(this.selectDelegates.set(d,f),u.command&&f.onSelect(a=>{this.commandService.executeCommand(u.command,a)}),this.connected.has(d)&&this.doConnectToolbarSelectHandle(d))}})})}doConnectToolbarSelectHandle(l){const h=this.selectDelegates.get(l);h&&(h.onSelect(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.SELECT_ON_SELECT_ID,l,u)),h.onChangeState(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.SELECT_STATE_CHANGE_ID,l,u)))}registerToolbarDropdownButton(l,h,u){const d=l+"."+u.id,E=u.options||[];return this.toolbarRegistry.registerToolbarAction({id:d,preferredPosition:u.preferredPosition,strictPosition:u.strictPosition,description:u.description,component:(0,o.createToolbarActionDropdownButton)({options:E,trigger:u.trigger,delegate:f=>{f&&(this.dropdownButtonDelegates.set(d,f),u.command&&f.onSelect(a=>{this.commandService.executeCommand(u.command,a)}),this.connected.has(d)&&this.doConnectToolbarDropdownButtonHandle(d))}})})}doConnectToolbarDropdownButtonHandle(l){const h=this.selectDelegates.get(l);h&&h.onSelect(u=>this.commandService.executeCommand(p.EMIT_EXT_HOST_EVENT.id,v.DROPDOWN_BUTTON_ON_SELECT_ID,l,u))}};t.KaitianExtensionToolbarService=_,n.__decorate([(0,r.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],_.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarPopoverRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarPopover",void 0),n.__decorate([(0,r.Autowired)(o.IToolbarRegistry),n.__metadata("design:type",Object)],_.prototype,"toolbarRegistry",void 0),n.__decorate([(0,r.Autowired)(c.IIconService),n.__metadata("design:type",Object)],_.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],_.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],_.prototype,"commandRegistry",void 0),t.KaitianExtensionToolbarService=_=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],_);let s=class extends o.Disposable{$registerToolbarButtonAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarButton(l,h,u)),Promise.resolve()}$registerToolbarSelectAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarSelect(l,h,u)),Promise.resolve()}$registerDropdownButtonAction(l,h,u){return this.addDispose(this.toolbarService.registerToolbarDropdownButton(l,h,u)),Promise.resolve()}};t.MainThreadToolbar=s,n.__decorate([(0,r.Autowired)(_),n.__metadata("design:type",_)],s.prototype,"toolbarService",void 0),t.MainThreadToolbar=s=n.__decorate([(0,r.Injectable)({multiple:!0})],s)},43837:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadIDEWindow=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(65046),v=e(95507);let m=class extends c.Disposable{constructor(s){super(),this.rpcProtocol=s,this._plainWebviewWindowMap=new Map,this._proxy=this.rpcProtocol.getProxy(v.ExtHostSumiAPIIdentifier.ExtHostIDEWindow),window.onbeforeunload=()=>{this.dispose()}}async $createWebviewWindow(s,g,l){let h;return this._plainWebviewWindowMap.has(s)?h=this._plainWebviewWindowMap.get(s):(h=this.webviewService.createWebviewWindow(g,l),h&&(this.disposables.push(h.onMessage(u=>{this._proxy.$postMessage(s,u)})),this.disposables.push(h.onClosed(u=>{this._proxy.$dispatchClosed(s),this.$destroy(s)})),this.disposables.push(h),this._plainWebviewWindowMap.set(s,h))),await h.ready,{windowId:h.windowId,webContentsId:h.webContentsId}}async $show(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.show()}}async $hide(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.hide()}}async $setSize(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.setSize(g)}}async $postMessage(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.postMessage(g)}}async $setAlwaysOnTop(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.setAlwaysOnTop(g)}}async $loadURL(s,g){if(this._plainWebviewWindowMap.has(s)){const l=this._plainWebviewWindowMap.get(s);l?.loadURL(g)}}async $destroy(s){if(this._plainWebviewWindowMap.has(s)){const g=this._plainWebviewWindowMap.get(s);g?.dispose(),this._plainWebviewWindowMap.delete(s)}}};t.MainThreadIDEWindow=m,n.__decorate([(0,r.Autowired)(p.IWebviewService),n.__metadata("design:type",Object)],m.prototype,"webviewService",void 0),t.MainThreadIDEWindow=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],m)},71354:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDidEnabledEvent=t.ExtensionDidUninstalledEvent=t.ExtensionsInitializedEvent=t.ExtensionDidActivatedEvent=t.ExtensionWillContributeEvent=t.ExtensionWillActivateEvent=t.ExtensionBeforeActivateEvent=t.ExtensionApiReadyEvent=t.AbstractExtInstanceManagementService=t.IActivationEventService=t.ExtHostEvent=void 0;const n=e(85608),r=e(76003),o=e(43718);class c extends o.BasicEvent{}t.ExtHostEvent=c;let p=class{};t.IActivationEventService=p,t.IActivationEventService=p=n.__decorate([(0,r.Injectable)()],p);class v{}t.AbstractExtInstanceManagementService=v;class m extends o.BasicEvent{}t.ExtensionApiReadyEvent=m;class _ extends o.BasicEvent{}t.ExtensionBeforeActivateEvent=_;class s extends o.BasicEvent{}t.ExtensionWillActivateEvent=s;class g extends o.BasicEvent{}t.ExtensionWillContributeEvent=g;class l extends o.BasicEvent{}t.ExtensionDidActivatedEvent=l;class h extends o.BasicEvent{}t.ExtensionsInitializedEvent=h;class u extends o.BasicEvent{}t.ExtensionDidUninstalledEvent=u;class d extends o.BasicEvent{}t.ExtensionDidEnabledEvent=d},21259:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugAdapterContribution=void 0;class e{constructor(r,o,c){this.description=r,this.extDebug=o,this.activationEventService=c}get type(){return this.description.type}get label(){return this.description.label}get languages(){return this.extDebug.$getSupportedLanguages(this.type)}async getSchemaAttributes(){return await this.extDebug.$getSchemaAttributes(this.type)}async getConfigurationSnippets(){return await this.extDebug.$getConfigurationSnippets(this.type)}async provideDebugConfigurations(r,o,c){return await this.extDebug.$provideDebugConfigurations(this.type,r,o,c)}async getDebugConfigurationProvidersCount(r){return await this.extDebug.$getDebugConfigurationProvidersCount(this.type,r)}async resolveDebugConfiguration(r,o){return await this.extDebug.$resolveDebugConfigurations(r,o)}async resolveDebugConfigurationWithSubstitutedVariables(r,o){return await this.extDebug.$resolveDebugConfigurationWithSubstitutedVariables(r,o)}async createDebugSession(r){const{configuration:o}=r;return await this.activationEventService.fireEvent("onDebugAdapterProtocolTracker",o.type),await this.extDebug.$createDebugSession({...r,parentSession:void 0,parent:r.parentSession?r.parentSession.id:void 0})}async terminateDebugSession(r){await this.extDebug.$terminateDebugSession(r)}}t.ExtensionDebugAdapterContribution=e},90384:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(66482),p=e(37499),v=e(51500),m=e(51328),_=e(71354);let s=class{constructor(){this.contributors=new Map,this.toDispose=new o.DisposableCollection,this.sessionId2contrib=new Map,this.activationEvents=new Set,this.init()}init(){this.debugSessionManager.onWillStartDebugSession(l=>this.ensureDebugActivation(l)),this.debugSessionManager.onWillResolveDebugConfiguration(l=>this.ensureDebugActivation(l,"onDebugResolve",l.debugType)),this.debugConfigurationManager.onWillProvideDebugConfiguration(l=>this.ensureDebugActivation(l,"onDebugInitialConfigurations")),this.toDispose.pushAll([o.Disposable.create(()=>{for(const l of this.sessionId2contrib.keys())this.sessionId2contrib.get(l).terminateDebugSession(l);this.sessionId2contrib.clear()})])}registerDebugAdapterContribution(l){const{type:h}=l;return this.contributors.has(h)?(this.logger.warn(`Debugger with type '${h}' already registered.`),o.Disposable.NULL):(this.contributors.set(h,l),o.Disposable.create(()=>this.unregisterDebugAdapterContribution(h)))}unregisterDebugAdapterContribution(l){this.contributors.delete(l)}ensureDebugActivation(l,h,u){typeof l.waitUntil=="function"&&l.waitUntil(this.activateByDebug(h,u))}async activateByDebug(l,h){const u=[this.activationEventService.fireEvent("onDebug")];l&&(u.push(this.activationEventService.fireEvent(l)),h&&u.push(this.activationEventService.fireEvent(l,h))),await Promise.all(u)}async debugTypes(){return Array.from(this.contributors.keys())}async provideDebugConfigurations(l,h,u){const d=this.contributors.get(l);return d?d.provideDebugConfigurations&&d.provideDebugConfigurations(h,void 0,u)||[]:[]}async getDynamicConfigurationsSupportTypes(){const l=new Set;this.extInstanceManagementService.getExtensionInstances().forEach(h=>{var u,d;const E=h.packageJSON,f="onDebugDynamicConfigurations";if(!E.activationEvents)return;const a=[];let b=!1;for(const y of E.activationEvents)y===f?b=!0:y.startsWith(`${f}:`)&&a.push(y.slice(f.length+1));if(a.length)a.forEach(y=>l.add(y));else if(b){const y=(d=(u=E.contributes)===null||u===void 0?void 0:u.debuggers)===null||d===void 0?void 0:d[0].type;y&&l.add(y)}});for(const[h,u]of this.contributors)await u.getDebugConfigurationProvidersCount(m.DebugConfigurationProviderTriggerKind.Dynamic)>0&&l.add(h);return Array.from(l)}async resolveDebugConfiguration(l,h){const u=this.contributors.get(l.type);if(u)try{return await u.resolveDebugConfiguration(l,h)}catch(d){this.logger.error(d)}}async resolveDebugConfigurationWithSubstitutedVariables(l,h){const u=this.contributors.get(l.type);if(u)try{return await u.resolveDebugConfigurationWithSubstitutedVariables(l,h)}catch(d){this.logger.error(d)}}async getDebuggersForLanguage(l){const h=[];for(const u of this.contributors.values()){const d=await u.languages;if(d&&d.indexOf(l)!==-1){const{type:E}=u;h.push({type:E,label:await u.label||E})}}return h}async getSchemaAttributes(l){const h=this.contributors.get(l);return h?h.getSchemaAttributes&&h.getSchemaAttributes()||[]:[]}async getConfigurationSnippets(){let l=[];for(const h of this.contributors.values())h.getConfigurationSnippets&&(l=l.concat(await h.getConfigurationSnippets()));return l}async createDebugSession(l){const{configuration:h}=l,u=this.contributors.get(h.type);if(u){const d=await u.createDebugSession(l);return this.sessionId2contrib.set(d,u),d}}async terminateDebugSession(l){const h=this.sessionId2contrib.get(l);if(h)return this.sessionId2contrib.delete(l),h.terminateDebugSession(l)}dispose(){this.toDispose.dispose()}};t.ExtensionDebugService=s,n.__decorate([(0,r.Autowired)(v.IWorkspaceService),n.__metadata("design:type",Object)],s.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.IDebugSessionManager),n.__metadata("design:type",Object)],s.prototype,"debugSessionManager",void 0),n.__decorate([(0,r.Autowired)(p.DebugConfigurationManager),n.__metadata("design:type",p.DebugConfigurationManager)],s.prototype,"debugConfigurationManager",void 0),n.__decorate([(0,r.Autowired)(_.IActivationEventService),n.__metadata("design:type",_.IActivationEventService)],s.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extInstanceManagementService",void 0),t.ExtensionDebugService=s=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],s)},40576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionContributionRegistry=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(97186);let p=class{constructor(){this.contribs=new Map,this.debug=(0,o.getDebugLogger)(),this.init()}init(){for(const m of this.contributions.getContributions())this.contribs.set(m.debugType,m)}get(m){return this.contribs.get(m)}registerDebugSessionContribution(m){const{debugType:_}=m;return this.contribs.has(_)?(this.debug.warn(`Debug session contribution already registered for ${_}`),o.Disposable.NULL):(this.contribs.set(_,m),o.Disposable.create(()=>this.unregisterDebugSessionContribution(_)))}unregisterDebugSessionContribution(m){this.contribs.delete(m)}};t.ExtensionDebugSessionContributionRegistry=p,n.__decorate([(0,r.Autowired)(c.DebugSessionContribution),n.__metadata("design:type",Object)],p.prototype,"contributions",void 0),t.ExtensionDebugSessionContributionRegistry=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},76452:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionDebugSessionFactory=t.ExtensionDebugSession=void 0;const n=e(43718),r=e(29539),o=e(3520),c=e(51328);class p extends r.DebugSession{constructor(_,s,g,l,h,u,d,E,f,a,b,y){super(_,s,g,l,h,u,d,E,f,a,b),this.id=_,this.options=s,this.connection=g,this.terminalService=l,this.editorService=h,this.breakpointManager=u,this.modelManager=d,this.labelService=E,this.messageService=f,this.fileSystem=a,this.sessionManager=b,this.terminalOptionsExt=y}async doRunInTerminal(_){_.name||(_.name=(0,n.localize)("debug.terminal.title","Debug Process")),_.iconPath||(_.iconPath=new c.ThemeIcon("debug"));const s={..._,...this.terminalOptionsExt};return super.doRunInTerminal(s)}}t.ExtensionDebugSession=p;class v{constructor(_,s,g,l,h,u,d,E,f,a,b,y,A,S){this.editorManager=_,this.breakpoints=s,this.modelManager=g,this.terminalService=l,this.labelService=h,this.messageService=u,this.debugPreferences=d,this.connectionFactory=E,this.fileSystem=f,this.terminalOptionsExt=a,this.debugPreference=b,this.outputService=y,this.injector=A,this.sessionManager=S}get(_,s){const g=this.injector.get(o.DebugSessionConnection,[_,this.connectionFactory,this.getTraceOutputChannel()]);return new p(_,s,g,this.terminalService,this.editorManager,this.breakpoints,this.modelManager,this.labelService,this.messageService,this.fileSystem,this.sessionManager,this.terminalOptionsExt)}getTraceOutputChannel(){if(this.debugPreferences["debug.trace"])return this.outputService.getChannel("Debug adapters")}}t.ExtensionDebugSessionFactory=v},77385:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(76452),t),n.__exportStar(e(40576),t),n.__exportStar(e(90384),t),n.__exportStar(e(21259),t)},51072:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initNodeThreadAPIProxy=g,t.initWorkerThreadAPIProxy=l;const n=e(46147),r=e(57484),o=e(10273),c=e(24060),p=e(69696),v=e(53191),m=e(4321),_=e(43812),s=e(38408);function g(h,u,d){h.set(n.MainThreadAPIIdentifier.MainThreadExtensionService,d);const E=u.get(m.MainThreadTreeView,[h,"node"]),f=u.get(s.MainThreadWindowState,[h]),a=u.get(_.MainThreadWindow,[h]),b=u.get(r.MainThreadConnection,[h]),y=u.get(o.MainThreadDebug,[h,b]),A=u.get(p.MainThreadTerminal,[h]),S=u.get(c.MainThreadTasks,[h]),w=u.get(v.MainThreadTestsImpl,[h]);return h.set(n.MainThreadAPIIdentifier.MainThreadTreeView,E),h.set(n.MainThreadAPIIdentifier.MainThreadWindowState,f),h.set(n.MainThreadAPIIdentifier.MainThreadWindow,a),h.set(n.MainThreadAPIIdentifier.MainThreadConnection,b),h.set(n.MainThreadAPIIdentifier.MainThreadDebug,y),h.set(n.MainThreadAPIIdentifier.MainThreadTerminal,A),h.set(n.MainThreadAPIIdentifier.MainThreadTasks,S),h.set(n.MainThreadAPIIdentifier.MainThreadTests,w),()=>{E.dispose(),f.dispose(),a.dispose(),b.dispose(),y.dispose(),A.dispose(),S.dispose(),w.dispose()}}function l(h,u,d){h.set(n.MainThreadAPIIdentifier.MainThreadExtensionService,d);const E=u.get(m.MainThreadTreeView,[h,"worker"]);return h.set(n.MainThreadAPIIdentifier.MainThreadTreeView,E),()=>{E.dispose()}}},2717:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadProgress=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(68969),p=e(43718),v=e(46147);let m=class{constructor(s){this.rpcProtocol=s,this.progress=new Map,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostProgress)}$startProgress(s,g,l){const h=this.createTask(s);g.location===p.ProgressLocation.Notification&&l&&(g={...g,location:p.ProgressLocation.Notification}),this.progressService.withProgress(g,h,()=>this.proxy.$acceptProgressCanceled(s))}$progressReport(s,g){const l=this.progress.get(s);l&&l.progress.report(g)}$progressEnd(s){const g=this.progress.get(s);g&&(g.resolve(),this.progress.delete(s))}dispose(){this.progress.forEach(s=>s.resolve()),this.progress.clear()}createTask(s){return g=>new Promise(l=>{this.progress.set(s,{resolve:l,progress:g})})}};t.MainThreadProgress=m,n.__decorate([(0,r.Autowired)(c.IProgressService),n.__metadata("design:type",Object)],m.prototype,"progressService",void 0),t.MainThreadProgress=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],m)},17802:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initSharedAPIProxy=F;const n=e(71742),r=e(46147),o=e(2717),c=e(62783),p=e(61528),v=e(14678),m=e(33530),_=e(23105),s=e(78690),g=e(84680),l=e(85589),h=e(11646),u=e(22869),d=e(14382),E=e(13335),f=e(89626),a=e(977),b=e(43404),y=e(48721),A=e(62909),S=e(39261),w=e(87781),T=e(79813),D=e(33111),I=e(62876),O=e(93633),M=e(49731),R=e(31968),P=e(73082),k=e(13643);function F(L,B){const j=B.get(f.MainThreadLanguages,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadLanguages,j);const W=B.get(v.MainThreadCommands,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadCommands,W);const U=B.get(g.MainThreadExtensionDocumentData,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadDocuments,U);const Q=B.get(l.MainThreadEditorService,[L,U]);L.set(r.MainThreadAPIIdentifier.MainThreadEditors,Q);const V=B.get(A.MainThreadExtensionNotebook,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadNotebook,V);const $=B.get(O.MainThreadStatusBar,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadStatusBar,$);const Y=B.get(y.MainThreadMessage,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadMessages,Y);const z=B.get(M.MainThreadStorage,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadStorage,z);const H=B.get(k.MainThreadWorkspace,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadWorkspace,H);const K=B.get(T.MainThreadQuickOpen,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadQuickOpen,K);const Z=B.get(w.MainThreadPreference,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadPreference,Z);const X=B.get(u.MainThreadEnv,[L,z]);L.set(r.MainThreadAPIIdentifier.MainThreadEnv,X);const ie=B.get(b.MainThreadExtensionLog);L.set(n.MainThreadExtensionLogIdentifier,ie);const oe=B.get(o.MainThreadProgress,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadProgress,oe);const le=B.get(S.MainThreadOutput);L.set(r.MainThreadAPIIdentifier.MainThreadOutput,le);const pe=B.get(d.MainThreadFileSystem,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadFileSystem,pe);const q=B.get(E.MainThreadFileSystemEvent,[L]),Ee=B.get(c.MainThreadWebview,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadWebview,Ee);const _e=B.get(c.MainThreadWebviewView,[L,Ee]);L.set(r.MainThreadAPIIdentifier.MainThreadWebviewView,_e);const te=B.get(P.MainThreadUrls,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadUrls,te);const ge=B.get(m.MainThreadComments,[L,W]);L.set(r.MainThreadAPIIdentifier.MainThreadComments,ge);const Te=B.get(p.MainThreadAuthentication,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadAuthentication,Te);const Pe=B.get(a.MainThreadLocalization,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadLocalization,Pe);const Ae=B.get(h.MainThreadEditorTabsService,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadEditorTabs,Ae);const we=B.get(D.MainThreadSCM,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadSCM,we);const be=B.get(I.MainThreadSecret,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadSecret,be);const fe=B.get(s.MainThreadDecorations,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadDecorations,fe);const xe=B.get(R.MainThreadTheming,[L]);L.set(r.MainThreadAPIIdentifier.MainThreadTheming,xe);const Re=B.get(_.MainThreadCustomEditor,[L,Ee]);return L.set(r.MainThreadAPIIdentifier.MainThreadCustomEditor,Re),{setup:async()=>{await Ee.init()},dispose:()=>{j.dispose(),W.dispose(),$.dispose(),U.dispose(),V.dispose(),Q.dispose(),Y.dispose(),z.dispose(),H.dispose(),K.dispose(),Z.dispose(),X.dispose(),oe.dispose(),le.dispose(),pe.dispose(),q.dispose(),Ee.dispose(),_e.dispose(),te.dispose(),Te.dispose(),ge.dispose(),Ae.dispose(),we.dispose(),be.dispose(),fe.dispose(),xe.dispose(),Re.dispose()}}}},62783:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWebviewView=t.MainThreadWebview=void 0;const n=e(85608),r=n.__importDefault(e(97331)),o=e(76003),c=e(8919),p=e(41869),v=e(74654),m=e(19805),_=e(40827),s=e(43718),g=e(54414),l=e(57517),h=e(63067),u=e(52416),d=e(65046),E=e(46147),f=e(53043),a=e(88341),b=e(71354),{addMapElement:y}=p.arrays;let A=class extends p.Disposable{constructor(I){super(),this.rpcProtocol=I,this.webviewPanels=new Map,this.webviews=new Map,this.plainWebviews=new Map,this.webviewPanelStates=new Map,this._hasSerializer=new Set,this.statePersister=new Map,this.proxy=this.rpcProtocol.getProxy(E.ExtHostAPIIdentifier.ExtHostWebview),this.sumiProxy=this.rpcProtocol.getProxy(E.ExtHostAPIIdentifier.SumiExtHostWebview),this.initEvents(),this.extWebviewStorage=this.getStorage(new p.URI("extension-webview-panels").withScheme(p.STORAGE_SCHEMA.SCOPE)),this.webviewService.registerWebviewReviver({revive:O=>this.reviveWebview(O),handles:async O=>(await this.extWebviewStorage).get(O)?10:-1})}async init(){await this.proxy.$init()}isSupportedLink(I,O,M){if(m.HttpOpener.standardSupportedLinkSchemes.has(I.scheme))return!0;if(O.enableCommandUris&&I.scheme===p.Schemes.command){const{id:R,args:P}=v.CommandOpener.parseURI(I);if(!this.commandRegistry.isPermittedCommand(R,M,...P))throw new Error(`Extension ${M.id} has not permit to execute ${R}`);return!0}return!1}initEvents(){this.addDispose(this.editorService.onActiveResourceChange(()=>{this.onChange()})),this.addDispose(this.eventBus.on(l.EditorGroupChangeEvent,()=>{this.onChange()}))}isActive(I,O,M){return I.resourceState.uri.isEqual(O?.uri)&&I.resourceState.openTypeId===M?.componentId}onChange(){const I=this.editorService.currentResource,O=this.editorService.currentEditorGroup.currentOpenType,M=this.editorService.editorGroups.map(R=>({resource:R.currentResource,openType:R.currentOpenType,index:R.index+1}));this.webviewPanelStates.forEach((R,P)=>{if(!this.hasWebviewPanel(P))return;let k=!1;const F=this.getWebviewPanel(P);if(R.active?(!I||!this.isActive(F,I,O))&&(R.active=!1,k=!0):I&&this.isActive(F,I,O)&&(R.active=!0,k=!0),R.visible){const L=M.find(B=>B.resource&&this.isActive(F,B.resource,B.openType));L?L.index!==R.position&&(R.position=L.index,k=!0):(R.visible=!1,R.position=-1,k=!0)}else{const L=M.find(B=>B.resource&&this.isActive(F,B.resource,B.openType));L&&(R.visible=!0,R.position=L.index,k=!0)}k&&(this.proxy.$onDidChangeWebviewPanelViewState(P,R),R.position!==this.getWebviewPanel(P).viewColumn&&(this.getWebviewPanel(P).viewColumn=R.position,this._persistWebviewPanelMeta(P)))})}$createWebviewPanel(I,O,M,R={},P={},k){this.doCreateWebviewPanel(I,O,M,R,P,k)}pipeBrowserHostedWebviewPanel(I,O,M,R,P){const k=I.id,F=new S(k,M,O,{},{},P,I);this.onCreateWebviewPanel(F),this.proxy.$pipeBrowserHostedWebviewPanel(k,M)}async reviveWebview(I){var O;const M=(await this.extWebviewStorage).get(I);if(!M)throw new Error("No revival info for webview "+I);const{viewType:R,webviewOptions:P,extensionInfo:k,title:F}=M;await this.activation.fireEvent("onWebviewPanel",R);const L=await this.getPersistedWebviewState(R,I),B=this.webviewService.createEditorWebviewComponent({allowScripts:P.enableScripts,allowForms:(O=P.enableForms)!==null&&O!==void 0?O:P.enableScripts,longLive:P.retainContextWhenHidden},I,{extWebview:R}),j=B.group?B.group.index+1:M.viewColumn;await this.doCreateWebviewPanel(I,R,F,{viewColumn:j},P,k,L),await this.proxy.$deserializeWebviewPanel(I,R,F,await this.getPersistedWebviewState(R,I),j,P)}onCreateWebviewPanel(I){this.webviewPanels.set(I.id,I);const O=I.webview,M=I.id;I.editorWebview&&I.addDispose(I.editorWebview),I.addDispose(this.connectWebview(I.id,I.webview)),I.addDispose(O.onRemove(()=>{O.dispose(),this.proxy.$onDidDisposeWebviewPanel(M)})),this.webviewPanelStates.set(I.id,{active:!1,visible:!1,position:-1}),this.addDispose({dispose:()=>{this.webviewPanels.has(M)&&this.getWebviewPanel(M).dispose()}}),O.onDidClickLink(R=>{this.isSupportedLink(R,I.options,I.extensionInfo)&&this.openerService.open(R)}),this.addDispose(O.onDidUpdateState(R=>{this._hasSerializer.has(I.viewType)&&this.persistWebviewState(I.viewType,M,R)})),this._persistWebviewPanelMeta(M)}async doCreateWebviewPanel(I,O,M,R={},P={},k,F){var L;const B=this.webviewService.createEditorWebviewComponent({allowScripts:P.enableScripts,allowForms:(L=P.enableForms)!==null&&L!==void 0?L:P.enableScripts,longLive:P.retainContextWhenHidden},I,{extWebview:O}),j=new S(I,O,{uri:B.webviewUri,openTypeId:B.componentId},R,P,k,B.webview,B);B.title=M,this.onCreateWebviewPanel(j),B.supportsRevive=this._hasSerializer.has(j.viewType);const W=(0,f.viewColumnToResourceOpenOptions)(R.viewColumn);B.open(W),F&&(j.webview.state=F)}getWebviewPanel(I){if(!this.webviewPanels.has(I))throw new Error(`No Webview with id: ${I} was found in the browser process.`);return this.webviewPanels.get(I)}hasWebviewPanel(I){return this.webviewPanels.has(I)}$disposeWebview(I){this.getWebviewPanel(I).dispose(),this.webviewPanels.delete(I),this._persistWebviewPanelMeta(I)}$reveal(I,O={}){var M;const R=this.getWebviewPanel(I),P=Object.assign({},R.showOptions,O).viewColumn;(M=R.editorWebview)===null||M===void 0||M.open((0,f.viewColumnToResourceOpenOptions)(P))}$setTitle(I,O){const M=this.getWebviewPanel(I);M.editorWebview&&(M.editorWebview.title=O,M.title=O,this._persistWebviewPanelMeta(I))}$setIconPath(I,O){const M=this.getWebviewPanel(I);M.editorWebview&&(O?M.editorWebview.icon=this.iconService.fromIcon("",O,u.IconType.Background)+" background-tab-icon":M.editorWebview.icon="")}connectWebview(I,O){this.webviews.set(I,O);const M=new p.Disposable;return M.addDispose(O.onMessage(R=>{this.proxy.$onMessage(I,R)})),M.addDispose(y(this.webviews,I,O)),O.onDispose(()=>{M.dispose()}),M}getWebview(I){return this.webviews.get(I)}$setHtml(I,O){var M;(M=this.getWebview(I))===null||M===void 0||M.setContent(O)}$setOptions(I,O){var M;(M=this.getWebview(I))===null||M===void 0||M.updateOptions({allowScripts:O.enableScripts,allowForms:O.enableForms})}async $postMessage(I,O){var M;try{return await((M=this.getWebview(I))===null||M===void 0?void 0:M.postMessage(O)),!0}catch{return!1}}$registerSerializer(I){this._hasSerializer.add(I),this.webviewPanels.forEach(O=>{O.viewType===I&&O.editorWebview&&(O.editorWebview.supportsRevive=!0)})}$unregisterSerializer(I){this._hasSerializer.add(I)}_persistWebviewPanelMeta(I){return this.extWebviewStorage.then(O=>{this.webviewPanels.has(I)?O.set(I,this.getWebviewPanel(I).toJSON()):O.delete(I)})}async persistWebviewState(I,O,M){this.statePersister.has(I)||this.statePersister.set(I,this.getStorage(new p.URI("extension-webview/"+I).withScheme(p.STORAGE_SCHEMA.SCOPE)).then(R=>{const P=(0,r.default)(k=>R.set(O,k),500);return async k=>{await P(k)}})),(await this.statePersister.get(I))(M)}async getPersistedWebviewState(I,O){return(await this.getStorage(new p.URI("extension-webview/"+I).withScheme(p.STORAGE_SCHEMA.SCOPE))).get(O)}$connectPlainWebview(I){if(!this.plainWebviews.has(I)){const O=this.webviewService.getEditorPlainWebviewComponent(I)||this.webviewService.getOrCreatePlainWebviewComponent(I);O&&(this.plainWebviews.set(I,O),O.webview.onMessage(M=>{this.sumiProxy.$acceptMessage(I,M)}),O.webview.onDispose(()=>{this.plainWebviews.delete(I)}))}}async $postMessageToPlainWebview(I,O){if(this.plainWebviews.has(I))try{return await this.plainWebviews.get(I).webview.postMessage(O),!0}catch(M){return this.logger.error(M),!1}return!1}async $createPlainWebview(I,O,M){const R=this.webviewService.createEditorPlainWebviewComponent({},I);R.title=O,M&&(R.icon=this.iconService.fromIcon("",M)||""),this.$connectPlainWebview(I)}async $plainWebviewLoadUrl(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);await this.plainWebviews.get(I).webview.loadURL(O)}async $setPlainWebviewPartition(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);this.plainWebviews.get(I).webview.setPartition(O??I)}async $disposePlainWebview(I){var O;this.plainWebviews.has(I)&&((O=this.plainWebviews.get(I))===null||O===void 0||O.dispose())}async $revealPlainWebview(I,O){if(!this.plainWebviews.has(I))throw new Error("No Plain Webview With id "+I);const M=this.plainWebviews.get(I);if(!M.open)throw new Error("not able to open plain webview id:"+I);await M.open({groupIndex:O})}async $getWebviewResourceRoots(){return Array.from(this.staticResourceService.resourceRoots)}};t.MainThreadWebview=A,n.__decorate([(0,o.Autowired)(d.IWebviewService),n.__metadata("design:type",Object)],A.prototype,"webviewService",void 0),n.__decorate([(0,o.Autowired)(b.IActivationEventService),n.__metadata("design:type",b.IActivationEventService)],A.prototype,"activation",void 0),n.__decorate([(0,o.Autowired)(p.StorageProvider),n.__metadata("design:type",Function)],A.prototype,"getStorage",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",g.WorkbenchEditorService)],A.prototype,"editorService",void 0),n.__decorate([(0,o.Autowired)(u.IIconService),n.__metadata("design:type",Object)],A.prototype,"iconService",void 0),n.__decorate([(0,o.Autowired)(p.IEventBus),n.__metadata("design:type",Object)],A.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(p.ILogger),n.__metadata("design:type",Object)],A.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(_.StaticResourceService),n.__metadata("design:type",_.StaticResourceService)],A.prototype,"staticResourceService",void 0),n.__decorate([(0,o.Autowired)(p.IOpenerService),n.__metadata("design:type",Object)],A.prototype,"openerService",void 0),n.__decorate([(0,o.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],A.prototype,"commandRegistry",void 0),t.MainThreadWebview=A=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__param(0,(0,o.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],A);class S extends p.Disposable{constructor(I,O,M,R,P,k,F,L){super(),this.id=I,this.viewType=O,this.resourceState=M,this.showOptions=R,this.options=P,this.extensionInfo=k,this.webview=F,this.editorWebview=L}toJSON(){return{id:this.id,viewType:this.viewType,viewColumn:this.viewColumn,extensionInfo:this.extensionInfo,webviewOptions:this.options,title:this.title}}}class w extends p.Disposable{constructor(I,O,M,R){super(),this.id=I,this.viewType=O,this.extension=M,this.webview=R}}let T=class extends s.WithEventBus{constructor(I,O){super(),this.mainThreadWebview=O,this._webviewViews=new Map,this._resolvers=new Map,this.proxy=I.getProxy(E.ExtHostAPIIdentifier.ExtHostWebviewView)}$registerWebviewViewProvider(I,O,M={}){this._resolvers.set(O,{extension:I,options:M}),this.eventBus.fire(new E.WebviewViewResolverRegistrationEvent({viewType:O,options:M}))}$unregisterWebviewViewProvider(I){this._resolvers.delete(I),this.eventBus.fire(new E.WebviewViewResolverRegistrationRemovalEvent({viewType:I}))}$setWebviewViewTitle(I,O){var M;const R=this._webviewViews.get(I);R&&((M=this.mainLayout.getTabbarHandler(R.viewType))===null||M===void 0||M.updateViewTitle(R.viewType,O||""))}$setWebviewViewDescription(I,O){const M=this._webviewViews.get(I)}onWebviewViewShouldShow(I){const O=I.payload.viewType;this._resolvers.has(O)?I.payload.disposer.addDispose(this.resolveWebviewView(I.payload.container,O,I.payload.title,I.payload.cancellationToken)):this.addDispose(this.eventBus.on(E.WebviewViewResolverRegistrationEvent,M=>{M.payload.viewType===O&&this._resolvers.has(O)&&I.payload.disposer.addDispose(this.resolveWebviewView(I.payload.container,O,I.payload.title,I.payload.cancellationToken))}))}resolveWebviewView(I,O,M,R){var P;const k=new p.Disposable,F=this.webviewService.createWebview(),L=(P=this._resolvers.get(O))===null||P===void 0?void 0:P.options,B=this._resolvers.get(O).extension,j=F.id,W=new w(j,O,B,F);W.addDispose(this.mainThreadWebview.connectWebview(j,F)),W.addDispose(y(this._webviewViews,j,W)),W.addDispose(F);const U=()=>{const $=this.mainLayout.isViewVisible(O);this.proxy.$onDidChangeWebviewViewVisibility(j,$),L?.retainContextWhenHidden||($?(F.appendTo(I),W.addDispose(this.mainThreadWebview.connectWebview(j,F))):F.remove())};k.addDispose(this.eventBus.on(h.ViewCollapseChangedEvent,$=>{$.payload.viewId===O&&U()}));const Q=this.mainLayout.getTabbarHandler(O);Q&&(k.addDispose(Q?.onActivate(()=>{U()})),k.addDispose(Q?.onInActivate(()=>{U()}))),this.proxy.$resolveWebviewView(j,O,M,F.state,R);const V=this.mainLayout.isViewVisible(O);return this.proxy.$onDidChangeWebviewViewVisibility(j,V),(L?.retainContextWhenHidden||V)&&F.appendTo(I),k.addDispose(W),{dispose:()=>W.dispose()}}$setBadge(I,O){const M=this._webviewViews.get(I);if(M){M.badge=O;const R=this.mainLayout.getTabbarHandler(M.viewType);R&&(R.setBadge(O||""),R.accordionService.updateViewBadge(M.viewType,O||""))}}$show(I,O){const M=this._webviewViews.get(I);M&&this.mainLayout.revealView(M.viewType)}};t.MainThreadWebviewView=T,n.__decorate([(0,o.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],T.prototype,"mainLayout",void 0),n.__decorate([(0,o.Autowired)(d.IWebviewService),n.__metadata("design:type",Object)],T.prototype,"webviewService",void 0),n.__decorate([(0,s.OnEvent)(a.WebviewViewShouldShowEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[a.WebviewViewShouldShowEvent]),n.__metadata("design:returntype",void 0)],T.prototype,"onWebviewViewShouldShow",null),t.MainThreadWebviewView=T=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,A])],T)},61528:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadAuthentication=t.MainThreadAuthenticationProvider=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(72665),m=e(46147),_=e(71354);let s=class extends c.Disposable{constructor(h,u,d,E){super(),this._proxy=h,this.id=u,this.label=d,this.supportsMultipleAccounts=E,this._accounts=new Map,this._sessions=new Map}async initialize(){return this.registerCommandsAndContextMenuItems()}async manageTrustedExtensions(h){const u=await this.authenticationService.getAllowedExtensions(this.id,h);if(!u.length){this.dialogService.info((0,c.localize)("authentication.noTrustedExtensions"));return}const d=await this.authenticationService.getAccountUsages(this.id,h),E=u.map(a=>{const b=d.find(y=>a.id===y.extensionId);return{label:a.name,description:b?(0,c.localize)("authentication.accountLastUsedDate"):(0,c.localize)("authentication.notUsed"),value:a}}),f=await this.quickPickService.show(E,{title:(0,c.localize)("authentication.manageTrustedExtensions"),placeholder:(0,c.localize)("authentication.manageExtensions")});f&&await this.authenticationService.setAllowedExtensions(this.id,h,[f])}async signOut(h){const u=await this.authenticationService.getAccountUsages(this.id,h),d=this._accounts.get(h),E=u.length?(0,c.formatLocalize)("authentication.signOutMessage",h,u.map(a=>a.extensionName).join(`
31552
31552
  `)):(0,c.formatLocalize)("authentication.signOutMessageSimple",h);await this.dialogService.info(E,[(0,c.localize)("ButtonCancel"),(0,c.localize)("ButtonOK")])===(0,c.localize)("ButtonOK")&&(d?.forEach(a=>this.logout(a)),await this.authenticationService.removeAccountUsage(this.id,h),await this.authenticationService.removeAllowedExtensions(this.id,h))}async getSessions(h,u){return this._proxy.$getSessions(this.id,h,{account:u})}hasSessions(){return!!this._sessions.size}async updateSessionItems(h){const{added:u,removed:d}=h,f=(await this._proxy.$getSessions(this.id)).filter(a=>u.some(b=>b.id===a.id));d.forEach(a=>{const b=this._sessions.get(a.id);if(b){this._sessions.delete(a.id);const y=this._accounts.get(b)||[],A=y.indexOf(a.id);y.splice(A),y.length||this._accounts.delete(b)}}),f.forEach(a=>this.registerSession(a))}async registerCommandsAndContextMenuItems(){try{(await this._proxy.$getSessions(this.id)).forEach(u=>this.registerSession(u))}catch(h){this.logger.error(h)}}registerSession(h){this._sessions.set(h.id,h.account.label);const u=this._accounts.get(h.account.label);if(u){this._accounts.set(h.account.label,u.concat(h.id));return}else this._accounts.set(h.account.label,[h.id])}login(h,u){return this._proxy.$login(this.id,h,u)}async logout(h){await this._proxy.$logout(this.id,h),this.messageService.info((0,c.localize)("authentication.signedOut"))}};t.MainThreadAuthenticationProvider=s,n.__decorate([(0,r.Autowired)(p.IAuthenticationService),n.__metadata("design:type",Object)],s.prototype,"authenticationService",void 0),n.__decorate([(0,r.Autowired)(c.QuickPickService),n.__metadata("design:type",Object)],s.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(v.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(v.IMessageService),n.__metadata("design:type",Object)],s.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],s.prototype,"logger",void 0),t.MainThreadAuthenticationProvider=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,String,String,Boolean])],s);let g=class extends c.Disposable{constructor(h){super(),this._proxy=h.getProxy(m.ExtHostAPIIdentifier.ExtHostAuthentication),this.addDispose(this.authenticationService.onDidChangeSessions(u=>{this._proxy.$onDidChangeAuthenticationSessions(u.providerId,u.label,u.event)})),this.addDispose(this.authenticationService.onDidRegisterAuthenticationProvider(u=>{this._proxy.$onDidChangeAuthenticationProviders([u],[])})),this.addDispose(this.authenticationService.onDidUnregisterAuthenticationProvider(u=>{this._proxy.$onDidChangeAuthenticationProviders([],[u])}))}$getProviderIds(){return Promise.resolve(this.authenticationService.getProviderIds())}async $registerAuthenticationProvider(h,u,d){const E=this.injector.get(s,[this._proxy,h,u,d]);await E.initialize(),this.authenticationService.registerAuthenticationProvider(h,E),this.addDispose(c.Disposable.create(()=>{this.$unregisterAuthenticationProvider(h)}))}$unregisterAuthenticationProvider(h){this.authenticationService.unregisterAuthenticationProvider(h)}$ensureProvider(h){return this.activationService.fireEvent("onAuthenticationRequest",h)}$sendDidChangeSessions(h,u){this.authenticationService.sessionsUpdate(h,u)}$getSessions(h){return this.authenticationService.getSessions(h)}$login(h,u,d){return this.authenticationService.login(h,u,d)}$logout(h,u){return this.authenticationService.logout(h,u)}$getAccounts(h){return this.authenticationService.getSessions(h).then(u=>u.map(d=>d.account))}async doGetSession(h,u,d,E,f){const a=await this.authenticationService.getSessions(h,u,!0),b=this.authenticationService.supportsMultipleAccounts(h);if(f.forceNewSession&&!a.length)throw new Error("No existing sessions found.");if(f.forceNewSession&&f.createIfNone)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone");if(f.forceNewSession&&f.silent)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, silent");if(f.createIfNone&&f.silent)throw new Error("Invalid combination of options. Please remove one of the following: createIfNone, silent");if(!f.forceNewSession&&a.length){if(b)if(f.clearSessionPreference)await this.authenticationService.removeExtensionSessionId(E,h);else{const A=await this.authenticationService.getExtensionSessionId(E,h);if(A){const S=a.find(w=>w.id===A);if(S&&await this.authenticationService.isAccessAllowed(h,S.account.label,d))return S}}else if(await this.authenticationService.isAccessAllowed(h,a[0].account.label,d))return a[0]}if(f.createIfNone||f.forceNewSession){const A=this.authenticationService.getLabel(h),S=typeof f.forceNewSession=="object"?f.forceNewSession.detail:void 0;if(!await this.loginPrompt(A,E,!!f.forceNewSession,S))throw new Error("User did not consent to login.");const T=a?.length&&!f.forceNewSession&&b?await this.selectSession(h,A,d,E,a,u,f,!!f.clearSessionPreference):await this.authenticationService.login(h,u,f);return await this.authenticationService.updatedAllowedExtension(h,T.account.label,d,E,!0),await this.authenticationService.setExtensionSessionId(E,h,T.id),T}const y=a.find(A=>this.authenticationService.isAccessAllowed(h,A.account.label,d));return!f.silent&&!y&&await this.authenticationService.requestNewSession(h,u,f,d,E),y}async $getSession(h,u,d,E,f){const a=await this.doGetSession(h,u,d,E,f);return a&&await this.authenticationService.addAccountUsage(h,a.account.label,d,E),a}async selectSession(h,u,d,E,f,a,b,y){if(!f.length)throw new Error("No potential sessions found");if(y)await this.authenticationService.removeExtensionSessionId(E,h);else{const I=await this.authenticationService.getExtensionSessionId(E,h);if(I){const O=f.find(M=>M.id===I);if(O&&await this.$getSessionsPrompt(h,O.account.label,u,d,E))return O}}const A=f.map(I=>({label:I.account.label,value:I}));A.push({label:(0,c.localize)("authentication.useOtherAccount"),value:void 0});const S=await this.quickPickService.show(A,{title:(0,c.formatLocalize)("authentication.selectAccount",E,u),placeholder:(0,c.formatLocalize)("authentication.getSessionPlaceholder",E),ignoreFocusOut:!0}),w=S??await this.authenticationService.login(h,a,b),T=w.account.label,D=await this.authenticationService.getAllowedExtensions(h,T);return D.find(I=>I.id===d)||(D.push({id:d,name:E}),await this.authenticationService.setAllowedExtensions(h,T,D)),await this.authenticationService.setExtensionSessionId(E,h,w.id),w}async $getSessionsPrompt(h,u,d,E,f){const a=await this.authenticationService.getAllowedExtensions(h,u);if(a.find(S=>S.id===E))return await this.authenticationService.addAccountUsage(h,u,E,f),!0;const A=await this.dialogService.info((0,c.formatLocalize)("authentication.confirmAuthenticationAccess",f,d,u),[(0,c.localize)("ButtonCancel"),(0,c.localize)("ButtonAllow")])===(0,c.localize)("ButtonAllow");return A&&(this.authenticationService.addAccountUsage(h,u,E,f),a.push({id:E,name:f}),await this.authenticationService.setAllowedExtensions(h,u,a)),A}async loginPrompt(h,u,d,E){return await this.dialogService.info(d?(0,c.formatLocalize)("authentication.confirmReLogin",u,h):(0,c.formatLocalize)("authentication.confirmLogin",u,h),[(0,c.localize)("ButtonCancel"),(0,c.localize)("ButtonAllow")])===(0,c.localize)("ButtonAllow")}async $setTrustedExtensionAndAccountPreference(h,u,d,E,f){const a=await this.authenticationService.getAllowedExtensions(h,u);a.find(b=>b.id===d)||(a.push({id:d,name:E}),await this.authenticationService.setAllowedExtensions(h,u,a)),await this.authenticationService.setExtensionSessionId(E,h,f),await this.authenticationService.addAccountUsage(h,u,d,E)}};t.MainThreadAuthentication=g,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],g.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.IAuthenticationService),n.__metadata("design:type",Object)],g.prototype,"authenticationService",void 0),n.__decorate([(0,r.Autowired)(v.IDialogService),n.__metadata("design:type",Object)],g.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(v.IMessageService),n.__metadata("design:type",Object)],g.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(c.QuickPickService),n.__metadata("design:type",Object)],g.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(_.IActivationEventService),n.__metadata("design:type",_.IActivationEventService)],g.prototype,"activationService",void 0),t.MainThreadAuthentication=g=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],g)},14678:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommands=void 0;const r=e(85608),o=e(76003),c=e(8919),p=e(41869),v=e(43718),m=e(21880),_=e(46147),{isNonEmptyArray:s}=v.arrays;let g=class{constructor(h){this.rpcProtocol=h,n.set(this,void 0),this.commands=new Map,this.argumentProcessors=[],this.disposable=new v.Disposable,r.__classPrivateFieldSet(this,n,this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostCommands),"f"),r.__classPrivateFieldGet(this,n,"f").$registerBuiltInCommands(),r.__classPrivateFieldGet(this,n,"f").$registerCommandConverter(),this.registerUriArgProcessor()}registerUriArgProcessor(){this.disposable.addDispose(this.registerArgumentProcessor({processArgument:h=>h instanceof v.URI?h.codeUri:s(h)?h.map(u=>u instanceof v.URI?u.codeUri:u):h}))}dispose(){this.commands.forEach(h=>{h.dispose()}),this.commands.clear(),this.disposable.dispose()}registerArgumentProcessor(h){return this.argumentProcessors.push(h),v.Disposable.create(()=>{const u=this.argumentProcessors.indexOf(h);u>=0&&this.argumentProcessors.splice(u,1)})}$registerCommand(h){const u=r.__classPrivateFieldGet(this,n,"f"),d=(...b)=>(b=b.map(y=>this.argumentProcessors.reduce((A,S)=>S.processArgument(A),y)),u.$executeContributedCommand(h,...b)),E=new v.Disposable,f={execute:d,dispose:()=>E.dispose()};this.commandRegistry.getCommand(h)?E.addDispose(this.commandRegistry.registerHandler(h,{execute:d})):E.addDispose(this.commandRegistry.registerCommand({id:h},{execute:d})),this.commands.set(h,f)}$unregisterCommand(h){const u=this.commands.get(h);u&&(u.dispose(),this.commands.delete(h))}$getCommands(){return Promise.resolve(this.commandRegistry.getCommands().map(h=>h.id))}$executeExtensionCommand(h,...u){return this.commands.has(h)?this.commands.get(h).execute(...u):(u=u.map(d=>this.argumentProcessors.reduce((E,f)=>f.processArgument(E),d)),r.__classPrivateFieldGet(this,n,"f").$executeContributedCommand(h,...u))}$executeCommandWithExtensionInfo(h,u,...d){if(!this.commandRegistry.isPermittedCommand(h,u,...d))throw new Error(`Extension ${u.id} has not permit to execute ${h}`);return this.$executeCommand(h,...d)}async $executeCommand(h,...u){try{return await this.monacoCommandService.executeCommand(h,...u)}catch(d){throw this.logger.error(d),d}}};t.MainThreadCommands=g,n=new WeakMap,r.__decorate([(0,o.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(m.ICommandServiceToken),r.__metadata("design:type",Object)],g.prototype,"monacoCommandService",void 0),r.__decorate([(0,o.Autowired)(p.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(p.IContextKeyService),r.__metadata("design:type",Object)],g.prototype,"contextKeyService",void 0),t.MainThreadCommands=g=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)(c.IRPCProtocol)),r.__metadata("design:paramtypes",[Object])],g)},33530:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCommentController=t.MainThreadCommentThread=t.MainThreadComments=void 0;const n=e(85608),r=e(76003),o=e(86077),c=e(8919),p=e(93899),v=e(43718),m=e(20868),_=e(28423),s=e(46147),g=e(53043),l=e(53886);let h=class{constructor(f,a){this.rpcProtocol=f,this.mainThreadCommands=a,this._providers=new Map,this._commentControllers=new Map,this.disposable=new v.Disposable,this.proxy=this.rpcProtocol.getProxy(s.ExtHostAPIIdentifier.ExtHostComments),this.disposable.addDispose(this.registerCommentThreadTemplateHander()),this.disposable.addDispose(this.registerArgumentProcessor())}registerCommentThreadTemplateHander(){return this.commentsService.onThreadsCreated(async f=>{if((0,v.isUndefined)(f.data)){const a=this.commentsService.getProviderIdsByLine(f.range.startLineNumber)[0];if(a){const b=this._providers.get(a);if((0,v.isUndefined)(b))return;const y=this._commentControllers.get(b);if(!y)throw new Error("unknown controller");y.createCommentThreadTemplate(f.uri.codeUri,f.range)}}})}registerArgumentProcessor(){return this.mainThreadCommands.registerArgumentProcessor({processArgument:f=>{if(!f||!f.menuId||!f.thread||(0,v.isUndefined)(f.thread.data))return f;switch(f.menuId){case p.MenuId.CommentsCommentThreadTitle:return{$mid:7,commentControlHandle:f.thread.data.commentControlHandle,commentThreadHandle:f.thread.data.commentThreadHandle};case p.MenuId.CommentsCommentThreadContext:return{$mid:8,thread:{commentControlHandle:f.thread.data.commentControlHandle,commentThreadHandle:f.thread.data.commentThreadHandle},text:f.text};case p.MenuId.CommentsCommentTitle:return{$mid:9,thread:{commentControlHandle:f.thread.data.commentControlHandle,commentThreadHandle:f.thread.data.commentThreadHandle},commentUniqueId:+f.comment.id};case p.MenuId.CommentsCommentContext:return{$mid:10,thread:{commentControlHandle:f.thread.data.commentControlHandle,commentThreadHandle:f.thread.data.commentThreadHandle},commentUniqueId:+f.comment.id,text:f.body};default:return f}}})}$updateCommentThread(f,a,b,y,A){const S=this._commentControllers.get(f);if(S)return S.updateCommentThread(a,b,y,A)}$registerCommentController(f,a,b){this.commentsService.registerCommentPanel(),this._providers.set(a,f);const y=this.injector.get(d,[this.proxy,f,a,b,{}]);this._commentControllers.set(f,y),this.commentsService.forceUpdateDecoration(),this.disposable.addDispose(v.Disposable.create(()=>{this.$unregisterCommentController(f)}))}$updateCommentControllerFeatures(f,a){const b=this._commentControllers.get(f);b&&b.updateFeatures(a)}$unregisterCommentController(f){const a=this._commentControllers.get(f);a&&(a.dispose(),this._providers.delete(a.id)),this._commentControllers.delete(f)}$createCommentThread(f,a,b,y,A,S){const w=this._commentControllers.get(f);if(w)return w.createCommentThread(S,a,b,y,A)}$deleteCommentThread(f,a){const b=this._commentControllers.get(f);if(b)return b.deleteCommentThread(a)}dispose(){this.disposable.dispose(),this._commentControllers.clear()}};t.MainThreadComments=h,n.__decorate([(0,r.Autowired)(o.ICommentsService),n.__metadata("design:type",Object)],h.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],h.prototype,"injector",void 0),t.MainThreadComments=h=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],h);let u=class extends v.Disposable{get input(){return this._input}set input(f){this._input=f,this._onDidChangeInput.fire(f)}get onDidChangeInput(){return this._onDidChangeInput.event}get label(){var f;return(f=this._thread.label)===null||f===void 0?void 0:f.get()}set label(f){(0,_.transaction)(a=>{var b;(b=this._thread.label)===null||b===void 0||b.set(f,a)}),this._onDidChangeLabel.fire(f)}get contextValue(){return this._thread.contextValue}set contextValue(f){this._thread.contextValue=f}convertToIThreadComment(f){var a;return{id:f.uniqueIdInThread.toString(),mode:f.mode,body:typeof f.body=="string"?f.body:g.MarkdownString.from(f.body),label:f.label,contextValue:f.contextValue,author:{name:f.userName,iconPath:new v.URI(v.URI.revive(f.userIconPath))},reactions:(a=f.commentReactions)===null||a===void 0?void 0:a.map(b=>this.convertToCommentReaction(b)),timestamp:f.timestamp}}convertToCommentReaction(f){const{label:a,iconPath:b,count:y,hasReacted:A}=f;return{label:a,iconPath:new v.URI(v.URI.revive(b)),count:y??0,authorHasReacted:!!A}}convertToCoreReaction(f){const{label:a,iconPath:b,count:y,authorHasReacted:A}=f;return{label:a,iconPath:v.URI.revive(b),count:y??0,hasReacted:A}}convertToCoreComment(f){var a;return{uniqueIdInThread:+f.id,contextValue:f.contextValue,mode:f.mode,label:typeof f.label=="string"?f.label:"",body:f.body,userName:f.author.name,commentReactions:(a=f.reactions)===null||a===void 0?void 0:a.map(b=>this.convertToCoreReaction(b)),timestamp:f.timestamp}}get comments(){return this._thread.comments.get().map(f=>this.convertToCoreComment(f))}set comments(f){f?this._thread.updateComments(f.map(a=>this.convertToIThreadComment(a))):this._thread.updateComments([]),this._onDidChangeComments.fire(f)}get onDidChangeComments(){return this._onDidChangeComments.event}set range(f){this._thread.range=f,this._onDidChangeRange.fire(this._thread.range)}get range(){return this._thread.range}get onDidChangeCanReply(){return this._onDidChangeCanReply.event}set canReply(f){this._thread.setReadOnly(!f),this._onDidChangeCanReply.fire(f)}get canReply(){return!this._thread.readOnly.get()}get collapsibleState(){return this._thread.isCollapsed.get()?l.CommentThreadCollapsibleState.Collapsed:l.CommentThreadCollapsibleState.Expanded}set collapsibleState(f){(0,_.transaction)(a=>{this._thread.isCollapsed.set(f===l.CommentThreadCollapsibleState.Collapsed,a)}),this._onDidChangeCollasibleState.fire(this._collapsibleState)}get isDisposed(){return this._isDisposed}constructor(f,a,b,y,A,S,w){super(),this.commentThreadHandle=f,this.controllerHandle=a,this.extensionId=b,this.threadId=y,this.resource=A,this._onDidChangeInput=new v.Emitter,this._onDidChangeLabel=new v.Emitter,this.onDidChangeLabel=this._onDidChangeLabel.event,this._onDidChangeComments=new v.Emitter,this._onDidChangeCanReply=new v.Emitter,this._onDidChangeRange=new v.Emitter,this.onDidChangeRange=this._onDidChangeRange.event,this._onDidChangeCollasibleState=new v.Emitter,this.onDidChangeCollasibleState=this._onDidChangeCollasibleState.event;const T=this.commentsService.commentsThreads.filter(O=>O.uri.toString()===A&&O.range.startLineNumber===S.startLineNumber),[D]=T.slice(-1),I={commentControlHandle:a,commentThreadHandle:f};D&&!D.data?(D.data=I,this._thread=D):this._thread=this.commentsService.createThread(new v.URI(A),(0,m.positionToRange)(S.startLineNumber),{data:I,readOnly:!w}),this.disposables.push(this.onDidChangeComments(()=>{this.commentsService.fireThreadCommentChange(this._thread)}),this._onDidChangeCollasibleState,this._onDidChangeComments,this._onDidChangeInput,this._onDidChangeLabel,this._onDidChangeRange),this._isDisposed=!1}isDocumentCommentThread(){throw new Error("Method not implemented.")}batchUpdate(f){const a=b=>Object.prototype.hasOwnProperty.call(f,b);a("range")&&(this.range=f.range),a("label")&&(this.label=f.label),a("contextValue")&&(this.contextValue=f.contextValue),a("comments")&&(this.comments=f.comments),a("collapseState")&&(this.collapsibleState=f.collapseState),a("canReply")&&(this.canReply=f.canReply)}dispose(){this._isDisposed=!0,this._thread.dispose(),super.dispose()}toJSON(){return{$mid:7,commentControlHandle:this.controllerHandle,commentThreadHandle:this.commentThreadHandle}}};t.MainThreadCommentThread=u,n.__decorate([(0,r.Autowired)(o.ICommentsService),n.__metadata("design:type",Object)],u.prototype,"commentsService",void 0),t.MainThreadCommentThread=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Number,Number,String,String,String,Object,Boolean])],u);let d=class extends v.WithEventBus{get handle(){return this._handle}get id(){return this._id}get contextValue(){return this._id}get proxy(){return this._proxy}get label(){return this._label}get reactions(){return this._reactions}set reactions(f){this._reactions=f}get features(){return this._features}constructor(f,a,b,y,A){super(),this._proxy=f,this._handle=a,this._id=b,this._label=y,this._features=A,this._threads=new Map,this.addDispose(this.commentsService.registerCommentRangeProvider(b,{getCommentingRanges:S=>this.getCommentingRanges(S.uri,v.CancellationToken.None)}))}updateFeatures(f){var a;this._features={...this._features,...f},this.commentsFeatureRegistry.registerProviderFeature(this._id,{placeholder:(a=this._features.options)===null||a===void 0?void 0:a.placeHolder})}createCommentThread(f,a,b,y,A){const S=v.URI.from(y),w=this.injector.get(u,[a,this.handle,f,b,S.toString(),A,!0]);return this._threads.set(a,w),this.addDispose({dispose:()=>{this._threads.delete(a),w.dispose()}}),w}updateCommentThread(f,a,b,y){this.getKnownThread(f).batchUpdate(y)}deleteCommentThread(f){const a=this.getKnownThread(f);this._threads.delete(f),a.dispose()}deleteCommentThreadMain(f){this._threads.forEach(a=>{a.threadId===f&&this._proxy.$deleteCommentThread(this._handle,a.commentThreadHandle)})}getKnownThread(f){const a=this._threads.get(f);if(!a)throw new Error("unknown thread");return a}async getCommentingRanges(f,a){return await this._proxy.$provideCommentingRanges(this.handle,f.codeUri,a)||[]}handleCommentReaction(f){var a;const{thread:b,comment:y,reaction:A}=f.payload,S=(a=b.data)===null||a===void 0?void 0:a.commentThreadHandle,w=this.getKnownThread(S),T=w.convertToCoreComment(y),D=w.convertToCoreReaction(A);this.toggleReaction(b.uri,w,T,D)}async toggleReaction(f,a,b,y){return this._proxy.$toggleReaction(this._handle,a.commentThreadHandle,f.codeUri,b,y)}createCommentThreadTemplate(f,a){this._proxy.$createCommentThreadTemplate(this.handle,f,a)}async updateCommentThreadTemplate(f,a){await this._proxy.$updateCommentThreadTemplate(this.handle,f,a)}toJSON(){return{$mid:6,handle:this.handle}}};t.MainThreadCommentController=d,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],d.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(o.ICommentsService),n.__metadata("design:type",Object)],d.prototype,"commentsService",void 0),n.__decorate([(0,r.Autowired)(o.ICommentsFeatureRegistry),n.__metadata("design:type",Object)],d.prototype,"commentsFeatureRegistry",void 0),n.__decorate([(0,v.OnEvent)(o.CommentReactionClick),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[o.CommentReactionClick]),n.__metadata("design:returntype",void 0)],d.prototype,"handleCommentReaction",null),t.MainThreadCommentController=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Number,String,String,Object])],d)},57484:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadConnection=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(46147);let m=class{constructor(s){this.rpcProtocol=s,this.connections=new Map,this.connectionsReady=new Map,this.toDispose=new p.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostConnection)}dispose(){this.connections.forEach(s=>{s.dispose()}),this.connections.clear(),this.toDispose.dispose()}async $sendMessage(s,g){const l=this.connectionsReady.get(s);l&&await l.promise,this.connections.has(s)?this.connections.get(s).readMessage(g):this.logger.warn(`Do not found connection ${s}`)}async $createConnection(s){this.logger.log(`create connection ${s}`),await this.doEnsureConnection(s)}async $deleteConnection(s){this.logger.log(`delete connection ${s}`),this.connections.delete(s)}async ensureConnection(s){const g=await this.doEnsureConnection(s);return await this.proxy.$createConnection(s),g}async doEnsureConnection(s){let g=this.connections.get(s);if(!g){const l=new c.Deferred;this.connectionsReady.set(s,l),g=await this.doCreateConnection(s),l.resolve(),this.connections.set(s,g),this.connectionsReady.delete(s)}return g}async doCreateConnection(s){const g=new v.ExtensionConnection(s,this.proxy,()=>{this.connections.delete(s),this.proxy.$deleteConnection(s)});return this.toDispose.push(p.Disposable.create(()=>g.fireClose())),g}};t.MainThreadConnection=m,n.__decorate([(0,r.Autowired)(p.ILogger),n.__metadata("design:type",Object)],m.prototype,"logger",void 0),t.MainThreadConnection=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],m)},23105:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadCustomEditor=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(57517),v=e(65046),m=e(46147),_=e(35912),s=e(62783);let g=class extends c.WithEventBus{constructor(h,u){super(),this.webview=u,this.customEditors=new Map,this.proxy=h.getProxy(m.ExtHostAPIIdentifier.ExtHostCustomEditor)}$acceptCustomDocumentDirty(h,u){this.eventBus.fire(new p.ResourceDecorationNeedChangeEvent({uri:c.URI.from(h),decoration:{dirty:u}}))}async onShouldSave(h){const{viewType:u,uri:d,cancellationToken:E}=h.payload,f=this.customEditors.get(u);if(f){if(f.type===m.CustomEditorType.TextEditor){const a=this.editorDocumentModelService.getModelReference(d);if(a)try{await a.instance.save()}finally{a.dispose()}}else if(f.type===m.CustomEditorType.FullEditor)return this.proxy.$saveCustomDocument(u,d.codeUri,E)}}async onShouldRevert(h){const{viewType:u,uri:d,cancellationToken:E}=h.payload,f=this.customEditors.get(u);if(f){if(f.type===m.CustomEditorType.TextEditor){const a=this.editorDocumentModelService.getModelReference(d);if(a)try{await a.instance.revert()}finally{a.dispose()}}else if(f.type===m.CustomEditorType.FullEditor)return this.proxy.$revertCustomDocument(u,d.codeUri,E)}}async onShouldEdit(h){const{viewType:u,uri:d,type:E}=h.payload,f=this.customEditors.get(u);if(f)if(f.type===m.CustomEditorType.TextEditor){const a=this.editorDocumentModelService.getModelReference(d);if(a)try{E==="undo"?await a.instance.getMonacoModel().undo():await a.instance.getMonacoModel().redo()}finally{a.dispose()}}else f.type===m.CustomEditorType.FullEditor&&(E==="undo"?await this.proxy.$undo(u,d.codeUri):await this.proxy.$redo(u,d.codeUri))}async onCustomEditorShouldDisplayEvent(h){const u=this.customEditors.get(h.payload.viewType);if(u){const{viewType:d,uri:E,openTypeId:f,webviewPanelId:a,cancellationToken:b}=h.payload;if(u.type===m.CustomEditorType.TextEditor){const y=await this.editorDocumentModelService.createModelReference(E);if(!y)throw new Error(`failed to open document ${E} for custom editor`);if(b.isCancellationRequested){y.dispose();return}const A=this.webviewService.getWebview(a);if(!A)throw y.dispose(),new Error(`failed to find webview ${a}`);this.eventBus.on(_.CustomEditorShouldHideEvent,S=>{E.isEqual(S.payload.uri)&&y.dispose()}),this.webview.pipeBrowserHostedWebviewPanel(A,{uri:E,openTypeId:f},d,u.options.webviewOptions||{},u.extensionInfo),this.proxy.$resolveCustomTextEditor(d,E.codeUri,a,b)}else{const y=this.webviewService.getWebview(a);if(!y)throw new Error(`failed to find webview ${a}`);this.webview.pipeBrowserHostedWebviewPanel(y,{uri:E,openTypeId:f},d,u.options.webviewOptions||{},u.extensionInfo),this.proxy.$resolveCustomTextEditor(d,E.codeUri,a,b)}}}$registerCustomEditor(h,u,d={},E){this.customEditors.set(h,{type:u,options:d,extensionInfo:E}),this.eventBus.fire(new _.CustomEditorOptionChangeEvent({viewType:h,options:d}))}$unregisterCustomEditor(h){this.customEditors.delete(h)}};t.MainThreadCustomEditor=g,n.__decorate([(0,r.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],g.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,r.Autowired)(v.IWebviewService),n.__metadata("design:type",Object)],g.prototype,"webviewService",void 0),n.__decorate([(0,c.OnEvent)(_.CustomEditorShouldSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.CustomEditorShouldSaveEvent]),n.__metadata("design:returntype",Promise)],g.prototype,"onShouldSave",null),n.__decorate([(0,c.OnEvent)(_.CustomEditorShouldRevertEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.CustomEditorShouldSaveEvent]),n.__metadata("design:returntype",Promise)],g.prototype,"onShouldRevert",null),n.__decorate([(0,c.OnEvent)(_.CustomEditorShouldEditEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.CustomEditorShouldEditEvent]),n.__metadata("design:returntype",Promise)],g.prototype,"onShouldEdit",null),n.__decorate([(0,c.OnEvent)(_.CustomEditorShouldDisplayEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.CustomEditorShouldDisplayEvent]),n.__metadata("design:returntype",Promise)],g.prototype,"onCustomEditorShouldDisplayEvent",null),t.MainThreadCustomEditor=g=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,s.MainThreadWebview])],g)},10273:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadDebug=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(26542),v=e(66482),m=e(99797),_=e(37499),s=e(31141),g=e(97186),l=e(38029),h=e(15153),u=e(70159),d=e(26296),E=e(54414),f=e(14951),a=e(83145),b=e(72665),y=e(6487),A=e(46147),S=e(71354),w=e(77385),T=e(21259),D=e(90384);let I=class{constructor(M,R){this.rpcProtocol=M,this.mainThreadConnection=R,this.toDispose=new Map,this.listenerDispose=new c.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(A.ExtHostAPIIdentifier.ExtHostDebug),this.listen(),this.registerDebugContributions()}dispose(){this.toDispose.forEach(M=>{M.dispose()}),this.toDispose.clear(),this.listenerDispose.dispose()}listen(){this.listenerDispose.pushAll([this.breakpointManager.onDidChangeBreakpoints(({added:M,removed:R,changed:P})=>{const k=this.breakpointManager.getBreakpoints();this.proxy.$breakpointsDidChange(this.toCustomApiBreakpoints(k),this.toCustomApiBreakpoints(M),this.toCustomApiBreakpoints(R),this.toCustomApiBreakpoints(P))}),this.sessionManager.onDidStartDebugSession(M=>{this.proxy.$sessionDidStart(M.id)}),this.sessionManager.onDidDestroyDebugSession(M=>{this.proxy.$sessionDidDestroy(M.id)}),this.sessionManager.onDidChangeActiveDebugSession(M=>{this.proxy.$sessionDidChange(M.current&&M.current.id)}),this.sessionManager.onDidReceiveDebugSessionCustomEvent(M=>{this.proxy.$onSessionCustomEvent(M.session.id,M.event,M.body)}),this.debugService.onDidDebugContributionPointChange(({path:M,contributions:R,removed:P})=>{P?(this.proxy.$unregisterDebuggerContributions(R),R.forEach(k=>{this.$unregisterDebuggerContribution({type:k.type,label:k.label||k.type}),this.logger.log(`Debugger contribution has been unregistered: ${k.type}`)})):(this.proxy.$registerDebuggerContributions(M,R),R.forEach(k=>{this.$registerDebuggerContribution({type:k.type,label:k.label||k.type}),this.logger.log(`Debugger contribution has been registered: ${k.type}`)}))})])}registerDebugContributions(){const M=this.debugService.debugContributionPoints;for(const[R,P]of M)this.proxy.$registerDebuggerContributions(R,P),P.forEach(k=>{this.$registerDebuggerContribution({type:k.type,label:k.label||k.type}),this.logger.log(`Debugger contribution has been registered: ${k.type}`)})}async $appendToDebugConsole(M){this.debugConsoleModelService.debugConsoleSession&&this.debugConsoleModelService.debugConsoleSession.append(M)}async $appendLineToDebugConsole(M){this.debugConsoleModelService.debugConsoleSession&&this.debugConsoleModelService.debugConsoleSession.appendLine(M)}async $unregisterDebuggerContribution(M){const R=this.toDispose.get(M.type);R?.dispose()}async $registerDebuggerContribution(M){const R=new c.DisposableCollection,P=await this.proxy.$getTerminalCreationOptions(M.type);this.toDispose.set(M.type,R);const k=new w.ExtensionDebugSessionFactory(this.editorService,this.breakpointManager,this.modelManager,this.terminalService,this.labelService,this.messageService,this.debugPreferences,async F=>await this.mainThreadConnection.ensureConnection(F),this.fileService,P,this.debugPreferences,this.outputService,this.injector,this.sessionManager);R.pushAll([this.adapterContributionRegister.registerDebugAdapterContribution(new T.ExtensionDebugAdapterContribution(M,this.proxy,this.activationEventService)),this.sessionContributionRegistry.registerDebugSessionContribution({debugType:M.type,debugSessionFactory:()=>k})])}async $addBreakpoints(M){const R=new Map;M.forEach(P=>R.set(P.id,P)),this.breakpointManager.findMarkers({dataFilter:P=>(R.has(P.id)&&R.delete(P.id),!1)});for(const P of R.values())if(P.location){const k=P.location;this.breakpointManager.addBreakpoint(m.DebugBreakpoint.create(c.Uri.revive(k.uri),{line:P.location.range.startLineNumber+1,column:1,condition:P.condition,hitCondition:P.hitCondition,logMessage:P.logMessage},!0))}}async $removeBreakpoints(M){const R=new Set;M.forEach(P=>R.add(P.id));for(const P of this.breakpointManager.findMarkers({dataFilter:k=>R.has(k.id)})){const k=this.modelManager.resolve(new c.URI(P.data.uri));k&&k[0].breakpoint&&this.breakpointManager.delBreakpoint(k[0].breakpoint)}}async $customRequest(M,R,P){const k=this.sessionManager.getSession(M);if(k)return k.sendCustomRequest(R,P);throw new Error(`Debug session '${M}' not found`)}$getDebugProtocolBreakpoint(M,R){const P=this.sessionManager.getSession(M);return P?Promise.resolve(P.getDebugProtocolBreakpoint(R)):Promise.reject(new Error("debug session not found"))}async $startDebugging(M,R,P){let k,F=0;if(typeof R=="string")for(const j of this.debugConfigurationManager.all){if(j.configuration.name===R){k=j.configuration;break}F++}else k=R;if(!k)throw new Error(`No configuration ${R}`);const L={noDebug:!1,parentSession:this.sessionManager.getSession(P.parentSessionID),repl:P.repl,compact:P.compact,lifecycleManagedByParent:P.lifecycleManagedByParent};return!!await this.sessionManager.start({configuration:k,workspaceFolderUri:M&&c.Uri.revive(M.uri).toString(),index:F,...L})}$stopDebugging(M){if(M){const R=this.sessionManager.getSession(M);if(R)return this.sessionManager.stopSession(R)}else return this.sessionManager.stopSession(void 0);throw new Error(`Debug session '${M}' not found`)}toCustomApiBreakpoints(M){return M.map(R=>({id:R.id,enabled:R.enabled,condition:R.raw.condition,hitCondition:R.raw.hitCondition,logMessage:R.raw.logMessage,location:{uri:c.Uri.parse(R.uri),range:{startLineNumber:R.raw.line-1,startColumn:(R.raw.column||1)-1,endLineNumber:R.raw.line-1,endColumn:(R.raw.column||1)-1}}}))}};t.MainThreadDebug=I,n.__decorate([(0,r.Autowired)(d.IDebugSessionManager),n.__metadata("design:type",l.DebugSessionManager)],I.prototype,"sessionManager",void 0),n.__decorate([(0,r.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],I.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(m.BreakpointManager),n.__metadata("design:type",m.BreakpointManager)],I.prototype,"breakpointManager",void 0),n.__decorate([(0,r.Autowired)(v.IDebugModelManager),n.__metadata("design:type",Object)],I.prototype,"modelManager",void 0),n.__decorate([(0,r.Autowired)(_.DebugConfigurationManager),n.__metadata("design:type",_.DebugConfigurationManager)],I.prototype,"debugConfigurationManager",void 0),n.__decorate([(0,r.Autowired)(s.DebugPreferences),n.__metadata("design:type",Object)],I.prototype,"debugPreferences",void 0),n.__decorate([(0,r.Autowired)(E.WorkbenchEditorService),n.__metadata("design:type",E.WorkbenchEditorService)],I.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(b.IMessageService),n.__metadata("design:type",Object)],I.prototype,"messageService",void 0),n.__decorate([(0,r.Autowired)(f.IFileServiceClient),n.__metadata("design:type",Object)],I.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(u.IDebugServer),n.__metadata("design:type",D.ExtensionDebugService)],I.prototype,"adapterContributionRegister",void 0),n.__decorate([(0,r.Autowired)(S.IActivationEventService),n.__metadata("design:type",S.IActivationEventService)],I.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(g.DebugSessionContributionRegistry),n.__metadata("design:type",w.ExtensionDebugSessionContributionRegistry)],I.prototype,"sessionContributionRegistry",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],I.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(y.ITerminalApiService),n.__metadata("design:type",Object)],I.prototype,"terminalService",void 0),n.__decorate([(0,r.Autowired)(v.IDebugConsoleModelService),n.__metadata("design:type",h.DebugConsoleModelService)],I.prototype,"debugConsoleModelService",void 0),n.__decorate([(0,r.Autowired)(a.OutputService),n.__metadata("design:type",a.OutputService)],I.prototype,"outputService",void 0),n.__decorate([(0,r.Autowired)(u.IDebugService),n.__metadata("design:type",Object)],I.prototype,"debugService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],I.prototype,"injector",void 0),t.MainThreadDebug=I=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__param(1,(0,r.Optional)(A.IInterProcessConnectionService)),n.__metadata("design:paramtypes",[Object,Object])],I)},78690:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadDecorations=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(41893),v=e(46147);class m{constructor(g){this._proxy=g,this._idPool=0,this._requests=Object.create(null),this._resolver=Object.create(null)}enqueue(g,l,h){const u=++this._idPool,d=new Promise(E=>{this._requests[u]={id:u,handle:g,uri:l},this._resolver[u]=E,this._processQueue()});return h.onCancellationRequested(()=>{delete this._requests[u],delete this._resolver[u]}),d}_processQueue(){typeof this._timer!="number"&&(this._timer=setTimeout(()=>{const g=this._requests,l=this._resolver;this._proxy.$provideFileDecorations(Object.values(g),c.CancellationToken.None).then(h=>{for(const u in l)l[u](h[u])}),this._requests=[],this._resolver=[],this._timer=void 0},0))}}let _=class{constructor(g){this.rpcProtocol=g,this._provider=new Map,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostDecorations),this._requestQueue=new m(this.proxy)}dispose(){this._provider.forEach(g=>(0,c.dispose)(g)),this._provider.clear()}$registerDecorationProvider(g,l){const h=new c.Emitter,u=this.decorationsService.registerDecorationsProvider({label:l,onDidChange:h.event,provideDecorations:(d,E)=>this._requestQueue.enqueue(g,d,E).then(f=>{if(!f)return;const[a,b,y,A]=f;return{weight:10,bubble:a||!1,color:A?.id,tooltip:b,letter:y}})});this._provider.set(g,[h,u])}$onDidChange(g,l){const h=this._provider.get(g);if(h){const[u]=h;u.fire(l&&l.map(d=>c.Uri.revive(d)))}}$unregisterDecorationProvider(g){const l=this._provider.get(g);l&&((0,c.dispose)(l),this._provider.delete(g))}};t.MainThreadDecorations=_,n.__decorate([(0,r.Autowired)(p.IDecorationsService),n.__metadata("design:type",p.IDecorationsService)],_.prototype,"decorationsService",void 0),t.MainThreadDecorations=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],_)},84680:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadExtensionDocumentData=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(26542),v=e(43718),m=e(54414),_=e(57517),s=e(17878),g=e(14951),l=e(46147),h=1e3*60*3,u=1e3*20,d=1024*1024*80;let E=class{constructor(y){this.proxy=y,this.onDidChangeContentEmitter=new v.Emitter,this.onDidChangeContent=this.onDidChangeContentEmitter.event,this.schemes=new Set}registerScheme(y){this.schemes.add(y)}unregisterScheme(y){this.schemes.delete(y)}handlesScheme(y){return this.schemes.has(y)}provideEditorDocumentModelContent(y,A){return this.proxy.$provideTextDocumentContent(y.toString(),A)}isReadonly(y){return!0}};E=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],E);let f=class extends v.WithEventBus{isDocSyncEnabled(y){var A;const S=y.toString();if(!this.docSyncEnabled.has(S)){const w=this.docManager.getModelReference(new v.URI(S),"mainthread doc size");w&&(this.docSyncEnabled.set(S,w.instance.getMonacoModel().getValueLength()<this.preference.getValid("editor.docExtHostSyncMaxSize",4*1024*1024*1024)),w.dispose())}return(A=this.docSyncEnabled.get(S))!==null&&A!==void 0?A:!1}isDocIgnored(y){return y.codeUri.scheme===v.Schemes.walkThroughSnippet}constructor(y){super(),this.rpcProtocol=y,this.editorDisposers=new Map,this.extHoldDocuments=new a,this.docSyncEnabled=new v.LRUMap(200,100),this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostDocuments),this.provider=this.injector.get(E,[this.proxy]),this.contentRegistry.registerEditorDocumentModelContentProvider(this.provider),this.docManager.getAllModels().map(A=>{this.isDocSyncEnabled(A.uri)&&this.proxy.$fireModelOpenedEvent({uri:A.uri.toString(),lines:A.getText().split(A.eol),eol:A.eol,dirty:A.dirty,languageId:A.languageId,versionId:A.getMonacoModel().getVersionId()})})}onEditorDocumentModelContentChangeEvent(y){!this.isDocSyncEnabled(y.payload.uri)||this.isDocIgnored(y.payload.uri)||this.proxy.$fireModelChangedEvent({changes:y.payload.changes,uri:y.payload.uri.toString(),eol:y.payload.eol,dirty:y.payload.dirty,versionId:y.payload.versionId,isRedoing:y.payload.isRedoing,isUndoing:y.payload.isUndoing})}async onEditorDocumentModelWillSaveEvent(y){!this.isDocSyncEnabled(y.payload.uri)||this.isDocIgnored(y.payload.uri)||await this.proxy.$fireModelWillSaveEvent({uri:y.payload.uri.toString(),reason:y.payload.reason,dirty:y.payload.dirty})}onEditorDocumentModelOptionChangedEvent(y){!this.isDocSyncEnabled(y.payload.uri)||this.isDocIgnored(y.payload.uri)||this.proxy.$fireModelOptionsChangedEvent({encoding:y.payload.encoding,uri:y.payload.uri.toString(),languageId:y.payload.languageId,dirty:y.payload.dirty})}onEditorDocumentModelContentCreationEvent(y){!this.isDocSyncEnabled(y.payload.uri)||this.isDocIgnored(y.payload.uri)||this.proxy.$fireModelOpenedEvent({uri:y.payload.uri.toString(),lines:y.payload.content.split(y.payload.eol),eol:y.payload.eol,dirty:!1,languageId:y.payload.languageId,versionId:y.payload.versionId})}onEditorDocumentModelRemovedEvent(y){!this.isDocSyncEnabled(y.payload)||this.isDocIgnored(y.payload)||this.proxy.$fireModelRemovedEvent({uri:y.payload.toString()})}onEditorDocumentModelSavingEvent(y){!this.isDocSyncEnabled(y.payload)||this.isDocIgnored(y.payload)||this.proxy.$fireModelSavedEvent({uri:y.payload.toString()})}async $tryCreateDocument(y){y||(y={});const{language:A,content:S}=y,w=await this.docManager.createModelReference(new v.URI(`${v.Schemes.untitled}://temp/Untitled-`+this.tempDocIdCount.id),"ext-create-document");return A&&(w.instance.languageId=A),(0,v.isUndefinedOrNull)(S)||w.instance.updateContent(S),w.instance.uri.toString()}async $tryOpenDocument(y){const A=await this.docManager.createModelReference(new v.URI(y),"ext-open-document");this.extHoldDocuments.add(A)}async $trySaveDocument(y){const A=await this.docManager.getModelReference(new v.URI(y),"ext-saving-document");if(A)try{return A.instance.save(!0)}finally{A.dispose()}return!1}async $fireTextDocumentChangedEvent(y){this.provider.onDidChangeContentEmitter.fire(new v.URI(y))}$unregisterDocumentProviderWithScheme(y){this.editorDisposers.has(y)&&(this.editorDisposers.get(y).dispose(),this.editorDisposers.delete(y))}$registerDocumentProviderWithScheme(y){this.$unregisterDocumentProviderWithScheme(y);const A=new v.Disposable;A.addDispose(this.resourceService.registerResourceProvider({scheme:y,provideResource:async S=>Promise.all([this.labelService.getName(S),this.labelService.getIcon(S)]).then(([w,T])=>({name:w,icon:T,uri:S,metadata:null}))})),A.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(y,(S,w)=>{this.fileServiceClient.handlesScheme(y)||w.push({type:_.EditorOpenType.code,readonly:!0})})),A.addDispose({dispose:()=>{this.provider.unregisterScheme(y)}}),this.provider.registerScheme(y),this.editorDisposers.set(y,A)}dispose(){super.dispose();for(const y of this.editorDisposers.values())y.dispose();this.editorDisposers.clear()}};t.MainThreadExtensionDocumentData=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.UntitledDocumentIdCounter)],f.prototype,"tempDocIdCount",void 0),n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"docManager",void 0),n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],f.prototype,"contentRegistry",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",m.ResourceService)],f.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",_.EditorComponentRegistry)],f.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.LabelService)],f.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preference",void 0),n.__decorate([(0,r.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],f.prototype,"fileServiceClient",void 0),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorDocumentModelContentChangeEvent",null),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],f.prototype,"onEditorDocumentModelWillSaveEvent",null),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelOptionChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelOptionChangedEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorDocumentModelOptionChangedEvent",null),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelCreationEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelCreationEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorDocumentModelContentCreationEvent",null),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelRemovalEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelRemovalEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorDocumentModelRemovedEvent",null),n.__decorate([(0,v.OnEvent)(_.EditorDocumentModelSavedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[_.EditorDocumentModelSavedEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorDocumentModelSavingEvent",null),t.MainThreadExtensionDocumentData=f=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],f);class a{constructor(){this.maxLength=d,this.maxAge=h,this.minAge=u,this.refs=[],this.length=0}add(y){const A=y.instance.getText().length;this.length+=A;let S=null;const w={ref:y,dispose:()=>{const T=this.refs.indexOf(w);T!==0&&(this.length-=A,y.dispose(),clearTimeout(S),this.refs.splice(T,1))},createTimeStamp:new Date().getTime()};S=setTimeout(()=>{w.dispose()},this.maxAge),this.refs.push(w),this.clean()}clean(){for(;this.length>this.maxLength&&this.refs.length>1&&!(this.refs[0].createTimeStamp+this.minAge>new Date().getTime());)this.disposeFirst()}disposeFirst(){const y=this.refs.shift();y&&y.dispose()}}},11646:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadEditorTabsService=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(75524),p=e(43718),v=e(54414),m=e(51553),_=e(46147);let s=class extends p.Disposable{constructor(d){super(),this.rpcProtocol=d,this.prevEditorGroups=new Set,this.groupDataStore=new Map,this.tabStore=new l,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostEditorTabs),this.addDispose(this.workbenchEditorService.onDidEditorGroupsChanged(()=>{this.updateGroups()})),this.addDispose(this.workbenchEditorService.onActiveResourceChange(()=>{this.updateGroups()})),this.workbenchEditorService.contributionsReady.promise.then(()=>{this.updateGroups()})}$initializeState(){this.updateGroups()}$moveTab(d,E,f,a){const b=this.findEditorTabData(d);if(b){const{group:y,resource:A}=b;let S=y;(0,p.isUndefined)(f)||(S=this.workbenchEditorService.sortedEditorGroups[f]),S?S.dropUri(A.uri,v.DragOverPosition.CENTER,y,S.resources[E]):y.dropUri(A.uri,v.DragOverPosition.RIGHT)}}async $closeTab(d,E){return(await Promise.all(d.map(async a=>{const b=this.findEditorTabData(a);if(b)return await b.group.close(b.resource.uri)}))).filter(a=>!!a).length>0}async $closeGroup(d,E){return(await Promise.all(d.map(async a=>{var b;const y=(b=this.groupDataStore.get(a))===null||b===void 0?void 0:b.editorGroup;if(y)try{return await y.closeAll()}catch{return!1}}))).filter(a=>!!a).length>0}findEditorTabData(d){return this.tabStore.all.get(d)}getOrCreateGroupData(d){if(!this.groupDataStore.has(d.groupId)){const E=new h(d,this.workbenchEditorService,this.tabStore,this.proxy);E.addDispose({dispose:()=>{this.groupDataStore.get(d.groupId)===E&&this.groupDataStore.delete(d.groupId)}}),this.groupDataStore.set(d.groupId,E)}return this.groupDataStore.get(d.groupId)}updateGroups(){const d=(0,p.diffSets)(this.prevEditorGroups,new Set(this.workbenchEditorService.editorGroups));d.added.length>0||d.removed.length>0?this.proxy.$acceptEditorTabModel(this.workbenchEditorService.editorGroups.map(E=>{const f=this.getOrCreateGroupData(E);return{...f.dto,tabs:f.tabs.map(a=>a.dto)}})):this.workbenchEditorService.editorGroups.forEach(E=>{this.getOrCreateGroupData(E).tryCheckUpdate()}),this.prevEditorGroups=new Set(this.workbenchEditorService.editorGroups)}};t.MainThreadEditorTabsService=s,n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",m.WorkbenchEditorServiceImpl)],s.prototype,"workbenchEditorService",void 0),t.MainThreadEditorTabsService=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],s);class g{constructor(d,E){this.group=d,this.resource=E,this.tryUpdate()}updateResource(d){this.resource=d}tryUpdate(){const d=g.from(this.group,this.resource);return this._dto&&JSON.stringify(this._dto)!==JSON.stringify(d)?(this._dto=d,!0):(this._dto=d,!1)}get dto(){return this._dto}static getTabId(d,E){return`${d.groupId}~${E.uri.toString()}`}get index(){return this.group.resources.indexOf(this.resource)}static from(d,E){var f,a,b,y,A,S;const w=g.getTabId(d,E),T=d.getLastOpenType(E);let D={kind:0};if(T){if(T.type==="code")D={kind:1,uri:E.uri.codeUri};else if(T.type==="diff"){const{metadata:I}=E;I&&(D={kind:2,original:I.original.codeUri,modified:I.modified.codeUri})}else if(T.type==="mergeEditor"){const{metadata:I}=E;if(I){const{ancestor:O,input1:M,input2:R,output:P}=I,k=c.MergeEditorInputData.from(M),F=c.MergeEditorInputData.from(R);D={kind:3,base:p.Uri.parse(O),input1:k.uri.codeUri,input2:F.uri.codeUri,result:p.Uri.parse(P)}}}else if(T.type==="component"){const I=d.editorComponentRegistry.getEditorComponent(T.componentId);!((f=I?.metadata)===null||f===void 0)&&f.extWebview?D={kind:7,viewType:(a=I?.metadata)===null||a===void 0?void 0:a.extWebview}:!((b=I?.metadata)===null||b===void 0)&&b.customEditor&&(D={kind:6,viewType:(y=I?.metadata)===null||y===void 0?void 0:y.customEditor,uri:E.uri.codeUri})}}return{id:w,label:E.name,input:D,isActive:d.currentResource===E,isPinned:!1,isPreview:!!(!((A=d.previewURI)===null||A===void 0)&&A.isEqual(E.uri)),isDirty:!!(!((S=d.resourceService.getResourceDecoration(E.uri))===null||S===void 0)&&S.dirty)}}}class l{constructor(){this.all=new Map,this.mapByUri=new Map}getOrCreateData(d,E){const f=g.getTabId(d,E);if(this.all.has(f))this.all.get(f).updateResource(E);else{const a=new g(d,E),b=E.uri.toString();this.mapByUri.has(b)||this.mapByUri.set(b,new Map),this.mapByUri.get(b).set(f,a),this.all.set(f,a)}return this.all.get(f)}removeData(d){var E,f;const a=this.all.get(d);if(a){this.all.delete(d);const b=a.resource.uri.toString();(E=this.mapByUri.get(b))===null||E===void 0||E.delete(d),((f=this.mapByUri.get(b))===null||f===void 0?void 0:f.size)===0&&this.mapByUri.delete(b)}}getByResourceUri(d){var E;return Array.from(((E=this.mapByUri.get(d.toString()))===null||E===void 0?void 0:E.values())||[])}}class h extends p.Disposable{constructor(d,E,f,a){super(),this.editorGroup=d,this.editorService=E,this.store=f,this.proxy=a,this.tabs=[],this._data=void 0,this.editorGroup.addDispose(this),this.init()}init(){this.tabs=this.editorGroup.resources.map(d=>this.store.getOrCreateData(this.editorGroup,d)),this.addDispose(this.editorGroup.onDidEditorGroupTabOperation(d=>{const E={open:0,close:1,move:3}[d.type],f=this.store.getOrCreateData(this.editorGroup,d.resource);f.tryUpdate(),this.proxy.$acceptTabOperation({kind:E,groupId:this.editorGroup.groupId,tabDto:f.dto,index:d.index,oldIndex:d.oldIndex})})),this.addDispose(this.editorGroup.onDidEditorGroupBodyChanged(()=>{this.onTabsMayUpdated()})),this.addDispose(this.editorGroup.onDidEditorGroupTabChanged(()=>{this.onTabsMayUpdated()}))}onTabsMayUpdated(){this.tabs=this.editorGroup.resources.map((d,E)=>{const f=this.store.getOrCreateData(this.editorGroup,d);return f.tryUpdate()&&this.proxy.$acceptTabOperation({kind:2,tabDto:f.dto,index:E,groupId:this.editorGroup.groupId}),f})}tryCheckUpdate(){const d=this._data,E={groupId:this.editorGroup.groupId,isActive:this.editorService.currentEditorGroup===this.editorGroup,viewColumn:this.editorGroup.index};this._data=E,d&&(d.viewColumn!==E.viewColumn?this.proxy.$acceptTabGroupUpdate({...this.dto,tabs:[]}):!d.isActive&&E.isActive&&this.proxy.$acceptTabGroupUpdate({...this.dto,tabs:[]}))}get dto(){return this._data||(this._data={groupId:this.editorGroup.groupId,isActive:this.editorService.currentEditorGroup===this.editorGroup,viewColumn:this.editorGroup.index}),this._data}}},85589:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadEditorService=void 0,t.cursorStyleToString=M;const n=e(85608),r=n.__importDefault(e(82451)),o=n.__importDefault(e(97331)),c=e(76003),p=e(8919),v=e(40827),m=e(43718),_=e(54414),s=e(57517),g=e(71624),l=e(51553),h=n.__importStar(e(20868)),u=e(87822),d=e(16781),E=e(46147),f=e(53043),a=e(84680);let b=class extends m.WithEventBus{constructor(P,k){super(),this.rpcProtocol=P,this.documents=k,this.propertiesChangeCache=new Map,this.triggerPropertiesChange=(0,o.default)(()=>{const F=[];this.propertiesChangeCache.forEach(L=>{F.push(L)}),this.propertiesChangeCache.clear(),this.proxy.$acceptPropertiesChanges(F)},16,{leading:!0,trailing:!0}),this.proxy=this.rpcProtocol.getProxy(E.ExtHostAPIIdentifier.ExtHostEditors),this.$getInitialState().then(F=>{this.proxy.$acceptChange(F)})}async $getInitialState(){this.startEvents();const P=this.editorService.editorGroups.map(F=>{if(F.currentOpenType&&w(F.currentOpenType)){const L=F.currentEditor;return!L.currentDocumentModel||!this.documents.isDocSyncEnabled(L.currentDocumentModel.uri)?void 0:{id:y(F,F.currentResource.uri),uri:L.currentDocumentModel.uri.toString(),selections:L.getSelections()||[],options:S(L.monacoEditor),viewColumn:D(F),visibleRanges:L.monacoEditor.getVisibleRanges()}}}).filter(F=>!!F),k=this.editorService.currentResource&&P.find(F=>F.uri===this.editorService.currentResource.uri.toString());return{created:P,actived:k&&this.documents.isDocSyncEnabled(k.uri)&&k.id}}async $closeEditor(P){if(this.getEditor(P)){const F=this.getGroup(P);F.close(F.currentResource.uri)}}async $revealRange(P,k,F){const L=this.getEditor(P);if(L)switch(F){case E.TextEditorRevealType.InCenter:return L.monacoEditor.revealRangeInCenter(k);case E.TextEditorRevealType.AtTop:return L.monacoEditor.revealRangeAtTop(k);case E.TextEditorRevealType.InCenterIfOutsideViewport:return L.monacoEditor.revealRangeInCenterIfOutsideViewport(k);default:return L.monacoEditor.revealRange(k)}}async $createTextEditorDecorationType(P,k){this.resolveIconPaths(k),this.resolveIconPaths(k.dark),this.resolveIconPaths(k.light),this.decorationService.createTextEditorDecorationType(k,P)}resolveIconPaths(P){if(!P)return P;if(P.gutterIconPath){let k;typeof P.gutterIconPath=="string"?k=m.URI.file(P.gutterIconPath):k=m.URI.from(P.gutterIconPath),P.gutterIconPath=this.staticResourceService.resolveStaticResource(k).toString()}}async $deleteTextEditorDecorationType(P){const k=this.decorationService.getTextEditorDecorationType(P);k&&k.dispose()}async $applyDecoration(P,k,F){const L=this.getEditor(P);L&&L.applyDecoration(k,F)}async $insertSnippet(P,k,F=[],L={undoStopAfter:!0,undoStopBefore:!0}){const B=this.getEditor(P);B&&B.insertSnippet(k,F,L)}async $updateOptions(P,k){const F=this.getEditor(P);F&&await this.setConfiguration(F.monacoEditor,k)}getEditor(P){var k,F;const L=this.getGroup(P);if(!L)return;const B=L.currentResource;if(B&&L.currentOpenType&&w(L.currentOpenType)){if(P===y(L,B.uri))return L.currentEditor;if(((k=L.currentOpenType)===null||k===void 0?void 0:k.type)===s.EditorOpenType.diff&&P===y(L,B.metadata.original,"original"))return L.diffEditor.originalEditor;if(((F=L.currentOpenType)===null||F===void 0?void 0:F.type)===s.EditorOpenType.diff&&P===y(L,B.metadata.modified,"modified"))return L.diffEditor.modifiedEditor}}getGroup(P){const k=A(P);return this.editorService.getEditorGroup(k)}batchPropertiesChanges(P){const{id:k}=P;let F=this.propertiesChangeCache.get(k);F||(F={}),F=(0,r.default)(F,P),this.propertiesChangeCache.set(k,F),this.triggerPropertiesChange()}startEvents(){this.addDispose([this.eventBus.on(s.EditorGroupChangeEvent,P=>{const k=P.payload;if(!I(k.newResource,k.oldResource)||!O(k.newOpenType,k.oldOpenType)){const F={};if(k.newOpenType&&(k.newOpenType.type===s.EditorOpenType.code||k.newOpenType.type===s.EditorOpenType.diff)){const L=k.group.currentEditor;if(L.currentDocumentModel){if(this.documents.isDocSyncEnabled(L.currentDocumentModel.uri))if(F.created=[],k.newOpenType.type===s.EditorOpenType.diff){const B=k.group.diffEditor.originalEditor,j=k.group.diffEditor.modifiedEditor,W=y(k.group,k.newResource.metadata.original,"original");F.created.push({id:W,uri:B.currentUri.toString(),selections:B.getSelections()||[],options:S(B.monacoEditor),viewColumn:D(k.group),visibleRanges:B.monacoEditor.getVisibleRanges()});const U=y(k.group,k.newResource.metadata.modified,"modified");F.created.push({id:U,uri:j.currentUri.toString(),selections:j.getSelections()||[],options:S(j.monacoEditor),viewColumn:D(k.group),visibleRanges:j.monacoEditor.getVisibleRanges()})}else F.created.push({id:y(k.group,k.newResource.uri),uri:L.currentDocumentModel.uri.toString(),selections:L.getSelections()||[],options:S(L.monacoEditor),viewColumn:D(k.group),visibleRanges:L.monacoEditor.getVisibleRanges()})}I(k.newResource,k.oldResource)&&!O(k.newOpenType,k.oldOpenType)&&k.newResource===this.editorService.currentResource&&(F.actived=y(k.group,k.newResource.uri))}k.oldOpenType&&(k.oldOpenType.type===s.EditorOpenType.code||k.oldOpenType.type===s.EditorOpenType.diff)&&(F.removed=[],k.oldOpenType.type===s.EditorOpenType.diff?(F.removed.push(y(k.group,k.oldResource.metadata.original,"original")),F.removed.push(y(k.group,k.oldResource.metadata.modified,"modified"))):F.removed=[y(k.group,k.oldResource.uri)]),this.proxy.$acceptChange(F)}}),this.editorService.onActiveEditorUriChange(P=>{P&&this.editorService.currentEditorGroup&&w(this.editorService.currentEditorGroup.currentOpenType)?this.acceptCurrentEditor(P):this.proxy.$acceptChange({actived:"-1"})}),this.eventBus.on(s.EditorConfigurationChangedEvent,P=>{const k=y(P.payload.group,P.payload.resource.uri);P.payload.group.currentEditor&&P.payload.group.currentEditor.monacoEditor.getModel()&&this.batchPropertiesChanges({id:k,options:S(P.payload.group.currentEditor.monacoEditor)})}),this.eventBus.on(s.EditorSelectionChangeEvent,P=>{const k=y(P.payload.group,P.payload.editorUri,P.payload.side);this.batchPropertiesChanges({id:k,selections:{selections:P.payload.selections,source:P.payload.source}}),this.acceptCurrentEditor(P.payload.editorUri)}),this.eventBus.on(s.EditorVisibleChangeEvent,P=>{const k=y(P.payload.group,P.payload.resource.uri);this.batchPropertiesChanges({id:k,visibleRanges:P.payload.visibleRanges})}),this.eventBus.on(s.EditorGroupIndexChangedEvent,P=>{if(T(P.payload.group)){const k=y(P.payload.group,P.payload.group.currentResource.uri);this.batchPropertiesChanges({id:k,viewColumn:D(P.payload.group)})}})])}acceptCurrentEditor(P){var k,F,L,B,j;let W;const U=((k=this.editorService.currentEditorGroup.currentOpenType)===null||k===void 0?void 0:k.type)===s.EditorOpenType.diff&&((F=this.editorService.currentEditorGroup.diffEditor.originalEditor.currentUri)===null||F===void 0?void 0:F.isEqual(P)),Q=((L=this.editorService.currentEditorGroup.currentOpenType)===null||L===void 0?void 0:L.type)===s.EditorOpenType.diff&&((B=this.editorService.currentEditorGroup.diffEditor.modifiedEditor.currentUri)===null||B===void 0?void 0:B.isEqual(P));U&&(W="original"),Q&&(W="modified"),W?this.proxy.$acceptChange({actived:y(this.editorService.currentEditorGroup,P,W)}):this.proxy.$acceptChange({actived:y(this.editorService.currentEditorGroup,(j=this.editorService.currentEditorGroup.currentResource)===null||j===void 0?void 0:j.uri)})}async $applyEdits(P,k,F,L){const B=this.getEditor(P);if(B&&B.currentDocumentModel){const j=B.currentDocumentModel.getMonacoModel();if(j&&j.getVersionId()===k){typeof L.setEndOfLine<"u"&&j.pushEOL(L.setEndOfLine);const W=F.map(U=>({range:h.Range.lift(U.range),text:U.text,forceMoveMarkers:U.forceMoveMarkers}));return L.undoStopBefore&&B.monacoEditor.pushUndoStop(),B.monacoEditor.executeEdits("MainThreadTextEditor",W),L.undoStopAfter&&B.monacoEditor.pushUndoStop(),!0}else return!1}else return!1}async $openResource(P,k){k.forceOpenType={type:s.EditorOpenType.code},k.focus=!0,k={...k,...(0,f.viewColumnToResourceOpenOptions)(k.viewColumn)};const F=await this.editorService.open(new m.URI(P),k);if(F)return y(F.group,F.resource.uri);throw new Error("Editor Open uri "+P.toString()+" Failed")}$setSelections(P,k){return this.getEditor(P)?(this.getEditor(P).setSelections(k),Promise.resolve()):Promise.reject(`No Such TextEditor: ${P}`)}setConfiguration(P,k){if(P.getModel()&&this._setIndentConfiguration(P.getModel(),k),!!P){if(k.cursorStyle){const F=M(k.cursorStyle);P.updateOptions({cursorStyle:F})}if(typeof k.lineNumbers<"u"){let F;switch(k.lineNumbers){case 1:F="on";break;case 2:F="relative";break;case 3:F="interval";break;default:F="off"}P.updateOptions({lineNumbers:F})}}}$getDiffInformation(P){const k=this.getEditor(P);if(!k)return Promise.reject(new Error("No such TextEditor"));const F=k.monacoEditor;if(!F)return Promise.reject(new Error("No such CodeEditor"));const L=F.getId(),B=this.codeEditorService.listDiffEditors(),[j]=B.filter(U=>U.originalEditor.getId()===L||U.modifiedEditor.getId()===L);if(j){const U=j.monacoDiffEditor.getLineChanges();return U?Promise.resolve(U.map(Q=>{var V;return[Q.originalStartLineNumber,Q.originalEndLineNumber,Q.modifiedStartLineNumber,Q.modifiedEndLineNumber,(V=Q.charChanges)===null||V===void 0?void 0:V.map($=>[$.originalStartLineNumber,$.originalStartColumn,$.originalEndLineNumber,$.originalEndColumn,$.modifiedStartLineNumber,$.modifiedStartColumn,$.modifiedEndLineNumber,$.modifiedEndColumn])]})):Promise.resolve([])}const W=F.getContribution("editor.contrib.dirtydiff");return W?Promise.resolve(W.getChanges()):Promise.resolve([])}_setIndentConfiguration(P,k){const F=d.StandaloneServices.get(u.IModelService).getCreationOptions(P.getLanguageId(),P.uri,P.isForSimpleWidget);if(k.tabSize==="auto"||k.insertSpaces==="auto"){let B=F.insertSpaces,j=F.tabSize;k.insertSpaces!=="auto"&&typeof k.insertSpaces<"u"&&(B=k.insertSpaces),k.tabSize!=="auto"&&typeof k.tabSize<"u"&&(j=k.tabSize),P.detectIndentation(B,j);return}const L={};typeof k.insertSpaces<"u"&&(L.insertSpaces=k.insertSpaces),typeof k.tabSize<"u"&&(L.tabSize=k.tabSize),typeof k.indentSize<"u"&&(k.indentSize==="tabSize"?L.indentSize=L.tabSize||F.tabSize:L.indentSize=k.indentSize),P.updateOptions(L)}};t.MainThreadEditorService=b,n.__decorate([(0,c.Autowired)(_.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorServiceImpl)],b.prototype,"editorService",void 0),n.__decorate([(0,c.Autowired)(s.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],b.prototype,"decorationService",void 0),n.__decorate([(0,c.Autowired)(_.EditorCollectionService),n.__metadata("design:type",g.EditorCollectionServiceImpl)],b.prototype,"codeEditorService",void 0),n.__decorate([(0,c.Autowired)(v.StaticResourceService),n.__metadata("design:type",v.StaticResourceService)],b.prototype,"staticResourceService",void 0),t.MainThreadEditorService=b=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__param(0,(0,c.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object,a.MainThreadExtensionDocumentData])],b);function y(R,P,k){return R.name+"."+(k?`${k}.`:"")+P.toString()}function A(R){return R.substr(0,R.indexOf("."))}function S(R){const P=R.getModel().getOptions();return{tabSize:P.tabSize,indentSize:P.indentSize,insertSpaces:P.insertSpaces,cursorStyle:R.getOption(h.editor.EditorOption.cursorStyle),lineNumbers:R.getOption(h.editor.EditorOption.lineNumbers).renderType}}function w(R){return R?R.type===s.EditorOpenType.code||R.type===s.EditorOpenType.diff:!1}function T(R){return R.currentOpenType&&w(R.currentOpenType)}function D(R){return R.index+1}function I(R,P){return!!(!R&&!P||R&&P&&R.uri.isEqual(P.uri))}function O(R,P){return!!(!R&&!P||R&&P&&R.type===P.type&&R.componentId===P.componentId)}function M(R){if(R===E.TextEditorCursorStyle.Line)return"line";if(R===E.TextEditorCursorStyle.Block)return"block";if(R===E.TextEditorCursorStyle.Underline)return"underline";if(R===E.TextEditorCursorStyle.LineThin)return"line-thin";if(R===E.TextEditorCursorStyle.BlockOutline)return"block-outline";if(R===E.TextEditorCursorStyle.UnderlineThin)return"underline-thin";throw new Error("cursorStyleToString: Unknown cursorStyle")}},22869:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadEnv=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(19805),v=e(43718),m=e(83507),_=e(46147),s=e(51328),g=e(49731);let l=class{isSupportedLink(u){return p.HttpOpener.standardSupportedLinkSchemes.has(u.scheme)||u.scheme===this.appConfig.uriScheme}constructor(u,d){this.rpcProtocol=u,this.storage=d,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostEnv),this.eventDispose=this.loggerManger.onDidChangeLogLevel(E=>{this.proxy.$fireChangeLogLevel(E)}),this.setLogLevel(),this.setEnvValues()}async setEnvValues(){const{appName:u,uriScheme:d,appHost:E,appRoot:f,customVSCodeEngineVersion:a}=this.appConfig,b=await this.storage.$getValue(!0,v.firstSessionDateStorageKey);this.proxy.$setEnvValues({customVSCodeEngineVersion:a,appName:u,uriScheme:d,appHost:E,appRoot:f,language:(0,v.getCodeLanguage)(),uiKind:this.appConfig.isElectronRenderer?s.UIKind.Desktop:s.UIKind.Web,firstSessionDate:b?.date})}dispose(){this.eventDispose.dispose()}async setLogLevel(){const u=await this.loggerManger.getGlobalLogLevel();await this.proxy.$setLogLevel(u)}async $clipboardReadText(){try{return await this.clipboardService.readText()}catch{return""}}$clipboardWriteText(u){return new Promise(async d=>{try{await this.clipboardService.writeText(u)}catch{}d()})}async $openExternal(u){return this.isSupportedLink(v.URI.from(u))?await this.openerService.open(u.toString(!0)):!1}getWindowId(){return this.applicationService.windowId}async $asExternalUri(u){const{uriScheme:d}=this.appConfig,E=v.URI.from(u);if(E.scheme===d){const a=this.getWindowId();let b=E.query;return b?b+=`&windowId=${a}`:b=`windowId=${a}`,E.withQuery(b).codeUri}return this.externalUriService.resolveExternalUri(E).codeUri}};t.MainThreadEnv=l,n.__decorate([(0,r.Autowired)(m.ILoggerManagerClient),n.__metadata("design:type",Object)],l.prototype,"loggerManger",void 0),n.__decorate([(0,r.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],l.prototype,"openerService",void 0),n.__decorate([(0,r.Autowired)(c.IClipboardService),n.__metadata("design:type",Object)],l.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(c.IExternalUriService),n.__metadata("design:type",Object)],l.prototype,"externalUriService",void 0),n.__decorate([(0,r.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(v.IApplicationService),n.__metadata("design:type",Object)],l.prototype,"applicationService",void 0),t.MainThreadEnv=l=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object,g.MainThreadStorage])],l)},13335:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadFileSystemEvent=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(8919),p=e(41869),v=e(68969),m=e(43718),_=e(14951),s=e(52902),g=e(72665),l=e(26199),h=e(46147);let u=class extends m.Disposable{constructor(E){super(),this.rpcProtocol=E,this._proxy=this.rpcProtocol.getProxy(h.ExtHostAPIIdentifier.ExtHostFileSystemEvent),this._dispatchFileEventListener(),this._participateFileOperation(),this._initShowPreview()}_dispatchFileEventListener(){const E={created:[],changed:[],deleted:[]};this.addDispose(this.fileService.onFilesChanged(f=>{let a=!1;for(const b of f)switch(b.type){case _.FileChangeType.ADDED:E.created.push(m.Uri.parse(b.uri)),a=!0;break;case _.FileChangeType.UPDATED:E.changed.push(m.Uri.parse(b.uri)),a=!0;break;case _.FileChangeType.DELETED:E.deleted.push(m.Uri.parse(b.uri)),a=!0;break}a&&(this._proxy.$onFileEvent(E),E.created=[],E.changed=[],E.deleted=[])}))}_participateFileOperation(){this.addDispose(this.workspaceFileService.registerFileOperationParticipant({participate:this.fileOperationParticipant.bind(this)})),this.addDispose(this.workspaceFileService.onDidRunWorkspaceFileOperation(E=>this._proxy.$onDidRunFileOperation(E.operation,E.files)))}_initShowPreview(){this._showPreview=this.preferenceService.get("workbench.refactoringChanges.showPreviewStrategy"),this.addDispose(this.preferenceService.onPreferenceChanged(E=>{E.preferenceName==="workbench.refactoringChanges.showPreviewStrategy"&&(this._showPreview=E.newValue)}))}async fileOperationParticipant(...E){const[f,a,b,y,A]=E,S=new m.CancellationTokenSource(A),w=setTimeout(()=>S.cancel(),y),T=await this.progressService.withProgress({location:m.ProgressLocation.Notification,title:this.getProgressLabel(a),cancellable:!0,delay:Math.min(y/2,3e3)},()=>{const M=this._proxy.$onWillRunFileOperation(a,f,y,A);return(0,m.raceCancellation)(M,S.token)},()=>{S.cancel()}).finally(()=>{S.dispose(),clearTimeout(w)});if(!T)return;let D=this._showPreview;const I=T.edit.edits.some(M=>{var R;return(R=M.metadata)===null||R===void 0?void 0:R.needsConfirmation});if(D==="askMe"){let M;if(T.extensionNames.length===1?a===0?M=(0,m.formatLocalize)("refactoring-changes.ask.1.create",T.extensionNames[0]):a===3?M=(0,m.formatLocalize)("refactoring-changes.ask.1.copy",T.extensionNames[0]):a===2?M=(0,m.formatLocalize)("refactoring-changes.ask.1.move",T.extensionNames[0]):M=(0,m.formatLocalize)("refactoring-changes.ask.1.delete",T.extensionNames[0]):a===0?M=(0,m.formatLocalize)("refactoring-changes.ask.N.create",T.extensionNames.length):a===3?M=(0,m.formatLocalize)("refactoring-changes.ask.N.copy",T.extensionNames.length):a===2?M=(0,m.formatLocalize)("refactoring-changes.ask.N.move",T.extensionNames.length):M=(0,m.formatLocalize)("refactoring-changes.ask.N.delete",T.extensionNames.length),I){const R=[(0,m.localize)("refactoring-changes.msg.showPreview"),(0,m.localize)("refactoring-changes.msg.skipChanges")],P=await this.dialogService.open({message:M,type:o.MessageType.Info,buttons:R});if(D="show",P===R[1])return}else{const R=[(0,m.localize)("refactoring-changes.msg.showPreview"),(0,m.localize)("refactoring-changes.msg.skipChanges"),(0,m.localize)("component.modal.okText")],P=await this.dialogService.open({message:M,type:o.MessageType.Info,buttons:R});if(P===R[1])return;D=P===R[0]?"show":"hide"}}this.logger.log("[onWill-handler] applying additional workspace edit from extensions",T.extensionNames);const O=T?.edit;O&&await this.bulkEditService.apply(s.ResourceEdit.convert(O),{showPreview:D==="show"})}getProgressLabel(E){switch(E){case 0:return(0,m.localize)("fileOperation.create","Running 'File Create' participants...");case 1:return(0,m.localize)("fileOperation.delete","Running 'File Delete' participants...");case 3:return(0,m.localize)("fileOperation.copy","Running 'File Copy' participants...");case 2:return(0,m.localize)("fileOperation.move","Running 'File Move' participants...")}}};t.MainThreadFileSystemEvent=u,n.__decorate([(0,r.Autowired)(_.IFileServiceClient),n.__metadata("design:type",Object)],u.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(l.IWorkspaceFileService),n.__metadata("design:type",Object)],u.prototype,"workspaceFileService",void 0),n.__decorate([(0,r.Autowired)(p.PreferenceService),n.__metadata("design:type",Object)],u.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(v.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(m.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(g.IDialogService),n.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(l.IBulkEditServiceShape),n.__metadata("design:type",Object)],u.prototype,"bulkEditService",void 0),t.MainThreadFileSystemEvent=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],u)},14382:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadFileSystem=void 0;const r=e(85608),o=e(76003),c=e(8919),p=e(41869),v=e(43163),m=e(42933),_=e(46147),s=e(53043),g=e(34687);let l=n=class{constructor(d){this.rpcProtocol=d,this.disposable=new p.Disposable,this._fileProvider=new Map,this._proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostFileSystem);const E=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostFileSystemInfo);for(const f of this._fileService.listCapabilities())E.$acceptProviderInfos(f.scheme,f.capabilities);this.disposable.addDispose(this._fileService.onDidChangeFileSystemProviderRegistrations(f=>{var a,b;return E.$acceptProviderInfos(f.scheme,(b=(a=f.provider)===null||a===void 0?void 0:a.capabilities)!==null&&b!==void 0?b:null)})),this.disposable.addDispose(this._fileService.onDidChangeFileSystemProviderCapabilities(f=>E.$acceptProviderInfos(f.scheme,f.provider.capabilities)))}dispose(){this.disposable.dispose(),this._fileProvider.forEach(d=>d.dispose()),this._fileProvider.clear()}$registerFileSystemProvider(d,E,f){this.disposable.addDispose(this.schemeRegistry.registerFileSystemProvider({scheme:E})),this._fileProvider.set(d,new h(this._fileService,E,f,d,this._proxy))}$unregisterProvider(d){(0,p.dispose)(this._fileProvider.get(d)),this._fileProvider.delete(d)}$onFileSystemChange(d,E){const f=this._fileProvider.get(d);if(!f)throw new Error("Unknown file provider");f.$onFileSystemChange(E)}$stat(d){return this._fileService.getFileStat(p.URI.revive(d).toString()).then(E=>(0,s.toFileStat)(E)).catch(n._handleError)}$readdir(d){return this._fileService.getFileStat(p.URI.revive(d).toString()).then(E=>{if(!E)throw new Error("file stat undefined");if(!E.isDirectory){const f=new Error(E.uri);throw f.name=g.FileSystemProviderErrorCode.FileNotADirectory,f}return E.children?E.children.map(f=>[new p.URI(f.uri).displayName,n._asFileType(f)]):[]}).catch(n._handleError)}static _asFileType(d){let E=0;return d.type&&d.type===m.FileType.File?E+=m.FileType.File:d.isDirectory&&(E+=m.FileType.Directory),d.isSymbolicLink&&(E+=m.FileType.SymbolicLink),E}$readFile(d){return this._fileService.readFile(p.URI.revive(d).toString()).then(E=>E.content.buffer).catch(n._handleError)}async $writeFile(d,E){try{const f=p.URI.revive(d),a=await this._fileService.getFileStat(f.toString(),!1);a?await this._fileService.setContent(a,E):(await(0,v.ensureDir)(new p.URI(f).path.dir.toString(),{mkdir:b=>this.$mkdir(p.URI.file(b).codeUri),access:b=>this._fileService.access(p.URI.file(b).codeUri.toString())}),await this._fileService.createFile(f.toString(),{content:p.BinaryBuffer.wrap(E).toString()}))}catch(f){return n._handleError(f)}}$rename(d,E,f){return this._fileService.move(p.URI.revive(d).toString(),p.URI.revive(E).toString(),f).then(()=>{}).catch(n._handleError)}$copy(d,E,f){return this._fileService.copy(p.URI.revive(d).toString(),p.URI.revive(E).toString(),f).then(()=>{}).catch(n._handleError)}$mkdir(d){return this._fileService.createFolder(p.URI.revive(d).toString()).then(()=>{}).catch(n._handleError)}$delete(d,E){return this._fileService.delete(p.URI.revive(d).toString(),{moveToTrash:E.useTrash}).catch(n._handleError)}static _handleError(d){if(d instanceof m.FileOperationError)switch(d.fileOperationResult){case 1:d.name=g.FileSystemProviderErrorCode.FileNotFound;break;case 0:d.name=g.FileSystemProviderErrorCode.FileIsADirectory;break;case 6:d.name=g.FileSystemProviderErrorCode.NoPermissions;break;case 4:d.name=g.FileSystemProviderErrorCode.FileExists;break}throw d}};t.MainThreadFileSystem=l,r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],l.prototype,"_fileService",void 0),r.__decorate([(0,o.Autowired)(m.IBrowserFileSystemRegistry),r.__metadata("design:type",Object)],l.prototype,"schemeRegistry",void 0),t.MainThreadFileSystem=l=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__metadata("design:paramtypes",[Object])],l);class h{get readonly(){return!!(this.capabilities&2048)}constructor(d,E,f,a,b){this._handle=a,this._proxy=b,this._onDidChange=new p.Emitter,this.onDidChangeFile=this._onDidChange.event,this.onDidChangeCapabilities=p.Event.None,this.capabilities=f,this._registration=d.registerProvider(E,this)}dispose(){this._registration.dispose(),this._onDidChange.dispose()}watch(d,E){const f=Math.random();return this._proxy.$watch(this._handle,f,d,E),f}unwatch(d){this._proxy.$unwatch(this._handle,d)}$onFileSystemChange(d){this._onDidChange.fire(d.map(h._createFileChange))}static _createFileChange(d){return{uri:d.uri,type:d.type}}async stat(d){return await this.doGetStat(d)}async readFile(d){return await this._proxy.$readFile(this._handle,d)}writeFile(d,E,f){return this._proxy.$writeFile(this._handle,d,E,f)}delete(d,E){return this._proxy.$delete(this._handle,d,E)}createDirectory(d){return this._proxy.$mkdir(this._handle,d)}readDirectory(d){return this._proxy.$readdir(this._handle,d)}rename(d,E,f){return this._proxy.$rename(this._handle,d,E,f)}copy(d,E,f){return this._proxy.$copy(this._handle,d,E,f)}async doGetStat(d,E=1){var f;const a=await this._proxy.$stat(this._handle,d),b=(0,s.fromFileStat)(a,d);return b.isDirectory&&(b.children=await this.doGetChildren(d,E)),b.readonly=!!(((f=a.permissions)!==null&&f!==void 0?f:0)&g.FilePermission.Readonly)||!!(this.capabilities&2048),b}async doGetChildren(d,E){if(E<=0)return[];const f=await this.readDirectory(d);return await Promise.all(f.map(b=>new p.URI(d).resolve(b[0])).map(b=>this.doGetStat(b.codeUri,E-1)))}}},89626:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLanguages=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(39266),m=e(54414),_=e(57517),s=n.__importStar(e(20868)),g=e(55218),l=e(62660),h=e(28694),u=e(52902),d=e(79865),E=e(44781),f=n.__importStar(e(40540)),a=e(14162),b=e(16781),y=e(46147),A=e(53043),S=e(51328),w=e(52403),T=e(43710),D=e(97673),{extname:I}=p.path;let O=class{_reviveCodeActionDto(R){return R&&R.forEach(P=>this.reviveWorkspaceEditDto(P.edit)),R}constructor(R){this.rpcProtocol=R,this.disposables=new Map,this.languageFeatureEnabled=new p.LRUMap(200,100),this._status=new Map,this.proxy=this.rpcProtocol.getProxy(y.ExtHostAPIIdentifier.ExtHostLanguages)}dispose(){this.disposables.forEach(R=>{R.dispose()}),this.disposables.clear()}$unregister(R){const P=this.disposables.get(R);P&&(this.disposables.delete(R),P.dispose())}$getLanguages(){return this.textmateService.getLanguages().map(R=>R.id)}async $changeLanguage(R,P){const k=b.StandaloneServices.get(a.ILanguageService).getLanguageIdByLanguageName(P);if(!k||k!==P)return Promise.reject(new Error(`Unknown language id: ${P}`));const F=new p.URI(p.URI.revive(R)),L=await this.documentModelManager.createModelReference(F);try{L.instance.languageId=P}finally{L.dispose()}}isLanguageFeatureEnabled(R){if(R.uri.scheme===p.Schemes.inMemory)return!1;const P=R.uri.toString();return this.languageFeatureEnabled.has(P)||this.languageFeatureEnabled.set(P,R.getValueLength()<(this.preference.get("editor.languageFeatureEnabledMaxSize")||4*1024*1024*1024)),this.languageFeatureEnabled.get(P)}getUniqueLanguages(){const R=[],P=this.textmateService.getLanguages().map(k=>k.id);for(const k of P)R.indexOf(k)===-1&&R.push(k);return R}$registerHoverProvider(R,P){const k=(0,A.fromLanguageSelector)(P),F=this.createHoverProvider(R,k);this.disposables.set(R,d.languageFeaturesService.hoverProvider.register(P,F))}createHoverProvider(R,P){return{provideHover:(k,F,L)=>{if(!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k))||!this.isLanguageFeatureEnabled(k))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_HOVER);return this.proxy.$provideHoverWithDuration(R,k.uri,F,L).then(({result:j,_dur:W})=>(j&&B.timeEnd(I(k.uri.fsPath),{extDuration:W}),j))}}}isDeflatedSuggestDto(R){return R[y.ISuggestDataDtoField.label]||R[y.ISuggestDataDtoField.kind]||R[y.ISuggestDataDtoField.kindModifier]||R[y.ISuggestDataDtoField.detail]||R[y.ISuggestDataDtoField.documentation]||R[y.ISuggestDataDtoField.sortText]||R[y.ISuggestDataDtoField.filterText]||R[y.ISuggestDataDtoField.preselect]||R[y.ISuggestDataDtoField.range]||R[y.ISuggestDataDtoField.insertTextRules]||R[y.ISuggestDataDtoField.commitCharacters]||R[y.ISuggestDataDtoField.insertText]||R[y.ISuggestDataDtoField.command]}inflateLabel(R){if(typeof R=="object")return R;const P=R.split("~|");return Array.isArray(P)&&P.length>1?{label:P[0],description:P[1],detail:P[2]}:R}inflateSuggestDto(R,P){var k,F;if(!this.isDeflatedSuggestDto(P))return P;const L=this.inflateLabel(P[y.ISuggestDataDtoField.label]),B=P[y.ISuggestDataDtoField.range];return{label:L,kind:(k=P[y.ISuggestDataDtoField.kind])!==null&&k!==void 0?k:f.CompletionItemKind.Property,tags:P[y.ISuggestDataDtoField.kindModifier],detail:P[y.ISuggestDataDtoField.detail],documentation:P[y.ISuggestDataDtoField.documentation],sortText:P[y.ISuggestDataDtoField.sortText],filterText:P[y.ISuggestDataDtoField.filterText],preselect:P[y.ISuggestDataDtoField.preselect],insertText:(F=P[y.ISuggestDataDtoField.insertText])!==null&&F!==void 0?F:typeof L=="string"?L:L.label,range:Array.isArray(B)&&B.length===4?E.Range.lift({startLineNumber:B[0],startColumn:B[1],endLineNumber:B[2],endColumn:B[3]}):R,insertTextRules:P[y.ISuggestDataDtoField.insertTextRules],commitCharacters:P[y.ISuggestDataDtoField.commitCharacters],additionalTextEdits:P[y.ISuggestDataDtoField.additionalTextEdits],command:P[y.ISuggestDataDtoField.command],_id:P.x}}$registerCompletionSupport(R,P,k,F){this.disposables.set(R,u.monaco.languages.registerCompletionItemProvider((0,A.fromLanguageSelector)(P),{_debugDisplayName:`ext-${R}`,triggerCharacters:k,provideCompletionItems:async(L,B,j,W)=>{if(!this.isLanguageFeatureEnabled(L))return;const U=this.reporter.time(p.REPORT_NAME.PROVIDE_COMPLETION_ITEMS),Q=await this.proxy.$provideCompletionItems(R,L.uri,B,j,W);return Q?(Q[y.ISuggestResultDtoField.completions].length&&U.timeEnd(I(L.uri.fsPath),{extDuration:Q.d}),{suggestions:Q[y.ISuggestResultDtoField.completions].map($=>this.inflateSuggestDto(Q[y.ISuggestResultDtoField.defaultRanges],$)),duration:Q[y.ISuggestResultDtoField.duration],incomplete:Q[y.ISuggestResultDtoField.isIncomplete]||!1,dispose:()=>{Q.x&&setTimeout(()=>{this.proxy.$releaseCompletionItems(R,Q.x)},0)}}):void 0},resolveCompletionItem:F?async(L,B)=>(this.reporter.point(p.REPORT_NAME.RESOLVE_COMPLETION_ITEM),this.proxy.$resolveCompletionItem(R,L._id,B).then(j=>{if(!j)return L;const W=this.inflateSuggestDto(L.range,j);return(0,T.mixin)(L,W,!0)})):void 0}))}$registerInlineCompletionsSupport(R,P,k,F,L){const B={provideInlineCompletions:async(j,W,U,Q)=>this.proxy.$provideInlineCompletions(R,j.uri,W,U,Q),handleItemDidShow:async(j,W,U)=>{k&&await this.proxy.$handleInlineCompletionDidShow(R,j.pid,W.idx,U)},handlePartialAccept:async(j,W,U)=>{k&&await this.proxy.$handleInlineCompletionPartialAccept(R,j.pid,W.idx,U)},freeInlineCompletions:j=>{this.proxy.$freeInlineCompletionsList(R,j.pid)},groupId:F,yieldsToGroupIds:L,toString(){return`InlineCompletionsProvider(${F})`}};this.disposables.set(R,u.monaco.languages.registerInlineCompletionsProvider((0,A.fromLanguageSelector)(P),B))}$registerInlineEditProvider(R,P,k,F){const L={displayName:F,provideInlineEdit:async(B,j,W)=>this.proxy.$provideInlineEdit(R,B.uri,j,W),freeInlineEdit:B=>{this.proxy.$freeInlineEdit(R,B.pid)}};this.disposables.set(R,u.monaco.languages.registerInlineEditProvider((0,A.fromLanguageSelector)(P),L))}matchLanguage(R,P){return Array.isArray(R)?R.some(k=>this.matchLanguage(k,P)):(0,w.isDocumentFilter)(R)?!R.language&&(R.pattern||R.scheme)?!0:R?.language===P:R===P}matchModel(R,P){return Array.isArray(R)?R.some(k=>this.matchModel(k,P)):(0,w.isDocumentFilter)(R)?!(R.language&&R.language!==P.languageId||R.scheme&&R.scheme!==P.uri.scheme||R.pattern&&!(0,y.testGlob)(R.pattern,P.uri.path)):R===P.languageId}$registerDefinitionProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createDefinitionProvider(R,k);this.disposables.set(R,u.monaco.languages.registerDefinitionProvider(k,F))}$registerDeclarationProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=new p.DisposableCollection;for(const L of this.getUniqueLanguages())this.matchLanguage(k,L);this.disposables.set(R,F)}createDefinitionProvider(R,P){return{provideDefinition:async(k,F,L)=>{if(!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k))||!this.isLanguageFeatureEnabled(k))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_DEFINITION),{result:j,_dur:W}=await this.proxy.$provideDefinitionWithDuration(R,k.uri,F,L);if(j)if(B.timeEnd(I(k.uri.fsPath),{extDuration:W}),Array.isArray(j)){const U=[];for(const Q of j)U.push({...Q,uri:s.Uri.revive(Q.uri)});return U}else return{uri:s.Uri.revive(j.uri),range:j.range}}}}$registerTypeDefinitionProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createTypeDefinitionProvider(R,k);this.disposables.set(R,u.monaco.languages.registerTypeDefinitionProvider(k,F))}createTypeDefinitionProvider(R,P){return{provideTypeDefinition:(k,F,L)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_TYPE_DEFINITION);return this.proxy.$provideTypeDefinition(R,k.uri,F,L).then(j=>{if(j)if(B.timeEnd(I(k.uri.fsPath)),Array.isArray(j)){const W=[];for(const U of j)W.push({...U,uri:s.Uri.revive(U.uri)});return W}else return{uri:s.Uri.revive(j.uri),range:j.range}})}}}$registerFoldingRangeProvider(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createFoldingRangeProvider(R,F);if(typeof k=="number"){const B=new p.Emitter;this.disposables.set(k,B),L.onDidChange=B.event}this.disposables.set(R,u.monaco.languages.registerFoldingRangeProvider(F,L))}$emitFoldingRangeEvent(R,P){const k=this.disposables.get(R);k instanceof p.Emitter&&k.fire(P)}createFoldingRangeProvider(R,P){return{provideFoldingRanges:(k,F,L)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_FOLDING_RANGES);return this.proxy.$provideFoldingRange(R,k.uri,F,L).then(j=>(j&&B.timeEnd(I(k.uri.fsPath)),j))}}}$registerDocumentColorProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createColorProvider(R,k);this.disposables.set(R,u.monaco.languages.registerColorProvider(k,F))}createColorProvider(R,P){return{provideDocumentColors:(k,F)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const L=this.reporter.time(p.REPORT_NAME.PROVIDE_DOCUMENT_COLORS);return this.proxy.$provideDocumentColors(R,k.uri,F).then(B=>(L.timeEnd(I(k.uri.fsPath)),B.map(j=>{const[W,U,Q,V]=j.color;return{color:{red:W,green:U,blue:Q,alpha:V},range:j.range}})))},provideColorPresentations:(k,F,L)=>{if(!this.isLanguageFeatureEnabled(k))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_COLOR_PRESENTATIONS);return this.proxy.$provideColorPresentations(R,k.uri,{color:[F.color.red,F.color.green,F.color.blue,F.color.alpha],range:F.range},L).then(j=>(j&&B.timeEnd(I(k.uri.fsPath)),j))}}}$registerDocumentHighlightProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createDocumentHighlightProvider(R,k);this.disposables.set(R,u.monaco.languages.registerDocumentHighlightProvider(k,F))}createDocumentHighlightProvider(R,P){return{provideDocumentHighlights:(k,F,L)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_DOCUMENT_HIGHLIGHTS);return this.proxy.$provideDocumentHighlights(R,k.uri,F,L).then(j=>{if(j&&Array.isArray(j)){B.timeEnd(I(k.uri.fsPath));const W=[];for(const U of j)W.push({...U,kind:U.kind!==void 0?U.kind:s.languages.DocumentHighlightKind.Text});return W}})}}}$registerDocumentFormattingProvider(R,P,k){const F=(0,A.fromLanguageSelector)(k);if(!F)return;const L=this.createDocumentFormattingEditProvider(R,P,F);this.disposables.set(R,u.monaco.languages.registerDocumentFormattingEditProvider(F,L))}createDocumentFormattingEditProvider(R,P,k){return{displayName:P.displayName,extensionId:P.id,provideDocumentFormattingEdits:async(F,L)=>{if(!this.isLanguageFeatureEnabled(F)||!this.matchModel(k,y.MonacoModelIdentifier.fromModel(F)))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_DOCUMENT_FORMATTING_EDITS);return this.proxy.$provideDocumentFormattingEdits(R,F.uri,L).then(j=>{if(B.timeEnd(I(F.uri.fsPath)),!!j)return j})}}}$registerRangeFormattingProvider(R,P,k){const F=(0,A.fromLanguageSelector)(k);if(!F)return;const L=this.createDocumentRangeFormattingEditProvider(R,P,F);this.disposables.set(R,u.monaco.languages.registerDocumentRangeFormattingEditProvider(F,L))}createDocumentRangeFormattingEditProvider(R,P,k){return{displayName:P.displayName,extensionId:P.id,provideDocumentRangeFormattingEdits:async(F,L,B)=>{if(!this.isLanguageFeatureEnabled(F)||!this.matchModel(k,y.MonacoModelIdentifier.fromModel(F)))return;const j=this.reporter.time(p.REPORT_NAME.PROVIDE_DOCUMENT_RANGE_FORMATTING_EDITS);return this.proxy.$provideDocumentRangeFormattingEdits(R,F.uri,L,B).then(W=>{if(j.timeEnd(I(F.uri.fsPath)),!!W)return W})}}}$registerOnTypeFormattingProvider(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createOnTypeFormattingProvider(R,F,k);this.disposables.set(R,u.monaco.languages.registerOnTypeFormattingEditProvider(F,L))}createOnTypeFormattingProvider(R,P,k){return{autoFormatTriggerCharacters:k,provideOnTypeFormattingEdits:async(F,L,B,j)=>{if(!this.isLanguageFeatureEnabled(F)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(F)))return;const W=this.reporter.time(p.REPORT_NAME.PROVIDE_ON_TYPE_FORMATTING_EDITS);return this.proxy.$provideOnTypeFormattingEditsWithDuration(R,F.uri,L,B,j).then(({result:U,_dur:Q})=>(U&&W.timeEnd(I(F.uri.fsPath),{extDuration:Q}),U))}}}$registerCodeLensSupport(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createCodeLensProvider(R,F);if(typeof k=="number"){const B=new p.Emitter;this.disposables.set(k,B),L.onDidChange=B.event}this.disposables.set(R,u.monaco.languages.registerCodeLensProvider(F,L))}createCodeLensProvider(R,P){return{provideCodeLenses:(k,F)=>{if(!this.isLanguageFeatureEnabled(k))return;const L=this.reporter.time(p.REPORT_NAME.PROVIDE_CODE_LENSES);return this.proxy.$provideCodeLenses(R,k.uri,F).then(B=>(B&&L.timeEnd(I(k.uri.fsPath)),{lenses:B?.lenses||[],dispose:()=>B?.cacheId&&this.proxy.$releaseCodeLens(R,B.cacheId)}))},resolveCodeLens:async(k,F,L)=>{if(this.isLanguageFeatureEnabled(k))return this.reporter.point(p.REPORT_NAME.RESOLVE_CODE_LENS),this.proxy.$resolveCodeLens(R,F,L).then(B=>B)}}}$emitCodeLensEvent(R,P){const k=this.disposables.get(R);k instanceof p.Emitter&&k.fire(P)}$clearDiagnostics(R){this.markerManager.clearMarkers(R)}$changeDiagnostics(R,P){for(const[k,F]of P)this.markerManager.updateMarkers(R,k,F)}$registerImplementationProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createImplementationProvider(R,k);this.disposables.set(R,u.monaco.languages.registerImplementationProvider(k,F))}$registerDocumentLinkProvider(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createLinkProvider(R,k);this.disposables.set(R,u.monaco.languages.registerLinkProvider(F,L))}createImplementationProvider(R,P){return{provideImplementation:(k,F,L)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_IMPLEMENTATION);return this.proxy.$provideImplementationWithDuration(R,k.uri,F).then(({result:j,_dur:W})=>{if(j)if(B.timeEnd(I(k.uri.fsPath),{extDuration:W}),Array.isArray(j)){const U=[];for(const Q of j)U.push({...Q,uri:s.Uri.revive(Q.uri)});return U}else return{uri:s.Uri.revive(j.uri),range:j.range}})}}}$registerQuickFixProvider(R,P,k,F,L){const B=(0,A.fromLanguageSelector)(P);if(!B)return;const j=this.createQuickFixProvider(R,B,k,F,L);this.disposables.set(R,d.languageFeaturesService.codeActionProvider.register(B,j))}createQuickFixProvider(R,P,k,F,L){const B={provideCodeActions:async(j,W,U,Q)=>{if(!this.isLanguageFeatureEnabled(j)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(j)))return;const V=this.reporter.time(p.REPORT_NAME.PROVIDE_CODE_ACTIONS),$=await this.proxy.$provideCodeActions(R,j.uri,W,U,Q).then(Y=>(V.timeEnd(I(j.uri.fsPath)),Y));if($)return{actions:this._reviveCodeActionDto($.actions),dispose:()=>{typeof $.cacheId=="number"&&this.proxy.$releaseCodeActions(R,$.cacheId)}}},documentation:k.documentation,providedCodeActionKinds:k.providedKinds,displayName:F};return L&&(B.resolveCodeAction=async(j,W)=>{const U=await this.proxy.$resolveCodeAction(R,j.cacheId,W);return j.edit=this.reviveWorkspaceEditDto(U),j}),B}createLinkProvider(R,P){const k={provideLinks:(F,L)=>{if(!this.isLanguageFeatureEnabled(F))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_LINKS);return this.proxy.$provideDocumentLinks(R,F.uri,L).then(j=>j?(B.timeEnd(I(F.uri.fsPath)),{links:j.links.map(U=>this.reviveLink(U)),dispose:()=>{j.id&&this.proxy.$releaseDocumentLinks(R,j.id)}}):void 0)}};return P&&(k.resolveLink=(F,L)=>{const B=F;return B.cacheId?this.proxy.$resolveDocumentLink(R,B.cacheId,L).then(j=>{if(j)return this.reviveLink(j)}):F}),k}reviveLink(R){return R.url&&typeof R.url!="string"&&(R.url=p.URI.revive(R.url)),R}$setLanguageConfiguration(R,P,k){const F={comments:k.comments,brackets:k.brackets,wordPattern:(0,T.reviveRegExp)(k.wordPattern),indentationRules:(0,T.reviveIndentationRule)(k.indentationRules),onEnterRules:(0,T.reviveOnEnterRules)(k.onEnterRules),autoClosingPairs:k.autoClosingPairs};this.disposables.set(R,u.monaco.languages.setLanguageConfiguration(P,F))}$registerReferenceProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createReferenceProvider(R,k);this.disposables.set(R,u.monaco.languages.registerReferenceProvider(k,F))}createReferenceProvider(R,P){return{provideReferences:(k,F,L,B)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const j=this.reporter.time(p.REPORT_NAME.PROVIDE_REFERENCES);return this.proxy.$provideReferencesWithDuration(R,k.uri,F,L,B).then(({result:W,_dur:U})=>{if(W&&Array.isArray(W)){j.timeEnd(I(k.uri.fsPath),{extDuration:U});const Q=[];for(const V of W)Q.push({...V,uri:s.Uri.revive(V.uri)});return Q}})}}}$registerWorkspaceSymbolProvider(R){const P=this.createWorkspaceSymbolProvider(R);this.disposables.set(R,this.languageService.registerWorkspaceSymbolProvider(P))}createWorkspaceSymbolProvider(R){return{provideWorkspaceSymbols:(P,k)=>this.proxy.$provideWorkspaceSymbols(R,P.query,k),resolveWorkspaceSymbol:(P,k)=>this.proxy.$resolveWorkspaceSymbol(R,P,k)}}$registerOutlineSupport(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createDocumentSymbolProvider(R,k);this.disposables.set(R,u.monaco.languages.registerDocumentSymbolProvider(k,F))}createDocumentSymbolProvider(R,P){return{provideDocumentSymbols:(k,F)=>{if(!this.isLanguageFeatureEnabled(k))return;const L=this.reporter.time(p.REPORT_NAME.PROVIDE_DOCUMENT_SYMBOLS);return this.proxy.$provideDocumentSymbols(R,k.uri,F).then(B=>(B&&L.timeEnd(I(k.uri.fsPath)),B))}}}$registerSignatureHelpProvider(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createSignatureHelpProvider(R,F,k);this.disposables.set(R,u.monaco.languages.registerSignatureHelpProvider(F,L))}createSignatureHelpProvider(R,P,k){return{signatureHelpTriggerCharacters:k.triggerCharacters,signatureHelpRetriggerCharacters:k.retriggerCharacters,provideSignatureHelp:(F,L,B,j)=>{if(!this.isLanguageFeatureEnabled(F)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(F)))return;const W=this.reporter.time(p.REPORT_NAME.PROVIDE_SIGNATURE_HELP);return this.proxy.$provideSignatureHelp(R,F.uri,L,j,B).then(U=>{if(U)return W.timeEnd(I(F.uri.fsPath)),{value:U,dispose:()=>U.id&&this.proxy.$releaseSignatureHelp(R,U.id)}})}}}$registerRenameProvider(R,P,k){const F=(0,A.fromLanguageSelector)(P);if(!F)return;const L=this.createRenameProvider(R,F,k);this.disposables.set(R,u.monaco.languages.registerRenameProvider(F,L))}createRenameProvider(R,P,k){return{provideRenameEdits:(F,L,B,j)=>{if(!this.isLanguageFeatureEnabled(F)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(F)))return;const W=this.reporter.time(p.REPORT_NAME.PROVIDE_RENAME_EDITS);return this.proxy.$provideRenameEdits(R,F.uri,L,B,j).then(U=>(U&&W.timeEnd(I(F.uri.fsPath)),this.reviveWorkspaceEditDto(U)))},resolveRenameLocation:k?(F,L,B)=>{if(this.isLanguageFeatureEnabled(F)&&this.matchModel(P,y.MonacoModelIdentifier.fromModel(F)))return this.proxy.$resolveRenameLocation(R,F.uri,L,B).then(j=>j)}:void 0}}createNewSymbolNamesProvider(R,P){return{provideNewSymbolNames:(k,F,L,B)=>{if(!this.isLanguageFeatureEnabled(k)||!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k)))return;const j=this.reporter.time(p.REPORT_NAME.PROVIDE_NEW_SYMBOL_NAMES);return this.proxy.$provideNewSymbolNames(R,k.uri,F,L,B).then(W=>(W&&j.timeEnd(I(k.uri.fsPath)),W))}}}$registerNewSymbolNamesProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createNewSymbolNamesProvider(R,k);this.disposables.set(R,u.monaco.languages.registerNewSymbolNameProvider(k,F))}reviveWorkspaceEditDto(R){if(R&&R.edits)for(const P of R.edits)typeof P.resource=="object"?P.resource=s.Uri.revive(P.resource):(P.newResource=s.Uri.revive(P.newResource),P.oldResource=s.Uri.revive(P.oldResource));return R}$registerSelectionRangeProvider(R,P){const k=(0,A.fromLanguageSelector)(P);if(!k)return;const F=this.createSelectionProvider(R,k);this.disposables.set(R,u.monaco.languages.registerSelectionRangeProvider(k,F))}createSelectionProvider(R,P){return{provideSelectionRanges:(k,F,L)=>{if(!this.matchModel(P,y.MonacoModelIdentifier.fromModel(k))||!this.isLanguageFeatureEnabled(k))return;const B=this.reporter.time(p.REPORT_NAME.PROVIDE_SELECTION_RANGES);return this.proxy.$provideSelectionRanges(R,k.uri,F,L).then(j=>(B.timeEnd(I(k.uri.fsPath)),j))}}}$registerCallHierarchyProvider(R,P){const k=(0,A.fromLanguageSelector)(P),F=this.createCallHierarchyProvider(R,k);this.callHierarchyService.registerCallHierarchyProvider(P,F)}reviveCallHierarchyItemDto(R){return R&&(R.uri=p.URI.revive(R.uri)),R}createCallHierarchyProvider(R,P){return{prepareCallHierarchy:async(k,F,L)=>{const B=await this.proxy.$prepareCallHierarchy(R,k.uri,F,L);if(B)return{dispose:()=>{for(const j of B)this.proxy.$releaseCallHierarchy(R,j._sessionId)},roots:B.map(this.reviveCallHierarchyItemDto)}},provideOutgoingCalls:async(k,F)=>{const L=await this.proxy.$provideCallHierarchyOutgoingCalls(R,k._sessionId,k._itemId,F);return L&&(L.forEach(B=>{B.to=this.reviveCallHierarchyItemDto(B.to)}),L)},provideIncomingCalls:async(k,F)=>{const L=await this.proxy.$provideCallHierarchyIncomingCalls(R,k._sessionId,k._itemId,F);return L&&(L.forEach(B=>{B.from=this.reviveCallHierarchyItemDto(B.from)}),L)}}}$registerTypeHierarchyProvider(R,P){const k=(0,A.fromLanguageSelector)(P),F=this.createTypeHierarchyProvider(R,k);this.typeHierarchyService.registerTypeHierarchyProvider(P,F)}createTypeHierarchyProvider(R,P){return{prepareTypeHierarchy:async(k,F,L)=>{const B=await this.proxy.$prepareTypeHierarchy(R,k.uri,F,L);if(B)return{dispose:()=>{for(const j of B)this.proxy.$releaseTypeHierarchy(R,j._sessionId)},roots:B.map(this.reviveTypeHierarchyItemDto)}},provideSupertypes:async(k,F)=>{const L=await this.proxy.$provideTypeHierarchySupertypes(R,k._sessionId,k._itemId,F);return L&&L.map(this.reviveTypeHierarchyItemDto)},provideSubtypes:async(k,F)=>{const L=await this.proxy.$provideTypeHierarchySubtypes(R,k._sessionId,k._itemId,F);return L&&L.map(this.reviveTypeHierarchyItemDto)}}}reviveTypeHierarchyItemDto(R){return R&&(R.uri=p.URI.revive(R.uri)),R}$registerDocumentSemanticTokensProvider(R,P,k){const F=new D.DocumentSemanticTokensProvider(this.proxy,R,k);this.disposables.set(R,d.languageFeaturesService.documentSemanticTokensProvider.register((0,A.fromLanguageSelector)(P),F))}$registerDocumentRangeSemanticTokensProvider(R,P,k){const F=new D.DocumentRangeSemanticTokensProviderImpl(this.proxy,R,k);this.disposables.set(R,d.languageFeaturesService.documentRangeSemanticTokensProvider.register((0,A.fromLanguageSelector)(P),F))}$registerEvaluatableExpressionProvider(R,P){const k={provideEvaluatableExpression:(F,L,B)=>this.proxy.$provideEvaluatableExpression(R,F.uri,L,B)};this.disposables.set(R,this.evaluatableExpressionService.registerEvaluatableExpressionProvider(P,k))}$registerInlineValuesProvider(R,P,k){const F={provideInlineValues:(L,B,j,W)=>this.proxy.$provideInlineValues(R,L.uri,B,j,W)};if(typeof k=="number"){const L=new p.Emitter;this.disposables.set(k,L),F.onDidChangeInlineValues=L.event}this.disposables.set(R,d.languageFeaturesService.inlineValuesProvider.register(P,F))}$emitInlineValuesEvent(R,P){const k=this.disposables.get(R);k instanceof p.Emitter&&k.fire(P)}$registerLinkedEditingRangeProvider(R,P){const k=(0,A.fromLanguageSelector)(P);d.languageFeaturesService.linkedEditingRangeProvider.register(k,{provideLinkedEditingRanges:async(F,L,B)=>{const j=await this.proxy.$provideLinkedEditingRanges(R,F.uri,L,B);if(j)return{ranges:j.ranges,wordPattern:j.wordPattern?(0,T.reviveRegExp)(j.wordPattern):void 0}}})}$registerInlayHintsProvider(R,P,k,F){const L={provideInlayHints:async(B,j,W)=>{const U=await this.proxy.$provideInlayHints(R,B.uri,j,W);if(U)return{hints:(0,p.revive)(U?.hints),dispose:()=>{U.cacheId&&this.proxy.$releaseInlayHints(R,U.cacheId)}}}};if(k&&(L.resolveInlayHint=async(B,j)=>{const W=B;if(!W.cacheId)return B;const U=await this.proxy.$resolveInlayHint(R,W.cacheId,j);if(j.isCancellationRequested)throw new S.CancellationError;return U?{...B,tooltip:U.tooltip,label:(0,p.revive)(U.label)}:B}),typeof F=="number"){const B=new p.Emitter;this.disposables.set(F,B),L.onDidChangeInlayHints=B.event}this.disposables.set(R,d.languageFeaturesService.inlayHintsProvider.register(P,L))}$emitInlayHintsEvent(R,P){const k=this.disposables.get(R);k instanceof p.Emitter&&k.fire(P)}$setLanguageStatus(R,P){var k;(k=this._status.get(R))===null||k===void 0||k.dispose(),this._status.set(R,this.languageStatusService.addStatus(P))}$removeLanguageStatus(R){var P;(P=this._status.get(R))===null||P===void 0||P.dispose()}};t.MainThreadLanguages=O,n.__decorate([(0,r.Autowired)(p.MarkerManager),n.__metadata("design:type",p.MarkerManager)],O.prototype,"markerManager",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],O.prototype,"preference",void 0),n.__decorate([(0,r.Autowired)(c.IReporterService),n.__metadata("design:type",Object)],O.prototype,"reporter",void 0),n.__decorate([(0,r.Autowired)(m.ILanguageService),n.__metadata("design:type",Object)],O.prototype,"languageService",void 0),n.__decorate([(0,r.Autowired)(g.ICallHierarchyService),n.__metadata("design:type",Object)],O.prototype,"callHierarchyService",void 0),n.__decorate([(0,r.Autowired)(h.ITypeHierarchyService),n.__metadata("design:type",Object)],O.prototype,"typeHierarchyService",void 0),n.__decorate([(0,r.Autowired)(v.IEvaluatableExpressionService),n.__metadata("design:type",Object)],O.prototype,"evaluatableExpressionService",void 0),n.__decorate([(0,r.Autowired)(_.IEditorDocumentModelService),n.__metadata("design:type",Object)],O.prototype,"documentModelManager",void 0),n.__decorate([(0,r.Autowired)(_.ILanguageStatusService),n.__metadata("design:type",Object)],O.prototype,"languageStatusService",void 0),n.__decorate([(0,r.Autowired)(l.ITextmateTokenizer),n.__metadata("design:type",Object)],O.prototype,"textmateService",void 0),t.MainThreadLanguages=O=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],O)},977:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadLocalization=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(14951),v=e(99220),m=e(46147),_=e(51328);let s=class{constructor(l){this.rpcProtocol=l,this.proxy=this.rpcProtocol.getProxy(m.ExtHostAPIIdentifier.ExtHostLocalization),this.currentLanguage=this.preferenceService.get("general.language","en").toLocaleLowerCase(),this.proxy.$setCurrentLanguage(this.currentLanguage)}async $fetchBuiltInBundleUri(l,h){try{const u=await this.extensionNodeClient.getLanguagePack(h||this.currentLanguage);return u&&u.translations[l]?_.Uri.file(u.translations[l]):void 0}catch{return}}async $fetchBundleContents(l){return(await this.fileService.readFile(_.Uri.revive(l).fsPath.toString())).content.toString()}};t.MainThreadLocalization=s,n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileService",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],s.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(v.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],s.prototype,"extensionNodeClient",void 0),t.MainThreadLocalization=s=n.__decorate([n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],s)},43404:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadExtensionLog=void 0,t.createExtensionLogFactory=v;const n=e(85608),r=e(76003),o=e(43718),c=e(71742);let p=class{$getLevel(){return this.logger.getLevel()}$setLevel(_){return this.logger.setLevel(_)}async $verbose(..._){return this.logger.verbose(..._)}async $debug(..._){return this.logger.debug(..._)}async $log(..._){return this.logger.log(..._)}async $warn(..._){return this.logger.warn(..._)}async $error(..._){return this.logger.error(..._)}async $critical(..._){return this.logger.critical(..._)}$dispose(){return this.logger.dispose()}};t.MainThreadExtensionLog=p,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),t.MainThreadExtensionLog=p=n.__decorate([(0,r.Injectable)()],p);function v(m,_){m.set(c.MainThreadExtensionLogIdentifier,_.get(p))}},48721:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadMessage=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(72665),p=e(46147);let v=class{constructor(_){this.rpcProtocol=_,this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostMessage)}dispose(){}async $showMessage(_,s,g,l,h){const u=g.modal?await this.dialogService.open({message:s,type:_,buttons:l,options:g}):await this.messageService.open({message:s,type:_,buttons:l,closable:!0,from:h});return u?l.indexOf(u):void 0}};t.MainThreadMessage=v,n.__decorate([(0,r.Autowired)(c.IDialogService),n.__metadata("design:type",Object)],v.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(c.IMessageService),n.__metadata("design:type",Object)],v.prototype,"messageService",void 0),t.MainThreadMessage=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],v)},62909:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadExtensionNotebook=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(54414),v=e(46147);let m=class extends c.WithEventBus{constructor(s){super(),this.rpcProtocol=s,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostNotebook),this.docProxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostDocuments),this.listen()}listen(){this.addDispose(this.notebookService.onDidOpenNotebookDocument(s=>{this.proxy.$acceptDocumentAndEditorsDelta({addedDocuments:[s]})})),this.addDispose(this.notebookService.onDidCloseNotebookDocument(s=>{this.proxy.$acceptDocumentAndEditorsDelta({removedDocuments:[s]})})),this.addDispose(this.notebookService.onDidChangeNotebookDocument(s=>{this.proxy.$acceptModelChanged(s.uri,s.event,s.isDirty,s.metadata)})),this.addDispose(this.notebookService.onDidSaveNotebookDocument(s=>{this.proxy.$acceptModelSaved(s)}))}async $tryCreateNotebook(s){return(await this.notebookService.createNotebook(s.content)).uri}async $tryOpenNotebook(s){return(await this.notebookService.openNotebook(s)).uri}async $trySaveNotebook(s){return await this.notebookService.saveNotebook(s)}};t.MainThreadExtensionNotebook=m,n.__decorate([(0,r.Autowired)(p.INotebookService),n.__metadata("design:type",Object)],m.prototype,"notebookService",void 0),t.MainThreadExtensionNotebook=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],m)},39261:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadOutput=void 0;const n=e(85608),r=e(76003),o=e(63067),c=e(83145);let p=class{constructor(){this.channels=new Map}dispose(){this.channels.forEach(m=>{this.outputService.deleteChannel(m.name)}),this.channels.clear()}$replace(m,_){const s=this.getChannel(m);return s&&(s.clear(),s.append(_)),Promise.resolve()}$append(m,_){const s=this.getChannel(m);return s&&s.append(_),Promise.resolve()}$appendLine(m,_){const s=this.getChannel(m);return s&&s.appendLine(_),Promise.resolve()}$clear(m){const _=this.getChannel(m);return _&&_.clear(),Promise.resolve()}$dispose(m){return this.outputService.deleteChannel(m),this.channels.has(m)&&this.channels.delete(m),Promise.resolve()}async $reveal(m,_){const s=this.getChannel(m);s&&(s.setVisibility(!0),this.outputService.updateSelectedChannel(s))}$close(m){const _=this.getChannel(m);return _&&_.setVisibility(!1),Promise.resolve()}getChannel(m){let _;return this.channels.has(m)?_=this.channels.get(m):(_=this.outputService.getChannel(m),this.channels.set(m,_)),_}async $setLanguageId(m,_){const s=this.getChannel(m);s&&await s.setLanguageId(_)}};t.MainThreadOutput=p,n.__decorate([(0,r.Autowired)(c.OutputService),n.__metadata("design:type",c.OutputService)],p.prototype,"outputService",void 0),n.__decorate([(0,r.Autowired)(o.IMainLayoutService),n.__metadata("design:type",Object)],p.prototype,"layoutService",void 0),t.MainThreadOutput=p=n.__decorate([(0,r.Injectable)({multiple:!0})],p)},87781:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadPreference=void 0,t.getPreferences=m;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(51500),v=e(46147);function m(s,g){const l=g.map(h=>h.uri.toString());return c.PreferenceScope.getScopes().reduce((h,u)=>{h[u]={};const d=s(u);if(u===c.PreferenceScope.Folder)for(const E of l){const f=d.getPreferences(E);h[u][E]=f}else{h[u]=d.getPreferences();const E=d.getLanguagePreferences();E&&Object.keys(E).forEach(f=>{h[u][`[${f}]`]=E[f]})}return h},{})}let _=class{constructor(g){this.rpcProtocol=g,this.toDispose=new c.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostPreference),this.toDispose.push(this.preferenceService.onPreferencesChanged(l=>{const h=this.workspaceService.tryGetRoots(),u=m(this.preferenceProviderProvider,h),d=[];for(const E of Object.keys(l)){const{newValue:f}=l[E];d.push({preferenceName:E,newValue:f})}this.proxy.$acceptConfigurationChanged(u,d)})),this.initializeConfiguration(),this.toDispose.push(this.preferenceSchemaProvider.onDidPreferenceSchemaChanged(()=>{this.initializeConfiguration()}))}dispose(){this.toDispose.dispose()}async initializeConfiguration(){const g=this.workspaceService.tryGetRoots(),l=m(this.preferenceProviderProvider,g);this.proxy.$initializeConfiguration(l)}async $updateConfigurationOption(g,l,h,u){const d=this.parseConfigurationTarget(g);await this.preferenceService.set(l,h,d,u)}async $removeConfigurationOption(g,l,h){const u=this.parseConfigurationTarget(g);await this.preferenceService.set(l,void 0,u,h)}parseConfigurationTarget(g){if(typeof g=="boolean")return g?c.PreferenceScope.User:c.PreferenceScope.Workspace;switch(g){case v.ConfigurationTarget.Global:return c.PreferenceScope.User;case v.ConfigurationTarget.Workspace:return c.PreferenceScope.Workspace;case v.ConfigurationTarget.WorkspaceFolder:return c.PreferenceScope.Folder;default:return}}};t.MainThreadPreference=_,n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceProviderProvider),n.__metadata("design:type",Function)],_.prototype,"preferenceProviderProvider",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceSchemaProvider),n.__metadata("design:type",c.PreferenceSchemaProvider)],_.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(p.IWorkspaceService),n.__metadata("design:type",Object)],_.prototype,"workspaceService",void 0),t.MainThreadPreference=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],_)},79813:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadQuickOpen=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(8919),p=e(41869),v=e(74404),m=e(97821),_=e(78245),s=e(50426),g=e(44854),l=e(46147);let h=class extends p.Disposable{constructor(d){super(),this.rpcProtocol=d,this.createdInputBox=new Map,this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostQuickOpen),this.addDispose([this.quickTitleBarService.onDidTriggerButton(E=>{this.proxy.$onDidTriggerButton(E.handler)}),this.quickOpenItemService.onDidTriggerItemButton(({item:E,button:f})=>{f.handle!==void 0&&this.proxy.$onDidTriggerItemButton(E.handle,f.handle)})])}$showQuickPick(d,E,f){return this.quickPickService.show(E,{...f,onSelect:(a,b)=>{this.proxy.$onItemSelected(E[b].value)},onChangeValue:a=>{this.proxy.$onDidChangeValue(d,a)}})}$hideQuickPick(){this.quickPickService.hide()}severityToValidateType(d){switch(d){case l.Severity.Info:return o.VALIDATE_TYPE.INFO;case l.Severity.Warning:return o.VALIDATE_TYPE.WARNING;case l.Severity.Error:return o.VALIDATE_TYPE.ERROR;case l.Severity.Ignore:return o.VALIDATE_TYPE.IGNORE;default:return o.VALIDATE_TYPE.ERROR}}$showQuickInput(d,E){return E&&(d.validateInput=async f=>{const a=await this.proxy.$validateInput(f);return a&&(typeof a=="string"?a:{message:a.message,type:this.severityToValidateType(a.severity)})}),this.quickInputService.open(d)}$createOrUpdateInputBox(d,E){const f={...E,validationType:this.severityToValidateType(E?.severity)};if(this.createdInputBox.has(d)){const a=this.createdInputBox.get(d);a?.updateOptions(f)}else{const a=this.injector.get(g.InputBoxImpl,[f]);a.open(),a.onDidChangeValue(b=>{this.proxy.$onCreatedInputBoxDidChangeValue(d,b)}),a.onDidAccept(()=>{this.proxy.$onCreatedInputBoxDidAccept(d)}),a.onDidHide(()=>{this.proxy.$onCreatedInputBoxDidHide(d)}),a.onDidTriggerButton(b=>{this.proxy.$onCreatedInputBoxDidTriggerButton(d,b)}),this.createdInputBox.set(d,a)}}$updateQuickPick(d){this.quickPickService.updateOptions(d)}$hideInputBox(d){if(this.createdInputBox.has(d)){const E=this.createdInputBox.get(d);E?.hide()}}$disposeInputBox(d){if(this.createdInputBox.has(d)){const E=this.createdInputBox.get(d);E?.dispose(),this.createdInputBox.delete(d)}}$hideQuickInput(){this.quickInputService.hide()}};t.MainThreadQuickOpen=h,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],h.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(v.IQuickInputService),n.__metadata("design:type",Object)],h.prototype,"quickInputService",void 0),n.__decorate([(0,r.Autowired)(s.QuickTitleBar),n.__metadata("design:type",s.QuickTitleBar)],h.prototype,"quickTitleBarService",void 0),n.__decorate([(0,r.Autowired)(_.QuickOpenItemService),n.__metadata("design:type",_.QuickOpenItemService)],h.prototype,"quickOpenItemService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],h.prototype,"injector",void 0),t.MainThreadQuickOpen=h=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(c.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],h)},33111:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadSCM=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(64964),m=e(46147);class _{get hideWhenEmpty(){return!!this.features.hideWhenEmpty}constructor(f,a,b,y,A,S){this.sourceControlHandle=f,this.handle=a,this.provider=b,this.features=y,this.label=A,this.id=S,this.elements=[],this._onDidSplice=new p.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event}toJSON(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}}splice(f,a,b){this.elements.splice(f,a,...b),this._onDidSplice.fire({start:f,deleteCount:a,toInsert:b})}$updateGroup(f){this.features=Object.assign(this.features,f),this._onDidChange.fire()}$updateGroupLabel(f){this.label=f,this._onDidChange.fire()}}class s{constructor(f,a,b,y,A,S,w,T,D){this.proxy=f,this.sourceControlHandle=a,this.groupHandle=b,this.handle=y,this.sourceUri=A,this.resourceGroup=S,this.decorations=w,this.contextValue=T,this.command=D}open(f){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle,f)}toJSON(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}}}function g(E){if(E.icon){if(p.Uri.isUri(E.icon))return p.Uri.revive(E.icon);{const f=E.icon;return{light:p.Uri.revive(f.light),dark:p.Uri.revive(f.dark)}}}else return}class l{get actionButton(){return this._actionButton}set actionButton(f){this._actionButton=f,this._onDidChangeActionButton.fire()}get currentHistoryItemGroup(){return this._currentHistoryItemGroup}set currentHistoryItemGroup(f){this._currentHistoryItemGroup=f,this._onDidChangeCurrentHistoryItemGroup.fire()}constructor(f,a){this.proxy=f,this.handle=a,this._onDidChangeActionButton=new p.Emitter,this.onDidChangeActionButton=this._onDidChangeActionButton.event,this._onDidChangeCurrentHistoryItemGroup=new p.Emitter,this.onDidChangeCurrentHistoryItemGroup=this._onDidChangeCurrentHistoryItemGroup.event}async resolveHistoryItemGroupBase(f){return this.proxy.$resolveHistoryItemGroupBase(this.handle,f,p.CancellationToken.None)}async resolveHistoryItemGroupCommonAncestor(f,a){return this.proxy.$resolveHistoryItemGroupCommonAncestor(this.handle,f,a,p.CancellationToken.None)}async provideHistoryItems(f,a){const b=await this.proxy.$provideHistoryItems(this.handle,f,a,p.CancellationToken.None);return b?.map(y=>({...y,icon:g(y)}))}async provideHistoryItemChanges(f){const a=await this.proxy.$provideHistoryItemChanges(this.handle,f,p.CancellationToken.None);return a?.map(b=>({uri:p.Uri.revive(b.uri),originalUri:b.originalUri&&p.Uri.revive(b.originalUri),modifiedUri:b.modifiedUri&&p.Uri.revive(b.modifiedUri),renameUri:b.renameUri&&p.Uri.revive(b.renameUri)}))}}class h{get id(){return this._id}get handle(){return this._handle}get label(){return this._label}get rootUri(){return this._rootUri}get contextValue(){return this._contextValue}get commitTemplate(){return this.features.commitTemplate}get acceptInputCommand(){return this.features.acceptInputCommand}get statusBarCommands(){return this.features.statusBarCommands}get count(){return this.features.count}get actionButton(){return this.features.actionButton}get historyProvider(){return this._historyProvider}get onDidChangeStatusBarCommands(){return this._onDidChangeStatusBarCommands.event}constructor(f,a,b,y,A){this.proxy=f,this._handle=a,this._contextValue=b,this._label=y,this._rootUri=A,this._id=`scm${h.ID_HANDLE++}`,this.groups=new p.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new p.Emitter,this.onDidChangeResources=this._onDidChangeResources.event,this.features={},this._onDidChangeCommitTemplate=new p.Emitter,this.onDidChangeCommitTemplate=this._onDidChangeCommitTemplate.event,this._onDidChangeStatusBarCommands=new p.Emitter,this._onDidChangeHistoryProvider=new p.Emitter,this.onDidChangeHistoryProvider=this._onDidChangeHistoryProvider.event,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event}$updateSourceControl(f){this.features=Object.assign(this.features,f),this._onDidChange.fire(),typeof f.commitTemplate<"u"&&this._onDidChangeCommitTemplate.fire(this.commitTemplate),typeof f.statusBarCommands<"u"&&this._onDidChangeStatusBarCommands.fire(this.statusBarCommands),f.hasHistoryProvider&&!this._historyProvider?(this._historyProvider=new l(this.proxy,this.handle),this._onDidChangeHistoryProvider.fire()):f.hasHistoryProvider===!1&&this._historyProvider&&(this._historyProvider=void 0,this._onDidChangeHistoryProvider.fire())}$registerGroup(f,a,b){const y=new _(this.handle,f,this,{},b,a);this._groupsByHandle[f]=y,this.groups.splice(this.groups.elements.length,0,[y])}$updateGroup(f,a){const b=this._groupsByHandle[f];b&&b.$updateGroup(a)}$updateGroupLabel(f,a){const b=this._groupsByHandle[f];b&&b.$updateGroupLabel(a)}$spliceGroupResourceStates(f){for(const[a,b]of f){const y=this._groupsByHandle[a];if(!y){this.logger.warn(`SCM group ${a} not found in provider ${this.label}`);continue}b.reverse();for(const[A,S,w]of b){const T=w.map(D=>{const[I,O,M,R,P,k,F,L]=D,B=M[0],j=M[1]||B,W={icon:B?p.Uri.parse(B):void 0,iconDark:j?p.Uri.parse(j):void 0,tooltip:R,strikeThrough:P,faded:k};return new s(this.proxy,this.handle,a,I,p.Uri.revive(O),y,W,F||void 0,L)});y.splice(A,S,T)}}this._onDidChangeResources.fire()}$unregisterGroup(f){const a=this._groupsByHandle[f];a&&(delete this._groupsByHandle[f],this.groups.splice(this.groups.elements.indexOf(a),1),this._onDidChangeResources.fire())}$onDidChangeHistoryProviderActionButton(f){this._historyProvider&&(this._historyProvider.actionButton=f??void 0)}$onDidChangeHistoryProviderCurrentHistoryItemGroup(f){this._historyProvider&&(this._historyProvider.currentHistoryItemGroup=f??void 0)}async getOriginalResource(f){if(!this.features.hasQuickDiffProvider)return null;const a=await this.proxy.$provideOriginalResource(this.handle,f,p.CancellationToken.None);return a&&p.Uri.revive(a)}toJSON(){return{$mid:5,handle:this.handle}}dispose(){}}h.ID_HANDLE=0,n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0);let u=class extends p.Disposable{constructor(f){super(),this.rpcProtocol=f,this._repositories=new Map,this._inputDisposables=new Map,this._proxy=this.rpcProtocol.getProxy(m.ExtHostAPIIdentifier.ExtHostSCM),p.Event.debounce(this.scmService.onDidChangeSelectedRepositories,(a,b)=>b,100)(this.onDidChangeSelectedRepositories,this,this.disposables)}dispose(){this._repositories.forEach(f=>f.dispose()),this._repositories.clear(),this._inputDisposables.forEach(f=>f.dispose()),this._inputDisposables.clear(),super.dispose()}$registerSourceControl(f,a,b,y){const A=new h(this._proxy,f,a,b,y&&p.Uri.revive(y)),S=this.scmService.registerSCMProvider(A);this._repositories.set(f,S);const w=S.input.onDidChange(T=>this._proxy.$onInputBoxValueChange(f,T));this._inputDisposables.set(f,w),this.addDispose(p.Disposable.create(()=>{this.$unregisterSourceControl(f)}))}$updateSourceControl(f,a){const b=this._repositories.get(f);if(!b)return;b.provider.$updateSourceControl(a)}$unregisterSourceControl(f){const a=this._repositories.get(f);a&&(this._inputDisposables.get(f).dispose(),this._inputDisposables.delete(f),a.dispose(),this._repositories.delete(f))}$registerGroup(f,a,b,y){const A=this._repositories.get(f);if(!A)return;const S=A.provider;S.$registerGroup(a,b,y),this.addDispose(p.Disposable.create(()=>{S.$unregisterGroup(a)}))}$updateGroup(f,a,b){const y=this._repositories.get(f);if(!y)return;y.provider.$updateGroup(a,b)}$updateGroupLabel(f,a,b){const y=this._repositories.get(f);if(!y)return;y.provider.$updateGroupLabel(a,b)}$spliceResourceStates(f,a){const b=this._repositories.get(f);if(!b)return;b.provider.$spliceGroupResourceStates(a)}$unregisterGroup(f,a){const b=this._repositories.get(f);if(!b)return;b.provider.$unregisterGroup(a)}$setInputBoxValue(f,a){const b=this._repositories.get(f);b&&(b.input.value=a)}$setInputBoxPlaceholder(f,a){const b=this._repositories.get(f);b&&(b.input.placeholder=a)}$setInputBoxEnablement(f,a){const b=this._repositories.get(f);b&&(b.input.enabled=a)}$setInputBoxVisibility(f,a){const b=this._repositories.get(f);b&&(b.input.visible=a)}$setValidationProviderIsEnabled(f,a){const b=this._repositories.get(f);b&&(a?b.input.validateInput=async(y,A)=>{const S=await this._proxy.$validateInput(f,y,A);return S&&{message:S[0],type:S[1]}}:b.input.validateInput=async()=>{})}$onDidChangeHistoryProviderActionButton(f,a){const b=this._repositories.get(f);if(!b)return;b.provider.$onDidChangeHistoryProviderActionButton(a)}$onDidChangeHistoryProviderCurrentHistoryItemGroup(f,a){const b=this._repositories.get(f);if(!b)return;b.provider.$onDidChangeHistoryProviderCurrentHistoryItemGroup(a)}$setInputBoxActionButton(f,a){const b=this._repositories.get(f);b&&(b.input.actionButton=a?{...a,icon:d(a)}:void 0)}onDidChangeSelectedRepositories(f){const a=f.filter(b=>b.provider instanceof h).map(b=>b.provider.handle);this._proxy.$setSelectedSourceControls(a)}};t.MainThreadSCM=u,n.__decorate([(0,r.Autowired)(v.SCMService),n.__metadata("design:type",v.SCMService)],u.prototype,"scmService",void 0),t.MainThreadSCM=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],u);function d(E){if(E.icon){if(p.Uri.isUri(E.icon))return p.Uri.revive(E.icon);{const f=E.icon;return{light:p.Uri.revive(f.light),dark:p.Uri.revive(f.dark)}}}else return}},62876:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadSecret=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(26542),v=e(46147);let m=class extends c.Disposable{constructor(s){super(),this._proxy=s.getProxy(v.ExtHostAPIIdentifier.ExtHostSecret),this.addDispose(this.credentialsService.onDidChangePassword(g=>{const l=g.service.substring(this.appConfig.uriScheme.length);this._proxy.$onDidChangePassword({extensionId:l,key:g.account})}))}getFullKey(s){return`${this.appConfig.uriScheme}${s}`}async $getPassword(s,g){const l=this.getFullKey(s),h=await this.credentialsService.getPassword(l,g),u=h&&await this.cryptoService.decrypt(h);if(u)try{const d=JSON.parse(u);if(d.extensionId===s)return d.content}catch{throw new Error("Cannot get password")}}async $setPassword(s,g,l){const h=this.getFullKey(s),u=JSON.stringify({extensionId:s,content:l}),d=await this.cryptoService.encrypt(u);return this.credentialsService.setPassword(h,g,d)}async $deletePassword(s,g){try{const l=this.getFullKey(s);await this.credentialsService.deletePassword(l,g)}catch{throw new Error("Cannot delete password")}}};t.MainThreadSecret=m,n.__decorate([(0,r.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],m.prototype,"appConfig",void 0),n.__decorate([(0,r.Autowired)(c.ICredentialsService),n.__metadata("design:type",Object)],m.prototype,"credentialsService",void 0),n.__decorate([(0,r.Autowired)(p.ICryptoService),n.__metadata("design:type",Object)],m.prototype,"cryptoService",void 0),t.MainThreadSecret=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],m)},93633:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadStatusBar=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(26542),v=e(71298),m=e(46147),_=n.__importStar(e(51328));let s=class{constructor(l){this.rpcProtocol=l,this.disposable=new c.Disposable,this.proxy=this.rpcProtocol.getProxy(m.ExtHostAPIIdentifier.ExtHostStatusBar)}dispose(){this.disposable.dispose()}$setStatusBarMessage(l){this.disposable.addDispose(this.statusBar.addElement("ext_default_statusbar_text",{text:l,alignment:p.StatusBarAlignment.LEFT}))}$dispose(l){l?this.statusBar.removeElement(l):this.statusBar.removeElement("ext_default_statusbar_text")}$createStatusBarItem(l,h,u,d){this.disposable.addDispose(this.statusBar.addElement(l,{id:h,alignment:u,priority:d}))}async $setMessage(l,h,u,d,E,f,a,b,y,A,S,w){const T=A?.label||(0,v.getCodiconAriaLabel)(d),D={id:h,name:u,text:d||"",priority:E,alignment:f===_.StatusBarAlignment.Left?p.StatusBarAlignment.LEFT:p.StatusBarAlignment.RIGHT,color:a,backgroundColor:b,tooltip:y,command:S,arguments:w,role:A?.role,ariaLabel:T};this.disposable.addDispose(this.statusBar.addElement(l,D))}};t.MainThreadStatusBar=s,n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(p.IStatusBarService),n.__metadata("design:type",Object)],s.prototype,"statusBar",void 0),t.MainThreadStatusBar=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],s)},49731:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadStorage=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(50492),p=e(46147);let v=class{constructor(_){this.rpcProtocol=_,this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostStorage),this.init()}dispose(){}async init(){await this.extensionStorageService.whenReady,this.proxy.$acceptStoragePath(this.extensionStorageService.extensionStoragePath)}$setValue(_,s,g){try{this.extensionStorageService.set(s,g,_)}catch(l){return Promise.reject(l)}return Promise.resolve(void 0)}$getValue(_,s){try{return Promise.resolve(this.extensionStorageService.get(s,_))}catch(g){return Promise.reject(g)}}};t.MainThreadStorage=v,n.__decorate([(0,r.Autowired)(c.IExtensionStorageService),n.__metadata("design:type",Object)],v.prototype,"extensionStorageService",void 0),t.MainThreadStorage=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],v)},24060:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTasks=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(43718),p=e(93950),v=e(1041),m=e(51500),_=e(46147),s=e(54741);var g;(function(O){function M(R){const P=R;return P&&(0,c.isString)(P.id)&&!!P.workspaceFolder}O.is=M})(g||(g={}));var l;(function(O){function M(R){return{id:R.id,task:D.from(R.task)}}O.from=M})(l||(l={}));var h;(function(O){function M(R,P){return{id:R.id,processId:P}}O.from=M})(h||(h={}));var u;(function(O){function M(R,P){return{id:R.id,exitCode:P}}O.from=M})(u||(u={}));var d;(function(O){function M(P){const k=Object.assign(Object.create(null),P);return delete k._key,k}O.from=M;function R(P,k,F){let L=F.createTaskIdentifier(P,console);return L===void 0&&k&&(L={_key:(0,c.uuid)(),type:"$executeOnly"}),L}O.to=R})(d||(d={}));var E;(function(O){function M(P){if(P!=null)return Object.assign(Object.create(null),P)}O.from=M;function R(P){return P==null?v.PresentationOptions.defaults:Object.assign(Object.create(null),v.PresentationOptions.defaults,P)}O.to=R})(E||(E={}));var f;(function(O){function M(P){if(P!=null)return Object.assign(Object.create(null),P)}O.from=M;function R(P){return P==null?v.RunOptions.defaults:Object.assign(Object.create(null),v.RunOptions.defaults,P)}O.to=R})(f||(f={}));var a;(function(O){function M(P){if(P!=null)return{cwd:P.cwd,env:P.env}}O.from=M;function R(P){return P==null?v.CommandOptions.defaults:{cwd:P.cwd||v.CommandOptions.defaults.cwd,env:P.env}}O.to=R})(a||(a={}));var b;(function(O){function M(k){const F=k;return F&&!!F.process}O.is=M;function R(k){const F=(0,c.isString)(k.name)?k.name:k.name.value,L=k.args?k.args.map(j=>(0,c.isString)(j)?j:j.value):[],B={process:F,args:L};return k.options&&(B.options=a.from(k.options)),B}O.from=R;function P(k){const F={runtime:v.RuntimeType.Process,name:k.process,args:k.args,presentation:void 0};return F.options=a.to(k.options),F}O.to=P})(b||(b={}));var y;(function(O){function M(P){if(P==null)return;const k={cwd:P.cwd||v.CommandOptions.defaults.cwd,env:P.env};return P.shell&&(k.executable=P.shell.executable,k.shellArgs=P.shell.args,k.shellQuoting=P.shell.quoting),k}O.from=M;function R(P){if(P==null)return;const k={cwd:P.cwd,env:P.env};return P.executable&&(k.shell={executable:P.executable},P.shellArgs&&(k.shell.args=P.shellArgs),P.shellQuoting&&(k.shell.quoting=P.shellQuoting)),k}O.to=R})(y||(y={}));var A;(function(O){function M(k){const F=k;return F&&(!!F.commandLine||!!F.command)}O.is=M;function R(k){const F={};return k.name&&(0,c.isString)(k.name)&&(k.args===void 0||k.args===null||k.args.length===0)?F.commandLine=k.name:(F.command=k.name,F.args=k.args),k.options&&(F.options=y.from(k.options)),F}O.from=R;function P(k){const F={runtime:v.RuntimeType.Shell,name:k.commandLine?k.commandLine:k.command,args:k.args,presentation:void 0};return k.options&&(F.options=y.to(k.options)),F}O.to=P})(A||(A={}));var S;(function(O){function M(k){const F=k;return F&&F.customExecution==="customExecution"}O.is=M;function R(){return{customExecution:"customExecution"}}O.from=R;function P(){return{runtime:v.RuntimeType.CustomExecution,presentation:void 0}}O.to=P})(S||(S={}));var w;(function(O){function M(k){const F=k;return F&&F.customExecution==="customExecution2"}O.is=M;function R(){return{customExecution:"customExecution2"}}O.from=R;function P(){return{runtime:v.RuntimeType.CustomExecution2,presentation:void 0}}O.to=P})(w||(w={}));var T;(function(O){function M(P){const k={label:P.label};return P.kind===v.TaskSourceKind.Extension?(k.extensionId=P.extension,P.workspaceFolder?k.scope=P.workspaceFolder.uri:k.scope=P.scope):P.kind===v.TaskSourceKind.Workspace&&(k.extensionId="$core",k.scope=P.config.workspaceFolder.uri),k}O.from=M;function R(P,k){let F,L;const B=k.tryGetRoots().map(W=>c.Uri.parse(W.uri));return P.scope===void 0||typeof P.scope=="number"&&P.scope!==1?k.tryGetRoots().map(W=>c.Uri.file(W.uri)).length===0?(F=1,L=void 0):(F=3,L={name:"workspace",uri:B[0],index:0}):typeof P.scope=="number"?F=P.scope:(F=3,L=(0,c.withNullAsUndefined)({uri:k.tryGetRoots().map(W=>c.Uri.parse(W.uri))[0],name:k.getWorkspaceName(k.tryGetRoots().map(W=>c.URI.file(W.uri))[0]),index:0})),{kind:v.TaskSourceKind.Extension,label:P.label,extension:P.extensionId,scope:F,workspaceFolder:L}}O.to=R})(T||(T={}));var D;(function(O){function M(P){if(P==null||!v.CustomTask.is(P)&&!v.ContributedTask.is(P)&&!v.ConfiguringTask.is(P))return;const k={_id:P._id,name:P.configurationProperties.name,definition:d.from(P.getDefinition()),source:T.from(P._source),execution:void 0,presentationOptions:!v.ConfiguringTask.is(P)&&P.command?E.from(P.command.presentation):void 0,isBackground:P.configurationProperties.isBackground,problemMatchers:[],hasDefinedMatchers:v.ContributedTask.is(P)?P.hasDefinedMatchers:!1,runOptions:f.from(P.runOptions)};if(P.configurationProperties.group&&(k.group=P.configurationProperties.group),!v.ConfiguringTask.is(P)&&P.command&&(P.command.runtime===v.RuntimeType.Process?k.execution=b.from(P.command):P.command.runtime===v.RuntimeType.Shell&&(k.execution=A.from(P.command))),P.configurationProperties.problemMatchers)for(const F of P.configurationProperties.problemMatchers)(0,c.isString)(F)&&k.problemMatchers.push(F);return k}O.from=M;function R(P,k,F,L){if(!P||typeof P.name!="string")return;let B;if(P.execution&&(A.is(P.execution)?B=A.to(P.execution):b.is(P.execution)?B=b.to(P.execution):S.is(P.execution)&&(B=S.to())),!B)return;B.presentation=E.to(P.presentationOptions);const j=T.to(P.source,k),W=(0,c.formatLocalize)("task.label",j.label,P.name),U=d.to(P.definition,F,L),Q=`${P.source.extensionId}.${U._key}`;return new v.ContributedTask(Q,j,W,U.type,U,B,P.hasDefinedMatchers,f.to(P.runOptions),{name:P.name,identifier:W,group:P.group,isBackground:!!P.isBackground,problemMatchers:P.problemMatchers.slice()})}O.to=R})(D||(D={}));let I=class extends c.Disposable{constructor(M){super(),this.rpcProtocol=M,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostTasks),this.providers=new Map,this.context={createTaskIdentifier:(R,P)=>this.taskDefinitionRegistry.createTaskIdentifier(R,P)},this.addDispose(this.taskService.onDidStateChange(R=>{const P=R.__task;R.kind==="start"?(this.logger.verbose(`task ${P._label||P._id} start`,R.terminalId),this.proxy.$onDidStartTask(l.from(P.getTaskExecution()),R.terminalId)):R.kind==="processStarted"?(this.logger.verbose(`task ${P._label||P._id} process start`,R.processId),this.proxy.$onDidStartTaskProcess(h.from(P.getTaskExecution(),R.processId))):R.kind==="processEnded"?(this.logger.verbose(`task ${P._label||P._id} process end`,R.exitCode),this.proxy.$onDidEndTaskProcess(u.from(P.getTaskExecution(),R.exitCode))):R.kind==="end"&&(this.logger.verbose(`task ${P._label||P._id} end`),this.proxy.$onDidEndTask(l.from(P.getTaskExecution())))}))}dispose(){super.dispose(),this.providers.forEach(M=>M.disposable.dispose()),this.providers.clear()}$registerTaskProvider(M,R){this.logger.verbose(`register task provider ${R}, handler ${M}`);const P={provideTasks:F=>(this.logger.verbose(`${R} provideTask`),Promise.resolve(this.proxy.$provideTask(M,F)).then(L=>{const B=[];for(const j of L.tasks){const W=D.to(j,this.workspaceService,!0,this.context);W?B.push(W):this.logger.error(`Task System: can not convert task: ${JSON.stringify(j.definition,void 0,0)}. Task will be dropped`)}return{tasks:B,extension:L.extension,type:R}})),resolveTask:F=>(this.logger.verbose(`${R} resolveTask`),Promise.resolve(this.proxy.$resolveTask(M,F)).then(L=>{if(L)return D.to(L,this.workspaceService,!0,this.context)}))},k=this.taskService.registerTaskProvider(P,R);return this.providers.set(M,{disposable:k,provider:P}),Promise.resolve()}$unregisterTaskProvider(M){throw new Error("Method not implemented.")}$fetchTasks(M){return this.taskService.tasks(s.TaskFilterDTO.to(M)).then(R=>{const P=[];for(const k of R){const F=D.from(k);F&&P.push(F)}return P})}$executeTask(M){return new Promise((R,P)=>{if(g.is(M)){const k=this.workspaceService.getWorkspaceRootUri(c.URI.from(M.workspaceFolder));k?this.taskService.getTask(k.codeUri,M.id,!0).then(F=>{this.taskService.run(F).then(()=>{});const L={id:M.id,task:D.from(F)};R(L)},F=>{P(new Error("Task not found"))}):P(new Error("No workspace folder"))}else{const k=D.to(M,this.workspaceService,!0,this.context);this.taskService.run(k).then(()=>{});const F={id:k._id,task:D.from(k)};R(F)}})}$createTaskId(M){return new Promise((R,P)=>{const k=D.to(M,this.workspaceService,!0,this.context);k?R(k._id):P(new Error("Task could not be created from DTO"))})}async $terminateTask(M){await this.taskService.terminateTask(M)}};t.MainThreadTasks=I,n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],I.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(p.ITaskService),n.__metadata("design:type",Object)],I.prototype,"taskService",void 0),n.__decorate([(0,r.Autowired)(m.IWorkspaceService),n.__metadata("design:type",Object)],I.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(c.ITaskDefinitionRegistry),n.__metadata("design:type",Object)],I.prototype,"taskDefinitionRegistry",void 0),t.MainThreadTasks=I=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],I)},69696:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTerminal=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(6487),v=e(94620),m=e(85504),_=e(46147),s=e(71354);let g=class{constructor(u){this.rpcProtocol=u,this.shortId2LongIdMap=new Map,this._terminalProcessProxies=new Map,this._profileProviders=new Map,this.disposable=new c.Disposable,this.proxy=this.rpcProtocol.getProxy(_.ExtHostAPIIdentifier.ExtHostTerminal),this.initData(),this.bindEvent()}dispose(){this.disposable.dispose()}bindEvent(){this.disposable.addDispose(this.terminalApi.onDidChangeActiveTerminal(u=>{this.proxy.$onDidChangeActiveTerminal(u)})),this.disposable.addDispose(this.terminalApi.onDidCloseTerminal(u=>{this.proxy.$onDidCloseTerminal(u)})),this.disposable.addDispose(this.terminalApi.onDidTerminalTitleChange(u=>{this.proxy.$onDidTerminalTitleChange(u.id,u.name)})),this.disposable.addDispose(this.terminalApi.onDidOpenTerminal(u=>{const d=this.controller.clients.get(u.id);d&&d.addDispose(d.xterm.raw.onData(()=>{this.proxy.$acceptTerminalInteraction(u.id)})),this.proxy.$onDidOpenTerminal(u)})),this.disposable.addDispose(this.controller.onInstanceRequestStartExtensionTerminal(u=>this._onRequestStartExtensionTerminal(u))),this.disposable.addDispose(this.profileService.onDidChangeAvailableProfiles(()=>{this._updateDefaultProfile()})),this.disposable.addDispose(this.profileService.onTerminalProfileResolved(async u=>{await this.activationEventService.fireEvent(`onTerminalProfile:${u}`)})),this.disposable.addDispose(this.profileService.onDidChangeDefaultShell(u=>{this.proxy.$setShell(u)}))}initData(){const u=this.terminalApi.terminals,d=[];u.forEach(E=>{d.push({id:E.id,name:E.name,isActive:E.isActive})}),this.proxy.$setTerminals(d),this._updateDefaultProfile()}transform(u,d){const E=this.shortId2LongIdMap.get(u);return d(E||u)}$sendText(u,d,E){return this.transform(u,f=>(this.proxy.$acceptTerminalInteraction(f),this.terminalApi.sendText(f,d,E)))}$show(u,d){return this.transform(u,E=>this.terminalApi.showTerm(E,d))}$hide(u){return this.transform(u,d=>this.terminalApi.hideTerm(d))}$dispose(u){return this.transform(u,d=>this.terminalApi.removeTerm(d))}$getProcessId(u){return this.transform(u,d=>this.terminalApi.getProcessId(d))}async $createTerminal(u,d){await this.controller.ready.promise;const E=await this.terminalApi.createTerminal(u,d);if(!E){this.logger.error(`Create Terminal ${d} fail.`);return}this.shortId2LongIdMap.set(d,E.id)}_onRequestStartExtensionTerminal(u){const d=u.proxy;this._terminalProcessProxies.set(d.terminalId,d);const E=u.cols&&u.rows?{columns:u.cols,rows:u.rows}:void 0;this.proxy.$startExtensionTerminal(d.terminalId,E).then(u.callback),d.onInput(f=>this.proxy.$acceptProcessInput(d.terminalId,f)),d.onShutdown(f=>this.proxy.$acceptProcessShutdown(d.terminalId,f)),d.onRequestCwd(()=>this.proxy.$acceptProcessRequestCwd(d.terminalId)),d.onRequestInitialCwd(()=>this.proxy.$acceptProcessRequestInitialCwd(d.terminalId))}_getTerminalProcess(u){return this.transform(u,d=>{const E=this._terminalProcessProxies.get(d);if(!E)throw new Error(`Unknown terminal: ${d}`);return E})}$sendProcessTitle(u,d){return this.transform(u,E=>{const f=this.terminalGroupViewService.getWidget(E);f&&(f.rename(d),this.proxy.$acceptTerminalTitleChange(E,d))})}$sendProcessData(u,d){this._getTerminalProcess(u).emitData(d)}$sendProcessReady(u,d,E){this._getTerminalProcess(u).emitReady(d,E)}$sendProcessExit(u,d){this._getTerminalProcess(u).emitExit(d),this._terminalProcessProxies.delete(u)}$sendOverrideDimensions(u,d){this._getTerminalProcess(u).emitOverrideDimensions(d)}$sendProcessInitialCwd(u,d){this._getTerminalProcess(u).emitInitialCwd(d)}$sendProcessCwd(u,d){this._getTerminalProcess(u).emitCwd(d)}$startLinkProvider(){var u;(u=this._linkProvider)===null||u===void 0||u.dispose(),this._linkProvider=this.controller.registerLinkProvider(new l(this.proxy))}$stopLinkProvider(){var u;(u=this._linkProvider)===null||u===void 0||u.dispose(),this._linkProvider=void 0}$registerProfileProvider(u,d){this._profileProviders.set(u,this.profileService.registerTerminalProfileProvider(d,u,{createContributedTerminalProfile:async E=>{this.proxy.$createContributedProfileTerminal(u,E)}}))}$unregisterProfileProvider(u){var d;(d=this._profileProviders.get(u))===null||d===void 0||d.dispose(),this._profileProviders.delete(u)}async _updateDefaultProfile(){const u=await this.profileInternalSerivce.resolveDefaultProfile();u&&this.proxy.$acceptDefaultProfile(u)}$setEnvironmentVariableCollection(u,d,E){if(E){const f={persistent:d,map:(0,v.deserializeEnvironmentVariableCollection)(E)};this.environmentVariableService.set(u,f)}else this.environmentVariableService.delete(u)}};t.MainThreadTerminal=g,n.__decorate([(0,r.Autowired)(v.EnvironmentVariableServiceToken),n.__metadata("design:type",Object)],g.prototype,"environmentVariableService",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalApiService),n.__metadata("design:type",Object)],g.prototype,"terminalApi",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalController),n.__metadata("design:type",Object)],g.prototype,"controller",void 0),n.__decorate([(0,r.Autowired)(m.ITerminalProfileService),n.__metadata("design:type",Object)],g.prototype,"profileService",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalProfileInternalService),n.__metadata("design:type",Object)],g.prototype,"profileInternalSerivce",void 0),n.__decorate([(0,r.Autowired)(p.ITerminalGroupViewService),n.__metadata("design:type",Object)],g.prototype,"terminalGroupViewService",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],g.prototype,"preference",void 0),n.__decorate([(0,r.Autowired)(s.IActivationEventService),n.__metadata("design:type",s.IActivationEventService)],g.prototype,"activationEventService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],g.prototype,"logger",void 0),t.MainThreadTerminal=g=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],g);class l{constructor(u){this._proxy=u}async provideLinks(u,d){const E=this._proxy;return(await E.$provideLinks(u.id,d)).map(a=>({id:a.id,startIndex:a.startIndex,length:a.length,label:a.label,activate:()=>E.$activateLink(u.id,a.id)}))}}},53191:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTestsImpl=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(43718),v=e(48465),m=e(30005),_=e(20215),s=e(48385),g=e(44781),l=e(46147),h=d=>{var E,f;for(const a of d)if(a[0]===0||a[0]===1){const b=a[1];!((E=b.item)===null||E===void 0)&&E.uri&&(b.item.uri=p.URI.revive(b.item.uri)),!((f=b.item)===null||f===void 0)&&f.range&&(b.item.range=g.Range.lift(b.item.range))}};let u=class extends p.Disposable{constructor(E){super(),this.testProviderRegistrations=new Map,this.proxy=E.getProxy(l.ExtHostAPIIdentifier.ExtHostTests)}$registerTestController(E,f,a){const b=new p.DisposableStore,y=b.add(new m.ObservableValue(a)),A={id:E,label:f,canRefresh:y,configureRunProfile:S=>this.proxy.$configureRunProfile(E,S),refreshTests:S=>this.proxy.$refreshTests(E,S),runTests:(S,w)=>this.proxy.$runControllerTests(S,w),expandTest:(S,w)=>this.proxy.$expandTest(S,isFinite(w)?w:-1)};b.add(p.Disposable.create(()=>this.testProfiles.removeProfile(E))),b.add(this.testService.registerTestController(E,A)),this.testProviderRegistrations.set(E,{instance:A,label:f,canRefresh:y,disposable:b})}$updateController(E,f){const a=this.testProviderRegistrations.get(E);a&&(f.label!==void 0&&(a.label=f.label),f.canRefresh!==void 0&&(a.canRefresh.value=f.canRefresh))}$unregisterTestController(E){this.logger.warn("test: unregisterTestController>>",E)}$subscribeToDiffs(){this.logger.warn("test: subscribeToDiffs>>")}$unsubscribeFromDiffs(){this.logger.warn("test: unsubscribeFromDiffs>>")}$publishDiff(E,f){h(f),this.testService.publishDiff(E,f)}$publishTestRunProfile(E){const f=this.testProviderRegistrations.get(E.controllerId);f&&this.testProfiles.addProfile(f.instance,E)}$updateTestRunConfig(E,f,a){this.logger.warn("Method not implemented.")}$removeTestProfile(E,f){this.testProfiles.removeProfile(E,f)}async $runTests(E,f){return(await this.testService.runResolvedTests(E,f)).id}$addTestsToRun(E,f,a){for(const b of a)b.uri=p.URI.revive(b.uri),b.range&&(b.range=g.Range.lift(b.range));this.withTestResult(f,b=>b.addTestChainToRun(E,a))}$updateTestStateInRun(E,f,a,b,y){this.withTestResult(E,A=>A.updateState(a,f,b,y))}$appendTestMessagesInRun(E,f,a,b){const y=this.resultService.getResult(E);if(y&&y instanceof s.TestResultImpl)for(const A of b)A.location&&(A.location.uri=p.URI.revive(A.location.uri),A.location.range=g.Range.lift(A.location.range)),y.appendMessage(a,f,A)}$appendOutputToRun(E,f,a,b,y){const A=b&&{uri:p.URI.revive(b.uri),range:g.Range.lift(b.range)};this.withTestResult(E,S=>S.appendOutput(a,f,A,y))}$startedTestRunTask(E,f){this.withTestResult(E,a=>a.addTask(f))}$finishedTestRunTask(E,f){this.withTestResult(E,a=>a.markTaskComplete(f))}$startedExtensionTestRun(E){this.resultService.createTestResult(E)}$finishedExtensionTestRun(E){this.withTestResult(E,f=>f.markComplete())}$markTestRetired(E){this.logger.warn("Method not implemented.")}withTestResult(E,f){const a=this.resultService.getResult(E);return a&&a instanceof s.TestResultImpl?f(a):void 0}};t.MainThreadTestsImpl=u,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",c.Logger)],u.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(v.TestServiceToken),n.__metadata("design:type",Object)],u.prototype,"testService",void 0),n.__decorate([(0,r.Autowired)(_.TestProfileServiceToken),n.__metadata("design:type",Object)],u.prototype,"testProfiles",void 0),n.__decorate([(0,r.Autowired)(s.TestResultServiceToken),n.__metadata("design:type",Object)],u.prototype,"resultService",void 0),t.MainThreadTestsImpl=u=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],u)},31968:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadTheming=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(52416),p=e(46147);let v=class{constructor(_){this.rpcProtocol=_,this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostTheming),this._themeChangeListener=this._themeService.onThemeChange(s=>{this.proxy.$onColorThemeChange(s.type)}),this.proxy.$onColorThemeChange(this._themeService.getCurrentThemeSync().type)}dispose(){this._themeChangeListener.dispose()}};t.MainThreadTheming=v,n.__decorate([(0,r.Autowired)(c.IThemeService),n.__metadata("design:type",Object)],v.prototype,"_themeService",void 0),t.MainThreadTheming=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],v)},4321:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TreeViewDragAndDropController=t.TreeViewDataProvider=t.MainThreadTreeView=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(8919),v=e(41869),m=e(93899),_=e(68969),s=e(14951),g=e(63067),l=e(52416),h=e(46147),u=e(53043),d=e(98475),E=e(2108),f=e(51328),a=e(17428),b=e(74228),y=e(72217);let A=n=class extends v.WithEventBus{constructor(D,I){super(),this.rpcProtocol=D,this.extensionHostType=I,this.treeModels=new Map,this.dndControllers=new Map,this.disposableCollection=new Map,this.disposable=new v.DisposableStore,this.proxy=this.rpcProtocol.getProxy(h.ExtHostAPIIdentifier.ExtHostTreeView),this.disposable.add((0,v.toDisposable)(()=>this.treeModels.clear())),this.disposable.add((0,v.toDisposable)(()=>this.dndControllers.clear())),this._registerInternalCommands(),this.fileServiceClient.getCurrentUserHome().then(O=>{O&&(this.userhome=new v.URI(O.uri))}),this.addDispose(this.eventBus.on(g.ViewCollapseChangedEvent,O=>{if(O.payload.viewId&&this.treeModels.has(O.payload.viewId)&&!O.payload.collapsed){const M=this.treeModels.get(O.payload.viewId);M&&this.progressService.withProgress({location:O.payload.viewId},()=>M.refresh())}}))}dispose(){this.disposable.dispose(),this.disposableCollection.forEach(D=>{D.dispose()}),this.disposableCollection.clear()}createTreeModel(D,I,O,M){return b.ExtensionTreeViewModel.createModel(this.injector,I,O,D,M||{})}async $registerTreeDataProvider(D,I){if(this.treeModels.has(D))return;const O=new v.DisposableStore,M=new S(D,this.proxy,this.iconService,this.themeService,this.labelService,this.contextKeyService,this.menuService,this.userhome),R=new w(D,I.dropMimeTypes,I.dragMimeTypes,I.hasHandleDrag,this.proxy),P=this.createTreeModel(D,M,R,I);this.treeModels.set(D,P),this.dndControllers.set(D,R),O.add((0,v.toDisposable)(()=>this.treeModels.delete(D))),this.mainLayoutService.replaceViewComponent({id:D,component:a.ExtensionTabBarTreeView},{model:P,dataProvider:M,treeViewId:D}),I?.showCollapseAll&&O.add(this.menuRegistry.registerMenuItem(m.MenuId.ViewTitle,{command:{id:this.extensionHostType==="worker"?n.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID_WORKER:n.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID,label:(0,v.localize)("treeview.command.action.collapse")},extraTailArgs:[D],iconClass:(0,v.getIcon)("collapse-all"),when:`view == ${D}`,group:"navigation",order:1e4})),O.add(P.onDidSelectedNodeChange(F=>{M.setSelection(D,F)})),O.add(P.onDidChangeExpansionState(F=>{const{treeItemId:L,expanded:B}=F;M.setExpanded(D,L,B)}));const k=this.mainLayoutService.getTabbarHandler(D);k&&(O.add(k.onActivate(()=>{M.setVisible(D,!0)})),O.add(k.onInActivate(()=>{M.setVisible(D,!1)})),O.add(O.add((0,v.toDisposable)(()=>k.disposeView(D))))),this.disposableCollection.set(D,O)}async $unregisterTreeDataProvider(D){const I=this.disposableCollection.get(D);I&&I.dispose()}async $resolveDropFileData(D,I,O){const M=this.dndControllers.get(D);if(!M)throw new Error("Unknown tree");return M.resolveDropFileData(I,O)}async $refresh(D,I){const O=this.treeModels.get(D);O&&await O.refresh(I)}async $setTitle(D,I){const O=this.mainLayoutService.getTabbarHandler(D);O&&O.updateViewTitle(D,I)}async $setDescription(D,I){const O=this.mainLayoutService.getTabbarHandler(D);O&&O.updateViewDescription(D,I)}async $setBadge(D,I){const O=this.mainLayoutService.getTabbarHandler(D);O&&(O.setBadge(I||""),O.accordionService.updateViewBadge(D,I||""))}async $setMessage(D,I){const O=this.mainLayoutService.getTabbarHandler(D);O&&O.updateViewMessage(D,I)}async $reveal(D,I,O){this.mainLayoutService.revealView(D);const M=this.treeModels.get(D);M&&I&&M.reveal(I,O)}_registerInternalCommands(){this.disposable.add(this.commandRegistry.registerCommand({id:this.extensionHostType==="worker"?n.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID_WORKER:n.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID},{execute:D=>{const I=this.treeModels.get(D);I&&I.collapseAll()}}))}};t.MainThreadTreeView=A,A.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID="TREE_VIEW_COLLAPSE_ALL",A.TREE_VIEW_COLLAPSE_ALL_COMMAND_ID_WORKER="TREE_VIEW_COLLAPSE_ALL_WORKER",r.__decorate([(0,o.Autowired)(g.IMainLayoutService),r.__metadata("design:type",Object)],A.prototype,"mainLayoutService",void 0),r.__decorate([(0,o.Autowired)(l.IIconService),r.__metadata("design:type",Object)],A.prototype,"iconService",void 0),r.__decorate([(0,o.Autowired)(m.IMenuRegistry),r.__metadata("design:type",m.IMenuRegistry)],A.prototype,"menuRegistry",void 0),r.__decorate([(0,o.Autowired)(v.CommandRegistry),r.__metadata("design:type",Object)],A.prototype,"commandRegistry",void 0),r.__decorate([(0,o.Autowired)(l.IThemeService),r.__metadata("design:type",Object)],A.prototype,"themeService",void 0),r.__decorate([(0,o.Autowired)(_.IProgressService),r.__metadata("design:type",Object)],A.prototype,"progressService",void 0),r.__decorate([(0,o.Autowired)(v.LabelService),r.__metadata("design:type",v.LabelService)],A.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(v.IContextKeyService),r.__metadata("design:type",Object)],A.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(m.AbstractMenuService),r.__metadata("design:type",m.AbstractMenuService)],A.prototype,"menuService",void 0),r.__decorate([(0,o.Autowired)(s.IFileServiceClient),r.__metadata("design:type",Object)],A.prototype,"fileServiceClient",void 0),r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],A.prototype,"injector",void 0),t.MainThreadTreeView=A=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)(p.IRPCProtocol)),r.__metadata("design:paramtypes",[Object,String])],A);class S extends c.Tree{constructor(D,I,O,M,R,P,k,F){super(),this.treeViewId=D,this.proxy=I,this.iconService=O,this.themeService=M,this.labelService=R,this.contextKeyService=P,this.menuService=k,this.userhome=F,this.cachedMenu=new Map,this.onTreeDataChangedEmitter=new v.Emitter,this.onRevealChangedEmitter=new v.Emitter,this.isEmpty=!0,this._onDidChangeEmpty=new v.Emitter,this.onDidChangeEmpty=this._onDidChangeEmpty.event,this.treeItemId2TreeNode=new Map}get isTreeEmpty(){return this.isEmpty}get onTreeDataChanged(){return this.onTreeDataChangedEmitter.event}get onRevealChanged(){return this.onRevealChangedEmitter.event}get root(){return this._root}getTreeNodeIdByTreeItemId(D){var I;return(I=this.treeItemId2TreeNode.get(D))===null||I===void 0?void 0:I.id}getReadableDescription(D){if(D.resourceUri){if(this.userhome){const I=v.URI.from(D.resourceUri);if(this.userhome.isEqualOrParent(I))return decodeURIComponent(D.resourceUri.path.toString().replace(this.userhome.codeUri.fsPath,"~"))}return D.resourceUri.path.toString()}return D.description}getLabelAndDescription(D){if(D.label)return{label:D.label,description:D.description};if(D.resourceUri){let I=D.resourceUri.path.toString();I=decodeURIComponent(I),I.indexOf("/")>=0&&(I=I.substring(I.lastIndexOf("/")+1));const O=this.getReadableDescription(D);return{label:I,description:O}}return{label:D.label,description:D.description}}async createFoldNode(D,I){var O;const M=f.TreeItemCollapsibleState.Expanded===D.collapsibleState,R=await this.toIconClass(D),P=this.getInlineMenuNodes(D.contextValue||""),{label:k,description:F}=this.getLabelAndDescription(D);return new y.ExtensionCompositeTreeNode(this,I,k,F,R,typeof D.tooltip=="string"?D.tooltip:(O=D.tooltip)===null||O===void 0?void 0:O.value,D.command,D.contextValue||"",D.id,P,D.checkboxInfo,D.accessibilityInformation,M,D.resourceUri)}async createNormalNode(D,I){var O;const M=await this.toIconClass(D),R=this.getInlineMenuNodes(D.contextValue||""),{label:P,description:k}=this.getLabelAndDescription(D);return new y.ExtensionTreeNode(this,I,P,k,M,typeof D.tooltip=="string"?D.tooltip:(O=D.tooltip)===null||O===void 0?void 0:O.value,D.command,D.contextValue||"",D.id,R,D.checkboxInfo,D.accessibilityInformation,D.resourceUri)}isBase64Icon(D){const I=/^data:image\//;return D?(0,v.isString)(D)?I.test(D):I.test(D.dark):!1}async toIconClass(D){if(D.iconUrl||D.icon)return this.iconService.fromIcon("",D.iconUrl||D.icon,this.isBase64Icon(D.iconUrl||D.icon)?l.IconType.Base64:l.IconType.Background,void 0,!0);if(D.themeIcon){let I=(0,v.getExternalIcon)(D.themeIcon.id);D.resourceUri&&(D.themeIcon.id==="file"?I=this.labelService.getIcon(v.URI.from(D.resourceUri)):D.themeIcon.id==="folder"&&(I=this.labelService.getIcon(v.URI.from(D.resourceUri),{isDirectory:!0})));const O=this.themeService.getColorClassNameByColorToken(D.themeIcon.color);return`${I} ${O??""}`}else return""}getInlineMenuNodes(D){if(this.cachedMenu.has(D))return this.cachedMenu.get(D);const I=this.contextKeyService.createScoped();I.createKey("view",this.treeViewId),I.createKey("viewItem",D);const O=this.menuService.createMenu(m.MenuId.ViewItemContext,I),M=(0,m.generateCtxMenu)({menus:O,separator:"inline"});return O.dispose(),I.dispose(),this.cachedMenu.set(D,M[0]),M[0]}async createTreeNode(D,I){return!(0,v.isUndefined)(D.collapsibleState)&&D.collapsibleState!==f.TreeItemCollapsibleState.None?await this.createFoldNode(D,I):await this.createNormalNode(D,I)}async resolveChildren(D){let I=[];if(D){let O;if(y.ExtensionTreeRoot.is(D)?O=await this.proxy.$getChildren(this.treeViewId):O=await this.proxy.$getChildren(this.treeViewId,D.treeItemId),O&&Array.isArray(O))for(const M of O){const R=await this.createTreeNode(M,D);this.treeItemId2TreeNode.set(M.id,R),I.push(R)}if(y.ExtensionTreeRoot.is(D)){const M=this.isEmpty;this.isEmpty=!O||O.length===0,M!==this.isEmpty&&this._onDidChangeEmpty.fire()}}else I=[new y.ExtensionTreeRoot(this,this.treeViewId)];return I}async resolveTreeItem(D,I){const O=new v.CancellationTokenSource().token;return this.proxy.$resolveTreeItem(D,I,O)}sortComparator(D,I){return D?I?0:-1:1}async refresh(D){await this.onTreeDataChangedEmitter.fire(D)}async reveal(D){await this.onRevealChangedEmitter.fire(D)}async setSelection(D,I){this.proxy.$setSelection(D,I)}async setExpanded(D,I,O){this.proxy.$setExpanded(D,I,O)}async setVisible(D,I){this.proxy.$setVisible(D,I)}dispose(){super.dispose(),this.treeItemId2TreeNode.clear()}markAsChecked(D,I,O){var M;function R(F,L){var B,j;((B=F.parent)===null||B===void 0?void 0:B.checkboxInfo)!==void 0&&F.parent.checkboxInfo.checked!==I&&(!I||!(!((j=F.parent.children)===null||j===void 0)&&j.some(W=>{var U;return W!==F&&((U=W.checkboxInfo)===null||U===void 0?void 0:U.checked)===!1})))&&(L.push(F.parent),R(F.parent,L))}function P(F,L){var B;c.CompositeTreeNode.is(F)&&((B=F.children)===null||B===void 0||B.forEach(j=>{j.checkboxInfo!==void 0&&j.checkboxInfo.checked!==I&&L.push(j),P(j,L)}))}const k=[D];O||(R(D,k),P(D,k)),k.forEach(F=>F.checkboxInfo.checked=I),(M=this.proxy)===null||M===void 0||M.$checkStateChanged(this.treeViewId,[{treeItemId:D.treeItemId,checked:I}])}}t.TreeViewDataProvider=S;class w extends v.Disposable{constructor(D,I=[],O=[],M,R){super(),this.treeViewId=D,this.dropMimeTypes=I,this.dragMimeTypes=O,this.hasHandleDrag=M,this._proxy=R,this.dataTransfersCache=new E.DataTransferCache}async handleDrop(D,I,O,M,R,P){const k=this.dataTransfersCache.add(D);try{return await this._proxy.$handleDrop(this.treeViewId,k.id,await u.DataTransfer.toDataTransferDTO(D),I?.treeItemId,O,M,R,P)}finally{k.dispose()}}async handleDrag(D,I,O){if(!this.hasHandleDrag)return;const M=await this._proxy.$handleDrag(this.treeViewId,D,I,O);if(!M)return;const R=new d.VSDataTransfer;return M.items.forEach(([P,k])=>{R.replace(P,(0,d.createStringDataTransferItem)(k.asString))}),R}resolveDropFileData(D,I){return this.dataTransfersCache.resolveDropFileData(D,I)}}t.TreeViewDragAndDropController=w},73082:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadUrls=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(46147),v=e(71354);class m{constructor(l,h,u){this.proxy=l,this.handle=h,this.extensionId=u}async handleURL(l){return this.extensionId!==l.authority?!1:(await this.proxy.$handleExternalUri(this.handle,l.codeUri),!0)}}let _=class{constructor(){this.extensionUrlHandlers=new Map}async open(l){let h=!1;const u=l.authority,d=this.extensionUrlHandlers.get(u);if(d)try{h=await d.handleURL(l)}catch(E){this.logger.error(E)}return await this.activationEventService.fireEvent("onUri",u),h}handleScheme(l){return l===this.config.uriScheme}registerExtensionHandler(l,h,u){const d=new m(u,l,h);return this.extensionUrlHandlers.set(h,d),{dispose:()=>{this.extensionUrlHandlers.delete(h)}}}dispose(){this.extensionUrlHandlers.clear()}};n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],_.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.IActivationEventService)],_.prototype,"activationEventService",void 0),_=n.__decorate([(0,r.Injectable)()],_);let s=class{constructor(l){this.handlers=new Map,this.proxy=l.getProxy(p.ExtHostAPIIdentifier.ExtHostUrls),this.openerService.registerOpener(this.extensionOpener)}async $registerUriHandler(l,h){this.handlers.set(l,this.extensionOpener.registerExtensionHandler(l,h,this.proxy))}async $unregisterUriHandler(l){const h=this.handlers.get(l);h&&(h.dispose(),this.handlers.delete(l))}dispose(){this.handlers.clear(),this.extensionOpener.dispose()}};t.MainThreadUrls=s,n.__decorate([(0,r.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],s.prototype,"openerService",void 0),n.__decorate([(0,r.Autowired)(_),n.__metadata("design:type",_)],s.prototype,"extensionOpener",void 0),t.MainThreadUrls=s=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(o.IRPCProtocol)),n.__metadata("design:paramtypes",[Object])],s)},38408:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWindowState=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(46147),v=e(38894);let m=class{constructor(s){this.rpcProtocol=s,this.toDispose=new c.DisposableCollection,this.proxy=this.rpcProtocol.getProxy(p.ExtHostAPIIdentifier.ExtHostWindowState),this.blurHandler=()=>{this.proxy.$onDidChangeWindowFocus(!1)},this.focusHandler=()=>{this.proxy.$onDidChangeWindowFocus(!0)},window.addEventListener("blur",this.blurHandler),window.addEventListener("focus",this.focusHandler);const g=new v.WindowActivityTimer(window);this.toDispose.push(g.onDidChangeActiveState(l=>this.onActiveStateChanged(l))),this.toDispose.push(g)}onActiveStateChanged(s){this.proxy.$onDidChangeWindowActive(s)}dispose(){window.removeEventListener("blur",this.blurHandler),window.removeEventListener("focus",this.focusHandler),this.toDispose.dispose()}};t.MainThreadWindowState=m,t.MainThreadWindowState=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],m)},43812:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWindow=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(72665),v=e(46147);let m=class{constructor(s){this.rpcProtocol=s,this.proxy=this.rpcProtocol.getProxy(v.ExtHostAPIIdentifier.ExtHostWindow)}getDefaultDialogOptions(s){return{...s,defaultUri:s.defaultUri?c.URI.from(s.defaultUri):void 0}}async $showOpenDialog(s,g={}){const l=this.getDefaultDialogOptions(g),h=await this.windowDialogService.showOpenDialog(l);this.proxy.$onOpenDialogResult(s,h&&h.map(u=>u.codeUri))}async $showSaveDialog(s,g={}){const l=this.getDefaultDialogOptions(g),h=await this.windowDialogService.showSaveDialog(l);this.proxy.$onSaveDialogResult(s,h&&h.codeUri)}dispose(){}};t.MainThreadWindow=m,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(p.IDialogService),n.__metadata("design:type",Object)],m.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(p.IWindowDialogService),n.__metadata("design:type",Object)],m.prototype,"windowDialogService",void 0),t.MainThreadWindow=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],m)},13643:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainThreadWorkspace=void 0;const n=e(85608),r=e(76003),o=e(8919),c=e(41869),p=e(54414),v=e(50492),m=e(84660),_=e(52902),s=e(51500),g=e(26199),l=e(46147);let h=class extends c.WithEventBus{constructor(d){super(),this.rpcProtocol=d,this.proxy=this.rpcProtocol.getProxy(l.ExtHostAPIIdentifier.ExtHostWorkspace),this.processWorkspaceFoldersChanged(this.workspaceService.tryGetRoots()),this.addDispose(this.workspaceChangeEvent=this.workspaceService.onWorkspaceChanged(E=>{this.processWorkspaceFoldersChanged(E)})),this.storageProxy=d.getProxy(l.ExtHostAPIIdentifier.ExtHostStorage)}async $startFileSearch(d,E,f,a,b){const y={rootUris:E.cwd?[E.cwd]:this.workspaceService.tryGetRoots().map(S=>S.uri),excludePatterns:f?[f]:void 0,limit:a,includePatterns:[d]};return await this.fileSearchService.find("",y,b)}isAnyRootChanged(d){return!this.roots||this.roots.length!==d.length?!0:this.roots.some((E,f)=>E.uri!==d[f].uri)}processWorkspaceFoldersChanged(d){this.isAnyRootChanged(d)!==!1&&(this.roots=d,this.proxy.$onWorkspaceFoldersChanged({roots:d}),this.extensionStorageService.getAll(!1).then(E=>{this.storageProxy.$updateWorkspaceStorageData(E)}))}dispose(){super.dispose(),this.workspaceChangeEvent.dispose()}async $updateWorkspaceFolders(d,E,f,...a){await this.workspaceService.spliceRoots(d,E,f,...a.map(b=>new c.URI(b)))}async $tryApplyWorkspaceEdit(d,E){try{const f=_.ResourceEdit.convert(d),{success:a}=await this.bulkEditService.apply(f,{respectAutoSaveConfig:E?.isRefactoring});return a}catch{return!1}}async $save(d){if(d)try{const E=c.URI.file(d.path.toString());return await this.editorService.save(E)}catch(E){this.logger.error(`Save Failed: ${E.message}`);return}}async $saveAs(d){if(d)try{return await this.editorService.saveAs(d)}catch(E){this.logger.error(`SaveAs Failed: ${E.message}`);return}}async $saveAll(){try{return await this.editorService.saveAll(),!0}catch(d){return this.logger.error(d),!1}}onRenameFile(d){this.proxy.$didRenameFile(d.payload.oldUri.codeUri,d.payload.newUri.codeUri)}};t.MainThreadWorkspace=h,n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],h.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],h.prototype,"editorService",void 0),n.__decorate([(0,r.Autowired)(m.FileSearchServicePath),n.__metadata("design:type",Object)],h.prototype,"fileSearchService",void 0),n.__decorate([(0,r.Autowired)(v.IExtensionStorageService),n.__metadata("design:type",Object)],h.prototype,"extensionStorageService",void 0),n.__decorate([(0,r.Autowired)(g.IBulkEditServiceShape),n.__metadata("design:type",Object)],h.prototype,"bulkEditService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),n.__decorate([(0,c.OnEvent)(g.WorkspaceEditDidRenameFileEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.WorkspaceEditDidRenameFileEvent]),n.__metadata("design:returntype",void 0)],h.prototype,"onRenameFile",null),t.MainThreadWorkspace=h=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)(Symbol())),n.__metadata("design:paramtypes",[Object])],h)},97673:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentRangeSemanticTokensProviderImpl=t.DocumentSemanticTokensProvider=void 0;const n=e(70858);function r(p){if(p instanceof Uint8Array)return p;if(Array.isArray(p))return Uint8Array.from(p);const v=[];for(const m in p)Object.prototype.hasOwnProperty.call(p,m)&&v.push(Number(p[m]));return Uint8Array.from(v)}class o{constructor(v,m,_){this.proxy=v,this.handleId=m,this.legend=_}getLegend(){return this.legend}async provideDocumentSemanticTokens(v,m,_){const s=m?parseInt(m,10):0,g=await this.proxy.$provideDocumentSemanticTokens(this.handleId,v.uri,s,_);if(!g||_.isCancellationRequested)return null;const l=(0,n.decodeSemanticTokensDto)(r(g));return l.type==="full"?{resultId:String(l.id),data:l.data}:{resultId:String(l.id),edits:l.deltas}}releaseDocumentSemanticTokens(v){v&&this.proxy.$releaseDocumentSemanticTokens(this.handleId,parseInt(v,10))}}t.DocumentSemanticTokensProvider=o;class c{constructor(v,m,_){this.proxy=v,this.handleId=m,this.legend=_}getLegend(){return this.legend}async provideDocumentRangeSemanticTokens(v,m,_){const s=await this.proxy.$provideDocumentRangeSemanticTokens(this.handleId,v.uri,m,_);if(!s||_.isCancellationRequested)return null;const g=(0,n.decodeSemanticTokensDto)(r(s));if(g.type==="full")return{resultId:String(g.id),data:g.data};throw new Error("Unexpected")}}t.DocumentRangeSemanticTokensProviderImpl=c},74501:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(72217);let m=n=class extends c.TreeModel{constructor(s){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(s)}init(s){this.root=s,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};t.ExtensionTreeModel=m,m.DEFAULT_FLUSH_DELAY=100,t.ExtensionTreeModel=m=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.ExtensionTreeRoot])],m)},74228:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeViewModel=t.ITreeViewsService=t.ITreeViewDragAndDropController=t.ITreeViewBaseOptions=t.ITreeViewId=t.IExtensionTreeViewModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(93899),m=e(43718),_=e(46147),s=e(98475),g=e(4321),l=r.__importDefault(e(50790)),h=e(74501),u=e(72217);t.IExtensionTreeViewModel=Symbol("IExtensionTreeViewModel"),t.ITreeViewId=Symbol("ITreeViewId"),t.ITreeViewBaseOptions=Symbol("TreeViewBaseOptions"),t.ITreeViewDragAndDropController=Symbol("ITreeViewDragAndDropController"),t.ITreeViewsService=Symbol("ITreeViewsService");const d=Symbol("ITreeViewDataProvider");let E=n=class{static createContainer(a,b,y,A,S){return a.createChild([{token:d,useValue:b},{token:t.ITreeViewDragAndDropController,useValue:y},{token:t.IExtensionTreeViewModel,useClass:n},{token:t.ITreeViewId,useValue:A},{token:t.ITreeViewBaseOptions,useValue:S},{token:t.ITreeViewsService,useValue:new _.TreeviewsService}])}static createModel(a,b,y,A,S){return n.createContainer(a,b,y,A,S).get(t.IExtensionTreeViewModel)}constructor(){this.selectedDecoration=new c.Decoration(l.default.mod_selected),this.focusedDecoration=new c.Decoration(l.default.mod_focused),this.contextMenuDecoration=new c.Decoration(l.default.mod_actived),this.loadingDecoration=new c.Decoration(l.default.mod_loading),this.draggingDecoration=new c.Decoration(l.default.mod_dragging),this.draggedOverDecoration=new c.Decoration(l.default.mod_dragover),this.beingDraggedNodes=[],this._selectedNodes=[],this.disposableCollection=new p.DisposableCollection,this.onDidFocusedNodeChangeEmitter=new p.Emitter,this.onDidSelectedNodeChangeEmitter=new p.Emitter,this.onDidChangeExpansionStateEmitter=new p.Emitter,this._isMultiSelected=!1,this.revealDelayer=new p.ThrottledDelayer(n.DEFAULT_REVEAL_DELAY),this.toCancelNodeExpansion=new p.DisposableCollection,this.dragOverTrigger=new p.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.treeItemsTransfer=s.LocalSelectionTransfer.getInstance(),this.treeHandlerReadyDeffer=new p.Deferred,this.clearNodeSelectedDecoration=()=>{this._selectedNodes.forEach(a=>{this.selectedDecoration.removeTarget(a)}),this._selectedNodes=[],this.onDidSelectedNodeChangeEmitter.fire([])},this.activeNodeDecoration=a=>{if(a!==this.treeModel.root&&(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),a)){if(this.selectedNodes.length>0)for(const b of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(b);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(a),this.focusedDecoration.addTarget(a),this._focusedNode=a,this._selectedNodes=[a],this.onDidFocusedNodeChangeEmitter.fire(a.treeItemId),this.onDidSelectedNodeChangeEmitter.fire([a.treeItemId]),this.treeModel.dispatchChange()}},this.activeNodeFocusedDecoration=(a,b=!1,y=!1)=>{if(a!==this.treeModel.root){if(this.focusedNode!==a&&(b?(this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this._contextMenuNode=a):this.focusedNode&&(this._contextMenuNode=void 0,this.focusedDecoration.removeTarget(this.focusedNode)),a)){if(y){for(const A of this._selectedNodes)this.selectedDecoration.removeTarget(A);this._selectedNodes=[]}this._selectedNodes.indexOf(a)<0&&(this.selectedDecoration.addTarget(a),this._selectedNodes.push(a),this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map(A=>A.treeItemId))),this.focusedDecoration.addTarget(a),this._focusedNode=a,this.onDidFocusedNodeChangeEmitter.fire(a.treeItemId)}this.treeModel.dispatchChange()}},this.activeNodeActivedDecoration=a=>{this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(a),this._contextMenuNode=a,this.treeModel.dispatchChange()},this.selectNodeDecoration=(a,b=!0)=>{a!==this.treeModel.root&&(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),a&&(this.selectedNodes.length>0&&this.selectedNodes.forEach(y=>{this.selectedDecoration.removeTarget(y)}),this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(a),this._selectedNodes=[a],this.onDidSelectedNodeChangeEmitter.fire([a.treeItemId]),b&&this.treeModel.dispatchChange()))},this.activeNodeSelectedDecoration=a=>{this._selectedNodes.indexOf(a)>-1||(this._selectedNodes.push(a),this.selectedDecoration.addTarget(a),this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map(b=>b.treeItemId)),this.treeModel.dispatchChange())},this.activeNodeDecorationByRange=(a,b)=>{for(this.clearNodeSelectedDecoration(),this._contextMenuNode=void 0;a<=b;a++){const y=this.treeModel.root.getTreeNodeAtIndex(a);y&&(this._selectedNodes.push(y),this.selectedDecoration.addTarget(y))}this.onDidSelectedNodeChangeEmitter.fire(this._selectedNodes.map(y=>y.treeItemId)),this.treeModel.dispatchChange()},this.enactiveNodeDecoration=()=>{var a;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this.onDidFocusedNodeChangeEmitter.fire(),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(a=this.treeModel)===null||a===void 0||a.dispatchChange()},this.toggleDirectory=async a=>{var b,y;await this.treeHandlerReadyDeffer.promise,a.expanded?await((b=this.extensionTreeHandle)===null||b===void 0?void 0:b.collapseNode(a)):await((y=this.extensionTreeHandle)===null||y===void 0?void 0:y.expandNode(a))},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleTreeFocus=()=>{},this.handleDragStart=(a,b)=>{a.stopPropagation();const y=D=>{this.handleDragEnd(D,b)};a.currentTarget.addEventListener("dragend",y,!1);let A=this.selectedNodes,S=!1;for(const D of A)D&&D.id===b.id&&(S=!0);S||(A=[b]);const w=[],T={id:this.treeViewId,itemHandles:[]};if(A.forEach(D=>{T.itemHandles.push(D.treeItemId),D.uri&&w.push(m.URI.revive(D.uri))}),this.addResourceInfoToTransfer(a,w),this.addExtensionProvidedTransferTypes(a,T.itemHandles),a.dataTransfer.setData(this.treeMimeType,JSON.stringify(T)),A.forEach(D=>{this.draggingDecoration.addTarget(D,c.TargetMatchMode.Self)}),a.dataTransfer){const D=this.getDragLabel(A)||"",I=document.createElement("div");I.className=l.default.tree_view_drag_image,I.textContent=D,document.body.appendChild(I),a.dataTransfer.setDragImage(I,-10,-10),setTimeout(()=>document.body.removeChild(I),0)}},this.handleDragEnter=(a,b)=>{a.stopPropagation(),a.preventDefault()},this.handleDrop=async(a,b)=>{a.preventDefault(),a.stopPropagation(),a.dataTransfer.dropEffect="copy",b&&this.draggingDecoration.removeTarget(b),this.potentialParent&&this.draggedOverDecoration.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(I=>{this.draggingDecoration.removeTarget(I)}),this.beingDraggedNodes=[],this.potentialParent=null,this.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose();const y=this.treeViewDragAndDropController;if(!a.dataTransfer||!y)return;const A=(0,s.toVSDataTransfer)(a.dataTransfer);let S,w;this.treeItemsTransfer.hasData(s.DraggedTreeItemsIdentifier.prototype)&&(w=this.treeItemsTransfer.getData(s.DraggedTreeItemsIdentifier.prototype)[0].identifier);const T=new s.VSDataTransfer;for(const[I,O]of A.entries())if((I===this.treeMimeType||y.dropMimeTypes.includes(I)||O.asFile()&&y.dropMimeTypes.includes(s.DataTransfers.FILES.toLowerCase()))&&(T.append(I,O),I===this.treeMimeType))try{S=JSON.parse(await O.asString())}catch{}const D=await this.treeViewsDragAndDropService.removeDragOperationTransfer(w);if(D)for(const[I,O]of D.entries())T.append(I,O);return y.handleDrop(T,b,m.CancellationToken.None,w,S?.id,S?.itemHandles)},this.handleDragOver=(a,b)=>{if(a.preventDefault(),a.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(b)>=0)return;this.draggedOverNode=b;const y=u.ExtensionCompositeTreeNode.is(b)&&b.expanded?b:b.parent;(this.potentialParent!==y||!this.draggedOverDecoration.hasTarget(y))&&(this.potentialParent&&this.draggedOverDecoration.removeTarget(this.potentialParent),this.potentialParent=y,this.draggedOverDecoration.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren),this.treeModel.dispatchChange()),this.potentialParent!==b&&u.ExtensionCompositeTreeNode.is(b)&&(this.dragOverTrigger.trigger(async()=>{b.expanded?(this.potentialParent&&this.draggedOverDecoration.removeTarget(this.potentialParent),this.potentialParent=b,this.draggedOverDecoration.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren)):(await b.setExpanded(!0),this.draggedOverNode===b&&(this.potentialParent&&this.draggedOverDecoration.removeTarget(this.potentialParent),this.potentialParent=b,this.draggedOverDecoration.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren))),this.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(m.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDragLeave=(a,b)=>{a.preventDefault(),a.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDecoration.removeTarget(this.potentialParent),this.treeModel.dispatchChange())},this.handleDragEnd=(a,b)=>{var y,A;((y=a.dataTransfer)===null||y===void 0?void 0:y.dropEffect)==="none"&&((A=this.dragCancellationToken)===null||A===void 0||A.cancel()),this.draggingDecoration.removeTarget(b),this.potentialParent&&this.draggedOverDecoration.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(S=>{this.draggingDecoration.removeTarget(S)}),this.beingDraggedNodes=[],this.potentialParent=null,this.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.handleItemRangeClick=(a,b)=>{if(!this.focusedNode)this.handleItemClick(a,b);else if(this.focusedNode&&this.focusedNode!==a){this._isMultiSelected=!0;const y=this.treeModel.root.getIndexAtTreeNode(a),A=this.treeModel.root.getIndexAtTreeNode(this.focusedNode);A>y?this.activeNodeDecorationByRange(y,A):A<y&&this.activeNodeDecorationByRange(A,y)}},this.handleItemToggleClick=(a,b)=>{this._isMultiSelected=!0,!(b!==c.TreeNodeType.CompositeTreeNode&&b!==c.TreeNodeType.TreeNode)&&(this.selectedNodes.indexOf(a)>-1?this.focusedNode===a?this.enactiveNodeDecoration():this.activeNodeFocusedDecoration(a):this.activeNodeSelectedDecoration(a))},this.handleItemClick=async(a,b)=>{this._isMultiSelected=!1,(b===c.TreeNodeType.CompositeTreeNode||b===c.TreeNodeType.TreeNode)&&this.activeNodeDecoration(a),a.resolved||await a.resolveTreeItem(),a.command?this.commandService.executeCommand(a.command.id,...a.command.arguments||[]):(this.clickTimes++,b===c.TreeNodeType.CompositeTreeNode&&this.preferenceService.get("workbench.list.openMode")==="singleClick"&&this.toggleDirectory(a),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&b!==c.TreeNodeType.TreeNode&&this.preferenceService.get("workbench.list.openMode")==="doubleClick"&&this.toggleDirectory(a),this.clickTimes=0},200))},this.handleContextMenu=(a,b)=>{a.stopPropagation(),a.preventDefault();const{x:y,y:A}=a.nativeEvent;b?this.activeNodeActivedDecoration(b):this.enactiveNodeDecoration();let S,w;b?(w=b,this._isMultiSelected?this.selectedNodes.indexOf(w)>=0?S=this._isMultiSelected?this.selectedNodes:[w]:S=this._isMultiSelected?this.selectedNodes.concat([w]):[w]:S=[w]):(S=[this.treeModel.root],w=this.treeModel.root);const T=this.getCtxMenuNodes(w.contextValue);this.injector.get(v.ICtxMenuRenderer).show({anchor:{x:y,y:A},menuNodes:T,args:[{treeViewId:this.treeViewId,treeItemId:w.treeItemId},S.map(I=>({treeViewId:this.treeViewId,treeItemId:I.treeItemId}))]})},this.handleCheckBoxChange=async a=>{a&&this.treeViewDataProvider.markAsChecked(a,!a.checkboxInfo.checked,this.treeViewOptions.manageCheckboxStateManually)},this._whenReady=this.initTreeModel(),this.treeMimeType=`application/vnd.code.tree.${this.treeViewId.toLowerCase()}`}get draggable(){return this.treeViewDragAndDropController.hasHandleDrag}get onDidFocusedNodeChange(){return this.onDidFocusedNodeChangeEmitter.event}get onDidChangeExpansionState(){return this.onDidChangeExpansionStateEmitter.event}get onDidSelectedNodeChange(){return this.onDidSelectedNodeChangeEmitter.event}get extensionTreeHandle(){return this._extensionTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}async initTreeModel(){const a=(await this.treeViewDataProvider.resolveChildren())[0];this._treeModel=this.injector.get(h.ExtensionTreeModel,[a]),this.initDecorations(a),this.disposableCollection.push(this.treeViewDataProvider),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,b=>{this.loadingDecoration.addTarget(b)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,b=>{this.loadingDecoration.removeTarget(b)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidChangeExpansionState,(b,y)=>{this.onDidChangeExpansionStateEmitter.fire({treeItemId:b.treeItemId,expanded:y})})),this.disposableCollection.push(this.treeViewDataProvider.onTreeDataChanged(b=>{this.refresh(b)})),this.disposableCollection.push(this.treeViewDataProvider.onRevealChanged(b=>{this.reveal(b)})),this.disposableCollection.push(this.treeViewDataProvider.onRevealChanged(b=>{this.reveal(b)}))}async updateTreeModel(){const a=await this.treeViewDataProvider.resolveChildren()[0];this._treeModel=this.injector.get(h.ExtensionTreeModel,[a])}initDecorations(a){this._decorations=new c.DecorationsManager(a),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration),this._decorations.addDecoration(this.draggedOverDecoration),this._decorations.addDecoration(this.draggingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.draggedOverDecoration),this.decorations.removeDecoration(this.draggingDecoration))}handleTreeHandler(a){this._extensionTreeHandle=a,this.treeHandlerReadyDeffer.resolve()}getDragURI(a){return this.treeViewDragAndDropController.handleDrag?a.uri?m.Uri.revive(a.uri).toString():a.treeItemId:null}getDragLabel(a){if(!this.treeViewDragAndDropController.handleDrag)return;if(a.length>1)return String(a.length);const b=a[0];return b.displayName?b.displayName:b.uri?this.labelService.getName(m.URI.from(b.uri)):void 0}handleDragAndLog(a,b,y,A){return a.handleDrag(b,y,A).then(S=>{if(S){const w=[];for(const T of S.entries())T[0]!==this.treeMimeType&&a.dragMimeTypes.findIndex(D=>D===T[0])<0&&w.push(T[0]);w.length&&this.logger.warn(`Drag and drop controller for tree ${this.treeViewId} adds the following data transfer types but does not declare them in dragMimeTypes: ${w.join(", ")}`)}return S})}addExtensionProvidedTransferTypes(a,b){var y;if(!a.dataTransfer||!this.treeViewDragAndDropController)return;const A=(0,m.uuid)();this.dragCancellationToken=new m.CancellationTokenSource,this.treeViewsDragAndDropService.addDragOperationTransfer(A,this.handleDragAndLog(this.treeViewDragAndDropController,b,A,this.dragCancellationToken.token)),this.treeItemsTransfer.setData([new s.DraggedTreeItemsIdentifier(A)],s.DraggedTreeItemsIdentifier.prototype),this.treeViewDragAndDropController.dragMimeTypes.find(S=>S===m.Mimes.uriList)&&((y=a.dataTransfer)===null||y===void 0||y.setData(s.DataTransfers.RESOURCES,"")),this.treeViewDragAndDropController.dragMimeTypes.forEach(S=>{var w;(w=a.dataTransfer)===null||w===void 0||w.setData(S,"")})}addResourceInfoToTransfer(a,b){if(b.length&&a.dataTransfer){const y=b.filter(A=>A.scheme===m.Schemes.file).map(A=>A.fsPath);y.length&&a.dataTransfer.setData(s.CodeDataTransfers.FILES,JSON.stringify(y))}}getCtxMenuNodes(a){return this.getMenuNodes(a)[1]}getMenuNodes(a){const b=this.contextKeyService.createScoped();b.createKey("view",this.treeViewId),b.createKey("viewItem",a);const y=this.menuService.createMenu(v.MenuId.ViewItemContext,b),A=(0,v.generateCtxMenu)({menus:y,separator:"inline"});return y.dispose(),b.dispose(),A}getInlineMenuNodes(a){return this.getMenuNodes(a)[0]}collapseAll(){this.treeModel.root.collapsedAll()}async refreshById(a){const b=this.treeViewDataProvider.getTreeNodeIdByTreeItemId(a);if(!b)return;const y=this.treeModel.root.getTreeNodeById(b);y&&(u.ExtensionCompositeTreeNode.is(y)?await y.refresh():y.parent&&await y.parent.refresh())}async refresh(a){var b;await this.whenReady,a?await this.refreshById(a.id):await((b=this.treeModel.root)===null||b===void 0?void 0:b.refresh())}async reveal(a,b={}){return await this.whenReady,this.revealDelayer.isTriggered()||this.revealDelayer.cancel(),this.revealDelayer.trigger(async()=>{var y;await this.treeHandlerReadyDeffer.promise,this.treeModel.root.branchSize===0&&await this.refresh();const A=this.treeViewDataProvider.getTreeNodeIdByTreeItemId(a);if(!A)return;const S=this.treeModel.root.getTreeNodeById(A);if(!S)return;const w=(0,m.isUndefinedOrNull)(b.select)?!1:b.select,T=(0,m.isUndefinedOrNull)(b.focus)?!1:b.focus;let D=Math.min((0,m.isNumber)(b.expand)?b.expand:b.expand===!0?1:0,3),I=await((y=this.extensionTreeHandle)===null||y===void 0?void 0:y.ensureVisible(S.path));for(I&&(w&&this.selectNodeDecoration(I),T&&this.activeNodeFocusedDecoration(I,!1,!0));u.ExtensionCompositeTreeNode.is(I)&&D>0;D--)await this.extensionTreeHandle.expandNode(I),I=I?.children?I?.children[0]:void 0})}};t.ExtensionTreeViewModel=E,E.DEFAULT_REVEAL_DELAY=500,E.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(d),r.__metadata("design:type",g.TreeViewDataProvider)],E.prototype,"treeViewDataProvider",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewDragAndDropController),r.__metadata("design:type",g.TreeViewDragAndDropController)],E.prototype,"treeViewDragAndDropController",void 0),r.__decorate([(0,o.Autowired)(p.PreferenceService),r.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewId),r.__metadata("design:type",String)],E.prototype,"treeViewId",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewBaseOptions),r.__metadata("design:type",Object)],E.prototype,"treeViewOptions",void 0),r.__decorate([(0,o.Autowired)(v.AbstractMenuService),r.__metadata("design:type",v.AbstractMenuService)],E.prototype,"menuService",void 0),r.__decorate([(0,o.Autowired)(p.IContextKeyService),r.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),r.__decorate([(0,o.Autowired)(p.CommandService),r.__metadata("design:type",Object)],E.prototype,"commandService",void 0),r.__decorate([(0,o.Autowired)(p.LabelService),r.__metadata("design:type",p.LabelService)],E.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(m.ILogger),r.__metadata("design:type",Object)],E.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(t.ITreeViewsService),r.__metadata("design:type",Object)],E.prototype,"treeViewsDragAndDropService",void 0),t.ExtensionTreeViewModel=E=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],E)},72217:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtensionTreeNode=t.ExtensionCompositeTreeNode=t.ExtensionTreeRoot=void 0;const n=e(97267),r=e(43718);class o extends n.CompositeTreeNode{static is(m){return!!m&&"children"in m&&!m.parent}constructor(m,_=""){super(m,void 0),this.treeViewId=_}get treeItemId(){return`TreeViewRoot_${this.treeViewId}`}get name(){return`TreeViewRoot_${this.id}`}get expanded(){return!0}get displayName(){return this._displayName}dispose(){super.dispose()}}t.ExtensionTreeRoot=o;class c extends n.CompositeTreeNode{constructor(m,_,s,g="",l="",h="",u,d="",E="",f,a,b,y,A){super(m,_,void 0,{name:encodeURIComponent(E)}),this.description=g,this.icon=l,this.contextValue=d,this.treeItemId=E,this.actions=f,this._checkboxInfo=a,this._accessibilityInformation=b,this._resolved=!1,this.isExpanded=y||!1,this.sourceUri=A,this._command=u,this._tooltip=h,(0,r.isString)(s)?this._displayName=s:(0,r.isObject)(s)&&(this._displayName=s.label,this._hightlights=s.highlights,this._strikethrough=s.strikethrough)}get resolved(){return this._resolved}get command(){return this._command}get tooltip(){return this._tooltip}get displayName(){return this._displayName}get checkboxInfo(){return this._checkboxInfo}get accessibilityInformation(){var m,_;return{role:((m=this._accessibilityInformation)===null||m===void 0?void 0:m.role)||"treeitem",label:((_=this._accessibilityInformation)===null||_===void 0?void 0:_.label)||this.displayName}}get strikethrough(){return this._strikethrough}get uri(){return this.sourceUri&&r.Uri.from(this.sourceUri)}get highlights(){return this._hightlights}async resolveTreeItem(){var m;const _=await this._tree.resolveTreeItem(this._tree.treeViewId,this.treeItemId);_&&(this._tooltip=typeof _.tooltip=="string"?_.tooltip:(m=_.tooltip)===null||m===void 0?void 0:m.value,this._command=_.command),this._resolved=!0}dispose(){super.dispose()}}t.ExtensionCompositeTreeNode=c;class p extends n.TreeNode{constructor(m,_,s,g="",l="",h,u,d="",E="",f,a,b,y){super(m,_,void 0,{name:encodeURIComponent(E)}),this.description=g,this.icon=l,this._tooltip=h,this._command=u,this.contextValue=d,this.treeItemId=E,this.actions=f,this._checkboxInfo=a,this._accessibilityInformation=b,this.sourceUri=y,this._resolved=!1,(0,r.isString)(s)?this._displayName=s:(0,r.isObject)(s)&&(this._displayName=s.label,this._hightlights=s.highlights,this._strikethrough=s.strikethrough)}get resolved(){return this._resolved}get command(){return this._command}get uri(){return this.sourceUri&&r.Uri.from(this.sourceUri)}get tooltip(){return this._tooltip}get displayName(){return this._displayName}get checkboxInfo(){return this._checkboxInfo}get accessibilityInformation(){var m,_;return{role:((m=this._accessibilityInformation)===null||m===void 0?void 0:m.role)||"treeitem",label:((_=this._accessibilityInformation)===null||_===void 0?void 0:_.label)||this.displayName}}get strikethrough(){return this._strikethrough}get highlights(){return this._hightlights}async resolveTreeItem(){var m;const _=await this._tree.resolveTreeItem(this._tree.treeViewId,this.treeItemId);_&&(this._tooltip=typeof _.tooltip=="string"?_.tooltip:(m=_.tooltip)===null||m===void 0?void 0:m.value,this._command=_.command),this._resolved=!0}}t.ExtensionTreeNode=p},38894:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowActivityTimer=void 0;const n=e(41869),r=30,o=1e3;class c extends n.Disposable{constructor(v,m=30,_=1e3){super(),this.window=v,this.activityCount=0,this.maxInactivityCount=r,this.inactivityCheckInterval=o,this.isActive=!0,this.activeStateChangedEmitter=new n.Emitter,this.resetInactivityTimer=()=>{this.activityCount=0,this.setActiveState(!0),this.inactivityCheckTimer||this.startInactivityCheck()},this.checkInactivity=()=>{this.activityCount++,this.activityCount>=this.maxInactivityCount&&(this.setActiveState(!1),this.stopInactivityCheck())},this.maxInactivityCount=m,this.inactivityCheckInterval=_,this.setupActivityListeners()}get onDidChangeActiveState(){return this.activeStateChangedEmitter.event}setActiveState(v){this.isActive!==v&&(this.isActive=v,this.activeStateChangedEmitter.fire(v))}setupActivityListeners(){this.window.addEventListener("mousedown",this.resetInactivityTimer,{passive:!0,capture:!0}),this.window.addEventListener("keydown",this.resetInactivityTimer,{passive:!0,capture:!0}),this.window.addEventListener("touchstart",this.resetInactivityTimer,{passive:!0,capture:!0})}startInactivityCheck(){this.stopInactivityCheck(),this.inactivityCheckTimer=setInterval(()=>{this.checkInactivity()},this.inactivityCheckInterval)}stopInactivityCheck(){this.inactivityCheckTimer&&(clearInterval(this.inactivityCheckTimer),this.inactivityCheckTimer=void 0)}dispose(){this.stopInactivityCheck(),this.activeStateChangedEmitter.dispose(),super.dispose(),this.window.removeEventListener("mousedown",this.resetInactivityTimer,{passive:!0,capture:!0}),this.window.removeEventListener("keydown",this.resetInactivityTimer,{passive:!0,capture:!0}),this.window.removeEventListener("touchstart",this.resetInactivityTimer,{passive:!0,capture:!0})}}t.WindowActivityTimer=c},72980:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SETTINGS_COMMAND_OPEN_SETTINGS_JSON=t.SETTINGS_COMMAND_OPEN_GLOBAL_SETTINGS=t.SETTINGS_COMMAND_OPEN_SETTINGS=t.COPY_RELATIVE_FILE_PATH=t.COPY_FILE_PATH=t.CLEAR_TERMINAL=t.STOP_EXTENSION_HOST_PROFILER=t.START_EXTENSION_HOST_PROFILER=t.SHOW_RUN_TIME_EXTENSION=t.RELOAD_WINDOW=t.RELOAD_WINDOW_COMMAND=t.API_OPEN_WITH_EDITOR_COMMAND_ID=t.API_OPEN_DIFF_EDITOR_COMMAND_ID=t.OPEN_WITH=t.DIFF=t.OPEN_FOLDER=t.API_OPEN_EDITOR_COMMAND_ID=t.OPEN=t.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP=t.FILE_COMMAND_RENAME_FILE=t.WORKBENCH_FOCUS_FILES_EXPLORER=t.NEW_WORKBENCH_VIEW_TERMINAL=t.TERMINAL_COMMAND_TOGGLE_VISIBILITY=t.TERMINAL_COMMAND_FOCUS=t.REVERT_FILES=t.OPEN_EDITOR_AT_INDEX=t.CLOSE_UNMODIFIED_EDITORS=t.CLOSE_OTHER_GROUPS=t.EVEN_EDITOR_WIDTH=t.LAST_EDITOR_IN_GROUP=t.NEXT_EDITOR_IN_GROUP=t.PREVIOUS_EDITOR_IN_GROUP=t.PREVIOUS_EDITOR=t.NEXT_EDITOR=t.NAVIGATE_NEXT=t.NAVIGATE_DOWN=t.NAVIGATE_RIGHT=t.NAVIGATE_UP=t.NAVIGATE_LEFT=t.SPLIT_EDITOR_ORTHOGONAL=t.SPLIT_EDITOR=t.FILE_SAVE=t.CLOSE_OTHER_EDITORS=t.CLOSE_ALL_EDITORS=t.NEW_UNTITLED_FILE=t.SPLIT_EDITOR_DOWN=t.SPLIT_EDITOR_RIGHT=t.REVERT_AND_CLOSE_ACTIVE_EDITOR=t.WORKBENCH_CLOSE_ACTIVE_EDITOR=t.SET_CONTEXT=void 0,t.DEBUG_ADD=t.DEBUG_START=t.OPEN_MERGEEDITOR=t.WALKTHROUGHS_COMMAND_GET_STARTED=t.LAYOUT_COMMAND_MAXIMIZE_EDITOR=t.THEME_COMMAND_QUICK_SELECT=t.SEARCH_COMMAND_OPEN_SEARCH=t.SIDEBAR_TOGGLE_VISIBILITY=t.MARKER_COMMAND_TOGGLE_SHOW_ERRORS_WARNINGS=t.MARKER_COMMAND_SHOW_ERRORS_WARNINGS=t.GET_EXTENSION=t.REVEAL_IN_EXPLORER=t.EDITOR_SHOW_ALL_SYMBOLS=t.DEBUG_COMMAND_STOP=t.DEBUG_COMMAND_RESTART=t.DEBUG_COMMAND_PAUSE=t.DEBUG_COMMAND_START=t.DEBUG_COMMAND_RUN=t.DEBUG_COMMAND_CONTINUE=t.DEBUG_COMMAND_STEP_OUT=t.DEBUG_COMMAND_STEP_OVER=t.DEBUG_COMMAND_STEP_INTO=t.EDITOR_SAVE_ALL=t.EDITOR_NAVIGATE_FORWARD=t.EDITOR_NAVIGATE_BACK=t.SETTINGS_COMMAND_OPEN_GLOBAL_OPEN_KEYMAPS=void 0;const n=e(41869),r=e(66482),o=e(12456);t.SET_CONTEXT={id:"setContext"},t.WORKBENCH_CLOSE_ACTIVE_EDITOR={id:"workbench.action.closeActiveEditor",delegate:n.EDITOR_COMMANDS.CLOSE.id},t.REVERT_AND_CLOSE_ACTIVE_EDITOR={id:"workbench.action.revertAndCloseActiveEditor",delegate:n.EDITOR_COMMANDS.REVERT_AND_CLOSE.id},t.SPLIT_EDITOR_RIGHT={id:"workbench.action.splitEditorRight",delegate:n.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id},t.SPLIT_EDITOR_DOWN={id:"workbench.action.splitEditorDown",delegate:n.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id},t.NEW_UNTITLED_FILE={id:"workbench.action.files.newUntitledFile",delegate:n.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id},t.CLOSE_ALL_EDITORS={id:"workbench.action.closeAllEditors",delegate:n.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id},t.CLOSE_OTHER_EDITORS={id:"workbench.action.closeOtherEditors",delegate:n.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP.id},t.FILE_SAVE={id:"workbench.action.files.save",delegate:n.EDITOR_COMMANDS.SAVE_CURRENT.id},t.SPLIT_EDITOR={id:"workbench.action.splitEditor",delegate:n.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id},t.SPLIT_EDITOR_ORTHOGONAL={id:"workbench.action.splitEditorOrthogonal",delegate:n.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id},t.NAVIGATE_LEFT={id:"workbench.action.navigateLeft",delegate:n.EDITOR_COMMANDS.NAVIGATE_LEFT.id},t.NAVIGATE_UP={id:"workbench.action.navigateUp",delegate:n.EDITOR_COMMANDS.NAVIGATE_UP.id},t.NAVIGATE_RIGHT={id:"workbench.action.navigateRight",delegate:n.EDITOR_COMMANDS.NAVIGATE_RIGHT.id},t.NAVIGATE_DOWN={id:"workbench.action.navigateDown",delegate:n.EDITOR_COMMANDS.NAVIGATE_DOWN.id},t.NAVIGATE_NEXT={id:"workbench.action.navigateEditorGroups",delegate:n.EDITOR_COMMANDS.NAVIGATE_NEXT.id},t.NEXT_EDITOR={id:"workbench.action.nextEditor",delegate:n.EDITOR_COMMANDS.NEXT.id},t.PREVIOUS_EDITOR={id:"workbench.action.previousEditor",delegate:n.EDITOR_COMMANDS.PREVIOUS.id},t.PREVIOUS_EDITOR_IN_GROUP={id:"workbench.action.previousEditorInGroup",delegate:n.EDITOR_COMMANDS.PREVIOUS_IN_GROUP.id},t.NEXT_EDITOR_IN_GROUP={id:"workbench.action.nextEditorInGroup",delegate:n.EDITOR_COMMANDS.NEXT_IN_GROUP.id},t.LAST_EDITOR_IN_GROUP={id:"workbench.action.lastEditorInGroup",delegate:n.EDITOR_COMMANDS.LAST_IN_GROUP.id},t.EVEN_EDITOR_WIDTH={id:"workbench.action.eventEditorWidths",delegate:n.EDITOR_COMMANDS.EVEN_EDITOR_GROUPS.id},t.CLOSE_OTHER_GROUPS={id:"workbench.action.closeEditorsInOtherGroups",delegate:n.EDITOR_COMMANDS.CLOSE_OTHER_GROUPS.id},t.CLOSE_UNMODIFIED_EDITORS={id:"workbench.action.closeUnmodifiedEditors",delegate:n.EDITOR_COMMANDS.CLOSE_SAVED.id},t.OPEN_EDITOR_AT_INDEX={id:"workbench.action.openEditorAtIndex",delegate:n.EDITOR_COMMANDS.OPEN_EDITOR_AT_INDEX.id},t.REVERT_FILES={id:"workbench.action.files.revert",delegate:n.EDITOR_COMMANDS.REVERT_DOCUMENT.id},t.TERMINAL_COMMAND_FOCUS={id:"workbench.action.terminal.focus",delegate:"workbench.view.terminal"},t.TERMINAL_COMMAND_TOGGLE_VISIBILITY={id:"workbench.action.terminal.toggleTerminal",delegate:"container.toggle.terminal"},t.NEW_WORKBENCH_VIEW_TERMINAL={id:"workbench.action.terminal.new",delegate:n.TERMINAL_COMMANDS.ADD.id},t.WORKBENCH_FOCUS_FILES_EXPLORER={id:"workbench.files.action.focusFilesExplorer",delegate:n.FILE_COMMANDS.FOCUS_FILES.id},t.FILE_COMMAND_RENAME_FILE={id:"renameFile",delegate:n.FILE_COMMANDS.RENAME_FILE.id},t.WORKBENCH_FOCUS_ACTIVE_EDITOR_GROUP={id:"workbench.action.focusActiveEditorGroup",delegate:n.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP.id},t.OPEN={id:"vscode.open"},t.API_OPEN_EDITOR_COMMAND_ID={id:n.EDITOR_COMMANDS.API_OPEN_EDITOR_COMMAND_ID,delegate:t.OPEN.id},t.OPEN_FOLDER={id:"vscode.openFolder",delegate:n.FILE_COMMANDS.VSCODE_OPEN_FOLDER.id},t.DIFF={id:"vscode.diff"},t.OPEN_WITH={id:"vscode.openWith"},t.API_OPEN_DIFF_EDITOR_COMMAND_ID={id:n.EDITOR_COMMANDS.API_OPEN_DIFF_EDITOR_COMMAND_ID,delegate:t.DIFF.id},t.API_OPEN_WITH_EDITOR_COMMAND_ID={id:n.EDITOR_COMMANDS.API_OPEN_WITH_EDITOR_COMMAND_ID,delegate:t.OPEN_WITH.id},t.RELOAD_WINDOW_COMMAND={id:"reload_window"},t.RELOAD_WINDOW={id:"workbench.action.reloadWindow",delegate:t.RELOAD_WINDOW_COMMAND.id},t.SHOW_RUN_TIME_EXTENSION={id:"workbench.action.showRuntimeExtensions",label:"Show Running Extensions"},t.START_EXTENSION_HOST_PROFILER={id:"workbench.action.extensionHostProfiler.start",label:"Start Extension Host Profile"},t.STOP_EXTENSION_HOST_PROFILER={id:"workbench.action.extensionHostProfiler.stop",label:"Stop Extension Host Profile"},t.CLEAR_TERMINAL={id:"workbench.action.terminal.clear",delegate:n.TERMINAL_COMMANDS.CLEAR_CONTENT.id},t.COPY_FILE_PATH={id:"copyFilePath",label:n.FILE_COMMANDS.COPY_PATH.label},t.COPY_RELATIVE_FILE_PATH={id:"copyRelativeFilePath",label:n.FILE_COMMANDS.COPY_RELATIVE_PATH.label},t.SETTINGS_COMMAND_OPEN_SETTINGS={id:"workbench.action.openSettings",delegate:"core.openpreference"},t.SETTINGS_COMMAND_OPEN_GLOBAL_SETTINGS={id:"workbench.action.openGlobalSettings",delegate:n.COMMON_COMMANDS.OPEN_PREFERENCES.id},t.SETTINGS_COMMAND_OPEN_SETTINGS_JSON={id:"workbench.action.openSettingsJson",delegate:"preference.open.source"},t.SETTINGS_COMMAND_OPEN_GLOBAL_OPEN_KEYMAPS={id:"workbench.action.openGlobalKeybindings",delegate:n.COMMON_COMMANDS.OPEN_KEYMAPS.id},t.EDITOR_NAVIGATE_BACK={id:"workbench.action.navigateBack",delegate:n.EDITOR_COMMANDS.GO_BACK.id},t.EDITOR_NAVIGATE_FORWARD={id:"workbench.action.navigateForward",delegate:n.EDITOR_COMMANDS.GO_FORWARD.id},t.EDITOR_SAVE_ALL={id:"workbench.action.files.saveAll",delegate:n.EDITOR_COMMANDS.SAVE_ALL.id},t.DEBUG_COMMAND_STEP_INTO={id:"workbench.action.debug.stepInto",delegate:r.DEBUG_COMMANDS.NEXT.id},t.DEBUG_COMMAND_STEP_OVER={id:"workbench.action.debug.stepOver",delegate:r.DEBUG_COMMANDS.OVER.id},t.DEBUG_COMMAND_STEP_OUT={id:"workbench.action.debug.stepOut",delegate:r.DEBUG_COMMANDS.PREV.id},t.DEBUG_COMMAND_CONTINUE={id:"workbench.action.debug.continue",delegate:r.DEBUG_COMMANDS.CONTINUE.id},t.DEBUG_COMMAND_RUN={id:"workbench.action.debug.run",delegate:r.DEBUG_COMMANDS.START.id},t.DEBUG_COMMAND_START={id:"workbench.action.debug.start",delegate:r.DEBUG_COMMANDS.START.id},t.DEBUG_COMMAND_PAUSE={id:"workbench.action.debug.pause",delegate:r.DEBUG_COMMANDS.PAUSE.id},t.DEBUG_COMMAND_RESTART={id:"workbench.action.debug.restart",delegate:r.DEBUG_COMMANDS.RESTART.id},t.DEBUG_COMMAND_STOP={id:"workbench.action.debug.stop",delegate:r.DEBUG_COMMANDS.STOP.id},t.EDITOR_SHOW_ALL_SYMBOLS={id:"workbench.action.showAllSymbols",delegate:n.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id},t.REVEAL_IN_EXPLORER={id:"revealInExplorer",delegate:n.FILE_COMMANDS.REVEAL_IN_EXPLORER.id},t.GET_EXTENSION={id:"extension.getDescription"},t.MARKER_COMMAND_SHOW_ERRORS_WARNINGS={id:"workbench.action.showErrorsWarnings",delegate:n.MARKER_COMMANDS.SHOW_ERRORS_WARNINGS.id},t.MARKER_COMMAND_TOGGLE_SHOW_ERRORS_WARNINGS={id:"workbench.actions.view.problems",delegate:n.MARKER_COMMANDS.TOGGLE_SHOW_ERRORS_WARNINGS.id},t.SIDEBAR_TOGGLE_VISIBILITY={id:"workbench.action.toggleSidebarVisibility",delegate:n.LAYOUT_COMMANDS.TOGGLE_SIDEBAR_VISIBILITY.id},t.SEARCH_COMMAND_OPEN_SEARCH={id:"workbench.action.findInFiles",delegate:n.SEARCH_COMMANDS.OPEN_SEARCH.id},t.THEME_COMMAND_QUICK_SELECT={id:"workbench.action.selectTheme",delegate:o.THEME_TOGGLE_COMMAND.id},t.LAYOUT_COMMAND_MAXIMIZE_EDITOR={id:"workbench.action.maximizeEditor",delegate:n.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},t.WALKTHROUGHS_COMMAND_GET_STARTED={id:"walkthroughs.get.started"},t.OPEN_MERGEEDITOR={id:"_open.mergeEditor",delegate:n.EDITOR_COMMANDS.OPEN_MERGEEDITOR.id,label:"Open Merge Editor"},t.DEBUG_START={id:"workbench.action.debug.selectandstart",delegate:"debug.start"},t.DEBUG_ADD={id:"debug.addConfiguration",delegate:"debug.showAllAutomaticDebugConfigurations"}},3098:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(77666),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){const _=this;for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=[];for(const u of l){const{title:d,description:E}=u;switch(u.type){case"action":h.push({title:d,description:E,iconClass:(0,o.getIcon)(u.icon),click:()=>{u.command&&_.commandService.executeCommand(u.command)},type:u.type});break;case"enum":h.push({type:u.type,title:d,description:E,select:f=>{u.command&&_.commandService.executeCommand(u.command,f)},enum:u.enum,defaultValue:u.defaultValue});break}}this.addDispose(this.toolbarActionService.registryActionGroup(g,h))}}dispose(){super.dispose()}};t.ActionsContributionPoint=v,n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(c.IToolbarActionService),n.__metadata("design:type",Object)],v.prototype,"toolbarActionService",void 0),t.ActionsContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("actions"),(0,p.LifeCycle)(3)],v)},57541:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreakpointsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(37499),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){for(const m of this.contributesMap){const{contributes:_}=m;_.forEach(s=>{this.debugConfigurationManager.addSupportBreakpoints(s.language)})}}unregister(m){m.forEach(_=>{this.debugConfigurationManager.removeSupportBreakpoints(_.language)})}dispose(){for(const m of this.contributesMap){const{contributes:_}=m;this.unregister(_)}}};t.BreakpointsContributionPoint=p,n.__decorate([(0,r.Autowired)(o.DebugConfigurationManager),n.__metadata("design:type",o.DebugConfigurationManager)],p.prototype,"debugConfigurationManager",void 0),t.BreakpointsContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("breakpoints"),(0,c.LifeCycle)(3)],p)},37614:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(52416),p=e(99220),v="^\\w+[.\\w+]*$";let m=class extends p.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{contributes:g}=s;for(const l of g)l&&l.description&&(l.description=(0,o.replaceLocalizePlaceholder)(l.description)),this.themeService.registerColor(l)}}};t.ColorsContributionPoint=m,m.schema={description:(0,o.localize)("contributes.color","Contributes extension defined themable colors"),type:"array",items:{type:"object",properties:{id:{type:"string",description:(0,o.localize)("contributes.color.id","The identifier of the themable color"),pattern:v,patternErrorMessage:(0,o.localize)("contributes.color.id.format","Identifiers should be in the form aa[.bb]*")},description:{type:"string",description:(0,o.localize)("contributes.color.description","The description of the themable color")},defaults:{type:"object",properties:{light:{description:(0,o.localize)("contributes.defaults.light","The default color for light themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default."),type:"string",anyOf:[{type:"string",format:"color-hex"}]},dark:{description:(0,o.localize)("contributes.defaults.dark","The default color for dark themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default."),type:"string",anyOf:[{type:"string",format:"color-hex"}]},highContrast:{description:(0,o.localize)("contributes.defaults.highContrast","The default color for high contrast dark themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default. If not provided, the `dark` color is used as default for high contrast dark themes."),type:"string",anyOf:[{type:"string",format:"color-hex"}]},highContrastLight:{description:(0,o.localize)("contributes.defaults.highContrastLight","The default color for high contrast light themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default. If not provided, the `light` color is used as default for high contrast light themes."),type:"string",anyOf:[{type:"string",format:"color-hex"}]}}}}}},n.__decorate([(0,r.Autowired)(c.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),t.ColorsContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("colors"),(0,p.LifeCycle)(4)],m)},8079:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommandsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(52416),p=e(99220),v=e(71354);let m=class extends p.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=this.extensionManageService.getExtensionInstanceByExtId(g);h&&l.forEach(u=>{this.addDispose(this.commandRegistry.registerCommand({category:this.getLocalizeFromNlsJSON(u.category,g),label:this.getLocalizeFromNlsJSON(u.title,g),shortLabel:u.shortTitle?this.getLocalizeFromNlsJSON(u.shortTitle,g):void 0,categoryLocalized:this.createLocalizedStr(u.category,g),labelLocalized:this.createLocalizedStr(u.title,g),shortLabelLocalized:u.shortTitle?this.createLocalizedStr(u.shortTitle,g):void 0,id:u.command,iconClass:typeof u.icon=="string"&&this.iconService.fromString(u.icon)||this.iconService.fromIcon(h.path,u.icon,c.IconType.Background),enablement:u.enablement},{execute:(...d)=>this.extensionService.executeExtensionCommand(u.command,d)})),this.config.noExtHost?this.addDispose(this.extensionCommandManager.registerExtensionCommandEnv(u.command,"worker")):this.addDispose(this.extensionCommandManager.registerExtensionCommandEnv(u.command,"node"))})}}};t.CommandsContributionPoint=m,n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],m.prototype,"commandRegistry",void 0),n.__decorate([(0,r.Autowired)(p.ExtensionService),n.__metadata("design:type",p.ExtensionService)],m.prototype,"extensionService",void 0),n.__decorate([(0,r.Autowired)(p.IExtCommandManagement),n.__metadata("design:type",p.IExtCommandManagement)],m.prototype,"extensionCommandManager",void 0),n.__decorate([(0,r.Autowired)(c.IIconService),n.__metadata("design:type",Object)],m.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],m.prototype,"config",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],m.prototype,"extensionManageService",void 0),t.CommandsContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("commands"),(0,p.LifeCycle)(3)],m)},6143:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(99220),v=e(71354),m=e(25588);let _=class extends p.VSCodeContributePoint{async contribute(){if(this.localizationsContributionPoint.hasUncontributedPoint())try{await this.localizationsContributionPoint.whenContributed}catch(g){this.logger.error("Failed to wait contribute localizations.",g)}for(const g of this.contributesMap){const{extensionId:l,contributes:h}=g,u=this.extensionManageService.getExtensionInstanceByExtId(l);if(!u)continue;let d=h;Array.isArray(d)||(d=[d]);const E=[];for(const f of d)if(f&&f.properties){const a={};for(const b of Object.keys(f.properties)){const y=f.properties[b];a[b]=y,y.description&&(a[b].description=this.getLocalizeFromNlsJSON(y.description,l)),y.enumDescriptions&&(a[b].enumDescriptions=y.enumDescriptions.map(A=>this.getLocalizeFromNlsJSON(A,l))),y.markdownDescription&&(a[b].markdownDescription=this.getLocalizeFromNlsJSON(y.markdownDescription,l))}f.properties=a,f.title=this.getLocalizeFromNlsJSON(f.title,l)||f.title,this.updateConfigurationSchema(f),E.push({title:f.title,extensionId:l,preferences:Object.keys(f.properties).map(b=>({id:b}))})}if(E.length===1){const f=E[0];this.addDispose(this.preferenceSettingsService.registerSettingSection("extension",f))}else E.length>1&&this.addDispose(this.preferenceSettingsService.registerSettingSection("extension",{title:this.getLocalizeFromNlsJSON(u.packageJSON.displayName,l)||u.packageJSON.displayName,subSections:E}))}}updateConfigurationSchema(g){this.validateConfigurationSchema(g),this.addDispose(this.preferenceSchemaProvider.setSchema(g))}validateConfigurationSchema(g){for(const l in g.properties){const h=g.properties[l];if(h.type==="string[]"&&(h.type="array"),h.type!=="object")continue;typeof h.default>"u"&&this.validateDefaultValue(h);const u=h.properties;if(u)for(const d in u)typeof u[d]!="object"&&delete u[d]}}validateDefaultValue(g){g.default={};const l=g.properties;if(l)for(const h in l)l[h].default&&(g.default[h]=l[h].default,delete l[h].default)}};t.ConfigurationContributionPoint=_,n.__decorate([(0,r.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],_.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,r.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],_.prototype,"preferenceSettingsService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],_.prototype,"extensionManageService",void 0),n.__decorate([(0,r.Autowired)(m.LocalizationsContributionPoint),n.__metadata("design:type",m.LocalizationsContributionPoint)],_.prototype,"localizationsContributionPoint",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],_.prototype,"logger",void 0),t.ConfigurationContributionPoint=_=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("configuration"),(0,p.LifeCycle)(2)],_)},4653:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationDefaultsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(99220);let p=class extends c.VSCodeContributePoint{contribute(){for(const m of this.contributesMap){const{contributes:_}=m;_&&this.updateDefaultOverridesSchema(_)}}updateDefaultOverridesSchema(m){for(const _ in m){const s=m[_];if(o.OVERRIDE_PROPERTY_PATTERN.test(_)){const g=_.match(o.OVERRIDE_PROPERTY_PATTERN)[1];Object.keys(s).forEach(l=>{this.defaultPreferenceProvider.setPreference(l,s[l],void 0,g)})}}}};t.ConfigurationDefaultsContributionPoint=p,n.__decorate([(0,r.Autowired)(o.PreferenceProvider,{tag:o.PreferenceScope.Default}),n.__metadata("design:type",o.PreferenceProvider)],p.prototype,"defaultPreferenceProvider",void 0),t.ConfigurationDefaultsContributionPoint=p=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("configurationDefaults"),(0,c.LifeCycle)(3)],p)},21086:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomEditorContributionPoint=void 0,t.createCustomEditorComponent=u;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),c=e(41869),p=e(43718),v=e(57517),m=e(65046),_=e(50234),s=e(99220),g=e(35912),l=e(71354);let h=class extends s.VSCodeContributePoint{constructor(){super(...arguments),this.options=new Map}contribute(){for(const E of this.contributesMap){const{extensionId:f,contributes:a}=E;a.forEach(b=>{this.registerSingleCustomEditor(b,f)}),this.addDispose(this.eventBus.on(g.CustomEditorOptionChangeEvent,b=>{this.options.has(b.payload.viewType)&&this.options.set(b.payload.viewType,b.payload.options)}))}}getOptions(E){return this.options.get(E)||{}}registerSingleCustomEditor(E,f){try{const a=E.viewType;this.options.set(E.viewType,{});const b=`${p.CUSTOM_EDITOR_SCHEME}-${E.viewType}`,y=u(E.viewType,b,()=>this.getOptions(E.viewType)),A=E.selector.map(w=>w.filenamePattern).filter(w=>typeof w=="string");if(A.length===0)return;const S=E.priority||v.IEditorPriority.default;this.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(()=>10,(w,T)=>{for(const D of A)((0,p.match)(D,w.uri.path.toString().toLowerCase())||(0,p.match)(D,w.uri.path.base.toLowerCase()))&&T.push({componentId:b,type:v.EditorOpenType.component,title:E.displayName?this.getLocalizeFromNlsJSON(E.displayName,f):E.viewType,weight:S===v.IEditorPriority.default?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,priority:S,saveResource:I=>this.eventBus.fireAndAwait(new g.CustomEditorShouldSaveEvent({uri:I.uri,viewType:a,cancellationToken:new p.CancellationTokenSource().token})),revertResource:I=>this.eventBus.fireAndAwait(new g.CustomEditorShouldRevertEvent({uri:I.uri,viewType:a,cancellationToken:new p.CancellationTokenSource().token})),undo:I=>this.eventBus.fireAndAwait(new g.CustomEditorShouldEditEvent({uri:I.uri,viewType:a,type:"undo"})),redo:I=>this.eventBus.fireAndAwait(new g.CustomEditorShouldEditEvent({uri:I.uri,viewType:a,type:"redo"}))})})),this.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:b,component:y,metadata:{customEditor:a}}))}catch(a){this.logger.error(a)}}};t.CustomEditorContributionPoint=h,n.__decorate([(0,o.Autowired)(v.EditorComponentRegistry),n.__metadata("design:type",v.EditorComponentRegistry)],h.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,o.Autowired)(p.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),t.CustomEditorContributionPoint=h=n.__decorate([(0,o.Injectable)(),(0,s.Contributes)("customEditors"),(0,s.LifeCycle)(2)],h);function u(d,E,f){return({resource:a})=>{const b=(0,c.useInjectable)(l.IActivationEventService),y=(0,c.useInjectable)(m.IWebviewService),A=(0,c.useInjectable)(c.IEventBus),S=(0,c.useInjectable)(s.ExtensionService);let w=null;return r.default.useEffect(()=>{const T=new p.CancellationTokenSource,D=new p.Disposable;return Promise.all([b.fireEvent("onCustomEditor",d),S.eagerExtensionsActivated.promise]).then(()=>{if(T.token.isCancellationRequested)return;const I=y.createWebview(f().webviewOptions);if(I&&w){const O=new _.WebviewMounter(I,w,document.getElementById("workbench-editor"),document.getElementById("workbench-editor"));I.onRemove(()=>{O.dispose()}),D.addDispose({dispose:()=>{I.remove(),I.dispose(),A.fire(new g.CustomEditorShouldHideEvent({uri:a.uri,viewType:d}))}}),A.fire(new g.CustomEditorShouldDisplayEvent({uri:a.uri,viewType:d,webviewPanelId:I.id,cancellationToken:T.token,openTypeId:E}))}}),()=>{D.dispose(),T.cancel()}},[]),r.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"editor-webview-webview-component",ref:T=>w=T})}}},61361:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggersContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(66482),v=e(37499),m=e(69946),_=e(99220),s=e(71354),{deepClone:g}=c.objects,l={enum:["neverOpen","openOnSessionStart","openOnFirstSessionStart"],default:"openOnFirstSessionStart",description:(0,c.localize)("preference.debug.internalConsoleOptions")};let h=class extends _.VSCodeContributePoint{contribute(){for(const d of this.contributesMap){const{extensionId:E,contributes:f}=d,a=this.extensionManageService.getExtensionInstanceByExtId(E);a&&this.debugService.registerDebugContributionPoints(a.path,this.resolveDebuggers(f,a))}this.debugSchemaManager.update()}resolveDebuggers(d,E){return d.map(f=>{const a=this.doResolveDebuggers(f,E);return this.debugConfigurationManager.registerDebugger(a),a})}doResolveDebuggers(d,E){const f={type:d.type,label:d.label?(0,o.replaceLocalizePlaceholder)(d.label,E.id):"",languages:d.languages,enableBreakpointsFor:d.enableBreakpointsFor,variables:d.variables,adapterExecutableCommand:d.adapterExecutableCommand,configurationSnippets:(d.configurationSnippets||[]).map(a=>(a.label&&(a.label=(0,o.replaceLocalizePlaceholder)(a.label,E.id)),a.description&&(a.description=(0,o.replaceLocalizePlaceholder)(a.description,E.id)),a.markdownDescription&&(a.markdownDescription=(0,o.replaceLocalizePlaceholder)(a.markdownDescription,E.id)),a)),win:d.win,winx86:d.winx86,windows:d.windows,osx:d.osx,linux:d.linux,program:d.program,args:d.args,runtime:d.runtime,runtimeArgs:d.runtimeArgs};return f.configurationAttributes=d.configurationAttributes&&this.resolveSchemaAttributes(d.type,d.configurationAttributes,E),f}resolveSchemaAttributes(d,E,f){const a={},b=y=>{Object.keys(y).forEach(A=>{y[A].properties&&b(y[A].properties),typeof y[A]=="object"&&(y[A].description=(0,o.replaceLocalizePlaceholder)(y[A].description,f.id),y[A].markdownDescription=(0,o.replaceLocalizePlaceholder)(y[A].markdownDescription,f.id))})};return Object.keys(E).map(y=>{const A=g(E[y]),S=["name","type","request"];A.required=A.required&&A.required.length?S.concat(A.required):S,A.additionalProperties=!1,A.type="object",A.properties||(A.properties={});const w=A.properties;w.type={enum:[d],description:(0,c.localize)("debug.launch.configurations.debugType"),pattern:"^(?!node2)",errorMessage:(0,c.localize)("debug.launch.configurations.debugTypeNotRecognised"),patternErrorMessage:(0,c.localize)("debug.launch.configurations.node2NotSupported")},w.name={type:"string",description:(0,c.localize)("debug.launch.configurations.debugName"),default:"Launch"},w.request={enum:[y],description:(0,c.localize)("debug.launch.configurations.debugRequest")},w.debugServer={type:"number",description:(0,c.localize)("debug.launch.configurations.debugServer"),default:4711},w.preLaunchTask={anyOf:[a,{type:["string","null"]}],default:"",description:(0,c.localize)("debug.launch.configurations.debugPrelaunchTask")},w.postDebugTask={anyOf:[a,{type:["string","null"]}],default:"",description:(0,c.localize)("debug.launch.configurations.debugPostDebugTask")},w.internalConsoleOptions=l;const T=Object.assign({},w);return w.windows={type:"object",description:(0,c.localize)("debug.launch.configurations.debugWindowsConfiguration"),properties:T},w.osx={type:"object",description:(0,c.localize)("debug.launch.configurations.debugOSXConfiguration"),properties:T},w.linux={type:"object",description:(0,c.localize)("debug.launch.configurations.debugLinuxConfiguration"),properties:T},Object.keys(A.properties).forEach(D=>{A.properties[D].pattern=A.properties[D].pattern||"^(?!.*\\$\\{(env|config|command)\\.)",A.properties[D].patternErrorMessage=A.properties[D].patternErrorMessage||(0,c.localize)("deprecatedVariables","'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead.")}),b(A.properties),A})}dispose(){for(const d of this.contributesMap){const{extensionId:E}=d,f=this.extensionManageService.getExtensionInstanceByExtId(E);f&&this.debugService.unregisterDebugContributionPoints(f.path)}}};t.DebuggersContributionPoint=h,h.schema={description:(0,c.localize)("vscode.extension.contributes.debuggers","Contributes debug adapters."),type:"array",defaultSnippets:[{body:[{type:""}]}],items:{additionalProperties:!1,type:"object",defaultSnippets:[{body:{type:"",program:"",runtime:""}}],properties:{type:{description:(0,c.localize)("vscode.extension.contributes.debuggers.type","Unique identifier for this debug adapter."),type:"string"},label:{description:(0,c.localize)("vscode.extension.contributes.debuggers.label","Display name for this debug adapter."),type:"string"},program:{description:(0,c.localize)("vscode.extension.contributes.debuggers.program","Path to the debug adapter program. Path is either absolute or relative to the extension folder."),type:"string"},args:{description:(0,c.localize)("vscode.extension.contributes.debuggers.args","Optional arguments to pass to the adapter."),type:"array"},runtime:{description:(0,c.localize)("vscode.extension.contributes.debuggers.runtime","Optional runtime in case the program attribute is not an executable but requires a runtime."),type:"string"},runtimeArgs:{description:(0,c.localize)("vscode.extension.contributes.debuggers.runtimeArgs","Optional runtime arguments."),type:"array"},variables:{description:(0,c.localize)("vscode.extension.contributes.debuggers.variables","Mapping from interactive variables (e.g. ${action.pickProcess}) in `launch.json` to a command."),type:"object"},initialConfigurations:{description:(0,c.localize)("vscode.extension.contributes.debuggers.initialConfigurations","Configurations for generating the initial 'launch.json'."),type:["array","string"]},languages:{description:(0,c.localize)("vscode.extension.contributes.debuggers.languages",'List of languages for which the debug extension could be considered the "default debugger".'),type:"array"},configurationSnippets:{description:(0,c.localize)("vscode.extension.contributes.debuggers.configurationSnippets","Snippets for adding new configurations in 'launch.json'."),type:"array"},configurationAttributes:{description:(0,c.localize)("vscode.extension.contributes.debuggers.configurationAttributes","JSON schema configurations for validating 'launch.json'."),type:"object"},when:{description:(0,c.localize)("vscode.extension.contributes.debuggers.when","Condition which must be true to enable this type of debugger. Consider using 'shellExecutionSupported', 'virtualWorkspace', 'resourceScheme' or an extension-defined context key as appropriate for this."),type:"string",default:""},windows:{description:(0,c.localize)("vscode.extension.contributes.debuggers.windows","Windows specific settings."),type:"object",properties:{runtime:{description:(0,c.localize)("vscode.extension.contributes.debuggers.windows.runtime","Runtime used for Windows."),type:"string"}}},osx:{description:(0,c.localize)("vscode.extension.contributes.debuggers.osx","macOS specific settings."),type:"object",properties:{runtime:{description:(0,c.localize)("vscode.extension.contributes.debuggers.osx.runtime","Runtime used for macOS."),type:"string"}}},linux:{description:(0,c.localize)("vscode.extension.contributes.debuggers.linux","Linux specific settings."),type:"object",properties:{runtime:{description:(0,c.localize)("vscode.extension.contributes.debuggers.linux.runtime","Runtime used for Linux."),type:"string"}}}}}},n.__decorate([(0,r.Autowired)(p.IDebugService),n.__metadata("design:type",Object)],h.prototype,"debugService",void 0),n.__decorate([(0,r.Autowired)(v.DebugConfigurationManager),n.__metadata("design:type",v.DebugConfigurationManager)],h.prototype,"debugConfigurationManager",void 0),n.__decorate([(0,r.Autowired)(m.DebugSchemaManager),n.__metadata("design:type",m.DebugSchemaManager)],h.prototype,"debugSchemaManager",void 0),n.__decorate([(0,r.Autowired)(s.AbstractExtInstanceManagementService),n.__metadata("design:type",s.AbstractExtInstanceManagementService)],h.prototype,"extensionManageService",void 0),t.DebuggersContributionPoint=h=n.__decorate([(0,r.Injectable)(),(0,_.Contributes)("debuggers"),(0,_.LifeCycle)(4)],h)},60768:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GrammarsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(62660),p=e(99220),v=e(71354);let m=class extends p.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=this.extensionManageService.getExtensionInstanceByExtId(g);if(h)for(const u of l)this.textMateService.registerGrammar(u,o.URI.from(h.uri)),this.addDispose(o.Disposable.create(()=>{this.textMateService.unregisterGrammar(u)}))}}};t.GrammarsContributionPoint=m,m.schema={description:(0,o.localize)("vscode.extension.contributes.grammars","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:(0,o.localize)("vscode.extension.contributes.grammars.language","Language identifier for which this syntax is contributed to."),type:"string"},scopeName:{description:(0,o.localize)("vscode.extension.contributes.grammars.scopeName","Textmate scope name used by the tmLanguage file."),type:"string"},path:{description:(0,o.localize)("vscode.extension.contributes.grammars.path","Path of the tmLanguage file. The path is relative to the extension folder and typically starts with './syntaxes/'."),type:"string"},embeddedLanguages:{description:(0,o.localize)("vscode.extension.contributes.grammars.embeddedLanguages","A map of scope name to language id if this grammar contains embedded languages."),type:"object"},tokenTypes:{description:(0,o.localize)("vscode.extension.contributes.grammars.tokenTypes","A map of scope name to token types."),type:"object",additionalProperties:{enum:["string","comment","other"]}},injectTo:{description:(0,o.localize)("vscode.extension.contributes.grammars.injectTo","List of language scope names to which this grammar is injected to."),type:"array",items:{type:"string"}}},required:["scopeName","path"]}},n.__decorate([(0,r.Autowired)(c.ITextmateTokenizer),n.__metadata("design:type",Object)],m.prototype,"textMateService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],m.prototype,"extensionManageService",void 0),t.GrammarsContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("grammars"),(0,p.LifeCycle)(2)],m)},43988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconsContributionPoint=t.IconThemesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(32242),c=e(43718),p=e(52416),v=e(38667),m=e(99220),_=e(71354);let s=class extends m.VSCodeContributePoint{contribute(){for(const u of this.contributesMap){const{extensionId:d,contributes:E}=u,f=E.map(b=>({...b,label:this.getLocalizeFromNlsJSON(b.label,d),extensionId:d})),a=this.extensionManageService.getExtensionInstanceByExtId(d);a&&this.iconService.registerIconThemes(f,c.URI.from(a.uri))}}};t.IconThemesContributionPoint=s,n.__decorate([(0,r.Autowired)(p.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extensionManageService",void 0),t.IconThemesContributionPoint=s=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("iconThemes"),(0,m.LifeCycle)(2)],s);const g={ttf:"truetype",woff:"woff",woff2:"woff2"};let l=class extends m.VSCodeContributePoint{constructor(){super(...arguments),this.iconRegistry=(0,v.getIconRegistry)()}contribute(){for(const{extensionId:u,contributes:d}of this.contributesMap)Object.keys(d).forEach(E=>{const f=d[E],a=this.extensionManageService.getExtensionInstanceByExtId(u);if(a){const b=f.default;if(typeof b=="string")this.iconRegistry.registerIcon(E,{id:b},f.description);else if(typeof b=="object"&&typeof b.fontPath=="string"&&typeof b.fontCharacter=="string"){const y=c.URI.from(a.uri).resolve(f.default.fontPath),A=c.path.extname(b.fontPath).substring(1),S=g[A];if(!S){this.logger.warn((0,c.localize)("invalid.icons.default.fontPath.extension",`Expected \`contributes.icons.default.fontPath\` to have file extension 'woff', woff2' or 'ttf', is '${A}'.`));return}const w=c.path.join(u,b.fontPath),T=this.iconRegistry.registerIconFont(w,{src:[{location:this.staticResourceService.resolveStaticResource(y),format:S}]});this.iconRegistry.registerIcon(E,{fontCharacter:b.fontCharacter,font:{id:w,definition:T}},f.description)}}});this.productIconService.updateProductIconThemes()}};t.IconsContributionPoint=l,n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],l.prototype,"extensionManageService",void 0),n.__decorate([(0,r.Autowired)(p.IProductIconService),n.__metadata("design:type",Object)],l.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",o.StaticResourceService)],l.prototype,"staticResourceService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),t.IconsContributionPoint=l=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("icons"),(0,m.LifeCycle)(2)],l)},35321:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VSCodeContributesService=t.VSCodeContributesServiceToken=void 0;const n=e(85608),r=e(76003),o=e(99220),c=e(3098),p=e(57541),v=e(37614),m=e(8079),_=e(6143),s=e(4653),g=e(21086),l=e(61361),h=e(60768),u=e(43988),d=e(81404),E=e(82903),f=e(25588),a=e(35166),b=e(95765),y=e(49661),A=e(53082),S=e(3076),w=e(19669),T=e(92659),D=e(75943),I=e(77901),O=e(88797),M=e(91688),R=e(55993),P=e(12191),k=e(36198),F=e(21218);t.VSCodeContributesServiceToken=Symbol("VSCodeContributesService");let L=class extends o.ExtensionContributesService{constructor(){super(...arguments),this.ContributionPoints=[M.ThemesContributionPoint,u.IconThemesContributionPoint,u.IconsContributionPoint,f.LocalizationsContributionPoint,m.CommandsContributionPoint,A.ProductIconThemesContributionPoint,h.GrammarsContributionPoint,E.LanguagesContributionPoint,_.ConfigurationContributionPoint,s.ConfigurationDefaultsContributionPoint,v.ColorsContributionPoint,d.KeybindingContributionPoint,a.SubmenusContributionPoint,a.MenusContributionPoint,D.SnippetsContributionPoint,R.ViewContainersContributionPoint,P.ViewsContributionPoint,k.ViewsWelcomeContributionPoint,p.BreakpointsContributionPoint,l.DebuggersContributionPoint,c.ActionsContributionPoint,I.TaskDefinitionContributionPoint,y.ProblemPatternsContributionPoint,b.ProblemMatchersContributionPoint,g.CustomEditorContributionPoint,F.WalkthroughsContributionPoint,T.SemanticTokenTypesContributionPoint,S.SemanticTokenModifiersContributionPoint,w.SemanticTokenScopesContributionPoint,O.TerminalContributionPoint]}};t.VSCodeContributesService=L,t.VSCodeContributesService=L=n.__decorate([(0,r.Injectable)()],L)},81404:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeybindingContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(99220),p=e(71354);let v=class extends c.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{extensionId:s,contributes:g}=_,l=this.extensionManageService.getExtensionInstanceByExtId(s);if(!l)continue;const h=g.map(u=>this.toKeybinding(u,l.isBuiltin));this.addDispose(this.keybindingRegistry.registerKeybindings(h))}}toKeybinding(_,s){const g=this.toOSKeybinding(_),{command:l,when:h}=_;return{keybinding:g,command:l,when:h,priority:s?o.KeybindingWeight.BuiltinExtension*100:o.KeybindingWeight.ExternalExtension*100}}toOSKeybinding(_){let s;const g=o.OS.type();return g===o.OperatingSystem.Windows&&_.win?s=_.win:g===o.OperatingSystem.Macintosh&&_.mac?s=_.mac:_.linux&&(s=_.linux),s||_.key}};t.KeybindingContributionPoint=v,n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],v.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(p.AbstractExtInstanceManagementService),n.__metadata("design:type",p.AbstractExtInstanceManagementService)],v.prototype,"extensionManageService",void 0),t.KeybindingContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("keybindings"),(0,c.LifeCycle)(4)],v)},82903:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(62660),p=e(99220),v=e(71354);let m=class extends p.VSCodeContributePoint{async contribute(){for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=this.extensionManageService.getExtensionInstanceByExtId(g);h&&await this.textMateService.registerLanguages(l,o.URI.from(h.uri))}}};t.LanguagesContributionPoint=m,m.schema={allowComments:!0,allowTrailingCommas:!0,default:{comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["(",")"],["[","]"],["{","}"]],autoClosingPairs:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[["(",")"],["[","]"],["{","}"]]},definitions:{openBracket:{type:"string",description:(0,o.localize)("schema.openBracket","The opening bracket character or string sequence.")},closeBracket:{type:"string",description:(0,o.localize)("schema.closeBracket","The closing bracket character or string sequence.")},bracketPair:{type:"array",items:[{},{}]}},properties:{comments:{default:{blockComment:["/*","*/"],lineComment:"//"},description:(0,o.localize)("schema.comments","Defines the comment symbols"),type:"object",properties:{blockComment:{type:"array",description:(0,o.localize)("schema.blockComments","Defines how block comments are marked."),items:[{type:"string",description:(0,o.localize)("schema.blockComment.begin","The character sequence that starts a block comment.")},{type:"string",description:(0,o.localize)("schema.blockComment.end","The character sequence that ends a block comment.")}]},lineComment:{type:"string",description:(0,o.localize)("schema.lineComment","The character sequence that starts a line comment.")}}},brackets:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),type:"array",items:{}},autoClosingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.autoClosingPairs","Defines the bracket pairs. When a opening bracket is entered, the closing bracket is inserted automatically."),type:"array",items:{oneOf:[{},{type:"object",properties:{open:{},close:{},notIn:{type:"array",description:(0,o.localize)("schema.autoClosingPairs.notIn","Defines a list of scopes where the auto pairs are disabled."),items:{enum:["string","comment"]}}}}]}},autoCloseBefore:{default:`;:.,=}])>
31553
31553
  `,description:(0,o.localize)("schema.autoCloseBefore","Defines what characters must be after the cursor in order for bracket or quote autoclosing to occur when using the 'languageDefined' autoclosing setting. This is typically the set of characters which can not start an expression."),type:"string"},surroundingPairs:{default:[["(",")"],["[","]"],["{","}"]],description:(0,o.localize)("schema.surroundingPairs","Defines the bracket pairs that can be used to surround a selected string."),type:"array",items:{oneOf:[{},{type:"object",properties:{open:{},close:{}}}]}},wordPattern:{default:"",description:(0,o.localize)("schema.wordPattern","Defines what is considered to be a word in the programming language."),type:["string","object"],properties:{pattern:{type:"string",description:(0,o.localize)("schema.wordPattern.pattern","The RegExp pattern used to match words."),default:""},flags:{type:"string",description:(0,o.localize)("schema.wordPattern.flags","The RegExp flags used to match words."),default:"g",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.wordPattern.flags.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},indentationRules:{default:{increaseIndentPattern:"",decreaseIndentPattern:""},description:(0,o.localize)("schema.indentationRules","The language's indentation settings."),type:"object",properties:{increaseIndentPattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.increaseIndentPattern","If a line matches this pattern, then all the lines after it should be indented once (until another rule matches)."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.increaseIndentPattern.pattern","The RegExp pattern for increaseIndentPattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.increaseIndentPattern.flags","The RegExp flags for increaseIndentPattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.increaseIndentPattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},decreaseIndentPattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern","If a line matches this pattern, then all the lines after it should be unindented once (until another rule matches)."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.pattern","The RegExp pattern for decreaseIndentPattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.flags","The RegExp flags for decreaseIndentPattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.decreaseIndentPattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},indentNextLinePattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.indentNextLinePattern","If a line matches this pattern, then **only the next line** after it should be indented once."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.indentNextLinePattern.pattern","The RegExp pattern for indentNextLinePattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.indentNextLinePattern.flags","The RegExp flags for indentNextLinePattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.indentNextLinePattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}},unIndentedLinePattern:{type:["string","object"],description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern","If a line matches this pattern, then its indentation should not be changed and it should not be evaluated against the other rules."),properties:{pattern:{type:"string",description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.pattern","The RegExp pattern for unIndentedLinePattern."),default:""},flags:{type:"string",description:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.flags","The RegExp flags for unIndentedLinePattern."),default:"",pattern:"^([gimuy]+)$",patternErrorMessage:(0,o.localize)("schema.indentationRules.unIndentedLinePattern.errorMessage","Must match the pattern `/^([gimuy]+)$/`.")}}}}},folding:{type:"object",description:(0,o.localize)("schema.folding","The language's folding settings."),properties:{offSide:{type:"boolean",description:(0,o.localize)("schema.folding.offSide","A language adheres to the off-side rule if blocks in that language are expressed by their indentation. If set, empty lines belong to the subsequent block.")},markers:{type:"object",description:(0,o.localize)("schema.folding.markers","Language specific folding markers such as '#region' and '#endregion'. The start and end regexes will be tested against the contents of all lines and must be designed efficiently"),properties:{start:{type:"string",description:(0,o.localize)("schema.folding.markers.start","The RegExp pattern for the start marker. The regexp must start with '^'.")},end:{type:"string",description:(0,o.localize)("schema.folding.markers.end","The RegExp pattern for the end marker. The regexp must start with '^'.")}}}}}}},n.__decorate([(0,r.Autowired)(c.ITextmateTokenizer),n.__metadata("design:type",Object)],m.prototype,"textMateService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],m.prototype,"extensionManageService",void 0),t.LanguagesContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("languages"),(0,p.LifeCycle)(2)],m)},25588:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalizationsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(50492),v=e(42933),m=e(99220),_=e(71354),{Path:s}=o.path;let g=class extends m.VSCodeContributePoint{constructor(){super(...arguments),this._whenContributed=new c.Deferred}get whenContributed(){return this._whenContributed.promise}safeParseJSON(u){let d;try{return d=(0,o.parseWithComments)(u),d}catch(E){return this.logger.error(`Language configuration file parsing error, ${E.stack}`)}}async contribute(){try{const u=[],d=this.preferenceService.get(o.GeneralSettingsId.Language)||(0,o.getLanguageId)(),E=this.extensionManageService.getExtensionInstances();for(const f of this.contributesMap){const{extensionId:a,contributes:b}=f,y=this.extensionManageService.getExtensionInstanceByExtId(a);for await(const A of b)if(A.translations){const S=l(A.languageId);if(S!==(0,o.getLanguageId)())continue;u.push(...A.translations.map(async w=>{if(E.findIndex(D=>D.id===w.id)===-1)return;const T=await this.registerLanguage(w,y.path);(0,o.registerLocalizationBundle)({languageId:S,languageName:A.languageName,localizedLanguageName:A.localizedLanguageName,contents:T},w.id)})),this.storagePath||(this.storagePath=await this.extensionStoragePathServer.getLastStoragePath()||""),u.push(this.extensionNodeService.updateLanguagePack(d,y.path,this.storagePath))}}await Promise.all(u),this._whenContributed.resolve()}catch(u){this.logger.error("Failed to contribute localizations:",u),this._whenContributed.reject(u)}}async registerLanguage(u,d){const E=new s(d).join(u.path.replace(/^\.\//,"")).toString(),{content:f}=await this.fileServiceClient.readFile(o.URI.file(E).toString()),a=this.safeParseJSON(f.toString()),b={};if(a.contents){for(const y of Object.keys(a.contents))if(a.contents[y])for(const A of Object.keys(a.contents[y]))b[A]=a.contents[y][A]}return b}};t.LocalizationsContributionPoint=g,n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],g.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(p.IExtensionStoragePathServer),n.__metadata("design:type",Object)],g.prototype,"extensionStoragePathServer",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],g.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],g.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],g.prototype,"extensionNodeService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],g.prototype,"extensionManageService",void 0),t.LocalizationsContributionPoint=g=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("localizations"),(0,m.LifeCycle)(2)],g);function l(h){const u=h.split("-");return u[1]&&(u[1]=u[1].toUpperCase()),u.join("-")}},35166:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MenusContributionPoint=t.SubmenusContributionPoint=void 0,t.parseMenuId=d,t.parseMenuGroup=E,t.isValidMenuItem=f;const n=e(85608),r=e(76003),o=e(41869),c=e(57559),p=e(68456),v=e(93899),m=e(54414),_=e(57517),s=e(52416),g=e(42912),l=e(99220),h=e(71354);function u(w){return typeof w.command=="string"}function d(w){switch(w){case"touchBar":return v.MenuId.TouchBarContext;case"debug/toolBar":return v.MenuId.DebugToolBar;case"statusBar/windowIndicator":return v.MenuId.StatusBarWindowIndicatorMenu;case"menuBar/file":return v.MenuId.MenubarFileMenu;default:return w}}function E(w){let T,D;if(w){const I=w.lastIndexOf("@");I>0?(T=w.substr(0,I),D=Number(w.substr(I+1))||void 0):T=w}return[T,D]}function f(w,T){return typeof w.command!="string"?(T.error((0,o.formatLocalize)("requirestring","command")),!1):w.alt&&typeof w.alt!="string"?(T.error((0,o.formatLocalize)("optstring","alt")),!1):w.when&&typeof w.when!="string"?(T.error((0,o.formatLocalize)("optstring","when")),!1):w.group&&typeof w.group!="string"?(T.error((0,o.formatLocalize)("optstring","group")),!1):!0}function a(w,T){return typeof w.submenu!="string"?(T.error((0,o.formatLocalize)("requirestring","property `{0}` is mandatory and must be of type `string`","submenu")),!1):w.when&&typeof w.when!="string"?(T.error((0,o.formatLocalize)("optstring","property `{0}` can be omitted or must be of type `string`","when")),!1):w.group&&typeof w.group!="string"?(T.error((0,o.formatLocalize)("optstring","property `{0}` can be omitted or must be of type `string`","group")),!1):!0}function b(w,T){if(!Array.isArray(w))return T.error((0,o.formatLocalize)("requirearray","submenu items must be an array")),!1;for(const D of w)if(u(D)){if(!f(D,T))return!1}else if(!a(D,T))return!1;return!0}const y=new Map;let A=class extends l.VSCodeContributePoint{contribute(){for(const T of this.contributesMap){const{extensionId:D,contributes:I}=T;y.set(D,I)}}};t.SubmenusContributionPoint=A,A.schema={},t.SubmenusContributionPoint=A=n.__decorate([(0,r.Injectable)(),(0,l.Contributes)("submenus"),(0,l.LifeCycle)(3)],A);let S=class extends l.VSCodeContributePoint{constructor(){super(...arguments),this.phase=2}createSyntheticCommandId(T,D){const I=T.command;let O=D+I,M=0;for(;this.commandRegistry.getCommand(O);)O=D+I+":"+M,M++;return O}getDataFromQuery(T,D){return new URLSearchParams(T).get(D)}contribute(){const T=console;for(const D of this.contributesMap){const{extensionId:I,contributes:O}=D,M=this.extensionManageService.getExtensionInstanceByExtId(I);if(M)for(const R of Object.keys(O)){const P=O[R];if(!b(P,console))return;const k=d(R);if((0,o.isUndefined)(k)){T.warn((0,o.formatLocalize)("menuId.invalid","`{0}` is not a valid menu identifier",R));return}for(const F of P)if(u(F)){const L=this.commandRegistry.getRawCommand(F.command),B=F.alt&&this.commandRegistry.getRawCommand(F.alt);if(!L){T.error((0,o.formatLocalize)("menu.missing.command",k,F.command));continue}F.alt&&!B&&T.warn((0,o.formatLocalize)("menu.missing.altCommand",k,F.alt)),F.command===F.alt&&T.info((0,o.formatLocalize)("menu.dupe.command",k,F.command,F.alt));const[j,W]=E(F.group);let U;k===v.MenuId.EditorTitleContext?U=({uri:Q})=>[Q.codeUri]:k===v.MenuId.EditorTitle&&(U=(Q,V,$)=>{if(Q.scheme===m.EditorOpenType.diff){const Y=this.getDataFromQuery(decodeURIComponent(Q.query),"modified");if(Y)return[new o.URI(Y).codeUri]}return[$?.codeUri||Q.codeUri]}),this.addDispose(this.menuRegistry.registerMenuItem(k,{command:F.command,alt:B,group:j,order:W,when:F.when,argsTransformer:U,type:F.type,toggledWhen:F.toggledWhen,enabledWhen:F.enabledWhen}))}else{const L=y.get(I);if(!L){T.error((0,o.localize)("missing.submenu.section","Need a submenu contributes firstly",F.submenu));continue}const B=L.find(U=>U.id===F.submenu);if(!B){T.error((0,o.localize)("missing.submenu","Menu item references a submenu `{0}` which is not defined in the 'submenus' section.",F.submenu));continue}const[j,W]=E(F.group);this.addDispose(this.menuRegistry.registerMenuItem(k,{submenu:F.submenu,label:this.getLocalizeFromNlsJSON(B.label,I),when:F.when,group:j,order:W,iconClass:B.icon&&this.toIconClass(B.icon,s.IconType.Background,M.path)}))}}}}};t.MenusContributionPoint=S,S.schema=c.menus.schema,n.__decorate([(0,r.Autowired)(o.CommandRegistry),n.__metadata("design:type",Object)],S.prototype,"commandRegistry",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],S.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],S.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(v.IMenuRegistry),n.__metadata("design:type",v.IMenuRegistry)],S.prototype,"menuRegistry",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],S.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(_.IEditorActionRegistry),n.__metadata("design:type",Object)],S.prototype,"editorActionRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],S.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(g.IIconService),n.__metadata("design:type",Object)],S.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(h.AbstractExtInstanceManagementService),n.__metadata("design:type",h.AbstractExtInstanceManagementService)],S.prototype,"extensionManageService",void 0),t.MenusContributionPoint=S=n.__decorate([(0,r.Injectable)(),(0,l.Contributes)("menus"),(0,l.LifeCycle)(3)],S)},95765:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemMatchersContributionPoint=t.problemMatchersSchema=t.Schemas=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220),p=e(49661),{deepClone:v}=o.objects;var m;(function(s){s.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,o.localize)("WatchingPatternSchema.regexp","The regular expression to detect the begin or end of a background task.")},file:{type:"integer",description:(0,o.localize)("WatchingPatternSchema.file","The match group index of the filename. Can be omitted.")}}},s.PatternType={anyOf:[{type:"string",description:(0,o.localize)("PatternTypeSchema.name","The name of a contributed or predefined pattern")},p.PatternSchemas.ProblemPattern,p.PatternSchemas.MultiLineProblemPattern],description:(0,o.localize)("PatternTypeSchema.description","A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.")},s.ProblemMatcher={type:"object",additionalProperties:!1,properties:{base:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.base","The name of a base problem matcher to use.")},owner:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.owner","The owner of the problem inside Code. Can be omitted if base is specified. Defaults to 'external' if omitted and base is not specified.")},source:{type:"string",description:(0,o.localize)("ProblemMatcherSchema.source","A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.")},severity:{type:"string",enum:["error","warning","info"],description:(0,o.localize)("ProblemMatcherSchema.severity","The default severity for captures problems. Is used if the pattern doesn't define a match group for severity.")},applyTo:{type:"string",enum:["allDocuments","openDocuments","closedDocuments"],description:(0,o.localize)("ProblemMatcherSchema.applyTo","Controls if a problem reported on a text document is applied only to open, closed or all documents.")},pattern:s.PatternType,fileLocation:{oneOf:[{type:"string",enum:["absolute","relative","autoDetect"]},{type:"array",items:{type:"string"}}],description:(0,o.localize)("ProblemMatcherSchema.fileLocation","Defines how file names reported in a problem pattern should be interpreted.")},background:{type:"object",additionalProperties:!1,description:(0,o.localize)("ProblemMatcherSchema.background","Patterns to track the begin and end of a matcher active on a background task."),properties:{activeOnStart:{type:"boolean",description:(0,o.localize)("ProblemMatcherSchema.background.activeOnStart","If set to true the background monitor is in active mode when the task starts. This is equals of issuing a line that matches the beginsPattern")},beginsPattern:{oneOf:[{type:"string"},s.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.background.beginsPattern","If matched in the output the start of a background task is signaled.")},endsPattern:{oneOf:[{type:"string"},s.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.background.endsPattern","If matched in the output the end of a background task is signaled.")}}},watching:{type:"object",additionalProperties:!1,deprecationMessage:(0,o.localize)("ProblemMatcherSchema.watching.deprecated","The watching property is deprecated. Use background instead."),description:(0,o.localize)("ProblemMatcherSchema.watching","Patterns to track the begin and end of a watching matcher."),properties:{activeOnStart:{type:"boolean",description:(0,o.localize)("ProblemMatcherSchema.watching.activeOnStart","If set to true the watcher is in active mode when the task starts. This is equals of issuing a line that matches the beginPattern")},beginsPattern:{oneOf:[{type:"string"},s.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.watching.beginsPattern","If matched in the output the start of a watching task is signaled.")},endsPattern:{oneOf:[{type:"string"},s.WatchingPattern],description:(0,o.localize)("ProblemMatcherSchema.watching.endsPattern","If matched in the output the end of a watching task is signaled.")}}}}},s.LegacyProblemMatcher=v(s.ProblemMatcher),s.LegacyProblemMatcher.properties=v(s.LegacyProblemMatcher.properties)||{},s.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",deprecationMessage:(0,o.localize)("LegacyProblemMatcherSchema.watchedBegin.deprecated","This property is deprecated. Use the watching property instead."),description:(0,o.localize)("LegacyProblemMatcherSchema.watchedBegin","A regular expression signaling that a watched tasks begins executing triggered through file watching.")},s.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:(0,o.localize)("LegacyProblemMatcherSchema.watchedEnd.deprecated","This property is deprecated. Use the watching property instead."),description:(0,o.localize)("LegacyProblemMatcherSchema.watchedEnd","A regular expression signaling that a watched tasks ends executing.")},s.NamedProblemMatcher=v(s.ProblemMatcher),s.NamedProblemMatcher.properties=v(s.NamedProblemMatcher.properties)||{},s.NamedProblemMatcher.properties.name={type:"string",description:(0,o.localize)("NamedProblemMatcherSchema.name","The name of the problem matcher used to refer to it.")},s.NamedProblemMatcher.properties.label={type:"string",description:(0,o.localize)("NamedProblemMatcherSchema.label","A human readable label of the problem matcher.")}})(m||(t.Schemas=m={})),t.problemMatchersSchema={description:(0,o.localize)("ProblemMatcherExtPoint","Contributes problem matchers"),type:"array",items:m.NamedProblemMatcher};let _=class extends c.VSCodeContributePoint{contribute(){for(const g of this.contributesMap){const{contributes:l}=g;for(const h of l)this.addDispose(this.problemMatcher.register(h))}}};t.ProblemMatchersContributionPoint=_,n.__decorate([(0,r.Autowired)(o.IProblemMatcherRegistry),n.__metadata("design:type",Object)],_.prototype,"problemMatcher",void 0),t.ProblemMatchersContributionPoint=_=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("problemMatchers"),(0,c.LifeCycle)(4)],_)},49661:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProblemPatternsContributionPoint=t.problemPatternsSchema=t.PatternSchemas=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(99220),{deepClone:p}=o.objects;var v;(function(_){_.ProblemPattern={default:{regexp:"^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$",file:1,location:2,message:3},type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,o.localize)("ProblemPatternSchema.regexp","The regular expression to find an error, warning or info in the output.")},kind:{type:"string",description:(0,o.localize)("ProblemPatternSchema.kind","whether the pattern matches a location (file and line) or only a file.")},file:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.file","The match group index of the filename. If omitted 1 is used.")},location:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.location","The match group index of the problem's location. Valid location patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). If omitted (line,column) is assumed.")},line:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.line","The match group index of the problem's line. Defaults to 2")},column:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.column","The match group index of the problem's line character. Defaults to 3")},endLine:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.endLine","The match group index of the problem's end line. Defaults to undefined")},endColumn:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.endColumn","The match group index of the problem's end line character. Defaults to undefined")},severity:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.severity","The match group index of the problem's severity. Defaults to undefined")},code:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.code","The match group index of the problem's code. Defaults to undefined")},message:{type:"integer",description:(0,o.localize)("ProblemPatternSchema.message","The match group index of the message. If omitted it defaults to 4 if location is specified. Otherwise it defaults to 5.")},loop:{type:"boolean",description:(0,o.localize)("ProblemPatternSchema.loop","In a multi line matcher loop indicated whether this pattern is executed in a loop as long as it matches. Can only specified on a last pattern in a multi line pattern.")}}},_.NamedProblemPattern=p(_.ProblemPattern),_.NamedProblemPattern.properties=p(_.NamedProblemPattern.properties)||{},_.NamedProblemPattern.properties.name={type:"string",description:(0,o.localize)("NamedProblemPatternSchema.name","The name of the problem pattern.")},_.MultiLineProblemPattern={type:"array",items:_.ProblemPattern},_.NamedMultiLineProblemPattern={type:"object",additionalProperties:!1,properties:{name:{type:"string",description:(0,o.localize)("NamedMultiLineProblemPatternSchema.name","The name of the problem multi line problem pattern.")},patterns:{type:"array",description:(0,o.localize)("NamedMultiLineProblemPatternSchema.patterns","The actual patterns."),items:_.ProblemPattern}}}})(v||(t.PatternSchemas=v={})),t.problemPatternsSchema={description:(0,o.localize)("ProblemPatternExtPoint","Contributes problem patterns"),type:"array",items:{anyOf:[v.NamedProblemPattern,v.NamedMultiLineProblemPattern]}};let m=class extends c.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{contributes:g}=s;for(const l of g)this.addDispose(this.problemPattern.register(l))}}};t.ProblemPatternsContributionPoint=m,n.__decorate([(0,r.Autowired)(o.IProblemPatternRegistry),n.__metadata("design:type",Object)],m.prototype,"problemPattern",void 0),t.ProblemPatternsContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("problemPatterns"),(0,c.LifeCycle)(4)],m)},53082:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProductIconThemesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(52416),p=e(99220),v=e(71354);let m=class extends p.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=l.map(d=>({...d,label:this.getLocalizeFromNlsJSON(d.label,g),extensionId:g})),u=this.extensionManageService.getExtensionInstanceByExtId(g);u&&this.productIconService.registerProductIconThemes(h,o.URI.from(u.uri))}}};t.ProductIconThemesContributionPoint=m,n.__decorate([(0,r.Autowired)(c.IProductIconService),n.__metadata("design:type",Object)],m.prototype,"productIconService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],m.prototype,"extensionManageService",void 0),t.ProductIconThemesContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("productIconThemes"),(0,p.LifeCycle)(2)],m)},3076:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenModifiersContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(85521),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{contributes:s}=_;if(!Array.isArray(s)){this.logger.warn("'configuration.semanticTokenTypes' must be an array");return}for(const g of s)(0,p.validateTypeOrModifier)(g,"semanticTokenModifier",this.logger)&&this.semanticTokenRegistry.registerTokenModifier(g.id,g.description)}}};t.SemanticTokenModifiersContributionPoint=v,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.ISemanticTokenRegistry),n.__metadata("design:type",Object)],v.prototype,"semanticTokenRegistry",void 0),t.SemanticTokenModifiersContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("semanticTokenModifiers"),(0,p.LifeCycle)(4)],v)},19669:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenScopesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(4892),c=e(85521),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{contributes:s}=_;if(!Array.isArray(s)){this.logger.warn("'configuration.semanticTokenScopes' must be an array");return}for(const g of s){if(!g.scopes||typeof g.scopes!="object"){this.logger.warn("'configuration.semanticTokenScopes.scopes' must be defined as an object");continue}if(g.language&&typeof g.language!="string"){this.logger.warn("'configuration.semanticTokenScopes.language' must be as a string");continue}for(const l in g.scopes){const h=g.scopes[l];if(!Array.isArray(h)||h.some(u=>typeof u!="string")){this.logger.error("'configuration.semanticTokenScopes.scopes' values must be an array of strings");continue}try{const u=this.semanticTokenRegistry.parseTokenSelector(l,g.language);this.semanticTokenRegistry.registerTokenStyleDefault(u,{scopesToProbe:h.map(d=>d.split(" "))})}catch{this.logger.error(`configuration.semanticTokenScopes.scopes': Problems parsing selector ${l}.`)}}}}}};t.SemanticTokenScopesContributionPoint=v,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.ISemanticTokenRegistry),n.__metadata("design:type",Object)],v.prototype,"semanticTokenRegistry",void 0),t.SemanticTokenScopesContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("semanticTokenScopes"),(0,p.LifeCycle)(4)],v)},92659:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokenTypesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(75694),c=e(85521),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{contributes:s}=_;if(!Array.isArray(s)){this.logger.warn("'configuration.semanticTokenTypes' must be an array");return}for(const g of s)(0,p.validateTypeOrModifier)(g,"semanticTokenType",this.logger)&&this.semanticTokenRegistry.registerTokenType(g.id,g.description,g.superType)}}};t.SemanticTokenTypesContributionPoint=v,n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(c.ISemanticTokenRegistry),n.__metadata("design:type",Object)],v.prototype,"semanticTokenRegistry",void 0),t.SemanticTokenTypesContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("semanticTokenTypes"),(0,p.LifeCycle)(4)],v)},75943:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnippetsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(32002),c=e(99220),p=e(71354);let v=class extends c.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{extensionId:s,contributes:g}=_,l=this.extensionManageService.getExtensionInstanceByExtId(s);if(l)for(const h of g)this.addDispose(this.snippetSuggestProvider.fromPath(h.path,{extPath:l.path,language:h.language,source:l.packageJSON.name}))}this.addDispose(this.snippetSuggestProvider.registerSnippetsProvider())}};t.SnippetsContributionPoint=v,n.__decorate([(0,r.Autowired)(o.MonacoSnippetSuggestProvider),n.__metadata("design:type",o.MonacoSnippetSuggestProvider)],v.prototype,"snippetSuggestProvider",void 0),n.__decorate([(0,r.Autowired)(p.AbstractExtInstanceManagementService),n.__metadata("design:type",p.AbstractExtInstanceManagementService)],v.prototype,"extensionManageService",void 0),t.SnippetsContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,c.Contributes)("snippets"),(0,c.LifeCycle)(4)],v)},77901:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskDefinitionContributionPoint=t.taskDefinitionSchema=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(99220);t.taskDefinitionSchema={type:"object",additionalProperties:!1,properties:{type:{type:"string",description:(0,o.localize)("TaskDefinition.description","The actual task type. Please note that types starting with a '$' are reserved for internal usage.")},required:{type:"array",items:{type:"string"}},properties:{type:"object",description:(0,o.localize)("TaskDefinition.properties","Additional properties of the task type"),additionalProperties:{$ref:"http://json-schema.org/draft-04/schema#"}}}};let v=class extends p.VSCodeContributePoint{constructor(){super(...arguments),this.phase=3}contribute(){for(const _ of this.contributesMap){const{extensionId:s,contributes:g}=_;for(const l of g)this.logger.verbose(`${s} register taskDefinition ${JSON.stringify(l)}`),this.addDispose(this.taskDefinitionRegistry.register(l.type,{...l,taskType:l.type,extensionId:s}))}}};t.TaskDefinitionContributionPoint=v,n.__decorate([(0,r.Autowired)(c.ITaskDefinitionRegistry),n.__metadata("design:type",Object)],v.prototype,"taskDefinitionRegistry",void 0),n.__decorate([(0,r.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),t.TaskDefinitionContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("taskDefinitions"),(0,p.LifeCycle)(4)],v)},88797:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(26405),p=e(99220);let v=class extends p.VSCodeContributePoint{contribute(){for(const _ of this.contributesMap){const{extensionId:s,contributes:g}=_;this.profileService.addContributedProfile(s,g)}}dispose(){for(const _ of this.contributesMap){const{extensionId:s}=_;this.profileService.removeContributedProfile(s)}}};t.TerminalContributionPoint=v,v.schema={description:(0,o.localize)("vscode.extension.contributes.terminal","Contributes terminal functionality."),type:"object",properties:{types:{type:"array",description:(0,o.localize)("vscode.extension.contributes.terminal.types","Defines additional terminal types that the user can create."),items:{type:"object",required:["command","title"],properties:{command:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.command","Command to execute when the user creates this type of terminal."),type:"string"},title:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.title","Title for this type of terminal."),type:"string"},icon:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon","A codicon, URI, or light and dark URIs to associate with this terminal type."),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.light","Icon path when a light theme is used"),type:"string"},dark:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.dark","Icon path when a dark theme is used"),type:"string"}}}]}}}},profiles:{type:"array",description:(0,o.localize)("vscode.extension.contributes.terminal.profiles","Defines additional terminal profiles that the user can create."),items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"$1",title:"$2"}}],properties:{id:{description:(0,o.localize)("vscode.extension.contributes.terminal.profiles.id","The ID of the terminal profile provider."),type:"string"},title:{description:(0,o.localize)("vscode.extension.contributes.terminal.profiles.title","Title for this terminal profile."),type:"string"},icon:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon","A codicon, URI, or light and dark URIs to associate with this terminal type."),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.light","Icon path when a light theme is used"),type:"string"},dark:{description:(0,o.localize)("vscode.extension.contributes.terminal.types.icon.dark","Icon path when a dark theme is used"),type:"string"}}}]}}}}}},n.__decorate([(0,r.Autowired)(c.ITerminalProfileService),n.__metadata("design:type",Object)],v.prototype,"profileService",void 0),t.TerminalContributionPoint=v=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("terminal"),(0,p.LifeCycle)(4)],v)},91688:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemesContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(52416),p=e(99220),v=e(71354);let m=class extends p.VSCodeContributePoint{contribute(){for(const s of this.contributesMap){const{extensionId:g,contributes:l}=s,h=l.map(d=>({...d,label:this.getLocalizeFromNlsJSON(d.label,g),extensionId:g})),u=this.extensionManageService.getExtensionInstanceByExtId(g);u&&this.themeService.registerThemes(h,o.URI.from(u.uri))}}};t.ThemesContributionPoint=m,n.__decorate([(0,r.Autowired)(c.IThemeService),n.__metadata("design:type",Object)],m.prototype,"themeService",void 0),n.__decorate([(0,r.Autowired)(v.AbstractExtInstanceManagementService),n.__metadata("design:type",v.AbstractExtInstanceManagementService)],m.prototype,"extensionManageService",void 0),t.ThemesContributionPoint=m=n.__decorate([(0,r.Injectable)(),(0,p.Contributes)("themes"),(0,p.LifeCycle)(2)],m)},55993:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewContainersContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(26471),c=e(43718),p=e(63067),v=e(52416),m=e(99220),_=e(71354);let s=class extends m.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new c.DisposableCollection}convertLocationToSide(l){switch(l){case"activitybar":return["left","vertical"];case"ai-chat":return[o.AI_CHAT_VIEW_ID,"vertical"];default:return["bottom","horizontal"]}}contribute(){for(const l of this.contributesMap){const{extensionId:h,contributes:u}=l,d=this.extensionManageService.getExtensionInstanceByExtId(h);if(d)for(const E of Object.keys(u)){const[f,a]=this.convertLocationToSide(E);for(const b of u[E]){const y=this.mainlayoutService.collectTabbarComponent([],{iconClass:this.toIconClass(b.icon,v.IconType.Mask,d.path),title:this.getLocalizeFromNlsJSON(b.title,h),containerId:b.id,priority:0,fromExtension:!0,hideIfEmpty:!0,alignment:a},f);this.disposableCollection.push({dispose:()=>{const A=this.mainlayoutService.getTabbarHandler(y);A?.dispose()}})}}}}dispose(){this.disposableCollection.dispose()}getViewsMap(l){const h=l.views,u={};if(h)for(const d of Object.keys(h))h[d]&&Array.isArray(h[d])&&(u[d]=h[d].map(E=>E.id));return u}};t.ViewContainersContributionPoint=s,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],s.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(v.IIconService),n.__metadata("design:type",Object)],s.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(_.AbstractExtInstanceManagementService),n.__metadata("design:type",_.AbstractExtInstanceManagementService)],s.prototype,"extensionManageService",void 0),t.ViewContainersContributionPoint=s=n.__decorate([(0,r.Injectable)(),(0,m.Contributes)("viewsContainers"),(0,m.LifeCycle)(2)],s)},36198:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsWelcomeContributionPoint=t.ViewIdentifierMap=t.ViewsWelcomeExtensionPointFields=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(66482),p=e(87518),v=e(63067),m=e(61656),_=e(23268),s=e(99220);var g;(function(u){u.view="view",u.contents="contents",u.when="when",u.group="group",u.enablement="enablement"})(g||(t.ViewsWelcomeExtensionPointFields=g={})),t.ViewIdentifierMap={explorer:p.FILE_EXPLORER_WELCOME_ID,debug:c.DEBUG_WELCOME_ID,scm:m.SCM_WELCOME_ID};let l=class extends s.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new o.DisposableCollection}contribute(){var d;const E=new Map;for(const f of this.contributesMap){const{extensionId:a,contributes:b}=f;for(const y of b){const{group:A,order:S}=h(y),w=_.ContextKeyExpr.deserialize(y.enablement),T=(d=t.ViewIdentifierMap[y.view])!==null&&d!==void 0?d:y.view;let D=E.get(T);D||(D=new Map,E.set(T,D)),D.set(y,{content:this.getLocalizeFromNlsJSON(y.contents,a),when:_.ContextKeyExpr.deserialize(y.when),precondition:w,group:A,order:S})}}for(const[f,a]of E){const b=this.viewsRegistry.registerViewWelcomeContent2(f,a);for(const[,y]of b)this.disposableCollection.push(y)}}dispose(){this.disposableCollection.dispose()}};t.ViewsWelcomeContributionPoint=l,l.schema={type:"array",description:(0,o.localize)("contributes.viewsWelcome","Contributed views welcome content. Welcome content will be rendered in tree based views whenever they have no meaningful content to display, ie. the File Explorer when no folder is open. Such content is useful as in-product documentation to drive users to use certain features before they are available. A good example would be a `Clone Repository` button in the File Explorer welcome view."),items:{type:"object",description:(0,o.localize)("contributes.viewsWelcome.view","Contributed welcome content for a specific view."),required:[g.view,g.contents],properties:{[g.view]:{anyOf:[{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.view","Target view identifier for this welcome content. Only tree based views are supported.")},{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.view","Target view identifier for this welcome content. Only tree based views are supported."),enum:Object.keys(t.ViewIdentifierMap)}]},[g.contents]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.contents","Welcome content to be displayed. The format of the contents is a subset of Markdown, with support for links only.")},[g.when]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.when","Condition when the welcome content should be displayed.")},[g.group]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.group","Group to which this welcome content belongs.")},[g.enablement]:{type:"string",description:(0,o.localize)("contributes.viewsWelcome.view.enablement","Condition when the welcome content buttons and command links should be enabled.")}}}},n.__decorate([(0,r.Autowired)(v.IMainLayoutService),n.__metadata("design:type",Object)],l.prototype,"mainlayoutService",void 0),n.__decorate([(0,r.Autowired)(v.IViewsRegistry),n.__metadata("design:type",Object)],l.prototype,"viewsRegistry",void 0),t.ViewsWelcomeContributionPoint=l=n.__decorate([(0,r.Injectable)(),(0,s.Contributes)("viewsWelcome"),(0,s.LifeCycle)(3)],l);function h(u){let d,E;if(u.group){const f=u.group.lastIndexOf("@");f>0?(d=u.group.substr(0,f),E=Number(u.group.substr(f+1))||void 0):d=u.group}return{group:d,order:E}}},12191:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(63067),p=e(24429),v=e(99220),m=e(88341);let _=class extends v.VSCodeContributePoint{constructor(){super(...arguments),this.disposableCollection=new o.DisposableCollection}contribute(){for(const g of this.contributesMap){const{extensionId:l,contributes:h}=g;for(const u of Object.keys(h)){const d=h[u].map(E=>({...E,name:this.getLocalizeFromNlsJSON(E.name,l),component:E.type==="webview"?m.ExtensionWebviewView:p.WelcomeView}));for(const E of d){const f=this.mainLayoutService.collectViewComponent(E,u,{viewId:E.id},{fromExtension:!0});this.disposableCollection.push({dispose:()=>{const a=this.mainLayoutService.getTabbarHandler(f);a?.disposeView(E.id)}})}}}}dispose(){this.disposableCollection.dispose()}};t.ViewsContributionPoint=_,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"mainLayoutService",void 0),t.ViewsContributionPoint=_=n.__decorate([(0,r.Injectable)(),(0,v.Contributes)("views"),(0,v.LifeCycle)(2)],_)},21218:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkthroughsContributionPoint=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(41869),p=e(43718),v=e(54414),m=e(57517),_=e(99220),s=e(21167),g=e(17441);let l=class extends _.VSCodeContributePoint{contribute(){this.addDispose(this.walkthroughsService.onDidAddWalkthrough(u=>this.registerWalkthroughEditor(u))),this.addDispose(this.resourceService.registerResourceProvider({scheme:p.Schemes.walkThrough,provideResource:async u=>({uri:u,icon:(0,o.getIcon)("smile"),supportsRevive:!1,name:(0,p.localize)("walkthroughs.welcome")})})),this.addDispose(this.walkthroughsService.onDidOpenWalkthrough(async u=>{const d=this.walkthroughsService.getWalkthrough(u);d&&await this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,p.URI.from({scheme:p.Schemes.walkThrough,authority:d.source,query:d.id,path:"/"+d.id}),{disableNavigate:!0,preview:!1,forceOpenType:{type:"component",componentId:this.toComponentId(d.id)}})}));for(const u of this.contributesMap){const{extensionId:d,contributes:E}=u;if(!E.length)return;for(const f of E)this.walkthroughsService.registerExtensionWalkthroughContributions(d,f)}}toComponentId(u){return`${p.CUSTOM_EDITOR_SCHEME}-${u}`}registerWalkthroughEditor(u){this.addDispose(this.editorComponentRegistry.registerEditorComponent({uid:this.toComponentId(u.id),component:s.WalkthroughsEditorView,scheme:p.Schemes.walkThrough})),this.addDispose(this.editorComponentRegistry.registerEditorComponentResolver(p.Schemes.walkThrough,(d,E,f)=>{f([{type:m.EditorOpenType.component,componentId:this.toComponentId(u.id)}])}))}};t.WalkthroughsContributionPoint=l,n.__decorate([(0,r.Autowired)(m.EditorComponentRegistry),n.__metadata("design:type",m.EditorComponentRegistry)],l.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,r.Autowired)(g.WalkthroughsService),n.__metadata("design:type",g.WalkthroughsService)],l.prototype,"walkthroughsService",void 0),n.__decorate([(0,r.Autowired)(v.ResourceService),n.__metadata("design:type",v.ResourceService)],l.prototype,"resourceService",void 0),n.__decorate([(0,r.Autowired)(p.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),t.WalkthroughsContributionPoint=l=n.__decorate([(0,r.Injectable)(),(0,_.Contributes)("walkthroughs"),(0,_.LifeCycle)(3)],l)},17441:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkthroughsService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(14951),v=e(2156),m=e(55121),_=e(23268),s=e(99220),g=e(71354),l=u=>u.split(`
31554
31554
  `).filter(d=>d).map(d=>(0,o.parseLinkedText)(d));let h=class extends o.Disposable{constructor(){super(),this._onDidOpenWalkthrough=new o.Emitter,this.onDidOpenWalkthrough=this._onDidOpenWalkthrough.event,this._onDidAddWalkthrough=new o.Emitter,this.onDidAddWalkthrough=this._onDidAddWalkthrough.event,this._onDidProgressStep=new o.Emitter,this.onDidProgressStep=this._onDidProgressStep.event,this.sessionEvents=new Set,this.categoryVisibilityContextKeys=new Set,this.stepCompletionContextKeyExpressions=new Set,this.stepCompletionContextKeys=new Set,this.completionListeners=new Map,this.contributions=new Map,this.steps=new Map,this.extensionSteps=new Map,this.stepProgress={},this.initCompletionEventListeners()}initCompletionEventListeners(){this.addDispose(this.commandService.onDidExecuteCommand(({commandId:d})=>{this.progressByEvent(`${s.CompletionEventsType.onCommand}:${d}`)})),this.addDispose(this.contextKeyService.onDidChangeContext(({payload:d})=>{d.affectsSome(this.stepCompletionContextKeys)&&this.stepCompletionContextKeyExpressions.forEach(E=>{d.affectsSome(new Set(E.keys()))&&this.contextKeyService.match(E)&&this.progressByEvent(s.CompletionEventsType.onContext+":"+E.serialize())})})),this.addDispose(this.eventBus.on(c.ExtensionActivateEvent,({payload:{topic:d,data:E}})=>{d===s.CompletionEventsType.onView&&this.progressByEvent(s.CompletionEventsType.onView+":"+E)})),this.addDispose(this.preferenceService.onPreferenceChanged(({preferenceName:d})=>{d&&this.progressByEvent(s.CompletionEventsType.onSettingChanged+":"+d)}))}registerDoneListeners(d){var E;d.completionEvents.length||d.completionEvents.push(s.CompletionEventsType.stepSelected);for(let f of d.completionEvents){const[a,b,y]=(E=/^([^:]*):?(.*)$/.exec(f))!==null&&E!==void 0?E:[];if(!b){this.logger.error(`Unknown completionEvent ${f} when registering step ${d.id}`);continue}switch(b){case s.CompletionEventsType.onLink:case s.CompletionEventsType.onEvent:case s.CompletionEventsType.onView:case s.CompletionEventsType.onSettingChanged:break;case s.CompletionEventsType.onContext:{const A=_.ContextKeyExpr.deserialize(y);A?(this.stepCompletionContextKeyExpressions.add(A),A.keys().forEach(S=>this.stepCompletionContextKeys.add(S)),f=b+":"+A.serialize(),this.contextKeyService.match(A)&&this.sessionEvents.add(f)):this.logger.error(`Unable to parse context key expression: ${A} in walkthrough step ${d.id}`);break}case s.CompletionEventsType.onStepSelected:case s.CompletionEventsType.stepSelected:f=s.CompletionEventsType.stepSelected+":"+d.id;break;case s.CompletionEventsType.onCommand:f=b+":"+y.replace(/^toSide:/,"");break;case s.CompletionEventsType.onExtensionInstalled:case s.CompletionEventsType.extensionInstalled:f=s.CompletionEventsType.extensionInstalled+":"+y.toLowerCase();break;default:this.logger.error(`${f} Unknown`);continue}this.registerCompletionListener(f,d),this.sessionEvents.has(f)&&this.progressStep(d.id)}}getStep(d){return this.steps.get(d)}registerCompletionListener(d,E){var f;this.completionListeners.has(d)||this.completionListeners.set(d,new Set),(f=this.completionListeners.get(d))===null||f===void 0||f.add(E.id)}registerWalkthrough(d){this.contributions.get(d.id)||(this.contributions.set(d.id,d),d.steps.forEach(f=>{if(this.steps.has(f.id)){this.logger.error(`${f.id} Repeat`);return}this.steps.set(f.id,f),f.when.keys().forEach(a=>this.categoryVisibilityContextKeys.add(a)),this.registerDoneListeners(f)}),d.when.keys().forEach(f=>this.categoryVisibilityContextKeys.add(f)))}getStepProgress(d){return{...d,done:!1,...this.stepProgress[d.id]}}progressByEvent(d){var E;this.sessionEvents.has(d)||(this.sessionEvents.add(d),(E=this.completionListeners.get(d))===null||E===void 0||E.forEach(f=>this.progressStep(f)))}progressStep(d){const E=this.stepProgress[d];if(!E||E.done!==!0){this.stepProgress[d]={done:!0};const f=this.getStep(d);if(!f)return;this._onDidProgressStep.fire(this.getStepProgress(f))}}openWalkthroughEditor(d){this.stepProgress={},this._onDidOpenWalkthrough.fire(d)}getWalkthrough(d){return this.contributions.get(d)}getStepsByExtension(d){return this.extensionSteps.get(d)}getWalkthroughs(){return Array.from(this.contributions.values())}async getFileContent(d,E){const f=c.BinaryBuffer.alloc(0),a=this.extensionManageService.getExtensionInstanceByExtId(d);if(!a||!a.uri)return f;const b=o.URI.from(a.uri).resolve(E).toString(),y=await this.fileSystem.getFileStat(b);if(y&&y.type===c.FileType.File){const{content:A}=await this.fileSystem.readFile(b);return A}return f}async registerExtensionWalkthroughContributions(d,E){var f,a;const b=this.extensionManageService.getExtensionInstanceByExtId(d);if(!b)return;const y=I=>I.startsWith("https://")?o.URI.parse(I):o.URI.from(b.extensionLocation).resolve(I),A=I=>{var O;if(typeof I=="string"){const M=y(I);return{hcDark:M,hcLight:M,dark:M,light:M}}else return{hcDark:y(I.hc),hcLight:y((O=I.hcLight)!==null&&O!==void 0?O:I.light),light:y(I.light),dark:y(I.dark)}},S=d+"#"+E.id,w=((f=E.steps)!==null&&f!==void 0?f:[]).filter(I=>{if(!I.media){this.logger.error("missing media in walkthrough step: "+E.id+"@"+I.id);return}if(!(I.media.markdown||I.media.svg||I.media.image)){this.logger.error("Unknown walkthrough format detected for: "+d+"#"+E.id+"#"+I.id);return}return I}).map((I,O)=>{var M,R,P;const k=l(I.description||""),F=d+"#"+E.id+"#"+I.id;let L;return I.media.image?L={type:"image",altText:I.media.altText,path:A(I.media.image)}:I.media.markdown?L={type:"markdown",path:y(I.media.markdown),base:y((0,m.dirname)(I.media.markdown)),root:o.URI.from(b.extensionLocation)}:I.media.svg&&(L={type:"svg",path:y(I.media.svg),altText:I.media.svg}),this.extensionSteps.set(F,I),{description:k,media:L,completionEvents:(R=(M=I.completionEvents)===null||M===void 0?void 0:M.filter(B=>typeof B=="string"))!==null&&R!==void 0?R:[],id:F,title:I.title,when:(P=_.ContextKeyExpr.deserialize(I.when))!==null&&P!==void 0?P:_.ContextKeyExpr.true(),category:S,order:O}});let T=E.icon?o.URI.from(b.extensionLocation).resolve(E.icon):b.icon;T||(T=await b.getDefaultIcon());const D={description:E.description,title:E.title,id:S,isFeatured:!1,source:d,order:0,steps:w,icon:{type:"image",path:T},when:(a=_.ContextKeyExpr.deserialize(E.when))!==null&&a!==void 0?a:_.ContextKeyExpr.true()};this.registerWalkthrough(D),this._onDidAddWalkthrough.fire(D)}};t.WalkthroughsService=h,n.__decorate([(0,r.Autowired)(g.AbstractExtInstanceManagementService),n.__metadata("design:type",g.AbstractExtInstanceManagementService)],h.prototype,"extensionManageService",void 0),n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],h.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],h.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",v.FileServiceClient)],h.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],h.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),t.WalkthroughsService=h=n.__decorate([(0,r.Injectable)({multiple:!1}),n.__metadata("design:paramtypes",[])],h)},65055:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WORKER_HOST_HARD_CODE=void 0,t.startInsideIframe=r;const n=e(43718);t.WORKER_HOST_HARD_CODE=`
@@ -31738,7 +31738,7 @@ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.mess
31738
31738
 
31739
31739
  \u662F\u5426\u8981\u9000\u51FA?`,"authentication.signOutMessageSimple":"\u662F\u5426\u8981\u9000\u51FA {0}?","authentication.useOtherAccount":"\u4F7F\u7528\u5176\u4ED6\u8D26\u6237\u767B\u5F55","authentication.selectAccount":"\u6269\u5C55 '{0}' \u5C06\u8981\u8BBF\u95EE {1} \u8D26\u6237","authentication.getSessionPlaceholder":"\u9009\u62E9\u4E00\u4E2A\u8D26\u6237\u7ED9 '{0}' \u4F7F\u7528","authentication.confirmAuthenticationAccess":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 '{2}' \u8BBF\u95EE {1}","authentication.confirmLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u767B\u5F55","authentication.confirmReLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u518D\u6B21\u767B\u5F55","authentication.signInRequests":"\u767B\u5F55 {0}","authentication.signOut":"\u9000\u51FA {0}","authentication.noAccounts":"\u76EE\u524D\u6CA1\u6709\u767B\u5F55\u4EFB\u4F55\u8D26\u6237","authentication.signedOut":"\u6210\u529F\u9000\u51FA","refactoring-changes.ask.1.create":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.copy":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.move":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.delete":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.create":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.copy":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.move":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.delete":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.msg.showPreview":"\u663E\u793A\u9884\u89C8","refactoring-changes.msg.skipChanges":"\u8DF3\u8FC7\u66F4\u6539","keyboard.chooseKeyboardLayout":"\u9009\u62E9\u5E03\u5C40\u6587\u4EF6\u914D\u7F6E","keyboard.autoDetect.label":"\u81EA\u52A8\u68C0\u6D4B","keyboard.autoDetect.description":"\uFF08\u5F53\u524D\uFF1A'{0} '\uFF09","keyboard.autoDetect.detail":"\u5C1D\u8BD5\u901A\u8FC7\u6D4F\u89C8\u5668\u53CA\u6309\u952E\u4FE1\u606F\u8FDB\u884C\u5E03\u5C40\u81EA\u52A8\u68C0\u6D4B","editor.configuration.suggest.filterGraceful":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","editor.configuration.suggest.insertMode":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","editor.configuration.suggest.insertMode.insert":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.insertMode.replace":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.localityBonus":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","editor.configuration.suggest.maxVisibleSuggestions.dep":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","editor.configuration.suggest.preview":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","editor.configuration.suggest.shareSuggestSelections":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","editor.configuration.suggest.showIcons":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","editor.configuration.suggest.showInlineDetails":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","editor.configuration.suggest.showStatusBar":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","editor.configuration.suggest.snippetsPreventQuickSuggestions":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","editor.configuration.suggestFontSize":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","editor.configuration.suggestLineHeight":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","editor.configuration.suggestOnTriggerCharacters":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnterSmart":"\u4EC5\u5728\u5EFA\u8BAE\u505A\u51FA\u6587\u672C\u66F4\u6539\u65F6\uFF0C\u624D\u4F7F\u7528 `Enter` \u63A5\u53D7\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnter":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728 `Tab` \u952E\u4E4B\u5916\uFF0C\u8FD8\u4F7F\u7528 `Enter` \u952E\u6765\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u6709\u52A9\u4E8E\u907F\u514D\u5728\u63D2\u5165\u65B0\u884C\u6216\u63A5\u53D7\u5EFA\u8BAE\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","editor.configuration.acceptSuggestionOnCommitCharacter":"\u63A7\u5236\u662F\u5426\u5728\u4F7F\u7528\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u5206\u53F7 (`;`) \u662F\u4E00\u4E2A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u53EF\u4EE5\u63A5\u53D7\u4E00\u4E2A\u5EFA\u8BAE\u5E76\u952E\u5165\u8BE5\u5B57\u7B26\u3002","editor.configuration.snippetSuggestions.top":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u9876\u90E8\u3002","editor.configuration.snippetSuggestions.bottom":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u5E95\u90E8\u3002","editor.configuration.snippetSuggestions.inline":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u6DF7\u5408\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u4E2D\u95F4\u3002","editor.configuration.snippetSuggestions.none":"\u4E0D\u5C55\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","editor.configuration.snippetSuggestions":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u540C\u663E\u793A\u4EE5\u53CA\u5B83\u4EEC\u7684\u6392\u5E8F\u65B9\u5F0F\u3002","editor.configuration.wordBasedSuggestions":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u8BA1\u7B97\u81EA\u52A8\u8865\u5168\u5217\u8868\u3002","editor.configuration.suggestSelection":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.first":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.recentlyUsed":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","editor.configuration.suggestSelection.recentlyUsedByPrefix":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","editor.configuration.tabCompletion":"\u542F\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.off":"\u7981\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.on":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","editor.configuration.tabCompletion.onlySnippets":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"editor.configuration.editor.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.editor.guides.bracketPairsHorizontal":"\u63A7\u5236\u662F\u5426\u542F\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.renderLineHighlight":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","editor.configuration.renderLineHighlight.all":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","editor.configuration.renderLineHighlightOnlyWhenFocus":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","editor.configuration.codeLens":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","editor.configuration.suggest.showClasss":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showColors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstants":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstructors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showCustomcolors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showDeprecated":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEnumMembers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showEnums":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEvents":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFields":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFiles":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFolders":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFunctions":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showInterfaces":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showIssues":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showKeywords":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showMethods":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showModules":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showOperators":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showPropertys":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showReferences":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showSnippets":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showStructs":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTexts":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTypeParameters":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showUnits":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showUsers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showValues":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showVariables":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.maxVisibleSuggestions":"\u63A7\u5236 IntelliSense \u5728\u663E\u793A\u6EDA\u52A8\u6761\u4E4B\u524D\u5C06\u663E\u793A\u7684\u5EFA\u8BAE\u6570\u91CF\uFF08\u6700\u591A 15 \u4E2A\uFF09\u3002","editor.configuration.suggest.details.visible":"\u63A7\u5236\u7F16\u8F91\u5668\u4EE3\u7801\u8865\u5168\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u8BE6\u60C5\u4FE1\u606F","editor.configuration.suggest.filtered":"\u63A7\u5236\u662F\u5426\u5E94\u4ECE IntelliSense \u4E2D\u8FC7\u6EE4\u6389\u67D0\u4E9B\u5EFA\u8BAE\u7C7B\u578B\u3002\u53EF\u4EE5\u5728\u6B64\u5904\u627E\u5230\u4E00\u4EFD\u5EFA\u8BAE\u7C7B\u578B\u5217\u8868: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions.","editor.configuration.suggest.filtered.method":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `method` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.function":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `function` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constructor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constructor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.field":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `field` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.variable":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `variable` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.class":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `class` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.struct":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `struct` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.interface":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `interface` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.module":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `module` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.property":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `property` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.event":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `event` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.operator":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `operator` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.unit":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `unit` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.value":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `value` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constant":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constant` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enum":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enum` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enumMember":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enumMember` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.keyword":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `keyword` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.text":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `text` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.color":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `color` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.file":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `file` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.reference":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `reference` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.customcolor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `customcolor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.folder":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `folder` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.typeParameter":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `typeParameter` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.snippet":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `snippet` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.editor.gotoLocation.multiple":'\u63A7\u5236 "\u8F6C\u5230" \u547D\u4EE4\uFF08\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\uFF09\u5728\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6\u7684\u884C\u4E3A\u3002',"editor.configuration.gotoLocation.multiple.peek":"\u5728\u901F\u89C8\u89C6\u56FE(Peek View)\u4E2D\u663E\u793A\u7ED3\u679C\u3002(\u9ED8\u8BA4)","editor.configuration.gotoLocation.multiple.gotoAndPeek":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u901F\u89C8\u89C6\u56FE(Peek View)\u3002","editor.configuration.gotoLocation.multiple.goto":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u7ED3\u679C\u542F\u7528\u65E0\u901F\u89C8\u5BFC\u822A","editor.configuration.experimental.stickyScroll.enabled":"\u5728\u7F16\u8F91\u5668\u9876\u90E8\u7684\u6EDA\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u5D4C\u5957\u7684\u5F53\u524D\u4F5C\u7528\u57DF\u3002","editor.configuration.maxTokenizationLineLength":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BC6\u3002","editor.configuration.codeActionsOnSave.organizeImports":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u6574\u7406\u5BFC\u5165\uFF08Import\uFF09\u8BED\u53E5\u3002","editor.configuration.codeActionsOnSave.fixAll":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u8FD0\u884C\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u3002","editor.configuration.codeActionsOnSave":"\u5728\u4FDD\u5B58\u65F6\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7C7B\u578B","editor.configuration.codeActionsOnSaveTimeout":"\u5728\u6B64\u8D85\u65F6\u65F6\u95F4(\u6BEB\u79D2)\u4E4B\u540E\u4EE3\u7801\u64CD\u4F5C\u5C06\u88AB\u53D6\u6D88\u3002","editor.configuration.codeActionsOnSaveNotification":"\u4EE3\u7801\u64CD\u4F5C\u6267\u884C\u65F6\u662F\u5426\u5C55\u793A\u901A\u77E5\u4FE1\u606F","editor.configuration.quickSuggestionsDelay":"\u63A7\u5236\u663E\u793A\u667A\u80FD\u63D0\u793A\u7684\u5EF6\u8FDF\u65F6\u957F (\u6BEB\u79D2)\u3002","editor.configuration.tabSize":"\u63A7\u5236 Tab \u7F29\u8FDB\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u82E5\u542F\u7528 `#editor.detectIndentation#`\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6","editor.configuration.fontWeight":'\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\uFF0C\u63A5\u6536 "normal" \u548C "bold" \u5173\u952E\u8BCD\u6216\u8005 1 \u5230 1000 \u6570\u503C\u3002',"editor.configuration.largeFileSize":"\u63A7\u5236\u8D85\u5927\u6587\u4EF6\u7684\u81EA\u5B9A\u4E49\u4F53\u79EF\u3002(\u5355\u4F4D\uFF1AB)","editor.configuration.preferredFormatter":"\u914D\u7F6E\u4F18\u5148\u4F7F\u7528\u7684\u683C\u5F0F\u5316\u5668\u3002","editor.configuration.wrapTab":"\u63A7\u5236\u5F53\u7F16\u8F91\u5668 Tab \u8D85\u8FC7\u53EF\u7528\u7A7A\u95F4\u65F6\uFF0C\u662F\u5426\u4F7F\u7528\u6362\u884C\u6765\u4EE3\u66FF\u6EDA\u52A8\u6A21\u5F0F\u3002","editor.configuration.enablePreviewFromCodeNavigation":"\u63A7\u5236\u5F53\u4EE3\u7801\u5BFC\u822A\u4ECE\u5176\u51FA\u53D1\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u4ECD\u5904\u4E8E\u9884\u89C8\u6A21\u5F0F\u3002","editor.configuration.formatOnSaveTimeout":"\u63A7\u5236\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.formatOnSave#` \u542F\u7528\u65F6\u751F\u6548\u3002","editor.configuration.inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","editor.configuration.inlineSuggest.showToolbar":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.always":"\u6BCF\u5F53\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u65F6\uFF0C\u5C31\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.onHover":"\u5C06\u9F20\u6807\u60AC\u505C\u5728\u5185\u8054\u5EFA\u8BAE\u4E0A\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.never":"\u6C38\u4E0D\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.hover.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u63D0\u793A\u3002","editor.configuration.hover.delay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u663E\u793A\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002","editor.configuration.hover.sticky":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u662F\u5426\u5728\u9F20\u6807\u60AC\u505C\u65F6\u4FDD\u6301\u53EF\u89C1\u3002","editor.configuration.hover.hidingDelay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u9690\u85CF\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u9700\u8981 `editor.hover.sticky` \u8BBE\u7F6E\u4E3A true \u65F6\u751F\u6548\u3002","editor.configuration.hover.above":"\u4F18\u5148\u663E\u793A\u4EE3\u7801\u63D0\u793A\u5728\u884C\u4E0A\u65B9\uFF0C\u5982\u679C\u884C\u6709\u7A7A\u95F4\u3002","editor.configuration.autoSave":"\u63A7\u5236\u5982\u4F55\u81EA\u52A8\u4FDD\u5B58\u6587\u4EF6\u3002","editor.configuration.formatOnSave":"\u5728\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u6587\u4EF6","editor.configuration.formatOnType":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5728\u952E\u5165\u540E\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","editor.configuration.formatOnPaste":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u9700\u8981\u5F53\u524D\u6587\u4EF6\u6709\u4E00\u4E2A\u683C\u5F0F\u5316\u5DE5\u5177\u5E76\u4E14\u8BE5\u683C\u5F0F\u5316\u683C\u5C40\u5FC5\u987B\u80FD\u591F\u5728\u6587\u6863\u4E2D\u683C\u5F0F\u5316\u4E00\u4E2A\u8303\u56F4\u3002","editor.configuration.autoIndent":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u6216\u79FB\u52A8\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002\u5FC5\u987B\u63D0\u4F9B\u5E26\u6709\u8BE5\u8BED\u8A00\u7F29\u8FDB\u89C4\u5219\u7684\u6269\u5C55\u3002","editor.configuration.autoSaveDelay":"\u63A7\u5236\u81EA\u52A8\u4FDD\u5B58\u7684\u5EF6\u8FDF\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.autoSave#` \u8BBE\u7F6E\u4E3A\u201C\u7F16\u8F91\u540E\u81EA\u52A8\u4FDD\u5B58\u201D\u65F6\u751F\u6548\u3002","editor.configuration.askIfDiff":"\u4FDD\u5B58\u6587\u4EF6\u65F6\u5982\u679C\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\u8F83\u65B0\uFF0C\u8FDB\u884C\u63D0\u793A\u624B\u52A8\u89E3\u51B3\u4FDD\u5B58\u51B2\u7A81\u3002","editor.configuration.forceReadOnly":"\u662F\u5426\u542F\u7528 \u53EA\u8BFB\u6A21\u5F0F","editor.configuration.bracketPairColorization.enabled":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","editor.configuration.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.mouseBackForwardToNavigate":"\u5141\u8BB8\u4F7F\u7528\u9F20\u6807\u6309\u94AE 4 \u548C 5 \u6765\u6267\u884C\u547D\u4EE4\u201CGo Back\u201D\u548C\u201CGo Forward\u201D\u3002","editor.configuration.previewMode":"\u4F7F\u7528\u9884\u89C8\u6A21\u5F0F\u6253\u5F00","editor.configuration.tokenColorCustomizations":"\u8986\u76D6\u5F53\u524D\u6240\u9009\u989C\u8272\u4E3B\u9898\u4E2D\u7684\u7F16\u8F91\u5668\u989C\u8272\u548C\u5B57\u4F53\u6837\u5F0F","editor.configuration.workbench.editorAssociations":'\u5C06 glob \u6A21\u5F0F\u914D\u7F6E\u5230\u7F16\u8F91\u5668(\u4F8B\u5982 `"*\u5341\u516D\u8FDB\u5236": "hexEditor.hexEdit"`)\u3002\u8FD9\u4E9B\u4F18\u5148\u987A\u5E8F\u9AD8\u4E8E\u9ED8\u8BA4\u884C\u4E3A\u3002',"editor.configuration.guides.indentation":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.guides.highlightActiveIndentation":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.trimAutoWhitespace":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","editor.configuration.unicodeHighlight.ambiguousCharacters":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u53EF\u80FD\u4E0E\u57FA\u672C ASCII \u5B57\u7B26\u6DF7\u6DC6\u7684\u5B57\u7B26\uFF0C\u4F46\u5F53\u524D\u7528\u6237\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684\u5B57\u7B26\u9664\u5916\u3002","editor.configuration.lightbulb.enabled":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.off":"\u7981\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.onCode":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.on":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u6216\u5728\u7A7A\u7684\u884C\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","diffEditor.configuration.renderSideBySide":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u3002","diffEditor.configuration.ignoreTrimWhitespace":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u767D\u5B57\u7B26\u5C06\u4F1A\u5FFD\u7565","diffEditor.action.toggleCollapseUnchangedRegions":"\u6298\u53E0\u672A\u66F4\u6539\u7684\u4EE3\u7801\u533A\u57DF","inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","view.component.renderedError":"\u89C6\u56FE\u7EC4\u4EF6\u6E32\u67D3\u5F02\u5E38","view.component.tryAgain":"\u91CD\u65B0\u52A0\u8F7D","test.title":"\u6D4B\u8BD5\u7BA1\u7406\u5668","test.result.runFinished":"\u6D4B\u8BD5\u8FD0\u884C\u5B8C\u6210\u4E8E {0}","test.task.unnamed":"\u672A\u547D\u540D\u4EFB\u52A1","test.results":"\u6D4B\u8BD5\u7ED3\u679C","menu.missing.command":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4\u4E0D\u5B58\u5728\uFF1A{1}","menu.missing.altCommand":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4(altCommand)\u4E0D\u5B58\u5728\uFF1A{1}","menu.dupe.command":"\u83DC\u5355{0} command({1}) \u548C alt({2}) \u6CE8\u518C\u91CD\u590D","command.category.developerTools":"\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177","connection.start.rtt":"\u67E5\u770B\u901A\u4FE1\u5EF6\u8FDF","connection.stop.rtt":"\u5173\u95ED\u901A\u4FE1\u5EF6\u8FDF\u68C0\u67E5","debug.terminal.label":"\u521B\u5EFA Javascript Debug Terminal","debug.terminal.title":"\u8C03\u8BD5\u8FDB\u7A0B","workbench.action.tasks.runTask":"\u8FD0\u884C\u4EFB\u52A1","workbench.action.tasks.reRunTask":"\u6267\u884C\u4E0A\u6B21\u8FD0\u884C\u7684\u4EFB\u52A1","workbench.action.tasks.restartTask":"\u91CD\u65B0\u5F00\u59CB\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1","workbench.action.tasks.terminate":"\u7EC8\u6B62\u4EFB\u52A1","workbench.action.tasks.showTasks":"\u5C55\u793A\u4EFB\u52A1","workbench.action.tasks.showLog":"\u5C55\u793A\u4EFB\u52A1\u65E5\u5FD7","task.contribute":"\u8D21\u732E","task.cannotFindTask":"\u672A\u627E\u5230 {0} \u7684\u4EFB\u52A1\uFF0C\u6309\u56DE\u8F66\u952E\u8FD4\u56DE","comment.reply.count":"{0} \u4E2A\u8BC4\u8BBA","comment.reply.lastReply":"\u6700\u540E\u7531 {0} \u8BC4\u8BBA","walkthroughs.welcome":"\u6B22\u8FCE\u4F7F\u7528","walkthroughs.get.started":"\u6253\u5F00 `\u5165\u95E8` \u6F14\u793A","mergeEditor.reset":"\u91CD\u7F6E","mergeEditor.workbench.tab.name":"\u6B63\u5728\u5408\u5E76: {0}","mergeEditor.conflict.action.apply.confirm.title":"\u5F53\u524D\u6587\u4EF6\u8FD8\u6709\u672A\u5904\u7406\u7684\u51B2\u7A81\u6216\u53D8\u66F4\uFF0C\u662F\u5426\u5E94\u7528\u5E76\u4FDD\u5B58\u66F4\u6539\uFF1F","mergeEditor.conflict.action.apply.confirm.continue":"\u7EE7\u7EED\u5408\u5E76","mergeEditor.conflict.action.apply.confirm.complete":"\u786E\u8BA4\u4FDD\u5B58\u5E76\u66F4\u6539","mergeEditor.action.button.apply":"\u5E94\u7528\u66F4\u6539","mergeEditor.action.button.apply-and-stash":"\u5E94\u7528\u5E76\u6682\u5B58","mergeEditor.action.button.accept.left":"\u63A5\u53D7\u5DE6\u8FB9","mergeEditor.action.button.accept.right":"\u63A5\u53D7\u53F3\u8FB9","mergeEditor.open.3way":"3-way \u7F16\u8F91\u5668","mergeEditor.conflict.prev":"\u4E0A\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.next":"\u4E0B\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.ai.resolve.all":"AI \u89E3\u51B3","mergeEditor.conflict.ai.resolve.all.stop":"\u5168\u90E8\u505C\u6B62","mergeEditor.open.tradition":"\u6587\u672C\u7F16\u8F91\u5668","workbench.quickOpen.preserveInput":"\u662F\u5426\u5728 QuickOpen \u7684\u8F93\u5165\u6846\uFF08\u5305\u62EC\u547D\u4EE4\u9762\u677F\uFF09\u4E2D\u4FDD\u7559\u4E0A\u6B21\u8F93\u5165\u7684\u5185\u5BB9","aiNative.chat.ai.assistant.name":"AI \u7814\u53D1\u52A9\u624B","aiNative.chat.input.placeholder.default":"\u53EF\u4EE5\u95EE\u6211\u4EFB\u4F55\u95EE\u9898\uFF0C\u8F93\u5165 @ \u53EF\u5F15\u7528\u5185\u5BB9","aiNative.chat.stop.immediately":"\u6211\u5148\u4E0D\u60F3\u4E86\uFF0C\u6709\u9700\u8981\u53EF\u4EE5\u968F\u65F6\u95EE\u6211","aiNative.chat.error.response":"\u5F53\u524D\u4E0E\u6211\u4E92\u52A8\u7684\u4EBA\u592A\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u4E0E\u652F\u6301","aiNative.chat.code.insert":"\u63D2\u5165\u4EE3\u7801","aiNative.chat.code.copy":"\u590D\u5236\u4EE3\u7801","aiNative.chat.code.copy.success":"\u590D\u5236\u6210\u529F","aiNative.chat.expand.unfullscreen":"\u6536\u8D77","aiNative.chat.expand.fullescreen":"\u5C55\u5F00\u5168\u5C4F","aiNative.chat.enter.send":"Enter \u53D1\u9001","aiNative.chat.defaultContextFile":"\u5F53\u524D\u6587\u4EF6","aiNative.chat.defaultContextFolder":"\u5F53\u524D\u6587\u4EF6\u5939","aiNative.chat.thinking":"\u6DF1\u5EA6\u601D\u8003","aiNative.chat.imageUpload":"\u4E0A\u4F20\u56FE\u7247","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"\u91C7\u7EB3","aiNative.inline.chat.operate.thumbsup.title":"\u8D5E","aiNative.inline.chat.operate.thumbsdown.title":"\u8E29","aiNative.inline.chat.operate.loading.cancel":"\u6309 ESC \u53D6\u6D88","aiNative.inline.chat.input.placeholder.default":"\u8BF7\u8F93\u5165\u4F60\u7684\u610F\u56FE...(\u2191\u2193 \u5207\u6362\u5386\u53F2)","aiNative.inline.chat.generating.canceled":"Inline Chat \u5DF2\u505C\u6B62\u751F\u6210","aiNative.inline.hint.widget.placeholder":"\u6309 {0} \u5524\u8D77 Inline Chat","aiNative.inline.problem.fix.title":"AI \u4FEE\u590D","aiNative.inline.diff.accept":"\u91C7\u7EB3","aiNative.inline.diff.reject":"\u62D2\u7EDD","aiNative.resolve.conflict.dialog.afresh":"\u4F60\u786E\u5B9A\u8981\u91CD\u65B0\u751F\u6210\u5417\uFF1F","aiNative.resolve.conflict.dialog.detection":`\u68C0\u6D4B\u5230\u60A8\u5DF2\u505A\u4E86\u4FEE\u6539\uFF0C\u91CD\u65B0\u751F\u6210\u4F1A\u8986\u76D6\u6389
31740
31740
  \u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...c.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.contextWindow":"\u4E0A\u4E0B\u6587\u7A97\u53E3","preference.ai.native.contextWindow.description":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u7684\u6700\u5927Token\u6570","preference.ai.native.maxTokens":"\u6700\u5927\u8F93\u51FA","preference.ai.native.maxTokens.description":"\u6700\u5927\u8F93\u51FAToken\u6570","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.command":"\u547D\u4EE4","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.serverHost.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.serverHost.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.manage.connections":"\u7BA1\u7406\u4F60\u7684 MCP \u670D\u52A1\u5668\u8FDE\u63A5","ai.native.mcp.enabled":"\u5DF2\u542F\u7528","ai.native.mcp.disabled":"\u5DF2\u7981\u7528","ai.native.mcp.enable.title":"\u542F\u52A8\u8BE5\u670D\u52A1","ai.native.mcp.disable.title":"\u505C\u6B62\u8BE5\u670D\u52A1","ai.native.mcp.config.title":"MCP \u914D\u7F6E","ai.native.mcp.tool.arguments":"\u53C2\u6570","ai.native.mcp.tool.results":"\u8FD4\u56DE","ai.native.mcp.tool.action.edit":"\u4FEE\u6539","ai.native.mcp.tool.action.delete":"\u5220\u9664","ai.native.mcp.tool.action.sync":"\u540C\u6B65"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),c=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),g=_?[]:void 0,l=o.parse(s,g);if(g&&_)for(const h of g)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(l))return l;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),g="keymaps-preview";let l=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(f){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:f}}provideResourceSubname(f,a){return null}async shouldCloseResource(f,a){return!0}};t.KeymapsResourceProvider=l,t.KeymapsResourceProvider=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const f="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:f}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(f){f.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),f.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),f.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(f){f.registerMenuItem(c.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),f.registerMenuItem(c.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),f.registerMenuItem(c.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(f){f.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(f){f.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(f){f.registerEditorComponent({component:s.KeymapsView,uid:g,scheme:_.KEYMAPS_SCHEME}),f.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(a,b,y)=>{y([{type:p.EditorOpenType.component,componentId:g}])})}async chooseLayout(){const f=this.layoutProvider.currentLayoutData,a={label:(0,o.localize)("keyboard.autoDetect.label"),description:f&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(f.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},b=this.layoutProvider.allLayoutData.map(S=>this.toQuickPickValue(S,f===S));let y;y=[a,...b];const A=await this.quickPickService.show(y,{placeholder:"Choose a keyboard layout"});if(A)return this.layoutProvider.setLayoutData(A)}toQuickPickValue(f,a){return{label:(0,o.getKeyboardLayoutId)(f.layout),value:f}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(l),n.__metadata("design:type",l)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,c.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),c=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let g=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,f)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const a=this.storeKeybindings||[];let b=!1;for(const y of a){const A={when:y.when,command:y.command,keybinding:y.key};if(y.command===u.command){b=!0,this.unregisterUserKeybinding(A);const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}y.key=u.keybinding,this.registerUserKeybinding({...A,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!b){const y=this.keybindings.find(S=>S.id===u.command&&this.getRaw(S.when)===u.when);if(y&&y.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(y.when),command:y.id,keybinding:this.getRaw(y.keybinding)});const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}}const A={when:this.getWhen(u),command:u.command,key:u.keybinding};a.push(A),this.registerUserKeybinding(u)}return this.saveKeybinding(a).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(y=>{f(y),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const f=["id","command","keybinding","when","context","source"];let a=!1;for(const b of f){const y=E[b];if(y){const A=o.match(h,y,this.fuzzyOptions);if(A)E[b]=A.rendered,a=!0;else if(b==="keybinding"){const S=h.split("+"),w=y.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=y.split("+"),T.shift();const I=[...D];let O=0;if(S.forEach(M=>{let R={rendered:"",score:0},P=-1;if(y){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===S.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[b]=M}E[b]=I.join("+"),a=!0}}}}a&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const f=this.commandRegistry.getCommand(this.getRaw(E.command)),a=this.storeKeybindings.find(b=>f&&b.command===f.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:f?f.id:this.getRaw(E.command),command:(f?f.label||f.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:a?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
31741
- }`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(b=>({when:b.when,command:this.getValidateCommand(b.command),keybinding:b.key||b.keybinding})),f=[],a=[];this.disposeRegistedKeybinding(),E.forEach(b=>{b.command.startsWith("-")?a.push(b):f.push(b)}),f.map(b=>{this.unregisterDefaultKeybinding(b,!0),this.registerUserKeybinding(b)}),a.map(b=>{b.command=b.command.slice(1),this.unregisterDefaultKeybinding(b,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const f={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(f);const a=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(a,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(f)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const y of h){const A=this.keybindingRegistry.getKeybindingsForCommand(y.id);!A||!A.length?y.label&&u.push({id:y.id,command:y.label,hasCommandLabel:!0}):A.forEach(S=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>y&&D.command===y.id);w={id:y.id,command:y.label||y.id,keybinding:T?T.key:S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(A&&S),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!y.label}}else w={id:y.id,command:y.label||y.id,keybinding:A&&S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:this.getWhen(A&&S),source:A&&S&&typeof S.scope<"u"?this.getScope(S.scope):"",hasCommandLabel:!!y.label};u.push(w)})}const d=u.sort((y,A)=>this.compareItem(y,A)),E=d.filter(y=>!!y.keybinding),f=d.filter(y=>!y.keybinding&&y.hasCommandLabel),a=E.filter(y=>y.hasCommandLabel),b=E.filter(y=>!y.hasCommandLabel);return[...a,...b,...f]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=g,g.DEFAULT_SEARCH_DELAY=100,g.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,c.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],g.prototype,"parser",void 0),r.__decorate([(0,c.Autowired)(p.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,c.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keybindingRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],g.prototype,"keybindingService",void 0),r.__decorate([(0,c.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],g.prototype,"filesystem",void 0),r.__decorate([(0,c.Autowired)(p.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],g.prototype,"progressService",void 0),t.KeymapService=g=n=r.__decorate([(0,c.Injectable)()],g)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:g,validateKeybinding:l,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:f,covert:a,clearCovert:b,fixed:y,onDidKeymapChanges:A,updateKeybindings:S}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:Q,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=Q,[Z,X]=o.default.useState(!1),[ie,oe]=o.default.useState(K||""),[le,pe]=o.default.useState(!1),[q,Ee]=o.default.useState(),[_e,te]=o.default.useState([]),ge=()=>{le||(y(),pe(!0)),b(),oe(E(K)),X(!0)},Te=Be=>{const me=l(Q,Be);me?me!==" "?Ee({message:me,type:c.VALIDATE_TYPE.ERROR}):X(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:Be}),X(!1),b())},Pe=()=>{X(!1)},Ae=Be=>{Be.stopPropagation(),Be.preventDefault();const{key:me}=p.KeyCode.createKeyCode(Be.nativeEvent),re=Be.nativeEvent.shiftKey||Be.nativeEvent.metaKey||Be.nativeEvent.altKey||Be.nativeEvent.ctrlKey;me&&p.Key.ENTER.keyCode===me.keyCode&&!re?ie&&Te(ie):oe(a(Be.nativeEvent))},we=()=>{const Be=()=>{Ee(void 0),ie&&oe(""),b()},me=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:me},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Be,title:(0,p.localize)("keymaps.action.clear")}))},be=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),fe=Be=>{const me=re=>{re.preventDefault(),le||(y(),pe(!0)),d({command:E($),when:E(z)||"",keybinding:ie})};if(Be&&E(Be)===f(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:me,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&_e.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",_e.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},_e.map((Be,me)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Be.id}_${me}`,title:`${Be.command}-${Be.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(Be.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(Be.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(Be.when)||"\u2014"))))))},Re=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},we(),o.default.createElement(c.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:ie,onKeyDown:Ae,onBlur:Pe}),be(),xe());{const Be=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:ge},o.default.createElement("div",{className:m.default.keybinding_action,onClick:ge},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),fe(H)),Be&&Be[0]?Be.map((me,re)=>{const he=me.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${me}_${re}`},he.map((Oe,Se)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${Se}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Ee(void 0),te(ie&&Z?h(Q,ie):[])},[ie]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Re()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(z||"\u2014"),dangerouslySetInnerHTML:{__html:z||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const Q=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:Q}))},k=(0,o.useCallback)(Q=>{I(Q),g(Q)},[D]),F=Q=>{if(!w){const V=Q.target&&Q.target.value?Q.target.value.toLocaleLowerCase():"";k(V)}},L=Q=>{if(w){Q.stopPropagation(),Q.preventDefault();const{key:V}=p.KeyCode.createKeyCode(Q.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(a(Q.nativeEvent))}},B=()=>{D&&(I(""),g("")),b()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(c.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const Q=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},Q.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const Q=A(V=>{M(V)});return S(),()=>{Q.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(c.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:c.LogServiceForClientPath,clientToken:c.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const g=new p.LogServiceClient(_);return g.setup(this.logServiceForClient,s),g}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(c.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let c=n[o];if(c instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=c.stack,c=e(p)}else if(typeof c=="object")try{c=JSON.stringify(c)}catch{}else if(typeof c=="symbol")try{c=c.toString()}catch{}r+=(o>0?" ":"")+c}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),c=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),g=e(68969),l=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,f){super(),this.containerId=E,this.noRestore=f,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,l.observableValue)(this,[]),this.stateObservable=(0,l.observableValue)(this,{}),this.visibleViews=(0,l.derived)(this,a=>{const b=this.viewsObservable.read(a);return this.stateObservable.read(a),b.filter(y=>!this.getViewState(y.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var a,b;let y;if(Object.keys(this.state).forEach(A=>{this.state[A].hidden||this.state[A].collapsed||(y?(this.state[A].size||0)>(this.state[y].size||0)&&(y=A):y=A)}),y&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((a=this.splitPanelService.rootNode)===null||a===void 0)&&a.clientHeight){const A=((b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight)-this.getPanelFullHeight();if(A){const S=this.state;S[y].size+=A,(0,l.transaction)(w=>{this.stateObservable.set({...S},w)}),this.toggleOpen(y,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(a,b,y)=>{this.doToggleOpen(a,b,y)},this.handleContextMenu=(a,b)=>{a.preventDefault();const y=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:b}]},contextKeyService:b?this.viewContextKeyRegistry.getContextKeyService(b):void 0}),A=y.getGroupedMenuNodes();y.dispose(),this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})},this.addDispose((0,l.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,a=>{this.topViewKey=a.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(a,b)=>a||b.payload.affectsSome(this.viewWhenContextkeys),50)(a=>a&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,f){const a=this.views.find(b=>b.id===E);a?(a.name=f,this.didChangeViewTitleEmitter.fire({id:E,title:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,f){const a=this.views.find(b=>b.id===E);a?(a.description=f,this.didChangeViewTitleEmitter.fire({id:E,description:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,f){const a=this.views.find(b=>b.id===E);a?(a.message=f,this.didChangeViewTitleEmitter.fire({id:E,message:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,f){const a=this.views.find(b=>b.id===E);a?(a.badge=f,this.didChangeViewTitleEmitter.fire({id:E,badge:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(a=>E[a.id]={collapsed:!1,hidden:!1});const f=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(f,E)||(0,l.transaction)(a=>{this.stateObservable.set({...f},a)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let f=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,a;if(this.visibleViews.get().forEach((b,y)=>{const A=this.state[b.id];A.collapsed?(this.setSize(y,0,!1,!0),f-=this.headerSize):!A.collapsed&&A.size&&(this.setSize(y,A.size,!1,!0),f-=A.size,a=y)}),a){const b=this.visibleViews.get()[a];this.setSize(a,this.state[b.id].size+f)}}initConfig(E){const{headerSize:f,minSize:a}=E;this.headerSize=f,this.minSize=a}registerContextService(E){let f=this.viewContextKeyRegistry.getContextKeyService(E);return f||(f=this.contextKeyService.createScoped(),f.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,f)),f}getSectionToolbarMenu(E){const f=this.registerContextService(E),a=this.menuService.createMenu(s.MenuId.ViewTitle,f),b=this.views.find(y=>y.id===E);return b&&(b.titleMenu=a),a}updateView(E){(0,l.transaction)(f=>{const a=this.views;if(E.priority){const b=a.findIndex(y=>(y.priority||0)<(E.priority||0));a.splice(b===-1?a.length:b,0,E),this.viewsObservable.set([...a],f)}else this.viewsObservable.set([...a,E],f)})}appendView(E,f){if(this.appendedViewSet.has(E.id)&&!f)return;const a=new p.DisposableCollection;a.push(this.progressService.registerProgressIndicator(E.id));const b=this.views.findIndex(y=>y.id===E.id);if(b!==-1){(0,l.transaction)(y=>{const A=this.views;A[b]=Object.assign({},A[b],E),this.viewsObservable.set([...A],y)});return}if(E.when){this.viewsWithContextKey.add(E);const y=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(y))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),a.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,a),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,a),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const f=this.views.findIndex(b=>b.id===E);f>-1&&(0,l.transaction)(b=>{const y=this.views;y.splice(f,1),this.viewsObservable.set([...y],b)});const a=this.toDispose.get(E);a&&a.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const f=this.forceRevealContextKeys.get(E);f&&f.key.set(!0)}disposeAll(){(0,l.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const f=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const a=document.getElementById(f);if(a){const b=this.state;b[f].size=a.clientHeight,(0,l.transaction)(y=>{this.stateObservable.set({...b},y)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(f=>this.views.find(a=>a.id===f)&&f!==E).reduce((f,a)=>f+(this.state[a].collapsed?this.headerSize:this.state[a].hidden?0:this.state[a].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const f=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${f} == true`,key:this.contextKeyService.createKey(f,!1)}),this.viewWhenContextkeys.add(f),`${f} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:f})=>{this.doToggleView(f)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,f){const a=`view-container.hide.${E}`;return f.push(this.commandRegistry.registerCommand({id:a},{execute:({forceShow:b}={})=>{this.doToggleView(E,b)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),a}doToggleView(E,f){const a=this.getViewState(E);let b;f===void 0?b=!a.hidden:b=!f,a.hidden=b,this.updateViewState(E,a),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,f){this.doToggleView(E,f)}get expandedViews(){return this.views.filter(E=>{const f=this.state[E.id];return!f||f&&!f.hidden&&!f.collapsed})}toggleOpen(E,f){const a=this.visibleViews.get().findIndex(b=>b.id===E);a>-1&&this.doToggleOpen(E,f,a,!0)}getViewState(E){let f=this.state[E];const a=this.views.find(b=>b.id===E);return f||(this.updateViewState(E,{collapsed:a?.collapsed||!1,hidden:a?.hidden||!1}),f=this.state[E]),f}updateViewState(E,f){const a=this.state;a[E]=f,(0,l.transaction)(b=>{this.stateObservable.set({...a},b)})}doToggleOpen(E,f,a,b){var y;const A=this.getViewState(E);this.updateViewState(E,{...A,collapsed:f});const S=this.mainLayoutService.getContainer(this.containerId);if(((y=S?.options)===null||y===void 0?void 0:y.alignment)!=="horizontal"){let w;f?w=this.setSize(a,0,!1,b):w=this.setSize(a,this.expandedViews.length===1?this.getAvailableSize():A.size||this.minSize,!1,b);for(let T=this.visibleViews.get().length-1;T>a;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b);for(let T=a-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:f}))}setSize(E,f,a,b){var y;const A=this.visibleViews.get()[E],S=(y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;b||w.classList.add("resize-ease"),!f&&!a?(f=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(A.id);let I=f;if(a&&(I=Math.max(T-f,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(S))if(I+E*this.minSize>S)I-=I+E*this.minSize-S;else{const O=this.getPanelFullHeight(A.id);I+O<S&&(I+=S-(I+O))}if(this.rendered){let O;f===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,b||setTimeout(()=>{w.classList.remove("resize-ease")},200),a?I-(T-f):f-T}getAvailableSize(){var E;const f=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return f?f-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,f){this.contextKeyService.getKeysInWhen(f).forEach(b=>{E.add(b)})}};t.AccordionService=u,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,c.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,c.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,c.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,c.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,c.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,c.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,c.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,c.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,c.Autowired)(g.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:l="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:f,noRestore:a,style:b})=>{const y=(0,o.useInjectable)(p.LayoutViewSizeConfig),A=(0,o.useInjectable)(m.AccordionServiceFactory)(u,a),S=(0,o.useAutorun)(A.visibleViews);(0,o.useAutorun)(A.stateObservable);const w=(0,r.useMemo)(()=>d||y.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)A.appendView(T)},[h]),r.default.useEffect(()=>{A.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(c.SplitPanel,{className:f,style:b,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:l==="horizontal"?"left-to-right":"top-to-bottom"},S.map((T,D)=>{const I=A.getViewState(T.id),O=T.titleMenu||A.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(_.AccordionSection,{noHeader:S.length===1,onItemClick:()=>{A.handleSectionClick(T.id,!M,D)},onContextMenuHandler:A.handleContextMenu,alignment:l,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:A,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?d:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const g=({children:l})=>r.default.createElement("div",null,l);t.Panel=g,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),g=e(52416),l=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:f,headerClass:a,onItemClick:b,noHeader:y,children:A,badge:S,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,c.useInjectable)(g.IIconService),L=(0,c.useDesignStyles)(l.default.actions_wrap,"actions_wrap"),B=(0,c.useDesignStyles)(l.default.kt_split_panel,"kt_split_panel"),j=(0,c.useDesignStyles)(l.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,c.useDesignStyles)(l.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,c.useDesignStyles)(l.default.section_badge,"section_badge"),Q=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:f,badge:S});o.default.useEffect(()=>{const oe=R.onDidChangeViewTitle(({id:le,title:pe,description:q,message:Ee,badge:_e})=>{let te=!1;const ge={...V};T===le&&pe&&pe!==V.header&&(ge.header=pe,te=!0),T===le&&_e!==V.badge&&(ge.badge=_e,te=!0),T===le&&q&&q!==V.description&&(ge.description=q,te=!0),T===le&&Ee&&Ee!==V.message&&(ge.message=Ee,te=!0),te&&$(ge)});return()=>{oe.dispose()}},[]);const Y=o.default.useCallback(()=>{b()},[b]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,c.useViewState)(T,Q,!0),Z=(0,c.useInjectable)(m.IProgressService).getIndicator(T),X=A,ie=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:B,"data-view-id":T,draggable:!1},!y&&o.default.createElement("div",{...h,className:(0,r.default)(j,a),onClick:Y,onContextMenu:oe=>P(oe,T),style:{height:ie,lineHeight:ie}},o.default.createElement("div",{className:l.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,c.getIcon)("arrow-down"),l.default.arrow_icon,M?"":l.default.kt_mod_collapsed)}),o.default.createElement("div",{className:l.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:l.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:O}):o.default.createElement(p.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[l.default.hide]:!M}]),style:z,ref:Q},o.default.createElement(_.ProgressBar,{className:l.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(c.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:l.default.kt_split_panel_message},V.message),o.default.createElement(X,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(c.TabbarServiceFactory)(v.side),s=r.default.useCallback(l=>{v.containerId&&v.side&&_.handleDragStart(l,v.containerId)},[v.containerId,v.side,_]),g=r.default.useCallback(l=>{_.handleDragEnd(l)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:g},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:g}=s,l=(0,o.useInjectable)(c.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");l.moveContainerTo(E,g)},[l,g]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:c.IMainLayoutService,useClass:v.LayoutService},{token:c.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(c.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=c.MainLayoutContribution}};t.MainLayoutModule=g,t.MainLayoutModule=g=n.__decorate([(0,r.Injectable)()],g)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,c.useInjectable)(p.IMainLayoutService),g=(0,r.useRef)(null),l=r.default.useCallback(()=>{g&&g.current&&queueMicrotask(()=>{var h;return(h=g.current)===null||h===void 0?void 0:h.focus()})},[g.current]);return(0,r.useEffect)(()=>{l();const h=s.getTabbarHandler(m),u=h?.onActivate(l);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:g,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),g=e(17793),l=e(9522),h=e(752),u=e(58999),d={[c.SlotLocation.left]:{currentId:void 0,size:void 0},[c.SlotLocation.right]:{currentId:"",size:void 0},[c.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends c.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.restoreTabbarService=async a=>{var b;this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:y,size:A}=this.state[a.location]||{};a.prevSize=A;let S=a.visibleContainers[0]&&a.visibleContainers[0].options.containerId;const w=this.appConfig.defaultPanels,T=w&&w[a.location];if(w&&T!==void 0)if(T)if(a.containersMap.has(T))S=T;else{const D=this.componentRegistry.getComponentRegistryInfo(T);D&&(!((b=this.appConfig.layoutConfig[a.location])===null||b===void 0)&&b.modules)&&~this.appConfig.layoutConfig[a.location].modules.indexOf(T)?S=D.options.containerId:this.logger.warn(`[defaultPanels] No \`${T}\` view found!`)}else S="";(0,_.isUndefined)(y)?(0,_.isUndefined)(S)?a.updateNextContainerId():a.updateCurrentContainerId(S):y&&!this.isDropContainer(y)?a.containersMap.has(y)?a.updateCurrentContainerId(y):this.findTabbarServiceByContainerId(y)?(this.moveContainerTo(y,a.location),a.updateCurrentContainerId(y)):(a.updateCurrentContainerId(S),a.updateNextContainerId(y)):(y===""||this.isDropContainer(y))&&a.updateCurrentContainerId("")},this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[b,y]of this.pendingViewsMap.entries())y.forEach(({view:A,props:S})=>{this.collectViewComponent(A,b,S)});for(const b of this.contributions.getContributions())b.onDidRender&&b.onDidRender();const a=[];this.tabbarServices.forEach(b=>{c.slotRendererRegistry.isTabbar(b.location)&&b.containersMap.size>0&&a.push(b.viewReady.promise)}),Promise.all(a).then(()=>{this.viewReady.resolve()})}storeState(a,b){this.state[a.location]={currentId:b,size:a.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(a){var b,y,A,S,w;const T=a.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(b=T.getColor("kt.menubar.background"))===null||b===void 0?void 0:b.toString(),sideBarBackground:(y=T.getColor("sideBar.background"))===null||y===void 0?void 0:y.toString(),editorBackground:(A=T.getColor("editor.background"))===null||A===void 0?void 0:A.toString(),panelBackground:(S=T.getColor("panel.background"))===null||S===void 0?void 0:S.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}findTabbarServiceByContainerId(a){let b;for(const y of this.tabbarServices.values())if(y.containersMap.has(a)){b=y;break}return b}moveContainerTo(a,b){var y;const A=this.findTabbarServiceByContainerId(a);if(!A){this.logger.error(`cannot find container: ${a}`);return}const S=A.getContainer(a);if(!S){this.logger.error(`cannot find container: ${a}`);return}if(!(!((y=S.options)===null||y===void 0)&&y.draggable)){this.logger.warn(`container: ${a} is not draggable`);return}const w=this.getTabbarService(b);A.removeContainer(a),(!A.visibleContainers.length||A.currentContainerId.get()===a)&&this.toggleSlot(A.location,!1),w.dynamicAddContainer(a,S);const T=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(w.location)]);this.handleMap.set(a,T)}showDropAreaForContainer(a){const b=this.findTabbarServiceByContainerId(a),y=this.tabbarServices.get("bottom"),A=this.tabbarServices.get("right");if(!b){this.logger.error(`cannot find container: ${a}`);return}b?.location==="right"&&y?.updateCurrentContainerId(g.DROP_BOTTOM_CONTAINER),b?.location==="bottom"&&A?.updateCurrentContainerId(g.DROP_RIGHT_CONTAINER)}hideDropArea(){const a=this.tabbarServices.get("bottom"),b=this.tabbarServices.get("right");a?.currentContainerId.get()===g.DROP_BOTTOM_CONTAINER&&a.updateCurrentContainerId(a.previousContainerId||""),b?.currentContainerId.get()===g.DROP_RIGHT_CONTAINER&&b.updateCurrentContainerId(b.previousContainerId||"")}isVisible(a){return!!this.getTabbarService(a).currentContainerId.get()}isViewVisible(a){const b=this.getTabbarHandler(a);if(!b||!b.isActivated())return!1;const y=b.accordionService.getViewState(a);return!y.collapsed&&!y.hidden}toggleSlot(a,b,y){var A;const S=this.getTabbarService(a);if(!S){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${a}\` was found.`);return}b===!0?S.updateCurrentContainerId(this.findNonDropContainerId(S)):b===!1?S.updateCurrentContainerId(""):S.updateCurrentContainerId(S.currentContainerId.get()?"":this.findNonDropContainerId(S)),S.currentContainerId.get()&&y&&((A=S.resizeHandle)===null||A===void 0||A.setSize(y))}isDropContainer(a){return[g.DROP_BOTTOM_CONTAINER,g.DROP_RIGHT_CONTAINER].includes(a)}findNonDropContainerId(a){const b=a.currentContainerId.get();if(b&&!this.isDropContainer(b))return b;if(a.previousContainerId&&!this.isDropContainer(a.previousContainerId))return a.previousContainerId;for(const y of a.containersMap.keys())if(!this.isDropContainer(y))return y;return""}getTabbarService(a){const b=this.tabbarServices.get(a)||this.injector.get(h.TabbarService,[a]);if(!this.tabbarServices.get(a)){b.addDispose(b.onCurrentChange(({currentId:A})=>{if(this.storeState(b,A),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:A})),A&&g.SUPPORT_ACCORDION_LOCATION.has(b.location)){const S=this.getAccordionService(A);S?.tryUpdateResize(),S?.expandedViews.forEach(w=>{this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),b.viewReady.promise.then(()=>b.restoreState()).then(()=>this.restoreTabbarService(b)).catch(A=>{this.logger.error(`[TabbarService:${a}] restore state error`,A)});const y=(0,r.default)(()=>this.storeState(b,b.currentContainerId.get()),100);if(b.addDispose(b.onSizeChange(y)),a===c.SlotLocation.bottom){const A=(0,r.default)(()=>void this.bottomExpanded,100);b.addDispose(b.onSizeChange(()=>A))}this.tabbarServices.set(a,b)}return b}getAllAccordionService(){return this.accordionServices}getAccordionService(a,b){let y=this.accordionServices.get(a);return y||(y=this.injector.get(l.AccordionService,[a,b]),this.accordionServices.set(a,y)),y}getTabbarHandler(a){let b=this.doGetTabbarHandler(a);if(!b){const y=this.viewToContainerMap.get(a);y?b=this.doGetTabbarHandler(y||""):this.debug.warn(`${a} view tabbar not found.`)}return b}getContainer(a){for(const b of this.tabbarServices.values()){const y=b.getContainer(a);if(y)return y}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(a){let b=this.handleMap.get(a);if(!b){let y;for(const A of this.tabbarServices.values())if(A.getContainer(a)){y=A.location;break}y&&(b=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(y)]),this.handleMap.set(a,b))}return b}collectTabbarComponent(a,b,y,A){if(A&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),b.hideIfEmpty&&!a.length&&!b.component){this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}),this.tabbarUpdateSet.has(b.containerId)&&this.tryUpdateTabbar(b.containerId);const w=this.getAccordionService(b.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(b.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(b.containerId),this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}))})),b.containerId}return this.getTabbarService(y).registerContainer(b.containerId,{views:a,options:b}),a.forEach(w=>{this.viewToContainerMap.set(w.id,b.containerId)}),b.containerId}getViewAccordionService(a){const b=this.viewToContainerMap.get(a);if(b)return this.getAccordionService(b)}collectViewComponent(a,b,y={},A){this.customViews.set(a.id,a),this.viewToContainerMap.set(a.id,b);const S=this.getAccordionService(b);return y&&(a.initialProps=y),S.appendView(a,A?.isReplace),S.views.length===1&&(this.tabbarUpdateSet.add(b),this.tryUpdateTabbar(b)),A?.fromExtension&&this.disposableMap.set(a.id,this.commandRegistry.registerCommand({id:`${a.id}.focus`},{execute:async()=>(await this.ensureViewReady(a.id),this.commandService.executeCommand(`workbench.view.extension.${b}`,{forceShow:!0}))})),b}ensureViewReady(a){const b=this.viewToContainerMap.get(a),y=new _.Deferred,A=this.getAccordionService(b);return A.visibleViews.get().find(S=>S.id===a)?y.resolve():A.addDispose(A.onAfterAppendViewEvent(S=>{S===a&&y.resolve()})),y.promise}tryUpdateTabbar(a){const b=this.holdTabbarComponent.get(a);b&&(this.getTabbarService(b.side).registerContainer(a,{views:b.views,options:b.options}),this.tabbarUpdateSet.delete(a),this.holdTabbarComponent.delete(a))}replaceViewComponent(a,b){const y=this.viewToContainerMap.get(a.id);if(!y){this.debug.warn(`The container corresponding to \`${a.id}\` was not found, please check the incoming parameters!`);return}const A=this.customViews.get(a.id);A&&(a=Object.assign(A,a)),this.collectViewComponent(a,y,b,{isReplace:!0})}disposeViewComponent(a){const b=this.disposableMap.get(a);b&&b.dispose();const y=this.viewToContainerMap.get(a);if(!y){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).disposeView(a)}revealView(a){const b=this.viewToContainerMap.get(a);if(!b){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).revealView(a)}disposeContainer(a){let b;for(const y of this.tabbarServices.values())if(y.getContainer(a)){b=y.location;break}b?this.getTabbarService(b).disposeContainer(a):this.debug.warn(`The Tabbar to the \`${a}\` was not found.`)}expandBottom(a){const b=this.getTabbarService(c.SlotLocation.bottom);b.currentContainerId.get()||b.updateCurrentContainerId(b.currentContainerId.get()||b.previousContainerId||b.containersMap.keys().next().value),b.doExpand(a),this.contextKeyService.createKey("bottomFullExpanded",b.isExpanded)}get bottomExpanded(){const a=this.getTabbarService(c.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",a.isExpanded),a.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(g.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(c.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,c.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),g=e(17793),l=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const f=this.contributionProvider.getContributions();for(const y of f)y.registerComponent&&y.registerComponent(this.componentRegistry);const a=this.rendererContributionProvider.getContributions();for(const y of a)y.registerRenderer&&y.registerRenderer(o.slotRendererRegistry);const b=this.toolBarContributionProvider.getContributions();for(const y of b)y.registerToolbarItems&&y.registerToolbarItems(this.toolBarRegistry)}registerComponent(f){f.register(g.DROP_RIGHT_CONTAINER,[],{component:l.RightDropArea,hideTab:!0,containerId:g.DROP_RIGHT_CONTAINER}),f.register(g.DROP_BOTTOM_CONTAINER,[],{component:l.BottomDropArea,hideTab:!0,containerId:g.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(f){f.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),f.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),f.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(f){f.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),f.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,a)}}),f.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,a,b)}}),f.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),f.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,a)}}),f.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,a,b)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),f.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),f.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),f.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),f.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.right-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,a)}}),f.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.left-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,a)}}),f.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),f.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(f){f.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[c.EXPLORER_CONTAINER_ID,c.SEARCH_CONTAINER_ID,c.SCM_CONTAINER_ID,c.DEBUG_CONTAINER_ID,c.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[c.MARKER_CONTAINER_ID,c.OUTPUT_CONTAINER_ID,c.DEBUG_CONSOLE_CONTAINER_ID,c.TERMINAL_CONTAINER_ID]}).forEach(([a,b],y)=>{const A=this.mainLayoutService.getTabbarService(a);A.viewReady.promise.then(()=>{b.forEach(S=>{var w,T;const D=A.getContainer(S);D&&f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${S}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:S},group:`${3+y}_${a}`})})})}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(f){f.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(g,l)=>l(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var g;const l=this.layoutService.getAllAccordionService(),h=Array.from(l.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(g=l.get(d))===null||g===void 0?void 0:g.views;if(E)for(let f=0,a=E.length;f<a;f++)u.push(this.injector.get(_,[d,E[f],{groupLabel:f===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends c.QuickOpenItem{constructor(g,l){super(l),this.containerId=g,this.options=l}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends c.QuickOpenItem{constructor(g,l,h){super(h),this.containerId=g,this.view=l,this.options=h}getLabel(){var g;return(g=this.view.name)===null||g===void 0?void 0:g.toUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l&&(l.activate(),l.isCollapsed(this.view.id)&&l?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(g=>{g.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):g.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const g=this.tabbarService.getContainer(this.containerId);g&&g.options&&(g.options.titleProps=s,g.options.titleComponent=_,g.fireChange(g))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const g of _){const l=this.accordionService.getViewState(g);this.accordionService.updateViewState(g,{...l,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),g=e(17793),l=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const f=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:Q=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=o.default.useContext(l.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const X=(0,p.useAutorun)(H.currentContainerId),ie=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),oe=U&&ie;oe&&!X&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const le=V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[pe,q]=d(H.visibleContainers.filter(_e=>{var te;return!(!((te=_e.options)===null||te===void 0)&&te.hideTab)}),le);q.forEach(_e=>{H.updateTabInMoreKey(_e.options.containerId,!0)});const Ee=o.default.useCallback((_e,te,ge,Te)=>{var Pe,Ae,we;const be=(Pe=_e.options)===null||Pe===void 0?void 0:Pe.containerId;if(!be||Te&&(!((we=(Ae=_e.options)===null||Ae===void 0?void 0:Ae.hideLocationTab)===null||we===void 0)&&we.includes(Te)))return null;te.updateTabInMoreKey(be,!1);let fe;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(fe){const Re=fe.cloneNode(!0);Re.classList.add(h.default.dragging),L&&(0,p.addClassName)(Re,L),document.body.appendChild(Re),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Re,0,0),document.body.removeChild(Re)})}te.handleDragStart(xe,be)},onDragOver:xe=>{xe.preventDefault(),fe&&fe.classList.add("on-drag-over")},onDragLeave:()=>{fe&&fe.classList.remove("on-drag-over")},onDrop:xe=>{fe&&fe.classList.remove("on-drag-over"),te.handleDrop(xe,be)},onDragEnd:xe=>{te.handleDragEnd(xe)},key:be,id:be,onContextMenu:xe=>te.handleContextMenu(xe,be),onClick:xe=>te.handleTabClick(xe,oe||P),ref:xe=>fe=xe,className:(0,r.default)({active:ge===be},L)},o.default.createElement(M,{component:_e}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},pe.map(_e=>Ee(_e,H,X,$)),Q({props:I,renderContainers:Ee}),q.length?o.default.createElement("li",{key:"tab-more",onClick:_e=>{var te;return H.showMoreMenu(_e,pe[pe.length-1]&&((te=pe[pe.length-1].options)===null||te===void 0?void 0:te.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=f;const a=({component:I})=>{var O,M,R;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=o.default.useState(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const Q=L.options;return Q?.activateKeyBinding?`${Q?.title} (${k.acceleratorForKeyString(Q.activateKeyBinding,"+")})`:Q?.title},[L]);return(0,o.useEffect)(()=>{const Q=L.onChange(V=>{B({...V})});return()=>{Q.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(c.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(c.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=a;const b=({component:I})=>{var O,M,R;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=b;const y=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=y;const A=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=A;const S=I=>{const{barSize:O=48,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.RightTabbarRenderer=S;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=o.default.useContext(l.TabbarConfig),k=(0,p.useInjectable)(g.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),B=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(l.TabbarConfig),O=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),g=e(9522),l=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),f=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),a={display:"block"},b={display:"none"},y=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(B.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(Q=>{var V;const $=(V=Q.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=B.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?a:b,id:R},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(f,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:Q,...P}))))}))};t.BaseTabPanelView=y;const A=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:Q,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,p.useInjectable)(c.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(le=>{z.get(g.AccordionServiceFactory)($).handleContextMenu(le)},[$]);if(!$)return null;const X=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!X)return null;const ie=(0,p.useViewState)(M,j),oe=o.default.useCallback(le=>R?R({children:le}):le,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:O})}):null,Q&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:Q,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:le=>B.current=le},o.default.createElement(s.ProgressBar,{progressModel:X.progressModel}),oe(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:ie,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(l.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=A;const S=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),Q=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,B),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:z,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:B,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:Q},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:X=>L.current=X},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:z})):o.default.createElement(l.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:S,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),g=n.__importDefault(e(5330)),l=e(752);t.TabbarConfig=(0,o.createContext)({side:c.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:f,components:a,direction:b="left-to-right",TabbarView:y,side:A,TabpanelView:S})=>{const w=(0,c.useInjectable)(l.TabbarServiceFactory)(A),T=(0,c.useInjectable)(c.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[O,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),a.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[a]);const R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(b)])},[]);return(0,o.useEffect)(()=>{c.fastdom.measure(()=>{R()});let P;T.onDirective(c.ResizeEvent.createDirective(A),()=>{P&&P.dispose(),P=c.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(g.default.tab_container,f),style:{flexDirection:v.Layout.getFlexDirection(b)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:A,direction:b,fullSize:O}},o.default.createElement(y,null),o.default.createElement(S,null)))});const h=({className:E,components:f,tabbarView:a,tabpanelView:b})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:f,TabbarView:a??_.RightTabbarRenderer,TabpanelView:b??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:f,TabbarView:a??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:f,TabbarView:a??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),g=e(17793),l=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=f=>a=>f.get(g.IMainLayoutService).getTabbarService(a);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends c.WithEventBus{constructor(a){super(),this.location=a,this.doChangeViewEmitter=new c.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},b=>(this.shouldChangeView.read(b),this.containerIdObs.read(b))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new c.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new c.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new c.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new c.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(b=>{this.resizeHandle&&this.resizeHandle.hidePanel(b)},60),this._menuMap=new Map,this.setIsLatter(a===c.SlotLocation.right||a===c.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,c.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,c.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(c.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(a){this.isLatter=a}updateNextContainerId(a){(0,c.isUndefined)(a)?this.useFirstContainerId=!0:this.nextContainerId=a}updateCurrentContainerId(a){(0,s.transaction)(b=>{this.containerIdObs.set(a,b)})}updateBadge(a,b){const y=this.getContainer(a);y&&y.options&&(y.options.badge=b),y?.fireChange(y)}registerPanelCommands(){this.commandRegistry.registerCommand(l.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(l.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(l.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(a,b)=>{this.layoutService.toggleSlot(c.SlotLocation.bottom,a,b)}})}getContainerState(a){return this.state.get(a)}hideContainer(a){const b=this.state.get(a);b&&(b.hidden=!0)}showContainer(a){const b=this.state.get(a);b&&(b.hidden=!1)}updatePanelVisibility(a){a===void 0&&(a=this.containersMap.size>0),this.updatePanel(a)}ensureViewReady(){(0,c.isDefined)(this.barSize)&&(0,c.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(a){this.panelSize=a,(0,c.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(a){this.barSize=a,(0,c.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?c.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(a,b){const y=this.tabInMoreKeyMap.get(a);y&&y.set(b)}get visibleContainers(){const a=[];return this.containersMap.forEach(b=>{const y=b.options&&this.state.get(b.options.containerId);(!y||!y.hidden)&&a.push(b)}),a.sort((b,y)=>this.getContainerState(b.options.containerId).priority-this.getContainerState(y.options.containerId).priority)}registerResizeHandle(a){const{setSize:b,setRelativeSize:y,getSize:A,getRelativeSize:S,lockSize:w,setMaxSize:T,hidePanel:D}=a;return this.resizeHandle={setSize:I=>b(I,this.isLatter),setRelativeSize:(I,O)=>y(I,O,this.isLatter),getSize:()=>A(this.isLatter),getRelativeSize:()=>S(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(a,b){var y;if(this.containersMap.has(a))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(a)),this.nextContainerId===a&&this.updateCurrentContainerId(a);const A=new c.DisposableCollection,S=b.options||{containerId:a};b.options=S;const w=new c.Emitter;this.containersMap.set(a,{fireChange:D=>w.fire(D),onChange:w.event,views:b.views,options:S}),A.push({dispose:()=>{this.containersMap.delete(a),this.state.delete(a)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=b.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,b);for(let D=T;D<this.sortedContainers.length;D++){const O=(y=this.sortedContainers[D].options)===null||y===void 0?void 0:y.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}A.push(this.registerSideEffects(b)),this.eventBus.fire(new g.TabBarRegistrationEvent({tabBarId:a})),a===this.currentContainerId.get()&&this.handleChange(a,""),this.viewContextKeyRegistry.registerContextKeyService(a,this.contextKeyService.createScoped()).createKey("view",a),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(a,A),this.onDidRegisterContainerEmitter.fire(a)}registerSideEffects(a){var b;const y=new c.DisposableCollection;!((b=a.options)===null||b===void 0)&&b.hideTab||(y.push(this.registerHideMenu(a)),y.push(this.registerMoreMenu(a))),y.push(this.registerActivateKeyBinding(a,a.options.fromExtension));const A=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${a.options.containerId}`,!0);return y.push({dispose:()=>{A.set(!1)}}),y.push(this.progressService.registerProgressIndicator(a.options.containerId)),y.push(this.registerContainerPanelRelatedCommand(a)),y}registerContainerPanelRelatedCommand(a){var b,y,A,S,w;const T=new c.DisposableCollection,D=(b=a.options)===null||b===void 0?void 0:b.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,c.formatLocalize)("view.command.show",(A=(y=a.options)===null||y===void 0?void 0:y.title)!==null&&A!==void 0?A:D),labelLocalized:(0,c.createFormatLocalizedStr)("view.command.show",(w=(S=a.options)===null||S===void 0?void 0:S.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(a){const b=new c.DisposableCollection,y=a.options.containerId;return b.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(y,b),label:a.options.title||y},group:"1_widgets"})),b}registerMoreMenu(a){const b=new c.DisposableCollection,y=a.options.containerId,A=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(y),!1);return this.tabInMoreKeyMap.set(y,A),b.push({dispose:()=>this.tabInMoreKeyMap.delete(y)}),b.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(a,b),label:a.options.title||y},group:"inline",when:`${this.getTabInMoreCtxKey(y)} == true`,toggledWhen:`${(0,c.getTabbarCtxKey)(this.location)} == ${y}`,iconClass:a.options.iconClass})),b}disposeContainer(a){var b;const y=this.disposableMap.get(a);y&&y.dispose(),this.currentContainerId.get()===a&&this.updateCurrentContainerId(((b=this.visibleContainers[0].options)===null||b===void 0?void 0:b.containerId)||"")}updateTitle(a,b){const y=this.getContainer(a);y&&(y.options.title=b)}getContainer(a){return a?this.containersMap.get(a):void 0}getTitleToolbarMenu(a){const b=this._menuMap.get(a);if(b)return b;const y=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(a));this._menuMap.set(a,y);const A=this.disposableMap.get(a),S=[y,(0,c.toDisposable)(()=>{this._menuMap.delete(a)})];return A?A.pushAll(S):this.addDispose(S),y}doExpand(a){if(this.resizeHandle){const{setRelativeSize:b}=this.resizeHandle;a?this.isLatter?b(0,1):b(1,0):b(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:a}=this.resizeHandle,b=a().join(",");return this.isLatter?b==="0,1":b==="1,0"}return!1}handleTabClick(a,b){const y=a.currentTarget.id;y===this.currentContainerId.get()&&!b?this.updateCurrentContainerId(""):this.updateCurrentContainerId(y)}handleContextMenu(a,b){a.preventDefault(),a.stopPropagation();const y=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}showMoreMenu(a,b){const y=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{lastContainerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}handleDragStart(a,b){a.dataTransfer.setData("containerId",b),this.layoutService.showDropAreaForContainer(b)}handleDrop(a,b){if(a.dataTransfer.getData("containerId")){const y=a.dataTransfer.getData("containerId"),A=this.visibleContainers,S=A.findIndex(T=>y===T.options.containerId),w=A.findIndex(T=>b===T.options.containerId);this.doInsertTab(A,S,w),this.storeState()}}handleDragEnd(a){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const a of this.state.keys())this.storedState[a]&&this.state.set(a,this.storedState[a]);this.visibleContainers.forEach(a=>{g.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(a.options.containerId)})}removeContainer(a){const b=this.disposableMap.get(a);b?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(a,b){this.registerContainer(a,b),this.updateCurrentContainerId(a),this.doChangeViewEmitter.fire()}doInsertTab(a,b,y){const A=this.getContainerState(a[y].options.containerId).priority,S=(T,D)=>{const I=this.getContainerState(a[T].options.containerId),O=this.getContainerState(a[D].options.containerId);I.priority=O.priority};let w;if(b>y)for(w=y;w<b;w++)S(w,w+1);else for(w=y;w>b;w--)S(w,w-1);this.getContainerState(a[w].options.containerId).priority=A,this.doChangeViewEmitter.fire()}storeState(){const a={};this.state.forEach((b,y)=>{a[y]=b}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),a)}registerActivateKeyBinding(a,b){const y=a.options,A=y.containerId,S=b?`workbench.view.extension.${A}`:`workbench.view.${A}`,w=new c.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:S},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===A?"":A):this.updateCurrentContainerId(A)}})),y.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:S,keybinding:y.activateKeyBinding})),w}registerGlobalToggleCommand(){const a=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:a},{execute:({containerId:b})=>{this.doToggleTab(b)},isEnabled:()=>this.visibleContainers.length>1}),a}registerVisibleToggleCommand(a,b){const y=`activity.bar.toggle.${a}`;return b.push(this.commandRegistry.registerCommand({id:y},{execute:({forceShow:A}={})=>{this.doToggleTab(a,A)},isToggled:()=>!this.getContainerState(a).hidden,isEnabled:()=>this.getContainerState(a).hidden||this.visibleContainers.length!==1})),y}registerMoreToggleCommand(a,b){const{options:y}=a,{containerId:A}=y,S=`activity.bar.activate.more.${A}`;return b.push(this.commandRegistry.registerCommand({id:S},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(A),w){const T=this.getContainerState(A),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),S}getTabInMoreCtxKey(a){return`${a}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:l.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:l.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:l.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(a,b){const y=this.getContainerState(a);b===void 0?y.hidden=!y.hidden:y.hidden=!b,y.hidden&&this.currentContainerId.get()===a&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(a){const b=this.getContainer(a);return b&&b.options&&b.options.expanded}onResize(){c.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const a=this.resizeHandle.getSize();a!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=a,this.onSizeChangeEmitter.fire({size:a}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:a,newValue:b})=>{this.previousContainerId=a===d?"":a,this.handleChange(b,a)})}handleChange(a,b){var y;if(!this.resizeHandle)return;const{getSize:A,setSize:S,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:b,currentId:a});const T=this.shouldExpand(a);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(a,T);else if(a){b&&a!==b&&(this.prevSize=A());const D=this.getContainer(a);S(this.prevSize||this.panelSize+this.barSize),w(!!(!((y=D?.options)===null||y===void 0)&&y.noResize)),this.activatedKey.set(a)}else S(this.barSize),w(!0)}tryRestoreAccordionSize(a){var b,y;if(this.accordionRestored.has(a))return;const A=this.containersMap.get(a);if((!A||!((b=A.options)===null||b===void 0)&&b.component)&&((y=A?.options)===null||y===void 0?void 0:y.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(a).restoreState(),this.accordionRestored.add(a)}handleFullExpanded(a,b){if(!this.resizeHandle)return;const{setRelativeSize:y,setSize:A}=this.resizeHandle;a?b?this.isLatter?y(0,1):y(1,0):A(this.prevSize||this.panelSize+this.barSize):A(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(c.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",c.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(17793);var v;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(g,l){var h,u,d,E;const f=(h=g.group)!==null&&h!==void 0?h:v.More,a=(u=l.group)!==null&&u!==void 0?u:v.More;return f!==a?f.localeCompare(a):((d=g.order)!==null&&d!==void 0?d:5)-((E=l.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const l=this.items.filter(h=>h.visible);return l.length===0&&this.defaultItem?[this.defaultItem.descriptor]:l.map(h=>h.descriptor)}constructor(l){this.id=l,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const l=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of l)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let l=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,l=!0)}l&&this._onDidChange.fire()}dispose(){this.disposables.forEach(l=>l.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new c.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(l,h){return this.viewWelcomeContent.add(l,h),this._onDidChangeViewWelcomeContent.fire(l),{dispose:()=>{this.viewWelcomeContent.delete(l,h),this._onDidChangeViewWelcomeContent.fire(l)}}}registerViewWelcomeContent2(l,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(l,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(l,E),this._onDidChangeViewWelcomeContent.fire(l)}));return this._onDidChangeViewWelcomeContent.fire(l),u}getViewWelcomeContent(l){const h=[];return this.viewWelcomeContent.forEach(l,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=l;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const g=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function l(d){const E=new Array;let f,a=0,b=0;for(;(f=g.exec(d))!==null;){b=f.index||0,E.push(d.substring(a,b)),a=(f.index||0)+f[0].length;const[,y,A]=f;E.push(y?`$(${A})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(A)}))}return a<d.length&&E.push(d.substring(a)),E}const h=d=>{const{contents:E}=d,[f,a]=o.default.useState(E.map(A=>A.precondition?!1:null)),b=(0,p.useInjectable)(p.IContextKeyService),y=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const A=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),S=b.onDidChangeContext(w=>{A.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&a(f.map((I,O)=>O===D?b.match(E[D].precondition):I))})});return()=>S.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:A,precondition:S},w)=>{const T=A.split(`
31741
+ }`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(b=>({when:b.when,command:this.getValidateCommand(b.command),keybinding:b.key||b.keybinding})),f=[],a=[];this.disposeRegistedKeybinding(),E.forEach(b=>{b.command.startsWith("-")?a.push(b):f.push(b)}),f.map(b=>{this.unregisterDefaultKeybinding(b,!0),this.registerUserKeybinding(b)}),a.map(b=>{b.command=b.command.slice(1),this.unregisterDefaultKeybinding(b,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const f={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(f);const a=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(a,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(f)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const y of h){const A=this.keybindingRegistry.getKeybindingsForCommand(y.id);!A||!A.length?y.label&&u.push({id:y.id,command:y.label,hasCommandLabel:!0}):A.forEach(S=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>y&&D.command===y.id);w={id:y.id,command:y.label||y.id,keybinding:T?T.key:S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(A&&S),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!y.label}}else w={id:y.id,command:y.label||y.id,keybinding:A&&S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:this.getWhen(A&&S),source:A&&S&&typeof S.scope<"u"?this.getScope(S.scope):"",hasCommandLabel:!!y.label};u.push(w)})}const d=u.sort((y,A)=>this.compareItem(y,A)),E=d.filter(y=>!!y.keybinding),f=d.filter(y=>!y.keybinding&&y.hasCommandLabel),a=E.filter(y=>y.hasCommandLabel),b=E.filter(y=>!y.hasCommandLabel);return[...a,...b,...f]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=g,g.DEFAULT_SEARCH_DELAY=100,g.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,c.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],g.prototype,"parser",void 0),r.__decorate([(0,c.Autowired)(p.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,c.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keybindingRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],g.prototype,"keybindingService",void 0),r.__decorate([(0,c.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],g.prototype,"filesystem",void 0),r.__decorate([(0,c.Autowired)(p.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],g.prototype,"progressService",void 0),t.KeymapService=g=n=r.__decorate([(0,c.Injectable)()],g)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:g,validateKeybinding:l,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:f,covert:a,clearCovert:b,fixed:y,onDidKeymapChanges:A,updateKeybindings:S}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:Q,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=Q,[Z,X]=o.default.useState(!1),[ie,oe]=o.default.useState(K||""),[le,pe]=o.default.useState(!1),[q,Ee]=o.default.useState(),[_e,te]=o.default.useState([]),ge=()=>{le||(y(),pe(!0)),b(),oe(E(K)),X(!0)},Te=Be=>{const me=l(Q,Be);me?me!==" "?Ee({message:me,type:c.VALIDATE_TYPE.ERROR}):X(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:Be}),X(!1),b())},Pe=()=>{X(!1)},Ae=Be=>{Be.stopPropagation(),Be.preventDefault();const{key:me}=p.KeyCode.createKeyCode(Be.nativeEvent),re=Be.nativeEvent.shiftKey||Be.nativeEvent.metaKey||Be.nativeEvent.altKey||Be.nativeEvent.ctrlKey;me&&p.Key.ENTER.keyCode===me.keyCode&&!re?ie&&Te(ie):oe(a(Be.nativeEvent))},we=()=>{const Be=()=>{Ee(void 0),ie&&oe(""),b()},me=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:me},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Be,title:(0,p.localize)("keymaps.action.clear")}))},be=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),fe=Be=>{const me=re=>{re.preventDefault(),le||(y(),pe(!0)),d({command:E($),when:E(z)||"",keybinding:ie})};if(Be&&E(Be)===f(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:me,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&_e.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",_e.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},_e.map((Be,me)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Be.id}_${me}`,title:`${Be.command}-${Be.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(Be.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(Be.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(Be.when)||"\u2014"))))))},Re=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},we(),o.default.createElement(c.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:ie,onKeyDown:Ae,onBlur:Pe}),be(),xe());{const Be=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:ge},o.default.createElement("div",{className:m.default.keybinding_action,onClick:ge},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),fe(H)),Be&&Be[0]?Be.map((me,re)=>{const he=me.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${me}_${re}`},he.map((Oe,Se)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${Se}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Ee(void 0),te(ie&&Z?h(Q,ie):[])},[ie]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Re()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(z||"\u2014"),dangerouslySetInnerHTML:{__html:z||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const Q=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:Q}))},k=(0,o.useCallback)(Q=>{I(Q),g(Q)},[D]),F=Q=>{if(!w){const V=Q.target&&Q.target.value?Q.target.value.toLocaleLowerCase():"";k(V)}},L=Q=>{if(w){Q.stopPropagation(),Q.preventDefault();const{key:V}=p.KeyCode.createKeyCode(Q.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(a(Q.nativeEvent))}},B=()=>{D&&(I(""),g("")),b()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(c.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const Q=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},Q.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const Q=A(V=>{M(V)});return S(),()=>{Q.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(c.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:c.LogServiceForClientPath,clientToken:c.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const g=new p.LogServiceClient(_);return g.setup(this.logServiceForClient,s),g}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(c.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let c=n[o];if(c instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=c.stack,c=e(p)}else if(typeof c=="object")try{c=JSON.stringify(c)}catch{}else if(typeof c=="symbol")try{c=c.toString()}catch{}r+=(o>0?" ":"")+c}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),c=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),g=e(68969),l=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,f){super(),this.containerId=E,this.noRestore=f,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,l.observableValue)(this,[]),this.stateObservable=(0,l.observableValue)(this,{}),this.visibleViews=(0,l.derived)(this,a=>{const b=this.viewsObservable.read(a);return this.stateObservable.read(a),b.filter(y=>!this.getViewState(y.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var a,b;let y;if(Object.keys(this.state).forEach(A=>{this.state[A].hidden||this.state[A].collapsed||(y?(this.state[A].size||0)>(this.state[y].size||0)&&(y=A):y=A)}),y&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((a=this.splitPanelService.rootNode)===null||a===void 0)&&a.clientHeight){const A=((b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight)-this.getPanelFullHeight();if(A){const S=this.state;S[y].size+=A,(0,l.transaction)(w=>{this.stateObservable.set({...S},w)}),this.toggleOpen(y,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(a,b,y)=>{this.doToggleOpen(a,b,y)},this.handleContextMenu=(a,b)=>{a.preventDefault();const y=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:b}]},contextKeyService:b?this.viewContextKeyRegistry.getContextKeyService(b):void 0}),A=y.getGroupedMenuNodes();y.dispose(),this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})},this.addDispose((0,l.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,a=>{this.topViewKey=a.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(a,b)=>a||b.payload.affectsSome(this.viewWhenContextkeys),50)(a=>a&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,f){const a=this.views.find(b=>b.id===E);a?(a.name=f,this.didChangeViewTitleEmitter.fire({id:E,title:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,f){const a=this.views.find(b=>b.id===E);a?(a.description=f,this.didChangeViewTitleEmitter.fire({id:E,description:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,f){const a=this.views.find(b=>b.id===E);a?(a.message=f,this.didChangeViewTitleEmitter.fire({id:E,message:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,f){const a=this.views.find(b=>b.id===E);a?(a.badge=f,this.didChangeViewTitleEmitter.fire({id:E,badge:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(a=>E[a.id]={collapsed:!1,hidden:!1});const f=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(f,E)||(0,l.transaction)(a=>{this.stateObservable.set({...f},a)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let f=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,a;if(this.visibleViews.get().forEach((b,y)=>{const A=this.state[b.id];A.collapsed?(this.setSize(y,0,!1,!0),f-=this.headerSize):!A.collapsed&&A.size&&(this.setSize(y,A.size,!1,!0),f-=A.size,a=y)}),a){const b=this.visibleViews.get()[a];this.setSize(a,this.state[b.id].size+f)}}initConfig(E){const{headerSize:f,minSize:a}=E;this.headerSize=f,this.minSize=a}registerContextService(E){let f=this.viewContextKeyRegistry.getContextKeyService(E);return f||(f=this.contextKeyService.createScoped(),f.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,f)),f}getSectionToolbarMenu(E){const f=this.registerContextService(E),a=this.menuService.createMenu(s.MenuId.ViewTitle,f),b=this.views.find(y=>y.id===E);return b&&(b.titleMenu=a),a}updateView(E){(0,l.transaction)(f=>{const a=this.views;if(E.priority){const b=a.findIndex(y=>(y.priority||0)<(E.priority||0));a.splice(b===-1?a.length:b,0,E),this.viewsObservable.set([...a],f)}else this.viewsObservable.set([...a,E],f)})}appendView(E,f){if(this.appendedViewSet.has(E.id)&&!f)return;const a=new p.DisposableCollection;a.push(this.progressService.registerProgressIndicator(E.id));const b=this.views.findIndex(y=>y.id===E.id);if(b!==-1){(0,l.transaction)(y=>{const A=this.views;A[b]=Object.assign({},A[b],E),this.viewsObservable.set([...A],y)});return}if(E.when){this.viewsWithContextKey.add(E);const y=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(y))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),a.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,a),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,a),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const f=this.views.findIndex(b=>b.id===E);f>-1&&(0,l.transaction)(b=>{const y=this.views;y.splice(f,1),this.viewsObservable.set([...y],b)});const a=this.toDispose.get(E);a&&a.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const f=this.forceRevealContextKeys.get(E);f&&f.key.set(!0)}disposeAll(){(0,l.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const f=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const a=document.getElementById(f);if(a){const b=this.state;b[f].size=a.clientHeight,(0,l.transaction)(y=>{this.stateObservable.set({...b},y)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(f=>this.views.find(a=>a.id===f)&&f!==E).reduce((f,a)=>f+(this.state[a].collapsed?this.headerSize:this.state[a].hidden?0:this.state[a].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const f=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${f} == true`,key:this.contextKeyService.createKey(f,!1)}),this.viewWhenContextkeys.add(f),`${f} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:f})=>{this.doToggleView(f)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,f){const a=`view-container.hide.${E}`;return f.push(this.commandRegistry.registerCommand({id:a},{execute:({forceShow:b}={})=>{this.doToggleView(E,b)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),a}doToggleView(E,f){const a=this.getViewState(E);let b;f===void 0?b=!a.hidden:b=!f,a.hidden=b,this.updateViewState(E,a),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,f){this.doToggleView(E,f)}get expandedViews(){return this.views.filter(E=>{const f=this.state[E.id];return!f||f&&!f.hidden&&!f.collapsed})}toggleOpen(E,f){const a=this.visibleViews.get().findIndex(b=>b.id===E);a>-1&&this.doToggleOpen(E,f,a,!0)}getViewState(E){let f=this.state[E];const a=this.views.find(b=>b.id===E);return f||(this.updateViewState(E,{collapsed:a?.collapsed||!1,hidden:a?.hidden||!1}),f=this.state[E]),f}updateViewState(E,f){const a=this.state;a[E]=f,(0,l.transaction)(b=>{this.stateObservable.set({...a},b)})}doToggleOpen(E,f,a,b){var y;const A=this.getViewState(E);this.updateViewState(E,{...A,collapsed:f});const S=this.mainLayoutService.getContainer(this.containerId);if(((y=S?.options)===null||y===void 0?void 0:y.alignment)!=="horizontal"){let w;f?w=this.setSize(a,0,!1,b):w=this.setSize(a,this.expandedViews.length===1?this.getAvailableSize():A.size||this.minSize,!1,b);for(let T=this.visibleViews.get().length-1;T>a;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b);for(let T=a-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:f}))}setSize(E,f,a,b){var y;const A=this.visibleViews.get()[E],S=(y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;b||w.classList.add("resize-ease"),!f&&!a?(f=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(A.id);let I=f;if(a&&(I=Math.max(T-f,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(S))if(I+E*this.minSize>S)I-=I+E*this.minSize-S;else{const O=this.getPanelFullHeight(A.id);I+O<S&&(I+=S-(I+O))}if(this.rendered){let O;f===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,b||setTimeout(()=>{w.classList.remove("resize-ease")},200),a?I-(T-f):f-T}getAvailableSize(){var E;const f=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return f?f-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,f){this.contextKeyService.getKeysInWhen(f).forEach(b=>{E.add(b)})}};t.AccordionService=u,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,c.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,c.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,c.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,c.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,c.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,c.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,c.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,c.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,c.Autowired)(g.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:l="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:f,noRestore:a,style:b})=>{const y=(0,o.useInjectable)(p.LayoutViewSizeConfig),A=(0,o.useInjectable)(m.AccordionServiceFactory)(u,a),S=(0,o.useAutorun)(A.visibleViews);(0,o.useAutorun)(A.stateObservable);const w=(0,r.useMemo)(()=>d||y.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)A.appendView(T)},[h]),r.default.useEffect(()=>{A.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(c.SplitPanel,{className:f,style:b,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:l==="horizontal"?"left-to-right":"top-to-bottom"},S.map((T,D)=>{const I=A.getViewState(T.id),O=T.titleMenu||A.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(_.AccordionSection,{noHeader:S.length===1,onItemClick:()=>{A.handleSectionClick(T.id,!M,D)},onContextMenuHandler:A.handleContextMenu,alignment:l,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:A,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?d:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const g=({children:l})=>r.default.createElement("div",null,l);t.Panel=g,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),g=e(52416),l=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:f,headerClass:a,onItemClick:b,noHeader:y,children:A,badge:S,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,c.useInjectable)(g.IIconService),L=(0,c.useDesignStyles)(l.default.actions_wrap,"actions_wrap"),B=(0,c.useDesignStyles)(l.default.kt_split_panel,"kt_split_panel"),j=(0,c.useDesignStyles)(l.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,c.useDesignStyles)(l.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,c.useDesignStyles)(l.default.section_badge,"section_badge"),Q=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:f,badge:S});o.default.useEffect(()=>{const oe=R.onDidChangeViewTitle(({id:le,title:pe,description:q,message:Ee,badge:_e})=>{let te=!1;const ge={...V};T===le&&pe&&pe!==V.header&&(ge.header=pe,te=!0),T===le&&_e!==V.badge&&(ge.badge=_e,te=!0),T===le&&q&&q!==V.description&&(ge.description=q,te=!0),T===le&&Ee&&Ee!==V.message&&(ge.message=Ee,te=!0),te&&$(ge)});return()=>{oe.dispose()}},[]);const Y=o.default.useCallback(()=>{b()},[b]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,c.useViewState)(T,Q,!0),Z=(0,c.useInjectable)(m.IProgressService).getIndicator(T),X=A,ie=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:B,"data-view-id":T,draggable:!1},!y&&o.default.createElement("div",{...h,className:(0,r.default)(j,a),onClick:Y,onContextMenu:oe=>P(oe,T),style:{height:ie,lineHeight:ie}},o.default.createElement("div",{className:l.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,c.getIcon)("arrow-down"),l.default.arrow_icon,M?"":l.default.kt_mod_collapsed)}),o.default.createElement("div",{className:l.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:l.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:O}):o.default.createElement(p.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[l.default.hide]:!M}]),style:z,ref:Q},o.default.createElement(_.ProgressBar,{className:l.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(c.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:l.default.kt_split_panel_message},V.message),o.default.createElement(X,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(c.TabbarServiceFactory)(v.side),s=r.default.useCallback(l=>{v.containerId&&v.side&&_.handleDragStart(l,v.containerId)},[v.containerId,v.side,_]),g=r.default.useCallback(l=>{_.handleDragEnd(l)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:g},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:g}=s,l=(0,o.useInjectable)(c.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");l.moveContainerTo(E,g)},[l,g]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:c.IMainLayoutService,useClass:v.LayoutService},{token:c.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(c.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=c.MainLayoutContribution}};t.MainLayoutModule=g,t.MainLayoutModule=g=n.__decorate([(0,r.Injectable)()],g)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,c.useInjectable)(p.IMainLayoutService),g=(0,r.useRef)(null),l=r.default.useCallback(()=>{g&&g.current&&queueMicrotask(()=>{var h;return(h=g.current)===null||h===void 0?void 0:h.focus()})},[g.current]);return(0,r.useEffect)(()=>{l();const h=s.getTabbarHandler(m),u=h?.onActivate(l);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:g,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),g=e(17793),l=e(9522),h=e(752),u=e(58999),d={[c.SlotLocation.left]:{currentId:void 0,size:void 0},[c.SlotLocation.right]:{currentId:"",size:void 0},[c.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends c.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[b,y]of this.pendingViewsMap.entries())y.forEach(({view:A,props:S})=>{this.collectViewComponent(A,b,S)});for(const b of this.contributions.getContributions())b.onDidRender&&b.onDidRender();const a=[];this.tabbarServices.forEach(b=>{c.slotRendererRegistry.isTabbar(b.location)&&b.containersMap.size>0&&a.push(b.viewReady.promise)}),Promise.all(a).then(()=>{this.viewReady.resolve()})}storeState(a,b){this.state[a.location]={currentId:b,size:a.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(a){var b,y,A,S,w;const T=a.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(b=T.getColor("kt.menubar.background"))===null||b===void 0?void 0:b.toString(),sideBarBackground:(y=T.getColor("sideBar.background"))===null||y===void 0?void 0:y.toString(),editorBackground:(A=T.getColor("editor.background"))===null||A===void 0?void 0:A.toString(),panelBackground:(S=T.getColor("panel.background"))===null||S===void 0?void 0:S.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}initializeLayout(a){this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:b,size:y}=this.state[a.location]||{};a.prevSize=y;const A=this.determineDefaultContainer(a);this.updateContainerId(a,b,A)}determineDefaultContainer(a){var b,y;const A=((y=(b=a.visibleContainers[0])===null||b===void 0?void 0:b.options)===null||y===void 0?void 0:y.containerId)||"",{defaultPanels:S}=this.appConfig;if(!S)return A;const w=S[a.location];return w?w===void 0?A:this.getRestorePanelContainer(a,w,a.location)||A:""}getRestorePanelContainer(a,b,y){var A;if(a.containersMap.has(b))return b;const S=this.componentRegistry.getComponentRegistryInfo(b);return S&&this.isValidModule(b,y)?((A=S.options)===null||A===void 0?void 0:A.containerId)||"":(this.logger.warn(`[defaultPanels] No \`${b}\` view found!`),"")}isValidModule(a,b){var y;const A=(y=this.appConfig.layoutConfig[b])===null||y===void 0?void 0:y.modules;return A?A.includes(a):!1}updateContainerId(a,b,y){(0,_.isUndefined)(b)?this.handleUndefinedContainer(a,y):b&&!this.isDropContainer(b)?this.handleExistingContainer(a,b,y):a.updateCurrentContainerId(y||"")}handleUndefinedContainer(a,b){(0,_.isUndefined)(b)?a.updateNextContainerId():a.updateCurrentContainerId(b)}handleExistingContainer(a,b,y){if(a.containersMap.has(b)){a.updateCurrentContainerId(b);return}this.findTabbarServiceByContainerId(b)?(this.moveContainerTo(b,a.location),a.updateCurrentContainerId(b)):(a.updateCurrentContainerId(y),a.updateNextContainerId(b))}findTabbarServiceByContainerId(a){let b;for(const y of this.tabbarServices.values())if(y.containersMap.has(a)){b=y;break}return b}moveContainerTo(a,b){var y;const A=this.findTabbarServiceByContainerId(a);if(!A){this.logger.error(`cannot find container: ${a}`);return}const S=A.getContainer(a);if(!S){this.logger.error(`cannot find container: ${a}`);return}if(!(!((y=S.options)===null||y===void 0)&&y.draggable)){this.logger.warn(`container: ${a} is not draggable`);return}const w=this.getTabbarService(b);A.removeContainer(a),(!A.visibleContainers.length||A.currentContainerId.get()===a)&&this.toggleSlot(A.location,!1),w.dynamicAddContainer(a,S);const T=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(w.location)]);this.handleMap.set(a,T)}showDropAreaForContainer(a){const b=this.findTabbarServiceByContainerId(a),y=this.tabbarServices.get("bottom"),A=this.tabbarServices.get("right");if(!b){this.logger.error(`cannot find container: ${a}`);return}b?.location==="right"&&y?.updateCurrentContainerId(g.DROP_BOTTOM_CONTAINER),b?.location==="bottom"&&A?.updateCurrentContainerId(g.DROP_RIGHT_CONTAINER)}hideDropArea(){const a=this.tabbarServices.get("bottom"),b=this.tabbarServices.get("right");a?.currentContainerId.get()===g.DROP_BOTTOM_CONTAINER&&a.updateCurrentContainerId(a.previousContainerId||""),b?.currentContainerId.get()===g.DROP_RIGHT_CONTAINER&&b.updateCurrentContainerId(b.previousContainerId||"")}isVisible(a){return!!this.getTabbarService(a).currentContainerId.get()}isViewVisible(a){const b=this.getTabbarHandler(a);if(!b||!b.isActivated())return!1;const y=b.accordionService.getViewState(a);return!y.collapsed&&!y.hidden}toggleSlot(a,b,y){var A;const S=this.getTabbarService(a);if(!S){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${a}\` was found.`);return}b===!0?S.updateCurrentContainerId(this.findNonDropContainerId(S)):b===!1?S.updateCurrentContainerId(""):S.updateCurrentContainerId(S.currentContainerId.get()?"":this.findNonDropContainerId(S)),S.currentContainerId.get()&&y&&((A=S.resizeHandle)===null||A===void 0||A.setSize(y))}isDropContainer(a){return[g.DROP_BOTTOM_CONTAINER,g.DROP_RIGHT_CONTAINER].includes(a)}findNonDropContainerId(a){const b=a.currentContainerId.get();if(b&&!this.isDropContainer(b))return b;if(a.previousContainerId&&!this.isDropContainer(a.previousContainerId))return a.previousContainerId;for(const y of a.containersMap.keys())if(!this.isDropContainer(y))return y;return""}getTabbarService(a){const b=this.tabbarServices.get(a)||this.injector.get(h.TabbarService,[a]);if(!this.tabbarServices.get(a)){b.addDispose(b.onCurrentChange(({currentId:A})=>{if(this.storeState(b,A),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:A})),A&&g.SUPPORT_ACCORDION_LOCATION.has(b.location)){const S=this.getAccordionService(A);S?.tryUpdateResize(),S?.expandedViews.forEach(w=>{this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),b.viewReady.promise.then(()=>b.restoreState()).then(()=>this.initializeLayout(b)).catch(A=>{this.logger.error(`[TabbarService:${a}] restore state error`,A)});const y=(0,r.default)(()=>this.storeState(b,b.currentContainerId.get()),100);if(b.addDispose(b.onSizeChange(y)),a===c.SlotLocation.bottom){const A=(0,r.default)(()=>void this.bottomExpanded,100);b.addDispose(b.onSizeChange(()=>A))}this.tabbarServices.set(a,b)}return b}getAllAccordionService(){return this.accordionServices}getAccordionService(a,b){let y=this.accordionServices.get(a);return y||(y=this.injector.get(l.AccordionService,[a,b]),this.accordionServices.set(a,y)),y}getTabbarHandler(a){let b=this.doGetTabbarHandler(a);if(!b){const y=this.viewToContainerMap.get(a);y?b=this.doGetTabbarHandler(y||""):this.debug.warn(`${a} view tabbar not found.`)}return b}getContainer(a){for(const b of this.tabbarServices.values()){const y=b.getContainer(a);if(y)return y}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(a){let b=this.handleMap.get(a);if(!b){let y;for(const A of this.tabbarServices.values())if(A.getContainer(a)){y=A.location;break}y&&(b=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(y)]),this.handleMap.set(a,b))}return b}collectTabbarComponent(a,b,y,A){if(A&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),b.hideIfEmpty&&!a.length&&!b.component){this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}),this.tabbarUpdateSet.has(b.containerId)&&this.tryUpdateTabbar(b.containerId);const w=this.getAccordionService(b.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(b.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(b.containerId),this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}))})),b.containerId}return this.getTabbarService(y).registerContainer(b.containerId,{views:a,options:b}),a.forEach(w=>{this.viewToContainerMap.set(w.id,b.containerId)}),b.containerId}getViewAccordionService(a){const b=this.viewToContainerMap.get(a);if(b)return this.getAccordionService(b)}collectViewComponent(a,b,y={},A){this.customViews.set(a.id,a),this.viewToContainerMap.set(a.id,b);const S=this.getAccordionService(b);return y&&(a.initialProps=y),S.appendView(a,A?.isReplace),S.views.length===1&&(this.tabbarUpdateSet.add(b),this.tryUpdateTabbar(b)),A?.fromExtension&&this.disposableMap.set(a.id,this.commandRegistry.registerCommand({id:`${a.id}.focus`},{execute:async()=>(await this.ensureViewReady(a.id),this.commandService.executeCommand(`workbench.view.extension.${b}`,{forceShow:!0}))})),b}ensureViewReady(a){const b=this.viewToContainerMap.get(a),y=new _.Deferred,A=this.getAccordionService(b);return A.visibleViews.get().find(S=>S.id===a)?y.resolve():A.addDispose(A.onAfterAppendViewEvent(S=>{S===a&&y.resolve()})),y.promise}tryUpdateTabbar(a){const b=this.holdTabbarComponent.get(a);b&&(this.getTabbarService(b.side).registerContainer(a,{views:b.views,options:b.options}),this.tabbarUpdateSet.delete(a),this.holdTabbarComponent.delete(a))}replaceViewComponent(a,b){const y=this.viewToContainerMap.get(a.id);if(!y){this.debug.warn(`The container corresponding to \`${a.id}\` was not found, please check the incoming parameters!`);return}const A=this.customViews.get(a.id);A&&(a=Object.assign(A,a)),this.collectViewComponent(a,y,b,{isReplace:!0})}disposeViewComponent(a){const b=this.disposableMap.get(a);b&&b.dispose();const y=this.viewToContainerMap.get(a);if(!y){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).disposeView(a)}revealView(a){const b=this.viewToContainerMap.get(a);if(!b){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).revealView(a)}disposeContainer(a){let b;for(const y of this.tabbarServices.values())if(y.getContainer(a)){b=y.location;break}b?this.getTabbarService(b).disposeContainer(a):this.debug.warn(`The Tabbar to the \`${a}\` was not found.`)}expandBottom(a){const b=this.getTabbarService(c.SlotLocation.bottom);b.currentContainerId.get()||b.updateCurrentContainerId(b.currentContainerId.get()||b.previousContainerId||b.containersMap.keys().next().value),b.doExpand(a),this.contextKeyService.createKey("bottomFullExpanded",b.isExpanded)}get bottomExpanded(){const a=this.getTabbarService(c.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",a.isExpanded),a.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(g.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(c.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,c.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),g=e(17793),l=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const f=this.contributionProvider.getContributions();for(const y of f)y.registerComponent&&y.registerComponent(this.componentRegistry);const a=this.rendererContributionProvider.getContributions();for(const y of a)y.registerRenderer&&y.registerRenderer(o.slotRendererRegistry);const b=this.toolBarContributionProvider.getContributions();for(const y of b)y.registerToolbarItems&&y.registerToolbarItems(this.toolBarRegistry)}registerComponent(f){f.register(g.DROP_RIGHT_CONTAINER,[],{component:l.RightDropArea,hideTab:!0,containerId:g.DROP_RIGHT_CONTAINER}),f.register(g.DROP_BOTTOM_CONTAINER,[],{component:l.BottomDropArea,hideTab:!0,containerId:g.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(f){f.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),f.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),f.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(f){f.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),f.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,a)}}),f.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,a,b)}}),f.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),f.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,a)}}),f.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,a,b)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),f.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),f.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),f.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),f.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.right-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,a)}}),f.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.left-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,a)}}),f.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),f.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(f){f.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[c.EXPLORER_CONTAINER_ID,c.SEARCH_CONTAINER_ID,c.SCM_CONTAINER_ID,c.DEBUG_CONTAINER_ID,c.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[c.MARKER_CONTAINER_ID,c.OUTPUT_CONTAINER_ID,c.DEBUG_CONSOLE_CONTAINER_ID,c.TERMINAL_CONTAINER_ID]}).forEach(([a,b],y)=>{const A=this.mainLayoutService.getTabbarService(a);A.viewReady.promise.then(()=>{b.forEach(S=>{var w,T;const D=A.getContainer(S);D&&f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${S}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:S},group:`${3+y}_${a}`})})})}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(f){f.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(g,l)=>l(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var g;const l=this.layoutService.getAllAccordionService(),h=Array.from(l.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(g=l.get(d))===null||g===void 0?void 0:g.views;if(E)for(let f=0,a=E.length;f<a;f++)u.push(this.injector.get(_,[d,E[f],{groupLabel:f===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends c.QuickOpenItem{constructor(g,l){super(l),this.containerId=g,this.options=l}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends c.QuickOpenItem{constructor(g,l,h){super(h),this.containerId=g,this.view=l,this.options=h}getLabel(){var g;return(g=this.view.name)===null||g===void 0?void 0:g.toUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l&&(l.activate(),l.isCollapsed(this.view.id)&&l?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(g=>{g.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):g.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const g=this.tabbarService.getContainer(this.containerId);g&&g.options&&(g.options.titleProps=s,g.options.titleComponent=_,g.fireChange(g))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const g of _){const l=this.accordionService.getViewState(g);this.accordionService.updateViewState(g,{...l,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),g=e(17793),l=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const f=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:Q=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=o.default.useContext(l.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const X=(0,p.useAutorun)(H.currentContainerId),ie=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),oe=U&&ie;oe&&!X&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const le=V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[pe,q]=d(H.visibleContainers.filter(_e=>{var te;return!(!((te=_e.options)===null||te===void 0)&&te.hideTab)}),le);q.forEach(_e=>{H.updateTabInMoreKey(_e.options.containerId,!0)});const Ee=o.default.useCallback((_e,te,ge,Te)=>{var Pe,Ae,we;const be=(Pe=_e.options)===null||Pe===void 0?void 0:Pe.containerId;if(!be||Te&&(!((we=(Ae=_e.options)===null||Ae===void 0?void 0:Ae.hideLocationTab)===null||we===void 0)&&we.includes(Te)))return null;te.updateTabInMoreKey(be,!1);let fe;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(fe){const Re=fe.cloneNode(!0);Re.classList.add(h.default.dragging),L&&(0,p.addClassName)(Re,L),document.body.appendChild(Re),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Re,0,0),document.body.removeChild(Re)})}te.handleDragStart(xe,be)},onDragOver:xe=>{xe.preventDefault(),fe&&fe.classList.add("on-drag-over")},onDragLeave:()=>{fe&&fe.classList.remove("on-drag-over")},onDrop:xe=>{fe&&fe.classList.remove("on-drag-over"),te.handleDrop(xe,be)},onDragEnd:xe=>{te.handleDragEnd(xe)},key:be,id:be,onContextMenu:xe=>te.handleContextMenu(xe,be),onClick:xe=>te.handleTabClick(xe,oe||P),ref:xe=>fe=xe,className:(0,r.default)({active:ge===be},L)},o.default.createElement(M,{component:_e}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},pe.map(_e=>Ee(_e,H,X,$)),Q({props:I,renderContainers:Ee}),q.length?o.default.createElement("li",{key:"tab-more",onClick:_e=>{var te;return H.showMoreMenu(_e,pe[pe.length-1]&&((te=pe[pe.length-1].options)===null||te===void 0?void 0:te.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=f;const a=({component:I})=>{var O,M,R;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=o.default.useState(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const Q=L.options;return Q?.activateKeyBinding?`${Q?.title} (${k.acceleratorForKeyString(Q.activateKeyBinding,"+")})`:Q?.title},[L]);return(0,o.useEffect)(()=>{const Q=L.onChange(V=>{B({...V})});return()=>{Q.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(c.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(c.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=a;const b=({component:I})=>{var O,M,R;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=b;const y=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=y;const A=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=A;const S=I=>{const{barSize:O=48,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.RightTabbarRenderer=S;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=o.default.useContext(l.TabbarConfig),k=(0,p.useInjectable)(g.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),B=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(l.TabbarConfig),O=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),g=e(9522),l=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),f=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),a={display:"block"},b={display:"none"},y=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(B.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(Q=>{var V;const $=(V=Q.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=B.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?a:b,id:R},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(f,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:Q,...P}))))}))};t.BaseTabPanelView=y;const A=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:Q,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,p.useInjectable)(c.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(le=>{z.get(g.AccordionServiceFactory)($).handleContextMenu(le)},[$]);if(!$)return null;const X=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!X)return null;const ie=(0,p.useViewState)(M,j),oe=o.default.useCallback(le=>R?R({children:le}):le,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:O})}):null,Q&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:Q,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:le=>B.current=le},o.default.createElement(s.ProgressBar,{progressModel:X.progressModel}),oe(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:ie,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(l.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=A;const S=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),Q=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,B),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:z,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:B,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:Q},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:X=>L.current=X},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:z})):o.default.createElement(l.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:S,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),g=n.__importDefault(e(5330)),l=e(752);t.TabbarConfig=(0,o.createContext)({side:c.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:f,components:a,direction:b="left-to-right",TabbarView:y,side:A,TabpanelView:S})=>{const w=(0,c.useInjectable)(l.TabbarServiceFactory)(A),T=(0,c.useInjectable)(c.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[O,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),a.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[a]);const R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(b)])},[]);return(0,o.useEffect)(()=>{c.fastdom.measure(()=>{R()});let P;T.onDirective(c.ResizeEvent.createDirective(A),()=>{P&&P.dispose(),P=c.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(g.default.tab_container,f),style:{flexDirection:v.Layout.getFlexDirection(b)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:A,direction:b,fullSize:O}},o.default.createElement(y,null),o.default.createElement(S,null)))});const h=({className:E,components:f,tabbarView:a,tabpanelView:b})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:f,TabbarView:a??_.RightTabbarRenderer,TabpanelView:b??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:f,TabbarView:a??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:f,TabbarView:a??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),g=e(17793),l=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=f=>a=>f.get(g.IMainLayoutService).getTabbarService(a);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends c.WithEventBus{constructor(a){super(),this.location=a,this.doChangeViewEmitter=new c.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},b=>(this.shouldChangeView.read(b),this.containerIdObs.read(b))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new c.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new c.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new c.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new c.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(b=>{this.resizeHandle&&this.resizeHandle.hidePanel(b)},60),this._menuMap=new Map,this.setIsLatter(a===c.SlotLocation.right||a===c.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,c.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,c.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(c.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(a){this.isLatter=a}updateNextContainerId(a){(0,c.isUndefined)(a)?this.useFirstContainerId=!0:this.nextContainerId=a}updateCurrentContainerId(a){(0,s.transaction)(b=>{this.containerIdObs.set(a,b)})}updateBadge(a,b){const y=this.getContainer(a);y&&y.options&&(y.options.badge=b),y?.fireChange(y)}registerPanelCommands(){this.commandRegistry.registerCommand(l.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(l.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(l.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(a,b)=>{this.layoutService.toggleSlot(c.SlotLocation.bottom,a,b)}})}getContainerState(a){return this.state.get(a)}hideContainer(a){const b=this.state.get(a);b&&(b.hidden=!0)}showContainer(a){const b=this.state.get(a);b&&(b.hidden=!1)}updatePanelVisibility(a){a===void 0&&(a=this.containersMap.size>0),this.updatePanel(a)}ensureViewReady(){(0,c.isDefined)(this.barSize)&&(0,c.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(a){this.panelSize=a,(0,c.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(a){this.barSize=a,(0,c.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?c.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(a,b){const y=this.tabInMoreKeyMap.get(a);y&&y.set(b)}get visibleContainers(){const a=[];return this.containersMap.forEach(b=>{const y=b.options&&this.state.get(b.options.containerId);(!y||!y.hidden)&&a.push(b)}),a.sort((b,y)=>this.getContainerState(b.options.containerId).priority-this.getContainerState(y.options.containerId).priority)}registerResizeHandle(a){const{setSize:b,setRelativeSize:y,getSize:A,getRelativeSize:S,lockSize:w,setMaxSize:T,hidePanel:D}=a;return this.resizeHandle={setSize:I=>b(I,this.isLatter),setRelativeSize:(I,O)=>y(I,O,this.isLatter),getSize:()=>A(this.isLatter),getRelativeSize:()=>S(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(a,b){var y;if(this.containersMap.has(a))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(a)),this.nextContainerId===a&&this.updateCurrentContainerId(a);const A=new c.DisposableCollection,S=b.options||{containerId:a};b.options=S;const w=new c.Emitter;this.containersMap.set(a,{fireChange:D=>w.fire(D),onChange:w.event,views:b.views,options:S}),A.push({dispose:()=>{this.containersMap.delete(a),this.state.delete(a)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=b.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,b);for(let D=T;D<this.sortedContainers.length;D++){const O=(y=this.sortedContainers[D].options)===null||y===void 0?void 0:y.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}A.push(this.registerSideEffects(b)),this.eventBus.fire(new g.TabBarRegistrationEvent({tabBarId:a})),a===this.currentContainerId.get()&&this.handleChange(a,""),this.viewContextKeyRegistry.registerContextKeyService(a,this.contextKeyService.createScoped()).createKey("view",a),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(a,A),this.onDidRegisterContainerEmitter.fire(a)}registerSideEffects(a){var b;const y=new c.DisposableCollection;!((b=a.options)===null||b===void 0)&&b.hideTab||(y.push(this.registerHideMenu(a)),y.push(this.registerMoreMenu(a))),y.push(this.registerActivateKeyBinding(a,a.options.fromExtension));const A=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${a.options.containerId}`,!0);return y.push({dispose:()=>{A.set(!1)}}),y.push(this.progressService.registerProgressIndicator(a.options.containerId)),y.push(this.registerContainerPanelRelatedCommand(a)),y}registerContainerPanelRelatedCommand(a){var b,y,A,S,w;const T=new c.DisposableCollection,D=(b=a.options)===null||b===void 0?void 0:b.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,c.formatLocalize)("view.command.show",(A=(y=a.options)===null||y===void 0?void 0:y.title)!==null&&A!==void 0?A:D),labelLocalized:(0,c.createFormatLocalizedStr)("view.command.show",(w=(S=a.options)===null||S===void 0?void 0:S.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(a){const b=new c.DisposableCollection,y=a.options.containerId;return b.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(y,b),label:a.options.title||y},group:"1_widgets"})),b}registerMoreMenu(a){const b=new c.DisposableCollection,y=a.options.containerId,A=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(y),!1);return this.tabInMoreKeyMap.set(y,A),b.push({dispose:()=>this.tabInMoreKeyMap.delete(y)}),b.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(a,b),label:a.options.title||y},group:"inline",when:`${this.getTabInMoreCtxKey(y)} == true`,toggledWhen:`${(0,c.getTabbarCtxKey)(this.location)} == ${y}`,iconClass:a.options.iconClass})),b}disposeContainer(a){var b;const y=this.disposableMap.get(a);y&&y.dispose(),this.currentContainerId.get()===a&&this.updateCurrentContainerId(((b=this.visibleContainers[0].options)===null||b===void 0?void 0:b.containerId)||"")}updateTitle(a,b){const y=this.getContainer(a);y&&(y.options.title=b)}getContainer(a){return a?this.containersMap.get(a):void 0}getTitleToolbarMenu(a){const b=this._menuMap.get(a);if(b)return b;const y=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(a));this._menuMap.set(a,y);const A=this.disposableMap.get(a),S=[y,(0,c.toDisposable)(()=>{this._menuMap.delete(a)})];return A?A.pushAll(S):this.addDispose(S),y}doExpand(a){if(this.resizeHandle){const{setRelativeSize:b}=this.resizeHandle;a?this.isLatter?b(0,1):b(1,0):b(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:a}=this.resizeHandle,b=a().join(",");return this.isLatter?b==="0,1":b==="1,0"}return!1}handleTabClick(a,b){const y=a.currentTarget.id;y===this.currentContainerId.get()&&!b?this.updateCurrentContainerId(""):this.updateCurrentContainerId(y)}handleContextMenu(a,b){a.preventDefault(),a.stopPropagation();const y=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}showMoreMenu(a,b){const y=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{lastContainerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}handleDragStart(a,b){a.dataTransfer.setData("containerId",b),this.layoutService.showDropAreaForContainer(b)}handleDrop(a,b){if(a.dataTransfer.getData("containerId")){const y=a.dataTransfer.getData("containerId"),A=this.visibleContainers,S=A.findIndex(T=>y===T.options.containerId),w=A.findIndex(T=>b===T.options.containerId);this.doInsertTab(A,S,w),this.storeState()}}handleDragEnd(a){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const a of this.state.keys())this.storedState[a]&&this.state.set(a,this.storedState[a]);this.visibleContainers.forEach(a=>{g.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(a.options.containerId)})}removeContainer(a){const b=this.disposableMap.get(a);b?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(a,b){this.registerContainer(a,b),this.updateCurrentContainerId(a),this.doChangeViewEmitter.fire()}doInsertTab(a,b,y){const A=this.getContainerState(a[y].options.containerId).priority,S=(T,D)=>{const I=this.getContainerState(a[T].options.containerId),O=this.getContainerState(a[D].options.containerId);I.priority=O.priority};let w;if(b>y)for(w=y;w<b;w++)S(w,w+1);else for(w=y;w>b;w--)S(w,w-1);this.getContainerState(a[w].options.containerId).priority=A,this.doChangeViewEmitter.fire()}storeState(){const a={};this.state.forEach((b,y)=>{a[y]=b}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),a)}registerActivateKeyBinding(a,b){const y=a.options,A=y.containerId,S=b?`workbench.view.extension.${A}`:`workbench.view.${A}`,w=new c.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:S},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===A?"":A):this.updateCurrentContainerId(A)}})),y.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:S,keybinding:y.activateKeyBinding})),w}registerGlobalToggleCommand(){const a=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:a},{execute:({containerId:b})=>{this.doToggleTab(b)},isEnabled:()=>this.visibleContainers.length>1}),a}registerVisibleToggleCommand(a,b){const y=`activity.bar.toggle.${a}`;return b.push(this.commandRegistry.registerCommand({id:y},{execute:({forceShow:A}={})=>{this.doToggleTab(a,A)},isToggled:()=>!this.getContainerState(a).hidden,isEnabled:()=>this.getContainerState(a).hidden||this.visibleContainers.length!==1})),y}registerMoreToggleCommand(a,b){const{options:y}=a,{containerId:A}=y,S=`activity.bar.activate.more.${A}`;return b.push(this.commandRegistry.registerCommand({id:S},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(A),w){const T=this.getContainerState(A),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),S}getTabInMoreCtxKey(a){return`${a}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:l.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:l.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:l.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(a,b){const y=this.getContainerState(a);b===void 0?y.hidden=!y.hidden:y.hidden=!b,y.hidden&&this.currentContainerId.get()===a&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(a){const b=this.getContainer(a);return b&&b.options&&b.options.expanded}onResize(){c.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const a=this.resizeHandle.getSize();a!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=a,this.onSizeChangeEmitter.fire({size:a}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:a,newValue:b})=>{this.previousContainerId=a===d?"":a,this.handleChange(b,a)})}handleChange(a,b){var y;if(!this.resizeHandle)return;const{getSize:A,setSize:S,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:b,currentId:a});const T=this.shouldExpand(a);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(a,T);else if(a){b&&a!==b&&(this.prevSize=A());const D=this.getContainer(a);S(this.prevSize||this.panelSize+this.barSize),w(!!(!((y=D?.options)===null||y===void 0)&&y.noResize)),this.activatedKey.set(a)}else S(this.barSize),w(!0)}tryRestoreAccordionSize(a){var b,y;if(this.accordionRestored.has(a))return;const A=this.containersMap.get(a);if((!A||!((b=A.options)===null||b===void 0)&&b.component)&&((y=A?.options)===null||y===void 0?void 0:y.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(a).restoreState(),this.accordionRestored.add(a)}handleFullExpanded(a,b){if(!this.resizeHandle)return;const{setRelativeSize:y,setSize:A}=this.resizeHandle;a?b?this.isLatter?y(0,1):y(1,0):A(this.prevSize||this.panelSize+this.barSize):A(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(c.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",c.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(17793);var v;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(g,l){var h,u,d,E;const f=(h=g.group)!==null&&h!==void 0?h:v.More,a=(u=l.group)!==null&&u!==void 0?u:v.More;return f!==a?f.localeCompare(a):((d=g.order)!==null&&d!==void 0?d:5)-((E=l.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const l=this.items.filter(h=>h.visible);return l.length===0&&this.defaultItem?[this.defaultItem.descriptor]:l.map(h=>h.descriptor)}constructor(l){this.id=l,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const l=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of l)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let l=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,l=!0)}l&&this._onDidChange.fire()}dispose(){this.disposables.forEach(l=>l.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new c.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(l,h){return this.viewWelcomeContent.add(l,h),this._onDidChangeViewWelcomeContent.fire(l),{dispose:()=>{this.viewWelcomeContent.delete(l,h),this._onDidChangeViewWelcomeContent.fire(l)}}}registerViewWelcomeContent2(l,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(l,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(l,E),this._onDidChangeViewWelcomeContent.fire(l)}));return this._onDidChangeViewWelcomeContent.fire(l),u}getViewWelcomeContent(l){const h=[];return this.viewWelcomeContent.forEach(l,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=l;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const g=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function l(d){const E=new Array;let f,a=0,b=0;for(;(f=g.exec(d))!==null;){b=f.index||0,E.push(d.substring(a,b)),a=(f.index||0)+f[0].length;const[,y,A]=f;E.push(y?`$(${A})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(A)}))}return a<d.length&&E.push(d.substring(a)),E}const h=d=>{const{contents:E}=d,[f,a]=o.default.useState(E.map(A=>A.precondition?!1:null)),b=(0,p.useInjectable)(p.IContextKeyService),y=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const A=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),S=b.onDidChangeContext(w=>{A.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&a(f.map((I,O)=>O===D?b.match(E[D].precondition):I))})});return()=>S.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:A,precondition:S},w)=>{const T=A.split(`
31742
31742
  `),D=[];for(let I of T){if(I=I.trim(),!I)continue;const O=(0,v.parseLinkedText)(I);if(O.nodes.length===1&&typeof O.nodes[0]!="string"){const M=O.nodes[0];D.push(o.default.createElement("div",{key:D.length,title:M.title,className:"button-container"},o.default.createElement(c.Button,{disabled:f[w]===!1,onClick:()=>y.open(M.href)},l(M.label))))}else{const M=O.nodes.map((R,P)=>typeof R=="string"?R:o.default.createElement("a",{key:P,className:(0,r.default)({disabled:R.href.startsWith("command:")&&f[w]===!1}),title:R.title,onClick:()=>y.open(R.href)},R.label));D.push(o.default.createElement("p",{key:D.length},M))}}return o.default.createElement(o.default.Fragment,{key:w},D)}))};function u(d,E){return d.viewId===E.viewId}t.WelcomeView=o.default.memo(d=>{const E=(0,p.useInjectable)(_.ViewsController,[d.viewId]),[f,a]=o.default.useState(E.contents);return o.default.useEffect(()=>{E.onDidChange(()=>{const b=E.contents;a(b)})},[]),f.length?o.default.createElement("div",{className:m.default.welcome},o.default.createElement(h,{contents:f})):null},u)},17793:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(72260),t)},72260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DROP_RIGHT_CONTAINER=t.DROP_BOTTOM_CONTAINER=t.SUPPORT_ACCORDION_LOCATION=t.ViewCollapseChangedEvent=t.IViewsRegistry=t.TabBarRegistrationEvent=t.MainLayoutContribution=t.IMainLayoutService=void 0;const n=e(41869);t.IMainLayoutService=Symbol("IMainLayoutService"),t.MainLayoutContribution=Symbol("MainLayoutContribution");class r extends n.BasicEvent{}t.TabBarRegistrationEvent=r,t.IViewsRegistry=Symbol("IViewsRegistry");class o extends n.BasicEvent{}t.ViewCollapseChangedEvent=o,t.SUPPORT_ACCORDION_LOCATION=new Set([n.SlotLocation.left,n.SlotLocation.right]),t.DROP_BOTTOM_CONTAINER="drop-bottom",t.DROP_RIGHT_CONTAINER="drop-right"},63067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(17793),t)},93835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedMarkdownEditorContribution=t.MARKDOWN_EDITOR_COMPONENT_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(57517),v=e(21066),m=e(81001);t.MARKDOWN_EDITOR_COMPONENT_ID="MARKDOWN_EDITOR_COMPONENT_ID";let _=class{registerEditorComponent(g){g.registerEditorComponent({uid:t.MARKDOWN_EDITOR_COMPONENT_ID,component:m.MarkdownEditorComponent,scheme:c.Schemes.file}),g.registerEditorComponentResolver(c.Schemes.file,(l,h)=>{l.uri.path.ext===".md"&&h.push({type:p.EditorOpenType.component,componentId:t.MARKDOWN_EDITOR_COMPONENT_ID,title:(0,c.localize)("editorOpenType.preview"),weight:this.preferenceService.get("application.preferMarkdownPreview")?10:-1})})}};t.EmbeddedMarkdownEditorContribution=_,n.__decorate([(0,r.Autowired)(v.IMarkdownService),n.__metadata("design:type",Object)],_.prototype,"markdownService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.EmbeddedMarkdownEditorContribution=_=n.__decorate([(0,c.Domain)(p.BrowserEditorContribution)],_)},81001:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(57517),p=e(21066),v=({resource:m})=>{let _=null;const s=(0,o.useInjectable)(p.IMarkdownService),g=(0,o.useInjectable)(c.IEditorDocumentModelService);return r.default.useEffect(()=>{if(_){const l=new o.Disposable,h=new o.CancellationTokenSource;return l.addDispose({dispose:()=>{h.cancel()}}),g.createModelReference(m.uri,"markdown-preview").then(u=>{if(h.token.isCancellationRequested){u&&u.dispose();return}const d=new o.Emitter;l.addDispose(d),l.addDispose(u.instance.getMonacoModel().onDidChangeContent(E=>{d.fire(u.instance.getText())})),_&&s.previewMarkdownInContainer(u.instance.getText(),_,h.token,void 0,d.event).then(E=>{l.addDispose(E)}),l.addDispose(u)}),()=>{l.dispose()}}}),r.default.createElement("div",{ref:l=>{_=l},style:{height:"100%"}})};t.MarkdownEditorComponent=v},31101:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownModule=t.Markdown=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(21066),p=e(89637);var v=e(6001);Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return v.Markdown}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IMarkdownService,useClass:p.MarkdownServiceImpl}]}};t.MarkdownModule=m,t.MarkdownModule=m=n.__decorate([(0,r.Injectable)()],m)},86422:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
31743
31743
  /*---------------------------------------------------------------------------------------------
31744
31744
  * Copyright (c) Microsoft Corporation. All rights reserved.