@opensumi/cli-engine 3.3.4-next-1726136311.0 → 3.3.4-next-1726192095.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.
- package/lib/browser/browser.js +4 -4
- package/package.json +10 -10
package/lib/browser/browser.js
CHANGED
|
@@ -28059,10 +28059,10 @@ ${v}`)}return this.keybindingsChanged.fire({affectsCommands:[d.command]}),{dispo
|
|
|
28059
28059
|
`)&&R.severity===y?(this.treeModel.root.unlinkItem(R),await this.insertItemWithAnsi(R.description+v.output,y,W,Z)):await this.insertItemWithAnsi(v.output,y,W,Z)}this.fireDidChange()}async clearConsole(){var l;const s=(l=this.treeModel.root.flattenedBranch)===null||l===void 0?void 0:l.map(d=>this.treeModel.root.getTreeNodeById(d));if(s)for(const d of s)this.treeModel.root.unlinkItem(d)}async insertItemWithAnsi(l,s,d,m){var v;const f=await(0,u.handleANSIOutput)(l,this.linkDetector,this.themeService,void 0);this.treeModel.root.insertItem(new h.AnsiConsoleNode(l,(v=this.treeModel)===null||v===void 0?void 0:v.root,this.linkDetector,f,s,d,m))}async execute(l){var s;this.treeModel.root.insertItem(new h.AnsiConsoleNode(l,this.treeModel.root,this.linkDetector,void 0,c.MessageType.Info));const d=new h.DebugConsoleNode({session:this.session},l,(s=this.treeModel)===null||s===void 0?void 0:s.root);await d.evaluate(),this.treeModel.root.insertItem(d),this.fireDidChange()}append(l){var s;if(!l)return;const d=this.resolveChildren().slice(-1)[0];d instanceof h.AnsiConsoleNode&&d.description===this.uncompletedItemContent?(this.resolveChildren().pop(),this.uncompletedItemContent+=l):this.uncompletedItemContent=l,this.treeModel.root.insertItem(new h.AnsiConsoleNode(this.uncompletedItemContent,(s=this.treeModel)===null||s===void 0?void 0:s.root,this.linkDetector,void 0,c.MessageType.Info)),this.fireDidChange()}appendLine(l){var s;this.treeModel.root.insertItem(new h.AnsiConsoleNode(l,(s=this.treeModel)===null||s===void 0?void 0:s.root,this.linkDetector,void 0,c.MessageType.Info)),this.fireDidChange()}};n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],I.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(G.LinkDetector),n.__metadata("design:type",G.LinkDetector)],I.prototype,"linkDetector",void 0),n.__decorate([(0,o.Autowired)(g.IThemeService),n.__metadata("design:type",Object)],I.prototype,"themeService",void 0),I=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__param(0,(0,o.Optional)()),n.__param(1,(0,o.Optional)()),n.__metadata("design:paramtypes",[p.DebugSession,b.DebugConsoleTreeModel])],I),e.DebugConsoleSession=I},15153:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleModelService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(93899),G=t(64582),p=t(58542),h=t(16170),b=t(98650),I=t(32756),r=t(17280),l=t(80390),s=t(75563),d=a.__importDefault(t(80315)),{Path:m}=g.path;let v=n=class{constructor(){this.debugSessionModelMap=new Map,this._changeEventDispatchQueue=[],this.selectedDecoration=new c.Decoration(d.default.mod_selected),this.contextMenuDecoration=new c.Decoration(d.default.mod_actived),this.loadingDecoration=new c.Decoration(d.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new g.Emitter,this.onDidUpdateTreeModelEmitter=new g.Emitter,this.treeModelDisposableCollection=new g.DisposableCollection,this.debugConsoleDisposableCollection=new g.DisposableCollection,this.activeNodeDecoration=(N,W=!0)=>{var Z;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),N){if(this.selectedNodes.length>0)for(const y of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(y);this.focusedNode,this.selectedDecoration.addTarget(N),this._focusedNode=N,this._selectedNodes=[N],W&&((Z=this.treeModel)===null||Z===void 0||Z.dispatchChange())}},this.activeNodeActivedDecoration=N=>{var W;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this._focusedNode=void 0),this.contextMenuDecoration.addTarget(N),this._contextMenuNode=N,(W=this.treeModel)===null||W===void 0||W.dispatchChange()},this.enactiveNodeDecoration=()=>{var N;this.focusedNode&&(this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(N=this.treeModel)===null||N===void 0||N.dispatchChange()},this.handleContextMenu=(N,W)=>{var Z;N.stopPropagation(),N.preventDefault();const{x:y,y:E}=N.nativeEvent;this.debugContextKey.contextInDebugConsole.set(!0),W?this.activeNodeActivedDecoration(W):this.enactiveNodeDecoration();let R;W?R=W:R=(Z=this.treeModel)===null||Z===void 0?void 0:Z.root;const A=this.contextMenuService.createMenu({id:u.MenuId.DebugConsoleContext,contextKeyService:this.debugContextKey.contextKeyScoped}),w=A.getMergedMenuNodes();A.dispose(),this.ctxMenuRenderer.show({anchor:{x:y,y:E},menuNodes:w,args:[R],onHide:()=>{window.requestAnimationFrame(()=>{this.debugContextKey.contextInDebugConsole.set(!1)})}})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=N=>{this.activeNodeDecoration(N)},this.handleTwistierClick=(N,W)=>{if(W===c.TreeNodeType.CompositeTreeNode){if(b.DebugConsoleNode.is(N)&&N.available){this.activeNodeDecoration(N,!1),this.toggleDirectory(N);return}else if(N.variablesReference){this.activeNodeDecoration(N,!1),this.toggleDirectory(N);return}}this.activeNodeDecoration(N)},this.toggleDirectory=async N=>{N.expanded?this.treeHandle.collapseNode(N):this.treeHandle.expandNode(N)},this.flushEventQueue=()=>{let N;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((Z,y)=>{const E=m.pathDepth(Z),R=m.pathDepth(y);return E-R});const W=[this._changeEventDispatchQueue[0]];for(const Z of this._changeEventDispatchQueue)W.some(y=>Z.indexOf(y)===0)||W.push(Z);return N=(0,g.pSeries)(W.map(Z=>async()=>{var y,E;const R=(E=(y=this.treeModel)===null||y===void 0?void 0:y.root)===null||E===void 0?void 0:E.getTreeNodeByPath(Z);return R&&c.CompositeTreeNode.is(R)&&await R.refresh(),null})),this._changeEventDispatchQueue=[],N},this.init()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){var N;return(N=this._activeDebugSessionModel)===null||N===void 0?void 0:N.treeModel}get debugConsoleSession(){var N;return(N=this._activeDebugSessionModel)===null||N===void 0?void 0:N.debugConsoleSession}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}clear(){this.initTreeModel(this.manager.currentSession,!0)}collapseAll(){var N;(N=this.treeModel)===null||N===void 0||N.root.collapsedAll()}copyAll(){var N;let W="";if(!(!(!((N=this.treeModel)===null||N===void 0)&&N.root)||!this.treeModel.root.children)){for(const Z of this.treeModel.root.children)W+=this.getValidText(Z)+`
|
|
28060
28060
|
`;this.clipboardService.writeText(W.slice(0,-1))}}copy(N){N&&this.clipboardService.writeText(this.getValidText(N))}getValidText(N){return N.description.endsWith(`
|
|
28061
28061
|
`)?N.description.slice(0,-1):N.description}getConsoleModel(N){return this.debugSessionModelMap.get(N)}dispose(){this.disposeTreeModel(),this.disposeDebugConsole()}disposeTreeModel(){this.treeModelDisposableCollection.disposed||this.treeModelDisposableCollection.dispose()}disposeDebugConsole(){this.debugConsoleDisposableCollection.disposed||this.debugConsoleDisposableCollection.dispose()}async init(){this.debugConsoleDisposableCollection.push(this.manager.onDidDestroyDebugSession(N=>{this.debugSessionModelMap.delete(N.id),this.debugSessionModelMap.size>0&&this.initTreeModel(this.manager.currentSession)})),this.debugConsoleDisposableCollection.push(this.manager.onDidChangeActiveDebugSession(N=>{N.current&&this.initTreeModel(N.current)}))}listenTreeViewChange(){this.disposeTreeModel(),this.treeModel&&(this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,N=>{this.loadingDecoration.addTarget(N)})),this.treeModelDisposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,N=>{this.loadingDecoration.removeTarget(N)})))}async initTreeModel(N,W){if(!N){this._activeDebugSessionModel=void 0,this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel);return}const Z=N.hasSeparateRepl()?N.id:N.parentSession.id;if(this.debugSessionModelMap.has(Z)&&!W){const y=this.debugSessionModelMap.get(Z);y?.debugConsoleSession.addChildSession(N),this._activeDebugSessionModel=y}else{const y=new b.DebugConsoleRoot({});if(!y)return;const E=this.injector.get(l.DebugConsoleTreeModel,[y]),R=this.injector.get(s.DebugConsoleSession,[N,E]);this._activeDebugSessionModel={treeModel:E,debugConsoleSession:R},R.onDidChange(async()=>{if(!E)return;const A=E.root.branchSize,w=R.resolveChildren();E.root.updatePresetChildren(w),A!==w.length&&(this.refresh(),E.isScrollBottom&&await this.treeHandle.ensureVisible(w[w.length-1]),E?.dispatchChange())}),this.debugSessionModelMap.set(Z,this._activeDebugSessionModel),this.initDecorations(y),this.listenTreeViewChange()}return this.onDidUpdateTreeModelEmitter.fire(this._activeDebugSessionModel),this._activeDebugSessionModel}initDecorations(N){this._decorations=new c.DecorationsManager(N),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(N){this._debugWatchTreeHandle=N}dispatchWatchEvent(N,W,Z){const y=N.watchEvents.get(W);y&&y.callback&&y.callback(Z)}collapsedAll(){var N;(N=this.treeModel)===null||N===void 0||N.root.collapsedAll()}async refresh(N){if(!N)if(this.treeModel)N=this.treeModel.root;else return;!b.ExpressionContainer.is(N)&&N.parent&&(N=N.parent),this.queueChangeEvent(N.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(N,W){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new g.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var Z;await this.flushEventQueue(),(Z=this.flushEventQueueDeferred)===null||Z===void 0||Z.resolve(),this.flushEventQueueDeferred=null,W()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(N)===-1&&this._changeEventDispatchQueue.push(N)}async execute(N){if(!this.treeModel)return;const W=this.treeModel.root,Z=new h.AnsiConsoleNode(N,W,this.linkDetector);this.dispatchWatchEvent(W,W.path,{type:c.WatchEvent.Added,node:Z,id:W.id});const y=new b.DebugConsoleNode({session:this.manager.currentSession},N,W);await y.evaluate(),this.dispatchWatchEvent(W,W.path,{type:c.WatchEvent.Added,node:y,id:W.id}),this.treeHandle.ensureVisible(y,"end",!0)}};v.DEFAULT_REFRESH_DELAY=200,a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],v.prototype,"injector",void 0),a.__decorate([(0,o.Autowired)(u.ICtxMenuRenderer),a.__metadata("design:type",u.ICtxMenuRenderer)],v.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,o.Autowired)(u.AbstractContextMenuService),a.__metadata("design:type",u.AbstractContextMenuService)],v.prototype,"contextMenuService",void 0),a.__decorate([(0,o.Autowired)(I.DebugViewModel),a.__metadata("design:type",I.DebugViewModel)],v.prototype,"viewModel",void 0),a.__decorate([(0,o.Autowired)(g.IContextKeyService),a.__metadata("design:type",Object)],v.prototype,"contextKeyService",void 0),a.__decorate([(0,o.Autowired)(G.IDebugSessionManager),a.__metadata("design:type",Object)],v.prototype,"manager",void 0),a.__decorate([(0,o.Autowired)(g.IClipboardService),a.__metadata("design:type",Object)],v.prototype,"clipboardService",void 0),a.__decorate([(0,o.Autowired)(p.LinkDetector),a.__metadata("design:type",p.LinkDetector)],v.prototype,"linkDetector",void 0),a.__decorate([(0,o.Autowired)(r.DebugContextKey),a.__metadata("design:type",r.DebugContextKey)],v.prototype,"debugContextKey",void 0),v=n=a.__decorate([(0,o.Injectable)(),a.__metadata("design:paramtypes",[])],v),e.DebugConsoleModelService=v},11456:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleContribution=e.DEBUG_CONSOLE_VIEW_ID=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(98295),u=t(64582),G=t(17280),p=t(4983),h=t(1276),b=t(4161),I=t(35199),r=t(5131);e.DEBUG_CONSOLE_VIEW_ID="debug-console-view";let l=class{registerComponent(d){d.register("debug-console",{id:e.DEBUG_CONSOLE_VIEW_ID,component:r.DebugConsoleView},{title:(0,o.localize)("debug.console.panel.title"),priority:8,containerId:u.DEBUG_CONSOLE_CONTAINER_ID,iconClass:(0,o.getIcon)("debug"),titleComponent:b.DebugConsoleFilterView})}registerToolbarItems(d){d.registerItem({id:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,command:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,iconClass:(0,o.getIcon)("clear"),viewId:u.DEBUG_CONSOLE_CONTAINER_ID,tooltip:u.DEBUG_COMMANDS.CLEAR_CONSOLE.label})}registerCommands(d){d.registerCommand(u.DEBUG_COMMANDS.CLEAR_CONSOLE,{execute:()=>{this.debugConsoleModelService.clear()}}),d.registerCommand(u.DEBUG_COMMANDS.COPY_CONSOLE_ITEM,{execute:m=>{this.debugConsoleModelService.copy(m)}}),d.registerCommand(u.DEBUG_COMMANDS.COPY_CONSOLE_ALL,{execute:()=>{this.debugConsoleModelService.copyAll()}}),d.registerCommand(u.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM,{execute:()=>{this.debugConsoleModelService.collapseAll()},isEnabled:()=>this.debugContextKey.contextInDebugConsole.get()===!0}),d.registerCommand(u.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE,{execute:()=>{this.debugConsoleService.runExecute()}}),d.registerCommand(u.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW,{execute:()=>{this.debugConsoleService.showNextValue()}}),d.registerCommand(u.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW,{execute:()=>{this.debugConsoleService.showPreviousValue()}}),d.registerCommand(u.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS,{execute:()=>{this.debugConsoleFilterService.focusInput()}})}registerMenus(d){d.registerMenuItem(c.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COPY_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.copy")},group:"copy"}),d.registerMenuItem(c.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COPY_CONSOLE_ALL.id,label:(0,o.localize)("debug.console.copyAll")},group:"copy"}),d.registerMenuItem(c.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.CLEAR_CONSOLE.id,label:(0,o.localize)("debug.console.clear")},group:"other"}),d.registerMenuItem(c.MenuId.DebugConsoleContext,{command:{id:u.DEBUG_COMMANDS.COLLAPSE_ALL_CONSOLE_ITEM.id,label:(0,o.localize)("debug.console.collapseAll")},group:"other"})}registerKeybindings(d){d.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_ENTER_EVALUATE.id,keybinding:"enter",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),d.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_INPUT_DOWN_ARROW.id,keybinding:"down",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),d.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_INPUT_UP_ARROW.id,keybinding:"up",when:`${p.CONTEXT_IN_DEBUG_REPL.raw} && ${p.CONTEXT_IN_DEBUG_MODE.raw}`}),d.registerKeybinding({command:u.DEBUG_COMMANDS.CONSOLE_FILTER_FOCUS.id,keybinding:"ctrlcmd+f",when:`${p.CONTEXT_IN_DEBUG_REPL.raw}`})}};n.__decorate([(0,a.Autowired)(u.IDebugConsoleModelService),n.__metadata("design:type",Object)],l.prototype,"debugConsoleModelService",void 0),n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],l.prototype,"contextKeyService",void 0),n.__decorate([(0,a.Autowired)(I.DebugConsoleService),n.__metadata("design:type",I.DebugConsoleService)],l.prototype,"debugConsoleService",void 0),n.__decorate([(0,a.Autowired)(h.DebugConsoleFilterService),n.__metadata("design:type",h.DebugConsoleFilterService)],l.prototype,"debugConsoleFilterService",void 0),n.__decorate([(0,a.Autowired)(G.DebugContextKey),n.__metadata("design:type",G.DebugContextKey)],l.prototype,"debugContextKey",void 0),l=n.__decorate([(0,g.Domain)(o.ComponentContribution,o.TabBarToolbarContribution,o.CommandContribution,c.MenuContribution,o.KeybindingContribution)],l),e.DebugConsoleContribution=l},35199:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleService=void 0;const a=t(85608),o=t(76003),c=t(41869),g=t(43718),u=t(54414),G=t(57517),p=t(63067),h=a.__importStar(t(20868)),b=t(52902),I=t(52416),r=t(44198),l=t(64582),s=t(38029),d=t(17280),m=t(15153),v="consoleinputdecoration",f="debug.console.history",N=18,W=E=>E.replace(/^\S/,R=>R.toUpperCase()),Z=Object.assign(Object.assign({},(0,G.getSimpleEditorOptions)()),{scrollbar:{horizontal:"visible",vertical:"hidden",handleMouseWheel:!0},acceptSuggestionOnEnter:"on"});let y=n=class{constructor(){this._consoleInputElement=null,this._updateDisposable=null,this._onConsoleInputValueChange=new g.Emitter,this.onConsoleInputValueChange=this._onConsoleInputValueChange.event,this._onInputHeightChange=new g.Emitter,this.onInputHeightChange=this._onInputHeightChange.event}get _isReadonly(){const R=this.manager.currentSession;return!(R&&R.state!==l.DebugState.Inactive)}get isVisible(){const R=this.mainLayoutService.getTabbarHandler(l.DEBUG_CONSOLE_CONTAINER_ID);return R&&R.isVisible}get consoleModel(){return this.debugConsoleModelService}activate(){const R=this.mainLayoutService.getTabbarHandler(l.DEBUG_CONSOLE_CONTAINER_ID);R&&!R.isVisible&&R.activate()}focusInput(){this.inputEditor&&this.inputEditor.monacoEditor.focus()}async init(R){var A;if(!R)return;const w=await this.storageProvider(g.STORAGE_NAMESPACE.DEBUG);this.history=new r.HistoryNavigator(w.get(f,[]),50),!(!((A=this.inputEditor)===null||A===void 0)&&A.monacoEditor)&&(this._consoleInputElement=R,this.inputEditor=this.editorService.createCodeEditor(this._consoleInputElement,Object.assign(Object.assign({},Z),{readOnly:!this.contextKeyService.getContextValue(l.CONTEXT_IN_DEBUG_MODE_KEY)})),this.debugContextKey=this.injector.get(d.DebugContextKey,[this.inputEditor.monacoEditor.contextKeyService]),this.contextKeyService.onDidChangeContext(F=>{F.payload.affectsSome(n.keySet)&&(this.contextKeyService.match(l.CONTEXT_IN_DEBUG_MODE_KEY)?(this.updateReadOnly(!1),this.updateInputDecoration(),this.debugContextKey.contextInDebugMode.set(!0)):(this.updateReadOnly(!0),this.debugContextKey&&this.debugContextKey.contextInDebugMode.set(!1)))}),this.registerDecorationType(),await this.createConsoleInput(),this.setMode())}get contextInDebugRepl(){return this.debugContextKey.contextInDebugRepl}get consoleInputValue(){return this._consoleModel&&this._consoleModel.getValue()||""}showPreviousValue(){this._isReadonly||this.navigateHistory(!0)}showNextValue(){this._isReadonly||this.navigateHistory(!1)}async runExecute(){if(!this.inputEditor)return;const R=this.inputEditor.monacoEditor,A=R.getValue();await this.consoleModel.execute(A),this.history.add(A),R.setValue("")}navigateHistory(R){const A=R?this.history.previous():this.history.next();if(A&&this.inputEditor&&this.inputEditor.monacoEditor){const{monacoEditor:w}=this.inputEditor;w.setValue(A),w.setPosition({lineNumber:1,column:A.length+1})}}get consoleInputUri(){return new g.URI("debug/console/input").withScheme(g.Schemes.walkThroughSnippet)}async createConsoleInput(){var R;if(!(!((R=this.inputEditor)===null||R===void 0)&&R.monacoEditor))return;const{monacoEditor:A}=this.inputEditor,F=(await this.documentService.createModelReference(this.consoleInputUri)).instance.getMonacoModel();F.updateOptions({tabSize:2}),this._consoleModel=F,A.setModel(F),setTimeout(()=>{this.layoutBody()},0),A.onDidFocusEditorText(()=>{this.contextInDebugRepl.set(!0),this.updateInputDecoration()}),A.onDidBlurEditorText(()=>{this.contextInDebugRepl.set(!1),this.updateInputDecoration()}),A.onDidChangeModelContent(()=>{const V=A.getModel().getLineCount();this.layoutBody(V*18)}),this.manager.onDidChangeActiveDebugSession(()=>{this.registerCompletion(),this.setMode()}),await this.updateInputDecoration()}layoutBody(R,A){var w;if(!this.inputEditor)return;const{monacoEditor:F}=this.inputEditor,V=Math.max(R||N,F.getContentHeight());F.layout({width:A||((w=this._consoleInputElement)===null||w===void 0?void 0:w.offsetWidth),height:V}),this._onInputHeightChange.fire(V)}updateReadOnly(R){this.inputEditor&&this.inputEditor.monacoEditor.updateOptions({readOnly:R})}async updateInputDecoration(){if(!this.inputEditor)return;const R=[];if(this._isReadonly&&this.inputEditor.monacoEditor.hasTextFocus()&&!this.inputEditor.monacoEditor.getValue()){const A=(0,I.transparent)(I.editorForeground,.4)(await this.themeService.getCurrentTheme());R.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,c.localize)("debug.console.input.placeholder"),color:A?A.toString():void 0}}})}this.inputEditor.monacoEditor.setDecorationsByType("debug-console-input",v,R)}setMode(){var R;if(!this.inputEditor)return;const A=this.manager.currentSession;if(!A)return;const w=A.currentEditor();w&&this.inputEditor.monacoEditor.getModel().setLanguage((R=w.getModel())===null||R===void 0?void 0:R.getLanguageId())}registerDecorationType(){this.overrideServicesRegistry.getRegisteredService(c.ServiceNames.CODE_EDITOR_SERVICE).registerDecorationType("console-input-decoration",v,{})}registerCompletion(){var R;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null);const A=this.manager.currentSession;if(!A)return;const w=A.currentEditor();w&&(this._updateDisposable=b.monaco.languages.registerCompletionItemProvider((R=w.getModel())===null||R===void 0?void 0:R.getLanguageId(),{_debugDisplayName:"DebugConsoleCompletionProvider",triggerCharacters:["."],provideCompletionItems:async(F,V,Y)=>{var _;if(!(!((_=this.manager.currentSession)===null||_===void 0)&&_.capabilities.supportsCompletionsRequest))return;if(F.uri.toString()!==this.consoleInputUri.toString())return null;const H=this.manager.currentSession,{triggerCharacter:X}=Y;let S=F.getWordAtPosition(V);if(S&&H){const{word:Q,startColumn:O,endColumn:M}=S;return{suggestions:(await H.sendRequest("completions",{text:Q,column:M,frameId:H.currentFrame&&H.currentFrame.raw.id})).body.targets.map(B=>({label:B.label,insertText:B.text||B.label,sortText:B.sortText,kind:h.languages.CompletionItemKind[W(B.type||"property")],range:{startLineNumber:V.lineNumber,endLineNumber:V.lineNumber,startColumn:O,endColumn:M}}))}}if(S=F.getWordAtPosition({lineNumber:V.lineNumber,column:V.column-1}),S&&H&&X){const{word:Q,endColumn:O}=S;return{suggestions:(await H.sendRequest("completions",{text:Q+X,column:O+1,frameId:H.currentFrame&&H.currentFrame.raw.id})).body.targets.map(T=>({label:T.label,insertText:T.text||T.label,sortText:T.sortText,kind:h.languages.CompletionItemKind[W(T.type||"property")],range:{startLineNumber:V.lineNumber,endLineNumber:V.lineNumber,startColumn:O+1,endColumn:O+1}}))}}return null}}))}disable(){var R,A;this._updateDisposable&&(this._updateDisposable.dispose(),this._updateDisposable=null),(R=this.inputEditor)===null||R===void 0||R.monacoEditor.setValue(""),(A=this.inputEditor)===null||A===void 0||A.monacoEditor.setModel(null)}};y.keySet=new Set([l.CONTEXT_IN_DEBUG_MODE_KEY]),a.__decorate([(0,o.Autowired)(l.IDebugConsoleModelService),a.__metadata("design:type",m.DebugConsoleModelService)],y.prototype,"debugConsoleModelService",void 0),a.__decorate([(0,o.Autowired)(p.IMainLayoutService),a.__metadata("design:type",Object)],y.prototype,"mainLayoutService",void 0),a.__decorate([(0,o.Autowired)(G.IEditorDocumentModelService),a.__metadata("design:type",Object)],y.prototype,"documentService",void 0),a.__decorate([(0,o.Autowired)(u.EditorCollectionService),a.__metadata("design:type",u.EditorCollectionService)],y.prototype,"editorService",void 0),a.__decorate([(0,o.Autowired)(g.CommandRegistry),a.__metadata("design:type",Object)],y.prototype,"commands",void 0),a.__decorate([(0,o.Autowired)(c.IContextKeyService),a.__metadata("design:type",Object)],y.prototype,"contextKeyService",void 0),a.__decorate([(0,o.Autowired)(l.IDebugSessionManager),a.__metadata("design:type",s.DebugSessionManager)],y.prototype,"manager",void 0),a.__decorate([(0,o.Autowired)(I.IThemeService),a.__metadata("design:type",Object)],y.prototype,"themeService",void 0),a.__decorate([(0,o.Autowired)(c.MonacoOverrideServiceRegistry),a.__metadata("design:type",c.MonacoOverrideServiceRegistry)],y.prototype,"overrideServicesRegistry",void 0),a.__decorate([(0,o.Autowired)(c.StorageProvider),a.__metadata("design:type",Function)],y.prototype,"storageProvider",void 0),a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],y.prototype,"injector",void 0),y=n=a.__decorate([(0,o.Injectable)()],y),e.DebugConsoleService=y},5131:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_CONSOLE_TREE_FIELD_NAME=e.DEBUG_CONSOLE_TREE_NODE_HEIGHT=e.DebugConsoleRenderedNode=e.DebugConsoleView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(41869),G=t(43718),p=t(72260),h=t(64582),b=t(58542),I=t(5905),r=t(16170),l=t(1276),s=n.__importDefault(t(80315)),d=t(35199);e.DebugConsoleView=(0,o.observer)(({viewState:v})=>{const f=(0,u.useInjectable)(d.DebugConsoleService),N=(0,u.useInjectable)(l.DebugConsoleFilterService),W=(0,u.useInjectable)(u.PreferenceService),{consoleModel:Z}=f,{height:y,width:E}=v,[R,A]=c.default.useState(),[w,F]=c.default.useState(26),[V,Y]=c.default.useState(""),[_,H]=c.default.useState(!0),X=c.default.useRef(null),S=c.default.useRef(null),Q=(0,u.useInjectable)(p.IMainLayoutService),O=(0,u.useDesignStyles)(s.default.debug_console_output,"debug_console_output"),M=(0,u.useDesignStyles)(s.default.variable_repl_bar,"variable_repl_bar");c.default.useEffect(()=>{if(X&&X.current){const re=Q.getTabbarHandler(h.DEBUG_CONSOLE_CONTAINER_ID);if(re?.isActivated())f.init(X.current);else{const ae=re?.onActivate(()=>{f.init(X.current),ae?.dispose()})}}},[X.current]),c.default.useEffect(()=>{const re=new G.Disposable;return re.addDispose(Z.onDidUpdateTreeModel(async ae=>{ae&&await ae.treeModel.ensureReady,A(ae)})),re.addDispose(N.onDidValueChange(ae=>{Y(ae)})),re.addDispose(f.onInputHeightChange(ae=>{F(ae)})),re.addDispose(W.onSpecificPreferenceChange("debug.console.wordWrap",ae=>{const{newValue:ue}=ae;H(ue)})),H(!!W.get("debug.console.wordWrap",_)),()=>{Z.removeNodeDecoration(),re.dispose()}},[]);const T=re=>{Z.handleTreeHandler(Object.assign(Object.assign({},re),{getModel:()=>R?.treeModel,hasDirectFocus:()=>S.current===document.activeElement}))},B=(re,ae,ue)=>{const $=window.getSelection();$&&$.type==="Range"&&$.rangeCount>0&&re.stopPropagation();const{handleTwistierClick:pe}=Z;ae&&pe(ae,ue)},x=(re,ae)=>{const{handleContextMenu:ue}=Z;ue(re,ae)},D=re=>{const{handleContextMenu:ae}=Z;ae(re)},J=re=>{const{enactiveNodeDecoration:ae}=Z;ae(),f.focusInput()},k=re=>{const{enactiveNodeDecoration:ae}=Z;ae()},z=()=>"filter",P=()=>({pre:"<match>",post:"</match>",extract:re=>re.description?re.description:re.name}),U=c.default.useCallback(re=>{const ae=Z.decorations.getDecorations(re.item);return c.default.createElement(e.DebugConsoleRenderedNode,{item:re.item,itemType:re.itemType,decorations:ae,filterValue:V,filterMode:z(),onClick:B,onTwistierClick:B,onContextMenu:x,defaultLeftPadding:14,isWordWrap:_,leftPadding:8})},[R,V,_]),ne=()=>R?c.default.createElement(g.RecycleTree,{height:Math.max(y-w,26),width:E,itemHeight:e.DEBUG_CONSOLE_TREE_NODE_HEIGHT,onReady:T,overScanCount:10,filter:z()==="filter"?V:"",filterProvider:{fuzzyOptions:P,filterAlways:!0},model:R.treeModel,overflow:"auto",supportDynamicHeights:_},U):null;return c.default.createElement("div",{className:s.default.debug_console,onContextMenu:D,onClick:J},c.default.createElement("div",{className:O,tabIndex:-1,onBlur:k,ref:S,"data-name":e.DEBUG_CONSOLE_TREE_FIELD_NAME},ne()),c.default.createElement("div",{className:M,style:{maxHeight:y-26+"px"}},c.default.createElement("div",{className:s.default.variable_repl_bar_icon},c.default.createElement("span",{className:(0,u.getIcon)("right")})),c.default.createElement("div",{className:s.default.variable_repl_editor,ref:X})))});const m=({item:v,decorations:f,defaultLeftPadding:N,leftPadding:W,filterMode:Z,filterValue:y,onClick:E,onTwistierClick:R,onContextMenu:A,isWordWrap:w,itemType:F})=>{const V=(0,u.useInjectable)(l.DebugConsoleFilterService),Y=(0,u.useInjectable)(b.LinkDetector),[_,H]=c.default.useState(),X=(0,u.useDesignStyles)(s.default.expansion_toggle,"expansion_toggle");c.default.useEffect(()=>{const U=window.getComputedStyle(r.AnsiConsoleNode.is(v)?v.el:Y.linkify(v.description),null),ne=`${U.fontStyle} ${U.fontWeight} ${U.fontSize}/${U.lineHeight} ${U.fontFamily}`;H(ne)},[v]);const S=U=>{E(U,v,g.CompositeTreeNode.is(v)?g.TreeNodeType.CompositeTreeNode:g.TreeNodeType.TreeNode)},Q=U=>{U.nativeEvent.which!==0&&(F===g.TreeNodeType.TreeNode||F===g.TreeNodeType.CompositeTreeNode)&&A&&A(U,v,F)},O=()=>r.AnsiConsoleNode.is(v)?"":(r.DebugConsoleNode.is(v)?"":v.name)+(v.description&&!r.DebugConsoleNode.is(v)?": ":""),M=(U,ne)=>I.CharWidthReader.getInstance().getCharWidth(U,ne),T=c.default.useCallback(()=>{if(!_)return;const U=O()+v.description,ne=V.findMatches(U||""),re=ge=>Number(ge.toFixed(4)),ae=(ge,q)=>Array.from({length:q},(le,ie)=>ie).reduce((le,ie)=>le+re(M(U.charAt(ge+ie),_)),0),ue=new Map,$=(ge,q)=>{if(ge>0){const le=(he,ee,j)=>Array.from({length:he-ee},(te,oe)=>ee+oe).reduce((te,oe)=>re(te+M(U.charAt(oe),_)),j);let ie;if(q!==0&&ue.has(ne[q].startIndex)){const he=ue.get(ne[q].startIndex);ie=le(ge,he.startIndex,he.left)}else ie=le(ge,0,0);return ue.set(ge,{startIndex:ge,left:ie}),ie}return 0};return ne.map((ge,q)=>({height:16,top:3,width:ae(ge.startIndex,ge.count),left:$(ge.startIndex,Math.max(0,q-1))})).map(ge=>c.default.createElement("div",{key:ge.left,className:s.default.block,style:ge}))},[y,_]),B=U=>r.AnsiConsoleNode.is(U)||U instanceof r.DebugConsoleNode&&U.variablesReference===0?null:c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_segment,!r.DebugConsoleNode.is(U)&&s.default.debug_console_node_displayname,s.default.debug_console_variable,v.description?s.default.name:s.default.info)},c.default.createElement(r.TreeWithLinkWrapper,{html:Y.linkify(O())})),x=U=>{const ne=/^true|false$/i,re=/^(['"]).*\1$/,ae=U.description||"",ue=[s.default.debug_console_variable];return r.AnsiConsoleNode.is(U)?c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_segment,s.default.debug_console_node_displayname)},U.template()):(v.variableType==="number"||v.variableType==="boolean"||v.variableType==="string"?ue.push(s.default[v.variableType]):isNaN(+ae)?ne.test(ae)?ue.push(s.default.boolean):re.test(ae)&&ue.push(s.default.string):ue.push(s.default.number),c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_segment_grow,s.default.debug_console_node_description,...ue)},c.default.createElement(r.TreeWithLinkWrapper,{html:Y.linkify(ae)})))},D=()=>c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_segment,s.default.debug_console_node_tail)},J()),J=()=>{var U,ne,re;return r.AnsiConsoleNode.is(v)?c.default.createElement("div",{className:s.default.debug_console_node_status,title:(U=v.source)===null||U===void 0?void 0:U.path},!((ne=v.source)===null||ne===void 0)&&ne.name?`${(re=v.source)===null||re===void 0?void 0:re.name}:${v.line}`:""):c.default.createElement("div",{className:s.default.debug_console_node_status},v.badge)},k=()=>v.tooltip,z=(U,ne)=>{const re=ae=>{ne(ae,U,F)};return f&&f?.classlist.indexOf(s.default.mod_loading)>-1?c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_segment,X)},c.default.createElement(g.Loading,null)):U instanceof r.DebugConsoleNode&&U.variablesReference===0?null:c.default.createElement("div",{onClick:re,className:(0,a.default)(s.default.debug_console_node_segment,X,(0,u.getIcon)("right"),{[`${s.default.mod_collapsed}`]:!U.expanded})})},P=U=>{if(g.CompositeTreeNode.is(U))return z(U,R)};return c.default.createElement("div",{key:v.id,onClick:S,onContextMenu:Q,title:k(),className:(0,a.default)(s.default.debug_console_node,f?f.classlist:null),style:{paddingLeft:`${(N||8)+(v.depth||0)*(W||0)}px`},"data-id":v.id},c.default.createElement("div",{className:(0,a.default)(s.default.debug_console_node_content)},P(v),c.default.createElement("div",{className:s.default.debug_console_node_overflow_wrap,style:{whiteSpace:w?"pre-wrap":"nowrap",cursor:v instanceof r.DebugVariableContainer?"pointer":"initial"}},B(v),x(v)),D()),c.default.createElement("div",{className:s.default.debug_console_selection},Z==="matcher"&&T()))};e.DebugConsoleRenderedNode=m,e.DEBUG_CONSOLE_TREE_NODE_HEIGHT=22,e.DEBUG_CONSOLE_TREE_FIELD_NAME="DEBUG_CONSOLE_TREE_FIELD"},32756:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugViewModel=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(26296),g=t(38029);let u=class{constructor(){this.onDidChangeEmitter=new o.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.onDidChangeBreakpointsEmitter=new o.Emitter,this.onDidChangeBreakpoints=this.onDidChangeBreakpointsEmitter.event,this.toDispose=new o.DisposableCollection(this.onDidChangeEmitter,this.onDidChangeBreakpointsEmitter),this._sessions=new Set}fireDidChange(){this.onDidChangeEmitter.fire(void 0)}fireDidChangeBreakpoints(p){this.onDidChangeBreakpointsEmitter.fire(p)}get sessions(){return this._sessions.values()}get sessionCount(){return this._sessions.size}push(p){this._sessions.has(p)||(this._sessions.add(p),this.fireDidChange())}delete(p){return this._sessions.delete(p)?(this.fireDidChange(),!0):!1}get session(){return this.sessions.next().value}get id(){return this.session&&this.session.id||"-1"}get label(){return this.session&&this.session.label||"Unknown Session"}has(p){return!!p&&this._sessions.has(p)}init(p){p&&this.push(p),this.toDispose.push(this.manager.onDidChangeActiveDebugSession(({previous:h,current:b})=>{this.has(h)&&!this.has(b)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidChange(h=>{this.has(h)&&this.fireDidChange()})),this.toDispose.push(this.manager.onDidDestroyDebugSession(h=>{this.has(h)&&this.fireDidChange()}))}dispose(){this.toDispose.dispose()}get threads(){if(this.manager.currentSession)return this.manager.currentSession.getThreads(()=>!0)}get currentSession(){const{currentSession:p}=this.manager;return this.has(p)&&p||this.session}set currentSession(p){this.manager.updateCurrentSession(p)}get state(){const{currentSession:p}=this;return p&&p.state||c.DebugState.Inactive}get currentThread(){const{currentSession:p}=this;return p&&p.currentThread}get currentFrame(){const{currentThread:p}=this;return p&&p.currentFrame}async start(){const{session:p}=this;if(!p)return;const h=await this.manager.start(p.options);h&&(this._sessions.delete(p),this._sessions.add(h),this.fireDidChange())}async restart(){const{currentSession:p}=this;if(!p)return;const h=await this.manager.restart(p);h!==p&&(this._sessions.delete(p),this._sessions.add(h)),this.fireDidChange()}report(p,h,b){return this.manager.report(p,h,b)}reportTime(p,h){return this.manager.reportTime(p,h)}reportAction(p,h,b){return this.manager.reportAction(p,h,b)}};n.__decorate([(0,a.Autowired)(c.IDebugSessionManager),n.__metadata("design:type",g.DebugSessionManager)],u.prototype,"manager",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.DebugViewModel=u},13739:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackFramesView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importStar(t(14041)),g=t(97267),u=t(41869),G=t(64582),p=t(50755),h=n.__importDefault(t(12920)),b=t(85294);e.DebugStackFramesView=(0,o.observer)(I=>{const{viewState:r,frames:l,thread:s,indent:d=0,session:m,isBottom:v}=I,[f,N]=(0,c.useState)(),[W,Z]=(0,c.useState)(!1),[y,E]=(0,c.useState)([]),[R,A]=(0,c.useState)(""),[w,F]=(0,c.useState)(!1),V=(0,u.useInjectable)(G.IDebugSessionManager),Y=(0,c.useRef)([]),_=(0,u.useInjectable)(b.DebugCallStackService),H=(0,c.useCallback)(async()=>{var k,z;if(!s)return;const P=typeof((k=s.stoppedDetails)===null||k===void 0?void 0:k.totalFrames)=="number"?((z=s.stoppedDetails)===null||z===void 0?void 0:z.totalFrames)-s.frameCount:void 0,U=await s.fetchFrames(P);O(U)},[y]),X=k=>{k&&k.source&&k.source.open({},k)},S=(0,c.useCallback)(k=>{const z=Y.current.slice(0);let P=-1;k.nextFrame?P=z.findIndex(U=>{var ne;return p.DebugStackFrame.is(U)&&U.id===((ne=k.nextFrame)===null||ne===void 0?void 0:ne.id)}):P=z.length,P>-1&&(z.splice(P-1,1,...k.frames),Y.current=z,E(z))},[Y.current]),Q=(0,c.useCallback)((k,z)=>{var P,U,ne,re;const ae=z.length;let ue=-1,$=k.length>0?k[k.length+ue]:void 0;for(;$&&!p.DebugStackFrame.is($);)ue-=1,$=k[k.length+ue];const pe=k.slice(0,k.length+ue+1),ge=$?z.findIndex(he=>he.id===$?.id)+1:0;let q=[],le,ie=!1;for(let he=ge;he<ae;he++)if(!((P=z[he].source)===null||P===void 0)&&P.raw.origin)if(ie)if(le===((U=z[he].source)===null||U===void 0?void 0:U.raw.origin)){q.push(z[he]);continue}else q.length>1?(pe.push(new p.ShowMoreDebugStackFrame(z[he],q,m,le,S)),ue-=q.length-1):pe.push(q[0]),q=[],ie=!1,le=(ne=z[he].source)===null||ne===void 0?void 0:ne.raw.origin,q.push(z[he]);else ie=!0,q.push(z[he]),le=(re=z[he].source)===null||re===void 0?void 0:re.raw.origin;else ie&&q.length>0&&(q.length>1?(pe.push(new p.ShowMoreDebugStackFrame(z[he],q,m,le,S)),ue-=q.length-1):pe.push(q[0]),q=[],ie=!1),pe.push(z[he]);return ie&&q.length>0&&(q.length>1?pe.push(new p.ShowMoreDebugStackFrame(void 0,q,m,le,S)):pe.push(q[0])),pe},[]),O=(0,c.useCallback)(k=>{Y.current=Q(Y.current,k),E(Y.current)},[y,Q]),M=(0,c.useCallback)(k=>{N(k)},[f]);(0,c.useEffect)(()=>{O([...l]);const k=new u.DisposableCollection;return k.push(V.onDidChangeActiveDebugSession(({previous:z})=>{z&&z!==s.session&&M(void 0)})),()=>{k.dispose()}},[]),(0,c.useEffect)(()=>{if(s){const k=s.frames.find(z=>!!z.source);k&&(M(k.raw.id),X(k))}},[s.frameCount]),(0,c.useEffect)(()=>{if(s)if(s.stoppedDetails){const{framesErrorMessage:k,totalFrames:z}=s.stoppedDetails;A(k||""),z&&z>s.frameCount?F(!0):F(!1)}else F(!1);else F(!1)},[y]);const T=({data:k})=>{var z,P;const U=k,ne=p.DebugStackFrame.is(U)&&U.raw.presentationHint==="label",re=p.DebugStackFrame.is(U)&&U.raw.presentationHint==="subtle",ae=p.DebugStackFrame.is(U)&&((P=(z=U.raw)===null||z===void 0?void 0:z.source)===null||P===void 0?void 0:P.presentationHint)==="deemphasize",ue=(0,c.useCallback)(()=>{if(!(ne||re)){if(!p.DebugStackFrame.is(U)){U.open();return}V.updateCurrentSession(U.session),U.session.currentThread=U.thread,M(U.raw.id),X(U)}},[k]),$=q=>{q.preventDefault(),q.stopPropagation(),p.DebugStackFrame.is(U)&&U.canRestart&&U.restart()},pe={paddingLeft:`${d}px`};p.DebugStackFrame.is(U)&&ae&&(pe.color="var(--list-deemphasizedForeground)");const ge=(0,c.useCallback)(q=>p.DebugStackFrame.is(q)?c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:(0,a.default)(h.default.debug_stack_frames_item_label,ne&&h.default.label,re&&h.default.subtle)},q.raw&&q.raw.name),!ne&&c.default.createElement("span",{className:h.default.debug_stack_frames_item_description},q.raw&&q.raw.source&&q.raw.source.name||(0,u.localize)("debug.stack.frame.noSource")),c.default.createElement(c.default.Fragment,null,q.canRestart&&c.default.createElement("a",{title:"",onClick:le=>$(le),className:(0,a.default)(h.default.debug_restart_frame_icon,(0,u.getIcon)("debug-restart-frame"))}),!ne&&!ae&&c.default.createElement("div",{className:(0,a.default)(!(0,u.isUndefined)(q.raw.line)&&h.default.debug_stack_frames_item_badge)},q.raw&&q.raw.line,!(0,u.isUndefined)(q.raw.line)&&":",q.raw&&q.raw.column))):c.default.createElement("span",{className:h.default.debug_stack_frames_load_more},q.name),[]);return c.default.createElement("div",{style:pe,className:(0,a.default)(h.default.debug_stack_frames_item,ne&&h.default.is_label,p.DebugStackFrame.is(U)&&f===U.raw.id&&h.default.selected,p.DebugStackFrame.is(U)&&!(U.raw&&U.raw.source&&U.raw.source.name)&&h.default.debug_stack_frames_item_hidden),onClick:ue,onContextMenu:q=>_.handleContextMenu(q,k)},ge(U))},B=(0,c.useCallback)(()=>{const k=async()=>{Z(!0),await H(),Z(!1)};return c.default.createElement("div",{className:h.default.debug_stack_frames_item,onClick:k},c.default.createElement("span",{className:h.default.debug_stack_frames_load_more},(0,u.localize)("debug.stack.loadMore")))},[W,H]),x=(0,c.useCallback)(()=>c.default.createElement("div",{className:h.default.debug_stack_frames_item},c.default.createElement("span",{className:h.default.debug_stack_frames_load_more},(0,u.localize)("debug.stack.loading"))),[]),D=(0,c.useCallback)(k=>c.default.createElement("div",{className:h.default.debug_stack_frames_item},c.default.createElement("span",{className:h.default.debug_stack_frames_error_message,title:k},k)),[]);if(R)return c.default.createElement("div",{className:h.default.debug_stack_frames},D(R));const J=(0,c.useCallback)(()=>W?x():w?B():null,[W,w]);return c.default.createElement(g.RecycleList,{data:y,template:T,itemHeight:22,width:r.width,height:(W||w?(y.length+1)*22:y.length*22)+(v?10:0),footer:W||w?J:void 0})})},75651:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackSessionView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(64582),u=t(8701),G=n.__importDefault(t(12920)),p=t(61520),h=t(85294),b=I=>{const{session:r,viewState:l}=I,s=(0,c.useInjectable)(g.IDebugSessionManager),d=(0,c.useInjectable)(h.DebugCallStackService),[m,v]=(0,o.useState)([]),[f,N]=(0,o.useState)([]),[W,Z]=(0,o.useState)([]),[y,E]=(0,o.useState)([]),[R,A]=(0,o.useState)(!0),[w,F]=(0,o.useState)(!1),[V,Y]=(0,o.useState)(!0),_=s.sessions.length>1,H=r.supportsThreadIdCorrespond,X=(0,o.useRef)(!1),S=()=>{var x,D;const J=s.sessions.filter(z=>z.parentSession),k=[];for(;J[0];)((D=s.getSession((x=J[0].parentSession)===null||x===void 0?void 0:x.id))===null||D===void 0?void 0:D.id)===r.id&&k.push(J[0]),J.shift();return k},Q=async()=>{Y(!0);const x=await r.fetchThreads();Y(!1),N(x)};(0,o.useEffect)(()=>{const x=new c.DisposableCollection;return x.push(s.onDidCreateDebugSession(()=>{if(X.current)return;const D=S();E(D)})),x.push(s.onDidDestroyDebugSession(()=>{if(X.current)return;const D=S();E(D)})),()=>{X.current=!0,x.dispose()}},[]);const O=(0,o.useCallback)(x=>{v(x)},[m]),M=(0,o.useCallback)(x=>{Z(x)},[W]);(0,o.useEffect)(()=>{O(Array.from(r.threads));const x=new c.DisposableCollection;return x.push(r.onDidChange(()=>{O([...r.threads])})),x.push(r.onDidThread(async({body:{reason:D}})=>{r.supportsThreadIdCorrespond&&r.state===g.DebugState.Stopped&&D==="started"&&await Q()})),x.push(r.onDidStop(async()=>{if(!r.supportsThreadIdCorrespond)return;const D=Array.from(r.multipleThreadPaused.values());M(D),await Q()})),x.push(r.onDidContinued(async()=>{if(!r.supportsThreadIdCorrespond)return;const D=Array.from(r.multipleThreadPaused.values());M(D)})),()=>{x.dispose()}},[]);const T=()=>{if(r.state!==g.DebugState.Stopped)return null;if(H&&R)return V?o.default.createElement("div",{className:G.default.debug_stack_item_loading},o.default.createElement("span",null,(0,c.localize)("debug.stack.loading"))):f.map((x,D)=>!r.hasInMultipleThreadPaused(x.raw.id)&&o.default.createElement(u.DebugStackThreadView,{key:x.id,indent:_?16:0,viewState:l,thread:x,session:r,isBottom:D===f.length-1}))};if((x=>{if(x.threads.some(J=>J.frameCount>0))return!1;const D=S();return!(D.length!==1||!D[0].compact)})(r)){const x=S();return o.default.createElement("div",{className:G.default.debug_stack_item},x.map(D=>o.default.createElement(e.DebugStackSessionView,{key:D.id,viewState:l,session:D,indent:1})))}return o.default.createElement("div",{className:G.default.debug_stack_item,onContextMenu:x=>d.handleContextMenu(x,r)},_&&o.default.createElement("div",{className:G.default.debug_stack_item_label,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1)},H||m.length>0?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:R?(0,c.getIcon)("arrow-down"):(0,c.getIcon)("arrow-right"),onClick:()=>A(!R)}),o.default.createElement("div",{className:(0,a.default)([(0,c.getIcon)("debug"),G.default.debug_session_icon])})):o.default.createElement("div",{style:{width:30}}),o.default.createElement("div",{className:G.default.debug_stack_item_label_title},r.label),w&&o.default.createElement(p.DebugStackOperationView,{session:r})),H&&R?W.map((x,D)=>o.default.createElement(u.DebugStackThreadView,{key:x.id,indent:_?16:0,viewState:l,thread:x,session:r,isBottom:D===W.length-1})):null,!H&&(!_||R)&&m.map((x,D)=>o.default.createElement(u.DebugStackThreadView,{key:x.id,indent:_?16:0,viewState:l,thread:x,session:r,isBottom:D===m.length-1})),y.length>0&&y.map(x=>R&&o.default.createElement(e.DebugStackSessionView,{key:x.id,viewState:l,session:x,indent:1})),T())};e.DebugStackSessionView=b},8701:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackThreadView=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(64582),u=t(13739),G=n.__importDefault(t(12920)),p=t(61520),h=t(85294),b=I=>{var r;const{thread:l,viewState:s,indent:d,session:m,isBottom:v}=I,f=(0,c.useInjectable)(g.IDebugSessionManager),N=(0,c.useInjectable)(h.DebugCallStackService),[W,Z]=(0,a.useState)(!0),[y,E]=(0,a.useState)(l.frames),R=f.sessions.length>1,A=!((r=f.currentSession)===null||r===void 0)&&r.supportsThreadIdCorrespond?!0:f.sessions.length>1||f.sessions[0]&&f.sessions[0].threadCount>1,w=(0,a.useCallback)(V=>{Z(V)},[W]);(0,a.useEffect)(()=>{const V=new c.DisposableCollection;return V.push(m.onDidChangeCallStack(()=>{E(l.frames),l.stopped&&f.currentThread&&f.currentThread.id===l.id?w(!0):w(!1)})),()=>{V.dispose()}},[]);const F=l.stopped&&l.stoppedDetails?l.raw.id===l.stoppedDetails.threadId?`${(0,c.localize)("debug.stack.frame.because")} ${l.stoppedDetails.reason} ${(0,c.localize)("debug.stack.frame.stopped")}`:(0,c.localize)("debug.stack.frame.stopped"):(0,c.localize)("debug.stack.frame.running");return a.default.createElement("div",{className:G.default.debug_stack_item,onContextMenu:V=>N.handleContextMenu(V,l)},A&&a.default.createElement("div",{style:{paddingLeft:`${d}px`},className:G.default.debug_stack_item_label},l.frames.length>0?a.default.createElement("div",{className:W?(0,c.getIcon)("arrow-down"):(0,c.getIcon)("arrow-right"),onClick:()=>Z(!W)}):a.default.createElement("div",{style:{width:14}}),a.default.createElement("div",{className:G.default.debug_threads_item},l.raw.name),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:G.default.debug_threads_operation},a.default.createElement(p.DebugStackOperationView,{thread:l})),a.default.createElement("span",{className:G.default.debug_threads_description},a.default.createElement(o.Badge,null,F.toUpperCase())))),(!A||W)&&l.frames.length>0&&a.default.createElement(u.DebugStackFramesView,{indent:A?R?38:30:8,isBottom:v,viewState:s,thread:l,frames:y,session:m}))};e.DebugStackThreadView=b},37243:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(64582),u=t(4983),G=t(26296),p=t(38029);function h(r){return r&&typeof r.sessionId=="string"&&typeof r.threadId=="string"&&typeof r.frameId=="string"}function b(r,l){if(h(l)){const s=r.getSession(l.sessionId);if(s){const d=[s.currentThread,...s.threads].find(m=>m.id===l.threadId);if(d)return d.frames.find(m=>m.id===l.frameId)}}}let I=class{registerCommands(l){l.registerCommand(g.DEBUG_COMMANDS.RESTART_FRAME,{execute:async(s,d)=>{const m=b(this.debugSessionManager,d);m&&await m.restart()}}),l.registerCommand(g.DEBUG_COMMANDS.COPY_STACK_TRACE,{execute:async(s,d)=>{const m=b(this.debugSessionManager,d);if(m){const v=m.thread.frames.map(f=>`${f.raw&&f.raw.name} (${f.raw&&f.raw.source&&f.raw.source.path}:${f.raw&&f.raw.line})`);this.clipboardService.writeText(v.join(`
|
|
28062
|
-
`))}}})}registerMenus(l){l.registerMenuItem(c.MenuId.DebugCallStackContext,{command:{id:g.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${u.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${u.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:u.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),l.registerMenuItem(c.MenuId.DebugCallStackContext,{command:{id:g.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:u.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};n.__decorate([(0,a.Autowired)(G.IDebugSessionManager),n.__metadata("design:type",p.DebugSessionManager)],I.prototype,"debugSessionManager",void 0),n.__decorate([(0,a.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],I.prototype,"clipboardService",void 0),I=n.__decorate([(0,o.Domain)(c.MenuContribution,o.CommandContribution)],I),e.DebugCallStackContribution=I},61520:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackOperationView=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(66498),g=t(96090),u=n.__importDefault(t(12920)),G=p=>{const{session:h,thread:b}=p,{doStop:I,doStepIn:r,doStepOut:l,doStepOver:s,doContinue:d,doRestart:m,doPause:v,updateCurrentSession:f}=(0,o.useInjectable)(g.DebugToolbarService);if(h&&!b){const N=W=>{f(h),W()};return a.default.createElement("div",{className:u.default.debug_stack_session_operations},a.default.createElement(c.DebugAction,{run:()=>N(m),icon:"reload",label:(0,o.localize)("debug.action.restart")}),a.default.createElement(c.DebugAction,{run:()=>N(I),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!h&&b){const{stopped:N}=b,W=y=>{b.session.currentThread=b,y()},Z=y=>y?a.default.createElement(c.DebugAction,{run:()=>W(d),icon:"continue",label:(0,o.localize)("debug.action.continue")}):a.default.createElement(c.DebugAction,{run:()=>W(v),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return a.default.createElement("div",{className:u.default.debug_stack_thread_operations},Z(N),a.default.createElement(c.DebugAction,{run:()=>W(s),enabled:N,icon:"step",label:(0,o.localize)("debug.action.step-over")}),a.default.createElement(c.DebugAction,{run:()=>W(r),enabled:N,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),a.default.createElement(c.DebugAction,{run:()=>W(l),enabled:N,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};e.DebugStackOperationView=G},85294:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackService=void 0;const n=t(85608),a=t(76003),o=t(93899),c=t(50755),g=t(4983),u=t(17280),G=t(29539);let p=class{constructor(){this.handleContextMenu=(b,I)=>{this.stackFrameSupportsRestart.reset(),b.stopPropagation(),b.preventDefault(),I instanceof G.DebugSession?this.callStackItemType.set("session"):I instanceof c.DebugThread?this.callStackItemType.set("thread"):I instanceof c.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(I.canRestart)):this.callStackItemType.reset();const{x:r,y:l}=b.nativeEvent,s=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),d=s.getMergedMenuNodes();s.dispose();const m=()=>{var f;return I instanceof c.DebugStackFrame?!((f=I.source)===null||f===void 0)&&f.inMemory?I.source.raw.path||I.source.reference||I.source.name:I.source?I.source.uri.toString():"":I instanceof c.DebugThread||I instanceof G.DebugSession?I.id:""},v=()=>I instanceof c.DebugStackFrame?{sessionId:I.session.id,threadId:I.thread.id,frameId:I.id}:I instanceof c.DebugThread?{sessionId:I.session.id,threadId:I.id}:I instanceof G.DebugSession?{sessionId:I.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:r,y:l},menuNodes:d,args:[m(),v()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=g.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=g.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};n.__decorate([(0,a.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],p.prototype,"contextMenuService",void 0),n.__decorate([(0,a.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,a.Autowired)(u.DebugContextKey),n.__metadata("design:type",u.DebugContextKey)],p.prototype,"debugContextKey",void 0),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.DebugCallStackService=p},18028:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackView=void 0;const n=t(85608),a=t(25150),o=n.__importDefault(t(14041)),c=t(41869),g=t(64582),u=t(75651),G=n.__importDefault(t(12920));e.DebugCallStackView=(0,a.observer)(({viewState:p})=>{const h=(0,c.useInjectable)(g.IDebugSessionManager),[b,I]=o.default.useState([]);return o.default.useEffect(()=>{const r=h.onDidStartDebugSession(s=>{b.push(s),I([...b])}),l=h.onDidDestroyDebugSession(s=>{const d=b.findIndex(m=>m.id===s.id);b.splice(d,1),I([...b])});return()=>{r.dispose(),l.dispose()}},[]),o.default.createElement("div",{className:G.default.call_stack_wrapper},b.filter(r=>!r.parentSession).map(r=>o.default.createElement(u.DebugStackSessionView,{key:r.id,viewState:p,session:r,indent:0})))})},59334:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(98650);let G=n=class extends c.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};G.DEFAULT_FLUSH_DELAY=100,G=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.ExpressionContainer])],G),e.DebugVariablesModel=G},30865:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModelService=void 0;const a=t(85608),o=a.__importDefault(t(46343)),c=t(76003),g=t(97267),u=t(41869),G=t(93899),p=t(98650),h=t(32756),b=t(17280),I=t(59334),r=a.__importDefault(t(57259));class l{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(m){return Array.from(this._keepExpandedScopesMap.keys()).find(v=>(0,o.default)(v,m.getRawScope()))}set(m){const v=m.getRawScope();if(v){const f=this.getMirrorScope(m);if(f){const N=this._keepExpandedScopesMap.get(f);let W;m.expanded?W=Array.from(new Set([...N,m.variablesReference])):W=N.filter(Z=>Z!==m.variablesReference),this._keepExpandedScopesMap.set(f,W)}else this._keepExpandedScopesMap.set(v,m.expanded?[m.variablesReference]:[])}}get(m){const v=this.getMirrorScope(m);return v?this._keepExpandedScopesMap.get(v)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let s=n=class{constructor(){this.selectedDecoration=new g.Decoration(r.default.mod_selected),this.focusedDecoration=new g.Decoration(r.default.mod_focused),this.contextMenuDecoration=new g.Decoration(r.default.mod_actived),this.loadingDecoration=new g.Decoration(r.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new u.Emitter,this.onDidUpdateTreeModelEmitter=new u.Emitter,this.flushDispatchChangeDelayer=new u.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new u.DisposableCollection,this.keepExpandedScopesModel=new l,this.activeNodeDecoration=(m,v=!0)=>{var f;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),m){if(this.selectedNodes.length>0)for(const N of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(N);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(m),this.focusedDecoration.addTarget(m),this._focusedNode=m,this._selectedNodes=[m],v&&((f=this.treeModel)===null||f===void 0||f.dispatchChange())}},this.activeNodeActivedDecoration=m=>{var v;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(m),this._contextMenuNode=m,(v=this.treeModel)===null||v===void 0||v.dispatchChange()},this.enactiveNodeDecoration=()=>{var m;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(m=this.treeModel)===null||m===void 0||m.dispatchChange()},this.handleContextMenu=(m,v)=>{var f;if(m.stopPropagation(),m.preventDefault(),!v||v instanceof p.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=v;const{x:N,y:W}=m.nativeEvent;v&&(this.activeNodeActivedDecoration(v),this.debugContextKey.contextDebugProtocolVariableMenu.set(v.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!v.evaluateName)),!((f=v.session)===null||f===void 0)&&f.capabilities.supportsReadMemoryRequest&&v.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const Z=this.contextMenuService.createMenu({id:G.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),y=Z.getMergedMenuNodes();Z.dispose(),this.ctxMenuRenderer.show({anchor:{x:N,y:W},menuNodes:y,args:[v.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=m=>{this.activeNodeDecoration(m)},this.handleTwistierClick=(m,v)=>{v===g.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(m,!1),this.toggleDirectory(m)):this.activeNodeDecoration(m)},this.toggleDirectory=async m=>{m.expanded?m.setCollapsed():await m.setExpanded(!0),this.keepExpandedScopesModel.set(m)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var m,v;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const f=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=f,await((m=this._activeTreeModel)===null||m===void 0?void 0:m.ensureReady);const N=((v=this._activeTreeModel)===null||v===void 0?void 0:v.root.children)||[];if(N.length>0&&N.every(Z=>!Z.expanded))for(const Z of N)Z.getRawScope().expensive===!1&&!Z.expanded&&await this.toggleDirectory(Z);const W=async Z=>{for(const y of Z)this.keepExpandedScopesModel.get(y).includes(y.variablesReference)&&(await y.setExpanded(!0),Array.isArray(y.children)&&await W(y.children))};N.forEach(async Z=>{Array.isArray(Z.children)&&await W(Z.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(g.TreeNodeEvent.WillResolveChildren,m=>{this.loadingDecoration.addTarget(m)})),this.disposableCollection.push(this.treeModel.root.watcher.on(g.TreeNodeEvent.DidResolveChildren,m=>{this.loadingDecoration.removeTarget(m)})))}async initTreeModel(m){const v=new p.DebugVariableRoot(m);if(v)return this._activeTreeModel=this.injector.get(I.DebugVariablesModel,[v]),this.initDecorations(v),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(m){this._decorations=new g.DecorationsManager(m),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(m){this._debugVariablesTreeHandle=Object.assign(Object.assign({},m),{getModel:()=>this.treeModel})}async copyEvaluateName(m){m&&await this.clipboardService.writeText(m.evaluateName)}async copyValue(m){if(!m)return;const f=await(async()=>{if(m.session&&m.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:N}}=m;if(N){const W=await m.session.evaluate(N,"clipboard");if(W)return W.result}return""}catch{return""}else return m.value})();f&&await this.clipboardService.writeText(f)}};s.DEFAULT_TRIGGER_DELAY=200,a.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),a.__metadata("design:type",c.Injector)],s.prototype,"injector",void 0),a.__decorate([(0,c.Autowired)(G.ICtxMenuRenderer),a.__metadata("design:type",G.ICtxMenuRenderer)],s.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,c.Autowired)(G.AbstractContextMenuService),a.__metadata("design:type",G.AbstractContextMenuService)],s.prototype,"contextMenuService",void 0),a.__decorate([(0,c.Autowired)(h.DebugViewModel),a.__metadata("design:type",h.DebugViewModel)],s.prototype,"viewModel",void 0),a.__decorate([(0,c.Autowired)(u.IClipboardService),a.__metadata("design:type",Object)],s.prototype,"clipboardService",void 0),a.__decorate([(0,c.Autowired)(b.DebugContextKey),a.__metadata("design:type",b.DebugContextKey)],s.prototype,"debugContextKey",void 0),s=n=a.__decorate([(0,c.Injectable)(),a.__metadata("design:paramtypes",[])],s),e.DebugVariablesModelService=s},86752:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariablesPanelContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(43718),u=t(57517),G=t(14951),p=t(2156),h=t(72665),b=t(94170),I=t(87423),r=t(64582),l=t(61752),s=t(32756),d=t(4983),m=t(95033),v=t(30865);let f=class{registerCommands(W){W.registerCommand(r.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var E;this.reporterService.point(r.DEBUG_REPORT_NAME===null||r.DEBUG_REPORT_NAME===void 0?void 0:r.DEBUG_REPORT_NAME.DEBUG_VARIABLES,r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:R}=this.debugVariablesModelService;if(!R)return;const A=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:R.description.replace(/^\"(.*)\"$/,"$1")});if(A!=null){try{await R.setValue(A)}catch(w){this.messageService.error(w.message)}(E=this.debugVariablesModelService.treeModel)===null||E===void 0||E.dispatchChange()}}}),W.registerCommand(r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:E}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(E)}}),W.registerCommand(r.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:E}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(E)}}),W.registerCommand(r.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async E=>{const{currentVariableInternalContext:R}=this.debugVariablesModelService;if(E instanceof g.URI){const A=this.workbenchEditorService.currentEditor;if(!A?.monacoEditor||!A?.monacoEditor.hasModel())return;const w=A.monacoEditor,F=w.getModel().getValueInRange(w.getSelection());this.debugWatchModelService.addWatchExpression(F);return}else R&&this.debugWatchModelService.addWatchExpression(R.evaluateName)}});const Z="ms-vscode.hexeditor",y=`${g.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;W.registerCommand(r.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async E=>{var R;const A=await this.commandService.executeCommand("extension.getDescription",Z);if(A&&A.enabled){const w=(R=this.viewModel.currentSession)===null||R===void 0?void 0:R.id,F=E.memoryReference;this.workbenchEditorService.open(g.URI.from({scheme:d.DEBUG_MEMORY_SCHEME,authority:w,path:"/"+encodeURIComponent(F||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:u.EditorOpenType.component,componentId:y}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(d.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(W){W.registerResourceProvider({scheme:d.DEBUG_MEMORY_SCHEME,provideResource:async Z=>({uri:Z,icon:(0,o.getIcon)("hex"),name:Z.displayName})})}registerMenus(W){var Z;W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:d.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),W.registerMenuItem(c.MenuId.EditorContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(Z=I.ContextKeyExpr.and(b.EditorContextKeys.hasNonEmptySelection,b.EditorContextKeys.editorTextFocus))===null||Z===void 0?void 0:Z.keys().reduce((y,E)=>y+" && "+E,d.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${d.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${d.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};n.__decorate([(0,a.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],f.prototype,"quickInputService",void 0),n.__decorate([(0,a.Autowired)(v.DebugVariablesModelService),n.__metadata("design:type",v.DebugVariablesModelService)],f.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,a.Autowired)(m.DebugWatchModelService),n.__metadata("design:type",m.DebugWatchModelService)],f.prototype,"debugWatchModelService",void 0),n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",u.WorkbenchEditorService)],f.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(h.IMessageService),n.__metadata("design:type",Object)],f.prototype,"messageService",void 0),n.__decorate([(0,a.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),n.__decorate([(0,a.Autowired)(g.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(s.DebugViewModel),n.__metadata("design:type",s.DebugViewModel)],f.prototype,"viewModel",void 0),n.__decorate([(0,a.Autowired)(G.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],f.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(l.DebugMemoryFileSystemProvider),n.__metadata("design:type",l.DebugMemoryFileSystemProvider)],f.prototype,"debugMemoryFileSystemProvider",void 0),f=n.__decorate([(0,o.Domain)(o.ClientAppContribution,u.BrowserEditorContribution,c.MenuContribution,o.CommandContribution)],f),e.VariablesPanelContribution=f},28875:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=e.DebugVariableRenderedNode=e.DebugVariableView=e.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(41869),G=t(98650),p=t(30865),h=n.__importDefault(t(57259));e.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD",e.DebugVariableView=(0,o.observer)(({viewState:I})=>{const{width:l,height:s}=I,d=c.default.useRef(null),[m,v]=c.default.useState(),f=(0,u.useInjectable)(p.DebugVariablesModelService);c.default.useEffect(()=>{const F=f.onDidUpdateTreeModel(async V=>{v(V)});return()=>{F.dispose(),f.removeNodeDecoration(),v(void 0)}},[]);const N=F=>{f.handleTreeHandler(Object.assign(Object.assign({},F),{hasDirectFocus:()=>d.current===document.activeElement}))},W=(F,V,Y)=>{F.stopPropagation();const{handleTwistierClick:_}=f;V&&_(V,Y)},Z=(F,V)=>{const{handleContextMenu:Y}=f;Y(F,V)},y=F=>{const{handleContextMenu:V}=f;V(F)},E=F=>{const{enactiveNodeDecoration:V}=f;V()},R=F=>{const{enactiveNodeDecoration:V}=f;V()},A=c.default.useCallback(F=>{const V=f.decorations.getDecorations(F.item);return c.default.createElement(e.DebugVariableRenderedNode,{item:F.item,itemType:F.itemType,decorations:V,onClick:W,onTwistierClick:W,onContextMenu:Z,defaultLeftPadding:0,leftPadding:8})},[m]),w=()=>m?c.default.createElement(g.RecycleTree,{height:s,width:l,itemHeight:22,onReady:N,model:m,placeholder:()=>c.default.createElement("span",null),overflow:"auto"},A):c.default.createElement("span",null);return c.default.createElement("div",{className:h.default.debug_variables_container,tabIndex:-1,ref:d,onContextMenu:y,onClick:E,onBlur:R,"data-name":e.DEBUG_VARIABLE_TREE_FIELD_NAME},w())});const b=({item:I,decorations:r,defaultLeftPadding:l,leftPadding:s,onClick:d,onTwistierClick:m,onContextMenu:v,itemType:f})=>{const N=(0,u.useDesignStyles)(h.default.expansion_toggle,"expansion_toggle"),W=_=>{d(_,I,g.CompositeTreeNode.is(I)?g.TreeNodeType.CompositeTreeNode:g.TreeNodeType.TreeNode)},Z=_=>{_.nativeEvent.which!==0&&(f===g.TreeNodeType.TreeNode||f===g.TreeNodeType.CompositeTreeNode)&&v&&v(_,I,f)},y=`${(l||8)+(I.depth||0)*(s||0)+(G.ExpressionContainer.is(I)?0:16)}px`,E={height:e.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:y},R=_=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,h.default.debug_variables_node_displayname,h.default.debug_variables_variable,_.description?h.default.name:"")},_.displayName,_.description?":":""),A=_=>{const H=/^true|false$/i,X=/^(['"]).*\1$/,S=_.description?_.description.replace("function","\u0192 "):"",Q=[h.default.debug_variables_variable];return I.variableType==="number"||I.variableType==="boolean"||I.variableType==="string"?Q.push(h.default[I.variableType]):isNaN(+S)?H.test(S)?Q.push(h.default.boolean):X.test(S)&&Q.push(h.default.string):Q.push(h.default.number),c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment_grow,h.default.debug_variables_node_description,...Q)},S)},w=()=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,h.default.debug_variables_node_tail)},F()),F=()=>c.default.createElement("div",{className:h.default.debug_variables_node_status},I.badge),V=(_,H)=>{const X=S=>{H(S,_,f)};return r&&r?.classlist.indexOf(h.default.mod_loading)>-1?c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,N)},c.default.createElement(g.Loading,null)):c.default.createElement("div",{onClick:X,className:(0,a.default)(h.default.debug_variables_node_segment,N,(0,u.getIcon)("right"),{[`${h.default.mod_collapsed}`]:!_.expanded})})},Y=_=>{if(g.CompositeTreeNode.is(_))return V(_,m)};return c.default.createElement("div",{key:I.id,onClick:W,onContextMenu:Z,title:I.description||"",className:(0,a.default)(h.default.debug_variables_node,r?r.classlist:null),style:E,"data-id":I.id},c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_content)},Y(I),c.default.createElement("div",{className:h.default.debug_variables_node_overflow_wrap},R(I),A(I)),w()))};e.DebugVariableRenderedNode=b,e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(98650);let G=n=class extends c.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};G.DEFAULT_FLUSH_DELAY=100,G=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.ExpressionContainer])],G),e.DebugWatchModel=G},95033:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModelService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(93899),G=t(38029),p=t(50755),h=t(98650),b=t(32756),I=t(4983),r=t(26296),l=t(85454),s=a.__importDefault(t(21315)),{Path:d}=g.path;let m=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new c.Decoration(s.default.mod_selected),this.focusedDecoration=new c.Decoration(s.default.mod_focused),this.contextMenuDecoration=new c.Decoration(s.default.mod_actived),this.loadingDecoration=new c.Decoration(s.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new g.Emitter,this.onDidUpdateTreeModelEmitter=new g.Emitter,this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new g.DisposableCollection,this.loadedDeferred=new g.Deferred,this.activeNodeDecoration=(f,N=!0)=>{var W;if(I.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),f){if(this.selectedNodes.length>0)for(const Z of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(Z);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(f),this.focusedDecoration.addTarget(f),this._focusedNode=f,this._selectedNodes=[f],N&&((W=this.treeModel)===null||W===void 0||W.dispatchChange())}},this.activeNodeActivedDecoration=f=>{var N;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(f),this._contextMenuNode=f,(N=this.treeModel)===null||N===void 0||N.dispatchChange()},this.enactiveNodeDecoration=()=>{var f;I.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(f=this.treeModel)===null||f===void 0||f.dispatchChange()},this.handleContextMenu=(f,N)=>{var W;f.stopPropagation(),f.preventDefault();const{x:Z,y}=f.nativeEvent;N?this.activeNodeActivedDecoration(N):this.enactiveNodeDecoration();let E;N?E=N:E=(W=this.treeModel)===null||W===void 0?void 0:W.root,this.watchItemType.set(E instanceof h.DebugWatchNode?"expression":E instanceof h.DebugVariable||E instanceof h.DebugVariableContainer?"variable":void 0);const R=this.contextMenuService.createMenu({id:u.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),A=R.getMergedMenuNodes();R.dispose(),this.ctxMenuRenderer.show({anchor:{x:Z,y},menuNodes:A,args:[E]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=f=>{this.activeNodeDecoration(f)},this.handleTwistierClick=(f,N)=>{if(N===c.TreeNodeType.CompositeTreeNode){if(h.DebugWatchNode.is(f)&&f.available){this.activeNodeDecoration(f,!1),this.toggleDirectory(f);return}else if(f.variablesReference){this.activeNodeDecoration(f,!1),this.toggleDirectory(f);return}}this.activeNodeDecoration(f)},this.toggleDirectory=async f=>{f.expanded?this.treeHandle.collapseNode(f):this.treeHandle.expandNode(f)},this.proxyPrompt=f=>{let N=!1;const W=async Z=>{if(!N){if(N=!0,Z){if(f instanceof c.NewPromptHandle){const y=f.parent;if(f.addAddonAfter("loading_indicator"),y.session)this.addWatchExpression(Z);else{const E=new h.DebugWatchNode(y.session,Z,y);this.dispatchWatchEvent(y.path,{type:c.WatchEvent.Added,node:E,id:y.id}),this.debugWatch.addWatchExpression(Z)}}else if(f instanceof c.RenamePromptHandle){const y=f.target,E=y.parent;if(f.addAddonAfter("loading_indicator"),E.session)this.debugWatch.renameWatchExpression(y.name,Z),this.initTreeModel();else{const R=new d(y.path).dir.join(Z).toString();this.dispatchWatchEvent(E.path,{type:c.WatchEvent.Moved,oldPath:y.path,newPath:R}),this.debugWatch.renameWatchExpression(y.name,Z)}}}return!0}};f.destroyed||(f.onCommit(W),f.onBlur(W))},this.flushEventQueue=()=>{let f;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((W,Z)=>{const y=d.pathDepth(W),E=d.pathDepth(Z);return y-E});const N=[this._changeEventDispatchQueue[0]];for(const W of this._changeEventDispatchQueue)N.some(Z=>W.indexOf(Z)===0)||N.push(W);return f=(0,g.pSeries)(N.map(W=>async()=>{var Z,y;const E=(y=(Z=this.treeModel)===null||Z===void 0?void 0:Z.root)===null||y===void 0?void 0:y.watchEvents.get(W);return E&&typeof E.callback=="function"&&await E.callback({type:c.WatchEvent.Changed,path:W}),null})),this._changeEventDispatchQueue=[],f},this.debugWatch=new p.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=I.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(f=[]){await(await this.storageProvider(g.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,f)}async load(){const N=await(await this.storageProvider(g.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(N),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(f=>{this.save(f)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})))}async initTreeModel(){const f=await this.debugWatch.getRoot();if(f)return this._activeTreeModel=this.injector.get(l.DebugWatchModel,[f]),this.initDecorations(f),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(f){this._decorations=new c.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(f){this._debugWatchTreeHandle=f}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(f){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(f))}removeDebugWatchNode(f){this.debugWatch.removeWatchExpression(f.name),f.session?this.initTreeModel():this.dispatchWatchEvent(f.parent.path,{type:c.WatchEvent.Removed,path:f.path})}async copyValue(f){const N=await f.getClipboardValue();N&&await this.clipboardService.writeText(N)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(f){this.debugWatch.addWatchExpression(f),this.initTreeModel()}dispatchWatchEvent(f,N){var W;const Z=(W=this.treeModel)===null||W===void 0?void 0:W.root.watchEvents.get(f);Z&&Z.callback&&Z.callback(N)}collapsedAll(){var f;(f=this.treeModel)===null||f===void 0||f.root.collapsedAll()}async refresh(f){if(!f)if(this.treeModel)f=this.treeModel.root;else return;!h.ExpressionContainer.is(f)&&f.parent&&(f=f.parent),this.queueChangeEvent(f.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(f,N){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new g.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var W;await this.flushEventQueue(),(W=this.flushEventQueueDeferred)===null||W===void 0||W.resolve(),this.flushEventQueueDeferred=null,N()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(f)===-1&&this._changeEventDispatchQueue.push(f)}};m.DEFAULT_REFRESH_DELAY=100,m.DEFAULT_TRIGGER_DELAY=200,m.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],m.prototype,"injector",void 0),a.__decorate([(0,o.Autowired)(u.ICtxMenuRenderer),a.__metadata("design:type",u.ICtxMenuRenderer)],m.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,o.Autowired)(u.AbstractContextMenuService),a.__metadata("design:type",u.AbstractContextMenuService)],m.prototype,"contextMenuService",void 0),a.__decorate([(0,o.Autowired)(b.DebugViewModel),a.__metadata("design:type",b.DebugViewModel)],m.prototype,"viewModel",void 0),a.__decorate([(0,o.Autowired)(r.IDebugSessionManager),a.__metadata("design:type",G.DebugSessionManager)],m.prototype,"manager",void 0),a.__decorate([(0,o.Autowired)(g.IReporterService),a.__metadata("design:type",Object)],m.prototype,"reporterService",void 0),a.__decorate([(0,o.Autowired)(g.IContextKeyService),a.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),a.__decorate([(0,o.Autowired)(g.StorageProvider),a.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),a.__decorate([(0,o.Autowired)(g.IClipboardService),a.__metadata("design:type",Object)],m.prototype,"clipboardService",void 0),m=n=a.__decorate([(0,o.Injectable)(),a.__metadata("design:paramtypes",[])],m),e.DebugWatchModelService=m},14600:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchPanelContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(64582),u=t(98650),G=t(4983),p=t(95033);let h=class{registerCommands(I){I.registerCommand(g.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),I.registerCommand(g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),I.registerCommand(g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),I.registerCommand(g.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:r=>{r instanceof u.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(r);const[l]=this.debugWatchModelService.selectedNodes;l instanceof u.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(l)}}),I.registerCommand(g.DEBUG_COMMANDS.EDIT_WATCHER,{execute:r=>{this.debugWatchModelService.renameDebugWatchNodePrompt(r)}}),I.registerCommand(g.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:r=>{this.debugWatchModelService.copyValue(r)}})}registerToolbarItems(I){I.registerItem({id:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),I.registerItem({id:g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:G.CONTEXT_IN_DEBUG_MODE.raw}),I.registerItem({id:g.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:g.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:G.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(I){I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${G.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:G.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(I){I.registerKeybinding({command:g.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:G.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};n.__decorate([(0,a.Autowired)(p.DebugWatchModelService),n.__metadata("design:type",p.DebugWatchModelService)],h.prototype,"debugWatchModelService",void 0),h=n.__decorate([(0,o.Domain)(o.ClientAppContribution,c.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],h),e.WatchPanelContribution=h},64611:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_WATCH_TREE_NODE_HEIGHT=e.DebugWatchRenderedNode=e.DebugWatchView=e.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(41869),G=t(98650),p=t(95033),h=n.__importDefault(t(21315));e.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD",e.DebugWatchView=(0,o.observer)(({viewState:I})=>{const{height:l}=I,s=c.default.useRef(null),[d,m]=c.default.useState(),v=(0,u.useInjectable)(p.DebugWatchModelService);c.default.useEffect(()=>f(),[]);const f=()=>{const F=v.treeModel;let V=!0;const Y=new u.DisposableCollection;return Y.push(u.Disposable.create(()=>{V=!1})),F&&F.ensureReady.then(()=>{V&&m(F)}),Y.push(v.onDidUpdateTreeModel(async _=>{_&&await _.ensureReady,V&&m(_)})),()=>{v.removeNodeDecoration(),Y.dispose()}},N=F=>{v.handleTreeHandler(Object.assign(Object.assign({},F),{getModel:()=>d,hasDirectFocus:()=>s.current===document.activeElement}))},W=(F,V,Y)=>{F.stopPropagation();const{handleTwistierClick:_}=v;V&&_(V,Y)},Z=(F,V)=>{const{handleContextMenu:Y}=v;Y(F,V)},y=F=>{const{handleContextMenu:V}=v;V(F)},E=F=>{const{enactiveNodeDecoration:V}=v;V()},R=F=>{const{enactiveNodeDecoration:V}=v;V()},A=c.default.useCallback(F=>{const V=v.decorations.getDecorations(F.item);return c.default.createElement(e.DebugWatchRenderedNode,{item:F.item,itemType:F.itemType,decorations:V,onClick:W,onTwistierClick:W,onContextMenu:Z,defaultLeftPadding:12,leftPadding:8})},[d]),w=()=>d?c.default.createElement(g.RecycleTree,{height:l,itemHeight:22,onReady:N,model:d,placeholder:()=>c.default.createElement("span",null)},A):c.default.createElement("span",null);return c.default.createElement("div",{className:h.default.debug_watch_container,tabIndex:-1,ref:s,onContextMenu:y,onClick:E,onBlur:R,"data-name":e.DEBUG_WATCH_TREE_FIELD_NAME},w())});const b=({item:I,decorations:r,defaultLeftPadding:l,leftPadding:s,onClick:d,onTwistierClick:m,onContextMenu:v,itemType:f})=>{const N=(0,u.useDesignStyles)(h.default.expansion_toggle,"expansion_toggle"),W=f===g.TreeNodeType.RenamePrompt,Z=f===g.TreeNodeType.NewPrompt,y=W||Z,E=S=>{const Q=I.getRawWatch();Q&&d(S,I,Q.variablesReference>0?g.TreeNodeType.CompositeTreeNode:g.TreeNodeType.TreeNode)},R=S=>{S.nativeEvent.which!==0&&(f===g.TreeNodeType.TreeNode||f===g.TreeNodeType.CompositeTreeNode)&&v&&v(S,I,f)},A={height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(l||8)+(I.depth||0)*(s||0)}px`},w=S=>y&&S instanceof g.PromptHandle?c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_inputbox)},c.default.createElement("div",{className:(0,a.default)("input-box",h.default.debug_watch_node_prompt_box)},c.default.createElement(S.ProxiedInput,{wrapperStyle:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_displayname,h.default.debug_watch_variable,S.description?h.default.name:"")},S.name,S.description?":":""),F=S=>{const Q=/^true|false$/i,O=/^(['"]).*\1$/,M=S.description?S.description.replace("function","\u0192 "):"",T=[h.default.debug_watch_variable];return y?null:(I.variableType==="number"||I.variableType==="boolean"||I.variableType==="string"?T.push(h.default[I.variableType]):isNaN(+M)?Q.test(M)?T.push(h.default.boolean):O.test(M)&&T.push(h.default.string):T.push(h.default.number),c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment_grow,h.default.debug_watch_node_description,...T)},M))},V=()=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_tail)},Y()),Y=()=>c.default.createElement("div",{className:h.default.debug_watch_node_status},I.badge),_=()=>I.tooltip,H=(S,Q)=>{const O=M=>{Q(M,S,f)};return r&&r?.classlist.indexOf(h.default.mod_loading)>-1?c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,N)},c.default.createElement(g.Loading,null)):c.default.createElement("div",{onClick:O,className:(0,a.default)(h.default.debug_watch_node_segment,N,(0,u.getIcon)("right"),{[`${h.default.mod_collapsed}`]:!S.expanded})})},X=S=>{if(G.DebugWatchNode.is(S)){if(S.available&&S.variablesReference)return H(S,m)}else if(G.ExpressionContainer.is(S)&&S.variablesReference)return H(S,m)};return c.default.createElement("div",{key:I.id,onClick:E,onContextMenu:R,title:_(),className:(0,a.default)(h.default.debug_watch_node,r?r.classlist:null),style:A,"data-id":I.id},c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_content)},X(I),c.default.createElement("div",{style:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT},className:y?h.default.debug_watch_node_prompt_wrap:h.default.debug_watch_node_overflow_wrap},w(I),F(I)),V()))};e.DebugWatchRenderedNode=b,e.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_COMMANDS=void 0;var t;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(t=e.DEBUG_COMMANDS||(e.DEBUG_COMMANDS={}))},4983:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ACCESS_TYPE=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_CONSOLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.CONTEXT_DEBUG_TYPE_KEY=e.CONTEXT_IN_DEBUG_MODE_KEY=e.CONTEXT_DEBUG_STOPPED_KEY=e.DEBUG_SCHEME=e.DEBUG_FLOATING_CLICK_WIDGET=e.DEBUG_STACK_ID=e.DEBUG_WELCOME_ID=e.DEBUG_BREAKPOINTS_ID=e.DEBUG_VARIABLES_ID=e.DEBUG_THREAD_ID=e.DEBUG_WATCH_ID=e.DEBUG_MEMORY_SCHEME=e.LAUNCH_VIEW_COMPONENT_ID=e.LAUNCH_VIEW_SCHEME=e.DEBUG_CONTAINER_ID=e.DEBUG_CONSOLE_CONTAINER_ID=void 0,e.CONTEXT_ACTIVE_BREAKPOINTS=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=t(30144);Object.defineProperty(e,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(e,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const a=t(40191);e.LAUNCH_VIEW_SCHEME="launch_view_scheme",e.LAUNCH_VIEW_COMPONENT_ID="launch-view",e.DEBUG_MEMORY_SCHEME="vscode-debug-memory",e.DEBUG_WATCH_ID="debug-watch",e.DEBUG_THREAD_ID="debug-thread",e.DEBUG_VARIABLES_ID="debug-variable",e.DEBUG_BREAKPOINTS_ID="debug-breakpoints",e.DEBUG_WELCOME_ID="debug-welcome",e.DEBUG_STACK_ID="debug-stack",e.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",e.DEBUG_SCHEME="debug",e.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",e.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",e.CONTEXT_DEBUG_TYPE_KEY="debugType",e.CONTEXT_DEBUG_TYPE=new a.RawContextKey("debugType",void 0),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new a.RawContextKey("debugConfigurationType",void 0),e.CONTEXT_DEBUG_STATE=new a.RawContextKey("debugState","Inactive"),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new a.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default"),e.CONTEXT_IN_DEBUG_MODE=new a.RawContextKey("inDebugMode",!1),e.CONTEXT_IN_DEBUG_REPL=new a.RawContextKey("inDebugRepl",!1),e.CONTEXT_IN_DEBUG_CONSOLE=new a.RawContextKey("inDebugConsole",!1),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new a.RawContextKey("breakpointWidgetVisible",!1),e.CONTEXT_IN_BREAKPOINT_WIDGET=new a.RawContextKey("inBreakpointWidget",!1),e.CONTEXT_BREAKPOINTS_FOCUSED=new a.RawContextKey("breakpointsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new a.RawContextKey("watchExpressionsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new a.RawContextKey("watchExpressionsExist",!1),e.CONTEXT_VARIABLES_FOCUSED=new a.RawContextKey("variablesFocused",!0),e.CONTEXT_EXPRESSION_SELECTED=new a.RawContextKey("expressionSelected",!1),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new a.RawContextKey("breakpointInputFocused",!1),e.CONTEXT_CALLSTACK_ITEM_TYPE=new a.RawContextKey("callStackItemType",void 0),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new a.RawContextKey("callStackSessionIsAttach",!1),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new a.RawContextKey("callStackItemStopped",!1),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new a.RawContextKey("callStackSessionHasOneThread",!1),e.CONTEXT_WATCH_ITEM_TYPE=new a.RawContextKey("watchItemType",void 0),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new a.RawContextKey("breakpointItemType",void 0),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new a.RawContextKey("breakpointAccessType",void 0),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new a.RawContextKey("breakpointSupportsCondition",!1),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new a.RawContextKey("loadedScriptsSupported",!1),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new a.RawContextKey("loadedScriptsItemType",void 0),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new a.RawContextKey("focusedSessionIsAttach",!1),e.CONTEXT_STEP_BACK_SUPPORTED=new a.RawContextKey("stepBackSupported",!1),e.CONTEXT_RESTART_FRAME_SUPPORTED=new a.RawContextKey("restartFrameSupported",!1),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new a.RawContextKey("stackFrameSupportsRestart",!1),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new a.RawContextKey("jumpToCursorSupported",!1),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new a.RawContextKey("stepIntoTargetsSupported",!1),e.CONTEXT_BREAKPOINTS_EXIST=new a.RawContextKey("breakpointsExist",!1),e.CONTEXT_DEBUGGERS_AVAILABLE=new a.RawContextKey("debuggersAvailable",!1),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new a.RawContextKey("debugProtocolVariableMenuContext",void 0),e.CONTEXT_SET_VARIABLE_SUPPORTED=new a.RawContextKey("debugSetVariableSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new a.RawContextKey("breakWhenValueChangesSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new a.RawContextKey("breakWhenValueIsAccessedSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new a.RawContextKey("breakWhenValueIsReadSupported",!1),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new a.RawContextKey("variableEvaluateNamePresent",!1),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new a.RawContextKey("exceptionWidgetVisible",!1),e.CONTEXT_MULTI_SESSION_REPL=new a.RawContextKey("multiSessionRepl",!1),e.CONTEXT_MULTI_SESSION_DEBUG=new a.RawContextKey("multiSessionDebug",!1),e.CONTEXT_CAN_VIEW_MEMORY=new a.RawContextKey("canViewMemory",void 0),e.CONTEXT_ACTIVE_BREAKPOINTS=new a.RawContextKey("activateBreakpoints",!0)},95581:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},53670:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MASSIVE_PROPERTY_FLAG=e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=e.DEFAULT_CONFIGURATION_NAME_SEPARATOR=e.DEFAULT_NO_CONFIGURATION_KEY=e.DEFAULT_DYNAMIC_CONFIGURATION_KEY=e.DEFAULT_EDIT_CONFIGURATION_KEY=e.DEFAULT_ADD_CONFIGURATION_KEY=e.DebugConfiguration=void 0;var t;(function(n){function a(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=a})(t=e.DebugConfiguration||(e.DebugConfiguration={})),e.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",e.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",e.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",e.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",e.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",e.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugConsoleModelService=void 0,e.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugEditor=void 0,e.DebugEditor=Symbol("DebugEditor")},2242:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},32385:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugModelManager=e.DebugModelSupportedEventType=e.MemoryRegion=e.IDebugModel=e.DebugModelFactory=e.DebugAdapterContribution=e.DebugAdapterFactory=e.DebugAdapterSessionFactory=e.DebugAdapterSession=void 0;const n=t(43718);e.DebugAdapterSession=Symbol("DebugAdapterSession"),e.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),e.DebugAdapterFactory=Symbol("DebugAdapterFactory"),e.DebugAdapterContribution=Symbol("DebugAdapterContribution"),e.DebugModelFactory=Symbol("DebugModelFactory"),e.IDebugModel=Symbol("IDebugModel");class a extends n.Disposable{constructor(g,u){super(),this.memoryReference=g,this.session=u,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(u.onDidInvalidateMemory(G=>{G.body.memoryReference===g&&this.invalidate(G.body.offset,G.body.count-G.body.offset)}))}async read(g,u){var G;const p=u-g,h=g,b=await this.session.readMemory(this.memoryReference,h,p);if(b===void 0||!(!((G=b.body)===null||G===void 0)&&G.data))return[{type:1,offset:h,length:p}];let I;try{I=(0,n.decodeBase64)(b.body.data)}catch(s){return[{type:2,offset:h,length:p,error:s.message}]}const r=b.body.unreadableBytes||0,l=p-r;if(I.byteLength<l){const s=n.BinaryBuffer.alloc(l-I.byteLength);s.buffer.fill(0),I=n.BinaryBuffer.concat([I,s],l)}else I.byteLength>l&&(I=I.slice(0,l));return r?[{type:0,offset:h,length:l,data:I},{type:1,offset:h+l,length:r}]:[{type:0,offset:h,length:p,data:I}]}async write(g,u){var G,p;const h=await this.session.writeMemory(this.memoryReference,g,(0,n.encodeBase64)(u),!0),b=(p=(G=h?.body)===null||G===void 0?void 0:G.bytesWritten)!==null&&p!==void 0?p:u.byteLength;return this.invalidate(g,g+b),b}dispose(){super.dispose()}invalidate(g,u){this.invalidateEmitter.fire({fromOffset:g,toOffset:u})}}e.MemoryRegion=a;var o;(function(c){c.down="Down",c.move="Move",c.leave="Leave",c.contextMenu="contextMenu"})(o=e.DebugModelSupportedEventType||(e.DebugModelSupportedEventType={})),e.IDebugModelManager=Symbol("DebugModelManager")},79845:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugProgress=void 0,e.IDebugProgress=Symbol("DebugProgress")},60709:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSON_SCHEMA_TYPE=e.launchDefaultSchemaUri=e.launchExtensionSchemaUri=e.launchSchemaUri=void 0,e.launchSchemaUri="vscode://schemas/launch",e.launchExtensionSchemaUri="vscode://schemas/launch/extension",e.launchDefaultSchemaUri="vscode://schemas/launch/default";var t;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(t=e.JSON_SCHEMA_TYPE||(e.JSON_SCHEMA_TYPE={}))},70159:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILaunchService=e.IDebugService=e.IDebugServer=e.DebugAdapterPath=e.DebugConfigurationProviderTriggerKind=void 0;var t;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(t=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={})),e.DebugAdapterPath="DebugAdaptor",e.IDebugServer=Symbol("DebugServer"),e.IDebugService=Symbol("DebugService"),e.ILaunchService=Symbol("ILaunchService")},50883:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugSessionDTO=void 0;var t;(function(n){function a(o){return"id"in o}n.is=a})(t=e.IDebugSessionDTO||(e.IDebugSessionDTO={}))},26296:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSequenceId=e.IDebugSessionManager=e.IDebugSession=e.DebugState=void 0;var t;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(t=e.DebugState||(e.DebugState={})),e.IDebugSession=Symbol("DebugSession"),e.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function a(){return n++}e.getSequenceId=a},64582:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(53670),e),n.__exportStar(t(70159),e),n.__exportStar(t(2242),e),n.__exportStar(t(95581),e),n.__exportStar(t(32385),e),n.__exportStar(t(26296),e),n.__exportStar(t(70049),e),n.__exportStar(t(50883),e),n.__exportStar(t(24395),e),n.__exportStar(t(79845),e),n.__exportStar(t(60709),e),n.__exportStar(t(7428),e),n.__exportStar(t(37723),e),n.__exportStar(t(4983),e),n.__exportStar(t(71120),e),n.__exportStar(t(46118),e)},7428:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},71120:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareCommand=e.getDriveLetter=e.hasDriveLetter=e.isWindowsDriveLetter=void 0;const n=t(43718);function a(u){return u>=65&&u<=90||u>=97&&u<=122}e.isWindowsDriveLetter=a;function o(u,G=n.isWindows){return G?a(u.charCodeAt(0))&&u.charCodeAt(1)===58:!1}e.hasDriveLetter=o;function c(u){return o(u)?u[0]:void 0}e.getDriveLetter=c;function g(u,G,p,h,b){u=u.trim().toLowerCase();let I;u.indexOf("powershell")>=0||u.indexOf("pwsh")>=0?I=1:u.indexOf("cmd.exe")>=0?I=0:u.indexOf("bash")>=0?I=2:n.isWindows?I=0:I=2;let r,l=" ";switch(I){case 1:if(r=s=>(s=s.replace(/'/g,"''"),s.length>0&&s.charAt(s.length-1)==="\\"?`'${s}\\'`:`'${s}'`),h){const s=c(h);s&&(l+=`${s}:; `),l+=`cd ${r(h)}; `}if(b)for(const s in b){const d=b[s];d===null?l+=`Remove-Item env:${s}; `:l+=`\${env:${s}}='${d}'; `}if(G.length>0){const s=G.shift(),d=p?s:r(s);l+=d[0]==="'"?`& ${d} `:`${d} `;for(const m of G)l+=m==="<"||m===">"||p?m:r(m),l+=" "}break;case 0:if(r=s=>(s=s.replace(/"/g,'""'),s=s.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(d=>s.includes(d))||s.length===0?`"${s}"`:s),h){const s=c(h);s&&(l+=`${s}: && `),l+=`cd ${r(h)} && `}if(b){l+='cmd /C "';for(const s in b){let d=b[s];d===null?l+=`set "${s}=" && `:(d=d.replace(/[&^|<>]/g,m=>`^${m}`),l+=`set "${s}=${d}" && `)}}for(const s of G)l+=s==="<"||s===">"||p?s:r(s),l+=" ";b&&(l+='"');break;case 2:{r=d=>(d=d.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),d.length===0?'""':d);const s=d=>/[^\w@%/+=,.:^-]/.test(d)?`'${d.replace(/'/g,"'\\''")}'`:d;if(h&&(l+=`cd ${r(h)} ; `),b){l+="/usr/bin/env";for(const d in b){const m=b[d];m===null?l+=` -u ${s(d)}`:l+=` ${s(`${d}=${m}`)}`}l+=" "}for(const d of G)l+=d==="<"||d===">"||p?d:r(d),l+=" ";break}}return l}e.prepareCommand=g},37723:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConfigurationsReadyEvent=e.DEBUG_REPORT_NAME=void 0;const n=t(43718);var a;(function(c){c.DEBUG_SESSION_START_TIME="debugSessionStartTime",c.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",c.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",c.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",c.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",c.DEBUG_WATCH="debugWatch",c.DEBUG_VARIABLES="debugVariables",c.DEBUG_BREAKPOINT="debugBreakpoint",c.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",c.DEBUG_STOPPED="debugStopped",c.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(a=e.DEBUG_REPORT_NAME||(e.DEBUG_REPORT_NAME={}));class o extends n.BasicEvent{}e.DebugConfigurationsReadyEvent=o},66482:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(64582),e)},83670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDecorationsService=void 0;const n=t(85608),a=t(76003),o=t(43718),{isFalsyOrWhitespace:c}=o.strings,{asArray:g}=o.arrays;class u{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(l){return this._data.get(l.toString())||this._data.findSuperstr(l.toString())!==void 0}static debouncer(l,s){if(l||(l=new u),Array.isArray(s))for(const d of s)l._data.set(d.toString(),!0);else l._data.set(s.toString(),!0);return l}}class G{constructor(l,s){this.source=l,this.thenable=s}}class p{constructor(l,s,d){this._provider=l,this._uriEmitter=s,this._flushEmitter=d,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(m=>{if(!m)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const v of m)this._fetchData(v)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(l){return!!this.data.get(l.toString())||!!this.data.findSuperstr(l.toString())}getOrRetrieve(l,s,d){const m=l.toString();let v=this.data.get(m);if(v===void 0&&(v=this._fetchData(l)),v&&!(v instanceof G)&&d(v,!1),s){const f=this.data.findSuperstr(m);if(f)for(let N=f.next();!N.done;N=f.next())N.value&&!(N.value instanceof G)&&d(N.value,!0)}}_fetchData(l){const s=this.data.get(l.toString());s instanceof G&&(s.source.cancel(),this.data.delete(l.toString()));const d=new o.CancellationTokenSource,m=this._provider.provideDecorations(l,d.token);if((0,o.isThenable)(m)){const v=new G(d,Promise.resolve(m).then(f=>{this.data.get(l.toString())===v&&this._keepItem(l,f)}).catch(f=>{!(0,o.isPromiseCanceledError)(f)&&this.data.get(l.toString())===v&&this.data.delete(l.toString())}));return this.data.set(l.toString(),v),null}else return this._keepItem(l,m)}_keepItem(l,s){const d=s||null,m=this.data.set(l.toString(),d);return(d||m)&&this._uriEmitter.fire(l),d}}function h(r){return g(r).map(({color:s,letter:d})=>`${s}/${d}`).join(",")}function b(r){const l=g(r);if(l.length)return{key:h(r),color:l[0].color,badge:l.filter(s=>!c(s.letter)).map(s=>s.letter).join(","),tooltip:l.filter(s=>!c(s.tooltip)).map(s=>s.tooltip).join(" \u2022 ")}}let I=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,u.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(l){this.logger.log("DecorationService#registerDecorationsProvider",l);const s=new p(l,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),d=this._data.push(s);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{d(),this._onDidChangeDecorations.fire({affectsResource:m=>s.knowsAbout(m)}),s.dispose()})}getDecoration(l,s){const d=[];let m=!1;for(let v=this._data.iterator(),f=v.next();!f.done;f=v.next())f.value.getOrRetrieve(l,s,(N,W)=>{(!W||N.bubble)&&(d.push(N),m=W||m)});if(d.length!==0)return this.asDecoration(d,m)}asDecoration(l,s){l.sort((m,v)=>(v.weight||0)-(m.weight||0));const d=b(l);return d&&s&&(d.badge="\u2022",d.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),d}};I=n.__decorate([(0,a.Injectable)()],I),e.FileDecorationsService=I},4958:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93364),g=t(83670);let u=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IDecorationsService,useClass:g.FileDecorationsService}]}};u=n.__decorate([(0,a.Injectable)()],u),e.DecorationModule=u},93364:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0;const n=t(43718);class a extends n.Disposable{}e.IDecorationsService=a},87323:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(93364),e)},41893:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(87323),e)},67988:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignCoreContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(1149),g=t(43718),u=t(14951),G=t(2156),p=t(11090),h=t(37517);let b=class{initialize(){this.fileSystem.registerProvider(g.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,c.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,c.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,c.ConfigPriority.ModuleDefined)}registerRenderer(r){r.registerSlotRenderer(o.SlotLocation.left,p.DesignLeftTabRenderer),r.registerSlotRenderer(o.SlotLocation.bottom,p.DesignBottomTabRenderer),r.registerSlotRenderer(o.SlotLocation.right,p.DesignRightTabRenderer)}};n.__decorate([(0,a.Autowired)(u.IFileServiceClient),n.__metadata("design:type",G.FileServiceClient)],b.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",h.DesignThemeFileSystemProvider)],b.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,a.Autowired)(c.LayoutViewSizeConfig),n.__metadata("design:type",c.LayoutViewSizeConfig)],b.prototype,"layoutViewSize",void 0),b=n.__decorate([(0,a.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],b),e.DesignCoreContribution=b},17242:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(71707),g=t(80832),u=t(97222),G=t(43718),p=t(57517),h=t(52416),b=t(51706),I=t(9132),r=t(67988),l=t(3013),s=t(31385),d=t(72141),m=t(45365),v=n.__importDefault(t(49107)),f=n.__importDefault(t(13925)),N=n.__importDefault(t(63080)),W=t(98741);let Z=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[l.DesignMenuBarContribution,r.DesignCoreContribution],this.preferences=E=>{t.e(454).then(t.bind(t,77454)),E.get(g.IDesignStyleService).setStyles(v.default),(0,W.overrideColorToken)(),(0,W.overrideMonacoColorToken)();const A=E.get(G.AppLifeCycleServiceToken);G.Event.once(G.Event.filter(A.onDidLifeCyclePhaseChange,w=>w===3))(()=>{const w=E.get(h.IThemeService);[f.default,N.default].forEach(F=>{w.registerThemes([{id:F.id,label:F.name,path:"",extensionId:F.id,uiTheme:F.base}],o.URI.parse(`${F.id}.json`).withQuery(F.id).withScheme(G.Schemes.design))})}),E.overrideProviders({token:h.IThemeStore,useClass:class extends b.ThemeStore{async getThemeData(w,F){const V=await super.getThemeData(w,F);return document.body.classList.remove(N.default.designThemeType),document.body.classList.remove(f.default.designThemeType),f.default.id===w?.id?document.body.classList.add(f.default.designThemeType):N.default.id===w?.id&&document.body.classList.add(N.default.designThemeType),V}},override:!0,isDefault:!0},{token:h.IThemeService,useClass:class extends I.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(f.default.id)}},override:!0,isDefault:!0},{token:p.IEditorTabService,useClass:s.DesignEditorTabService,override:!0,isDefault:!0},{token:c.ISplitPanelService,useClass:m.DesignSplitPanelService,override:!0,isDefault:!0},{token:u.IBrowserCtxMenu,useClass:d.DesignBrowserCtxMenuService})}}};Z=n.__decorate([(0,a.Injectable)()],Z),e.DesignModule=Z},11090:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignRightTabRenderer=e.DesignBottomTabRenderer=e.DesignLeftTabRenderer=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(19951),g=({className:p,components:h,tabbarView:b})=>o.default.createElement(c.LeftTabRenderer,{className:(0,a.default)(p,"design_left_slot"),components:h,tabbarView:b});e.DesignLeftTabRenderer=g;const u=({className:p,components:h})=>o.default.createElement(c.BottomTabRenderer,{className:(0,a.default)(p,"design_bottom_slot"),components:h});e.DesignBottomTabRenderer=u;const G=({className:p,components:h,tabbarView:b,tabpanelView:I})=>o.default.createElement(c.RightTabRenderer,{className:(0,a.default)("design_right_slot",p),components:h,tabbarView:b,tabpanelView:I});e.DesignRightTabRenderer=G},3013:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(64267),u=t(38879),G=t(12458);let p=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(c.MenuId.DesignMenuBarTopExtra);let b;this.addDispose(this.menubarStore.onDidMenuBarChange(I=>{b&&b.dispose(),b=this.menuRegistry.registerMenuItems(c.MenuId.DesignMenuBarTopExtra,I.map(r=>({label:r.label,submenu:r.id,iconClass:r.iconClass,group:r.group||"1_navigation",order:r.order||100})))}))}registerComponent(b){b.register(u.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:G.DesignMenuBarView,id:u.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};n.__decorate([(0,a.Autowired)(g.MenubarStore),n.__metadata("design:type",g.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,a.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],p.prototype,"menuRegistry",void 0),p=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],p),e.DesignMenuBarContribution=p},12458:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(89195),G=t(1149),p=t(63373),h=t(93899),b=t(43718),I=t(63067),r=t(38879),l=n.__importDefault(t(52151)),s=n.__importDefault(t(90946)),d=()=>{const v=(0,c.useInjectable)(h.AbstractContextMenuService),f=(0,c.useInjectable)(G.DesignLayoutConfig),N=(0,c.useInjectable)(h.ICtxMenuRenderer),W=o.useRef(null),[Z,y]=o.useState(void 0);o.useEffect(()=>{E()},[]);const E=o.useCallback(F=>{requestAnimationFrame(()=>{if(W.current){const V=W.current.getBoundingClientRect(),{x:Y,y:_,width:H,height:X}=V,S={x:Y,y:_+X};y(S),F&&F(S)}})},[W.current]),R=o.useMemo(()=>v.createMenu({id:h.MenuId.DesignMenuBarTopExtra}),[v]),A=o.useCallback(()=>{if(!Z)return;const F=R.getMergedMenuNodes();R.dispose(),E(V=>{N.show({anchor:V,menuNodes:F})})},[Z,R]),w=o.useMemo(()=>f.menubarLogo||l.default,[f.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(u.EnhanceIcon,{wrapperClassName:s.default.ai_enhance_menu,ref:W,onClick:A},o.createElement("div",{className:s.default.logo_container},o.createElement("img",{className:s.default.extra_top_icon,src:w,alt:""}),o.createElement(g.Icon,{className:(0,a.default)((0,c.getIcon)("down"),s.default.caret_icon)}))))},m=()=>{const v=(0,c.useInjectable)(b.CommandService),f=(0,c.useInjectable)(I.IMainLayoutService),N=(0,c.useInjectable)(c.AINativeConfigService),[W,Z]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{Z(E())});const A=f.getTabbarService(c.SlotLocation.left).onCurrentChange(({previousId:w,currentId:F})=>{w&&!F?Z(!1):!w&&F&&Z(!0)});return()=>{A.dispose()}},[]);const y=o.useCallback(()=>{v.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{Z(E())})},[]),E=o.useCallback(()=>!!f.getTabbarService(c.SlotLocation.left).currentContainerId,[f]);return o.createElement("div",{id:p.VIEW_CONTAINERS.MENUBAR,className:s.default.menu_bar_view,style:{height:N.layoutViewSize.menubarHeight}},o.createElement("div",{className:s.default.container},o.createElement("div",{className:s.default.left},o.createElement(u.EnhanceIcon,{wrapperClassName:s.default.enhance_menu,icon:W?"left-nav-open":"left-nav-close",onClick:y}),o.createElement("span",{className:s.default.dividing}),o.createElement("div",{className:s.default.top_menus_bar},o.createElement(d,null)),o.createElement(c.SlotRenderer,{id:"design-menubar-left",slot:r.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:s.default.right},o.createElement(c.SlotRenderer,{id:"design-menubar-right",slot:r.DESIGN_MENU_BAR_RIGHT,flex:1}))))};e.DesignMenuBarView=m},31385:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignEditorTabService=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(76003),g=t(81878),u=t(1149),G=t(43718),p=t(30612),h=n.__importDefault(t(49107)),b=r=>{const{children:l}=r,[s,d]=o.default.useState(!1),m=(0,o.useMemo)(()=>"editor-tab-close-"+(0,G.uuid)(6),[]),v=(0,o.useCallback)(()=>{d(!1)},[]),f=(0,o.useMemo)(()=>(0,G.formatLocalize)("editor.closeTab.title",G.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(g.Popover,{delay:1e3,position:g.PopoverPosition.bottom,id:m,title:f,onClickAction:v,display:s},o.default.createElement("span",{title:""},l))};let I=class extends p.EditorTabService{renderEditorTab(l,s){return o.default.createElement("div",{className:(0,a.default)({[h.default["design-editor_tab_block_container"]]:!0,[h.default.active]:s}),style:{height:this.layoutViewSize.editorTabsHeight}},l)}renderTabCloseComponent(l){return o.default.createElement(b,null,l)}};n.__decorate([(0,c.Autowired)(u.LayoutViewSizeConfig),n.__metadata("design:type",u.LayoutViewSizeConfig)],I.prototype,"layoutViewSize",void 0),I=n.__decorate([(0,c.Injectable)()],I),e.DesignEditorTabService=I},72141:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignBrowserCtxMenuService=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(76003),g=t(97267),u=t(41869),G=t(31388),p=t(52416),h=n.__importDefault(t(49107)),b=r=>{const l=(0,u.useInjectable)(p.IIconService),{data:s,disabled:d,hasSubmenu:m}=r,v=(0,o.useMemo)(()=>s.checked?o.default.createElement(g.Icon,{icon:"check"}):s.icon?o.default.createElement(g.Icon,{iconClass:s.icon}):null,[s]);return o.default.createElement("div",{className:(0,a.default)(h.default.menuAction__sub_menu_action_container,{[h.default.disabled]:d,[h.default.checked]:s.checked},s.className)},o.default.createElement("div",{className:h.default.icon},v),o.default.createElement("div",{className:h.default.label},s.label?(0,u.transformLabelWithCodicon)(u.strings.mnemonicButtonLabel(s.label,!0),{margin:"0 3px"},l?.fromString.bind(l)):""),o.default.createElement("div",{className:h.default.tip},s.keybinding?o.default.createElement("div",{className:h.default.shortcut},s.keybinding):null,m?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(g.Icon,{icon:"right-arrow"})):null,!s.keybinding&&!m&&s.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},s.extraDesc)))};let I=class extends G.BrowserCtxMenuService{renderSubMenuTitle(l,s){return o.default.createElement(b,Object.assign({data:l},s))}renderMenuItem(l,s){return o.default.createElement(b,Object.assign({data:l},s))}};I=n.__decorate([(0,c.Injectable)()],I),e.DesignBrowserCtxMenuService=I},45365:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignSplitPanelService=void 0;const n=t(71707);class a extends n.SplitPanelService{renderSplitPanel(c,g,u){return super.renderSplitPanel(c,g,u)}interceptProps(c){return c}}e.DesignSplitPanelService=a},13925:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignThemeFileSystemProvider=void 0;const n=t(85608),a=t(76003),o=t(43718),c=n.__importDefault(t(13925)),g=n.__importDefault(t(63080));let u=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(p){return Promise.resolve({type:o.FileType.File,uri:p.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(p){const{query:h}=p;return c.default.id===h?this.toBuffer(JSON.stringify(c.default)):this.toBuffer(JSON.stringify(g.default))}toBuffer(p){return o.BinaryBuffer.fromString(p).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};u=n.__decorate([(0,a.Injectable)()],u),e.DesignThemeFileSystemProvider=u},63080:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.overrideMonacoColorToken=e.overrideColorToken=void 0;const n=t(85608),a=t(52416),o=n.__importDefault(t(13925)),c=n.__importDefault(t(63080)),g=()=>{const G=(0,a.getColorRegistry)();G.getColors().forEach(({id:p})=>{if(o.default.colors[p]&&c.default.colors[p]){const h=G.getColor(p);(0,a.registerColor)(p,{dark:o.default.colors[p],light:c.default.colors[p],hcDark:h.defaults.hcDark||null,hcLight:h.defaults.hcLight||null},h.description)}})};e.overrideColorToken=g;const u=()=>{(0,a.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,a.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};e.overrideMonacoColorToken=u},66338:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DESIGN_MENU_BAR_LEFT=e.DESIGN_MENU_BAR_RIGHT=e.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,e.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",e.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",e.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(66338),e)},82353:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(38879),e)},87802:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findCurrentDocumentSymbol=e.DefaultBreadCrumbProvider=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(26542),u=t(79929),G=t(97408),p=t(82196),h=t(17459),{Path:b}=c.path;let I=class extends c.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new c.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new c.LRUMap(200,100)}handlesUri(v){return this.fileServiceClient.handlesScheme(v.scheme)}provideBreadCrumbForUri(v,f){return this.getFileParts(v).concat(this.getDocumentSymbolParts(v,f))}getFileParts(v){const f=this.workspaceService.workspace?new c.URI(this.workspaceService.workspace.uri):void 0;let N,W;f&&f.isEqualOrParent(v)?(N=f,W=f.relative(v)):(N=c.URI.from({scheme:v.scheme,authority:v.authority}),W=v.path);let Z=N.path;const y=[];for(const E of W.toString().split(b.separator).filter(R=>!!R)){Z=Z.join(E);const R=N.withPath(Z);y.push(this.createFilePartBreadCrumbUri(R,!R.isEqual(v)))}return y}createFilePartBreadCrumbUri(v,f){const N=v.toString();if(this.cachedBreadCrumb.has(N))return this.cachedBreadCrumb.get(N);const W={name:v.path.base,uri:v,icon:this.labelService.getIcon(v,{isDirectory:f}),getSiblings:async()=>{const Z=c.URI.from({scheme:v.scheme}).withPath(v.path.dir),y=await this.fileServiceClient.getFileStat(Z.toString()),E=[];let R=-1;return y&&y.children&&y.children.length>0&&l(y.children).forEach((A,w)=>{E.push(this.createFilePartBreadCrumbUri(new c.URI(A.uri),A.isDirectory)),R===-1&&v.toString()===A.uri&&(R=w)}),{parts:E,currentIndex:R}}};return f?W.getChildren=async()=>{const Z=await this.fileServiceClient.getFileStat(v.toString()),y=[];return Z&&Z.children&&Z.children.length>0&&l(Z.children).forEach((E,R)=>{y.push(this.createFilePartBreadCrumbUri(new c.URI(E.uri),E.isDirectory))}),y}:W.onClick=()=>{this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,v)},this.cachedBreadCrumb.set(N,W),W}getDocumentSymbolParts(v,f){if(!f)return[];const N=this.documentSymbolStore.getDocumentSymbol(v);if(N&&N.length>0){const W=r(N,f.monacoEditor.getPosition());return W.length>0?W.map(Z=>this.createFromDocumentSymbol(Z,f)):[{name:"...",getSiblings:()=>({parts:N.sort((Z,y)=>d(Z.range,y.range)).map(Z=>this.createFromDocumentSymbol(Z,f)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(v,f){const N={name:v.name,icon:(0,c.getSymbolIcon)(v.kind),isSymbol:!0,onClick:()=>{f.setSelection({startColumn:v.range.startColumn,endColumn:v.range.startColumn,startLineNumber:v.range.startLineNumber,endLineNumber:v.range.startLineNumber}),f.monacoEditor.revealRangeInCenter(v.range),f.monacoEditor.focus()}};return v.parent&&(N.getSiblings=()=>({parts:v.parent.children.sort((W,Z)=>d(W.range,Z.range)).map(W=>this.createFromDocumentSymbol(W,f)),currentIndex:v.parent.children.indexOf(v)})),v.children&&v.children.length>0&&(N.getChildren=()=>v.children.sort((W,Z)=>d(W.range,Z.range)).map(W=>this.createFromDocumentSymbol(W,f))),N}onDocumentSymbolChangedEvent(v){this.notifyUpdate(v.payload)}onEditorSelectionChangeEvent(v){this.notifyUpdate(v.payload.editorUri)}notifyUpdate(v){this.debouncedFireUriEvent.has(v.toString())||this.debouncedFireUriEvent.set(v.toString(),(0,a.default)(()=>{this._onDidUpdateBreadCrumb.fire(v)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(v.toString())()}};n.__decorate([(0,o.Autowired)(u.IFileServiceClient),n.__metadata("design:type",Object)],I.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(G.IWorkspaceService),n.__metadata("design:type",Object)],I.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(g.LabelService),n.__metadata("design:type",g.LabelService)],I.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],I.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",h.DocumentSymbolStore)],I.prototype,"documentSymbolStore",void 0),n.__decorate([(0,c.OnEvent)(h.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[h.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],I.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,c.OnEvent)(p.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],I.prototype,"onEditorSelectionChangeEvent",null),I=n.__decorate([(0,o.Injectable)()],I),e.DefaultBreadCrumbProvider=I;function r(m,v){const f=[];if(!v)return f;let N=m;for(;N&&N.length>0;){let W=!1;for(const Z of N)if(s(v,Z.range)){f.push(Z),N=Z.children,W=!0;break}if(!W)break}return f}e.findCurrentDocumentSymbol=r;function l(m){return m.sort((v,f)=>{if(v.isDirectory&&f.isDirectory||!v.isDirectory&&!f.isDirectory){const N=new c.URI(v.uri).path.name,W=new c.URI(f.uri).path.name;return N.localeCompare(W,"kn",{numeric:!0})}else return v.isDirectory&&!f.isDirectory?-1:!v.isDirectory&&f.isDirectory?1:0})}function s(m,v){return m.lineNumber<v.startLineNumber?!1:m.lineNumber===v.startLineNumber?m.column>=v.startColumn:m.lineNumber<v.endLineNumber?!0:m.lineNumber===v.endLineNumber?m.column<=v.endColumn:!1}function d(m,v){return m.startLineNumber>v.startLineNumber?1:m.startLineNumber<v.startLineNumber?-1:m.startColumn===v.startColumn?0:m.startColumn>v.startColumn?1:-1}},17459:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolTag=e.DocumentSymbolChangedEvent=e.DocumentSymbolStore=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(79865),u=t(48069);Object.defineProperty(e,"SymbolTag",{enumerable:!0,get:function(){return u.SymbolTag}});const G=t(23418),p=t(96689);let h=class extends c.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(g.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(s=>{this.markNeedUpdate(new c.URI(s))})}))}getDocumentSymbol(s){return this.documentSymbols.has(s.toString())||(this.documentSymbols.set(s.toString(),void 0),this.createDocumentSymbolCache(s)),this.pendingUpdate.has(s.toString())&&this.updateDocumentSymbolCache(s),this.documentSymbols.get(s.toString())}async getDocumentSymbolAsync(s,d){var m;const v=s.toString();return d&&d.onCancellationRequested(()=>{var f;(f=this.symbolDeferred.get(v))===null||f===void 0||f.resolve(),this.symbolDeferred.delete(v)}),(!this.documentSymbols.has(v)||this.pendingUpdate.has(v))&&!this.symbolDeferred.has(v)&&(this.symbolDeferred.set(v,new c.Deferred),this.updateDocumentSymbolCache(s)),await((m=this.symbolDeferred.get(v))===null||m===void 0?void 0:m.promise),this.documentSymbols.get(v)}async createDocumentSymbolCache(s){this.updateDocumentSymbolCache(s)}async doUpdateDocumentSymbolCache(s){var d,m;this.pendingUpdate.delete(s.toString());const v=await this.editorDocumentModelRegistry.createModelReference(s);if(!v){(d=this.symbolDeferred.get(s.toString()))===null||d===void 0||d.resolve();return}try{const f=g.languageFeaturesService.documentSymbolProvider.all(v.instance.getMonacoModel());let N;for(const W of f)if(N=await W.provideDocumentSymbols(v.instance.getMonacoModel(),new c.CancellationTokenSource().token),N)break;N&&I(N,{children:N},s),this.documentSymbols.set(s.toString(),N),this.eventBus.fire(new b(s))}finally{v.dispose()}(m=this.symbolDeferred.get(s.toString()))===null||m===void 0||m.resolve()}updateDocumentSymbolCache(s){this.debounced.has(s.toString())||this.debounced.set(s.toString(),(0,a.default)(()=>this.doUpdateDocumentSymbolCache(s),100,{maxWait:1e3})),this.debounced.get(s.toString())()}onEditorDocumentModelContentChangedEvent(s){s.payload.changes&&s.payload.changes.length>0&&this.markNeedUpdate(s.payload.uri)}markNeedUpdate(s){this.pendingUpdate.add(s.toString()),this.isWatching(s)&&this.updateDocumentSymbolCache(s)}isWatching(s){for(const d of this.editorService.editorGroups)if(d.currentResource&&d.currentResource.uri.isEqual(s))return!0;return!1}};n.__decorate([(0,o.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],h.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(G.WorkbenchEditorService),n.__metadata("design:type",G.WorkbenchEditorService)],h.prototype,"editorService",void 0),n.__decorate([(0,c.OnEvent)(p.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],h.prototype,"onEditorDocumentModelContentChangedEvent",null),h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h),e.DocumentSymbolStore=h;class b extends c.BasicEvent{}e.DocumentSymbolChangedEvent=b;function I(l,s,d){return l.forEach((m,v)=>{const f=m;f.parent=s,f.id=r(d,f,v),m.children&&m.children.length>0&&I(m.children,m,d)}),l}function r(l,s,d){const m=[s.name];for(;s.parent;){const v=s.parent;if(!v.name)break;m.unshift(v.name),s=v}return`${l.toString()}__${m.join("-")}__${d}`}},88895:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadCrumbServiceImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(87802),{addElement:g}=o.arrays;let u=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(b){const I=g(this.providers,b);return b.onDidUpdateBreadCrumb(r=>{this.crumbResults.forEach((l,s)=>{l.has(r.toString())&&this.getBreadCrumbs(r,s)})}),I}getBreadCrumbs(b,I){const r=this.getEditorCrumbResults(I);for(const l of this.providers)if(l.handlesUri(b)){const s=r.get(b.toString()),d=l.provideBreadCrumbForUri(b,I);G(s,d)||(r.set(b.toString(),d),this._onDidUpdateBreadCrumbResults.fire({editor:I,uri:b}));break}return r.get(b.toString())}getEditorCrumbResults(b){return this.crumbResults.has(b)||(this.crumbResults.set(b,new Map),b&&b.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(b)})),this.crumbResults.get(b)}disposeCrumb(b){}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",c.DefaultBreadCrumbProvider)],u.prototype,"defaultBreadCrumbProvider",void 0),u=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],u),e.BreadCrumbServiceImpl=u;function G(h,b){if(!h&&!b)return!0;if(!h||!b)return!1;if(h.length!==b.length)return!1;for(let I=0;I<h.length;I++)if(!p(h[I],b[I]))return!1;return!0}function p(h,b){return h.name===b.name}},11673:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorComponentRegistryImpl=void 0;const n=t(85608),a=n.__importDefault(t(46343)),o=n.__importDefault(t(19106)),c=n.__importDefault(t(43144)),g=t(76003),u=t(43718),G=t(82196);let p=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(b,I){const r=b.uid;return b.renderMode||(b.renderMode=G.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(r,b),this.initialPropsMap.set(r,I),this.eventBus.fire(new u.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:r})),this.eventBus.fire(new G.RegisterEditorComponentEvent(r)),{dispose:()=>{this.components.get(r)===b&&(this.components.delete(r),this.eventBus.fire(new G.EditorComponentDisposeEvent(b)))}}}registerEditorComponentResolver(b,I){let r;return typeof b=="function"?r={handleScheme:b,resolver:I}:r={handleScheme:l=>l===b?10:-1,resolver:I},this.normalizedResolvers.push(r),this.resolvers.clear(),{dispose:()=>{for(const s of this.resolvers.values()){const d=s.indexOf(I);d!==-1&&s.splice(d,1)}const l=this.normalizedResolvers.indexOf(r);l!==-1&&this.normalizedResolvers.splice(l,1)}}}async resolveEditorComponent(b){let I=[];const r=this.getResolvers(b.uri.scheme).slice();let l=!1;const s=d=>{I=d,l=!0};for(const d of r)if(await d(b,I,s),l)break;return I.sort((d,m)=>{const v=d.weight||0;return(m.weight||0)-v}),(0,o.default)(I,a.default)}calculateSchemeResolver(b){const I=this.normalizedResolvers.slice(),r=[];return I.forEach((l,s)=>{const d=l.handleScheme(b);d>=0&&r.push({weight:d,index:s,resolver:l.resolver})}),r.sort((l,s)=>l.weight>s.weight?-1:l.weight<s.weight?1:s.index-l.index).map(l=>l.resolver)}getResolvers(b){return this.resolvers.has(b)||this.resolvers.set(b,this.calculateSchemeResolver(b)),this.resolvers.get(b)}getEditorComponent(b){return this.components.get(b)||null}getEditorInitialProps(b){return this.initialPropsMap.get(b)||null}clearPerWorkbenchComponentCache(b){c.default.unmountComponentAtNode(this.perWorkbenchComponents[b]),delete this.perWorkbenchComponents[b]}getSideWidgets(b,I){const r=[];return this.sideWidgets[b].forEach(l=>{l.displaysOnResource(I)&&r.push(l)}),r.sort((l,s)=>{const d=l.weight===void 0?10:l.weight;return(s.weight===void 0?10:s.weight)-d})}registerEditorSideWidget(b){const I=b.side||"bottom";return this.sideWidgets[I].add(b),this.eventBus.fire(new G.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[I].delete(b)}}}};n.__decorate([(0,g.Autowired)(u.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),p=n.__decorate([(0,g.Injectable)()],p),e.EditorComponentRegistryImpl=p},84677:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoEditorDecorationApplier=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(76003),c=t(43718),g=t(52416),u=t(82196);let G=class extends c.Disposable{constructor(l){super(),this.editor=l,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()}),this.editor.onDidDispose(()=>{this.dispose()}),this.addDispose(this.eventBus.on(u.EditorDecorationChangeEvent,s=>{const d=this.getEditorUri();d&&s.payload.uri.isEqual(d)&&this.applyDecorationFromProvider(s.payload.key)})),this.addDispose(this.eventBus.on(u.EditorDecorationTypeRemovedEvent,s=>{this.deltaDecoration(s.payload,[])}))}getEditorUri(){return this.editor.getModel()?new c.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(l){if(this.editor.getModel()){const s=new c.URI(this.editor.getModel().uri.toString()),d=await this.decorationService.getDecorationFromProvider(s,l);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==s.toString())return;for(const m of Object.keys(d))this.deltaDecoration(m,d[m]);this.eventBus.fire(new u.DidApplyEditorDecorationFromProvider({key:l,uri:s}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(l=>{l.dispose(),this.editor.deltaDecorations(l.decorations,[])}),this.decorations.clear()}deltaDecoration(l,s){let d=[];if(this.decorations.has(l)&&(d=this.decorations.get(l).decorations,this.decorations.get(l).dispose(),this.decorations.delete(l)),d.length===0&&s.length===0)return;const m=this.editor.deltaDecorations(d,s);this.decorations.set(l,{decorations:m,dispose:()=>null})}applyDecoration(l,s){const d=this.decorations.get(l);d&&d.dispose();const m=d?d.decorations:[],v=[],f=new c.Disposable;if(m.length===0&&s.length===0)return;s.forEach(W=>{const Z=this.resolveDecorationRenderer(l,W.renderOptions);v.push({range:W.range,options:Object.assign(Object.assign({},Z.options),{hoverMessage:b(W.hoverMessage)})}),f.addDispose(Z)});const N=this.editor.deltaDecorations(m,v);this.decorations.set(l,{decorations:N,dispose:()=>f.dispose()})}resolveDecorationRenderer(l,s){const d=this.decorationService.getTextEditorDecorationType(l),m={description:l},v=this.themeService.getCurrentThemeSync().type,f=new c.Disposable;if(d){const N=d.property;p(m,N,v)}if(s){const N=this.decorationService.createTextEditorDecorationType(s);p(m,N.property,v),f.addDispose(N)}return{options:m,dispose:()=>f.dispose()}}};n.__decorate([(0,o.Autowired)(u.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],G.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(g.IThemeService),n.__metadata("design:type",Object)],G.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],G.prototype,"eventBus",void 0),G=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],G),e.MonacoEditorDecorationApplier=G;function p(r,l,s){l.overviewRulerLane&&(r.overviewRuler?r.overviewRuler.position=l.overviewRulerLane:r.overviewRuler={color:null,position:l.overviewRulerLane}),l.default&&h(r,l.default),s==="dark"&&l.dark&&h(r,l.dark),s==="light"&&l.light&&h(r,l.light),l.isWholeLine!==void 0&&(r.isWholeLine=l.isWholeLine),l.rangeBehavior&&(r.stickiness=l.rangeBehavior),r.inlineClassNameAffectsLetterSpacing=!0}function h(r,l){l.className&&(r.className=(0,a.default)(r.className,l.className)),l.inlineClassName&&(r.inlineClassName=(0,a.default)(r.inlineClassName,l.inlineClassName)),l.afterContentClassName&&(r.afterContentClassName=(0,a.default)(r.afterContentClassName,l.afterContentClassName)),l.beforeContentClassName&&(r.beforeContentClassName=(0,a.default)(r.beforeContentClassName,l.beforeContentClassName)),l.glyphMarginClassName&&(r.glyphMarginClassName=(0,a.default)(r.glyphMarginClassName,l.glyphMarginClassName)),l.overviewRulerColor&&r.overviewRuler&&(r.overviewRuler.color=l.overviewRulerColor)}function b(r){if(r)return r instanceof Array?r.map(I):I(r)}function I(r){return typeof r=="string"?{value:r,isTrusted:!0}:r}},84158:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompareEditorContribution=e.CompareService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(82196);let u=class{constructor(){this.comparing=new Map}compare(h,b,I){const r=o.URI.from({scheme:g.DIFF_SCHEME,query:o.URI.stringifyQuery({name:I,original:h,modified:b,comparing:!0})});if(!this.comparing.has(r.toString())){const l=new o.Deferred;this.comparing.set(r.toString(),l),l.promise.then(()=>{this.comparing.delete(r.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,r)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,r),this.comparing.get(r.toString()).promise}};n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],u.prototype,"commandService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.CompareService=u;let G=class{registerMenus(h){h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(h){h.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:b=>{b&&this.compareService.comparing.has(b.toString())&&this.compareService.comparing.get(b.toString()).resolve(g.CompareResult.accept)}}),h.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:b=>{b&&this.compareService.comparing.has(b.toString())&&this.compareService.comparing.get(b.toString()).resolve(g.CompareResult.revert)}}),h.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const b=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!b)}})}};n.__decorate([(0,a.Autowired)(g.ICompareService),n.__metadata("design:type",u)],G.prototype,"compareService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],G.prototype,"preferenceService",void 0),G=n.__decorate([(0,o.Domain)(c.MenuContribution,o.CommandContribution)],G),e.CompareEditorContribution=G},57581:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDiffEditorContribution=e.DiffResourceProvider=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(26542),g=t(14951),u=t(23418),G=t(82196);let p=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=u.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(I){I.payload.uri&&this.modifiedToResource.has(I.payload.uri.toString())&&this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(I.payload.uri.toString()),decoration:I.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const I=await this.fileServiceClient.getCurrentUserHome();I&&(this.userhomePath=new o.URI(I.uri))}catch{}return this.userhomePath}async getReadableTooltip(I){const r=I.toString(),l=await this.getCurrentUserHome();if(!l)return decodeURIComponent(I.withScheme("").toString());if(l.isEqualOrParent(I)){const s=l&&l.toString();return decodeURIComponent(r.replace(s,"~"))}return decodeURIComponent(I.withScheme("").toString())}async provideResource(I){const{original:r,modified:l,name:s}=I.getParsedQuery(),d=new o.URI(r),m=new o.URI(l);return this.modifiedToResource.set(m.toString(),I),Promise.all([this.labelService.getIcon(d),this.getReadableTooltip(m)]).then(([v,f])=>{var N;return{name:s,icon:v,uri:I,supportsRevive:(N=this.appConfig.enableDiffRevive)!==null&&N!==void 0?N:!0,metadata:{original:d,modified:m},title:f}})}async shouldCloseResource(I,r){const{modified:l}=I.uri.getParsedQuery(),s=new o.URI(l),d=await this.resourceService.getResource(s);return d?await this.resourceService.shouldCloseResource(d,r):!0}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",c.LabelService)],p.prototype,"labelService",void 0),n.__decorate([(0,a.Autowired)(u.ResourceService),n.__metadata("design:type",u.ResourceService)],p.prototype,"resourceService",void 0),n.__decorate([(0,a.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(u.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationChangeEvent",null),p=n.__decorate([(0,a.Injectable)()],p),e.DiffResourceProvider=p;let h=class{registerResource(I){I.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(I){I.registerEditorComponentResolver(u.DIFF_SCHEME,(r,l)=>{l.push({type:G.EditorOpenType.diff})})}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",p)],h.prototype,"diffResourceProvider",void 0),h=n.__decorate([(0,o.Domain)(G.BrowserEditorContribution)],h),e.DefaultDiffEditorContribution=h},21690:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyDocCacheImpl=void 0;const n=t(85608),a=t(76003);let o=class{hasCache(g){return!1}isFlushed(){return!0}getCache(g){return null}persistCache(g,u){}};o=n.__decorate([(0,a.Injectable)()],o),e.EmptyDocCacheImpl=o},80487:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(21690),e),n.__exportStar(t(7220),e)},7220:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorageDocCacheImpl=void 0;const n=t(85608),a=t(76003),o=t(51500),c=t(93107);let g=class{hasCache(G){return!0}isFlushed(){return!0}async getCache(G){const p=this.parseKeyFrom(G);return await this.storageService.getData(p)||null}persistCache(G,p){const h=this.parseKeyFrom(G),b=this.parseCacheFrom(G,p);this.storageService.setData(h,b)}parseCacheFrom(G,p){if(!(!p.dirty||!p.changeMatrix.length))return{path:G.path.toString(),startMD5:p.startMD5,changeMatrix:p.changeMatrix.map(h=>h.map(b=>(0,c.parseCacheValueFrom)(b)))}}parseKeyFrom(G){return`LocalStorageDocCacheImpl_${G.toString()}`}};n.__decorate([(0,a.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],g.prototype,"storageService",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.LocalStorageDocCacheImpl=g},86942:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentError=void 0;var t;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(t=e.EditorDocumentError||(e.EditorDocumentError={}))},9519:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelServiceImpl=e.EDITOR_DOC_OPTIONS_PREF_KEY=e.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96405),g=t(14951),u=t(91249),G=t(96689);e.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),e.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let p=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(b=>(this._modelsToDispose.has(b)&&this._modelsToDispose.delete(b),this.getOrCreateModel(b))),this._modelReferenceManager.onReferenceAllDisposed(b=>{this._delete(b)}),this._modelReferenceManager.onInstanceCreated(b=>{this.modelCreationEventDispatcher.dispatch(b.uri.toString()),this.eventBus.fire(new G.EditorDocumentModelCreationEvent({uri:b.uri,languageId:b.languageId,eol:b.eol,encoding:b.encoding,content:b.getText(),readonly:b.readonly,versionId:b.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(b=>{b.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(I=>{I.updateOptions({})})}))}onDocumentModelCreated(b,I){return this.modelCreationEventDispatcher.on(b)(I)}_delete(b){const I=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(b.toString());let r=null;const l=this.addDispose({dispose:()=>{r&&clearTimeout(r)}});r=window.setTimeout(()=>{l.dispose(),r=null,this._modelsToDispose.has(b.toString())&&this._doDelete(b.toString())},I)}_doDelete(b){const I=this.editorDocModels.get(b);if(I&&(!I.dirty||I.disposeEvenDirty))return I.dispose(),this.editorDocModels.delete(b),I;this._modelsToDispose.delete(b)}async changeModelOptions(b,I){return this.onceReady(()=>{this.preferredModelOptions.has(b.toString())&&(I=Object.assign(Object.assign({},this.preferredModelOptions.get(b.toString())),I)),this.preferredModelOptions.set(b.toString(),I);const r=this.getModelReference(b);return r&&(I.encoding&&I.encoding!==r.instance.encoding&&r.instance.updateEncoding(I.encoding),I.languageId&&I.languageId!==r.instance.languageId&&(r.instance.languageId=I.languageId),I.eol&&I.eol!==r.instance.eol&&(r.instance.eol=I.eol),r.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(e.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(e.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(b){this.logger.error(b)}this._ready.ready()}async acceptExternalChange(b){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const I=this.editorDocModels.get(b.payload.toString());if(I&&!I.dirty){const r=await this.contentRegistry.getProvider(I.uri);if(r)if(r.provideEditorDocumentModelContentMd5)await r.provideEditorDocumentModelContentMd5(I.uri,I.encoding)!==I.getBaseContentMd5()&&I.updateContent(await this.contentRegistry.getContentForUri(I.uri,I.encoding),void 0,!0);else{const l=await this.contentRegistry.getContentForUri(I.uri,I.encoding);this.hashCalculateService.calculate(l)!==I.getBaseContentMd5()&&I.updateContent(l,void 0,!0)}}}createModelReference(b,I){return this._modelReferenceManager.getReference(b.toString(),I)}getModelReference(b,I){return this._modelReferenceManager.getReferenceIfHasInstance(b.toString(),I)}getModelDescription(b,I){const r=this.getModelReference(b,I);if(!r)return null;const l=r.instance,s={alwaysDirty:l.alwaysDirty,closeAutoSave:l.closeAutoSave,disposeEvenDirty:l.disposeEvenDirty,eol:l.eol,encoding:l.encoding,dirty:l.dirty,languageId:l.languageId,readonly:l.readonly,uri:l.uri,id:l.id,savable:l.savable};return r.dispose(),s}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(b){return this.getAllModels().findIndex(I=>I.languageId===b)!==-1}async getOrCreateModel(b,I){return this.editorDocModels.has(b)?this.editorDocModels.get(b):this.createModel(b,I)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(b,I){if(!this.creatingEditorModels.has(b)){const r=this.doCreateModel(b,I).then(l=>(this.creatingEditorModels.delete(b),l),l=>{throw this.creatingEditorModels.delete(b),l});this.creatingEditorModels.set(b,r)}return this.creatingEditorModels.get(b)}async doCreateModel(b,I){const r=new o.URI(b);let l=await this.contentRegistry.getProvider(r);if(l||await this.fileSystem.shouldWaitProvider(r.scheme)&&(l=await this.contentRegistry.getProvider(r)),!l)throw new Error(`No document provider found for ${r.toString()}`);const[s,d,m,v,f,N,W]=await Promise.all([l.provideEditorDocumentModelContent(r,I),l.isReadonly?l.isReadonly(r):void 0,l.preferLanguageForUri?l.preferLanguageForUri(r):void 0,l.provideEOL?l.provideEOL(r):void 0,l.isAlwaysDirty?l.isAlwaysDirty(r):!1,l.closeAutoSave?l.closeAutoSave(r):!1,l.disposeEvenDirty?l.disposeEvenDirty(r):!1]);!I&&l.provideEncoding&&(I=await l.provideEncoding(r));const Z=!!l.saveDocumentModel,y=this.injector.get(u.EditorDocumentModel,[r,s,{readonly:d,languageId:m,savable:Z,eol:v,encoding:I,alwaysDirty:f,closeAutoSave:N,disposeEvenDirty:W}]);return this.onceReady(()=>{if(this.preferredModelOptions.has(r.toString())){const E=this.preferredModelOptions.get(r.toString());E?.encoding&&y.updateEncoding(E.encoding),E?.eol&&(y.eol=E.eol),E?.languageId&&(y.languageId=E.languageId)}}),this.editorDocModels.set(r.toString(),y),y}async saveEditorDocumentModel(b,I,r,l,s,d,m){const v=await this.contentRegistry.getProvider(b);if(!v)throw new Error(`No document provider found for ${b.toString()}`);if(!v.saveDocumentModel)throw new Error(`The document provider of ${b.toString()} does not have a save method`);return await v.saveDocumentModel(b,I,r,l,s,d,m)}dispose(){super.dispose(),this.getAllModels().forEach(b=>{b.getMonacoModel().dispose()})}};n.__decorate([(0,a.Autowired)(G.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],p.prototype,"contentRegistry",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(c.IHashCalculateService),n.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),n.__decorate([(0,a.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],p.prototype,"initialize",null),n.__decorate([(0,o.OnEvent)(G.EditorDocumentModelOptionExternalUpdatedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[G.EditorDocumentModelOptionExternalUpdatedEvent]),n.__metadata("design:returntype",Promise)],p.prototype,"acceptExternalChange",null),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.EditorDocumentModelServiceImpl=p},91249:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModel=void 0;const a=t(85608),o=a.__importDefault(t(12784)),c=t(76003),g=t(41869),u=t(96405),G=t(52902),p=t(68475),h=t(72665),b=t(2261),I=t(44781),r=t(43255),l=t(88104),s=t(23418),d=t(55113),m=t(90915),v=t(82196),f=t(86942),N=t(98469),W=t(96689);let Z=n=class extends g.Disposable{constructor(E,R,A={}){super(),this.uri=E,this.saveQueue=new g.Throttler,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this._onDidChangeEncoding=new g.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose(()=>{this.eventBus.fire(new W.EditorDocumentModelRemovalEvent(this.uri))}),A.encoding&&(this._encoding=A.encoding),this.readonly=!!A.readonly,this.savable=!!A.savable,this.alwaysDirty=!!A.alwaysDirty,this.disposeEvenDirty=!!A.disposeEvenDirty,this.closeAutoSave=!!A.closeAutoSave,this.monacoModel=G.monaco.editor.createModel(R,A.languageId,G.URI.parse(E.toString())),this.editorPreferences=(0,m.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId),this.updateOptions({}),A.eol&&(this.eol=A.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=R,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding),this.addDispose(this.monacoModel.onDidChangeLanguage(w=>{this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:w.newLanguage}))}))}updateOptions(E){const R=Object.assign({tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"]},E);R.detectIndentation?this.monacoModel.detectIndentation(R.insertSpaces,R.tabSize):this.monacoModel.updateOptions(R)}listenTo(E){this.addDispose(E.onDidChangeContent(R=>{R.changes&&R.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:R.versionId,changes:R.changes}),this._previousVersionId=R.versionId,this.notifyChangeEvent(R.changes,R.isRedoing,R.isUndoing)})),this.addDispose(E)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const E=this.cacheProvider.getCache(this.uri,this.encoding);E&&((0,g.isThenable)(E)?E.then(R=>{R&&this.applyCache(R)}).catch(R=>{this.logger.error(`${f.EditorDocumentError.READ_CACHE_ERROR} ${R&&R.message}`)}):this.applyCache(E))}applyCache(E){if(this.dirty){this.logger.error(f.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);return}if(this.baseContentMd5!==E.startMD5){this.logger.error(f.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT);return}if((0,s.isDocContentCache)(E))this.monacoModel.setValue(E.content);else for(const R of E.changeMatrix){const A=R.map(w=>({range:(0,s.parseRangeFrom)(w),text:w[0]}));this.monacoModel.applyEdits(A)}}cleanAndUpdateContent(E){this.monacoModel.setValue(E),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=E}async updateEncoding(E){let R=!1;this._encoding!==E&&(R=!0),this._encoding=E,await this.reload(),R&&(this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(E){this.monacoModel.setEOL(E===`
|
|
28062
|
+
`))}}})}registerMenus(l){l.registerMenuItem(c.MenuId.DebugCallStackContext,{command:{id:g.DEBUG_COMMANDS.RESTART_FRAME.id,label:(0,o.localize)("debugger.menu.restartFrame")},when:`${u.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame")} && ${u.CONTEXT_RESTART_FRAME_SUPPORTED.raw}`,enabledWhen:u.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.raw,order:10}),l.registerMenuItem(c.MenuId.DebugCallStackContext,{command:{id:g.DEBUG_COMMANDS.COPY_STACK_TRACE.id,label:(0,o.localize)("debugger.menu.copyCallstack")},when:u.CONTEXT_CALLSTACK_ITEM_TYPE.equalsTo("stackFrame"),order:20})}};n.__decorate([(0,a.Autowired)(G.IDebugSessionManager),n.__metadata("design:type",p.DebugSessionManager)],I.prototype,"debugSessionManager",void 0),n.__decorate([(0,a.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],I.prototype,"clipboardService",void 0),I=n.__decorate([(0,o.Domain)(c.MenuContribution,o.CommandContribution)],I),e.DebugCallStackContribution=I},61520:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStackOperationView=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(66498),g=t(96090),u=n.__importDefault(t(12920)),G=p=>{const{session:h,thread:b}=p,{doStop:I,doStepIn:r,doStepOut:l,doStepOver:s,doContinue:d,doRestart:m,doPause:v,updateCurrentSession:f}=(0,o.useInjectable)(g.DebugToolbarService);if(h&&!b){const N=W=>{f(h),W()};return a.default.createElement("div",{className:u.default.debug_stack_session_operations},a.default.createElement(c.DebugAction,{run:()=>N(m),icon:"reload",label:(0,o.localize)("debug.action.restart")}),a.default.createElement(c.DebugAction,{run:()=>N(I),icon:"stop",label:(0,o.localize)("debug.action.stop")}))}if(!h&&b){const{stopped:N}=b,W=y=>{b.session.currentThread=b,y()},Z=y=>y?a.default.createElement(c.DebugAction,{run:()=>W(d),icon:"continue",label:(0,o.localize)("debug.action.continue")}):a.default.createElement(c.DebugAction,{run:()=>W(v),enabled:!0,icon:"pause",label:(0,o.localize)("debug.action.pause")});return a.default.createElement("div",{className:u.default.debug_stack_thread_operations},Z(N),a.default.createElement(c.DebugAction,{run:()=>W(s),enabled:N,icon:"step",label:(0,o.localize)("debug.action.step-over")}),a.default.createElement(c.DebugAction,{run:()=>W(r),enabled:N,icon:"step-in",label:(0,o.localize)("debug.action.step-into")}),a.default.createElement(c.DebugAction,{run:()=>W(l),enabled:N,icon:"step-out",label:(0,o.localize)("debug.action.step-out")}))}return null};e.DebugStackOperationView=G},85294:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackService=void 0;const n=t(85608),a=t(76003),o=t(93899),c=t(50755),g=t(4983),u=t(17280),G=t(29539);let p=class{constructor(){this.handleContextMenu=(b,I)=>{this.stackFrameSupportsRestart.reset(),b.stopPropagation(),b.preventDefault(),I instanceof G.DebugSession?this.callStackItemType.set("session"):I instanceof c.DebugThread?this.callStackItemType.set("thread"):I instanceof c.DebugStackFrame?(this.callStackItemType.set("stackFrame"),this.stackFrameSupportsRestart.set(I.canRestart)):this.callStackItemType.reset();const{x:r,y:l}=b.nativeEvent,s=this.contextMenuService.createMenu({id:o.MenuId.DebugCallStackContext,contextKeyService:this.debugContextKey.contextKeyScoped}),d=s.getMergedMenuNodes();s.dispose();const m=()=>{var f;return I instanceof c.DebugStackFrame?!((f=I.source)===null||f===void 0)&&f.inMemory?I.source.raw.path||I.source.reference||I.source.name:I.source?I.source.uri.toString():"":I instanceof c.DebugThread||I instanceof G.DebugSession?I.id:""},v=()=>I instanceof c.DebugStackFrame?{sessionId:I.session.id,threadId:I.thread.id,frameId:I.id}:I instanceof c.DebugThread?{sessionId:I.session.id,threadId:I.id}:I instanceof G.DebugSession?{sessionId:I.id}:void 0;this.ctxMenuRenderer.show({anchor:{x:r,y:l},menuNodes:d,args:[m(),v()],contextKeyService:this.debugContextKey.contextKeyScoped})},this.stackFrameSupportsRestart||(this.stackFrameSupportsRestart=g.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.bind(this.debugContextKey.contextKeyScoped)),this.callStackItemType||(this.callStackItemType=g.CONTEXT_CALLSTACK_ITEM_TYPE.bind(this.debugContextKey.contextKeyScoped))}};n.__decorate([(0,a.Autowired)(o.AbstractContextMenuService),n.__metadata("design:type",o.AbstractContextMenuService)],p.prototype,"contextMenuService",void 0),n.__decorate([(0,a.Autowired)(o.ICtxMenuRenderer),n.__metadata("design:type",o.ICtxMenuRenderer)],p.prototype,"ctxMenuRenderer",void 0),n.__decorate([(0,a.Autowired)(u.DebugContextKey),n.__metadata("design:type",u.DebugContextKey)],p.prototype,"debugContextKey",void 0),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.DebugCallStackService=p},18028:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCallStackView=void 0;const n=t(85608),a=t(25150),o=n.__importDefault(t(14041)),c=t(41869),g=t(64582),u=t(75651),G=n.__importDefault(t(12920));e.DebugCallStackView=(0,a.observer)(({viewState:p})=>{const h=(0,c.useInjectable)(g.IDebugSessionManager),[b,I]=o.default.useState([]);return o.default.useEffect(()=>{const r=h.onDidStartDebugSession(s=>{b.push(s),I([...b])}),l=h.onDidDestroyDebugSession(s=>{const d=b.findIndex(m=>m.id===s.id);b.splice(d,1),I([...b])});return()=>{r.dispose(),l.dispose()}},[]),o.default.createElement("div",{className:G.default.call_stack_wrapper},b.filter(r=>!r.parentSession).map(r=>o.default.createElement(u.DebugStackSessionView,{key:r.id,viewState:p,session:r,indent:0})))})},59334:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(98650);let G=n=class extends c.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};G.DEFAULT_FLUSH_DELAY=100,G=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.ExpressionContainer])],G),e.DebugVariablesModel=G},30865:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugVariablesModelService=void 0;const a=t(85608),o=a.__importDefault(t(46343)),c=t(76003),g=t(97267),u=t(41869),G=t(93899),p=t(98650),h=t(32756),b=t(17280),I=t(59334),r=a.__importDefault(t(57259));class l{constructor(){this._keepExpandedScopesMap=new Map}getMirrorScope(m){return Array.from(this._keepExpandedScopesMap.keys()).find(v=>(0,o.default)(v,m.getRawScope()))}set(m){const v=m.getRawScope();if(v){const f=this.getMirrorScope(m);if(f){const N=this._keepExpandedScopesMap.get(f);let W;m.expanded?W=Array.from(new Set([...N,m.variablesReference])):W=N.filter(Z=>Z!==m.variablesReference),this._keepExpandedScopesMap.set(f,W)}else this._keepExpandedScopesMap.set(v,m.expanded?[m.variablesReference]:[])}}get(m){const v=this.getMirrorScope(m);return v?this._keepExpandedScopesMap.get(v)||[]:[]}clear(){this._keepExpandedScopesMap.clear()}}let s=n=class{constructor(){this.selectedDecoration=new g.Decoration(r.default.mod_selected),this.focusedDecoration=new g.Decoration(r.default.mod_focused),this.contextMenuDecoration=new g.Decoration(r.default.mod_actived),this.loadingDecoration=new g.Decoration(r.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new u.Emitter,this.onDidUpdateTreeModelEmitter=new u.Emitter,this.flushDispatchChangeDelayer=new u.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new u.DisposableCollection,this.keepExpandedScopesModel=new l,this.activeNodeDecoration=(m,v=!0)=>{var f;if(this.contextMenuNode&&(this.contextMenuDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),m){if(this.selectedNodes.length>0)for(const N of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(N);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(m),this.focusedDecoration.addTarget(m),this._focusedNode=m,this._selectedNodes=[m],v&&((f=this.treeModel)===null||f===void 0||f.dispatchChange())}},this.activeNodeActivedDecoration=m=>{var v;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(m),this._contextMenuNode=m,(v=this.treeModel)===null||v===void 0||v.dispatchChange()},this.enactiveNodeDecoration=()=>{var m;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(m=this.treeModel)===null||m===void 0||m.dispatchChange()},this.handleContextMenu=(m,v)=>{var f;if(m.stopPropagation(),m.preventDefault(),!v||v instanceof p.DebugScope){this.enactiveNodeDecoration(),this.debugContextKey.contextVariableEvaluateNamePresent.set(!1);return}this._currentVariableInternalContext=v;const{x:N,y:W}=m.nativeEvent;v&&(this.activeNodeActivedDecoration(v),this.debugContextKey.contextDebugProtocolVariableMenu.set(v.variableMenuContext),this.debugContextKey.contextVariableEvaluateNamePresent.set(!!v.evaluateName)),!((f=v.session)===null||f===void 0)&&f.capabilities.supportsReadMemoryRequest&&v.memoryReference!==void 0?this.debugContextKey.contextCanViewMemory.set(!0):this.debugContextKey.contextCanViewMemory.set(!1);const Z=this.contextMenuService.createMenu({id:G.MenuId.DebugVariablesContext,contextKeyService:this.debugContextKey.contextKeyScoped}),y=Z.getMergedMenuNodes();Z.dispose(),this.ctxMenuRenderer.show({anchor:{x:N,y:W},menuNodes:y,args:[v.toDebugProtocolObject()]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=m=>{this.activeNodeDecoration(m)},this.handleTwistierClick=(m,v)=>{v===g.TreeNodeType.CompositeTreeNode?(this.activeNodeDecoration(m,!1),this.toggleDirectory(m)):this.activeNodeDecoration(m)},this.toggleDirectory=async m=>{m.expanded?m.setCollapsed():await m.setExpanded(!0),this.keepExpandedScopesModel.set(m)},this.listenViewModelChange()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get treeHandle(){return this._debugVariablesTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get currentVariableInternalContext(){return this._currentVariableInternalContext}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}listenViewModelChange(){this.viewModel.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{var m,v;if(this.viewModel&&this.viewModel.currentSession&&!this.viewModel.currentSession.terminated){const f=await this.initTreeModel(this.viewModel.currentSession);this._activeTreeModel=f,await((m=this._activeTreeModel)===null||m===void 0?void 0:m.ensureReady);const N=((v=this._activeTreeModel)===null||v===void 0?void 0:v.root.children)||[];if(N.length>0&&N.every(Z=>!Z.expanded))for(const Z of N)Z.getRawScope().expensive===!1&&!Z.expanded&&await this.toggleDirectory(Z);const W=async Z=>{for(const y of Z)this.keepExpandedScopesModel.get(y).includes(y.variablesReference)&&(await y.setExpanded(!0),Array.isArray(y.children)&&await W(y.children))};N.forEach(async Z=>{Array.isArray(Z.children)&&await W(Z.children)})}else this._activeTreeModel=void 0,this.keepExpandedScopesModel.clear();this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)})})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(g.TreeNodeEvent.WillResolveChildren,m=>{this.loadingDecoration.addTarget(m)})),this.disposableCollection.push(this.treeModel.root.watcher.on(g.TreeNodeEvent.DidResolveChildren,m=>{this.loadingDecoration.removeTarget(m)})))}async initTreeModel(m){const v=new p.DebugVariableRoot(m);if(v)return this._activeTreeModel=this.injector.get(I.DebugVariablesModel,[v]),this.initDecorations(v),this.listenTreeViewChange(),this._activeTreeModel}initDecorations(m){this._decorations=new g.DecorationsManager(m),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.loadingDecoration),this.decorations.removeDecoration(this.contextMenuDecoration))}handleTreeHandler(m){this._debugVariablesTreeHandle=Object.assign(Object.assign({},m),{getModel:()=>this.treeModel})}async copyEvaluateName(m){m&&await this.clipboardService.writeText(m.evaluateName)}async copyValue(m){if(!m)return;const f=await(async()=>{if(m.session&&m.session.capabilities.supportsValueFormattingOptions)try{const{variable:{evaluateName:N}}=m;if(N){const W=await m.session.evaluate(N,"clipboard");if(W)return W.result}return""}catch{return""}else return m.value})();f&&await this.clipboardService.writeText(f)}};s.DEFAULT_TRIGGER_DELAY=200,a.__decorate([(0,c.Autowired)(c.INJECTOR_TOKEN),a.__metadata("design:type",c.Injector)],s.prototype,"injector",void 0),a.__decorate([(0,c.Autowired)(G.ICtxMenuRenderer),a.__metadata("design:type",G.ICtxMenuRenderer)],s.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,c.Autowired)(G.AbstractContextMenuService),a.__metadata("design:type",G.AbstractContextMenuService)],s.prototype,"contextMenuService",void 0),a.__decorate([(0,c.Autowired)(h.DebugViewModel),a.__metadata("design:type",h.DebugViewModel)],s.prototype,"viewModel",void 0),a.__decorate([(0,c.Autowired)(u.IClipboardService),a.__metadata("design:type",Object)],s.prototype,"clipboardService",void 0),a.__decorate([(0,c.Autowired)(b.DebugContextKey),a.__metadata("design:type",b.DebugContextKey)],s.prototype,"debugContextKey",void 0),s=n=a.__decorate([(0,c.Injectable)(),a.__metadata("design:paramtypes",[])],s),e.DebugVariablesModelService=s},86752:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariablesPanelContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(43718),u=t(57517),G=t(14951),p=t(2156),h=t(72665),b=t(94170),I=t(87423),r=t(64582),l=t(61752),s=t(32756),d=t(4983),m=t(95033),v=t(30865);let f=class{registerCommands(W){W.registerCommand(r.DEBUG_COMMANDS.SET_VARIABLE_VALUE,{execute:async()=>{var E;this.reporterService.point(r.DEBUG_REPORT_NAME===null||r.DEBUG_REPORT_NAME===void 0?void 0:r.DEBUG_REPORT_NAME.DEBUG_VARIABLES,r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id);const{currentVariableInternalContext:R}=this.debugVariablesModelService;if(!R)return;const A=await this.quickInputService.open({placeHolder:(0,o.localize)("debugger.menu.setValue.param"),value:R.description.replace(/^\"(.*)\"$/,"$1")});if(A!=null){try{await R.setValue(A)}catch(w){this.messageService.error(w.message)}(E=this.debugVariablesModelService.treeModel)===null||E===void 0||E.dispatchChange()}}}),W.registerCommand(r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE,{execute:async()=>{const{currentVariableInternalContext:E}=this.debugVariablesModelService;this.debugVariablesModelService.copyValue(E)}}),W.registerCommand(r.DEBUG_COMMANDS.COPY_EVALUATE_PATH,{execute:async()=>{const{currentVariableInternalContext:E}=this.debugVariablesModelService;this.debugVariablesModelService.copyEvaluateName(E)}}),W.registerCommand(r.DEBUG_COMMANDS.ADD_TO_WATCH_ID,{execute:async E=>{const{currentVariableInternalContext:R}=this.debugVariablesModelService;if(E instanceof g.URI){const A=this.workbenchEditorService.currentEditor;if(!A?.monacoEditor||!A?.monacoEditor.hasModel())return;const w=A.monacoEditor,F=w.getModel().getValueInRange(w.getSelection());this.debugWatchModelService.addWatchExpression(F);return}else R&&this.debugWatchModelService.addWatchExpression(R.evaluateName)}});const Z="ms-vscode.hexeditor",y=`${g.CUSTOM_EDITOR_SCHEME}-hexEditor.hexedit`;W.registerCommand(r.DEBUG_COMMANDS.VIEW_MEMORY_ID,{execute:async E=>{var R;const A=await this.commandService.executeCommand("extension.getDescription",Z);if(A&&A.enabled){const w=(R=this.viewModel.currentSession)===null||R===void 0?void 0:R.id,F=E.memoryReference;this.workbenchEditorService.open(g.URI.from({scheme:d.DEBUG_MEMORY_SCHEME,authority:w,path:"/"+encodeURIComponent(F||"")+"/memory.bin"}),{disableNavigate:!0,preview:!0,forceOpenType:{type:u.EditorOpenType.component,componentId:y}})}else this.messageService.warning((0,o.localize)("debug.variables.view.memory.prompt.hexEditor.notInstalled"))}})}async initialize(){this.fileSystem.registerProvider(d.DEBUG_MEMORY_SCHEME,this.debugMemoryFileSystemProvider)}registerResource(W){W.registerResourceProvider({scheme:d.DEBUG_MEMORY_SCHEME,provideResource:async Z=>({uri:Z,icon:(0,o.getIcon)("hex"),name:Z.displayName})})}registerMenus(W){var Z;W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.SET_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.setValue")},order:10,when:d.CONTEXT_SET_VARIABLE_SUPPORTED.raw,group:"3_modification"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_VARIABLE_VALUE.id,label:(0,o.localize)("debugger.menu.copyValue")},order:10,group:"5_cutcopypaste"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.COPY_EVALUATE_PATH.id,label:(0,o.localize)("debugger.menu.copyEvaluatePath")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:20,group:"5_cutcopypaste"}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:d.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.raw,order:100,group:"z_commands"}),W.registerMenuItem(c.MenuId.EditorContext,{command:{id:r.DEBUG_COMMANDS.ADD_TO_WATCH_ID.id,label:(0,o.localize)("debugger.menu.addToWatchExpressions")},when:(Z=I.ContextKeyExpr.and(b.EditorContextKeys.hasNonEmptySelection,b.EditorContextKeys.editorTextFocus))===null||Z===void 0?void 0:Z.keys().reduce((y,E)=>y+" && "+E,d.CONTEXT_IN_DEBUG_MODE.raw),group:"debug",order:1}),W.registerMenuItem(c.MenuId.DebugVariablesContext,{command:{id:r.DEBUG_COMMANDS.VIEW_MEMORY_ID.id,label:(0,o.localize)("debug.variables.view.memory")},iconClass:"",when:`${d.CONTEXT_CAN_VIEW_MEMORY.equalsTo(!0)} && ${d.CONTEXT_IN_DEBUG_MODE.equalsTo(!0)}`,type:"icon"})}};n.__decorate([(0,a.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],f.prototype,"quickInputService",void 0),n.__decorate([(0,a.Autowired)(v.DebugVariablesModelService),n.__metadata("design:type",v.DebugVariablesModelService)],f.prototype,"debugVariablesModelService",void 0),n.__decorate([(0,a.Autowired)(m.DebugWatchModelService),n.__metadata("design:type",m.DebugWatchModelService)],f.prototype,"debugWatchModelService",void 0),n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",u.WorkbenchEditorService)],f.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(h.IMessageService),n.__metadata("design:type",Object)],f.prototype,"messageService",void 0),n.__decorate([(0,a.Autowired)(o.IReporterService),n.__metadata("design:type",Object)],f.prototype,"reporterService",void 0),n.__decorate([(0,a.Autowired)(g.CommandService),n.__metadata("design:type",Object)],f.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(s.DebugViewModel),n.__metadata("design:type",s.DebugViewModel)],f.prototype,"viewModel",void 0),n.__decorate([(0,a.Autowired)(G.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],f.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(l.DebugMemoryFileSystemProvider),n.__metadata("design:type",l.DebugMemoryFileSystemProvider)],f.prototype,"debugMemoryFileSystemProvider",void 0),f=n.__decorate([(0,o.Domain)(o.ClientAppContribution,u.BrowserEditorContribution,c.MenuContribution,o.CommandContribution)],f),e.VariablesPanelContribution=f},28875:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=e.DebugVariableRenderedNode=e.DebugVariableView=e.DEBUG_VARIABLE_TREE_FIELD_NAME=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(41869),G=t(98650),p=t(30865),h=n.__importDefault(t(57259));e.DEBUG_VARIABLE_TREE_FIELD_NAME="DEBUG_VARIABLE_TREE_FIELD",e.DebugVariableView=(0,o.observer)(({viewState:I})=>{const{width:l,height:s}=I,d=c.default.useRef(null),[m,v]=c.default.useState(),f=(0,u.useInjectable)(p.DebugVariablesModelService);c.default.useEffect(()=>{const F=f.onDidUpdateTreeModel(async V=>{v(V)});return()=>{F.dispose(),f.removeNodeDecoration(),v(void 0)}},[]);const N=F=>{f.handleTreeHandler(Object.assign(Object.assign({},F),{hasDirectFocus:()=>d.current===document.activeElement}))},W=(F,V,Y)=>{F.stopPropagation();const{handleTwistierClick:_}=f;V&&_(V,Y)},Z=(F,V)=>{const{handleContextMenu:Y}=f;Y(F,V)},y=F=>{const{handleContextMenu:V}=f;V(F)},E=F=>{const{enactiveNodeDecoration:V}=f;V()},R=F=>{const{enactiveNodeDecoration:V}=f;V()},A=c.default.useCallback(F=>{const V=f.decorations.getDecorations(F.item);return c.default.createElement(e.DebugVariableRenderedNode,{item:F.item,itemType:F.itemType,decorations:V,onClick:W,onTwistierClick:W,onContextMenu:Z,defaultLeftPadding:0,leftPadding:8})},[m]),w=()=>m?c.default.createElement(g.RecycleTree,{height:s,width:l,itemHeight:22,onReady:N,model:m,placeholder:()=>c.default.createElement("span",null),overflow:"auto"},A):c.default.createElement("span",null);return c.default.createElement("div",{className:h.default.debug_variables_container,tabIndex:-1,ref:d,onContextMenu:y,onClick:E,onBlur:R,"data-name":e.DEBUG_VARIABLE_TREE_FIELD_NAME},w())});const b=({item:I,decorations:r,defaultLeftPadding:l,leftPadding:s,onClick:d,onTwistierClick:m,onContextMenu:v,itemType:f})=>{const N=(0,u.useDesignStyles)(h.default.expansion_toggle,"expansion_toggle"),W=_=>{d(_,I,g.CompositeTreeNode.is(I)?g.TreeNodeType.CompositeTreeNode:g.TreeNodeType.TreeNode)},Z=_=>{_.nativeEvent.which!==0&&(f===g.TreeNodeType.TreeNode||f===g.TreeNodeType.CompositeTreeNode)&&v&&v(_,I,f)},y=`${(l||8)+(I.depth||0)*(s||0)+(G.ExpressionContainer.is(I)?0:16)}px`,E={height:e.DEBUG_VARIABLE_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_VARIABLE_TREE_NODE_HEIGHT}px`,paddingLeft:y},R=_=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,h.default.debug_variables_node_displayname,h.default.debug_variables_variable,_.description?h.default.name:"")},_.displayName,_.description?":":""),A=_=>{const H=/^true|false$/i,X=/^(['"]).*\1$/,S=_.description?_.description.replace("function","\u0192 "):"",Q=[h.default.debug_variables_variable];return I.variableType==="number"||I.variableType==="boolean"||I.variableType==="string"?Q.push(h.default[I.variableType]):isNaN(+S)?H.test(S)?Q.push(h.default.boolean):X.test(S)&&Q.push(h.default.string):Q.push(h.default.number),c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment_grow,h.default.debug_variables_node_description,...Q)},S)},w=()=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,h.default.debug_variables_node_tail)},F()),F=()=>c.default.createElement("div",{className:h.default.debug_variables_node_status},I.badge),V=(_,H)=>{const X=S=>{H(S,_,f)};return r&&r?.classlist.indexOf(h.default.mod_loading)>-1?c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_segment,N)},c.default.createElement(g.Loading,null)):c.default.createElement("div",{onClick:X,className:(0,a.default)(h.default.debug_variables_node_segment,N,(0,u.getIcon)("right"),{[`${h.default.mod_collapsed}`]:!_.expanded})})},Y=_=>{if(g.CompositeTreeNode.is(_))return V(_,m)};return c.default.createElement("div",{key:I.id,onClick:W,onContextMenu:Z,title:I.description||"",className:(0,a.default)(h.default.debug_variables_node,r?r.classlist:null),style:E,"data-id":I.id},c.default.createElement("div",{className:(0,a.default)(h.default.debug_variables_node_content)},Y(I),c.default.createElement("div",{className:h.default.debug_variables_node_overflow_wrap},R(I),A(I)),w()))};e.DebugVariableRenderedNode=b,e.DEBUG_VARIABLE_TREE_NODE_HEIGHT=22},85454:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(98650);let G=n=class extends c.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};G.DEFAULT_FLUSH_DELAY=100,G=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.ExpressionContainer])],G),e.DebugWatchModel=G},95033:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.DebugWatchModelService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(93899),G=t(38029),p=t(50755),h=t(98650),b=t(32756),I=t(4983),r=t(26296),l=t(85454),s=a.__importDefault(t(21315)),{Path:d}=g.path;let m=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new c.Decoration(s.default.mod_selected),this.focusedDecoration=new c.Decoration(s.default.mod_focused),this.contextMenuDecoration=new c.Decoration(s.default.mod_actived),this.loadingDecoration=new c.Decoration(s.default.mod_loading),this._selectedNodes=[],this.onDidRefreshedEmitter=new g.Emitter,this.onDidUpdateTreeModelEmitter=new g.Emitter,this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_TRIGGER_DELAY),this.disposableCollection=new g.DisposableCollection,this.loadedDeferred=new g.Deferred,this.activeNodeDecoration=(f,N=!0)=>{var W;if(I.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService),this.contextMenuNode&&(this.focusedDecoration.removeTarget(this.contextMenuNode),this.selectedDecoration.removeTarget(this.contextMenuNode),this._contextMenuNode=void 0),f){if(this.selectedNodes.length>0)for(const Z of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(Z);this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(f),this.focusedDecoration.addTarget(f),this._focusedNode=f,this._selectedNodes=[f],N&&((W=this.treeModel)===null||W===void 0||W.dispatchChange())}},this.activeNodeActivedDecoration=f=>{var N;this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuDecoration.addTarget(f),this._contextMenuNode=f,(N=this.treeModel)===null||N===void 0||N.dispatchChange()},this.enactiveNodeDecoration=()=>{var f;I.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bind(this.contextKeyService).set(!1),this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),this._focusedNode=void 0),this.contextMenuNode&&this.contextMenuDecoration.removeTarget(this.contextMenuNode),(f=this.treeModel)===null||f===void 0||f.dispatchChange()},this.handleContextMenu=(f,N)=>{var W;f.stopPropagation(),f.preventDefault();const{x:Z,y}=f.nativeEvent;N?this.activeNodeActivedDecoration(N):this.enactiveNodeDecoration();let E;N?E=N:E=(W=this.treeModel)===null||W===void 0?void 0:W.root,this.watchItemType.set(E instanceof h.DebugWatchNode?"expression":E instanceof h.DebugVariable||E instanceof h.DebugVariableContainer?"variable":void 0);const R=this.contextMenuService.createMenu({id:u.MenuId.DebugWatchContext,contextKeyService:this.contextMenuContextKeyService}),A=R.getMergedMenuNodes();R.dispose(),this.ctxMenuRenderer.show({anchor:{x:Z,y},menuNodes:A,args:[E]})},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=f=>{this.activeNodeDecoration(f)},this.handleTwistierClick=(f,N)=>{if(N===c.TreeNodeType.CompositeTreeNode){if(h.DebugWatchNode.is(f)&&f.available){this.activeNodeDecoration(f,!1),this.toggleDirectory(f);return}else if(f.variablesReference){this.activeNodeDecoration(f,!1),this.toggleDirectory(f);return}}this.activeNodeDecoration(f)},this.toggleDirectory=async f=>{f.expanded?this.treeHandle.collapseNode(f):this.treeHandle.expandNode(f)},this.proxyPrompt=f=>{let N=!1;const W=async Z=>{if(!N){if(N=!0,Z){if(f instanceof c.NewPromptHandle){const y=f.parent;if(f.addAddonAfter("loading_indicator"),y.session)this.addWatchExpression(Z);else{const E=new h.DebugWatchNode(y.session,Z,y);this.dispatchWatchEvent(y.path,{type:c.WatchEvent.Added,node:E,id:y.id}),this.debugWatch.addWatchExpression(Z)}}else if(f instanceof c.RenamePromptHandle){const y=f.target,E=y.parent;if(f.addAddonAfter("loading_indicator"),E.session)this.debugWatch.renameWatchExpression(y.name,Z),this.initTreeModel();else{const R=new d(y.path).dir.join(Z).toString();this.dispatchWatchEvent(E.path,{type:c.WatchEvent.Moved,oldPath:y.path,newPath:R}),this.debugWatch.renameWatchExpression(y.name,Z)}}}return!0}};f.destroyed||(f.onCommit(W),f.onBlur(W))},this.flushEventQueue=()=>{let f;if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((W,Z)=>{const y=d.pathDepth(W),E=d.pathDepth(Z);return y-E});const N=[this._changeEventDispatchQueue[0]];for(const W of this._changeEventDispatchQueue)N.some(Z=>W.indexOf(Z)===0)||N.push(W);return f=(0,g.pSeries)(N.map(W=>async()=>{var Z,y;const E=(y=(Z=this.treeModel)===null||Z===void 0?void 0:Z.root)===null||y===void 0?void 0:y.watchEvents.get(W);return E&&typeof E.callback=="function"&&await E.callback({type:c.WatchEvent.Changed,path:W}),null})),this._changeEventDispatchQueue=[],f},this.debugWatch=new p.DebugWatch(this.manager,this.reporterService),this.init(),this.watchItemType=I.CONTEXT_WATCH_ITEM_TYPE.bind(this.contextKeyService)}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get treeHandle(){return this._debugWatchTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get contextMenuNode(){return this._contextMenuNode}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}dispose(){this.disposableCollection.disposed||this.disposableCollection.dispose()}async save(f=[]){await(await this.storageProvider(g.STORAGE_NAMESPACE.DEBUG)).set(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,f)}async load(){const N=await(await this.storageProvider(g.STORAGE_NAMESPACE.DEBUG)).get(n.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY,[]);await this.debugWatch.updateWatchExpressions(N),this.loadedDeferred.resolve()}async init(){await this.loadedDeferred.promise,this.initTreeModel(),this.listenDebugWatchChange()}listenDebugWatchChange(){this.debugWatch.onDidChange(async()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.initTreeModel()})}),this.debugWatch.onDidVariableChange(async()=>{this.refresh()}),this.debugWatch.onDidExpressionChange(f=>{this.save(f)})}listenTreeViewChange(){this.dispose(),this.treeModel&&(this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,f=>{this.loadingDecoration.addTarget(f)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,f=>{this.loadingDecoration.removeTarget(f)})))}async initTreeModel(){const f=await this.debugWatch.getRoot();if(f)return this._activeTreeModel=this.injector.get(l.DebugWatchModel,[f]),this.initDecorations(f),this.listenTreeViewChange(),this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel),this._activeTreeModel}initDecorations(f){this._decorations=new c.DecorationsManager(f),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.loadingDecoration)}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration),this.decorations.removeDecoration(this.contextMenuDecoration),this.decorations.removeDecoration(this.loadingDecoration))}handleTreeHandler(f){this._debugWatchTreeHandle=f}async newDebugWatchNodePrompt(){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptNewTreeNode(this.treeModel.root))}async renameDebugWatchNodePrompt(f){this.treeModel&&this.proxyPrompt(await this.treeHandle.promptRename(f))}removeDebugWatchNode(f){this.debugWatch.removeWatchExpression(f.name),f.session?this.initTreeModel():this.dispatchWatchEvent(f.parent.path,{type:c.WatchEvent.Removed,path:f.path})}async copyValue(f){const N=await f.getClipboardValue();N&&await this.clipboardService.writeText(N)}async clearAllExpression(){this.debugWatch.updateWatchExpressions([]),await this.initTreeModel(),this.save()}addWatchExpression(f){this.debugWatch.addWatchExpression(f),this.initTreeModel()}dispatchWatchEvent(f,N){var W;const Z=(W=this.treeModel)===null||W===void 0?void 0:W.root.watchEvents.get(f);Z&&Z.callback&&Z.callback(N)}collapsedAll(){var f;(f=this.treeModel)===null||f===void 0||f.root.collapsedAll()}async refresh(f){if(!f)if(this.treeModel)f=this.treeModel.root;else return;!h.ExpressionContainer.is(f)&&f.parent&&(f=f.parent),this.queueChangeEvent(f.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(f,N){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new g.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var W;await this.flushEventQueue(),(W=this.flushEventQueueDeferred)===null||W===void 0||W.resolve(),this.flushEventQueueDeferred=null,N()},n.DEFAULT_REFRESH_DELAY)),this._changeEventDispatchQueue.indexOf(f)===-1&&this._changeEventDispatchQueue.push(f)}};m.DEFAULT_REFRESH_DELAY=100,m.DEFAULT_TRIGGER_DELAY=200,m.DEBUG_WATCHER_EXPRESSIONS_STORAGE_KEY="watchers",a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],m.prototype,"injector",void 0),a.__decorate([(0,o.Autowired)(u.ICtxMenuRenderer),a.__metadata("design:type",u.ICtxMenuRenderer)],m.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,o.Autowired)(u.AbstractContextMenuService),a.__metadata("design:type",u.AbstractContextMenuService)],m.prototype,"contextMenuService",void 0),a.__decorate([(0,o.Autowired)(b.DebugViewModel),a.__metadata("design:type",b.DebugViewModel)],m.prototype,"viewModel",void 0),a.__decorate([(0,o.Autowired)(r.IDebugSessionManager),a.__metadata("design:type",G.DebugSessionManager)],m.prototype,"manager",void 0),a.__decorate([(0,o.Autowired)(g.IReporterService),a.__metadata("design:type",Object)],m.prototype,"reporterService",void 0),a.__decorate([(0,o.Autowired)(g.IContextKeyService),a.__metadata("design:type",Object)],m.prototype,"contextKeyService",void 0),a.__decorate([(0,o.Autowired)(g.StorageProvider),a.__metadata("design:type",Function)],m.prototype,"storageProvider",void 0),a.__decorate([(0,o.Autowired)(g.IClipboardService),a.__metadata("design:type",Object)],m.prototype,"clipboardService",void 0),m=n=a.__decorate([(0,o.Injectable)(),a.__metadata("design:paramtypes",[])],m),e.DebugWatchModelService=m},14600:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchPanelContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(64582),u=t(98650),G=t(4983),p=t(95033);let h=class{registerCommands(I){I.registerCommand(g.DEBUG_COMMANDS.ADD_WATCHER,{execute:()=>{this.debugWatchModelService.newDebugWatchNodePrompt()}}),I.registerCommand(g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.collapsedAll()}}),I.registerCommand(g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER,{execute:()=>{this.debugWatchModelService.clearAllExpression()}}),I.registerCommand(g.DEBUG_COMMANDS.REMOVE_WATCHER,{execute:r=>{r instanceof u.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(r);const[l]=this.debugWatchModelService.selectedNodes;l instanceof u.DebugWatchNode&&this.debugWatchModelService.removeDebugWatchNode(l)}}),I.registerCommand(g.DEBUG_COMMANDS.EDIT_WATCHER,{execute:r=>{this.debugWatchModelService.renameDebugWatchNodePrompt(r)}}),I.registerCommand(g.DEBUG_COMMANDS.COPY_WATCHER_VALUE,{execute:r=>{this.debugWatchModelService.copyValue(r)}})}registerToolbarItems(I){I.registerItem({id:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,command:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("close-all"),viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.removeAll")}),I.registerItem({id:g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,iconClass:(0,o.getIcon)("collapse-all"),command:g.DEBUG_COMMANDS.COLLAPSE_ALL_WATCHER.id,viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.collapseAll"),when:G.CONTEXT_IN_DEBUG_MODE.raw}),I.registerItem({id:g.DEBUG_COMMANDS.ADD_WATCHER.id,iconClass:(0,o.getIcon)("plus"),command:g.DEBUG_COMMANDS.ADD_WATCHER.id,viewId:g.DEBUG_WATCH_ID,tooltip:(0,o.localize)("debug.watch.add"),when:G.CONTEXT_IN_DEBUG_MODE.raw})}registerMenus(I){I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.ADD_WATCHER.id,label:(0,o.localize)("debug.watch.add")},order:10,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.EDIT_WATCHER.id,label:(0,o.localize)("debug.watch.edit")},when:G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:20,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.COPY_WATCHER_VALUE.id,label:(0,o.localize)("debug.watch.copyValue")},when:`${G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression")} || ${G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("variable")} && ${G.CONTEXT_IN_DEBUG_MODE.raw}`,order:30,enabledWhen:G.CONTEXT_IN_DEBUG_MODE.raw,group:"3_modification"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.REMOVE_WATCHER.id,label:(0,o.localize)("debug.watch.remove")},when:G.CONTEXT_WATCH_ITEM_TYPE.equalsTo("expression"),order:10,group:"z_commands"}),I.registerMenuItem(c.MenuId.DebugWatchContext,{command:{id:g.DEBUG_COMMANDS.REMOVE_ALL_WATCHER.id,label:(0,o.localize)("debug.watch.removeAll")},order:20,group:"z_commands"})}registerKeybindings(I){I.registerKeybinding({command:g.DEBUG_COMMANDS.REMOVE_WATCHER.id,keybinding:"ctrlcmd+backspace",when:G.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.raw})}onStart(){this.debugWatchModelService.load()}};n.__decorate([(0,a.Autowired)(p.DebugWatchModelService),n.__metadata("design:type",p.DebugWatchModelService)],h.prototype,"debugWatchModelService",void 0),h=n.__decorate([(0,o.Domain)(o.ClientAppContribution,c.MenuContribution,o.CommandContribution,o.TabBarToolbarContribution,o.KeybindingContribution)],h),e.WatchPanelContribution=h},64611:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_WATCH_TREE_NODE_HEIGHT=e.DebugWatchRenderedNode=e.DebugWatchView=e.DEBUG_WATCH_TREE_FIELD_NAME=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(41869),G=t(98650),p=t(95033),h=n.__importDefault(t(21315));e.DEBUG_WATCH_TREE_FIELD_NAME="DEBUG_WATCH_TREE_FIELD",e.DebugWatchView=(0,o.observer)(({viewState:I})=>{const{height:l}=I,s=c.default.useRef(null),[d,m]=c.default.useState(),v=(0,u.useInjectable)(p.DebugWatchModelService);c.default.useEffect(()=>f(),[]);const f=()=>{const F=v.treeModel;let V=!0;const Y=new u.DisposableCollection;return Y.push(u.Disposable.create(()=>{V=!1})),F&&F.ensureReady.then(()=>{V&&m(F)}),Y.push(v.onDidUpdateTreeModel(async _=>{_&&await _.ensureReady,V&&m(_)})),()=>{v.removeNodeDecoration(),Y.dispose()}},N=F=>{v.handleTreeHandler(Object.assign(Object.assign({},F),{getModel:()=>d,hasDirectFocus:()=>s.current===document.activeElement}))},W=(F,V,Y)=>{F.stopPropagation();const{handleTwistierClick:_}=v;V&&_(V,Y)},Z=(F,V)=>{const{handleContextMenu:Y}=v;Y(F,V)},y=F=>{const{handleContextMenu:V}=v;V(F)},E=F=>{const{enactiveNodeDecoration:V}=v;V()},R=F=>{const{enactiveNodeDecoration:V}=v;V()},A=c.default.useCallback(F=>{const V=v.decorations.getDecorations(F.item);return c.default.createElement(e.DebugWatchRenderedNode,{item:F.item,itemType:F.itemType,decorations:V,onClick:W,onTwistierClick:W,onContextMenu:Z,defaultLeftPadding:12,leftPadding:8})},[d]),w=()=>d?c.default.createElement(g.RecycleTree,{height:l,itemHeight:22,onReady:N,model:d,placeholder:()=>c.default.createElement("span",null)},A):c.default.createElement("span",null);return c.default.createElement("div",{className:h.default.debug_watch_container,tabIndex:-1,ref:s,onContextMenu:y,onClick:E,onBlur:R,"data-name":e.DEBUG_WATCH_TREE_FIELD_NAME},w())});const b=({item:I,decorations:r,defaultLeftPadding:l,leftPadding:s,onClick:d,onTwistierClick:m,onContextMenu:v,itemType:f})=>{const N=(0,u.useDesignStyles)(h.default.expansion_toggle,"expansion_toggle"),W=f===g.TreeNodeType.RenamePrompt,Z=f===g.TreeNodeType.NewPrompt,y=W||Z,E=S=>{const Q=I.getRawWatch();Q&&d(S,I,Q.variablesReference>0?g.TreeNodeType.CompositeTreeNode:g.TreeNodeType.TreeNode)},R=S=>{S.nativeEvent.which!==0&&(f===g.TreeNodeType.TreeNode||f===g.TreeNodeType.CompositeTreeNode)&&v&&v(S,I,f)},A={height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,lineHeight:`${e.DEBUG_WATCH_TREE_NODE_HEIGHT}px`,paddingLeft:`${(l||8)+(I.depth||0)*(s||0)}px`},w=S=>y&&S instanceof g.PromptHandle?c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_inputbox)},c.default.createElement("div",{className:(0,a.default)("input-box",h.default.debug_watch_node_prompt_box)},c.default.createElement(S.ProxiedInput,{wrapperStyle:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT,padding:"0 5px"}}))):c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_displayname,h.default.debug_watch_variable,S.description?h.default.name:"")},S.name,S.description?":":""),F=S=>{const Q=/^true|false$/i,O=/^(['"]).*\1$/,M=S.description?S.description.replace("function","\u0192 "):"",T=[h.default.debug_watch_variable];return y?null:(I.variableType==="number"||I.variableType==="boolean"||I.variableType==="string"?T.push(h.default[I.variableType]):isNaN(+M)?Q.test(M)?T.push(h.default.boolean):O.test(M)&&T.push(h.default.string):T.push(h.default.number),c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment_grow,h.default.debug_watch_node_description,...T)},M))},V=()=>c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,h.default.debug_watch_node_tail)},Y()),Y=()=>c.default.createElement("div",{className:h.default.debug_watch_node_status},I.badge),_=()=>I.tooltip,H=(S,Q)=>{const O=M=>{Q(M,S,f)};return r&&r?.classlist.indexOf(h.default.mod_loading)>-1?c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_segment,N)},c.default.createElement(g.Loading,null)):c.default.createElement("div",{onClick:O,className:(0,a.default)(h.default.debug_watch_node_segment,N,(0,u.getIcon)("right"),{[`${h.default.mod_collapsed}`]:!S.expanded})})},X=S=>{if(G.DebugWatchNode.is(S)){if(S.available&&S.variablesReference)return H(S,m)}else if(G.ExpressionContainer.is(S)&&S.variablesReference)return H(S,m)};return c.default.createElement("div",{key:I.id,onClick:E,onContextMenu:R,title:_(),className:(0,a.default)(h.default.debug_watch_node,r?r.classlist:null),style:A,"data-id":I.id},c.default.createElement("div",{className:(0,a.default)(h.default.debug_watch_node_content)},X(I),c.default.createElement("div",{style:{height:e.DEBUG_WATCH_TREE_NODE_HEIGHT},className:y?h.default.debug_watch_node_prompt_wrap:h.default.debug_watch_node_overflow_wrap},w(I),F(I)),V()))};e.DebugWatchRenderedNode=b,e.DEBUG_WATCH_TREE_NODE_HEIGHT=22},46118:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_COMMANDS=void 0;var t;(function(n){n.ADD_WATCHER={id:"debug.watch.add"},n.COLLAPSE_ALL_WATCHER={id:"debug.watch.collapseAll"},n.REMOVE_ALL_WATCHER={id:"debug.watch.removeAll"},n.REMOVE_WATCHER={id:"debug.watch.remove"},n.EDIT_WATCHER={id:"debug.watch.edit"},n.COPY_WATCHER_VALUE={id:"debug.watch.copyValue"},n.REMOVE_ALL_BREAKPOINTS={id:"debug.breakpoints.remove.all"},n.TOGGLE_BREAKPOINTS={id:"debug.breakpoints.toggle"},n.ACTIVE_BREAKPOINTS={id:"debug.breakpoints.active"},n.DEACTIVE_BREAKPOINTS={id:"debug.breakpoints.deactive"},n.START={id:"debug.start"},n.NEXT={id:"debug.next"},n.PREV={id:"debug.prev"},n.OVER={id:"debug.over"},n.STOP={id:"debug.stop"},n.CONTINUE={id:"debug.continue"},n.RESTART={id:"debug.restart"},n.PAUSE={id:"debug.pause"},n.DELETE_BREAKPOINT={id:"debug.delete.breakpoint",label:"%debug.menu.delete.breakpoint%"},n.EDIT_BREAKPOINT={id:"debug.edit.breakpoint",label:"%debug.menu.edit.breakpoint%"},n.DISABLE_BREAKPOINT={id:"debug.disable.breakpoint",label:"%debug.menu.disable.breakpoint%"},n.ENABLE_BREAKPOINT={id:"debug.enable.breakpoint",label:"%debug.menu.enable.breakpoint%"},n.ENABLE_LOGPOINT={id:"debug.enable.logpoint",label:"%debug.menu.enable.logpoint"},n.ADD_BREAKPOINT={id:"debug.add.breakpoint",label:"%debug.menu.add.breakpoint%"},n.ADD_LOGPOINT={id:"debug.add.logpoint",label:"%debug.menu.add.logpoint%"},n.ADD_CONDITIONAL_BREAKPOINT={id:"debug.add.conditional",label:"%debug.menu.add.conditional%"},n.RESTART_FRAME={id:"debug.callstack.restart.frame"},n.COPY_STACK_TRACE={id:"debug.callstack.copy"},n.SET_VARIABLE_VALUE={id:"debug.variables.setValue"},n.COPY_VARIABLE_VALUE={id:"debug.variables.copy"},n.COPY_EVALUATE_PATH={id:"debug.evaluate.copy"},n.ADD_TO_WATCH_ID={id:"debug.addToWatchExpressions"},n.VIEW_MEMORY_ID={id:"debug.variables.view.memory"},n.CLEAR_CONSOLE={id:"debug.console.clear",label:"%debug.console.clear%"},n.COPY_CONSOLE_ITEM={id:"debug.console.copy"},n.COPY_CONSOLE_ALL={id:"debug.console.copyALl"},n.COLLAPSE_ALL_CONSOLE_ITEM={id:"debug.console.collapseAll",label:"%debug.console.collapseAll%"},n.CONSOLE_ENTER_EVALUATE={id:"debug.console.keybing.enter.evaluate"},n.CONSOLE_INPUT_DOWN_ARROW={id:"debug.console.input.down.arrow"},n.CONSOLE_INPUT_UP_ARROW={id:"debug.console.input.up.arrow"},n.CONSOLE_FILTER_FOCUS={id:"debug.console.filter.input.focus"},n.RUN_TO_CURSOR={id:"debug.action.runToCursor",label:"%debug.action.runToCursor%"},n.FORCE_RUN_TO_CURSOR={id:"debug.action.forceRunToCursor",label:"%debug.action.forceRunToCursor%"},n.EXCEPTION_WIDGET_CLOSE={id:"debug.action.closeExceptionWidget"},n.SHOW_ALL_AUTOMATIC_DEBUG_CONFIGURATIONS={id:"debug.showAllAutomaticDebugConfigurations"}})(t=e.DEBUG_COMMANDS||(e.DEBUG_COMMANDS={}))},4983:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_DEBUGGERS_AVAILABLE=e.CONTEXT_BREAKPOINTS_EXIST=e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=e.CONTEXT_RESTART_FRAME_SUPPORTED=e.CONTEXT_STEP_BACK_SUPPORTED=e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=e.CONTEXT_BREAKPOINT_ACCESS_TYPE=e.CONTEXT_BREAKPOINT_ITEM_TYPE=e.CONTEXT_WATCH_ITEM_TYPE=e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=e.CONTEXT_CALLSTACK_ITEM_STOPPED=e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=e.CONTEXT_CALLSTACK_ITEM_TYPE=e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=e.CONTEXT_EXPRESSION_SELECTED=e.CONTEXT_VARIABLES_FOCUSED=e.CONTEXT_WATCH_EXPRESSIONS_EXIST=e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=e.CONTEXT_BREAKPOINTS_FOCUSED=e.CONTEXT_IN_BREAKPOINT_WIDGET=e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=e.CONTEXT_IN_DEBUG_CONSOLE=e.CONTEXT_IN_DEBUG_REPL=e.CONTEXT_IN_DEBUG_MODE=e.CONTEXT_DEBUG_UX=e.CONTEXT_DEBUG_UX_KEY=e.CONTEXT_DEBUG_STATE=e.CONTEXT_DEBUG_CONFIGURATION_TYPE=e.CONTEXT_DEBUG_TYPE=e.CONTEXT_DEBUG_TYPE_KEY=e.CONTEXT_IN_DEBUG_MODE_KEY=e.CONTEXT_DEBUG_STOPPED_KEY=e.DEBUG_SCHEME=e.DEBUG_FLOATING_CLICK_WIDGET=e.DEBUG_STACK_ID=e.DEBUG_WELCOME_ID=e.DEBUG_BREAKPOINTS_ID=e.DEBUG_VARIABLES_ID=e.DEBUG_THREAD_ID=e.DEBUG_WATCH_ID=e.DEBUG_MEMORY_SCHEME=e.LAUNCH_VIEW_COMPONENT_ID=e.LAUNCH_VIEW_SCHEME=e.DEBUG_CONTAINER_ID=e.DEBUG_CONSOLE_CONTAINER_ID=void 0,e.CONTEXT_ACTIVE_BREAKPOINTS=e.CONTEXT_CAN_VIEW_MEMORY=e.CONTEXT_MULTI_SESSION_DEBUG=e.CONTEXT_MULTI_SESSION_REPL=e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=e.CONTEXT_SET_VARIABLE_SUPPORTED=e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=void 0;const n=t(30144);Object.defineProperty(e,"DEBUG_CONSOLE_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONSOLE_CONTAINER_ID}}),Object.defineProperty(e,"DEBUG_CONTAINER_ID",{enumerable:!0,get:function(){return n.DEBUG_CONTAINER_ID}});const a=t(40191);e.LAUNCH_VIEW_SCHEME="launch_view_scheme",e.LAUNCH_VIEW_COMPONENT_ID="launch-view",e.DEBUG_MEMORY_SCHEME="vscode-debug-memory",e.DEBUG_WATCH_ID="debug-watch",e.DEBUG_THREAD_ID="debug-thread",e.DEBUG_VARIABLES_ID="debug-variable",e.DEBUG_BREAKPOINTS_ID="debug-breakpoints",e.DEBUG_WELCOME_ID="debug-welcome",e.DEBUG_STACK_ID="debug-stack",e.DEBUG_FLOATING_CLICK_WIDGET="debug.overlayWidget.floatingClickWidget",e.DEBUG_SCHEME="debug",e.CONTEXT_DEBUG_STOPPED_KEY="debugStopped",e.CONTEXT_IN_DEBUG_MODE_KEY="inDebugMode",e.CONTEXT_DEBUG_TYPE_KEY="debugType",e.CONTEXT_DEBUG_TYPE=new a.RawContextKey("debugType",void 0),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new a.RawContextKey("debugConfigurationType",void 0),e.CONTEXT_DEBUG_STATE=new a.RawContextKey("debugState","Inactive"),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new a.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default"),e.CONTEXT_IN_DEBUG_MODE=new a.RawContextKey("inDebugMode",!1),e.CONTEXT_IN_DEBUG_REPL=new a.RawContextKey("inDebugRepl",!1),e.CONTEXT_IN_DEBUG_CONSOLE=new a.RawContextKey("inDebugConsole",!1),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new a.RawContextKey("breakpointWidgetVisible",!1),e.CONTEXT_IN_BREAKPOINT_WIDGET=new a.RawContextKey("inBreakpointWidget",!1),e.CONTEXT_BREAKPOINTS_FOCUSED=new a.RawContextKey("breakpointsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new a.RawContextKey("watchExpressionsFocused",!0),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new a.RawContextKey("watchExpressionsExist",!1),e.CONTEXT_VARIABLES_FOCUSED=new a.RawContextKey("variablesFocused",!0),e.CONTEXT_EXPRESSION_SELECTED=new a.RawContextKey("expressionSelected",!1),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new a.RawContextKey("breakpointInputFocused",!1),e.CONTEXT_CALLSTACK_ITEM_TYPE=new a.RawContextKey("callStackItemType",void 0),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new a.RawContextKey("callStackSessionIsAttach",!1),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new a.RawContextKey("callStackItemStopped",!1),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new a.RawContextKey("callStackSessionHasOneThread",!1),e.CONTEXT_WATCH_ITEM_TYPE=new a.RawContextKey("watchItemType",void 0),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new a.RawContextKey("breakpointItemType",void 0),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new a.RawContextKey("breakpointAccessType",void 0),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new a.RawContextKey("breakpointSupportsCondition",!1),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new a.RawContextKey("loadedScriptsSupported",!1),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new a.RawContextKey("loadedScriptsItemType",void 0),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new a.RawContextKey("focusedSessionIsAttach",!1),e.CONTEXT_STEP_BACK_SUPPORTED=new a.RawContextKey("stepBackSupported",!1),e.CONTEXT_RESTART_FRAME_SUPPORTED=new a.RawContextKey("restartFrameSupported",!1),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new a.RawContextKey("stackFrameSupportsRestart",!1),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new a.RawContextKey("jumpToCursorSupported",!1),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new a.RawContextKey("stepIntoTargetsSupported",!1),e.CONTEXT_BREAKPOINTS_EXIST=new a.RawContextKey("breakpointsExist",!1),e.CONTEXT_DEBUGGERS_AVAILABLE=new a.RawContextKey("debuggersAvailable",!1),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new a.RawContextKey("debugProtocolVariableMenuContext",void 0),e.CONTEXT_SET_VARIABLE_SUPPORTED=new a.RawContextKey("debugSetVariableSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new a.RawContextKey("breakWhenValueChangesSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new a.RawContextKey("breakWhenValueIsAccessedSupported",!1),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new a.RawContextKey("breakWhenValueIsReadSupported",!1),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new a.RawContextKey("variableEvaluateNamePresent",!1),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new a.RawContextKey("exceptionWidgetVisible",!1),e.CONTEXT_MULTI_SESSION_REPL=new a.RawContextKey("multiSessionRepl",!1),e.CONTEXT_MULTI_SESSION_DEBUG=new a.RawContextKey("multiSessionDebug",!1),e.CONTEXT_CAN_VIEW_MEMORY=new a.RawContextKey("canViewMemory",void 0),e.CONTEXT_ACTIVE_BREAKPOINTS=new a.RawContextKey("activateBreakpoints",!0)},95581:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},53670:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MASSIVE_PROPERTY_FLAG=e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR=e.DEFAULT_CONFIGURATION_NAME_SEPARATOR=e.DEFAULT_NO_CONFIGURATION_KEY=e.DEFAULT_DYNAMIC_CONFIGURATION_KEY=e.DEFAULT_EDIT_CONFIGURATION_KEY=e.DEFAULT_ADD_CONFIGURATION_KEY=e.DebugConfiguration=void 0;var t;(function(n){function a(o){return!!o&&typeof o=="object"&&"type"in o&&"name"in o&&"request"in o}n.is=a})(t=e.DebugConfiguration||(e.DebugConfiguration={})),e.DEFAULT_ADD_CONFIGURATION_KEY="__ADD_CONF__",e.DEFAULT_EDIT_CONFIGURATION_KEY="__EDIT_CONF__",e.DEFAULT_DYNAMIC_CONFIGURATION_KEY="__DYNAMIC_CONF__",e.DEFAULT_NO_CONFIGURATION_KEY="__NO_CONF__",e.DEFAULT_CONFIGURATION_NAME_SEPARATOR="__CONF__",e.DEFAULT_CONFIGURATION_INDEX_SEPARATOR="__INDEX__",e.MASSIVE_PROPERTY_FLAG="massive_property_flag"},70049:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugConsoleModelService=void 0,e.IDebugConsoleModelService=Symbol("IDebugConsoleModelService")},24395:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugEditor=void 0,e.DebugEditor=Symbol("DebugEditor")},2242:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},32385:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugModelManager=e.DebugModelSupportedEventType=e.MemoryRegion=e.IDebugModel=e.DebugModelFactory=e.DebugAdapterContribution=e.DebugAdapterFactory=e.DebugAdapterSessionFactory=e.DebugAdapterSession=void 0;const n=t(43718);e.DebugAdapterSession=Symbol("DebugAdapterSession"),e.DebugAdapterSessionFactory=Symbol("DebugAdapterSessionFactory"),e.DebugAdapterFactory=Symbol("DebugAdapterFactory"),e.DebugAdapterContribution=Symbol("DebugAdapterContribution"),e.DebugModelFactory=Symbol("DebugModelFactory"),e.IDebugModel=Symbol("IDebugModel");class a extends n.Disposable{constructor(g,u){super(),this.memoryReference=g,this.session=u,this.invalidateEmitter=this.registerDispose(new n.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this.registerDispose(u.onDidInvalidateMemory(G=>{G.body.memoryReference===g&&this.invalidate(G.body.offset,G.body.count-G.body.offset)}))}async read(g,u){var G;const p=u-g,h=g,b=await this.session.readMemory(this.memoryReference,h,p);if(b===void 0||!(!((G=b.body)===null||G===void 0)&&G.data))return[{type:1,offset:h,length:p}];let I;try{I=(0,n.decodeBase64)(b.body.data)}catch(s){return[{type:2,offset:h,length:p,error:s.message}]}const r=b.body.unreadableBytes||0,l=p-r;if(I.byteLength<l){const s=n.BinaryBuffer.alloc(l-I.byteLength);s.buffer.fill(0),I=n.BinaryBuffer.concat([I,s],l)}else I.byteLength>l&&(I=I.slice(0,l));return r?[{type:0,offset:h,length:l,data:I},{type:1,offset:h+l,length:r}]:[{type:0,offset:h,length:p,data:I}]}async write(g,u){var G,p;const h=await this.session.writeMemory(this.memoryReference,g,(0,n.encodeBase64)(u),!0),b=(p=(G=h?.body)===null||G===void 0?void 0:G.bytesWritten)!==null&&p!==void 0?p:u.byteLength;return this.invalidate(g,g+b),b}dispose(){super.dispose()}invalidate(g,u){this.invalidateEmitter.fire({fromOffset:g,toOffset:u})}}e.MemoryRegion=a;var o;(function(c){c.down="Down",c.move="Move",c.leave="Leave",c.contextMenu="contextMenu"})(o=e.DebugModelSupportedEventType||(e.DebugModelSupportedEventType={})),e.IDebugModelManager=Symbol("DebugModelManager")},79845:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugProgress=void 0,e.IDebugProgress=Symbol("DebugProgress")},60709:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSON_SCHEMA_TYPE=e.launchDefaultSchemaUri=e.launchExtensionSchemaUri=e.launchSchemaUri=void 0,e.launchSchemaUri="vscode://schemas/launch",e.launchExtensionSchemaUri="vscode://schemas/launch/extension",e.launchDefaultSchemaUri="vscode://schemas/launch/default";var t;(function(n){n.ARRAY="array",n.BOOLEAN="boolean",n.NULL="null",n.NUMBER="number",n.OBJECT="object",n.STRING="string"})(t=e.JSON_SCHEMA_TYPE||(e.JSON_SCHEMA_TYPE={}))},70159:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILaunchService=e.IDebugService=e.IDebugServer=e.DebugAdapterPath=e.DebugConfigurationProviderTriggerKind=void 0;var t;(function(n){n[n.Initial=1]="Initial",n[n.Dynamic=2]="Dynamic"})(t=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={})),e.DebugAdapterPath="DebugAdaptor",e.IDebugServer=Symbol("DebugServer"),e.IDebugService=Symbol("DebugService"),e.ILaunchService=Symbol("ILaunchService")},50883:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDebugSessionDTO=void 0;var t;(function(n){function a(o){return"id"in o}n.is=a})(t=e.IDebugSessionDTO||(e.IDebugSessionDTO={}))},26296:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSequenceId=e.IDebugSessionManager=e.IDebugSession=e.DebugState=void 0;var t;(function(o){o[o.Inactive=0]="Inactive",o[o.Initializing=1]="Initializing",o[o.Running=2]="Running",o[o.Stopped=3]="Stopped"})(t=e.DebugState||(e.DebugState={})),e.IDebugSession=Symbol("DebugSession"),e.IDebugSessionManager=Symbol("DebugSessionManager");let n=1;function a(){return n++}e.getSequenceId=a},64582:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(53670),e),n.__exportStar(t(70159),e),n.__exportStar(t(2242),e),n.__exportStar(t(95581),e),n.__exportStar(t(32385),e),n.__exportStar(t(26296),e),n.__exportStar(t(70049),e),n.__exportStar(t(50883),e),n.__exportStar(t(24395),e),n.__exportStar(t(79845),e),n.__exportStar(t(60709),e),n.__exportStar(t(7428),e),n.__exportStar(t(37723),e),n.__exportStar(t(4983),e),n.__exportStar(t(71120),e),n.__exportStar(t(46118),e)},7428:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},71120:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareCommand=e.getDriveLetter=e.hasDriveLetter=e.isWindowsDriveLetter=void 0;const n=t(43718);function a(u){return u>=65&&u<=90||u>=97&&u<=122}e.isWindowsDriveLetter=a;function o(u,G=n.isWindows){return G?a(u.charCodeAt(0))&&u.charCodeAt(1)===58:!1}e.hasDriveLetter=o;function c(u){return o(u)?u[0]:void 0}e.getDriveLetter=c;function g(u,G,p,h,b){u=u.trim().toLowerCase();let I;u.indexOf("powershell")>=0||u.indexOf("pwsh")>=0?I=1:u.indexOf("cmd.exe")>=0?I=0:u.indexOf("bash")>=0?I=2:n.isWindows?I=0:I=2;let r,l=" ";switch(I){case 1:if(r=s=>(s=s.replace(/'/g,"''"),s.length>0&&s.charAt(s.length-1)==="\\"?`'${s}\\'`:`'${s}'`),h){const s=c(h);s&&(l+=`${s}:; `),l+=`cd ${r(h)}; `}if(b)for(const s in b){const d=b[s];d===null?l+=`Remove-Item env:${s}; `:l+=`\${env:${s}}='${d}'; `}if(G.length>0){const s=G.shift(),d=p?s:r(s);l+=d[0]==="'"?`& ${d} `:`${d} `;for(const m of G)l+=m==="<"||m===">"||p?m:r(m),l+=" "}break;case 0:if(r=s=>(s=s.replace(/"/g,'""'),s=s.replace(/([><!^&|])/g,"^$1"),' "'.split("").some(d=>s.includes(d))||s.length===0?`"${s}"`:s),h){const s=c(h);s&&(l+=`${s}: && `),l+=`cd ${r(h)} && `}if(b){l+='cmd /C "';for(const s in b){let d=b[s];d===null?l+=`set "${s}=" && `:(d=d.replace(/[&^|<>]/g,m=>`^${m}`),l+=`set "${s}=${d}" && `)}}for(const s of G)l+=s==="<"||s===">"||p?s:r(s),l+=" ";b&&(l+='"');break;case 2:{r=d=>(d=d.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g,"\\$1"),d.length===0?'""':d);const s=d=>/[^\w@%/+=,.:^-]/.test(d)?`'${d.replace(/'/g,"'\\''")}'`:d;if(h&&(l+=`cd ${r(h)} ; `),b){l+="/usr/bin/env";for(const d in b){const m=b[d];m===null?l+=` -u ${s(d)}`:l+=` ${s(`${d}=${m}`)}`}l+=" "}for(const d of G)l+=d==="<"||d===">"||p?d:r(d),l+=" ";break}}return l}e.prepareCommand=g},37723:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConfigurationsReadyEvent=e.DEBUG_REPORT_NAME=void 0;const n=t(43718);var a;(function(c){c.DEBUG_SESSION_START_TIME="debugSessionStartTime",c.DEBUG_PRE_LAUNCH_TASK_TIME="debugPreLaunchTaskTime",c.DEBUG_TOOLBAR_OPERATION_TIME="debugToolBarOperationTime",c.DEBUG_TOOLBAR_OPERATION="debugToolBarOperation",c.DEBUG_PANEL_OPERATION_FOLDEXPR="debugPanelOperationFoldexpr",c.DEBUG_WATCH="debugWatch",c.DEBUG_VARIABLES="debugVariables",c.DEBUG_BREAKPOINT="debugBreakpoint",c.DEBUG_ADAPTER_PROTOCOL_TIME="debugAdapterProtocolTime",c.DEBUG_STOPPED="debugStopped",c.DEBUG_UI_FRONTEND_TIME="debugFrontEndTime"})(a=e.DEBUG_REPORT_NAME||(e.DEBUG_REPORT_NAME={}));class o extends n.BasicEvent{}e.DebugConfigurationsReadyEvent=o},66482:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(64582),e)},83670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDecorationsService=void 0;const n=t(85608),a=t(76003),o=t(43718),{isFalsyOrWhitespace:c}=o.strings,{asArray:g}=o.arrays;class u{constructor(){this._data=o.TernarySearchTree.forPaths()}affectsResource(l){return this._data.get(l.toString())||this._data.findSuperstr(l.toString())!==void 0}static debouncer(l,s){if(l||(l=new u),Array.isArray(s))for(const d of s)l._data.set(d.toString(),!0);else l._data.set(s.toString(),!0);return l}}class G{constructor(l,s){this.source=l,this.thenable=s}}class p{constructor(l,s,d){this._provider=l,this._uriEmitter=s,this._flushEmitter=d,this.data=o.TernarySearchTree.forPaths(),this._dispoable=this._provider.onDidChange(m=>{if(!m)this.data.clear(),this._flushEmitter.fire({affectsResource(){return!0}});else for(const v of m)this._fetchData(v)})}dispose(){this._dispoable.dispose(),this.data.clear()}knowsAbout(l){return!!this.data.get(l.toString())||!!this.data.findSuperstr(l.toString())}getOrRetrieve(l,s,d){const m=l.toString();let v=this.data.get(m);if(v===void 0&&(v=this._fetchData(l)),v&&!(v instanceof G)&&d(v,!1),s){const f=this.data.findSuperstr(m);if(f)for(let N=f.next();!N.done;N=f.next())N.value&&!(N.value instanceof G)&&d(N.value,!0)}}_fetchData(l){const s=this.data.get(l.toString());s instanceof G&&(s.source.cancel(),this.data.delete(l.toString()));const d=new o.CancellationTokenSource,m=this._provider.provideDecorations(l,d.token);if((0,o.isThenable)(m)){const v=new G(d,Promise.resolve(m).then(f=>{this.data.get(l.toString())===v&&this._keepItem(l,f)}).catch(f=>{!(0,o.isPromiseCanceledError)(f)&&this.data.get(l.toString())===v&&this.data.delete(l.toString())}));return this.data.set(l.toString(),v),null}else return this._keepItem(l,m)}_keepItem(l,s){const d=s||null,m=this.data.set(l.toString(),d);return(d||m)&&this._uriEmitter.fire(l),d}}function h(r){return g(r).map(({color:s,letter:d})=>`${s}/${d}`).join(",")}function b(r){const l=g(r);if(l.length)return{key:h(r),color:l[0].color,badge:l.filter(s=>!c(s.letter)).map(s=>s.letter).join(","),tooltip:l.filter(s=>!c(s.tooltip)).map(s=>s.tooltip).join(" \u2022 ")}}let I=class extends o.Disposable{constructor(){super(...arguments),this.logger=(0,o.getDebugLogger)(),this._data=new o.LinkedList,this._onDidChangeDecorationsDelayed=new o.Emitter,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=o.Event.any(this._onDidChangeDecorations.event,o.Event.debounce(this._onDidChangeDecorationsDelayed.event,u.debouncer,void 0,void 0,500))}dispose(){(0,o.dispose)(this._onDidChangeDecorations),(0,o.dispose)(this._onDidChangeDecorationsDelayed)}registerDecorationsProvider(l){this.logger.log("DecorationService#registerDecorationsProvider",l);const s=new p(l,this._onDidChangeDecorationsDelayed,this._onDidChangeDecorations),d=this._data.push(s);return this._onDidChangeDecorations.fire({affectsResource(){return!0}}),(0,o.toDisposable)(()=>{d(),this._onDidChangeDecorations.fire({affectsResource:m=>s.knowsAbout(m)}),s.dispose()})}getDecoration(l,s){const d=[];let m=!1;for(let v=this._data.iterator(),f=v.next();!f.done;f=v.next())f.value.getOrRetrieve(l,s,(N,W)=>{(!W||N.bubble)&&(d.push(N),m=W||m)});if(d.length!==0)return this.asDecoration(d,m)}asDecoration(l,s){l.sort((m,v)=>(v.weight||0)-(m.weight||0));const d=b(l);return d&&s&&(d.badge="\u2022",d.tooltip=(0,o.localize)("bubbleTitle","Contains emphasized items")),d}};I=n.__decorate([(0,a.Injectable)()],I),e.FileDecorationsService=I},4958:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93364),g=t(83670);let u=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IDecorationsService,useClass:g.FileDecorationsService}]}};u=n.__decorate([(0,a.Injectable)()],u),e.DecorationModule=u},93364:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0;const n=t(43718);class a extends n.Disposable{}e.IDecorationsService=a},87323:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(93364),e)},41893:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(87323),e)},67988:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignCoreContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(1149),g=t(43718),u=t(14951),G=t(2156),p=t(11090),h=t(37517);let b=class{initialize(){this.fileSystem.registerProvider(g.Schemes.design,this.designThemeFileSystemProvider),this.layoutViewSize.setEditorTabsHeight(36,c.ConfigPriority.ModuleDefined),this.layoutViewSize.setStatusBarHeight(36,c.ConfigPriority.ModuleDefined),this.layoutViewSize.setAccordionHeaderSizeHeight(36,c.ConfigPriority.ModuleDefined)}registerRenderer(r){r.registerSlotRenderer(o.SlotLocation.left,p.DesignLeftTabRenderer),r.registerSlotRenderer(o.SlotLocation.bottom,p.DesignBottomTabRenderer),r.registerSlotRenderer(o.SlotLocation.right,p.DesignRightTabRenderer)}};n.__decorate([(0,a.Autowired)(u.IFileServiceClient),n.__metadata("design:type",G.FileServiceClient)],b.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",h.DesignThemeFileSystemProvider)],b.prototype,"designThemeFileSystemProvider",void 0),n.__decorate([(0,a.Autowired)(c.LayoutViewSizeConfig),n.__metadata("design:type",c.LayoutViewSizeConfig)],b.prototype,"layoutViewSize",void 0),b=n.__decorate([(0,a.Injectable)(),(0,o.Domain)(o.ClientAppContribution,o.SlotRendererContribution)],b),e.DesignCoreContribution=b},17242:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(71707),g=t(80832),u=t(97222),G=t(43718),p=t(57517),h=t(52416),b=t(51706),I=t(9132),r=t(67988),l=t(3013),s=t(31385),d=t(72141),m=t(45365),v=n.__importDefault(t(49107)),f=n.__importDefault(t(13925)),N=n.__importDefault(t(63080)),W=t(98741);let Z=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[l.DesignMenuBarContribution,r.DesignCoreContribution],this.preferences=E=>{t.e(454).then(t.bind(t,77454)),E.get(g.IDesignStyleService).setStyles(v.default),(0,W.overrideColorToken)(),(0,W.overrideMonacoColorToken)();const A=E.get(G.AppLifeCycleServiceToken);G.Event.once(G.Event.filter(A.onDidLifeCyclePhaseChange,w=>w===3))(()=>{const w=E.get(h.IThemeService);[f.default,N.default].forEach(F=>{w.registerThemes([{id:F.id,label:F.name,path:"",extensionId:F.id,uiTheme:F.base}],o.URI.parse(`${F.id}.json`).withQuery(F.id).withScheme(G.Schemes.design))})}),E.overrideProviders({token:h.IThemeStore,useClass:class extends b.ThemeStore{async getThemeData(w,F){const V=await super.getThemeData(w,F);return document.body.classList.remove(N.default.designThemeType),document.body.classList.remove(f.default.designThemeType),f.default.id===w?.id?document.body.classList.add(f.default.designThemeType):N.default.id===w?.id&&document.body.classList.add(N.default.designThemeType),V}},override:!0,isDefault:!0},{token:h.IThemeService,useClass:class extends I.WorkbenchThemeService{async ensureValidTheme(){return super.ensureValidTheme(f.default.id)}},override:!0,isDefault:!0},{token:p.IEditorTabService,useClass:s.DesignEditorTabService,override:!0,isDefault:!0},{token:c.ISplitPanelService,useClass:m.DesignSplitPanelService,override:!0,isDefault:!0},{token:u.IBrowserCtxMenu,useClass:d.DesignBrowserCtxMenuService})}}};Z=n.__decorate([(0,a.Injectable)()],Z),e.DesignModule=Z},11090:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignRightTabRenderer=e.DesignBottomTabRenderer=e.DesignLeftTabRenderer=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(19951),g=({className:p,components:h,tabbarView:b})=>o.default.createElement(c.LeftTabRenderer,{className:(0,a.default)(p,"design_left_slot"),components:h,tabbarView:b});e.DesignLeftTabRenderer=g;const u=({className:p,components:h})=>o.default.createElement(c.BottomTabRenderer,{className:(0,a.default)(p,"design_bottom_slot"),components:h});e.DesignBottomTabRenderer=u;const G=({className:p,components:h,tabbarView:b,tabpanelView:I})=>o.default.createElement(c.RightTabRenderer,{className:(0,a.default)("design_right_slot",p),components:h,tabbarView:b,tabpanelView:I});e.DesignRightTabRenderer=G},3013:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(64267),u=t(38879),G=t(12458);let p=class extends o.Disposable{constructor(){super(),this.menubarStore.unregisterMenusBarByCompact(c.MenuId.DesignMenuBarTopExtra);let b;this.addDispose(this.menubarStore.onDidMenuBarChange(I=>{b&&b.dispose(),b=this.menuRegistry.registerMenuItems(c.MenuId.DesignMenuBarTopExtra,I.map(r=>({label:r.label,submenu:r.id,iconClass:r.iconClass,group:r.group||"1_navigation",order:r.order||100})))}))}registerComponent(b){b.register(u.DESIGN_MENUBAR_CONTAINER_VIEW_ID,{component:G.DesignMenuBarView,id:u.DESIGN_MENUBAR_CONTAINER_VIEW_ID})}};n.__decorate([(0,a.Autowired)(g.MenubarStore),n.__metadata("design:type",g.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,a.Autowired)(c.IMenuRegistry),n.__metadata("design:type",c.IMenuRegistry)],p.prototype,"menuRegistry",void 0),p=n.__decorate([(0,o.Domain)(o.ComponentContribution),n.__metadata("design:paramtypes",[])],p),e.DesignMenuBarContribution=p},12458:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignMenuBarView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(89195),G=t(1149),p=t(63373),h=t(93899),b=t(43718),I=t(63067),r=t(38879),l=n.__importDefault(t(52151)),s=n.__importDefault(t(90946)),d=()=>{const v=(0,c.useInjectable)(h.AbstractContextMenuService),f=(0,c.useInjectable)(G.DesignLayoutConfig),N=(0,c.useInjectable)(h.ICtxMenuRenderer),W=o.useRef(null),[Z,y]=o.useState(void 0);o.useEffect(()=>{E()},[]);const E=o.useCallback(F=>{requestAnimationFrame(()=>{if(W.current){const V=W.current.getBoundingClientRect(),{x:Y,y:_,width:H,height:X}=V,S={x:Y,y:_+X};y(S),F&&F(S)}})},[W.current]),R=o.useMemo(()=>v.createMenu({id:h.MenuId.DesignMenuBarTopExtra}),[v]),A=o.useCallback(()=>{if(!Z)return;const F=R.getMergedMenuNodes();R.dispose(),E(V=>{N.show({anchor:V,menuNodes:F})})},[Z,R]),w=o.useMemo(()=>f.menubarLogo||l.default,[f.menubarLogo]);return o.createElement(o.Fragment,null,o.createElement(u.EnhanceIcon,{wrapperClassName:s.default.ai_enhance_menu,ref:W,onClick:A},o.createElement("div",{className:s.default.logo_container},o.createElement("img",{className:s.default.extra_top_icon,src:w,alt:""}),o.createElement(g.Icon,{className:(0,a.default)((0,c.getIcon)("down"),s.default.caret_icon)}))))},m=()=>{const v=(0,c.useInjectable)(b.CommandService),f=(0,c.useInjectable)(I.IMainLayoutService),N=(0,c.useInjectable)(c.AINativeConfigService),[W,Z]=o.useState(!1);o.useEffect(()=>{requestAnimationFrame(()=>{Z(E())});const A=f.getTabbarService(c.SlotLocation.left).onCurrentChange(({previousId:w,currentId:F})=>{w&&!F?Z(!1):!w&&F&&Z(!0)});return()=>{A.dispose()}},[]);const y=o.useCallback(()=>{v.executeCommand("main-layout.left-panel.toggle"),requestAnimationFrame(()=>{Z(E())})},[]),E=o.useCallback(()=>!!f.getTabbarService(c.SlotLocation.left).currentContainerId,[f]);return o.createElement("div",{id:p.VIEW_CONTAINERS.MENUBAR,className:s.default.menu_bar_view,style:{height:N.layoutViewSize.menubarHeight}},o.createElement("div",{className:s.default.container},o.createElement("div",{className:s.default.left},o.createElement(u.EnhanceIcon,{wrapperClassName:s.default.enhance_menu,icon:W?"left-nav-open":"left-nav-close",onClick:y}),o.createElement("span",{className:s.default.dividing}),o.createElement("div",{className:s.default.top_menus_bar},o.createElement(d,null)),o.createElement(c.SlotRenderer,{id:"design-menubar-left",slot:r.DESIGN_MENU_BAR_LEFT,flex:1})),o.createElement("div",{className:s.default.right},o.createElement(c.SlotRenderer,{id:"design-menubar-right",slot:r.DESIGN_MENU_BAR_RIGHT,flex:1}))))};e.DesignMenuBarView=m},31385:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignEditorTabService=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(76003),g=t(81878),u=t(1149),G=t(43718),p=t(30612),h=n.__importDefault(t(49107)),b=r=>{const{children:l}=r,[s,d]=o.default.useState(!1),m=(0,o.useMemo)(()=>"editor-tab-close-"+(0,G.uuid)(6),[]),v=(0,o.useCallback)(()=>{d(!1)},[]),f=(0,o.useMemo)(()=>(0,G.formatLocalize)("editor.closeTab.title",G.isMacintosh?"\u2318W":"Ctrl+W"),[]);return o.default.createElement(g.Popover,{delay:1e3,position:g.PopoverPosition.bottom,id:m,title:f,onClickAction:v,display:s},o.default.createElement("span",{title:""},l))};let I=class extends p.EditorTabService{renderEditorTab(l,s){return o.default.createElement("div",{className:(0,a.default)({[h.default["design-editor_tab_block_container"]]:!0,[h.default.active]:s}),style:{height:this.layoutViewSize.editorTabsHeight}},l)}renderTabCloseComponent(l){return o.default.createElement(b,null,l)}};n.__decorate([(0,c.Autowired)(u.LayoutViewSizeConfig),n.__metadata("design:type",u.LayoutViewSizeConfig)],I.prototype,"layoutViewSize",void 0),I=n.__decorate([(0,c.Injectable)()],I),e.DesignEditorTabService=I},72141:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignBrowserCtxMenuService=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(76003),g=t(97267),u=t(41869),G=t(31388),p=t(52416),h=n.__importDefault(t(49107)),b=r=>{const l=(0,u.useInjectable)(p.IIconService),{data:s,disabled:d,hasSubmenu:m}=r,v=(0,o.useMemo)(()=>s.checked?o.default.createElement(g.Icon,{icon:"check"}):s.icon?o.default.createElement(g.Icon,{iconClass:s.icon}):null,[s]);return o.default.createElement("div",{className:(0,a.default)(h.default.menuAction__sub_menu_action_container,{[h.default.disabled]:d,[h.default.checked]:s.checked},s.className)},o.default.createElement("div",{className:h.default.icon},v),o.default.createElement("div",{className:h.default.label},s.label?(0,u.transformLabelWithCodicon)(u.strings.mnemonicButtonLabel(s.label,!0),{margin:"0 3px"},l?.fromString.bind(l)):""),o.default.createElement("div",{className:h.default.tip},s.keybinding?o.default.createElement("div",{className:h.default.shortcut},s.keybinding):null,m?o.default.createElement("div",{className:h.default.submenuIcon},o.default.createElement(g.Icon,{icon:"right-arrow"})):null,!s.keybinding&&!m&&s.extraDesc&&o.default.createElement("div",{className:h.default.extraDesc},s.extraDesc)))};let I=class extends G.BrowserCtxMenuService{renderSubMenuTitle(l,s){return o.default.createElement(b,Object.assign({data:l},s))}renderMenuItem(l,s){return o.default.createElement(b,Object.assign({data:l},s))}};I=n.__decorate([(0,c.Injectable)()],I),e.DesignBrowserCtxMenuService=I},45365:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignSplitPanelService=void 0;const n=t(71707);class a extends n.SplitPanelService{renderSplitPanel(c,g,u){return super.renderSplitPanel(c,g,u)}interceptProps(c){return c}}e.DesignSplitPanelService=a},13925:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#D4D4D4"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#6A9955"}},{scope:"constant.language",settings:{foreground:"#569cd6"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#b5cea8"}},{scope:"constant.regexp",settings:{foreground:"#646695"}},{scope:"entity.name.tag",settings:{foreground:"#569cd6"}},{scope:"entity.name.tag.css",settings:{foreground:"#d7ba7d"}},{scope:"entity.other.attribute-name",settings:{foreground:"#9cdcfe"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#d7ba7d"}},{scope:"invalid",settings:{foreground:"#f44747"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#569cd6"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#b5cea8"}},{scope:"markup.deleted",settings:{foreground:"#ce9178"}},{scope:"markup.changed",settings:{foreground:"#569cd6"}},{scope:"punctuation.definition.quote.begin.markdown",settings:{foreground:"#6A9955"}},{scope:"punctuation.definition.list.begin.markdown",settings:{foreground:"#6796e6"}},{scope:"markup.inline.raw",settings:{foreground:"#ce9178"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#808080"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#569cd6"}},{scope:"meta.preprocessor.string",settings:{foreground:"#ce9178"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#b5cea8"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#9cdcfe"}},{scope:"meta.diff.header",settings:{foreground:"#569cd6"}},{scope:"storage",settings:{foreground:"#569cd6"}},{scope:"storage.type",settings:{foreground:"#569cd6"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#569cd6"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#ce9178"}},{scope:"string.tag",settings:{foreground:"#ce9178"}},{scope:"string.value",settings:{foreground:"#ce9178"}},{scope:"string.regexp",settings:{foreground:"#d16969"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#569cd6"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#d4d4d4"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#9cdcfe"}},{scope:"keyword",settings:{foreground:"#569cd6"}},{scope:"keyword.control",settings:{foreground:"#569cd6"}},{scope:"keyword.operator",settings:{foreground:"#d4d4d4"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#569cd6"}},{scope:"keyword.other.unit",settings:{foreground:"#b5cea8"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#569cd6"}},{scope:"support.function.git-rebase",settings:{foreground:"#9cdcfe"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#b5cea8"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#d4d4d4"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#569cd6"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#DCDCAA"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#4EC9B0"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#4EC9B0"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#C586C0"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.nam1e.variable","constant.other.placeholder"],settings:{foreground:"#9CDCFE"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#4FC1FF"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#9CDCFE"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#CE9178"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#CE9178"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#d16969"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#DCDCAA"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#d7ba7d"}},{scope:"constant.character",settings:{foreground:"#569cd6"}},{scope:"constant.character.escape",settings:{foreground:"#d7ba7d"}},{scope:"entity.name.label",settings:{foreground:"#C8C8C8"}}],colors:{"activityBar.activeBorder":"#ffffff1f","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#fff","activityBar.inactiveForeground":"#ffffff73","activityBarBadge.background":"#167CDB","activityBarBadge.foreground":"#FFFFFF","badge.background":"#FFFFFF40","badge.foreground":"#D7DBDE","breadcrumb.background":"#222830","breadcrumb.foreground":"#ffffff73","checkbox.background":"#ffffff14","checkbox.border":"#ffffff1f",descriptionForeground:"#868C91","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#43484D","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#00000000","editorGroupHeader.tabsBackground":"#222830","editorSuggestWidget.selectedBackground":"#1A66AC",errorForeground:"#D21F28",focusBorder:"#ffffff1f",foreground:"#D7DBDE","editorCommentsWidget.unresolvedBorder":"#ffffff","gitDecoration.addedResourceForeground":"#8FD460","gitDecoration.conflictingResourceForeground":"#7F9EF3","gitDecoration.deletedResourceForeground":"#F3956A","gitDecoration.ignoredResourceForeground":"#BBC0C4","gitDecoration.modifiedResourceForeground":"#F3CC62","gitDecoration.submoduleResourceForeground":"#67ABEB","gitDecoration.untrackedResourceForeground":"#58D1C9","icon.foreground":"#D7DBDE","input.background":"#ffffff14","input.foreground":"#d7dbde","input.placeholderForeground":"#ffffff59","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#332510","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#d7dbde","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#D7DBDE","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#5F656B40","kt.button.disableBorder":"#5F656B80","kt.button.disableForeground":"#5F656B","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.defaultButton.background":"#ffffff14","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#ffffff14","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#ffffff14","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#ffffff40","kt.defaultButton.foreground":"#D7DBDE","kt.defaultButton.hoverBackground":"#ffffff29","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#ffffff29","kt.defaultButton.selectionForeground":"#fff","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#ffffff73","kt.icon.hoverBackground":"#ffffff14","kt.icon.hoverForeground":"#D7DBDE","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#00000000","kt.input.disableBackground":"#5F656B40","kt.input.disableForeground":"#ffffff40","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#222830","kt.modal.foreground":"#D7DBDE","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#868C91","kt.panelTab.activeBackground":"#151b21","kt.panelTab.activeForeground":"#FFFFFF","kt.panelTab.border":"#ffffff1f","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#D7DBDE","kt.panelTitle.background":"#222830","kt.popover.background":"#2b333d","kt.popover.border":"#363940","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dffa6","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#3c8dffa6","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#00000000","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#00000000","kt.secondaryButton.border":"#5F656B","kt.secondaryButton.clickBorder":"#167CDB","kt.secondaryButton.clickForeground":"#167CDB","kt.secondaryButton.foreground":"#D7DBDE","kt.secondaryButton.hoverBorder":"#3895EB","kt.secondaryButton.hoverForeground":"#3895EB","kt.secondaryButton.background":"#00000000","kt.select.background":"#ffffff14","kt.select.border":"#00000000","kt.select.disableBackground":"#5F656B40","kt.select.disableForeground":"#5F656B","kt.select.foreground":"#D7DBDE","kt.select.placeholderForeground":"#5F656B","kt.selectDropdown.background":"#222830","kt.selectDropdown.foreground":"#D7DBDE","kt.selectDropdown.hoverBackground":"#ffffff14","kt.selectDropdown.selectionBackground":"#ffffff14","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#FFFFFF","kt.tab.borderDown":"#5F656B40","kt.tab.inactiveForeground":"#D7DBDE","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#5F656B40","kt.tree.hoverForeground":"#D7DBDE","kt.tree.inactiveSelectionBackground":"#ffffff1f","kt.tree.inactiveSelectionForeground":"#fff","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#5F656B40","menu.background":"#222830d9","menu.foreground":"#D7DBDE","menu.selectionBackground":"#5F656B40","menu.selectionForeground":"#FFFFFF","menu.separatorBackground":"#43484D","menubar.selectionBackground":"#5f656b40","menubar.selectionForeground":"#FFFFFF","message.background":"#222830","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#222830","notifications.foreground":"#D7DBDE","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#151b21","panel.border":"#43484D","panel.foreground":"#D7DBDE","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#167CDB","panelTitle.activeForeground":"#FFFFFF","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#ffffff73","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#ffffff1f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#ffffffa6","sideBarTitle.foreground":"#FFFFFF","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#ffffff73","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#d2d2d2a6","statusBarItem.prominentBackground":"#2a2a2a80","tab.activeBackground":"#151b21","tab.activeForeground":"#FFFFFF","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#ffffff73","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#151b21","terminal.border":"#252729","terminal.foreground":"#D7DBDE","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#ffffff14","editor.background":"#181818","quickInput.background":"#222830","list.focusBackground":"#ffffff1f","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#151b21"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs-dark",designThemeType:"design-dark",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-dark-theme",name:"OpenSumi Design Dark+ (default dark)"}},37517:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DesignThemeFileSystemProvider=void 0;const n=t(85608),a=t(76003),o=t(43718),c=n.__importDefault(t(13925)),g=n.__importDefault(t(63080));let u=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.onDidChangeFile=o.Event.None}stat(p){return Promise.resolve({type:o.FileType.File,uri:p.toString(),lastModification:Date.now(),isDirectory:!1})}async readFile(p){const{query:h}=p;return c.default.id===h?this.toBuffer(JSON.stringify(c.default)):this.toBuffer(JSON.stringify(g.default))}toBuffer(p){return o.BinaryBuffer.fromString(p).buffer}readDirectory(){throw new Error("Not allowed")}createDirectory(){throw new Error("Not allowed")}rename(){throw new Error("Not allowed")}delete(){throw new Error("Not allowed")}watch(){throw new Error("Not allowed")}writeFile(){throw new Error("Not allowed")}};u=n.__decorate([(0,a.Injectable)()],u),e.DesignThemeFileSystemProvider=u},63080:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={tokenColors:[{scope:["meta.embedded","source.groovy.embedded"],settings:{foreground:"#000000ff"}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:"strong",settings:{fontStyle:"bold"}},{scope:"meta.diff.header",settings:{foreground:"#000080"}},{scope:"comment",settings:{foreground:"#008000"}},{scope:"constant.language",settings:{foreground:"#0000ff"}},{scope:["constant.numeric","variable.other.enummember","keyword.operator.plus.exponent","keyword.operator.minus.exponent"],settings:{foreground:"#098658"}},{scope:"constant.regexp",settings:{foreground:"#811f3f"}},{name:"css tags in selectors, xml tags",scope:"entity.name.tag",settings:{foreground:"#800000"}},{scope:"entity.name.selector",settings:{foreground:"#800000"}},{scope:"entity.other.attribute-name",settings:{foreground:"#ff0000"}},{scope:["entity.other.attribute-name.class.css","entity.other.attribute-name.class.mixin.css","entity.other.attribute-name.id.css","entity.other.attribute-name.parent-selector.css","entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-element.css","source.css.less entity.other.attribute-name.id","entity.other.attribute-name.scss"],settings:{foreground:"#800000"}},{scope:"invalid",settings:{foreground:"#cd3131"}},{scope:"markup.underline",settings:{fontStyle:"underline"}},{scope:"markup.bold",settings:{fontStyle:"bold",foreground:"#000080"}},{scope:"markup.heading",settings:{fontStyle:"bold",foreground:"#800000"}},{scope:"markup.italic",settings:{fontStyle:"italic"}},{scope:"markup.inserted",settings:{foreground:"#098658"}},{scope:"markup.deleted",settings:{foreground:"#a31515"}},{scope:"markup.changed",settings:{foreground:"#0451a5"}},{scope:["punctuation.definition.quote.begin.markdown","punctuation.definition.list.begin.markdown"],settings:{foreground:"#0451a5"}},{scope:"markup.inline.raw",settings:{foreground:"#800000"}},{name:"brackets of XML/HTML tags",scope:"punctuation.definition.tag",settings:{foreground:"#800000"}},{scope:["meta.preprocessor","entity.name.function.preprocessor"],settings:{foreground:"#0000ff"}},{scope:"meta.preprocessor.string",settings:{foreground:"#a31515"}},{scope:"meta.preprocessor.numeric",settings:{foreground:"#098658"}},{scope:"meta.structure.dictionary.key.python",settings:{foreground:"#0451a5"}},{scope:"storage",settings:{foreground:"#0000ff"}},{scope:"storage.type",settings:{foreground:"#0000ff"}},{scope:["storage.modifier","keyword.operator.noexcept"],settings:{foreground:"#0000ff"}},{scope:["string","meta.embedded.assembly"],settings:{foreground:"#a31515"}},{scope:["string.comment.buffered.block.pug","string.quoted.pug","string.interpolated.pug","string.unquoted.plain.in.yaml","string.unquoted.plain.out.yaml","string.unquoted.block.yaml","string.quoted.single.yaml","string.quoted.double.xml","string.quoted.single.xml","string.unquoted.cdata.xml","string.quoted.double.html","string.quoted.single.html","string.unquoted.html","string.quoted.single.handlebars","string.quoted.double.handlebars"],settings:{foreground:"#0000ff"}},{scope:"string.regexp",settings:{foreground:"#811f3f"}},{name:"String interpolation",scope:["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end","punctuation.section.embedded"],settings:{foreground:"#0000ff"}},{name:"Reset JavaScript string interpolation expression",scope:["meta.template.expression"],settings:{foreground:"#000000"}},{scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{scope:["support.type.vendored.property-name","support.type.property-name","variable.css","variable.scss","variable.other.less","source.coffee.embedded"],settings:{foreground:"#ff0000"}},{scope:["support.type.property-name.json"],settings:{foreground:"#0451a5"}},{scope:"keyword",settings:{foreground:"#0000ff"}},{scope:"keyword.control",settings:{foreground:"#0000ff"}},{scope:"keyword.operator",settings:{foreground:"#000000"}},{scope:["keyword.operator.new","keyword.operator.expression","keyword.operator.cast","keyword.operator.sizeof","keyword.operator.alignof","keyword.operator.typeid","keyword.operator.alignas","keyword.operator.instanceof","keyword.operator.logical.python","keyword.operator.wordlike"],settings:{foreground:"#0000ff"}},{scope:"keyword.other.unit",settings:{foreground:"#098658"}},{scope:["punctuation.section.embedded.begin.php","punctuation.section.embedded.end.php"],settings:{foreground:"#800000"}},{scope:"support.function.git-rebase",settings:{foreground:"#0451a5"}},{scope:"constant.sha.git-rebase",settings:{foreground:"#098658"}},{name:"coloring of the Java import and package identifiers",scope:["storage.modifier.import.java","variable.language.wildcard.java","storage.modifier.package.java"],settings:{foreground:"#000000"}},{name:"this.self",scope:"variable.language",settings:{foreground:"#0000ff"}},{name:"Function declarations",scope:["entity.name.function","support.function","support.constant.handlebars","source.powershell variable.other.member","entity.name.operator.custom-literal"],settings:{foreground:"#795E26"}},{name:"Types declaration and references",scope:["meta.return-type","support.class","support.type","entity.name.type","entity.name.namespace","entity.other.attribute","entity.name.scope-resolution","entity.name.class","storage.type.numeric.go","storage.type.byte.go","storage.type.boolean.go","storage.type.string.go","storage.type.uintptr.go","storage.type.error.go","storage.type.rune.go","storage.type.cs","storage.type.generic.cs","storage.type.modifier.cs","storage.type.variable.cs","storage.type.annotation.java","storage.type.generic.java","storage.type.java","storage.type.object.array.java","storage.type.primitive.array.java","storage.type.primitive.java","storage.type.token.java","storage.type.groovy","storage.type.annotation.groovy","storage.type.parameters.groovy","storage.type.generic.groovy","storage.type.object.array.groovy","storage.type.primitive.array.groovy","storage.type.primitive.groovy"],settings:{foreground:"#267f99"}},{name:"Types declaration and references, TS grammar specific",scope:["meta.type.cast.expr","meta.type.new.expr","support.constant.math","support.constant.dom","support.constant.json","entity.other.inherited-class"],settings:{foreground:"#267f99"}},{name:"Control flow / Special keywords",scope:["keyword.control","source.cpp keyword.operator.new","source.cpp keyword.operator.delete","keyword.other.using","keyword.other.operator","entity.name.operator"],settings:{foreground:"#AF00DB"}},{name:"Variable and parameter name",scope:["variable","meta.definition.variable.name","support.variable","entity.name.variable","constant.other.placeholder"],settings:{foreground:"#001080"}},{name:"Constants and enums",scope:["variable.other.constant","variable.other.enummember"],settings:{foreground:"#0070C1"}},{name:"Object keys, TS grammar specific",scope:["meta.object-literal.key"],settings:{foreground:"#001080"}},{name:"CSS property value",scope:["support.constant.property-value","support.constant.font-name","support.constant.media-type","support.constant.media","constant.other.color.rgb-value","constant.other.rgb-value","support.constant.color"],settings:{foreground:"#0451a5"}},{name:"Regular expression groups",scope:["punctuation.definition.group.regexp","punctuation.definition.group.assertion.regexp","punctuation.definition.character-class.regexp","punctuation.character.set.begin.regexp","punctuation.character.set.end.regexp","keyword.operator.negation.regexp","support.other.parenthesis.regexp"],settings:{foreground:"#d16969"}},{scope:["constant.character.character-class.regexp","constant.other.character-class.set.regexp","constant.other.character-class.regexp","constant.character.set.regexp"],settings:{foreground:"#811f3f"}},{scope:"keyword.operator.quantifier.regexp",settings:{foreground:"#000000"}},{scope:["keyword.operator.or.regexp","keyword.control.anchor.regexp"],settings:{foreground:"#EE0000"}},{scope:"constant.character",settings:{foreground:"#0000ff"}},{scope:"constant.character.escape",settings:{foreground:"#EE0000"}},{scope:"entity.name.label",settings:{foreground:"#000000"}}],colors:{"activityBar.activeBorder":"#151b2114","activityBar.activeForeground":"#FFFFFF","activityBar.background":"#00000000","activityBar.border":"#252729","activityBar.disableForeground":"#5F656B","activityBar.dropBackground":"#43484D","activityBar.foreground":"#151b21","activityBar.inactiveForeground":"#151b21a6","activityBarBadge.background":"#3C8DFF","activityBarBadge.foreground":"#FFFFFF","badge.background":"#151b5814","badge.foreground":"#151b21a6","breadcrumb.background":"#fff","breadcrumb.foreground":"#5d646c","checkbox.background":"#fff","checkbox.border":"#151b2129",descriptionForeground:"#151b21a6","diffEditor.insertedTextBackground":"#12A7A740","editorGroup.border":"#151b2133","editorGroup.dropBackground":"#5F656B40","editorGroup.emptyBackground":"#ffffff","editorGroupHeader.tabsBackground":"#DDE8F4","editorSuggestWidget.selectedBackground":"#6eb6fa40",errorForeground:"#D21F28",focusBorder:"#151b2129",foreground:"#151b21d9","editorCommentsWidget.unresolvedBorder":"#4d9ded","gitDecoration.addedResourceForeground":"#52c41a","gitDecoration.modifiedResourceForeground":"#faad14","gitDecoration.deletedResourceForeground":"#fa541c","gitDecoration.untrackedResourceForeground":"#13c2c2","gitDecoration.ignoredResourceForeground":"#666666","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.submoduleResourceForeground":"#1785eb","icon.foreground":"#151b21d9","input.background":"#fff","input.foreground":"#151b21","input.placeholderForeground":"#151b2173","inputDropdown.searchMatchForeground":"#3895EB","inputIcon.foreground":"#5F656B","inputValidation.errorBackground":"#321115","inputValidation.errorBorder":"#D21F28","inputValidation.errorForeground":"#D7DBDE","inputValidation.errorText":"#D21F28","inputValidation.warningBackground":"#fff","inputValidation.warningBorder":"#DBA936","inputValidation.warningText":"#DBA936","inputValidation.warningForeground":"#151b21","keybinding.background":"#5F656B33","kt.accentForeground":"#FFFFFF","kt.actionbar.disableForeground":"#5F656B","kt.actionbar.foreground":"#151b21a6","kt.actionbar.selectionBorder":"#1A66AC","kt.actionbar.separatorBackground":"#5F656B40","kt.activityBar.dropUpBackground":"#1F507D","kt.button.disableBackground":"#151b210a","kt.button.disableBorder":"#151b2114","kt.button.disableForeground":"#151b2159","kt.checkbox.disableBackground":"#5F656B40","kt.checkbox.disableForeground":"#5F656B","kt.checkbox.hoverBorder":"#167CDB","kt.checkbox.selectionBackground":"#167CDB","kt.checkbox.selectionForeground":"#FFFFFF","kt.dangerButton.background":"#DB4345","kt.dangerButton.clickBackground":"#D21F28","kt.dangerButton.foreground":"#FFFFFF","kt.dangerButton.hoverBackground":"#F37370","kt.dangerGhostButton.border":"#DB4345","kt.dangerGhostButton.clickBorder":"#D21F28","kt.dangerGhostButton.clickForeground":"#D21F28","kt.dangerGhostButton.foreground":"#DB4345","kt.dangerGhostButton.hoverBorder":"#F37370","kt.dangerGhostButton.hoverForeground":"#F37370","kt.dirtyDot.foreground":"#868C91","kt.disableForeground":"#5F656B","kt.editorBreadcrumb.borderDown":"#e9e9e914","kt.errorBackground":"#D21F2840","kt.errorIconForeground":"#DB4345","kt.hintBackground":"#5F656B40","kt.hintIconForeground":"#868C91","kt.icon.clickForeground":"#D7DBDE","kt.icon.disableForeground":"#5F656B","kt.icon.foreground":"#151b21a6","kt.icon.hoverBackground":"#151b2114","kt.icon.hoverForeground":"#151b21d9","kt.icon.secondaryForeground":"#868C91","kt.infoBackground":"#167CDB40","kt.infoIconForeground":"#3895EB","kt.input.border":"#151b2129","kt.input.disableBackground":"#151b210a","kt.input.disableForeground":"#151b2159","kt.input.selectionBackground":"#1A66AC","kt.linkButton.clickForeground":"#167CDB","kt.linkButton.disableForeground":"#5F656B","kt.linkButton.foreground":"#3895EB","kt.linkButton.hoverForeground":"#67ABEB","kt.menu.descriptionForeground":"#868C91","kt.menu.disableForeground":"#5F656B","kt.menubar.background":"#00000000","kt.menubar.border":"#252729","kt.menubar.foreground":"#D7DBDE","kt.menubar.separatorBackground":"#5F656B40","kt.modal.background":"#fff","kt.modal.foreground":"#151b21d9","kt.modal.separatorBackground":"#2C3033","kt.modalErrorIcon.foreground":"#DB4345","kt.modalInfoIcon.foreground":"#3895EB","kt.modalSuccessIcon.foreground":"#64B436","kt.modalWarningIcon.foreground":"#DBA936","kt.panel.secondaryForeground":"#151b21a6","kt.panelTab.activeBackground":"#fff","kt.panelTab.activeForeground":"#151b21","kt.panelTab.border":"#151b2114","kt.panelTab.inactiveBackground":"#00000000","kt.panelTab.inactiveForeground":"#151b21d9","kt.panelTitle.background":"#fff","kt.popover.background":"#000000e3","kt.popover.border":"#000000e3","kt.popover.foreground":"#fffffff2","kt.popover.prominentBackground":"#2C3033","kt.defaultButton.background":"#fafafb","kt.defaultButton.border":"#00000000","kt.defaultButton.clickBackground":"#fafafb","kt.defaultButton.clickBorder":"#00000000","kt.defaultButton.disableBackground":"#fff","kt.defaultButton.disableBorder":"#00000000","kt.defaultButton.disableForeground":"#151b2159","kt.defaultButton.foreground":"#000a1aff","kt.defaultButton.hoverBackground":"#F5F5F6","kt.defaultButton.hoverBorder":"#00000000","kt.defaultButton.selectionBackground":"#fff","kt.defaultButton.selectionForeground":"#151b21","kt.primaryButton.background":"#3c8dff","kt.primaryButton.clickBackground":"#3c8dff","kt.primaryButton.foreground":"#fff","kt.primaryButton.hoverBackground":"#5b9fff","kt.primaryButton.border":"#00000000","kt.primaryGhostButton.clickBorder":"#3c8dff","kt.primaryGhostButton.clickForeground":"#167CDB","kt.primaryGhostButton.clickBackground":"#fff","kt.primaryGhostButton.foreground":"#3895EB","kt.primaryGhostButton.border":"#3c8dff","kt.primaryGhostButton.background":"#fff","kt.secondaryButton.border":"#00000026","kt.secondaryButton.clickBorder":"#00000026","kt.secondaryButton.clickForeground":"#151b21","kt.secondaryButton.foreground":"#151b21d9","kt.secondaryButton.background":"#fff","kt.secondaryButton.hoverBorder":"#00000026","kt.secondaryButton.hoverForeground":"#151b21","kt.select.background":"#fff","kt.select.border":"#151b2129","kt.select.disableBackground":"#151b2114","kt.select.disableForeground":"#151b2159","kt.select.foreground":"#151b21","kt.select.placeholderForeground":"#151b2173","kt.selectDropdown.background":"#fff","kt.selectDropdown.foreground":"#151b21","kt.selectDropdown.hoverBackground":"#151b2114","kt.selectDropdown.selectionBackground":"#151b2114","kt.selectDropdown.selectionForeground":"#151b21","kt.selectOption.activeBorder":"#167CDB","kt.statusbar.offline.background":"#DB4345","kt.successBackground":"#48A91840","kt.successIconForeground":"#64B436","kt.tab.activeBorder":"#167CDB","kt.tab.activeForeground":"#151b21","kt.tab.borderDown":"#151b211f","kt.tab.inactiveForeground":"#151b21a6","kt.tree.activeSelectionBackground":"#1A66AC","kt.tree.activeSelectionForeground":"#FFFFFF","kt.tree.hoverBackground":"#151b5814","kt.tree.hoverForeground":"#151b21","kt.tree.inactiveSelectionBackground":"#151b5814","kt.tree.inactiveSelectionForeground":"#151b21","kt.warningBackground":"#D7951340","kt.warningIconForeground":"#DBA936","kt.whiteGhostButton.border":"#FFFFFF","kt.whiteGhostButton.clickBorder":"#FFFFFFA6","kt.whiteGhostButton.clickForeground":"#FFFFFFA6","kt.whiteGhostButton.disableBackground":"#FFFFFF03","kt.whiteGhostButton.disableBorder":"#FFFFFF40","kt.whiteGhostButton.disableForeground":"#FFFFFF40","kt.whiteGhostButton.foreground":"#FFFFFF","list.activeSelectionBackground":"#1A66AC","list.activeSelectionForeground":"#e1e4e8","list.evenItemBackground":"#5F656B14","list.headerBackground":"#5F656B1F","list.hoverBackground":"#151b5814","menu.background":"#FFFFFF","menu.foreground":"#151b21","menu.selectionBackground":"#151b2114","menu.selectionForeground":"#151b21","menu.separatorBackground":"#151b211f","menubar.selectionBackground":"#151b2114","menubar.selectionForeground":"#151b21","message.background":"#151b21d9","message.foreground":"#D7DBDE","messageErrorIcon.foreground":"#DB4345","messageInfoIcon.foreground":"#3895EB","messageSuccessIcon.foreground":"#64B436","messageWarningIcon.foreground":"#DBA936","notifications.background":"#fff","notifications.foreground":"#151b21d9","notificationsErrorIcon.foreground":"#DB4345","notificationsInfoIcon.foreground":"#3895EB","notificationsWarningIcon.foreground":"#DBA936","panel.background":"#fff","panel.border":"#43484D","panel.foreground":"#151b21","panel.selectionBackground":"#5F656B40","panel.separatorBackground":"#2C3033","panelMenuBadge.background":"#00000040","panelMenuBar.background":"#2C3033","panelMenuBarBadge.foreground":"#5F656B40","panelTabBarActionIcon.Background":"#868C91","panelTabBarError.foreground":"#DB4345","panelTitle.activeBorder":"#3c8dff","panelTitle.activeForeground":"#151b21","panelTitle.hoverForeground":"#FFFFFF","panelTitle.inactiveForeground":"#151b21a6","selectDropdown.descriptionForeground":"#868C91","selectDropdown.teamForeground":"#868C91","sideBar.background":"#00000000","sideBar.border":"#151b211f","sideBar.dropBackground":"#43484D","sideBar.dropUpBackground":"#1F507D","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.foreground":"#151b21d9","sideBarTitle.foreground":"#151b21d9","statusBar.background":"#00000000","statusBar.debuggingBackground":"#D77915","statusBar.foreground":"#151b21a6","statusBar.noFolderBackground":"#43484D","statusBarItem.activeBackground":"#FFFFFF40","statusBarItem.hoverBackground":"#FFFFFF03","statusBarItem.remoteBackground":"#3c8dff","statusBarItem.prominentForeground":"#151b21a6","statusBarItem.prominentBackground":"#f1f1f180","tab.activeBackground":"#ffffff","tab.activeForeground":"#151b21","tab.border":"#e9e9e914","tab.inactiveBackground":"#00000000","tab.inactiveForeground":"#151b21d9","tab.hoverBackground":"#00000000","tab.unfocusedActiveBackground":"#202224","tab.unfocusedActiveForeground":"#868C91","tab.unfocusedInactiveForeground":"#868C91","terminal.background":"#FFFFFF","terminal.border":"#252729","terminal.foreground":"#151b21","terminal.offlineBackground":"#D21F2840","terminal.offlineForeground":"#868C91","terminal.offlineLinkForeground":"#3895EB","terminal.selectionBackground":"#5F656B40","tooltip.background":"#35393D","tooltip.foreground":"#D7DBDE","widget.shadow":"#00000099","list.focusOutline":"#00000000","editorInlayHint.parameterBackground":"#00000000","button.background":"#ffffff14","scrollbarSlider.background":"#151b211f","editor.background":"#F1F2F3","quickInput.background":"#fff","list.focusBackground":"#151b5814","textLink.foreground":"#3c8dff","editorStickyScroll.background":"#fff"},semanticHighlighting:!0,semanticTokenColors:{newOperator:"#d4d4d4",stringLiteral:"#ce9178",customLiteral:"#D4D4D4",numberLiteral:"#b5cea8"},encodedTokensColors:[],rules:[],base:"vs",designThemeType:"design-light",inherit:!0,hasDefaultTokens:!1,id:"opensumi-design-light-theme",name:"OpenSumi Design Light+ (default light)"}},98741:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.overrideMonacoColorToken=e.overrideColorToken=void 0;const n=t(85608),a=t(52416),o=n.__importDefault(t(13925)),c=n.__importDefault(t(63080)),g=()=>{const G=(0,a.getColorRegistry)();G.getColors().forEach(({id:p})=>{if(o.default.colors[p]&&c.default.colors[p]){const h=G.getColor(p);(0,a.registerColor)(p,{dark:o.default.colors[p],light:c.default.colors[p],hcDark:h.defaults.hcDark||null,hcLight:h.defaults.hcLight||null},h.description)}})};e.overrideColorToken=g;const u=()=>{(0,a.registerColor)("vscode.quickInputList.focusBackground",{light:"#151b2114",dark:"#5F656B40",hcDark:null,hcLight:null},"Quick picker background color for the focused item."),(0,a.registerColor)("quickInputList.focusForeground",{dark:"#ffffff",light:"#151b21",hcDark:null,hcLight:null},"Quick picker foreground color for the focused item.")};e.overrideMonacoColorToken=u},66338:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DESIGN_MENU_BAR_LEFT=e.DESIGN_MENU_BAR_RIGHT=e.DESIGN_MENUBAR_CONTAINER_VIEW_ID=void 0,e.DESIGN_MENUBAR_CONTAINER_VIEW_ID="design_menubar",e.DESIGN_MENU_BAR_RIGHT="design_menu_bar_right",e.DESIGN_MENU_BAR_LEFT="design_menu_bar_left"},38879:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(66338),e)},82353:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(38879),e)},87802:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findCurrentDocumentSymbol=e.DefaultBreadCrumbProvider=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(26542),u=t(79929),G=t(97408),p=t(82196),h=t(17459),{Path:b}=c.path;let I=class extends c.WithEventBus{constructor(){super(...arguments),this._onDidUpdateBreadCrumb=new c.Emitter,this.onDidUpdateBreadCrumb=this._onDidUpdateBreadCrumb.event,this.debouncedFireUriEvent=new Map,this.cachedBreadCrumb=new c.LRUMap(200,100)}handlesUri(v){return this.fileServiceClient.handlesScheme(v.scheme)}provideBreadCrumbForUri(v,f){return this.getFileParts(v).concat(this.getDocumentSymbolParts(v,f))}getFileParts(v){const f=this.workspaceService.workspace?new c.URI(this.workspaceService.workspace.uri):void 0;let N,W;f&&f.isEqualOrParent(v)?(N=f,W=f.relative(v)):(N=c.URI.from({scheme:v.scheme,authority:v.authority}),W=v.path);let Z=N.path;const y=[];for(const E of W.toString().split(b.separator).filter(R=>!!R)){Z=Z.join(E);const R=N.withPath(Z);y.push(this.createFilePartBreadCrumbUri(R,!R.isEqual(v)))}return y}createFilePartBreadCrumbUri(v,f){const N=v.toString();if(this.cachedBreadCrumb.has(N))return this.cachedBreadCrumb.get(N);const W={name:v.path.base,uri:v,icon:this.labelService.getIcon(v,{isDirectory:f}),getSiblings:async()=>{const Z=c.URI.from({scheme:v.scheme}).withPath(v.path.dir),y=await this.fileServiceClient.getFileStat(Z.toString()),E=[];let R=-1;return y&&y.children&&y.children.length>0&&l(y.children).forEach((A,w)=>{E.push(this.createFilePartBreadCrumbUri(new c.URI(A.uri),A.isDirectory)),R===-1&&v.toString()===A.uri&&(R=w)}),{parts:E,currentIndex:R}}};return f?W.getChildren=async()=>{const Z=await this.fileServiceClient.getFileStat(v.toString()),y=[];return Z&&Z.children&&Z.children.length>0&&l(Z.children).forEach((E,R)=>{y.push(this.createFilePartBreadCrumbUri(new c.URI(E.uri),E.isDirectory))}),y}:W.onClick=()=>{this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,v)},this.cachedBreadCrumb.set(N,W),W}getDocumentSymbolParts(v,f){if(!f)return[];const N=this.documentSymbolStore.getDocumentSymbol(v);if(N&&N.length>0){const W=r(N,f.monacoEditor.getPosition());return W.length>0?W.map(Z=>this.createFromDocumentSymbol(Z,f)):[{name:"...",getSiblings:()=>({parts:N.sort((Z,y)=>d(Z.range,y.range)).map(Z=>this.createFromDocumentSymbol(Z,f)),currentIndex:-1})}]}else return[]}createFromDocumentSymbol(v,f){const N={name:v.name,icon:(0,c.getSymbolIcon)(v.kind),isSymbol:!0,onClick:()=>{f.setSelection({startColumn:v.range.startColumn,endColumn:v.range.startColumn,startLineNumber:v.range.startLineNumber,endLineNumber:v.range.startLineNumber}),f.monacoEditor.revealRangeInCenter(v.range),f.monacoEditor.focus()}};return v.parent&&(N.getSiblings=()=>({parts:v.parent.children.sort((W,Z)=>d(W.range,Z.range)).map(W=>this.createFromDocumentSymbol(W,f)),currentIndex:v.parent.children.indexOf(v)})),v.children&&v.children.length>0&&(N.getChildren=()=>v.children.sort((W,Z)=>d(W.range,Z.range)).map(W=>this.createFromDocumentSymbol(W,f))),N}onDocumentSymbolChangedEvent(v){this.notifyUpdate(v.payload)}onEditorSelectionChangeEvent(v){this.notifyUpdate(v.payload.editorUri)}notifyUpdate(v){this.debouncedFireUriEvent.has(v.toString())||this.debouncedFireUriEvent.set(v.toString(),(0,a.default)(()=>{this._onDidUpdateBreadCrumb.fire(v)},100,{maxWait:1e3})),this.debouncedFireUriEvent.get(v.toString())()}};n.__decorate([(0,o.Autowired)(u.IFileServiceClient),n.__metadata("design:type",Object)],I.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(G.IWorkspaceService),n.__metadata("design:type",Object)],I.prototype,"workspaceService",void 0),n.__decorate([(0,o.Autowired)(g.LabelService),n.__metadata("design:type",g.LabelService)],I.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],I.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",h.DocumentSymbolStore)],I.prototype,"documentSymbolStore",void 0),n.__decorate([(0,c.OnEvent)(h.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[h.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],I.prototype,"onDocumentSymbolChangedEvent",null),n.__decorate([(0,c.OnEvent)(p.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],I.prototype,"onEditorSelectionChangeEvent",null),I=n.__decorate([(0,o.Injectable)()],I),e.DefaultBreadCrumbProvider=I;function r(m,v){const f=[];if(!v)return f;let N=m;for(;N&&N.length>0;){let W=!1;for(const Z of N)if(s(v,Z.range)){f.push(Z),N=Z.children,W=!0;break}if(!W)break}return f}e.findCurrentDocumentSymbol=r;function l(m){return m.sort((v,f)=>{if(v.isDirectory&&f.isDirectory||!v.isDirectory&&!f.isDirectory){const N=new c.URI(v.uri).path.name,W=new c.URI(f.uri).path.name;return N.localeCompare(W,"kn",{numeric:!0})}else return v.isDirectory&&!f.isDirectory?-1:!v.isDirectory&&f.isDirectory?1:0})}function s(m,v){return m.lineNumber<v.startLineNumber?!1:m.lineNumber===v.startLineNumber?m.column>=v.startColumn:m.lineNumber<v.endLineNumber?!0:m.lineNumber===v.endLineNumber?m.column<=v.endColumn:!1}function d(m,v){return m.startLineNumber>v.startLineNumber?1:m.startLineNumber<v.startLineNumber?-1:m.startColumn===v.startColumn?0:m.startColumn>v.startColumn?1:-1}},17459:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolTag=e.DocumentSymbolChangedEvent=e.DocumentSymbolStore=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(79865),u=t(48069);Object.defineProperty(e,"SymbolTag",{enumerable:!0,get:function(){return u.SymbolTag}});const G=t(23418),p=t(96689);let h=class extends c.WithEventBus{constructor(){super(),this.documentSymbols=new Map,this.pendingUpdate=new Set,this.debounced=new Map,this.symbolDeferred=new Map,this.addDispose(g.languageFeaturesService.documentSymbolProvider.onDidChange(()=>{Array.from(this.documentSymbols.keys()).forEach(s=>{this.markNeedUpdate(new c.URI(s))})}))}getDocumentSymbol(s){return this.documentSymbols.has(s.toString())||(this.documentSymbols.set(s.toString(),void 0),this.createDocumentSymbolCache(s)),this.pendingUpdate.has(s.toString())&&this.updateDocumentSymbolCache(s),this.documentSymbols.get(s.toString())}async getDocumentSymbolAsync(s,d){var m;const v=s.toString();return d&&d.onCancellationRequested(()=>{var f;(f=this.symbolDeferred.get(v))===null||f===void 0||f.resolve(),this.symbolDeferred.delete(v)}),(!this.documentSymbols.has(v)||this.pendingUpdate.has(v))&&!this.symbolDeferred.has(v)&&(this.symbolDeferred.set(v,new c.Deferred),this.updateDocumentSymbolCache(s)),await((m=this.symbolDeferred.get(v))===null||m===void 0?void 0:m.promise),this.documentSymbols.get(v)}async createDocumentSymbolCache(s){this.updateDocumentSymbolCache(s)}async doUpdateDocumentSymbolCache(s){var d,m;this.pendingUpdate.delete(s.toString());const v=await this.editorDocumentModelRegistry.createModelReference(s);if(!v){(d=this.symbolDeferred.get(s.toString()))===null||d===void 0||d.resolve();return}try{const f=g.languageFeaturesService.documentSymbolProvider.all(v.instance.getMonacoModel());let N;for(const W of f)if(N=await W.provideDocumentSymbols(v.instance.getMonacoModel(),new c.CancellationTokenSource().token),N)break;N&&I(N,{children:N},s),this.documentSymbols.set(s.toString(),N),this.eventBus.fire(new b(s))}finally{v.dispose()}(m=this.symbolDeferred.get(s.toString()))===null||m===void 0||m.resolve()}updateDocumentSymbolCache(s){this.debounced.has(s.toString())||this.debounced.set(s.toString(),(0,a.default)(()=>this.doUpdateDocumentSymbolCache(s),100,{maxWait:1e3})),this.debounced.get(s.toString())()}onEditorDocumentModelContentChangedEvent(s){s.payload.changes&&s.payload.changes.length>0&&this.markNeedUpdate(s.payload.uri)}markNeedUpdate(s){this.pendingUpdate.add(s.toString()),this.isWatching(s)&&this.updateDocumentSymbolCache(s)}isWatching(s){for(const d of this.editorService.editorGroups)if(d.currentResource&&d.currentResource.uri.isEqual(s))return!0;return!1}};n.__decorate([(0,o.Autowired)(p.IEditorDocumentModelService),n.__metadata("design:type",Object)],h.prototype,"editorDocumentModelRegistry",void 0),n.__decorate([(0,o.Autowired)(G.WorkbenchEditorService),n.__metadata("design:type",G.WorkbenchEditorService)],h.prototype,"editorService",void 0),n.__decorate([(0,c.OnEvent)(p.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],h.prototype,"onEditorDocumentModelContentChangedEvent",null),h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h),e.DocumentSymbolStore=h;class b extends c.BasicEvent{}e.DocumentSymbolChangedEvent=b;function I(l,s,d){return l.forEach((m,v)=>{const f=m;f.parent=s,f.id=r(d,f,v),m.children&&m.children.length>0&&I(m.children,m,d)}),l}function r(l,s,d){const m=[s.name];for(;s.parent;){const v=s.parent;if(!v.name)break;m.unshift(v.name),s=v}return`${l.toString()}__${m.join("-")}__${d}`}},88895:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadCrumbServiceImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(87802),{addElement:g}=o.arrays;let u=class{constructor(){this.providers=[],this._onDidUpdateBreadCrumbResults=new o.Emitter,this.onDidUpdateBreadCrumbResults=this._onDidUpdateBreadCrumbResults.event,this.crumbResults=new Map,this.registerBreadCrumbProvider(this.defaultBreadCrumbProvider)}registerBreadCrumbProvider(b){const I=g(this.providers,b);return b.onDidUpdateBreadCrumb(r=>{this.crumbResults.forEach((l,s)=>{l.has(r.toString())&&this.getBreadCrumbs(r,s)})}),I}getBreadCrumbs(b,I){const r=this.getEditorCrumbResults(I);for(const l of this.providers)if(l.handlesUri(b)){const s=r.get(b.toString()),d=l.provideBreadCrumbForUri(b,I);G(s,d)||(r.set(b.toString(),d),this._onDidUpdateBreadCrumbResults.fire({editor:I,uri:b}));break}return r.get(b.toString())}getEditorCrumbResults(b){return this.crumbResults.has(b)||(this.crumbResults.set(b,new Map),b&&b.monacoEditor.onDidDispose(()=>{this.crumbResults.delete(b)})),this.crumbResults.get(b)}disposeCrumb(b){}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",c.DefaultBreadCrumbProvider)],u.prototype,"defaultBreadCrumbProvider",void 0),u=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],u),e.BreadCrumbServiceImpl=u;function G(h,b){if(!h&&!b)return!0;if(!h||!b)return!1;if(h.length!==b.length)return!1;for(let I=0;I<h.length;I++)if(!p(h[I],b[I]))return!1;return!0}function p(h,b){return h.name===b.name}},11673:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorComponentRegistryImpl=void 0;const n=t(85608),a=n.__importDefault(t(46343)),o=n.__importDefault(t(19106)),c=n.__importDefault(t(43144)),g=t(76003),u=t(43718),G=t(82196);let p=class{constructor(){this.components=new Map,this.sideWidgets={bottom:new Set,top:new Set},this.initialPropsMap=new Map,this.resolvers=new Map,this.normalizedResolvers=[],this.perWorkbenchComponents={}}registerEditorComponent(b,I){const r=b.uid;return b.renderMode||(b.renderMode=G.EditorComponentRenderMode.ONE_PER_GROUP),this.components.set(r,b),this.initialPropsMap.set(r,I),this.eventBus.fire(new u.ExtensionActivateEvent({topic:"onRegisterEditorComponent",data:r})),this.eventBus.fire(new G.RegisterEditorComponentEvent(r)),{dispose:()=>{this.components.get(r)===b&&(this.components.delete(r),this.eventBus.fire(new G.EditorComponentDisposeEvent(b)))}}}registerEditorComponentResolver(b,I){let r;return typeof b=="function"?r={handleScheme:b,resolver:I}:r={handleScheme:l=>l===b?10:-1,resolver:I},this.normalizedResolvers.push(r),this.resolvers.clear(),{dispose:()=>{for(const s of this.resolvers.values()){const d=s.indexOf(I);d!==-1&&s.splice(d,1)}const l=this.normalizedResolvers.indexOf(r);l!==-1&&this.normalizedResolvers.splice(l,1)}}}async resolveEditorComponent(b){let I=[];const r=this.getResolvers(b.uri.scheme).slice();let l=!1;const s=d=>{I=d,l=!0};for(const d of r)if(await d(b,I,s),l)break;return I.sort((d,m)=>{const v=d.weight||0;return(m.weight||0)-v}),(0,o.default)(I,a.default)}calculateSchemeResolver(b){const I=this.normalizedResolvers.slice(),r=[];return I.forEach((l,s)=>{const d=l.handleScheme(b);d>=0&&r.push({weight:d,index:s,resolver:l.resolver})}),r.sort((l,s)=>l.weight>s.weight?-1:l.weight<s.weight?1:s.index-l.index).map(l=>l.resolver)}getResolvers(b){return this.resolvers.has(b)||this.resolvers.set(b,this.calculateSchemeResolver(b)),this.resolvers.get(b)}getEditorComponent(b){return this.components.get(b)||null}getEditorInitialProps(b){return this.initialPropsMap.get(b)||null}clearPerWorkbenchComponentCache(b){c.default.unmountComponentAtNode(this.perWorkbenchComponents[b]),delete this.perWorkbenchComponents[b]}getSideWidgets(b,I){const r=[];return this.sideWidgets[b].forEach(l=>{l.displaysOnResource(I)&&r.push(l)}),r.sort((l,s)=>{const d=l.weight===void 0?10:l.weight;return(s.weight===void 0?10:s.weight)-d})}registerEditorSideWidget(b){const I=b.side||"bottom";return this.sideWidgets[I].add(b),this.eventBus.fire(new G.RegisterEditorSideComponentEvent),{dispose:()=>{this.sideWidgets[I].delete(b)}}}};n.__decorate([(0,g.Autowired)(u.IEventBus),n.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),p=n.__decorate([(0,g.Injectable)()],p),e.EditorComponentRegistryImpl=p},84677:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoEditorDecorationApplier=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(76003),c=t(43718),g=t(52416),u=t(82196);let G=class extends c.Disposable{constructor(l){super(),this.editor=l,this.decorations=new Map,this.applyDecorationFromProvider(),this.editor.onDidChangeModel(()=>{this.clearDecorations(),this.applyDecorationFromProvider()}),this.editor.onDidDispose(()=>{this.dispose()}),this.addDispose(this.eventBus.on(u.EditorDecorationChangeEvent,s=>{const d=this.getEditorUri();d&&s.payload.uri.isEqual(d)&&this.applyDecorationFromProvider(s.payload.key)})),this.addDispose(this.eventBus.on(u.EditorDecorationTypeRemovedEvent,s=>{this.deltaDecoration(s.payload,[])}))}getEditorUri(){return this.editor.getModel()?new c.URI(this.editor.getModel().uri.toString()):null}async applyDecorationFromProvider(l){if(this.editor.getModel()){const s=new c.URI(this.editor.getModel().uri.toString()),d=await this.decorationService.getDecorationFromProvider(s,l);if(!this.editor.getModel()||this.editor.getModel().uri.toString()!==s.toString())return;for(const m of Object.keys(d))this.deltaDecoration(m,d[m]);this.eventBus.fire(new u.DidApplyEditorDecorationFromProvider({key:l,uri:s}))}}dispose(){super.dispose(),this.clearDecorations()}clearDecorations(){this.decorations.forEach(l=>{l.dispose(),this.editor.deltaDecorations(l.decorations,[])}),this.decorations.clear()}deltaDecoration(l,s){let d=[];if(this.decorations.has(l)&&(d=this.decorations.get(l).decorations,this.decorations.get(l).dispose(),this.decorations.delete(l)),d.length===0&&s.length===0)return;const m=this.editor.deltaDecorations(d,s);this.decorations.set(l,{decorations:m,dispose:()=>null})}applyDecoration(l,s){const d=this.decorations.get(l);d&&d.dispose();const m=d?d.decorations:[],v=[],f=new c.Disposable;if(m.length===0&&s.length===0)return;s.forEach(W=>{const Z=this.resolveDecorationRenderer(l,W.renderOptions);v.push({range:W.range,options:Object.assign(Object.assign({},Z.options),{hoverMessage:b(W.hoverMessage)})}),f.addDispose(Z)});const N=this.editor.deltaDecorations(m,v);this.decorations.set(l,{decorations:N,dispose:()=>f.dispose()})}resolveDecorationRenderer(l,s){const d=this.decorationService.getTextEditorDecorationType(l),m={description:l},v=this.themeService.getCurrentThemeSync().type,f=new c.Disposable;if(d){const N=d.property;p(m,N,v)}if(s){const N=this.decorationService.createTextEditorDecorationType(s);p(m,N.property,v),f.addDispose(N)}return{options:m,dispose:()=>f.dispose()}}};n.__decorate([(0,o.Autowired)(u.IEditorDecorationCollectionService),n.__metadata("design:type",Object)],G.prototype,"decorationService",void 0),n.__decorate([(0,o.Autowired)(g.IThemeService),n.__metadata("design:type",Object)],G.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],G.prototype,"eventBus",void 0),G=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],G),e.MonacoEditorDecorationApplier=G;function p(r,l,s){l.overviewRulerLane&&(r.overviewRuler?r.overviewRuler.position=l.overviewRulerLane:r.overviewRuler={color:null,position:l.overviewRulerLane}),l.default&&h(r,l.default),s==="dark"&&l.dark&&h(r,l.dark),s==="light"&&l.light&&h(r,l.light),l.isWholeLine!==void 0&&(r.isWholeLine=l.isWholeLine),l.rangeBehavior&&(r.stickiness=l.rangeBehavior),r.inlineClassNameAffectsLetterSpacing=!0}function h(r,l){l.className&&(r.className=(0,a.default)(r.className,l.className)),l.inlineClassName&&(r.inlineClassName=(0,a.default)(r.inlineClassName,l.inlineClassName)),l.afterContentClassName&&(r.afterContentClassName=(0,a.default)(r.afterContentClassName,l.afterContentClassName)),l.beforeContentClassName&&(r.beforeContentClassName=(0,a.default)(r.beforeContentClassName,l.beforeContentClassName)),l.glyphMarginClassName&&(r.glyphMarginClassName=(0,a.default)(r.glyphMarginClassName,l.glyphMarginClassName)),l.overviewRulerColor&&r.overviewRuler&&(r.overviewRuler.color=l.overviewRulerColor)}function b(r){if(r)return r instanceof Array?r.map(I):I(r)}function I(r){return typeof r=="string"?{value:r,isTrusted:!0}:r}},84158:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompareEditorContribution=e.CompareService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(82196);let u=class{constructor(){this.comparing=new Map}compare(h,b,I){const r=o.URI.from({scheme:g.DIFF_SCHEME,query:o.URI.stringifyQuery({name:I,original:h,modified:b,comparing:!0})});if(!this.comparing.has(r.toString())){const l=new o.Deferred;this.comparing.set(r.toString(),l),l.promise.then(()=>{this.comparing.delete(r.toString()),this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE_ALL.id,r)})}return this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,r),this.comparing.get(r.toString()).promise}};n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],u.prototype,"commandService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.CompareService=u;let G=class{registerMenus(h){h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.ACCEPT.id,label:(0,o.localize)("editor.action.accept")},iconClass:(0,o.getIcon)("check"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.REVERT.id,label:(0,o.localize)("editor.action.revert")},iconClass:(0,o.getIcon)("rollback"),group:"navigation",when:"isInDiffEditor && diffResource =~ /%26comparing%3Dtrue$/"}]),h.registerMenuItems(c.MenuId.EditorTitle,[{command:{id:o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS.id,label:(0,o.localize)("diffEditor.action.toggleCollapseUnchangedRegions")},toggledWhen:"config.diffEditor.hideUnchangedRegions.enabled",iconClass:"codicon codicon-map",group:"navigation",when:"isInDiffEditor"}])}registerCommands(h){h.registerCommand(o.DIFF_EDITOR_COMMANDS.ACCEPT,{execute:b=>{b&&this.compareService.comparing.has(b.toString())&&this.compareService.comparing.get(b.toString()).resolve(g.CompareResult.accept)}}),h.registerCommand(o.DIFF_EDITOR_COMMANDS.REVERT,{execute:b=>{b&&this.compareService.comparing.has(b.toString())&&this.compareService.comparing.get(b.toString()).resolve(g.CompareResult.revert)}}),h.registerCommand(o.DIFF_EDITOR_COMMANDS.TOGGLE_COLLAPSE_UNCHANGED_REGIONS,{execute:()=>{const b=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");this.preferenceService.set("diffEditor.hideUnchangedRegions.enabled",!b)}})}};n.__decorate([(0,a.Autowired)(g.ICompareService),n.__metadata("design:type",u)],G.prototype,"compareService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],G.prototype,"preferenceService",void 0),G=n.__decorate([(0,o.Domain)(c.MenuContribution,o.CommandContribution)],G),e.CompareEditorContribution=G},57581:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDiffEditorContribution=e.DiffResourceProvider=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(26542),g=t(14951),u=t(23418),G=t(82196);let p=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=u.DIFF_SCHEME,this.modifiedToResource=new Map}onResourceDecorationChangeEvent(I){I.payload.uri&&this.modifiedToResource.has(I.payload.uri.toString())&&this.eventBus.fire(new u.ResourceDecorationNeedChangeEvent({uri:this.modifiedToResource.get(I.payload.uri.toString()),decoration:I.payload.decoration}))}async getCurrentUserHome(){if(!this.userhomePath)try{const I=await this.fileServiceClient.getCurrentUserHome();I&&(this.userhomePath=new o.URI(I.uri))}catch{}return this.userhomePath}async getReadableTooltip(I){const r=I.toString(),l=await this.getCurrentUserHome();if(!l)return decodeURIComponent(I.withScheme("").toString());if(l.isEqualOrParent(I)){const s=l&&l.toString();return decodeURIComponent(r.replace(s,"~"))}return decodeURIComponent(I.withScheme("").toString())}async provideResource(I){const{original:r,modified:l,name:s}=I.getParsedQuery(),d=new o.URI(r),m=new o.URI(l);return this.modifiedToResource.set(m.toString(),I),Promise.all([this.labelService.getIcon(d),this.getReadableTooltip(m)]).then(([v,f])=>{var N;return{name:s,icon:v,uri:I,supportsRevive:(N=this.appConfig.enableDiffRevive)!==null&&N!==void 0?N:!0,metadata:{original:d,modified:m},title:f}})}async shouldCloseResource(I,r){const{modified:l}=I.uri.getParsedQuery(),s=new o.URI(l),d=await this.resourceService.getResource(s);return d?await this.resourceService.shouldCloseResource(d,r):!0}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",c.LabelService)],p.prototype,"labelService",void 0),n.__decorate([(0,a.Autowired)(u.ResourceService),n.__metadata("design:type",u.ResourceService)],p.prototype,"resourceService",void 0),n.__decorate([(0,a.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,o.OnEvent)(u.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationChangeEvent",null),p=n.__decorate([(0,a.Injectable)()],p),e.DiffResourceProvider=p;let h=class{registerResource(I){I.registerResourceProvider(this.diffResourceProvider)}registerEditorComponent(I){I.registerEditorComponentResolver(u.DIFF_SCHEME,(r,l)=>{l.push({type:G.EditorOpenType.diff})})}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",p)],h.prototype,"diffResourceProvider",void 0),h=n.__decorate([(0,o.Domain)(G.BrowserEditorContribution)],h),e.DefaultDiffEditorContribution=h},21690:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmptyDocCacheImpl=void 0;const n=t(85608),a=t(76003);let o=class{hasCache(g){return!1}isFlushed(){return!0}getCache(g){return null}persistCache(g,u){}};o=n.__decorate([(0,a.Injectable)()],o),e.EmptyDocCacheImpl=o},80487:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(21690),e),n.__exportStar(t(7220),e)},7220:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalStorageDocCacheImpl=void 0;const n=t(85608),a=t(76003),o=t(51500),c=t(93107);let g=class{hasCache(G){return!0}isFlushed(){return!0}async getCache(G){const p=this.parseKeyFrom(G);return await this.storageService.getData(p)||null}persistCache(G,p){const h=this.parseKeyFrom(G),b=this.parseCacheFrom(G,p);this.storageService.setData(h,b)}parseCacheFrom(G,p){if(!(!p.dirty||!p.changeMatrix.length))return{path:G.path.toString(),startMD5:p.startMD5,changeMatrix:p.changeMatrix.map(h=>h.map(b=>(0,c.parseCacheValueFrom)(b)))}}parseKeyFrom(G){return`LocalStorageDocCacheImpl_${G.toString()}`}};n.__decorate([(0,a.Autowired)(o.IWorkspaceStorageService),n.__metadata("design:type",Object)],g.prototype,"storageService",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.LocalStorageDocCacheImpl=g},86942:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentError=void 0;var t;(function(n){n.READ_CACHE_ERROR="EditorDocumentError:READ_CACHE_ERROR",n.APPLY_CACHE_TO_DIRTY_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIRTY_DOCUMENT",n.APPLY_CACHE_TO_DIFFERENT_DOCUMENT="EditorDocumentError:APPLY_CACHE_TO_DIFFERENT_DOCUMENT",n.FORMAT_ERROR="EditorDocumentError:FORMAT_ERROR"})(t=e.EditorDocumentError||(e.EditorDocumentError={}))},9519:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelServiceImpl=e.EDITOR_DOC_OPTIONS_PREF_KEY=e.EDITOR_DOCUMENT_MODEL_STORAGE=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96405),g=t(14951),u=t(91249),G=t(96689);e.EDITOR_DOCUMENT_MODEL_STORAGE=new o.URI("editor-doc").withScheme(o.STORAGE_SCHEMA.SCOPE),e.EDITOR_DOC_OPTIONS_PREF_KEY="editor_doc_pref";let p=class extends o.WithEventBus{constructor(){super(),this.editorDocModels=new Map,this.creatingEditorModels=new Map,this._modelsToDispose=new Set,this.preferredModelOptions=new Map,this._ready=this.registerDispose(new o.ReadyEvent),this.modelCreationEventDispatcher=this.registerDispose(new o.Dispatcher),this._modelReferenceManager=new o.ReferenceManager(b=>(this._modelsToDispose.has(b)&&this._modelsToDispose.delete(b),this.getOrCreateModel(b))),this._modelReferenceManager.onReferenceAllDisposed(b=>{this._delete(b)}),this._modelReferenceManager.onInstanceCreated(b=>{this.modelCreationEventDispatcher.dispatch(b.uri.toString()),this.eventBus.fire(new G.EditorDocumentModelCreationEvent({uri:b.uri,languageId:b.languageId,eol:b.eol,encoding:b.encoding,content:b.getText(),readonly:b.readonly,versionId:b.getMonacoModel().getVersionId()}))}),this.addDispose(this.preferenceService.onPreferenceChanged(b=>{b.preferenceName==="editor.detectIndentation"&&this.editorDocModels.forEach(I=>{I.updateOptions({})})}))}onDocumentModelCreated(b,I){return this.modelCreationEventDispatcher.on(b)(I)}_delete(b){const I=this.preferenceService.get("editor.modelDisposeTime",3e3);this._modelsToDispose.add(b.toString());let r=null;const l=this.addDispose({dispose:()=>{r&&clearTimeout(r)}});r=window.setTimeout(()=>{l.dispose(),r=null,this._modelsToDispose.has(b.toString())&&this._doDelete(b.toString())},I)}_doDelete(b){const I=this.editorDocModels.get(b);if(I&&(!I.dirty||I.disposeEvenDirty))return I.dispose(),this.editorDocModels.delete(b),I;this._modelsToDispose.delete(b)}async changeModelOptions(b,I){return this.onceReady(()=>{this.preferredModelOptions.has(b.toString())&&(I=Object.assign(Object.assign({},this.preferredModelOptions.get(b.toString())),I)),this.preferredModelOptions.set(b.toString(),I);const r=this.getModelReference(b);return r&&(I.encoding&&I.encoding!==r.instance.encoding&&r.instance.updateEncoding(I.encoding),I.languageId&&I.languageId!==r.instance.languageId&&(r.instance.languageId=I.languageId),I.eol&&I.eol!==r.instance.eol&&(r.instance.eol=I.eol),r.dispose()),this.persistOptionsPreference()})}persistOptionsPreference(){return this.storage.set(e.EDITOR_DOC_OPTIONS_PREF_KEY,JSON.stringify((0,o.mapToSerializable)(this.preferredModelOptions)))}async initialize(){if(this.storage=await this.getStorage(e.EDITOR_DOCUMENT_MODEL_STORAGE),this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY))try{this.preferredModelOptions=(0,o.serializableToMap)(JSON.parse(this.storage.get(e.EDITOR_DOC_OPTIONS_PREF_KEY)))}catch(b){this.logger.error(b)}this._ready.ready()}async acceptExternalChange(b){this.hashCalculateService.initialized||await this.hashCalculateService.initialize();const I=this.editorDocModels.get(b.payload.toString());if(I&&!I.dirty){const r=await this.contentRegistry.getProvider(I.uri);if(r)if(r.provideEditorDocumentModelContentMd5)await r.provideEditorDocumentModelContentMd5(I.uri,I.encoding)!==I.getBaseContentMd5()&&I.updateContent(await this.contentRegistry.getContentForUri(I.uri,I.encoding),void 0,!0);else{const l=await this.contentRegistry.getContentForUri(I.uri,I.encoding);this.hashCalculateService.calculate(l)!==I.getBaseContentMd5()&&I.updateContent(l,void 0,!0)}}}createModelReference(b,I){return this._modelReferenceManager.getReference(b.toString(),I)}getModelReference(b,I){return this._modelReferenceManager.getReferenceIfHasInstance(b.toString(),I)}getModelDescription(b,I){const r=this.getModelReference(b,I);if(!r)return null;const l=r.instance,s={alwaysDirty:l.alwaysDirty,closeAutoSave:l.closeAutoSave,disposeEvenDirty:l.disposeEvenDirty,eol:l.eol,encoding:l.encoding,dirty:l.dirty,languageId:l.languageId,readonly:l.readonly,uri:l.uri,id:l.id,savable:l.savable};return r.dispose(),s}getAllModels(){return Array.from(this.editorDocModels.values())}hasLanguage(b){return this.getAllModels().findIndex(I=>I.languageId===b)!==-1}async getOrCreateModel(b,I){return this.editorDocModels.has(b)?this.editorDocModels.get(b):this.createModel(b,I)}get onceReady(){return this.initialize(),this._ready.onceReady.bind(this._ready)}createModel(b,I){if(!this.creatingEditorModels.has(b)){const r=this.doCreateModel(b,I).then(l=>(this.creatingEditorModels.delete(b),l),l=>{throw this.creatingEditorModels.delete(b),l});this.creatingEditorModels.set(b,r)}return this.creatingEditorModels.get(b)}async doCreateModel(b,I){const r=new o.URI(b);let l=await this.contentRegistry.getProvider(r);if(l||await this.fileSystem.shouldWaitProvider(r.scheme)&&(l=await this.contentRegistry.getProvider(r)),!l)throw new Error(`No document provider found for ${r.toString()}`);const[s,d,m,v,f,N,W]=await Promise.all([l.provideEditorDocumentModelContent(r,I),l.isReadonly?l.isReadonly(r):void 0,l.preferLanguageForUri?l.preferLanguageForUri(r):void 0,l.provideEOL?l.provideEOL(r):void 0,l.isAlwaysDirty?l.isAlwaysDirty(r):!1,l.closeAutoSave?l.closeAutoSave(r):!1,l.disposeEvenDirty?l.disposeEvenDirty(r):!1]);!I&&l.provideEncoding&&(I=await l.provideEncoding(r));const Z=!!l.saveDocumentModel,y=this.injector.get(u.EditorDocumentModel,[r,s,{readonly:d,languageId:m,savable:Z,eol:v,encoding:I,alwaysDirty:f,closeAutoSave:N,disposeEvenDirty:W}]);return this.onceReady(()=>{if(this.preferredModelOptions.has(r.toString())){const E=this.preferredModelOptions.get(r.toString());E?.encoding&&y.updateEncoding(E.encoding),E?.eol&&(y.eol=E.eol),E?.languageId&&(y.languageId=E.languageId)}}),this.editorDocModels.set(r.toString(),y),y}async saveEditorDocumentModel(b,I,r,l,s,d,m){const v=await this.contentRegistry.getProvider(b);if(!v)throw new Error(`No document provider found for ${b.toString()}`);if(!v.saveDocumentModel)throw new Error(`The document provider of ${b.toString()} does not have a save method`);return await v.saveDocumentModel(b,I,r,l,s,d,m)}dispose(){super.dispose(),this.getAllModels().forEach(b=>{b.getMonacoModel().dispose()})}};n.__decorate([(0,a.Autowired)(G.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],p.prototype,"contentRegistry",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"getStorage",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(c.IHashCalculateService),n.__metadata("design:type",Object)],p.prototype,"hashCalculateService",void 0),n.__decorate([(0,a.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),n.__decorate([o.memoize,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],p.prototype,"initialize",null),n.__decorate([(0,o.OnEvent)(G.EditorDocumentModelOptionExternalUpdatedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[G.EditorDocumentModelOptionExternalUpdatedEvent]),n.__metadata("design:returntype",Promise)],p.prototype,"acceptExternalChange",null),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.EditorDocumentModelServiceImpl=p},91249:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModel=void 0;const a=t(85608),o=a.__importDefault(t(12784)),c=t(76003),g=t(41869),u=t(96405),G=t(52902),p=t(68475),h=t(72665),b=t(2261),I=t(44781),r=t(43255),l=t(88104),s=t(23418),d=t(55113),m=t(90915),v=t(82196),f=t(86942),N=t(98469),W=t(96689);let Z=n=class extends g.Disposable{constructor(E,R,A={}){super(),this.uri=E,this.saveQueue=new g.Throttler,this._encoding="utf8",this.readonly=!1,this.savable=!1,this.alwaysDirty=!1,this.closeAutoSave=!1,this.disposeEvenDirty=!1,this._originalEncoding=this._encoding,this._persistVersionId=0,this._baseContent="",this.savingTasks=[],this.dirtyChanges=[],this._isInitOption=!0,this._onDidChangeEncoding=new g.Emitter,this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.onDispose(()=>{this.eventBus.fire(new W.EditorDocumentModelRemovalEvent(this.uri))}),A.encoding&&(this._encoding=A.encoding),this.readonly=!!A.readonly,this.savable=!!A.savable,this.alwaysDirty=!!A.alwaysDirty,this.disposeEvenDirty=!!A.disposeEvenDirty,this.closeAutoSave=!!A.closeAutoSave,this.monacoModel=G.monaco.editor.createModel(R,A.languageId,G.URI.parse(E.toString())),this.editorPreferences=(0,m.createEditorPreferenceProxy)(this.preferences,this.uri.toString(),this.languageId),this.updateOptions({}),A.eol&&(this.eol=A.eol),this._originalEncoding=this._encoding,this._previousVersionId=this.monacoModel.getVersionId(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.baseContent=R,this._isInitOption=!1,this.listenTo(this.monacoModel),this.readCacheToApply(),this.addDispose(this._onDidChangeEncoding),this.addDispose(this.monacoModel.onDidChangeLanguage(w=>{this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:w.newLanguage}))}))}updateOptions(E){const R=Object.assign({tabSize:this.editorPreferences["editor.tabSize"]||1,insertSpaces:this.editorPreferences["editor.insertSpaces"],detectIndentation:this.editorPreferences["editor.detectIndentation"]},E);R.detectIndentation?this.monacoModel.detectIndentation(R.insertSpaces,R.tabSize):this.monacoModel.updateOptions(R)}listenTo(E){this.addDispose(E.onDidChangeContent(R=>{R.changes&&R.changes.length>0&&this.dirtyChanges.push({fromVersionId:this._previousVersionId,toVersionId:R.versionId,changes:R.changes}),this._previousVersionId=R.versionId,this.notifyChangeEvent(R.changes,R.isRedoing,R.isUndoing)})),this.addDispose(E)}readCacheToApply(){if(!this.cacheProvider.hasCache(this.uri))return;const E=this.cacheProvider.getCache(this.uri,this.encoding);E&&((0,g.isThenable)(E)?E.then(R=>{R&&this.applyCache(R)}).catch(R=>{this.logger.error(`${f.EditorDocumentError.READ_CACHE_ERROR} ${R&&R.message}`)}):this.applyCache(E))}applyCache(E){if(this.dirty){this.logger.error(f.EditorDocumentError.APPLY_CACHE_TO_DIRTY_DOCUMENT);return}if(this.baseContentMd5!==E.startMD5){this.logger.error(f.EditorDocumentError.APPLY_CACHE_TO_DIFFERENT_DOCUMENT);return}if((0,s.isDocContentCache)(E))this.monacoModel.setValue(E.content);else for(const R of E.changeMatrix){const A=R.map(w=>({range:(0,s.parseRangeFrom)(w),text:w[0]}));this.monacoModel.applyEdits(A)}}cleanAndUpdateContent(E){this.monacoModel.setValue(E),this.monacoModel._commandManager.clear(),this._persistVersionId=this.monacoModel.getAlternativeVersionId(),this.savingTasks=[],this.notifyChangeEvent([],!1,!1),this.baseContent=E}async updateEncoding(E){let R=!1;this._encoding!==E&&(R=!0),this._encoding=E,await this.reload(),R&&(this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,encoding:this._encoding})),this._onDidChangeEncoding.fire())}get encoding(){return this._encoding}set eol(E){this.monacoModel.setEOL(E===`
|
|
28063
28063
|
`?p.EndOfLineSequence.LF:p.EndOfLineSequence.CRLF),this._isInitOption||this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,eol:E}))}get eol(){return this.monacoModel.getEOL()}get dirty(){return this.alwaysDirty?!0:!this.savable||this.monacoModel.isDisposed()?!1:this._persistVersionId!==this.monacoModel.getAlternativeVersionId()}set languageId(E){G.monaco.editor.setModelLanguage(this.monacoModel,E),this.eventBus.fire(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:E}))}get languageId(){return this.monacoModel.getLanguageId()}get id(){return this.monacoModel.id}getMonacoModel(){return this.monacoModel}async syncDocumentModelToExtThread(){await this.eventBus.fireAndAwait(new W.EditorDocumentModelOptionChangedEvent({uri:this.uri,languageId:this.languageId,encoding:this.encoding,eol:this.eol,dirty:this.dirty}))}async save(E=!1,R=s.SaveReason.Manual){if(!this.dirty)return await this.syncDocumentModelToExtThread(),!1;const A=await this.contentRegistry.getProvider(this.uri);if(await A?.isReadonly(this.uri))return!1;const F=async(V=!1,Y=s.SaveReason.Manual)=>{if(await this.formatOnSave(Y),await this.eventBus.fireAndAwait(new W.EditorDocumentModelWillSaveEvent({uri:this.uri,reason:Y,language:this.languageId,dirty:this.dirty})),this.editorPreferences["editor.askIfDiff"]||(V=!0),!this.dirty)return!1;const _=this.monacoModel.getVersionId(),H=this.savingTasks[this.savingTasks.length-1];if(H&&H.versionId===_){H.cancel();const Q=this.savingTasks.pop();Q?.dispose()}const X=new N.SaveTask(this.uri,_,this.monacoModel.getAlternativeVersionId(),this.getText(),V);this.savingTasks.push(X),this.savingTasks.length>0&&this.initSave();const S=await X.finished;if(S.state===g.SaveTaskResponseState.SUCCESS)return this.monacoModel.pushStackElement(),!0;if(S.state===g.SaveTaskResponseState.ERROR)return S.errorMessage!=="cancel"&&(this.logger.error(S.errorMessage),this.messageService.error((0,g.localize)("doc.saveError.failed")+`
|
|
28064
28064
|
`+S.errorMessage)),!1;if(S.state===g.SaveTaskResponseState.DIFF){const Q=(0,g.localize)("doc.saveError.diffAndSave"),O=(0,g.localize)("doc.saveError.overwrite");return this.messageService.error((0,g.formatLocalize)("doc.saveError.diff",this.uri.toString()),[Q,O]).then(M=>{M===Q?this.compareAndSave():M===O&&F(!0,Y)}),this.logger.error("The file cannot be saved, the version is inconsistent with the disk"),!1}return!1};return this.saveQueue.queue(F.bind(this,E,R))}async compareAndSave(){const E=g.URI.from({scheme:W.ORIGINAL_DOC_SCHEME,query:g.URI.stringifyQuery({target:this.uri.toString()})}),R=this.uri.path.base,A=await this.compareService.compare(E,this.uri,(0,g.formatLocalize)("editor.compareAndSave.title",R,R));A===v.CompareResult.revert?this.revert():A===v.CompareResult.accept&&this.save(!0)}async initSave(){for(;this.savingTasks.length>0;){const E=this.dirtyChanges;this.dirtyChanges=[],(await this.savingTasks[0].run(this.service,this.baseContent,E,this.encoding,this.eol)).state==="success"&&this.savingTasks[0]?(this.baseContent=this.savingTasks[0].content,this.eventBus.fire(new W.EditorDocumentModelSavedEvent(this.uri)),this.setPersist(this.savingTasks[0].alternativeVersionId)):this.dirtyChanges.unshift(...E),this.savingTasks.shift()}}setPersist(E){this._persistVersionId=E,this.notifyChangeEvent([],!1,!1)}async reload(){try{const E=await this.contentRegistry.getContentForUri(this.uri,this._encoding);(0,g.isUndefinedOrNull)(E)||this.cleanAndUpdateContent(E)}catch{this._persistVersionId=this.monacoModel.getAlternativeVersionId()}}async revert(E){E?this._persistVersionId=this.monacoModel.getAlternativeVersionId():await this.updateEncoding(this._originalEncoding)}getText(E){return E?this.monacoModel.getValueInRange(E):this.monacoModel.getValue()}updateContent(E,R,A=!1){R&&(this.eol=R);const w=this.eol===`\r
|
|
28065
|
-
`?r.DefaultEndOfLine.CRLF:r.DefaultEndOfLine.LF,{textBuffer:F,disposable:V}=(0,l.createTextBuffer)(E,w),Y=n._computeEdits(this.monacoModel,F);this.monacoModel.pushEditOperations([],Y,()=>[]),A&&(this.setPersist(this.monacoModel.getAlternativeVersionId()),this.baseContent=E,this.dirtyChanges=[]),V.dispose()}static _computeEdits(E,R){const A=E.getLineCount(),w=R.getLineCount(),F=this._commonPrefix(E,A,1,R,w,1);if(A===w&&F===A)return[];const V=this._commonSuffix(E,A-F,F,R,w-F,F);let Y,_;return V>0?(Y=new I.Range(F+1,1,A-V+1,1),_=new I.Range(F+1,1,w-V+1,1)):F>0?(Y=new I.Range(F,E.getLineMaxColumn(F),A,E.getLineMaxColumn(A)),_=new I.Range(F,1+R.getLineLength(F),w,1+R.getLineLength(w))):(Y=new I.Range(1,1,A,E.getLineMaxColumn(A)),_=new I.Range(1,1,w,1+R.getLineLength(w))),[b.EditOperation.replaceMove(Y,R.getValueInRange(_,r.EndOfLinePreference.TextDefined))]}static _commonPrefix(E,R,A,w,F,V){const Y=Math.min(R,F);let _=0;for(let H=0;H<Y&&E.getLineContent(A+H)===w.getLineContent(V+H);H++)_++;return _}static _commonSuffix(E,R,A,w,F,V){const Y=Math.min(R,F);let _=0;for(let H=0;H<Y&&E.getLineContent(A+R-H)===w.getLineContent(V+F-H);H++)_++;return _}set baseContent(E){this._baseContent=E,this._baseContentMd5=null}get baseContent(){return this._baseContent}get baseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}get tryAutoSaveAfterDelay(){return this._tryAutoSaveAfterDelay||(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,s.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3),this.addDispose(this.editorPreferences.onPreferenceChanged(E=>{E.preferenceName==="editor.autoSaveDelay"&&(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,s.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3))}))),this._tryAutoSaveAfterDelay}getBaseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}notifyChangeEvent(E=[],R,A){!this.closeAutoSave&&this.savable&&this.editorPreferences["editor.autoSave"]===d.AUTO_SAVE_MODE.AFTER_DELAY&&this.tryAutoSaveAfterDelay(),this.eventBus.fire(new W.EditorDocumentModelContentChangedEvent({uri:this.uri,dirty:this.dirty,readonly:this.readonly,changes:E,eol:this.eol,isRedoing:R,isUndoing:A,versionId:this.monacoModel.getVersionId()}));const w=this;this.cacheProvider.persistCache(this.uri,{get dirty(){return w.dirty},get startMD5(){return w.getBaseContentMd5()},get content(){return w.getText()},get changeMatrix(){return w.dirtyChanges.map(({changes:F})=>F)},encoding:this.encoding})}async formatOnSave(E){if(this.editorPreferences["editor.formatOnSave"]&&E!==s.SaveReason.AfterDelay){const A=this.editorPreferences["editor.formatOnSaveTimeout"]||3e3,w=this.reporter.time(g.REPORT_NAME.FORMAT_ON_SAVE);try{await Promise.race([new Promise((F,V)=>{setTimeout(()=>{const Y=new Error((0,g.formatLocalize)("preference.editor.formatOnSaveTimeoutError",A));Y.name="FormatOnSaveTimeoutError",V(Y)},A)}),this.commandService.executeCommand(g.EDITOR_COMMANDS.FORMAT_DOCUMENT.id)])}catch(F){F.name==="FormatOnSaveTimeoutError"&&this.reporter.point(g.REPORT_NAME.FORMAT_ON_SAVE_TIMEOUT_ERROR,this.uri.toString()),this.logger.warn(`${f.EditorDocumentError.FORMAT_ERROR} ${F&&F.message}`)}finally{w.timeEnd(this.uri.path.ext)}}}};a.__decorate([(0,c.Autowired)(W.IEditorDocumentModelContentRegistry),a.__metadata("design:type",Object)],Z.prototype,"contentRegistry",void 0),a.__decorate([(0,c.Autowired)(W.IEditorDocumentModelService),a.__metadata("design:type",Object)],Z.prototype,"service",void 0),a.__decorate([(0,c.Autowired)(v.ICompareService),a.__metadata("design:type",Object)],Z.prototype,"compareService",void 0),a.__decorate([(0,c.Autowired)(s.IDocPersistentCacheProvider),a.__metadata("design:type",Object)],Z.prototype,"cacheProvider",void 0),a.__decorate([(0,c.Autowired)(h.IMessageService),a.__metadata("design:type",Object)],Z.prototype,"messageService",void 0),a.__decorate([(0,c.Autowired)(g.IEventBus),a.__metadata("design:type",Object)],Z.prototype,"eventBus",void 0),a.__decorate([(0,c.Autowired)(g.ILogger),a.__metadata("design:type",Object)],Z.prototype,"logger",void 0),a.__decorate([(0,c.Autowired)(g.CommandService),a.__metadata("design:type",Object)],Z.prototype,"commandService",void 0),a.__decorate([(0,c.Autowired)(g.IReporterService),a.__metadata("design:type",Object)],Z.prototype,"reporter",void 0),a.__decorate([(0,c.Autowired)(g.PreferenceService),a.__metadata("design:type",Object)],Z.prototype,"preferences",void 0),a.__decorate([(0,c.Autowired)(u.IHashCalculateService),a.__metadata("design:type",Object)],Z.prototype,"hashCalculateService",void 0),Z=n=a.__decorate([(0,c.Injectable)({multiple:!0}),a.__metadata("design:paramtypes",[g.URI,String,Object])],Z),e.EditorDocumentModel=Z},78157:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelContentRegistryImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96689);let g=class{constructor(){this.providers=[],this._onOriginalDocChanged=new o.Emitter,this.cachedProviders=new o.LRUMap(1e3,500),this.originalProvider={handlesScheme:G=>G===c.ORIGINAL_DOC_SCHEME,provideEditorDocumentModelContent:async G=>{const{target:p}=G.getParsedQuery(),h=new o.URI(p);return await this.getContentForUri(h)||""},isReadonly:()=>!0,onDidChangeContent:this._onOriginalDocChanged.event},this.registerEditorDocumentModelContentProvider(this.originalProvider)}registerEditorDocumentModelContentProvider(G){this.providers.push(G),this.cachedProviders.clear();const p=G.onDidChangeContent(h=>{this.eventBus.fire(new c.EditorDocumentModelOptionExternalUpdatedEvent(h))});return G!==this.originalProvider&&G.onDidChangeContent&&G.onDidChangeContent(h=>{this._onOriginalDocChanged.fire(o.URI.from({scheme:c.ORIGINAL_DOC_SCHEME,query:o.URI.stringifyQuery({target:h.toString()})}))}),{dispose:()=>{p.dispose();const h=this.providers.indexOf(G);h&&(this.providers.splice(h,1),this.cachedProviders.clear())}}}getProvider(G){const p=G.toString();return this.cachedProviders.has(p)||this.cachedProviders.set(p,this.calculateProvider(G)),this.cachedProviders.get(p)}async calculateProvider(G){let p={provider:void 0,weight:-1,index:1};for(const h of this.providers){let b=-1;const I=this.providers.indexOf(h);h.handlesUri?b=await h.handlesUri(G):h.handlesScheme&&(b=await h.handlesScheme(G.scheme)?10:-1),b>=0&&(b>p.weight||b===p.weight&&I>p.index)&&(p={index:I,weight:b,provider:h})}return p.provider}async getContentForUri(G,p){const h=await this.getProvider(G);if(!h)throw new Error;return h.provideEditorDocumentModelContent(G,p)}};n.__decorate([(0,a.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],g.prototype,"eventBus",void 0),g=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],g),e.EditorDocumentModelContentRegistryImpl=g},37275:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(9519),e),n.__exportStar(t(91249),e),n.__exportStar(t(78157),e),n.__exportStar(t(98469),e)},89618:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoTextModelService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96689);let g=class{canHandleResource(G){return!0}hasTextModelContentProvider(G){throw new Error("Method not implemented.")}async createModelReference(G){const p=await this.documentModelManager.createModelReference(new o.URI(G.toString()),"monaco");if(p){const h=p.instance.getMonacoModel();return Promise.resolve({object:{textEditorModel:h},dispose:()=>{p.dispose()}})}}registerTextModelContentProvider(G,p){return{dispose(){}}}};n.__decorate([(0,a.Autowired)(c.IEditorDocumentModelService),n.__metadata("design:type",Object)],g.prototype,"documentModelManager",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.MonacoTextModelService=g},98469:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveTask=void 0;const n=t(41869);class a extends n.Disposable{constructor(c,g,u,G,p){super(),this.uri=c,this.versionId=g,this.alternativeVersionId=u,this.content=G,this.ignoreDiff=p,this.deferred=new n.Deferred,this.finished=this.deferred.promise,this.started=!1,this.disposables.push(this.cancelToken=new n.CancellationTokenSource)}async run(c,g,u,G,p){this.started=!0;try{const h=await c.saveEditorDocumentModel(this.uri,this.content,g,u,G,this.ignoreDiff,p,this.cancelToken.token);return this.deferred.resolve(h),h}catch(h){const b={errorMessage:h.message,state:n.SaveTaskResponseState.ERROR};return this.deferred.resolve(b),b}}cancel(){this.cancelToken.cancel();const c={errorMessage:"cancel",state:n.SaveTaskResponseState.ERROR};this.deferred.resolve(c)}}e.SaveTask=a},66537:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipantsContribution=e.TrimFinalNewLinesParticipant=e.CodeActionOnSaveParticipant=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68969),g=n.__importStar(t(20868)),u=t(52902),G=t(79865),p=t(2261),h=t(44781),b=n.__importStar(t(48069)),I=t(84866),r=t(81559),l=t(93152),s=t(82196),d=t(96689);function m(W,Z){let y=null;if(W.isAttachedToEditor()){for(const E of Z.listCodeEditors())if(E.hasModel()&&E.getModel()===W){if(E.hasTextFocus())return E;y=E}}return y}let v=class extends o.WithEventBus{get bulkEditService(){return this.overrideServiceRegistry.getRegisteredService(o.ServiceNames.BULK_EDIT_SERVICE)}activate(){}async onEditorDocumentModelWillSave(Z){if(Z.payload.reason!==s.SaveReason.Manual)return;const y=this.preferenceService.get("editor.codeActionsOnSave",void 0,Z.payload.uri.toString(),Z.payload.language);if(!y)return;const E=this.preferenceService.get("editor.codeActionsOnSaveNotification",!0,Z.payload.uri.toString(),Z.payload.language),R=A=>{const F=(Array.isArray(y)?y:Object.keys(y)).map(S=>new r.CodeActionKind(S));if(Array.isArray(y)||F.sort((S,Q)=>r.CodeActionKind.SourceFixAll.contains(S)?r.CodeActionKind.SourceFixAll.contains(Q)?0:-1:r.CodeActionKind.SourceFixAll.contains(Q)?1:0),F.length===0)return;const V=this.docService.getModelReference(Z.payload.uri,"codeActionOnSave");if(!V)return;const Y=V.instance.getMonacoModel(),_=new g.CancellationTokenSource,H=this.preferenceService.get("editor.codeActionsOnSaveTimeout",void 0,Z.payload.uri.toString(),Z.payload.language),X=Array.isArray(y)?[]:Object.keys(y).filter(S=>y[S]===!1).map(S=>new r.CodeActionKind(S));return Promise.race([new Promise((S,Q)=>setTimeout(()=>{_.cancel(),Q("codeActionsOnSave timeout")},H)),this.applyOnSaveActions(Y,F,X,A,_.token)]).finally(()=>{_.cancel(),V.dispose()})};return E?this.progressService.withProgress({title:(0,o.formatLocalize)("editor.saveCodeActions.saving",Z.payload.uri.displayName),location:o.ProgressLocation.Notification,cancellable:!0},async A=>R(A)):R(null)}async applyOnSaveActions(Z,y,E,R,A){const w=new class{constructor(){this._names=new Set}_report(){R&&R.report({message:(0,o.formatLocalize)("editor.saveCodeActions.getting",[...this._names].map(F=>`'${F}'`).join(", "))})}report(F){F.displayName&&!this._names.has(F.displayName)&&(this._names.add(F.displayName),this._report())}};for(const F of y)try{const V=await this.getActionsToRun(Z,F,E,w,A);await this.applyCodeActions(V.validActions)}catch(V){this.logger.error(V)}}async applyCodeActions(Z){var y;for(const E of Z)E.action.edit&&await((y=this.bulkEditService)===null||y===void 0?void 0:y.apply(u.ResourceEdit.convert(E.action.edit))),E.action.command&&await this.commandService.executeCommand(E.action.command.id,...E.action.command.arguments||[])}async getActionsToRun(Z,y,E,R,A){return(0,I.getCodeActions)(G.languageFeaturesService.codeActionProvider,Z,Z.getFullModelRange(),{type:b.CodeActionTriggerType.Auto,filter:{include:y,excludes:E,includeSourceActions:!0},triggerAction:r.CodeActionTriggerSource.OnSave},R,A)}};n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],v.prototype,"overrideServiceRegistry",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],v.prototype,"docService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(c.IProgressService),n.__metadata("design:type",Object)],v.prototype,"progressService",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],v.prototype,"onEditorDocumentModelWillSave",null),v=n.__decorate([(0,a.Injectable)()],v),e.CodeActionOnSaveParticipant=v;let f=class extends o.WithEventBus{activate(){}async onEditorDocumentModelWillSave(Z){if(this.preferenceService.get("files.trimFinalNewlines")){const E=this.docService.getModelReference(Z.payload.uri,"trimFinalNewlines");if(!E)return;const R=E.instance.getMonacoModel();this.doTrimFinalNewLines(R,Z.payload.reason!==s.SaveReason.Manual),E.dispose()}}findLastNonEmptyLine(Z){for(let y=Z.getLineCount();y>=1;y--)if(Z.getLineContent(y).length>0)return y;return 0}doTrimFinalNewLines(Z,y){const E=Z.getLineCount();if(E===1)return;let R=[],A=0;const w=this.injector.get(l.MonacoCodeService),F=m(Z,w);if(F&&(R=F.getSelections(),y))for(let H=0,X=R.length;H<X;H++){const S=R[H].positionLineNumber;S>A&&(A=S)}const V=this.findLastNonEmptyLine(Z),Y=Math.max(V+1,A+1),_=Z.validateRange(new h.Range(Y,1,E,Z.getLineMaxColumn(E)));_.isEmpty()||(Z.pushEditOperations(R,[p.EditOperation.delete(_)],()=>R),F?.setSelections(R))}};n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"docService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],f.prototype,"onEditorDocumentModelWillSave",null),f=n.__decorate([(0,a.Injectable)()],f),e.TrimFinalNewLinesParticipant=f;let N=class{onStart(){this.codeActionOnSaveParticipant.activate(),this.trimFinalNewLinesParticipant.activate()}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",v)],N.prototype,"codeActionOnSaveParticipant",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",f)],N.prototype,"trimFinalNewLinesParticipant",void 0),N=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],N),e.SaveParticipantsContribution=N},96689:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ORIGINAL_DOC_SCHEME=e.EditorDocumentModelWillSaveEvent=e.EditorDocumentModelSavedEvent=e.EditorDocumentModelRemovalEvent=e.EditorDocumentModelCreationEvent=e.EditorDocumentModelOptionExternalUpdatedEvent=e.EditorDocumentModelOptionChangedEvent=e.EditorDocumentModelContentChangedEvent=e.IEditorDocumentModelContentRegistry=e.IEditorDocumentModelService=void 0;const n=t(41869);e.IEditorDocumentModelService=Symbol("IEditorDocumentModelService"),e.IEditorDocumentModelContentRegistry=Symbol("IEditorDocumentModelContentRegistry");class a extends n.BasicEvent{}e.EditorDocumentModelContentChangedEvent=a;class o extends n.BasicEvent{}e.EditorDocumentModelOptionChangedEvent=o;class c extends n.BasicEvent{}e.EditorDocumentModelOptionExternalUpdatedEvent=c;class g extends n.BasicEvent{}e.EditorDocumentModelCreationEvent=g;class u extends n.BasicEvent{}e.EditorDocumentModelRemovalEvent=u;class G extends n.BasicEvent{}e.EditorDocumentModelSavedEvent=G;class p extends n.BasicEvent{}e.EditorDocumentModelWillSaveEvent=p,e.ORIGINAL_DOC_SCHEME="original_doc"},71624:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDiffEditor=e.BrowserCodeEditor=e.BaseMonacoEditorWrapper=e.insertSnippetWithMonacoEditor=e.EditorCollectionServiceImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(66e3),g=t(22689),u=t(43718),G=n.__importStar(t(20868)),p=t(99721),h=t(23418),b=t(84677),I=t(96689),r=t(59879),l=t(6043),s=t(82196),{removeUndefined:d}=u.objects;let m=class extends u.WithEventBus{get currentEditor(){return this._currentEditor}constructor(){super(),this._editors=new Set,this._diffEditors=new Set,this._onCodeEditorCreate=new u.Emitter,this._onDiffEditorCreate=new u.Emitter,this.onCodeEditorCreate=this._onCodeEditorCreate.event,this.onDiffEditorCreate=this._onDiffEditorCreate.event,this.addDispose(this.editorFeatureRegistry.onDidRegisterFeature(w=>{this._editors.forEach(F=>{this.editorFeatureRegistry.runOneContribution(F,w)})}))}createCodeEditor(w,F,V){const Y=Object.assign(Object.assign({},(0,l.getConvertedMonacoOptions)(this.configurationService).editorOptions),F),_=this.monacoService.createCodeEditor(w,Y,V),H=this.injector.get(W,[_,F]);return this._onCodeEditorCreate.fire(H),H}listEditors(){return Array.from(this._editors.values())}getEditorByUri(w){var F;for(const V of this._editors.values())if(!((F=V.currentUri)===null||F===void 0)&&F.isEqual(w))return V}addEditors(w){const F=this._editors.size;w.forEach(V=>{this._editors.has(V)||(this._editors.add(V),this.editorFeatureRegistry.runContributions(V),V.monacoEditor.onDidFocusEditorWidget(()=>{this._currentEditor=V}),V.monacoEditor.onContextMenu(()=>{this._currentEditor=V}))}),this._editors.size}removeEditors(w){const F=this._editors.size;w.forEach(V=>{this._editors.delete(V),this._currentEditor===V&&(this._currentEditor=void 0)}),this._editors.size}createDiffEditor(w,F,V){const Y=(0,l.getConvertedMonacoOptions)(this.configurationService),_=Object.assign(Object.assign(Object.assign({},Y.editorOptions),Y.diffOptions),F),H=this.monacoService.createDiffEditor(w,_,V),X=this.injector.get(Z,[H,F]);return this._onDiffEditorCreate.fire(X),X}createMergeEditor(w,F,V){const Y=(0,l.getConvertedMonacoOptions)(this.configurationService),_=Object.assign(Object.assign(Object.assign(Object.assign({},Y.editorOptions),Y.diffOptions),F),{wordWrap:"off"});return this.monacoService.createMergeEditor(w,_,V)}listDiffEditors(){return Array.from(this._diffEditors.values())}addDiffEditors(w){const F=this._diffEditors.size;w.forEach(V=>{this._diffEditors.has(V)||this._diffEditors.add(V)}),this._diffEditors.size}removeDiffEditors(w){const F=this._diffEditors.size;w.forEach(V=>{this._diffEditors.delete(V)}),this._diffEditors.size}onDocModelContentChangedEvent(w){this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:w.payload.uri,decoration:{dirty:!!w.payload.dirty,readOnly:!!w.payload.readonly}}))}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",g.MonacoService)],m.prototype,"monacoService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],m.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",r.EditorFeatureRegistryImpl)],m.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],m.prototype,"documentModelService",void 0),n.__decorate([(0,u.OnEvent)(I.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[I.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onDocModelContentChangedEvent",null),m=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],m),e.EditorCollectionServiceImpl=m;function v(A,w,F,V){const Y=A.getContribution("snippetController2"),_=F.map(H=>new G.Selection(H.startLineNumber,H.startColumn,H.endLineNumber,H.endColumn));A.setSelections(_),A.focus(),Y.insert(w,0,0,V.undoStopBefore,V.undoStopAfter)}e.insertSnippetWithMonacoEditor=v;function f(A,w,F){A.updateOptions(w),A.getModel()&&A.getModel().updateOptions(F)}let N=class extends u.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(w,F){super(),this.monacoEditor=w,this.type=F,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(b.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(V=>{Array.from(V.affectedKeys.values()).filter(_=>(0,l.isEditorOption)(_)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const w=this.currentUri;w&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(w)).then(F=>{!this.currentUri||!w.isEqual(this.currentUri)||F&&Object.keys(F).length>0&&(this._editorOptionsFromContribution=F,(0,u.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(w={},F={}){this._specialEditorOptions=d(Object.assign(Object.assign({},this._specialEditorOptions),w)),this._specialModelOptions=d(Object.assign(Object.assign({},this._specialModelOptions),F)),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:w,modelOptions:F}=this._calculateFinalOptions();f(this.monacoEditor,w,F)}_calculateFinalOptions(){var w;const F=this.currentUri?this.currentUri.toString():void 0,V=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,Y=(0,l.getConvertedMonacoOptions)(this.configurationService,F,V,void 0),_={readOnly:((w=this.currentDocumentModel)===null||w===void 0?void 0:w.readonly)||!1};let H=Object.assign(Object.assign(Object.assign(Object.assign({},_),Y.editorOptions),this._editorOptionsFromContribution),this._specialEditorOptions);return this.type!==h.EditorType.CODE&&(H=Object.assign(Object.assign({},H),Y.diffOptions)),{editorOptions:H,modelOptions:Object.assign(Object.assign({},Y.modelOptions),this._specialModelOptions)}}insertSnippet(w,F,V){v(this.monacoEditor,w,F,V)}applyDecoration(w,F){this.decorationApplier.applyDecoration(w,F)}onSelectionsChanged(w){return this.monacoEditor.onDidChangeCursorSelection(F=>{this._disableSelectionEmitter||w({selections:this.getSelections(),source:F.source})})}onVisibleRangesChanged(w){const F=new u.Disposable,V=this.monacoEditor;return F.addDispose(V.onDidScrollChange(Y=>{w(this.monacoEditor.getVisibleRanges())})),F.addDispose(V.onDidLayoutChange(Y=>{w(this.monacoEditor.getVisibleRanges())})),F}setSelections(w){return this.monacoEditor.setSelections(w)}setSelection(w){return this.monacoEditor.setSelection(w)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(w){return this.monacoEditor.onDidChangeConfiguration(V=>{w()})}};n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],N.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],N.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],N.prototype,"injector",void 0),N=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],N),e.BaseMonacoEditorWrapper=N;let W=class extends N{get currentDocumentModel(){return this._currentDocumentModelRef&&!this._currentDocumentModelRef.disposed?this._currentDocumentModelRef.instance:null}getType(){return h.EditorType.CODE}constructor(w,F={}){super(w,h.EditorType.CODE),this.monacoEditor=w,this.editorState=new Map,this._onCursorPositionChanged=new u.Emitter,this.onCursorPositionChanged=this._onCursorPositionChanged.event,this._onRefOpen=new u.Emitter,this.onRefOpen=this._onRefOpen.event,this._specialEditorOptions=F,this.collectionService.addEditors([this]);const V=w.onDidChangeModel(()=>{y(this.monacoEditor.getDomNode()),V.dispose()});this.addDispose(w.onDidChangeCursorPosition(()=>{if(!this.currentDocumentModel)return;const Y=w.getSelection();this._onCursorPositionChanged.fire({position:w.getPosition(),selectionLength:Y?this.currentDocumentModel.getMonacoModel().getValueInRange(Y).length:0})})),this.addDispose(this.monacoEditor)}layout(w,F=!1){this.monacoEditor.layout(w,F)}focus(){this.monacoEditor.focus()}dispose(){super.dispose(),this.saveCurrentState(),this.collectionService.removeEditors([this])}saveCurrentState(){if(this.currentUri){const w=this.monacoEditor.saveViewState();w&&this.editorState.set(this.currentUri.toString(),w)}}restoreState(){if(this.currentUri){const w=this.editorState.get(this.currentUri.toString());w&&this.monacoEditor.restoreViewState(w)}}open(w){this.saveCurrentState(),this._currentDocumentModelRef=w;const F=this.currentDocumentModel.getMonacoModel();this.disableSelectionEmitter(),this.monacoEditor.setModel(F),this.enableSelectionEmitter(),this.restoreState(),this._onRefOpen.fire(w),this._onCursorPositionChanged.fire({position:this.monacoEditor.getPosition(),selectionLength:0});const{instance:V}=w;this.updateOptions(),this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:V.uri,decoration:{readOnly:V.readonly}}))}};n.__decorate([(0,a.Autowired)(h.EditorCollectionService),n.__metadata("design:type",m)],W.prototype,"collectionService",void 0),n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],W.prototype,"editorFeatureRegistry",void 0),W=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],W),e.BrowserCodeEditor=W;class Z extends u.WithEventBus{get originalDocModel(){return this.originalDocModelRef&&!this.originalDocModelRef.disposed?this.originalDocModelRef.instance:null}get modifiedDocModel(){return this.modifiedDocModelRef&&!this.modifiedDocModelRef.disposed?this.modifiedDocModelRef.instance:null}saveCurrentState(){if(this.currentUri){const w=this.monacoDiffEditor.saveViewState();w&&this.editorState.set(this.currentUri.toString(),w)}}restoreState(){if(this.currentUri){const w=this.editorState.get(this.currentUri.toString());w&&this.monacoDiffEditor.restoreViewState(w)}}constructor(w,F={}){super(),this.monacoDiffEditor=w,this.specialOptions=F,this.editorState=new Map,this._onRefOpen=new u.Emitter,this.onRefOpen=this._onRefOpen.event,this.diffEditorModelCache=new u.LRUCache(100),this.wrapEditors(),this.addDispose(this.configurationService.onDidChangeConfiguration(V=>{Array.from(V.affectedKeys.values()).filter(_=>(0,l.isDiffEditorOption)(_)).length>0&&this.updateDiffOptions()}))}disposeModel(w,F){const V=`${w}-${F}`;this.diffEditorModelCache.delete(V)}async compare(w,F,V={},Y){if(this.saveCurrentState(),this.originalDocModelRef=w,this.modifiedDocModelRef=F,!this.originalDocModel||!this.modifiedDocModel)return;const _=this.originalDocModel.getMonacoModel(),H=this.modifiedDocModel.getMonacoModel(),X=`${_.uri.toString()}-${H.uri.toString()}`;let S=this.diffEditorModelCache.get(X);if(S||(S=this.monacoDiffEditor.createViewModel({original:_,modified:H}),this.diffEditorModelCache.set(X,S)),this.monacoDiffEditor.setModel(S),Y?this.currentUri=Y:this.currentUri=u.URI.from({scheme:h.DIFF_SCHEME,query:u.URI.stringifyQuery({name,original:this.originalDocModel.uri.toString(),modified:this.modifiedDocModel.uri.toString()})}),V.range||V.originalRange){const O=V.range||V.originalRange,M=V.range?this.modifiedEditor.monacoEditor:this.originalEditor.monacoEditor;await S?.waitForDiff(),setTimeout(()=>{M.revealRangeInCenter(O),M.setSelection(O)}),u.Event.once(this.monacoDiffEditor.onDidUpdateDiff)(()=>{M.setSelection(O),setTimeout(()=>{M.revealRangeInCenter(O)})})}else this.restoreState();this._onRefOpen.fire(w),this._onRefOpen.fire(F);const Q=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");if(V.revealFirstDiff&&!Q){const O=this.monacoDiffEditor.getLineChanges();if(O&&O.length>0)this.showFirstDiff(S);else{const M=this.monacoDiffEditor.onDidUpdateDiff(()=>{this.showFirstDiff(S),M.dispose()})}}await this.updateOptionsOnModelChange(),this.diffResourceKeys.forEach(O=>O.set(this.currentUri))}async showFirstDiff(w){await w?.waitForDiff(),this.monacoDiffEditor.revealFirstDiff()}async updateOptionsOnModelChange(){await this.doUpdateDiffOptions()}isReadonly(){var w;return!!(!((w=this.modifiedDocModel)===null||w===void 0)&&w.readonly)}async doUpdateDiffOptions(){const w=this.modifiedEditor.currentUri?this.modifiedEditor.currentUri.toString():void 0,F=this.modifiedEditor.currentDocumentModel?this.modifiedEditor.currentDocumentModel.languageId:void 0,V=(0,l.getConvertedMonacoOptions)(this.configurationService,w,F),Y=this.isReadonly();this.monacoDiffEditor.updateOptions(Object.assign(Object.assign(Object.assign({},V.diffOptions),this.specialOptions),{readOnly:Y,renderMarginRevertIcon:!Y})),this.currentUri&&this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{readOnly:this.isReadonly()}}))}updateDiffOptions(){this.doUpdateDiffOptions()}getLineChanges(){const w=this.monacoDiffEditor.getLineChanges();return w?w.map(F=>{var V;return[F.originalStartLineNumber,F.originalEndLineNumber,F.modifiedStartLineNumber,F.modifiedEndLineNumber,(V=F.charChanges)===null||V===void 0?void 0:V.map(Y=>[Y.originalStartLineNumber,Y.originalStartColumn,Y.originalEndLineNumber,Y.originalEndColumn,Y.modifiedStartLineNumber,Y.modifiedStartColumn,Y.modifiedEndLineNumber,Y.modifiedEndColumn])]}):null}wrapEditors(){const w=this;this.originalEditor=this.injector.get(R,[w.monacoDiffEditor.getOriginalEditor(),()=>w.originalDocModel,h.EditorType.ORIGINAL_DIFF]),this.modifiedEditor=this.injector.get(R,[w.monacoDiffEditor.getModifiedEditor(),()=>w.modifiedDocModel,h.EditorType.MODIFIED_DIFF]),this.collectionService.addEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.addDiffEditors([this]);const F=this.contextKeyService.createScoped(this.modifiedEditor.monacoEditor._contextKeyService),V=this.contextKeyService.createScoped(this.originalEditor.monacoEditor._contextKeyService);this.diffResourceKeys=[new c.ResourceContextKey(F,void 0,"diffResource"),new c.ResourceContextKey(V,void 0,"diffResource")]}layout(){return this.monacoDiffEditor.layout()}focus(){this.monacoDiffEditor.focus()}dispose(){super.dispose(),this.collectionService.removeEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.removeDiffEditors([this]),this.monacoDiffEditor.dispose(),this._disposed=!0}}n.__decorate([(0,a.Autowired)(h.EditorCollectionService),n.__metadata("design:type",m)],Z.prototype,"collectionService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],Z.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],Z.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],Z.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],Z.prototype,"contextKeyService",void 0),e.BrowserDiffEditor=Z;function y(A){A.addEventListener("mousewheel",E)}function E(A){A.preventDefault(),A.stopPropagation(),(this.offsetWidth+this.scrollLeft+A.deltaX>this.scrollWidth||this.scrollLeft+A.deltaX<0)&&(A.preventDefault(),A.stopPropagation())}let R=class extends N{get currentDocumentModel(){return this.getDocumentModel()}constructor(w,F,V){super(w,V),this.getDocumentModel=F}};R=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object])],R)},17315:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorElectronContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(37406),u=t(23418),G=t(96689),p=t(82196),h=t(51553);let b=class extends c.WithEventBus{onResourceDecorationChangeEvent(){const r=this.workbenchEditorService.hasDirty();this.electronMainUIService.setDocumentEdited(o.electronEnv.currentWindowId,!!r)}async onWillStop(){return!!(await this.workbenchEditorService.closeAllOnlyConfirmOnce()||!this.cacheProvider.isFlushed())}registerKeybindings(r){r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrl+tab"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrl+shift+tab"}),c.isOSX&&(r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrlcmd+shift+]"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrlcmd+shift+["}))}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],b.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],b.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(u.IDocPersistentCacheProvider),n.__metadata("design:type",Object)],b.prototype,"cacheProvider",void 0),n.__decorate([(0,a.Autowired)(G.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],b.prototype,"contentRegistry",void 0),n.__decorate([(0,a.Autowired)(g.IElectronMainUIService),n.__metadata("design:type",Object)],b.prototype,"electronMainUIService",void 0),n.__decorate([(0,c.OnEvent)(p.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],b.prototype,"onResourceDecorationChangeEvent",null),b=n.__decorate([(0,o.Domain)(o.ClientAppContribution,o.KeybindingContribution)],b),e.EditorElectronContribution=b},75522:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpener=void 0;const n=t(85608),a=t(76003),o=t(23418);let c=class{async open(u){let G;const p=/^L?(\d+)(?:,(\d+))?/.exec(u.fragment);if(p){const h=parseInt(p[1],10),b=p[2]?parseInt(p[2],10):1;G={startLineNumber:h,startColumn:b,endLineNumber:h,endColumn:b},u=u.withFragment("")}return await this.workbenchEditorService.open(u,{range:G}),!0}async handleURI(u){return this.resourceService.handlesUri(u)}handleScheme(){return!1}};n.__decorate([(0,a.Autowired)(o.ResourceService),n.__metadata("design:type",o.ResourceService)],c.prototype,"resourceService",void 0),n.__decorate([(0,a.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),c=n.__decorate([(0,a.Injectable)()],c),e.EditorOpener=c},19352:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scroll=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=n.__importDefault(t(62251));class g extends o.default.Component{constructor(){super(...arguments),this.position={top:0,left:0},this.dragging=!1,this.draggingStart=0,this.draggingStartPos=0,this.shouldHideThumb=!0,this.isAtTop=!0,this.onMouseMoveHorizontal=G=>{if(!this.dragging)return;const p=G.pageX-this.draggingStart;this.ref.scrollLeft=this.draggingStartPos+this.calculateXToLeft(p)},this.onMouseUpHorizontal=G=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHorizontal),document.removeEventListener("mouseup",this.onMouseUpHorizontal),this.shouldHideThumb&&this.hideThumb()},this.onMouseMoveVertical=G=>{if(!this.dragging)return;const p=G.pageY-this.draggingStart;this.ref.scrollTop=this.draggingStartPos+this.calculateYToTop(p)},this.onMouseUpVertical=G=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveVertical),document.removeEventListener("mouseup",this.onMouseUpVertical),this.shouldHideThumb&&this.hideThumb()},this.onMousewheel=G=>{this.ref.clientHeight>=this.ref.scrollHeight&&(G.deltaY!==0&&(this.ref.scrollLeft+=G.deltaY),G.deltaX!==0&&(this.ref.scrollLeft+=G.deltaX))},this.onMouseEnter=()=>{this.update()},this.handleWindowResize=()=>{this.update()},this.update=G=>{this.requestFrame&&window.cancelAnimationFrame(this.requestFrame),this.requestFrame=window.requestAnimationFrame(()=>{this._update(),G&&G()})}}onScroll(G){this.position={top:this.ref.scrollTop,left:this.ref.scrollLeft},this.props.onScroll&&this.props.onScroll(this.position),this.update(()=>{const p=this.ref.scrollWidth,h=this.ref.offsetWidth,b=this.ref.scrollHeight,I=this.ref.offsetHeight;this.thumbH.style.left=this.position.left*h/p+"px",this.thumbV.style.top=this.position.top*I/b+"px"}),!this.isAtTop&&this.ref.scrollTop===0?(this.isAtTop=!0,this.setCss()):this.isAtTop&&this.ref.scrollTop!==0&&(this.isAtTop=!1,this.setCss()),this.ref.scrollLeft>0?(this.decorationL.style.opacity=String(1),this.decorationR.style.opacity=String(1)):this.decorationL.style.opacity=String(0),(this.ref.scrollWidth===this.ref.offsetWidth||this.ref.scrollLeft===this.ref.scrollWidth-this.ref.offsetWidth)&&(this.decorationR.style.opacity=String(0))}scrollTo(G){this.ref.scrollLeft=G.left,this.ref.scrollTop=G.top}onMouseDownHorizontal(G){this.dragging=!0,G.target===this.trackH&&this.onMouseDownOnTrack(G),this.draggingStart=G.pageX,this.draggingStartPos=this.ref.scrollLeft,document.addEventListener("mousemove",this.onMouseMoveHorizontal),document.addEventListener("mouseup",this.onMouseUpHorizontal)}onMouseDownOnTrack(G){const p=G.target,h=G.clientX-p.getBoundingClientRect().left,b=this.ref.scrollWidth,I=this.ref.offsetWidth,r=h*b/I-.5*I;this.scrollTo({left:r,top:this.position.top})}calculateXToLeft(G){const p=this.ref.scrollWidth,h=this.ref.offsetWidth;return G*p/h}onMouseDownVertical(G){this.dragging=!0,G.target===this.trackV&&this.onMouseDownOnTrackVertical(G),this.draggingStart=G.pageY,this.draggingStartPos=this.ref.scrollTop,document.addEventListener("mousemove",this.onMouseMoveVertical),document.addEventListener("mouseup",this.onMouseUpVertical)}onMouseDownOnTrackVertical(G){const p=G.target,h=G.clientY-p.getBoundingClientRect().top,b=this.ref.scrollHeight,I=this.ref.offsetHeight,r=h*b/I-.5*I;this.scrollTo({left:this.position.left,top:r})}calculateYToTop(G){const p=this.ref.scrollHeight,h=this.ref.offsetHeight;return G*p/h}componentDidUpdate(){this.update(),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)})}componentDidMount(){this.update(),window.addEventListener("resize",this.handleWindowResize),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)}),this.ref&&(this.ref.addEventListener("mouseenter",this.onMouseEnter),this.ref.addEventListener("wheel",this.onMousewheel))}componentWillUnmount(){this.ref&&(this.ref.removeEventListener("mouseenter",this.onMouseEnter),this.ref.removeEventListener("wheel",this.onMousewheel)),window.removeEventListener("resize",this.handleWindowResize),this.requestFrame&&window.cancelAnimationFrame(this.requestFrame)}sizeEqual(G,p){return G&&p&&G.offsetHeight===p.offsetHeight&&G.scrollHeight===p.scrollHeight&&G.offsetWidth===p.offsetWidth&&G.scrollWidth===p.scrollWidth}_update(){this.ref&&(this.sizeEqual(this.size,this.ref)||(this.size={offsetHeight:this.ref.offsetHeight,offsetWidth:this.ref.offsetWidth,scrollWidth:this.ref.scrollWidth,scrollHeight:this.ref.scrollHeight},this.updateScrollBar()))}updateScrollBar(){const G=this.ref.scrollWidth,p=this.ref.offsetWidth;if(p<G){const I=p*p/G;this.thumbH.style.width=I+"px",this.trackH.parentElement.style.display="block"}else this.trackH.parentElement.style.display="none";const h=this.ref.scrollHeight,b=this.ref.offsetHeight;b<h?(this.thumbV.style.height=b*b/h+"px",this.trackV.parentElement.style.display="block"):this.trackV.parentElement.style.display="none"}hideThumb(){this.shouldHideThumb=!0,this.dragging||this.setCss()}showThumb(){this.shouldHideThumb=!1,this.setCss()}setCss(){this.container.className=(0,a.default)({[c.default.scroll]:!0,[c.default["hide-thumb"]]:this.shouldHideThumb&&!this.dragging});const G={};this.props.atTopClassName&&(G[this.props.atTopClassName]=this.isAtTop),this.props.className&&(G[this.props.className]=!0),this.ref.className=(0,a.default)(G)}render(){return o.default.createElement("div",{className:(0,a.default)(c.default.scroll,c.default["hide-thumb"]),ref:G=>{G&&(this.container=G,this.props.forwardedRef(G))},onMouseMove:()=>this.showThumb(),onMouseLeave:()=>this.hideThumb(),style:this.props.containerStyle},o.default.createElement("div",{style:this.props.style,className:(0,a.default)(this.props.className),onScroll:this.onScroll.bind(this),ref:G=>G&&(this.ref=G),onMouseDown:()=>this.update(),onMouseUp:()=>this.update()},this.props.children),o.default.createElement("div",{className:c.default["scrollbar-decoration-vertical-l"],ref:G=>G&&(this.decorationL=G)}),o.default.createElement("div",{className:c.default["scrollbar-decoration-vertical-r"],ref:G=>G&&(this.decorationR=G)}),o.default.createElement("div",{className:c.default["scroll-horizontal"]},o.default.createElement("div",{className:c.default["track-horizontal"],ref:G=>G&&(this.trackH=G),onMouseDown:this.onMouseDownHorizontal.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-horizontal",onMouseDown:this.onMouseDownHorizontal.bind(this),ref:G=>G&&(this.thumbH=G)})),o.default.createElement("div",{className:c.default["scroll-vertical"]},o.default.createElement("div",{className:c.default["track-vertical"],ref:G=>G&&(this.trackV=G),onMouseDown:this.onMouseDownVertical.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-vertical",onMouseDown:this.onMouseDownVertical.bind(this),ref:G=>G&&(this.thumbV=G)})))}}e.Scroll=g},93669:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContext=e.defaultEditorContext=void 0;const a=t(85608).__importDefault(t(14041));e.defaultEditorContext={minimapWidth:108},e.EditorContext=a.default.createContext(e.defaultEditorContext)},60362:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorAutoSaveEditorContribution=e.EditorContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68456),g=t(93899),u=t(1237),G=t(77661),p=t(75524),h=t(43718),b=t(96177),I=t(62660),r=n.__importStar(t(84555)),l=t(94170),s=t(87423),d=t(96640),m=t(23418),v=t(55113),f=t(89618),N=t(96689),W=t(75522),Z=t(93152),y=t(8287),E=t(14385),R=t(57719),A=t(85857),w=t(95338),F=t(94617),V=t(93532),Y=t(53135),_=t(50236),H=t(82196),X=t(6670),S=t(67903),Q=t(51553);let O=class extends o.Disposable{registerComponent(B){B.register("@opensumi/ide-editor",{id:"ide-editor",component:E.EditorView}),B.register("breadcrumb-menu",{id:"breadcrumb-menu",component:V.NavigationMenuContainer})}registerOverrideService(B){const x=this.injector.get(Z.MonacoCodeService),J=this.injector.get(o.IContextKeyService).createScoped();this.workbenchEditorService.setEditorContextKeyService(J),B.registerOverrideService(o.ServiceNames.CONTEXT_KEY_SERVICE,J.contextKeyService),B.registerOverrideService(o.ServiceNames.CODE_EDITOR_SERVICE,x),B.registerOverrideService(o.ServiceNames.CONTEXT_VIEW_SERVICE,new Z.MonacoContextViewService(x)),B.registerOverrideService(o.ServiceNames.TEXT_MODEL_SERVICE,this.injector.get(f.MonacoTextModelService))}registerMonacoDefaultFormattingSelector(B){const x=this.injector.get(A.FormattingSelector);this.addDispose(B(x.selectFormatter.bind(x)))}registerEditorExtensionContribution(B){B(F.EditorContextMenuController.ID,new d.SyncDescriptor(F.EditorContextMenuController,[this.contextMenuService,this.globalContextKeyService,this.contextMenuRenderer]))}getMimeForMode(B){for(const x of this.textmateService.getLanguages())if(x.id===B&&x.mimetypes)return x.mimetypes[0]}registerPlatformLanguageAssociations(B){const x=this.corePreferences["files.associations"];if(!x)return;const D=Object.keys(x).map(J=>({id:x[J],filepattern:J,mime:this.getMimeForMode(x[J])||`text/x-${x.id}`}));B(D)}async interceptOpen(B){try{return await this.openerService.open(B),!0}catch(x){return this.logger.error(x),!1}}onWillStop(B){if(!this.appConfig.isElectronRenderer)return this.workbenchEditorService.hasDirty()||!this.cacheProvider.isFlushed()}extractGroupAndUriFromArgs(B,x){let D,J;if(B instanceof o.URI)D=x||this.workbenchEditorService.currentEditorGroup,J=B||D&&D.currentResource&&D.currentResource.uri;else{const k=B||{};D=k.group||this.workbenchEditorService.currentEditorGroup,J=k.uri||D&&D.currentResource&&D.currentResource.uri}return{group:D,uri:J}}isElectronRenderer(){return this.appConfig.isElectronRenderer}registerKeybindings(B){B.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_CURRENT.id,keybinding:"ctrlcmd+s"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT.id,keybinding:"ctrlcmd+f",when:"!editorFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+w":"alt+shift+w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"alt+cmd+left":"ctrlcmd+ctrl+left"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"alt+cmd+right":"ctrlcmd+ctrl+right"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pageup":"alt+pageup"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pagedown":"alt+pagedown"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_FORWARD.id,keybinding:h.isWindows?"alt+right":"ctrl+shift+-"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_BACK.id,keybinding:h.isWindows?"alt+left":"ctrl+-"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CHANGE_LANGUAGE.id,keybinding:"ctrlcmd+k m"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,keybinding:"ctrlcmd+\\"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_NEXT.id,keybinding:"ctrlcmd+k ctrlcmd+right"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS.id,keybinding:"ctrlcmd+k ctrlcmd+left"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_ALL.id,keybinding:"alt+ctrlcmd+s"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,keybinding:"ctrlcmd+k w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL.id,keybinding:"ctrlcmd+k ctrlcmd+w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_SAVED.id,keybinding:"ctrlcmd+k u"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PIN_CURRENT.id,keybinding:"ctrlcmd+k enter"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COPY_CURRENT_PATH.id,keybinding:"ctrlcmd+k p"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.REOPEN_CLOSED.id,keybinding:this.isElectronRenderer()?"ctrlcmd+shift+t":"alt+shift+t"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+n":"alt+n"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,keybinding:this.isElectronRenderer()?"ctrlcmd+t":"ctrlcmd+o"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+alt+t":"ctrlcmd+alt+o"});for(let x=1;x<10;x++)B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_TO_GROUP.id,keybinding:"ctrlcmd+"+x,args:[x]});["left","up","down","right"].forEach(x=>{B.registerKeybinding({command:o.EDITOR_COMMANDS.MOVE_GROUP.id,keybinding:"ctrlcmd+k "+x,args:[x]})}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_UNDO.id,keybinding:"ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_REDO.id,keybinding:"shift+ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,keybinding:"alt+z",when:"editorFocus"})}initialize(){this.editorStatusBarService.setListener(),this.historyService.init()}registerCommands(B){B.registerCommand(o.EDITOR_COMMANDS.GO_FORWARD,{execute:()=>{this.historyService.forward()}}),B.registerCommand(o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT,{execute:()=>{var x,D;if(!document.activeElement||document.activeElement===document.body){const J=this.workbenchEditorService.currentEditorGroup;J?.focus(),(D=(x=J?.currentCodeEditor)===null||x===void 0?void 0:x.monacoEditor)===null||D===void 0||D.trigger("api","actions.find",null)}}}),B.registerCommand(o.EDITOR_COMMANDS.GO_BACK,{execute:()=>{this.historyService.back()}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE,{execute:async(x,D)=>{const J=await this.workbenchEditorService.open(x,D);if(J)return{groupId:J?.group.name}}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCES,{execute:({uris:x})=>{this.workbenchEditorService.openUris(x)}}),B.registerCommand(o.EDITOR_COMMANDS.COMPARE,{execute:({original:x,modified:D,name:J},k={})=>(J=J||`${x.displayName} <=> ${D.displayName}`,this.workbenchEditorService.open(o.URI.from({scheme:m.DIFF_SCHEME,query:o.URI.stringifyQuery({name:J,original:x,modified:D})}),k))}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR_DEV,{execute:async()=>{try{const x=await this.quickInputService.open({value:""});if(!x)return;const D=JSON.parse(x);this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR.id,D)}catch{}}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR,{execute:x=>{const D=p.IRelaxedOpenMergeEditorArgs.validate(x);this.workbenchEditorService.open(o.URI.from({scheme:"mergeEditor",query:o.URI.stringifyQuery({name:(0,o.formatLocalize)("mergeEditor.workbench.tab.name",D.output.displayName),openMetadata:p.IRelaxedOpenMergeEditorArgs.toString(D)})}))}}),B.registerCommand(o.EDITOR_COMMANDS.MERGEEDITOR_RESET,{execute:()=>{const x=this.mergeEditorService.getNutrition();if(!x)return;const{output:D}=x,{uri:J}=D;this.mergeEditorService.fireRestoreState(J),this.mergeEditorService.compare()}}),B.registerCommand(o.EDITOR_COMMANDS.SAVE_CURRENT,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.currentResource&&(x.pin(x.currentResource.uri),x.saveCurrent())}}),B.registerCommand(o.EDITOR_COMMANDS.SAVE_URI,{execute:async x=>{for(const D of this.workbenchEditorService.editorGroups){const J=D.resources.find(k=>k.uri.isEqual(x));J&&D.saveResource(J)}}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP,{execute:async(x,D)=>{const{group:J}=this.extractGroupAndUriFromArgs(x,D);J&&await J.closeAll()}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_SAVED,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup}=x;D&&await D.closeSaved()}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.closeOthers(J)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.close(J)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_TO_RIGHT,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.closeToRight(J)}}),B.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT,{execute:()=>this.workbenchEditorService.currentEditorGroup}),B.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT_RESOURCE,{execute:()=>this.workbenchEditorService.currentResource}),B.registerCommand(o.EDITOR_COMMANDS.PIN_CURRENT,{execute:()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.pinPreviewed()}}),B.registerCommand(o.EDITOR_COMMANDS.COPY_CURRENT_PATH,{execute:()=>{const x=this.workbenchEditorService.currentResource;x&&x.uri.scheme===o.Schemes.file&&this.clipboardService.writeText(x.uri.codeUri.fsPath)}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_LEFT,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Left,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_RIGHT,{execute:async(x,D)=>{const{group:J,uri:k}=this.extractGroupAndUriFromArgs(x,D);J&&k&&await J.split(m.EditorGroupSplitAction.Right,k,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.GO_TO_GROUP,{execute:async(x=1)=>{var D;const J=this.workbenchEditorService.sortedEditorGroups[x-1];if(J){J.focus();return}const k=this.workbenchEditorService.sortedEditorGroups.length;if(k===x-1){const z=this.workbenchEditorService.sortedEditorGroups[k-1],P=(D=z?.currentResource)===null||D===void 0?void 0:D.uri;z&&P&&await z.split(m.EditorGroupSplitAction.Right,P,{focus:!0})}}}),B.registerCommand(o.EDITOR_COMMANDS.MOVE_GROUP,{execute:async x=>{if(x){const D=this.workbenchEditorService.currentEditorGroup;D&&D.grid.move(x)}}}),B.registerCommand(o.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_TOP,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Top,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Bottom,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_LANGUAGE,{execute:async x=>{const J=this.languagesService.languages.map(z=>({label:z.name,value:z.id,description:`(${z.id})`})),k=await this.quickPickService.show(J,{placeholder:(0,o.localize)("editor.changeLanguageId"),selectIndex:()=>J.findIndex(z=>{var P,U;return z.value===((U=(P=this.workbenchEditorService.currentCodeEditor)===null||P===void 0?void 0:P.currentDocumentModel)===null||U===void 0?void 0:U.languageId)})});if(k&&x!==k&&this.workbenchEditorService.currentEditor){const z=this.workbenchEditorService.currentEditor.currentDocumentModel;z&&this.editorDocumentModelService.changeModelOptions(z.uri,{languageId:k})}}}),B.registerCommand(o.EDITOR_COMMANDS.GET_ENCODING,{execute:x=>{if(!x)return;const D=this.editorDocumentModelService.getModelDescription(x);if(D)return D.encoding}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_ENCODING,{execute:async x=>{var D,J,k,z;x=x??((D=this.workbenchEditorService.currentResource)===null||D===void 0?void 0:D.uri);const P=(J=this.workbenchEditorService.currentEditor)===null||J===void 0?void 0:J.currentDocumentModel;if(!x)return;const U=this.preferenceService.get("files.encoding","utf8",x.toString(),(0,o.getLanguageIdFromMonaco)(x)),ne=await this.contentRegistry.getProvider(x),re=await((k=ne?.guessEncoding)===null||k===void 0?void 0:k.call(ne,x)),ae=this.editorDocumentModelService.getModelDescription(x),ue=(z=P?.encoding)!==null&&z!==void 0?z:ae?.encoding;let $;const pe=Object.keys(o.SUPPORTED_ENCODINGS).sort((le,ie)=>le===U?-1:ie===U?1:o.SUPPORTED_ENCODINGS[le].order-o.SUPPORTED_ENCODINGS[ie].order).filter(le=>le===re&&re!==U?!1:!o.SUPPORTED_ENCODINGS[le].encodeOnly).map((le,ie)=>((le===ue||o.SUPPORTED_ENCODINGS[le].alias===ue)&&($=ie),{label:o.SUPPORTED_ENCODINGS[le].labelLong,value:le,description:le}));re&&U!==re&&o.SUPPORTED_ENCODINGS[re]&&(pe[0]&&(pe[0].showBorder=!0),pe.unshift({label:o.SUPPORTED_ENCODINGS[re].labelLong,value:re,description:(0,o.localize)("editor.guessEncodingFromContent")}),typeof $=="number"&&$++);const ge=await this.quickPickService.show(pe,{placeholder:(0,o.localize)("editor.chooseEncoding"),selectIndex(le){return le?-1:typeof $=="number"?$:-1}});if(!ge)return;const q=[];if(x.scheme===m.DIFF_SCHEME){const le=await this.resourceService.getResource(x);le.metadata&&(q.push(le.metadata.original),q.push(le.metadata.modified))}else q.push(x);q.forEach(le=>{this.editorDocumentModelService.changeModelOptions(le,{encoding:ge})})}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_EOL,{execute:async()=>{const x=this.workbenchEditorService.currentResource,D=this.workbenchEditorService.currentCodeEditor;if(D&&D.currentDocumentModel&&x){const J=await this.quickPickService.show([{label:"LF",value:`
|
|
28065
|
+
`?r.DefaultEndOfLine.CRLF:r.DefaultEndOfLine.LF,{textBuffer:F,disposable:V}=(0,l.createTextBuffer)(E,w),Y=n._computeEdits(this.monacoModel,F);this.monacoModel.pushEditOperations([],Y,()=>[]),A&&(this.setPersist(this.monacoModel.getAlternativeVersionId()),this.baseContent=E,this.dirtyChanges=[]),V.dispose()}static _computeEdits(E,R){const A=E.getLineCount(),w=R.getLineCount(),F=this._commonPrefix(E,A,1,R,w,1);if(A===w&&F===A)return[];const V=this._commonSuffix(E,A-F,F,R,w-F,F);let Y,_;return V>0?(Y=new I.Range(F+1,1,A-V+1,1),_=new I.Range(F+1,1,w-V+1,1)):F>0?(Y=new I.Range(F,E.getLineMaxColumn(F),A,E.getLineMaxColumn(A)),_=new I.Range(F,1+R.getLineLength(F),w,1+R.getLineLength(w))):(Y=new I.Range(1,1,A,E.getLineMaxColumn(A)),_=new I.Range(1,1,w,1+R.getLineLength(w))),[b.EditOperation.replaceMove(Y,R.getValueInRange(_,r.EndOfLinePreference.TextDefined))]}static _commonPrefix(E,R,A,w,F,V){const Y=Math.min(R,F);let _=0;for(let H=0;H<Y&&E.getLineContent(A+H)===w.getLineContent(V+H);H++)_++;return _}static _commonSuffix(E,R,A,w,F,V){const Y=Math.min(R,F);let _=0;for(let H=0;H<Y&&E.getLineContent(A+R-H)===w.getLineContent(V+F-H);H++)_++;return _}set baseContent(E){this._baseContent=E,this._baseContentMd5=null}get baseContent(){return this._baseContent}get baseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}get tryAutoSaveAfterDelay(){return this._tryAutoSaveAfterDelay||(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,s.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3),this.addDispose(this.editorPreferences.onPreferenceChanged(E=>{E.preferenceName==="editor.autoSaveDelay"&&(this._tryAutoSaveAfterDelay=(0,o.default)(()=>{this.save(void 0,s.SaveReason.AfterDelay)},this.editorPreferences["editor.autoSaveDelay"]||1e3))}))),this._tryAutoSaveAfterDelay}getBaseContentMd5(){return this._baseContentMd5||(this._baseContentMd5=this.hashCalculateService.calculate(this._baseContent)),this._baseContentMd5}notifyChangeEvent(E=[],R,A){!this.closeAutoSave&&this.savable&&this.editorPreferences["editor.autoSave"]===d.AUTO_SAVE_MODE.AFTER_DELAY&&this.tryAutoSaveAfterDelay(),this.eventBus.fire(new W.EditorDocumentModelContentChangedEvent({uri:this.uri,dirty:this.dirty,readonly:this.readonly,changes:E,eol:this.eol,isRedoing:R,isUndoing:A,versionId:this.monacoModel.getVersionId()}));const w=this;this.cacheProvider.persistCache(this.uri,{get dirty(){return w.dirty},get startMD5(){return w.getBaseContentMd5()},get content(){return w.getText()},get changeMatrix(){return w.dirtyChanges.map(({changes:F})=>F)},encoding:this.encoding})}async formatOnSave(E){if(this.editorPreferences["editor.formatOnSave"]&&E!==s.SaveReason.AfterDelay){const A=this.editorPreferences["editor.formatOnSaveTimeout"]||3e3,w=this.reporter.time(g.REPORT_NAME.FORMAT_ON_SAVE);try{await Promise.race([new Promise((F,V)=>{setTimeout(()=>{const Y=new Error((0,g.formatLocalize)("preference.editor.formatOnSaveTimeoutError",A));Y.name="FormatOnSaveTimeoutError",V(Y)},A)}),this.commandService.executeCommand(g.EDITOR_COMMANDS.FORMAT_DOCUMENT.id)])}catch(F){F.name==="FormatOnSaveTimeoutError"&&this.reporter.point(g.REPORT_NAME.FORMAT_ON_SAVE_TIMEOUT_ERROR,this.uri.toString()),this.logger.warn(`${f.EditorDocumentError.FORMAT_ERROR} ${F&&F.message}`)}finally{w.timeEnd(this.uri.path.ext)}}}};a.__decorate([(0,c.Autowired)(W.IEditorDocumentModelContentRegistry),a.__metadata("design:type",Object)],Z.prototype,"contentRegistry",void 0),a.__decorate([(0,c.Autowired)(W.IEditorDocumentModelService),a.__metadata("design:type",Object)],Z.prototype,"service",void 0),a.__decorate([(0,c.Autowired)(v.ICompareService),a.__metadata("design:type",Object)],Z.prototype,"compareService",void 0),a.__decorate([(0,c.Autowired)(s.IDocPersistentCacheProvider),a.__metadata("design:type",Object)],Z.prototype,"cacheProvider",void 0),a.__decorate([(0,c.Autowired)(h.IMessageService),a.__metadata("design:type",Object)],Z.prototype,"messageService",void 0),a.__decorate([(0,c.Autowired)(g.IEventBus),a.__metadata("design:type",Object)],Z.prototype,"eventBus",void 0),a.__decorate([(0,c.Autowired)(g.ILogger),a.__metadata("design:type",Object)],Z.prototype,"logger",void 0),a.__decorate([(0,c.Autowired)(g.CommandService),a.__metadata("design:type",Object)],Z.prototype,"commandService",void 0),a.__decorate([(0,c.Autowired)(g.IReporterService),a.__metadata("design:type",Object)],Z.prototype,"reporter",void 0),a.__decorate([(0,c.Autowired)(g.PreferenceService),a.__metadata("design:type",Object)],Z.prototype,"preferences",void 0),a.__decorate([(0,c.Autowired)(u.IHashCalculateService),a.__metadata("design:type",Object)],Z.prototype,"hashCalculateService",void 0),Z=n=a.__decorate([(0,c.Injectable)({multiple:!0}),a.__metadata("design:paramtypes",[g.URI,String,Object])],Z),e.EditorDocumentModel=Z},78157:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDocumentModelContentRegistryImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96689);let g=class{constructor(){this.providers=[],this._onOriginalDocChanged=new o.Emitter,this.cachedProviders=new o.LRUMap(1e3,500),this.originalProvider={handlesScheme:G=>G===c.ORIGINAL_DOC_SCHEME,provideEditorDocumentModelContent:async G=>{const{target:p}=G.getParsedQuery(),h=new o.URI(p);return await this.getContentForUri(h)||""},isReadonly:()=>!0,onDidChangeContent:this._onOriginalDocChanged.event},this.registerEditorDocumentModelContentProvider(this.originalProvider)}registerEditorDocumentModelContentProvider(G){this.providers.push(G),this.cachedProviders.clear();const p=G.onDidChangeContent(h=>{this.eventBus.fire(new c.EditorDocumentModelOptionExternalUpdatedEvent(h))});return G!==this.originalProvider&&G.onDidChangeContent&&G.onDidChangeContent(h=>{this._onOriginalDocChanged.fire(o.URI.from({scheme:c.ORIGINAL_DOC_SCHEME,query:o.URI.stringifyQuery({target:h.toString()})}))}),{dispose:()=>{p.dispose();const h=this.providers.indexOf(G);h&&(this.providers.splice(h,1),this.cachedProviders.clear())}}}getProvider(G){const p=G.toString();return this.cachedProviders.has(p)||this.cachedProviders.set(p,this.calculateProvider(G)),this.cachedProviders.get(p)}async calculateProvider(G){let p={provider:void 0,weight:-1,index:1};for(const h of this.providers){let b=-1;const I=this.providers.indexOf(h);h.handlesUri?b=await h.handlesUri(G):h.handlesScheme&&(b=await h.handlesScheme(G.scheme)?10:-1),b>=0&&(b>p.weight||b===p.weight&&I>p.index)&&(p={index:I,weight:b,provider:h})}return p.provider}async getContentForUri(G,p){const h=await this.getProvider(G);if(!h)throw new Error;return h.provideEditorDocumentModelContent(G,p)}};n.__decorate([(0,a.Autowired)(o.IEventBus),n.__metadata("design:type",Object)],g.prototype,"eventBus",void 0),g=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],g),e.EditorDocumentModelContentRegistryImpl=g},37275:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(9519),e),n.__exportStar(t(91249),e),n.__exportStar(t(78157),e),n.__exportStar(t(98469),e)},89618:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoTextModelService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(96689);let g=class{canHandleResource(G){return!0}hasTextModelContentProvider(G){throw new Error("Method not implemented.")}async createModelReference(G){const p=await this.documentModelManager.createModelReference(new o.URI(G.toString()),"monaco");if(p){const h=p.instance.getMonacoModel();return Promise.resolve({object:{textEditorModel:h},dispose:()=>{p.dispose()}})}}registerTextModelContentProvider(G,p){return{dispose(){}}}};n.__decorate([(0,a.Autowired)(c.IEditorDocumentModelService),n.__metadata("design:type",Object)],g.prototype,"documentModelManager",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.MonacoTextModelService=g},98469:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveTask=void 0;const n=t(41869);class a extends n.Disposable{constructor(c,g,u,G,p){super(),this.uri=c,this.versionId=g,this.alternativeVersionId=u,this.content=G,this.ignoreDiff=p,this.deferred=new n.Deferred,this.finished=this.deferred.promise,this.started=!1,this.disposables.push(this.cancelToken=new n.CancellationTokenSource)}async run(c,g,u,G,p){this.started=!0;try{const h=await c.saveEditorDocumentModel(this.uri,this.content,g,u,G,this.ignoreDiff,p,this.cancelToken.token);return this.deferred.resolve(h),h}catch(h){const b={errorMessage:h.message,state:n.SaveTaskResponseState.ERROR};return this.deferred.resolve(b),b}}cancel(){this.cancelToken.cancel();const c={errorMessage:"cancel",state:n.SaveTaskResponseState.ERROR};this.deferred.resolve(c)}}e.SaveTask=a},66537:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipantsContribution=e.TrimFinalNewLinesParticipant=e.CodeActionOnSaveParticipant=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68969),g=n.__importStar(t(20868)),u=t(52902),G=t(79865),p=t(2261),h=t(44781),b=n.__importStar(t(48069)),I=t(84866),r=t(81559),l=t(93152),s=t(82196),d=t(96689);function m(W,Z){let y=null;if(W.isAttachedToEditor()){for(const E of Z.listCodeEditors())if(E.hasModel()&&E.getModel()===W){if(E.hasTextFocus())return E;y=E}}return y}let v=class extends o.WithEventBus{get bulkEditService(){return this.overrideServiceRegistry.getRegisteredService(o.ServiceNames.BULK_EDIT_SERVICE)}activate(){}async onEditorDocumentModelWillSave(Z){if(Z.payload.reason!==s.SaveReason.Manual)return;const y=this.preferenceService.get("editor.codeActionsOnSave",void 0,Z.payload.uri.toString(),Z.payload.language);if(!y)return;const E=this.preferenceService.get("editor.codeActionsOnSaveNotification",!0,Z.payload.uri.toString(),Z.payload.language),R=A=>{const F=(Array.isArray(y)?y:Object.keys(y)).map(S=>new r.CodeActionKind(S));if(Array.isArray(y)||F.sort((S,Q)=>r.CodeActionKind.SourceFixAll.contains(S)?r.CodeActionKind.SourceFixAll.contains(Q)?0:-1:r.CodeActionKind.SourceFixAll.contains(Q)?1:0),F.length===0)return;const V=this.docService.getModelReference(Z.payload.uri,"codeActionOnSave");if(!V)return;const Y=V.instance.getMonacoModel(),_=new g.CancellationTokenSource,H=this.preferenceService.get("editor.codeActionsOnSaveTimeout",void 0,Z.payload.uri.toString(),Z.payload.language),X=Array.isArray(y)?[]:Object.keys(y).filter(S=>y[S]===!1).map(S=>new r.CodeActionKind(S));return Promise.race([new Promise((S,Q)=>setTimeout(()=>{_.cancel(),Q("codeActionsOnSave timeout")},H)),this.applyOnSaveActions(Y,F,X,A,_.token)]).finally(()=>{_.cancel(),V.dispose()})};return E?this.progressService.withProgress({title:(0,o.formatLocalize)("editor.saveCodeActions.saving",Z.payload.uri.displayName),location:o.ProgressLocation.Notification,cancellable:!0},async A=>R(A)):R(null)}async applyOnSaveActions(Z,y,E,R,A){const w=new class{constructor(){this._names=new Set}_report(){R&&R.report({message:(0,o.formatLocalize)("editor.saveCodeActions.getting",[...this._names].map(F=>`'${F}'`).join(", "))})}report(F){F.displayName&&!this._names.has(F.displayName)&&(this._names.add(F.displayName),this._report())}};for(const F of y)try{const V=await this.getActionsToRun(Z,F,E,w,A);await this.applyCodeActions(V.validActions)}catch(V){this.logger.error(V)}}async applyCodeActions(Z){var y;for(const E of Z)E.action.edit&&await((y=this.bulkEditService)===null||y===void 0?void 0:y.apply(u.ResourceEdit.convert(E.action.edit))),E.action.command&&await this.commandService.executeCommand(E.action.command.id,...E.action.command.arguments||[])}async getActionsToRun(Z,y,E,R,A){return(0,I.getCodeActions)(G.languageFeaturesService.codeActionProvider,Z,Z.getFullModelRange(),{type:b.CodeActionTriggerType.Auto,filter:{include:y,excludes:E,includeSourceActions:!0},triggerAction:r.CodeActionTriggerSource.OnSave},R,A)}};n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],v.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],v.prototype,"overrideServiceRegistry",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],v.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],v.prototype,"docService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],v.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(c.IProgressService),n.__metadata("design:type",Object)],v.prototype,"progressService",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],v.prototype,"onEditorDocumentModelWillSave",null),v=n.__decorate([(0,a.Injectable)()],v),e.CodeActionOnSaveParticipant=v;let f=class extends o.WithEventBus{activate(){}async onEditorDocumentModelWillSave(Z){if(this.preferenceService.get("files.trimFinalNewlines")){const E=this.docService.getModelReference(Z.payload.uri,"trimFinalNewlines");if(!E)return;const R=E.instance.getMonacoModel();this.doTrimFinalNewLines(R,Z.payload.reason!==s.SaveReason.Manual),E.dispose()}}findLastNonEmptyLine(Z){for(let y=Z.getLineCount();y>=1;y--)if(Z.getLineContent(y).length>0)return y;return 0}doTrimFinalNewLines(Z,y){const E=Z.getLineCount();if(E===1)return;let R=[],A=0;const w=this.injector.get(l.MonacoCodeService),F=m(Z,w);if(F&&(R=F.getSelections(),y))for(let H=0,X=R.length;H<X;H++){const S=R[H].positionLineNumber;S>A&&(A=S)}const V=this.findLastNonEmptyLine(Z),Y=Math.max(V+1,A+1),_=Z.validateRange(new h.Range(Y,1,E,Z.getLineMaxColumn(E)));_.isEmpty()||(Z.pushEditOperations(R,[p.EditOperation.delete(_)],()=>R),F?.setSelections(R))}};n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],f.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"docService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],f.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,o.OnEvent)(d.EditorDocumentModelWillSaveEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[d.EditorDocumentModelWillSaveEvent]),n.__metadata("design:returntype",Promise)],f.prototype,"onEditorDocumentModelWillSave",null),f=n.__decorate([(0,a.Injectable)()],f),e.TrimFinalNewLinesParticipant=f;let N=class{onStart(){this.codeActionOnSaveParticipant.activate(),this.trimFinalNewLinesParticipant.activate()}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",v)],N.prototype,"codeActionOnSaveParticipant",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",f)],N.prototype,"trimFinalNewLinesParticipant",void 0),N=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],N),e.SaveParticipantsContribution=N},96689:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ORIGINAL_DOC_SCHEME=e.EditorDocumentModelWillSaveEvent=e.EditorDocumentModelSavedEvent=e.EditorDocumentModelRemovalEvent=e.EditorDocumentModelCreationEvent=e.EditorDocumentModelOptionExternalUpdatedEvent=e.EditorDocumentModelOptionChangedEvent=e.EditorDocumentModelContentChangedEvent=e.IEditorDocumentModelContentRegistry=e.IEditorDocumentModelService=void 0;const n=t(41869);e.IEditorDocumentModelService=Symbol("IEditorDocumentModelService"),e.IEditorDocumentModelContentRegistry=Symbol("IEditorDocumentModelContentRegistry");class a extends n.BasicEvent{}e.EditorDocumentModelContentChangedEvent=a;class o extends n.BasicEvent{}e.EditorDocumentModelOptionChangedEvent=o;class c extends n.BasicEvent{}e.EditorDocumentModelOptionExternalUpdatedEvent=c;class g extends n.BasicEvent{}e.EditorDocumentModelCreationEvent=g;class u extends n.BasicEvent{}e.EditorDocumentModelRemovalEvent=u;class G extends n.BasicEvent{}e.EditorDocumentModelSavedEvent=G;class p extends n.BasicEvent{}e.EditorDocumentModelWillSaveEvent=p,e.ORIGINAL_DOC_SCHEME="original_doc"},71624:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDiffEditor=e.BrowserCodeEditor=e.BaseMonacoEditorWrapper=e.insertSnippetWithMonacoEditor=e.EditorCollectionServiceImpl=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(66e3),g=t(22689),u=t(43718),G=n.__importStar(t(20868)),p=t(99721),h=t(23418),b=t(84677),I=t(96689),r=t(59879),l=t(6043),s=t(82196),{removeUndefined:d}=u.objects;let m=class extends u.WithEventBus{get currentEditor(){return this._currentEditor}constructor(){super(),this._editors=new Set,this._diffEditors=new Set,this._onCodeEditorCreate=new u.Emitter,this._onDiffEditorCreate=new u.Emitter,this.onCodeEditorCreate=this._onCodeEditorCreate.event,this.onDiffEditorCreate=this._onDiffEditorCreate.event,this.addDispose(this.editorFeatureRegistry.onDidRegisterFeature(w=>{this._editors.forEach(F=>{this.editorFeatureRegistry.runOneContribution(F,w)})}))}createCodeEditor(w,F,V){const Y=Object.assign(Object.assign({},(0,l.getConvertedMonacoOptions)(this.configurationService).editorOptions),F),_=this.monacoService.createCodeEditor(w,Y,V),H=this.injector.get(W,[_,F]);return this._onCodeEditorCreate.fire(H),H}listEditors(){return Array.from(this._editors.values())}getEditorByUri(w){var F;for(const V of this._editors.values())if(!((F=V.currentUri)===null||F===void 0)&&F.isEqual(w))return V}addEditors(w){const F=this._editors.size;w.forEach(V=>{this._editors.has(V)||(this._editors.add(V),this.editorFeatureRegistry.runContributions(V),V.monacoEditor.onDidFocusEditorWidget(()=>{this._currentEditor=V}),V.monacoEditor.onContextMenu(()=>{this._currentEditor=V}))}),this._editors.size}removeEditors(w){const F=this._editors.size;w.forEach(V=>{this._editors.delete(V),this._currentEditor===V&&(this._currentEditor=void 0)}),this._editors.size}createDiffEditor(w,F,V){const Y=(0,l.getConvertedMonacoOptions)(this.configurationService),_=Object.assign(Object.assign(Object.assign({},Y.editorOptions),Y.diffOptions),F),H=this.monacoService.createDiffEditor(w,_,V),X=this.injector.get(Z,[H,F]);return this._onDiffEditorCreate.fire(X),X}createMergeEditor(w,F,V){const Y=(0,l.getConvertedMonacoOptions)(this.configurationService),_=Object.assign(Object.assign(Object.assign(Object.assign({},Y.editorOptions),Y.diffOptions),F),{wordWrap:"off"});return this.monacoService.createMergeEditor(w,_,V)}listDiffEditors(){return Array.from(this._diffEditors.values())}addDiffEditors(w){const F=this._diffEditors.size;w.forEach(V=>{this._diffEditors.has(V)||this._diffEditors.add(V)}),this._diffEditors.size}removeDiffEditors(w){const F=this._diffEditors.size;w.forEach(V=>{this._diffEditors.delete(V)}),this._diffEditors.size}onDocModelContentChangedEvent(w){this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:w.payload.uri,decoration:{dirty:!!w.payload.dirty,readOnly:!!w.payload.readonly}}))}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",g.MonacoService)],m.prototype,"monacoService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],m.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],m.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",r.EditorFeatureRegistryImpl)],m.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],m.prototype,"documentModelService",void 0),n.__decorate([(0,u.OnEvent)(I.EditorDocumentModelContentChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[I.EditorDocumentModelContentChangedEvent]),n.__metadata("design:returntype",void 0)],m.prototype,"onDocModelContentChangedEvent",null),m=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],m),e.EditorCollectionServiceImpl=m;function v(A,w,F,V){const Y=A.getContribution("snippetController2"),_=F.map(H=>new G.Selection(H.startLineNumber,H.startColumn,H.endLineNumber,H.endColumn));A.setSelections(_),A.focus(),Y.insert(w,0,0,V.undoStopBefore,V.undoStopAfter)}e.insertSnippetWithMonacoEditor=v;function f(A,w,F){A.updateOptions(w),A.getModel()&&A.getModel().updateOptions(F)}let N=class extends u.WithEventBus{get currentUri(){return this.currentDocumentModel?this.currentDocumentModel.uri:null}getId(){return this.monacoEditor.getId()}getSelections(){return this.monacoEditor.getSelections()||[]}disableSelectionEmitter(){this._disableSelectionEmitter=!0}enableSelectionEmitter(){this._disableSelectionEmitter=!1}constructor(w,F){super(),this.monacoEditor=w,this.type=F,this.onFocus=this.monacoEditor.onDidFocusEditorWidget,this.onBlur=this.monacoEditor.onDidBlurEditorWidget,this._specialEditorOptions={},this._specialModelOptions={},this._editorOptionsFromContribution={},this._disableSelectionEmitter=!1,this.decorationApplier=this.injector.get(b.MonacoEditorDecorationApplier,[this.monacoEditor]),this.addDispose(this.monacoEditor.onDidChangeModel(this.onDidChangeModel.bind(this))),this.addDispose(this.monacoEditor.onDidChangeModelLanguage(()=>{this._doUpdateOptions()})),this.addDispose(this.configurationService.onDidChangeConfiguration(V=>{Array.from(V.affectedKeys.values()).filter(_=>(0,l.isEditorOption)(_)).length>0&&this._doUpdateOptions()}))}async onDidChangeModel(){this._editorOptionsFromContribution={};const w=this.currentUri;w&&Promise.resolve(this.editorFeatureRegistry.runProvideEditorOptionsForUri(w)).then(F=>{!this.currentUri||!w.isEqual(this.currentUri)||F&&Object.keys(F).length>0&&(this._editorOptionsFromContribution=F,(0,u.isEmptyObject)(this._editorOptionsFromContribution)||this._doUpdateOptions())})}getType(){return this.type}updateOptions(w={},F={}){this._specialEditorOptions=d(Object.assign(Object.assign({},this._specialEditorOptions),w)),this._specialModelOptions=d(Object.assign(Object.assign({},this._specialModelOptions),F)),this._doUpdateOptions()}_doUpdateOptions(){const{editorOptions:w,modelOptions:F}=this._calculateFinalOptions();f(this.monacoEditor,w,F)}_calculateFinalOptions(){var w;const F=this.currentUri?this.currentUri.toString():void 0,V=this.currentDocumentModel?this.currentDocumentModel.languageId:void 0,Y=(0,l.getConvertedMonacoOptions)(this.configurationService,F,V,void 0),_={readOnly:((w=this.currentDocumentModel)===null||w===void 0?void 0:w.readonly)||!1};let H=Object.assign(Object.assign(Object.assign(Object.assign({},_),Y.editorOptions),this._editorOptionsFromContribution),this._specialEditorOptions);return this.type!==h.EditorType.CODE&&(H=Object.assign(Object.assign({},H),Y.diffOptions)),{editorOptions:H,modelOptions:Object.assign(Object.assign({},Y.modelOptions),this._specialModelOptions)}}insertSnippet(w,F,V){v(this.monacoEditor,w,F,V)}applyDecoration(w,F){this.decorationApplier.applyDecoration(w,F)}onSelectionsChanged(w){return this.monacoEditor.onDidChangeCursorSelection(F=>{this._disableSelectionEmitter||w({selections:this.getSelections(),source:F.source})})}onVisibleRangesChanged(w){const F=new u.Disposable,V=this.monacoEditor;return F.addDispose(V.onDidScrollChange(Y=>{w(this.monacoEditor.getVisibleRanges())})),F.addDispose(V.onDidLayoutChange(Y=>{w(this.monacoEditor.getVisibleRanges())})),F}setSelections(w){return this.monacoEditor.setSelections(w)}setSelection(w){return this.monacoEditor.setSelection(w)}async save(){this.currentDocumentModel&&await this.currentDocumentModel.save()}onConfigurationChanged(w){return this.monacoEditor.onDidChangeConfiguration(V=>{w()})}};n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],N.prototype,"editorFeatureRegistry",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],N.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],N.prototype,"injector",void 0),N=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],N),e.BaseMonacoEditorWrapper=N;let W=class extends N{get currentDocumentModel(){return this._currentDocumentModelRef&&!this._currentDocumentModelRef.disposed?this._currentDocumentModelRef.instance:null}getType(){return h.EditorType.CODE}constructor(w,F={}){super(w,h.EditorType.CODE),this.monacoEditor=w,this.editorState=new Map,this._onCursorPositionChanged=new u.Emitter,this.onCursorPositionChanged=this._onCursorPositionChanged.event,this._onRefOpen=new u.Emitter,this.onRefOpen=this._onRefOpen.event,this._specialEditorOptions=F,this.collectionService.addEditors([this]);const V=w.onDidChangeModel(()=>{y(this.monacoEditor.getDomNode()),V.dispose()});this.addDispose(w.onDidChangeCursorPosition(()=>{if(!this.currentDocumentModel)return;const Y=w.getSelection();this._onCursorPositionChanged.fire({position:w.getPosition(),selectionLength:Y?this.currentDocumentModel.getMonacoModel().getValueInRange(Y).length:0})})),this.addDispose(this.monacoEditor)}layout(w,F=!1){this.monacoEditor.layout(w,F)}focus(){this.monacoEditor.focus()}dispose(){super.dispose(),this.saveCurrentState(),this.collectionService.removeEditors([this])}saveCurrentState(){if(this.currentUri){const w=this.monacoEditor.saveViewState();w&&this.editorState.set(this.currentUri.toString(),w)}}restoreState(){if(this.currentUri){const w=this.editorState.get(this.currentUri.toString());w&&this.monacoEditor.restoreViewState(w)}}open(w){this.saveCurrentState(),this._currentDocumentModelRef=w;const F=this.currentDocumentModel.getMonacoModel();this.disableSelectionEmitter(),this.monacoEditor.setModel(F),this.enableSelectionEmitter(),this.restoreState(),this._onRefOpen.fire(w),this._onCursorPositionChanged.fire({position:this.monacoEditor.getPosition(),selectionLength:0});const{instance:V}=w;this.updateOptions(),this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:V.uri,decoration:{readOnly:V.readonly}}))}};n.__decorate([(0,a.Autowired)(h.EditorCollectionService),n.__metadata("design:type",m)],W.prototype,"collectionService",void 0),n.__decorate([(0,a.Autowired)(s.IEditorFeatureRegistry),n.__metadata("design:type",Object)],W.prototype,"editorFeatureRegistry",void 0),W=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],W),e.BrowserCodeEditor=W;class Z extends u.WithEventBus{get originalDocModel(){return this.originalDocModelRef&&!this.originalDocModelRef.disposed?this.originalDocModelRef.instance:null}get modifiedDocModel(){return this.modifiedDocModelRef&&!this.modifiedDocModelRef.disposed?this.modifiedDocModelRef.instance:null}saveCurrentState(){if(this.currentUri){const w=this.monacoDiffEditor.saveViewState();w&&this.editorState.set(this.currentUri.toString(),w)}}restoreState(){if(this.currentUri){const w=this.editorState.get(this.currentUri.toString());w&&this.monacoDiffEditor.restoreViewState(w)}}constructor(w,F={}){super(),this.monacoDiffEditor=w,this.specialOptions=F,this.editorState=new Map,this._onRefOpen=new u.Emitter,this.onRefOpen=this._onRefOpen.event,this.wrapEditors(),this.addDispose(this.configurationService.onDidChangeConfiguration(V=>{Array.from(V.affectedKeys.values()).filter(_=>(0,l.isDiffEditorOption)(_)).length>0&&this.updateDiffOptions()}))}async compare(w,F,V={},Y){if(this.saveCurrentState(),this.originalDocModelRef=w,this.modifiedDocModelRef=F,!this.originalDocModel||!this.modifiedDocModel)return;const _=this.originalDocModel.getMonacoModel(),H=this.modifiedDocModel.getMonacoModel(),X=this.monacoDiffEditor.createViewModel({original:_,modified:H});if(this.monacoDiffEditor.setModel(X),Y?this.currentUri=Y:this.currentUri=u.URI.from({scheme:h.DIFF_SCHEME,query:u.URI.stringifyQuery({original:this.originalDocModel.uri.toString(),modified:this.modifiedDocModel.uri.toString()})}),V.range||V.originalRange){const Q=V.range||V.originalRange,O=V.range?this.modifiedEditor.monacoEditor:this.originalEditor.monacoEditor;await X?.waitForDiff(),setTimeout(()=>{O.revealRangeInCenter(Q),O.setSelection(Q)}),u.Event.once(this.monacoDiffEditor.onDidUpdateDiff)(()=>{O.setSelection(Q),setTimeout(()=>{O.revealRangeInCenter(Q)})})}this._onRefOpen.fire(w),this._onRefOpen.fire(F);const S=this.preferenceService.get("diffEditor.hideUnchangedRegions.enabled");if(V.revealFirstDiff&&!S){const Q=this.monacoDiffEditor.getLineChanges();if(Q&&Q.length>0)this.showFirstDiff(X);else{const O=this.monacoDiffEditor.onDidUpdateDiff(()=>{this.showFirstDiff(X),O.dispose()})}}await this.updateOptionsOnModelChange(),this.diffResourceKeys.forEach(Q=>Q.set(this.currentUri))}async showFirstDiff(w){await w?.waitForDiff(),this.monacoDiffEditor.revealFirstDiff()}async updateOptionsOnModelChange(){await this.doUpdateDiffOptions()}isReadonly(){var w;return!!(!((w=this.modifiedDocModel)===null||w===void 0)&&w.readonly)}async doUpdateDiffOptions(){const w=this.modifiedEditor.currentUri?this.modifiedEditor.currentUri.toString():void 0,F=this.modifiedEditor.currentDocumentModel?this.modifiedEditor.currentDocumentModel.languageId:void 0,V=(0,l.getConvertedMonacoOptions)(this.configurationService,w,F),Y=this.isReadonly();this.monacoDiffEditor.updateOptions(Object.assign(Object.assign(Object.assign({},V.diffOptions),this.specialOptions),{readOnly:Y,renderMarginRevertIcon:!Y})),this.currentUri&&this.eventBus.fire(new h.ResourceDecorationNeedChangeEvent({uri:this.currentUri,decoration:{readOnly:this.isReadonly()}}))}updateDiffOptions(){this.doUpdateDiffOptions()}getLineChanges(){const w=this.monacoDiffEditor.getLineChanges();return w?w.map(F=>{var V;return[F.originalStartLineNumber,F.originalEndLineNumber,F.modifiedStartLineNumber,F.modifiedEndLineNumber,(V=F.charChanges)===null||V===void 0?void 0:V.map(Y=>[Y.originalStartLineNumber,Y.originalStartColumn,Y.originalEndLineNumber,Y.originalEndColumn,Y.modifiedStartLineNumber,Y.modifiedStartColumn,Y.modifiedEndLineNumber,Y.modifiedEndColumn])]}):null}wrapEditors(){const w=this;this.originalEditor=this.injector.get(R,[w.monacoDiffEditor.getOriginalEditor(),()=>w.originalDocModel,h.EditorType.ORIGINAL_DIFF]),this.modifiedEditor=this.injector.get(R,[w.monacoDiffEditor.getModifiedEditor(),()=>w.modifiedDocModel,h.EditorType.MODIFIED_DIFF]),this.collectionService.addEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.addDiffEditors([this]);const F=this.contextKeyService.createScoped(this.modifiedEditor.monacoEditor._contextKeyService),V=this.contextKeyService.createScoped(this.originalEditor.monacoEditor._contextKeyService);this.diffResourceKeys=[new c.ResourceContextKey(F,void 0,"diffResource"),new c.ResourceContextKey(V,void 0,"diffResource")]}layout(){return this.monacoDiffEditor.layout()}focus(){this.monacoDiffEditor.focus()}dispose(){super.dispose(),this.collectionService.removeEditors([this.originalEditor,this.modifiedEditor]),this.collectionService.removeDiffEditors([this]),this.monacoDiffEditor.dispose(),this._disposed=!0}}n.__decorate([(0,a.Autowired)(h.EditorCollectionService),n.__metadata("design:type",m)],Z.prototype,"collectionService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],Z.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],Z.prototype,"configurationService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],Z.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],Z.prototype,"contextKeyService",void 0),e.BrowserDiffEditor=Z;function y(A){A.addEventListener("mousewheel",E)}function E(A){A.preventDefault(),A.stopPropagation(),(this.offsetWidth+this.scrollLeft+A.deltaX>this.scrollWidth||this.scrollLeft+A.deltaX<0)&&(A.preventDefault(),A.stopPropagation())}let R=class extends N{get currentDocumentModel(){return this.getDocumentModel()}constructor(w,F,V){super(w,V),this.getDocumentModel=F}};R=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Function,Object])],R)},17315:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorElectronContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(37406),u=t(23418),G=t(96689),p=t(82196),h=t(51553);let b=class extends c.WithEventBus{onResourceDecorationChangeEvent(){const r=this.workbenchEditorService.hasDirty();this.electronMainUIService.setDocumentEdited(o.electronEnv.currentWindowId,!!r)}async onWillStop(){return!!(await this.workbenchEditorService.closeAllOnlyConfirmOnce()||!this.cacheProvider.isFlushed())}registerKeybindings(r){r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrl+tab"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrl+shift+tab"}),c.isOSX&&(r.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:"ctrlcmd+shift+]"}),r.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:"ctrlcmd+shift+["}))}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],b.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",h.WorkbenchEditorServiceImpl)],b.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(u.IDocPersistentCacheProvider),n.__metadata("design:type",Object)],b.prototype,"cacheProvider",void 0),n.__decorate([(0,a.Autowired)(G.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],b.prototype,"contentRegistry",void 0),n.__decorate([(0,a.Autowired)(g.IElectronMainUIService),n.__metadata("design:type",Object)],b.prototype,"electronMainUIService",void 0),n.__decorate([(0,c.OnEvent)(p.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],b.prototype,"onResourceDecorationChangeEvent",null),b=n.__decorate([(0,o.Domain)(o.ClientAppContribution,o.KeybindingContribution)],b),e.EditorElectronContribution=b},75522:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpener=void 0;const n=t(85608),a=t(76003),o=t(23418);let c=class{async open(u){let G;const p=/^L?(\d+)(?:,(\d+))?/.exec(u.fragment);if(p){const h=parseInt(p[1],10),b=p[2]?parseInt(p[2],10):1;G={startLineNumber:h,startColumn:b,endLineNumber:h,endColumn:b},u=u.withFragment("")}return await this.workbenchEditorService.open(u,{range:G}),!0}async handleURI(u){return this.resourceService.handlesUri(u)}handleScheme(){return!1}};n.__decorate([(0,a.Autowired)(o.ResourceService),n.__metadata("design:type",o.ResourceService)],c.prototype,"resourceService",void 0),n.__decorate([(0,a.Autowired)(o.WorkbenchEditorService),n.__metadata("design:type",o.WorkbenchEditorService)],c.prototype,"workbenchEditorService",void 0),c=n.__decorate([(0,a.Injectable)()],c),e.EditorOpener=c},19352:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scroll=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=n.__importDefault(t(62251));class g extends o.default.Component{constructor(){super(...arguments),this.position={top:0,left:0},this.dragging=!1,this.draggingStart=0,this.draggingStartPos=0,this.shouldHideThumb=!0,this.isAtTop=!0,this.onMouseMoveHorizontal=G=>{if(!this.dragging)return;const p=G.pageX-this.draggingStart;this.ref.scrollLeft=this.draggingStartPos+this.calculateXToLeft(p)},this.onMouseUpHorizontal=G=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveHorizontal),document.removeEventListener("mouseup",this.onMouseUpHorizontal),this.shouldHideThumb&&this.hideThumb()},this.onMouseMoveVertical=G=>{if(!this.dragging)return;const p=G.pageY-this.draggingStart;this.ref.scrollTop=this.draggingStartPos+this.calculateYToTop(p)},this.onMouseUpVertical=G=>{this.dragging=!1,document.removeEventListener("mousemove",this.onMouseMoveVertical),document.removeEventListener("mouseup",this.onMouseUpVertical),this.shouldHideThumb&&this.hideThumb()},this.onMousewheel=G=>{this.ref.clientHeight>=this.ref.scrollHeight&&(G.deltaY!==0&&(this.ref.scrollLeft+=G.deltaY),G.deltaX!==0&&(this.ref.scrollLeft+=G.deltaX))},this.onMouseEnter=()=>{this.update()},this.handleWindowResize=()=>{this.update()},this.update=G=>{this.requestFrame&&window.cancelAnimationFrame(this.requestFrame),this.requestFrame=window.requestAnimationFrame(()=>{this._update(),G&&G()})}}onScroll(G){this.position={top:this.ref.scrollTop,left:this.ref.scrollLeft},this.props.onScroll&&this.props.onScroll(this.position),this.update(()=>{const p=this.ref.scrollWidth,h=this.ref.offsetWidth,b=this.ref.scrollHeight,I=this.ref.offsetHeight;this.thumbH.style.left=this.position.left*h/p+"px",this.thumbV.style.top=this.position.top*I/b+"px"}),!this.isAtTop&&this.ref.scrollTop===0?(this.isAtTop=!0,this.setCss()):this.isAtTop&&this.ref.scrollTop!==0&&(this.isAtTop=!1,this.setCss()),this.ref.scrollLeft>0?(this.decorationL.style.opacity=String(1),this.decorationR.style.opacity=String(1)):this.decorationL.style.opacity=String(0),(this.ref.scrollWidth===this.ref.offsetWidth||this.ref.scrollLeft===this.ref.scrollWidth-this.ref.offsetWidth)&&(this.decorationR.style.opacity=String(0))}scrollTo(G){this.ref.scrollLeft=G.left,this.ref.scrollTop=G.top}onMouseDownHorizontal(G){this.dragging=!0,G.target===this.trackH&&this.onMouseDownOnTrack(G),this.draggingStart=G.pageX,this.draggingStartPos=this.ref.scrollLeft,document.addEventListener("mousemove",this.onMouseMoveHorizontal),document.addEventListener("mouseup",this.onMouseUpHorizontal)}onMouseDownOnTrack(G){const p=G.target,h=G.clientX-p.getBoundingClientRect().left,b=this.ref.scrollWidth,I=this.ref.offsetWidth,r=h*b/I-.5*I;this.scrollTo({left:r,top:this.position.top})}calculateXToLeft(G){const p=this.ref.scrollWidth,h=this.ref.offsetWidth;return G*p/h}onMouseDownVertical(G){this.dragging=!0,G.target===this.trackV&&this.onMouseDownOnTrackVertical(G),this.draggingStart=G.pageY,this.draggingStartPos=this.ref.scrollTop,document.addEventListener("mousemove",this.onMouseMoveVertical),document.addEventListener("mouseup",this.onMouseUpVertical)}onMouseDownOnTrackVertical(G){const p=G.target,h=G.clientY-p.getBoundingClientRect().top,b=this.ref.scrollHeight,I=this.ref.offsetHeight,r=h*b/I-.5*I;this.scrollTo({left:this.position.left,top:r})}calculateYToTop(G){const p=this.ref.scrollHeight,h=this.ref.offsetHeight;return G*p/h}componentDidUpdate(){this.update(),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)})}componentDidMount(){this.update(),window.addEventListener("resize",this.handleWindowResize),this.props.delegate&&this.props.delegate({scrollTo:this.scrollTo.bind(this)}),this.ref&&(this.ref.addEventListener("mouseenter",this.onMouseEnter),this.ref.addEventListener("wheel",this.onMousewheel))}componentWillUnmount(){this.ref&&(this.ref.removeEventListener("mouseenter",this.onMouseEnter),this.ref.removeEventListener("wheel",this.onMousewheel)),window.removeEventListener("resize",this.handleWindowResize),this.requestFrame&&window.cancelAnimationFrame(this.requestFrame)}sizeEqual(G,p){return G&&p&&G.offsetHeight===p.offsetHeight&&G.scrollHeight===p.scrollHeight&&G.offsetWidth===p.offsetWidth&&G.scrollWidth===p.scrollWidth}_update(){this.ref&&(this.sizeEqual(this.size,this.ref)||(this.size={offsetHeight:this.ref.offsetHeight,offsetWidth:this.ref.offsetWidth,scrollWidth:this.ref.scrollWidth,scrollHeight:this.ref.scrollHeight},this.updateScrollBar()))}updateScrollBar(){const G=this.ref.scrollWidth,p=this.ref.offsetWidth;if(p<G){const I=p*p/G;this.thumbH.style.width=I+"px",this.trackH.parentElement.style.display="block"}else this.trackH.parentElement.style.display="none";const h=this.ref.scrollHeight,b=this.ref.offsetHeight;b<h?(this.thumbV.style.height=b*b/h+"px",this.trackV.parentElement.style.display="block"):this.trackV.parentElement.style.display="none"}hideThumb(){this.shouldHideThumb=!0,this.dragging||this.setCss()}showThumb(){this.shouldHideThumb=!1,this.setCss()}setCss(){this.container.className=(0,a.default)({[c.default.scroll]:!0,[c.default["hide-thumb"]]:this.shouldHideThumb&&!this.dragging});const G={};this.props.atTopClassName&&(G[this.props.atTopClassName]=this.isAtTop),this.props.className&&(G[this.props.className]=!0),this.ref.className=(0,a.default)(G)}render(){return o.default.createElement("div",{className:(0,a.default)(c.default.scroll,c.default["hide-thumb"]),ref:G=>{G&&(this.container=G,this.props.forwardedRef(G))},onMouseMove:()=>this.showThumb(),onMouseLeave:()=>this.hideThumb(),style:this.props.containerStyle},o.default.createElement("div",{style:this.props.style,className:(0,a.default)(this.props.className),onScroll:this.onScroll.bind(this),ref:G=>G&&(this.ref=G),onMouseDown:()=>this.update(),onMouseUp:()=>this.update()},this.props.children),o.default.createElement("div",{className:c.default["scrollbar-decoration-vertical-l"],ref:G=>G&&(this.decorationL=G)}),o.default.createElement("div",{className:c.default["scrollbar-decoration-vertical-r"],ref:G=>G&&(this.decorationR=G)}),o.default.createElement("div",{className:c.default["scroll-horizontal"]},o.default.createElement("div",{className:c.default["track-horizontal"],ref:G=>G&&(this.trackH=G),onMouseDown:this.onMouseDownHorizontal.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-horizontal",onMouseDown:this.onMouseDownHorizontal.bind(this),ref:G=>G&&(this.thumbH=G)})),o.default.createElement("div",{className:c.default["scroll-vertical"]},o.default.createElement("div",{className:c.default["track-vertical"],ref:G=>G&&(this.trackV=G),onMouseDown:this.onMouseDownVertical.bind(this)}),o.default.createElement("div",{className:"kt-editor-scrollbar-thumb-vertical",onMouseDown:this.onMouseDownVertical.bind(this),ref:G=>G&&(this.thumbV=G)})))}}e.Scroll=g},93669:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContext=e.defaultEditorContext=void 0;const a=t(85608).__importDefault(t(14041));e.defaultEditorContext={minimapWidth:108},e.EditorContext=a.default.createContext(e.defaultEditorContext)},60362:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorAutoSaveEditorContribution=e.EditorContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68456),g=t(93899),u=t(1237),G=t(77661),p=t(75524),h=t(43718),b=t(96177),I=t(62660),r=n.__importStar(t(84555)),l=t(94170),s=t(87423),d=t(96640),m=t(23418),v=t(55113),f=t(89618),N=t(96689),W=t(75522),Z=t(93152),y=t(8287),E=t(14385),R=t(57719),A=t(85857),w=t(95338),F=t(94617),V=t(93532),Y=t(53135),_=t(50236),H=t(82196),X=t(6670),S=t(67903),Q=t(51553);let O=class extends o.Disposable{registerComponent(B){B.register("@opensumi/ide-editor",{id:"ide-editor",component:E.EditorView}),B.register("breadcrumb-menu",{id:"breadcrumb-menu",component:V.NavigationMenuContainer})}registerOverrideService(B){const x=this.injector.get(Z.MonacoCodeService),J=this.injector.get(o.IContextKeyService).createScoped();this.workbenchEditorService.setEditorContextKeyService(J),B.registerOverrideService(o.ServiceNames.CONTEXT_KEY_SERVICE,J.contextKeyService),B.registerOverrideService(o.ServiceNames.CODE_EDITOR_SERVICE,x),B.registerOverrideService(o.ServiceNames.CONTEXT_VIEW_SERVICE,new Z.MonacoContextViewService(x)),B.registerOverrideService(o.ServiceNames.TEXT_MODEL_SERVICE,this.injector.get(f.MonacoTextModelService))}registerMonacoDefaultFormattingSelector(B){const x=this.injector.get(A.FormattingSelector);this.addDispose(B(x.selectFormatter.bind(x)))}registerEditorExtensionContribution(B){B(F.EditorContextMenuController.ID,new d.SyncDescriptor(F.EditorContextMenuController,[this.contextMenuService,this.globalContextKeyService,this.contextMenuRenderer]))}getMimeForMode(B){for(const x of this.textmateService.getLanguages())if(x.id===B&&x.mimetypes)return x.mimetypes[0]}registerPlatformLanguageAssociations(B){const x=this.corePreferences["files.associations"];if(!x)return;const D=Object.keys(x).map(J=>({id:x[J],filepattern:J,mime:this.getMimeForMode(x[J])||`text/x-${x.id}`}));B(D)}async interceptOpen(B){try{return await this.openerService.open(B),!0}catch(x){return this.logger.error(x),!1}}onWillStop(B){if(!this.appConfig.isElectronRenderer)return this.workbenchEditorService.hasDirty()||!this.cacheProvider.isFlushed()}extractGroupAndUriFromArgs(B,x){let D,J;if(B instanceof o.URI)D=x||this.workbenchEditorService.currentEditorGroup,J=B||D&&D.currentResource&&D.currentResource.uri;else{const k=B||{};D=k.group||this.workbenchEditorService.currentEditorGroup,J=k.uri||D&&D.currentResource&&D.currentResource.uri}return{group:D,uri:J}}isElectronRenderer(){return this.appConfig.isElectronRenderer}registerKeybindings(B){B.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_CURRENT.id,keybinding:"ctrlcmd+s"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT.id,keybinding:"ctrlcmd+f",when:"!editorFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+w":"alt+shift+w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"alt+cmd+left":"ctrlcmd+ctrl+left"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"alt+cmd+right":"ctrlcmd+ctrl+right"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PREVIOUS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pageup":"alt+pageup"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEXT.id,keybinding:this.isElectronRenderer()?"ctrlcmd+pagedown":"alt+pagedown"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_FORWARD.id,keybinding:h.isWindows?"alt+right":"ctrl+shift+-"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_BACK.id,keybinding:h.isWindows?"alt+left":"ctrl+-"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CHANGE_LANGUAGE.id,keybinding:"ctrlcmd+k m"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,keybinding:"ctrlcmd+\\"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_NEXT.id,keybinding:"ctrlcmd+k ctrlcmd+right"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS.id,keybinding:"ctrlcmd+k ctrlcmd+left"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SAVE_ALL.id,keybinding:"alt+ctrlcmd+s"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,keybinding:"ctrlcmd+k w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_ALL.id,keybinding:"ctrlcmd+k ctrlcmd+w"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.CLOSE_SAVED.id,keybinding:"ctrlcmd+k u"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.PIN_CURRENT.id,keybinding:"ctrlcmd+k enter"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COPY_CURRENT_PATH.id,keybinding:"ctrlcmd+k p"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.REOPEN_CLOSED.id,keybinding:this.isElectronRenderer()?"ctrlcmd+shift+t":"alt+shift+t"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.NEW_UNTITLED_FILE.id,keybinding:this.isElectronRenderer()?"ctrlcmd+n":"alt+n"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,keybinding:this.isElectronRenderer()?"ctrlcmd+t":"ctrlcmd+o"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id,keybinding:this.isElectronRenderer()?"ctrlcmd+alt+t":"ctrlcmd+alt+o"});for(let x=1;x<10;x++)B.registerKeybinding({command:o.EDITOR_COMMANDS.GO_TO_GROUP.id,keybinding:"ctrlcmd+"+x,args:[x]});["left","up","down","right"].forEach(x=>{B.registerKeybinding({command:o.EDITOR_COMMANDS.MOVE_GROUP.id,keybinding:"ctrlcmd+k "+x,args:[x]})}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_UNDO.id,keybinding:"ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.COMPONENT_REDO.id,keybinding:"shift+ctrlcmd+z",when:"inEditorComponent && !inputFocus"}),B.registerKeybinding({command:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,keybinding:"alt+z",when:"editorFocus"})}initialize(){this.editorStatusBarService.setListener(),this.historyService.init()}registerCommands(B){B.registerCommand(o.EDITOR_COMMANDS.GO_FORWARD,{execute:()=>{this.historyService.forward()}}),B.registerCommand(o.EDITOR_COMMANDS.FOCUS_IF_NOT_ACTIVATE_ELEMENT,{execute:()=>{var x,D;if(!document.activeElement||document.activeElement===document.body){const J=this.workbenchEditorService.currentEditorGroup;J?.focus(),(D=(x=J?.currentCodeEditor)===null||x===void 0?void 0:x.monacoEditor)===null||D===void 0||D.trigger("api","actions.find",null)}}}),B.registerCommand(o.EDITOR_COMMANDS.GO_BACK,{execute:()=>{this.historyService.back()}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE,{execute:async(x,D)=>{const J=await this.workbenchEditorService.open(x,D);if(J)return{groupId:J?.group.name}}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_RESOURCES,{execute:({uris:x})=>{this.workbenchEditorService.openUris(x)}}),B.registerCommand(o.EDITOR_COMMANDS.COMPARE,{execute:({original:x,modified:D,name:J},k={})=>(J=J||`${x.displayName} <=> ${D.displayName}`,this.workbenchEditorService.open(o.URI.from({scheme:m.DIFF_SCHEME,query:o.URI.stringifyQuery({name:J,original:x,modified:D})}),k))}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR_DEV,{execute:async()=>{try{const x=await this.quickInputService.open({value:""});if(!x)return;const D=JSON.parse(x);this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR.id,D)}catch{}}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_MERGEEDITOR,{execute:x=>{const D=p.IRelaxedOpenMergeEditorArgs.validate(x);this.workbenchEditorService.open(o.URI.from({scheme:"mergeEditor",query:o.URI.stringifyQuery({name:(0,o.formatLocalize)("mergeEditor.workbench.tab.name",D.output.displayName),openMetadata:p.IRelaxedOpenMergeEditorArgs.toString(D)})}))}}),B.registerCommand(o.EDITOR_COMMANDS.MERGEEDITOR_RESET,{execute:()=>{const x=this.mergeEditorService.getNutrition();if(!x)return;const{output:D}=x,{uri:J}=D;this.mergeEditorService.fireRestoreState(J),this.mergeEditorService.compare()}}),B.registerCommand(o.EDITOR_COMMANDS.SAVE_CURRENT,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.currentResource&&(x.pin(x.currentResource.uri),x.saveCurrent())}}),B.registerCommand(o.EDITOR_COMMANDS.SAVE_URI,{execute:async x=>{for(const D of this.workbenchEditorService.editorGroups){const J=D.resources.find(k=>k.uri.isEqual(x));J&&D.saveResource(J)}}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP,{execute:async(x,D)=>{const{group:J}=this.extractGroupAndUriFromArgs(x,D);J&&await J.closeAll()}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_SAVED,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup}=x;D&&await D.closeSaved()}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.closeOthers(J)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.close(J)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_TO_RIGHT,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.closeToRight(J)}}),B.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT,{execute:()=>this.workbenchEditorService.currentEditorGroup}),B.registerCommand(o.EDITOR_COMMANDS.GET_CURRENT_RESOURCE,{execute:()=>this.workbenchEditorService.currentResource}),B.registerCommand(o.EDITOR_COMMANDS.PIN_CURRENT,{execute:()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.pinPreviewed()}}),B.registerCommand(o.EDITOR_COMMANDS.COPY_CURRENT_PATH,{execute:()=>{const x=this.workbenchEditorService.currentResource;x&&x.uri.scheme===o.Schemes.file&&this.clipboardService.writeText(x.uri.codeUri.fsPath)}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_LEFT,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Left,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_RIGHT,{execute:async(x,D)=>{const{group:J,uri:k}=this.extractGroupAndUriFromArgs(x,D);J&&k&&await J.split(m.EditorGroupSplitAction.Right,k,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.GO_TO_GROUP,{execute:async(x=1)=>{var D;const J=this.workbenchEditorService.sortedEditorGroups[x-1];if(J){J.focus();return}const k=this.workbenchEditorService.sortedEditorGroups.length;if(k===x-1){const z=this.workbenchEditorService.sortedEditorGroups[k-1],P=(D=z?.currentResource)===null||D===void 0?void 0:D.uri;z&&P&&await z.split(m.EditorGroupSplitAction.Right,P,{focus:!0})}}}),B.registerCommand(o.EDITOR_COMMANDS.MOVE_GROUP,{execute:async x=>{if(x){const D=this.workbenchEditorService.currentEditorGroup;D&&D.grid.move(x)}}}),B.registerCommand(o.EDITOR_COMMANDS.FOCUS_ACTIVE_EDITOR_GROUP,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;x&&x.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_TOP,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Top,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM,{execute:async x=>{x=x||{};const{group:D=this.workbenchEditorService.currentEditorGroup,uri:J=D&&D.currentResource&&D.currentResource.uri}=x;D&&J&&await D.split(m.EditorGroupSplitAction.Bottom,J,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_LANGUAGE,{execute:async x=>{const J=this.languagesService.languages.map(z=>({label:z.name,value:z.id,description:`(${z.id})`})),k=await this.quickPickService.show(J,{placeholder:(0,o.localize)("editor.changeLanguageId"),selectIndex:()=>J.findIndex(z=>{var P,U;return z.value===((U=(P=this.workbenchEditorService.currentCodeEditor)===null||P===void 0?void 0:P.currentDocumentModel)===null||U===void 0?void 0:U.languageId)})});if(k&&x!==k&&this.workbenchEditorService.currentEditor){const z=this.workbenchEditorService.currentEditor.currentDocumentModel;z&&this.editorDocumentModelService.changeModelOptions(z.uri,{languageId:k})}}}),B.registerCommand(o.EDITOR_COMMANDS.GET_ENCODING,{execute:x=>{if(!x)return;const D=this.editorDocumentModelService.getModelDescription(x);if(D)return D.encoding}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_ENCODING,{execute:async x=>{var D,J,k,z;x=x??((D=this.workbenchEditorService.currentResource)===null||D===void 0?void 0:D.uri);const P=(J=this.workbenchEditorService.currentEditor)===null||J===void 0?void 0:J.currentDocumentModel;if(!x)return;const U=this.preferenceService.get("files.encoding","utf8",x.toString(),(0,o.getLanguageIdFromMonaco)(x)),ne=await this.contentRegistry.getProvider(x),re=await((k=ne?.guessEncoding)===null||k===void 0?void 0:k.call(ne,x)),ae=this.editorDocumentModelService.getModelDescription(x),ue=(z=P?.encoding)!==null&&z!==void 0?z:ae?.encoding;let $;const pe=Object.keys(o.SUPPORTED_ENCODINGS).sort((le,ie)=>le===U?-1:ie===U?1:o.SUPPORTED_ENCODINGS[le].order-o.SUPPORTED_ENCODINGS[ie].order).filter(le=>le===re&&re!==U?!1:!o.SUPPORTED_ENCODINGS[le].encodeOnly).map((le,ie)=>((le===ue||o.SUPPORTED_ENCODINGS[le].alias===ue)&&($=ie),{label:o.SUPPORTED_ENCODINGS[le].labelLong,value:le,description:le}));re&&U!==re&&o.SUPPORTED_ENCODINGS[re]&&(pe[0]&&(pe[0].showBorder=!0),pe.unshift({label:o.SUPPORTED_ENCODINGS[re].labelLong,value:re,description:(0,o.localize)("editor.guessEncodingFromContent")}),typeof $=="number"&&$++);const ge=await this.quickPickService.show(pe,{placeholder:(0,o.localize)("editor.chooseEncoding"),selectIndex(le){return le?-1:typeof $=="number"?$:-1}});if(!ge)return;const q=[];if(x.scheme===m.DIFF_SCHEME){const le=await this.resourceService.getResource(x);le.metadata&&(q.push(le.metadata.original),q.push(le.metadata.modified))}else q.push(x);q.forEach(le=>{this.editorDocumentModelService.changeModelOptions(le,{encoding:ge})})}}),B.registerCommand(o.EDITOR_COMMANDS.CHANGE_EOL,{execute:async()=>{const x=this.workbenchEditorService.currentResource,D=this.workbenchEditorService.currentCodeEditor;if(D&&D.currentDocumentModel&&x){const J=await this.quickPickService.show([{label:"LF",value:`
|
|
28066
28066
|
`},{label:"CRLF",value:`\r
|
|
28067
28067
|
`}],{placeholder:(0,o.localize)("editor.changeEol"),selectIndex:()=>D.currentDocumentModel.eol===`
|
|
28068
28068
|
`?0:1});J&&this.editorDocumentModelService.changeModelOptions(x.uri,{eol:J})}}}),B.registerCommand(o.EDITOR_COMMANDS.FOCUS,{execute:async()=>{this.workbenchEditorService.currentEditor&&this.workbenchEditorService.currentEditor.monacoEditor.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_NEXT,{execute:async()=>{let x=this.workbenchEditorService.currentEditorGroup.index+1;return this.workbenchEditorService.editorGroups.length<=x&&(x=0),this.workbenchEditorService.sortedEditorGroups[x].focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_PREVIOUS,{execute:async()=>{let x=this.workbenchEditorService.currentEditorGroup.index-1;return x<0&&(x=this.workbenchEditorService.editorGroups.length-1),this.workbenchEditorService.sortedEditorGroups[x].focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_UP,{execute:async()=>{const D=this.workbenchEditorService.currentEditorGroup.grid.findGird(m.Direction.UP);if(D)return D.editorGroup.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_DOWN,{execute:async()=>{const D=this.workbenchEditorService.currentEditorGroup.grid.findGird(m.Direction.DOWN);if(D)return D.editorGroup.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_LEFT,{execute:async()=>{const D=this.workbenchEditorService.currentEditorGroup.grid.findGird(m.Direction.LEFT);if(D)return D.editorGroup.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.NAVIGATE_RIGHT,{execute:async()=>{const D=this.workbenchEditorService.currentEditorGroup.grid.findGird(m.Direction.RIGHT);if(D)return D.editorGroup.focus()}}),B.registerCommand(o.EDITOR_COMMANDS.PREVIOUS_IN_GROUP,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(!x.currentResource)return;const D=x.resources.findIndex(J=>J.uri.isEqual(x.currentResource.uri))-1;return x.resources[D]?x.open(x.resources[D].uri,{focus:!0}):x.open(x.resources[0].uri,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.NEXT_IN_GROUP,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(!x.currentResource)return;const D=x.resources.findIndex(J=>J.uri.isEqual(x.currentResource.uri))+1;return x.resources[D]?x.open(x.resources[D].uri,{focus:!0}):x.open(x.resources[x.resources.length-1].uri,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.NEXT,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(!x.currentResource)return;const D=x.resources.findIndex(J=>J.uri.isEqual(x.currentResource.uri))+1;if(x.resources[D])return x.open(x.resources[D].uri,{focus:!0});{const J=x.index===this.workbenchEditorService.editorGroups.length-1?0:x.index+1,k=this.workbenchEditorService.sortedEditorGroups[J];return k.focus(),k.open(k.resources[0].uri,{focus:!0})}}}),B.registerCommand(o.EDITOR_COMMANDS.PREVIOUS,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(!x.currentResource)return;const D=x.resources.findIndex(J=>J.uri.isEqual(x.currentResource.uri))-1;if(x.resources[D])return x.open(x.resources[D].uri,{focus:!0});{const J=x.index===0?this.workbenchEditorService.editorGroups.length-1:x.index-1,k=this.workbenchEditorService.sortedEditorGroups[J];return k.focus(),k.open(k.resources[k.resources.length-1].uri,{focus:!0})}}}),B.registerCommand(o.EDITOR_COMMANDS.LAST_IN_GROUP,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(x.resources.length>0)return x.open(x.resources[x.resources.length-1].uri,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.EVEN_EDITOR_GROUPS,{execute:async()=>{this.injector.get(o.IEventBus).fire(new H.EditorGroupsResetSizeEvent)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_OTHER_GROUPS,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;this.workbenchEditorService.editorGroups.filter(J=>J!==x).forEach(J=>{J.dispose()})}}),B.registerCommand(o.EDITOR_COMMANDS.OPEN_EDITOR_AT_INDEX,{execute:async x=>{const D=this.workbenchEditorService.currentEditorGroup,J=D.resources[x];J&&await D.open(J.uri,{focus:!0})}}),B.registerCommand(o.EDITOR_COMMANDS.REVERT_DOCUMENT,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(x.isCodeEditorMode()){const D=x.codeEditor.currentDocumentModel;D&&await D.revert()}}}),B.registerCommand(o.EDITOR_COMMANDS.REVERT_AND_CLOSE,{execute:async()=>{const x=this.workbenchEditorService.currentEditorGroup;if(x.isCodeEditorMode()){const D=x.codeEditor.currentDocumentModel;D&&await D.revert(),x.close(x.currentResource.uri)}}}),B.registerCommand(o.EDITOR_COMMANDS.SAVE_ALL,{execute:async x=>{this.workbenchEditorService.saveAll(void 0,x)}}),B.registerCommand(o.EDITOR_COMMANDS.CLOSE_ALL,{execute:async x=>{this.workbenchEditorService.closeAll(x)}}),B.registerCommand(o.EDITOR_COMMANDS.REOPEN_CLOSED,{execute:async()=>{this.historyService.popClosed()}}),B.registerCommand(o.EDITOR_COMMANDS.NEW_UNTITLED_FILE,{execute:()=>{this.workbenchEditorService.createUntitledResource()}}),B.registerCommand(o.EDITOR_COMMANDS.COMPONENT_UNDO,{execute:()=>{this.workbenchEditorService.currentEditorGroup.componentUndo()}}),B.registerCommand(o.EDITOR_COMMANDS.COMPONENT_REDO,{execute:()=>{this.workbenchEditorService.currentEditorGroup.componentRedo()}}),B.registerCommand(o.EDITOR_COMMANDS.TEST_TOKENIZE,{execute:()=>{const x=this.workbenchEditorService.currentCodeEditor;if(x){const D=x.getSelections();if(D&&D.length>0&&x.currentDocumentModel){const{selectionStartLineNumber:J,selectionStartColumn:k,positionLineNumber:z,positionColumn:P}=D[0],U=x.currentDocumentModel.getText(new r.Range(J,k,z,P));this.monacoService.testTokenize(U,x.currentDocumentModel.languageId)}}}}),B.registerCommand(o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL,{execute:()=>this.prefixQuickOpenService.open("#")}),B.registerCommand(o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS,{execute:()=>this.prefixQuickOpenService.open("##")}),B.registerCommand(o.EDITOR_COMMANDS.GO_TO_LINE,{execute:()=>this.prefixQuickOpenService.open(":")}),B.registerCommand(o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP,{execute:()=>{const x=this.preferenceService.get("editor.wordWrap");if(x){const D=["off","on"],J=D.indexOf(x)+1;J>-1&&this.preferenceService.set("editor.wordWrap",D[J%D.length],h.PreferenceScope.User)}}}),B.registerCommand(o.EDITOR_COMMANDS.FORMAT_DOCUMENT_WITH,{execute:async()=>{this.injector.get(R.DocumentFormatService).formatDocumentWith()}}),B.registerCommand(o.EDITOR_COMMANDS.FORMAT_SELECTION_WITH,{execute:async()=>{this.injector.get(R.DocumentFormatService).formatSelectionWith()}})}registerMenus(B){B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.COPY_PATH.id,group:"10_path",order:1}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.COPY_RELATIVE_PATH.id,group:"10_path",order:2}),B.registerMenuItem(g.MenuId.BreadcrumbsTitleContext,{command:o.EDITOR_COMMANDS.COPY_PATH.id,group:"0_path",order:1}),B.registerMenuItem(g.MenuId.BreadcrumbsTitleContext,{command:o.EDITOR_COMMANDS.COPY_RELATIVE_PATH.id,group:"0_path",order:2}),B.registerMenuItem(g.MenuId.BreadcrumbsTitleContext,{command:{id:o.FILE_COMMANDS.REVEAL_IN_EXPLORER.id,label:(0,o.localize)("file.revealInExplorer")},group:"1_file",order:3}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:{id:o.FILE_COMMANDS.REVEAL_IN_EXPLORER.id,label:(0,o.localize)("file.revealInExplorer")},group:"6_file",order:3}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_LEFT.id,group:"9_split"}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,group:"9_split"}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_TOP.id,group:"9_split"}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.SPLIT_TO_BOTTOM.id,group:"9_split"}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:{id:o.EDITOR_COMMANDS.CLOSE.id,label:(0,o.localize)("editor.title.context.close")},group:"0_tab",order:1}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,group:"0_tab",order:2}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_SAVED.id,group:"0_tab",order:3}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_OTHER_IN_GROUP.id,group:"0_tab",order:4}),B.registerMenuItem(g.MenuId.EditorTitleContext,{command:o.EDITOR_COMMANDS.CLOSE_TO_RIGHT.id,group:"0_tab",order:5}),B.registerMenuItem(g.MenuId.EditorTitle,{command:o.EDITOR_COMMANDS.CLOSE_ALL_IN_GROUP.id,group:"0_internal"}),B.registerMenuItem(g.MenuId.EditorTitle,{command:o.EDITOR_COMMANDS.SPLIT_TO_RIGHT.id,group:"navigation",when:"resource",order:5}),B.registerMenuItem(g.MenuId.EditorContext,{command:o.EDITOR_COMMANDS.FORMAT_DOCUMENT_WITH.id,group:"1_modification",order:1.3,when:s.ContextKeyExpr.and(l.EditorContextKeys.writable,l.EditorContextKeys.hasMultipleDocumentFormattingProvider)}),B.registerMenuItem(g.MenuId.EditorContext,{command:o.EDITOR_COMMANDS.FORMAT_SELECTION_WITH.id,when:s.ContextKeyExpr.and(l.EditorContextKeys.writable,l.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider,l.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31})}registerOpener(B){B.registerOpener(this.editorOpener)}registerQuickOpenHandlers(B){B.registerHandler(this.workspaceSymbolQuickOpenHandler,{title:(0,o.localize)("quickopen.tab.symbol"),order:3,commandId:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL.id,sub:{"#":{title:(0,o.localize)("quickopen.tab.class"),order:2,commandId:o.EDITOR_COMMANDS.SEARCH_WORKSPACE_SYMBOL_CLASS.id}}}),B.registerHandler(this.goToLineQuickOpenHandler,{title:(0,o.localize)("quickopen.tab.goToLine"),commandId:o.EDITOR_COMMANDS.GO_TO_LINE.id,order:5})}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],O.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],O.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",Q.WorkbenchEditorServiceImpl)],O.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",y.EditorStatusBarService)],O.prototype,"editorStatusBarService",void 0),n.__decorate([(0,a.Autowired)(o.QuickPickService),n.__metadata("design:type",Object)],O.prototype,"quickPickService",void 0),n.__decorate([(0,a.Autowired)(m.ILanguageService),n.__metadata("design:type",Object)],O.prototype,"languagesService",void 0),n.__decorate([(0,a.Autowired)(N.IEditorDocumentModelService),n.__metadata("design:type",Object)],O.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,a.Autowired)(m.IDocPersistentCacheProvider),n.__metadata("design:type",Object)],O.prototype,"cacheProvider",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",w.EditorHistoryService)],O.prototype,"historyService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",o.MonacoService)],O.prototype,"monacoService",void 0),n.__decorate([(0,a.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],O.prototype,"openerService",void 0),n.__decorate([(0,a.Autowired)(h.ILogger),n.__metadata("design:type",Object)],O.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",W.EditorOpener)],O.prototype,"editorOpener",void 0),n.__decorate([(0,a.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],O.prototype,"clipboardService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",_.WorkspaceSymbolQuickOpenHandler)],O.prototype,"workspaceSymbolQuickOpenHandler",void 0),n.__decorate([(0,a.Autowired)(o.PrefixQuickOpenService),n.__metadata("design:type",Object)],O.prototype,"prefixQuickOpenService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",Y.GoToLineQuickOpenHandler)],O.prototype,"goToLineQuickOpenHandler",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],O.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(I.ITextmateTokenizer),n.__metadata("design:type",Object)],O.prototype,"textmateService",void 0),n.__decorate([(0,a.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],O.prototype,"corePreferences",void 0),n.__decorate([(0,a.Autowired)(b.MergeEditorService),n.__metadata("design:type",b.MergeEditorService)],O.prototype,"mergeEditorService",void 0),n.__decorate([(0,a.Autowired)(N.IEditorDocumentModelContentRegistry),n.__metadata("design:type",Object)],O.prototype,"contentRegistry",void 0),n.__decorate([(0,a.Autowired)(o.IQuickInputService),n.__metadata("design:type",Object)],O.prototype,"quickInputService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],O.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(m.ResourceService),n.__metadata("design:type",m.ResourceService)],O.prototype,"resourceService",void 0),n.__decorate([(0,a.Autowired)(u.AbstractContextMenuService),n.__metadata("design:type",u.AbstractContextMenuService)],O.prototype,"contextMenuService",void 0),n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],O.prototype,"globalContextKeyService",void 0),n.__decorate([(0,a.Autowired)(G.ICtxMenuRenderer),n.__metadata("design:type",G.ICtxMenuRenderer)],O.prototype,"contextMenuRenderer",void 0),O=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ClientAppContribution,o.KeybindingContribution,o.MonacoContribution,c.ComponentContribution,g.MenuContribution,o.OpenerContribution,o.QuickOpenContribution)],O),e.EditorContribution=O;let M=class{registerEditorFeature(B){B.registerEditorFeatureContribution({contribute:x=>{const D=new o.Disposable;return D.addDispose(x.monacoEditor.onDidBlurEditorWidget(()=>{this.preferenceService.get("editor.autoSave")===v.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE&&x.currentDocumentModel&&!x.currentDocumentModel.closeAutoSave&&x.currentDocumentModel.dirty&&x.currentDocumentModel.savable&&x.currentDocumentModel.save(void 0,m.SaveReason.FocusOut)})),D.addDispose(x.monacoEditor.onDidChangeModel(J=>{if(this.preferenceService.get("editor.autoSave")===v.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE&&J.oldModelUrl){const k=new o.URI(J.oldModelUrl.toString()),z=this.editorDocumentService.getModelReference(k,"editor-focus-autosave");z&&!z.instance.closeAutoSave&&z.instance.dirty&&z.instance.savable&&z.instance.save(void 0,m.SaveReason.FocusOut),z?.dispose()}})),D}}),window.addEventListener("blur",()=>{this.preferenceService.get("editor.autoSave")===v.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS&&this.commandService.executeCommand(o.EDITOR_COMMANDS.SAVE_ALL.id,m.SaveReason.FocusOut)}),this.preferenceSettings.setEnumLabels("editor.autoSave",{[v.AUTO_SAVE_MODE.OFF]:(0,o.localize)("editor.autoSave.enum.off"),[v.AUTO_SAVE_MODE.AFTER_DELAY]:(0,o.localize)("editor.autoSave.enum.afterDelay"),[v.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE]:(0,o.localize)("editor.autoSave.enum.editorFocusChange"),[v.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS]:(0,o.localize)("editor.autoSave.enum.windowLostFocus")}),B.registerEditorFeatureContribution(new S.EditorTopPaddingContribution),B.registerEditorFeatureContribution(this.injector.get(X.EditorSuggestWidgetContribution)),this.registerAutoSaveConfigurationChange()}registerAutoSaveConfigurationChange(){this.preferenceService.onSpecificPreferenceChange("editor.autoSave",B=>{const x=B.newValue;if(x!==v.AUTO_SAVE_MODE.OFF){let D=m.SaveReason.FocusOut;x===v.AUTO_SAVE_MODE.AFTER_DELAY&&(D=m.SaveReason.AfterDelay);for(const J of this.workbenchEditorService.editorGroups)for(const k of J.resources)B.affects(k?.uri.toString())&&J.saveResource(k,D)}})}registerCommands(B){B.registerCommand(o.EDITOR_COMMANDS.AUTO_SAVE,{execute:()=>{const x="editor.autoSave",D=this.preferenceSettings.getPreference(x,h.PreferenceScope.User).value||v.AUTO_SAVE_MODE.OFF,J=[v.AUTO_SAVE_MODE.AFTER_DELAY,v.AUTO_SAVE_MODE.EDITOR_FOCUS_CHANGE,v.AUTO_SAVE_MODE.WINDOWS_LOST_FOCUS].includes(D)?v.AUTO_SAVE_MODE.OFF:v.AUTO_SAVE_MODE.AFTER_DELAY;return this.preferenceSettings.setPreference(x,J,h.PreferenceScope.User)}}),B.registerCommand(o.EDITOR_COMMANDS.COPY_PATH,{execute:x=>{x&&this.commandService.executeCommand(o.FILE_COMMANDS.COPY_PATH.id,x.uri)}}),B.registerCommand(o.EDITOR_COMMANDS.COPY_RELATIVE_PATH,{execute:x=>{x&&this.commandService.executeCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,x.uri)}})}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],M.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],M.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(m.WorkbenchEditorService),n.__metadata("design:type",Q.WorkbenchEditorServiceImpl)],M.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],M.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(N.IEditorDocumentModelService),n.__metadata("design:type",Object)],M.prototype,"editorDocumentService",void 0),n.__decorate([(0,a.Autowired)(o.IPreferenceSettingsService),n.__metadata("design:type",Object)],M.prototype,"preferenceSettings",void 0),M=n.__decorate([(0,o.Domain)(H.BrowserEditorContribution,o.CommandContribution)],M),e.EditorAutoSaveEditorContribution=M},2863:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDecorationCollectionService=void 0;const a=t(85608),o=t(76003),c=t(41869),g=t(52416),u=t(10045),G=t(82196);let p=n=class{constructor(){this.decorations=new Map,this.tempId=0,this.decorationProviders=new Map}getNextTempId(){return this.tempId++,"temp-decoration-"+this.tempId}createTextEditorDecorationType(b,I){I||(I=this.getNextTempId());const r=this.resolveDecoration(I,b),l={key:I,property:r,dispose:()=>{I&&this.decorations.has(I)&&(r.dispose(),this.decorations.delete(I),this.eventBus.fire(new G.EditorDecorationTypeRemovedEvent(I)))}};return this.decorations.set(I,l),l}getTextEditorDecorationType(b){return this.decorations.get(b)}resolveDecoration(b,I){const r=this.createThemeCSSStyleCollection(b,I);return{default:r.default,light:r.light,dark:r.dark,isWholeLine:I.isWholeLine||!1,overviewRulerLane:I.overviewRulerLane,dispose:()=>{r.dispose()}}}createThemeCSSStyleCollection(b,I){const r=new c.DisposableStore,s={default:this.addedThemeDecorationToCSSStyleSheet(b,I),light:null,dark:null,dispose:()=>{r.dispose()}};if(I.light){const d=this.addedThemeDecorationToCSSStyleSheet(b+"-light",I.light);s.light=d,r.add(d)}if(I.dark){const d=this.addedThemeDecorationToCSSStyleSheet(b+"-dark",I.dark);s.dark=d,r.add(d)}return s}addedThemeDecorationToCSSStyleSheet(b,I){const r=b,l=b+"-inline",s=new c.DisposableStore;let d,m,v;const f=this.createInlineBlockCSSStyleIfNeeded(),N=this.resolveCSSStyle(I),W=this.resolveInlineCSSStyle(I);if(s.add(this.cssManager.addClass(r,N)),s.add(this.cssManager.addClass(l,W)),I.after){const Z=`${b}-after`,y=this.resolveContentCSSStyle(I.after);s.add(this.cssManager.addClass(Z+"::after",y)),d=`${f} ${Z}`}if(I.before){const Z=`${b}-before`,y=this.resolveContentCSSStyle(I.before);s.add(this.cssManager.addClass(Z+"::before",y)),m=`${f} ${Z}`}if(I.gutterIconPath){const Z=this.resolveCSSStyle({backgroundIconSize:I.gutterIconSize,backgroundIcon:I.gutterIconPath.toString()});v=b+"-glyphMargin",s.add(this.cssManager.addClass(v,Z))}return{className:r,inlineClassName:l,afterContentClassName:d,beforeContentClassName:m,glyphMarginClassName:v,overviewRulerColor:I.overviewRulerColor,dispose(){return s.dispose()}}}resolveCSSStyle(b){var I;const r=!((I=b.backgroundIcon)===null||I===void 0)&&I.startsWith("data:")?this.iconService.encodeBase64Path(decodeURIComponent(b.backgroundIcon)):b.backgroundIcon;return{backgroundColor:this.themeService.getColorVar(b.backgroundColor),background:b.backgroundIcon?`url("${r}") center center no-repeat`:void 0,backgroundSize:b.backgroundIconSize?`${b.backgroundIconSize}`:void 0,outline:b.outline,outlineColor:b.outlineColor,outlineStyle:b.outlineStyle,outlineWidth:b.outlineWidth,border:b.border,borderColor:this.themeService.getColorVar(b.borderColor),borderRadius:b.borderRadius,borderSpacing:b.borderSpacing,borderStyle:b.borderStyle,borderWidth:b.borderWidth}}resolveInlineCSSStyle(b){return{fontStyle:b.fontStyle,fontWeight:b.fontWeight,textDecoration:b.textDecoration,textUnderlinePosition:b.textUnderlinePosition,cursor:b.cursor,color:this.themeService.getColorVar(b.color),opacity:b.opacity,letterSpacing:b.letterSpacing}}resolveContentCSSStyle(b){let I;return b.contentText?I=`"${b.contentText}"`:b.contentIconPath&&(I=`url('${c.URI.from(b.contentIconPath).toString(!0).replace(/'/g,"%27")}')`),{display:"block",content:I,border:b.border,borderColor:this.themeService.getColorVar(b.borderColor),fontStyle:b.fontStyle,fontWeight:b.fontWeight,textDecoration:b.textDecoration,color:this.themeService.getColorVar(b.color),backgroundColor:this.themeService.getColorVar(b.backgroundColor),margin:b.margin,width:b.width,height:b.height}}createInlineBlockCSSStyleIfNeeded(){return this.inlineBlockDecorationDisposer||(this.inlineBlockDecorationDisposer=this.cssManager.addClass(n.DISPLAY_INLINE_BLOCK_CLS,{display:"inline-block"})),n.DISPLAY_INLINE_BLOCK_CLS}registerDecorationProvider(b){this.decorationProviders.set(b.key,b),this.eventBus.fire(new G.EditorDecorationProviderRegistrationEvent(b));const I=b.onDidDecorationChange(r=>{this.eventBus.fire(new G.EditorDecorationChangeEvent({uri:r,key:b.key}))});return{dispose:()=>{this.decorationProviders.get(b.key)===b&&(this.decorationProviders.delete(b.key),this.eventBus.fire(new G.EditorDecorationTypeRemovedEvent(b.key))),I.dispose()}}}async getDecorationFromProvider(b,I){const r={};let l=[];return I?this.decorationProviders.has(I)&&l.push(this.decorationProviders.get(I)):l=Array.from(this.decorationProviders.values()),await Promise.all(l.map(async s=>{if(s.schemes&&s.schemes.indexOf(b.scheme)===-1)return;const d=await s.provideEditorDecoration(b);d&&(r[s.key]=d)})),r}};p.DISPLAY_INLINE_BLOCK_CLS="display-inline-block-decoration",a.__decorate([(0,o.Autowired)(u.ICSSStyleService),a.__metadata("design:type",Object)],p.prototype,"cssManager",void 0),a.__decorate([(0,o.Autowired)(g.IThemeService),a.__metadata("design:type",Object)],p.prototype,"themeService",void 0),a.__decorate([(0,o.Autowired)(g.IIconService),a.__metadata("design:type",Object)],p.prototype,"iconService",void 0),a.__decorate([(0,o.Autowired)(c.IEventBus),a.__metadata("design:type",Object)],p.prototype,"eventBus",void 0),p=n=a.__decorate([(0,o.Injectable)()],p),e.EditorDecorationCollectionService=p},93152:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoContextViewService=e.MonacoCodeService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=n.__importStar(t(20868)),u=t(76947),G=t(18099),p=t(79731),h=t(83e3),b=t(7760),I=t(26917),r=t(23418),l=t(51553);let s=class extends G.AbstractCodeEditorService{constructor(){super(h.StandaloneServices.get(b.IStandaloneThemeService))}getActiveCodeEditor(){return this.workbenchEditorService.currentEditor?this.workbenchEditorService.currentEditor.monacoEditor:null}async openCodeEditor(v,f,N){var W,Z,y,E,R,A;const w=v.resource;if(!this.preferenceService.get("editor.enablePreviewFromCodeNavigation")&&f&&!N&&(0,u.isEqual)((W=f.getModel())===null||W===void 0?void 0:W.uri,v.resource)){for(const S of this.workbenchEditorService.editorGroups)if(((Z=S.currentOpenType)===null||Z===void 0?void 0:Z.type)===r.EditorOpenType.code){if(((y=S.currentEditor)===null||y===void 0?void 0:y.monacoEditor)===f){S.pinPreviewed((E=S.currentResource)===null||E===void 0?void 0:E.uri);break}}else if(((R=S.currentOpenType)===null||R===void 0?void 0:R.type)===r.EditorOpenType.diff&&(S.diffEditor.modifiedEditor.monacoEditor===f||S.diffEditor.originalEditor.monacoEditor===f)){S.pinPreviewed((A=S.currentResource)===null||A===void 0?void 0:A.uri);break}}let V=this.workbenchEditorService.currentEditorGroup,Y;f&&(V=this.workbenchEditorService.editorGroups.find(S=>S.currentEditor&&S.currentEditor.monacoEditor===f)||V,Y=V.resources.findIndex(S=>V.currentResource&&S.uri===V.currentResource.uri),Y>=0&&Y++);const _=v.options?v.options.selection:null;let H;_&&(typeof _.endLineNumber=="number"&&typeof _.endColumn=="number"?H=_:H=new g.Range(_.startLineNumber,_.startColumn,_.startLineNumber,_.startColumn));const X=c.URI.parse(w.toString());return await V.open(X,{index:Y,range:H,focus:!0}),V.codeEditor.monacoEditor}};n.__decorate([(0,a.Autowired)(r.WorkbenchEditorService),n.__metadata("design:type",l.WorkbenchEditorServiceImpl)],s.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],s.prototype,"preferenceService",void 0),s=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],s),e.MonacoCodeService=s;class d extends I.ContextViewService{constructor(v){super(new p.EditorScopedLayoutService(document.body,v))}setContainer(v){this.menuContainer||(this.menuContainer=document.createElement("div"),this.menuContainer.className=v.className,this.menuContainer.style.left="0",this.menuContainer.style.top="0",this.menuContainer.style.position="fixed",this.menuContainer.style.zIndex="10",document.body.append(this.menuContainer)),super.setContainer(this.menuContainer)}}e.MonacoContextViewService=d},8287:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorStatusBarService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(26542),g=t(23418),u=t(96689);let G=class extends o.WithEventBus{setListener(){this.workbenchEditorService.onActiveResourceChange(()=>{this.updateLanguageStatus(this.workbenchEditorService.currentEditor)}),this.workbenchEditorService.onCursorChange(h=>{this.updateCursorStatus(h)}),this.eventBus.on(u.EditorDocumentModelOptionChangedEvent,h=>{const b=this.workbenchEditorService.currentEditor;b&&b.currentUri&&b.currentUri.isEqual(h.payload.uri)&&this.updateLanguageStatus(this.workbenchEditorService.currentEditor)})}updateCursorStatus(h){const{position:b,selectionLength:I}=h;if(!b){this.statusBar.removeElement("editor-status-cursor");return}this.statusBar.addElement("editor-status-cursor",{name:(0,o.localize)("status-bar.editor-selection"),text:`%status-bar.label.line%${b.lineNumber}\uFF0C%status-bar.label.column%${b.column}${I?`\uFF08%status-bar.label.selected%${I}\uFF09`:""}`,priority:4,alignment:c.StatusBarAlignment.RIGHT,command:o.EDITOR_COMMANDS.GO_TO_LINE.id,tooltip:(0,o.localize)("status.editor.goToLineCol")})}updateLanguageStatus(h){if(!h){this.statusBar.removeElement("editor-status-language"),this.statusBar.removeElement("editor-status-encoding"),this.statusBar.removeElement("editor-status-eol"),this.statusBar.removeElement("editor-status-space");return}let b="",I="",r="",l=!1,s=2;const d=h.currentDocumentModel;d&&(b=d.languageId,I=d.encoding,r=d.eol,l=d.getMonacoModel().getOptions().insertSpaces,s=d.getMonacoModel().getOptions().tabSize);const m=r===`
|
|
@@ -28072,7 +28072,7 @@ ${v}`)}return this.keybindingsChanged.fire({affectsCommands:[d.command]}),{dispo
|
|
|
28072
28072
|
`)}))}}}e.TextMateTokenizer=g},54324:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextmateService=e.getLegalThemeName=e.getEncodedLanguageId=void 0;const n=t(85608),a=t(27107),o=t(25726),c=t(76003),g=t(41869),u=t(6858),G=t(43718),p=t(42933),h=t(52902),b=t(33096),I=t(89944),r=t(96068),l=t(14162),s=t(83e3),d=t(96689),m=t(41977),v=t(58837);let f=!1;function N(A){return h.monaco.languages.getEncodedLanguageId(A)}e.getEncodedLanguageId=N;function W(A){return A.toLowerCase().replace(/[^a-z0-9-]/g,"-")}e.getLegalThemeName=W;class Z{createOnigScanner(w){return new a.OnigScanner(w)}createOnigString(w){return new a.OnigString(w)}}function y(A){if(!Array.isArray(A))return!1;for(let w=0,F=A.length;w<F;w++)if(typeof A[w]!="string")return!1;return!0}function E(A){return y(A)&&A.length===2}let R=class extends g.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(I.ThemeChangedEvent,w=>{const F=w.payload.theme.themeData;F!==this.editorTheme&&(this.editorTheme=F,this.setTheme(F))})}async registerLanguage(w,F){return this.registerLanguages([w],F)}reviveLanguageConfiguration(w,F){return{wordPattern:this.createRegex(F.wordPattern),autoClosingPairs:this.extractValidAutoClosingPairs(w,F),brackets:this.extractValidBrackets(w,F),comments:this.extractValidCommentRule(w,F),folding:this.convertFolding(F.folding),surroundingPairs:this.extractValidSurroundingPairs(w,F),indentationRules:this.convertIndentationRules(F.indentationRules),autoCloseBefore:F.autoCloseBefore,colorizedBracketPairs:this.extractValidColorizedBracketPairs(w,F),onEnterRules:this.extractValidOnEnterRules(w,F)}}get monacoLanguageService(){return s.StandaloneServices.get(l.ILanguageService)}isEmbeddedLanguageOnly(w){return!w.filenames&&!w.extensions&&!w.filenamePatterns&&!w.firstLine&&!w.mimetypes&&(!w.aliases||w.aliases.length===0)}async registerLanguages(w,F){const V=w.map(Y=>({id:Y.id,aliases:Y.aliases,extensions:Y.extensions,filenamePatterns:Y.filenamePatterns,filenames:Y.filenames,firstLine:Y.firstLine,mimetypes:Y.mimetypes}));if(this.dynamicLanguages.push(...V.filter(Y=>!this.isEmbeddedLanguageOnly(Y))),this.monacoLanguageService._registry._registerLanguages(V),w.forEach(async Y=>{this.languageConfigLocation.set(Y.id,F),this.addDispose(h.monaco.languages.onLanguage(Y.id,async()=>{await this.loadLanguageConfiguration(Y,F),this.activateLanguage(Y.id)})),this.languageConfiguration.set(Y.id,Y)}),this.initialized){const Y=this.editorDocumentModelService.getAllModels().map(_=>_.uri);for(const _ of Y){const H=this.editorDocumentModelService.getModelReference(G.URI.parse(_.codeUri.toString()));if(H&&H.instance){const X=H.instance.getMonacoModel().getLanguageId();if(this.languageConfiguration.has(X)){const S=this.languageConfigLocation.get(X);await this.loadLanguageConfiguration(this.languageConfiguration.get(X),S),this.activateLanguage(X)}}H?.dispose()}}}async registerGrammar(w,F){if(w.path){const V=w.path.replace(/^\.\//,"");w.location=F.resolve(V)}this.doRegisterGrammar(w)}unregisterGrammar(w){const F=this.registeredGrammarDisposableCollection.get(w.scopeName);F&&F.dispose()}doRegisterGrammar(w){const F=new G.Disposable;if(w.injectTo)for(const V of w.injectTo){let Y=this.injections.get(V);Y||(Y=[],F.addDispose(G.Disposable.create(()=>{this.injections.delete(V)})),this.injections.set(V,Y)),Y.push(w.scopeName)}F.addDispose(G.Disposable.create(this.textmateRegistry.registerTextmateGrammarScope(w.scopeName,{async getGrammarDefinition(){return{format:/\.json$/.test(w.path)?"json":"plist",location:w.location,content:await w.resolvedConfiguration}},getInjections:V=>{const Y=V.split(".");let _=[];for(let H=1;H<=Y.length;H++){const X=Y.slice(0,H).join(".");_=[..._,...this.injections.get(X)||[]]}return _}}))),w.language&&(F.addDispose(G.Disposable.create(this.textmateRegistry.mapLanguageIdToTextmateGrammar(w.language,w.scopeName))),F.addDispose(G.Disposable.create(this.textmateRegistry.registerGrammarConfiguration(w.language,()=>({embeddedLanguages:this.convertEmbeddedLanguages(w.embeddedLanguages),tokenTypes:this.convertTokenTypes(w.tokenTypes),balancedBracketSelectors:(0,r.asStringArray)(w.balancedBracketScopes,["*"]),unbalancedBracketSelectors:(0,r.asStringArray)(w.unbalancedBracketScopes,[])}))))),this.registeredGrammarDisposableCollection.set(w.scopeName,F)}async loadLanguageConfiguration(w,F){let V;if(typeof w.resolvedConfiguration=="object"){const Y=await w.resolvedConfiguration;V=this.reviveLanguageConfiguration(w.id,Y)}else if(w.configuration){const Y=w.configuration.replace(/^\.\//,""),_=F.resolve(Y),X=(await this.fileServiceClient.resolveContent(_.toString())).content;if(X){const S=this.safeParseJSON(X);S&&(V=this.reviveLanguageConfiguration(w.id,S))}}V&&h.monaco.languages.setLanguageConfiguration(w.id,V)}async activateLanguage(w){this.eventBus.fire(new g.ExtensionActivateEvent({topic:"onLanguage",data:w})),!this.activatedLanguage.has(w)&&(this.activatedLanguage.add(w),this.setTokensProviderByLanguageId(w))}async setTokensProviderByLanguageId(w){const F=this.textmateRegistry.getScope(w);if(!F||!this.textmateRegistry.getProvider(F))return;const Y={lineLimit:this.preferenceService.getValid("editor.maxTokenizationLineLength",2e4)},_=this.textmateRegistry.getGrammarConfiguration(w)(),H=N(w);try{const X=await this.grammarRegistry.loadGrammarWithConfiguration(F,H,_),S=_.tokenizerOption?_.tokenizerOption:Y,Q=_.embeddedLanguages&&Object.keys(_.embeddedLanguages).length>0;if(X){const O=new v.TextMateTokenizer(X,S,Q);this.addDispose(O.onDidEncounterLanguage(async M=>{const T=this.monacoLanguageService._registry.languageIdCodec.decodeLanguageId(M),B=this.languageConfigLocation.get(T);B&&this.languageConfiguration.has(T)&&(await this.loadLanguageConfiguration(this.languageConfiguration.get(T),B),this.activateLanguage(T))})),h.monaco.languages.setTokensProvider(w,O)}}catch(X){this.logger.warn("No grammar for this language id",w,X)}}setTheme(w){this.generateEncodedTokenColors(w),h.monaco.editor.defineTheme(W(w.name),w),h.monaco.editor.setTheme(W(w.name))}generateEncodedTokenColors(w){this.grammarRegistry.setTheme(w),w.encodedTokensColors=this.grammarRegistry.getColorMap(),w.encodedTokensColors[0]=null}createRegex(w){if(typeof w=="string")return new RegExp(w,"");if((0,G.isObject)(w)){if(typeof w.pattern!="string"||typeof w.flags<"u"&&typeof w.flags!="string")return;try{return new RegExp(w.pattern,w.flags)}catch{return}}}safeParseJSON(w){let F;try{return F=(0,g.parseWithComments)(w),F}catch(V){this.logger.error(`Language configuration file parsing error, ${V.stack}`);return}}convertFolding(w){if(!w)return;const F={offSide:w.offSide};return w.markers&&(F.markers={end:w.markers.end,start:w.markers.start}),F}convertIndentationRules(w){if(!w)return;const F={decreaseIndentPattern:this.createRegex(w.decreaseIndentPattern),increaseIndentPattern:this.createRegex(w.increaseIndentPattern)};return w.indentNextLinePattern&&(F.indentNextLinePattern=this.createRegex(w.indentNextLinePattern)),w.unIndentedLinePattern&&(F.unIndentedLinePattern=this.createRegex(w.unIndentedLinePattern)),F}convertEmbeddedLanguages(w){if(typeof w>"u"||w===null)return;const F=Object.create(null),V=Object.keys(w),Y=V.length;for(let _=0;_<Y;_++){const H=V[_],X=w[H];F[H]=N(X)}return F}convertTokenTypes(w){if(typeof w>"u"||w===null)return;const F=Object.create(null),V=Object.keys(w),Y=V.length;for(let _=0;_<Y;_++){const H=V[_];switch(w[H]){case"string":F[H]=2;break;case"other":F[H]=0;break;case"comment":F[H]=1;break}}return F}extractValidSurroundingPairs(w,F){if(!F)return;const V=F.surroundingPairs;if(typeof V>"u")return;if(!Array.isArray(V)){this.logger.warn(`[${w}: language configuration: expected \`surroundingPairs\` to be an array.`);return}let Y;for(let _=0,H=V.length;_<H;_++){const X=V[_];if(Array.isArray(X)){if(!E(X)){this.logger.warn(`[${w}: language configuration: expected \`surroundingPairs[${_}]\` to be an array of two strings or an object.`);continue}Y=Y||[],Y.push({open:X[0],close:X[1]})}else{if(typeof X!="object"){this.logger.warn(`[${w}: language configuration: expected \`surroundingPairs[${_}]\` to be an array of two strings or an object.`);continue}if(typeof X.open!="string"){this.logger.warn(`[${w}: language configuration: expected \`surroundingPairs[${_}].open\` to be a string.`);continue}if(typeof X.close!="string"){this.logger.warn(`[${w}: language configuration: expected \`surroundingPairs[${_}].close\` to be a string.`);continue}Y=Y||[],Y.push({open:X.open,close:X.close})}}return Y}extractValidColorizedBracketPairs(w,F){const V=F.colorizedBracketPairs;if(typeof V>"u")return;if(!Array.isArray(V)){this.logger.warn(`[${w}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const Y=[];for(let _=0,H=V.length;_<H;_++){const X=V[_];if(!E(X)){this.logger.warn(`[${w}]: language configuration: expected \`colorizedBracketPairs[${_}]\` to be an array of two strings.`);continue}Y.push([X[0],X[1]])}return Y}extractValidOnEnterRules(w,F){const V=F.onEnterRules;if(typeof V>"u")return;if(!Array.isArray(V)){this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let Y;for(let _=0,H=V.length;_<H;_++){const X=V[_];if(!(0,G.isObject)(X)){this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules[${_}]\` to be an object.`);continue}if(!(0,G.isObject)(X.action)){this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules[${_}].action\` to be an object.`);continue}let S;if(X.action.indent==="none")S=b.IndentAction.None;else if(X.action.indent==="indent")S=b.IndentAction.Indent;else if(X.action.indent==="indentOutdent")S=b.IndentAction.IndentOutdent;else if(X.action.indent==="outdent")S=b.IndentAction.Outdent;else{this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules[${_}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const Q={indentAction:S};X.action.appendText&&(typeof X.action.appendText=="string"?Q.appendText=X.action.appendText:this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules[${_}].action.appendText\` to be undefined or a string.`)),X.action.removeText&&(typeof X.action.removeText=="number"?Q.removeText=X.action.removeText:this.logger.warn(`[${w}]: language configuration: expected \`onEnterRules[${_}].action.removeText\` to be undefined or a number.`));const O=this.createRegex(X.beforeText);if(!O)continue;const M={beforeText:O,action:Q};if(X.afterText){const T=this.createRegex(X.afterText);T&&(M.afterText=T)}if(X.previousLineText){const T=this.createRegex(X.previousLineText);T&&(M.previousLineText=T)}Y=Y||[],Y.push(M)}return Y}extractValidBrackets(w,F){const V=F.brackets;if(typeof V>"u")return;if(!Array.isArray(V)){this.logger.warn(`[${w}]: language configuration: expected \`brackets\` to be an array.`);return}let Y;for(let _=0,H=V.length;_<H;_++){const X=V[_];if(!E(X)){this.logger.warn(`[${w}]: language configuration: expected \`brackets[${_}]\` to be an array of two strings.`);continue}Y=Y||[],Y.push(X)}return Y}extractValidAutoClosingPairs(w,F){const V=F.autoClosingPairs;if(typeof V>"u")return;if(!Array.isArray(V)){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let Y;for(let _=0,H=V.length;_<H;_++){const X=V[_];if(Array.isArray(X)){if(!E(X)){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs[${_}]\` to be an array of two strings or an object.`);continue}Y=Y||[],Y.push({open:X[0],close:X[1]})}else{if(typeof X!="object"){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs[${_}]\` to be an array of two strings or an object.`);continue}if(typeof X.open!="string"){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs[${_}].open\` to be a string.`);continue}if(typeof X.close!="string"){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs[${_}].close\` to be a string.`);continue}if(typeof X.notIn<"u"&&!y(X.notIn)){this.logger.warn(`[${w}]: language configuration: expected \`autoClosingPairs[${_}].notIn\` to be a string array.`);continue}Y=Y||[],Y.push({open:X.open,close:X.close,notIn:X.notIn})}}return Y}extractValidCommentRule(w,F){const V=F.comments;if(typeof V>"u")return;if(typeof V!="object"){this.logger.warn(`[${w}]: language configuration: expected \`comments\` to be an object.`);return}let Y;return typeof V.lineComment<"u"&&(typeof V.lineComment!="string"?this.logger.warn(`[${w}]: language configuration: expected \`comments.lineComment\` to be a string.`):(Y=Y||{},Y.lineComment=V.lineComment)),typeof V.blockComment<"u"&&(E(V.blockComment)?(Y=Y||{},Y.blockComment=V.blockComment):this.logger.warn(`[${w}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),Y}async initGrammarRegistry(){this.grammarRegistry=new o.Registry({onigLib:this.getOnigLib(),loadGrammar:async w=>{const F=this.textmateRegistry.getProvider(w);if(F){const V=await F.getGrammarDefinition();if(!V.content){const H=(await this.fileServiceClient.resolveContent(V.location.toString())).content;V.content=V.format==="json"?this.safeParseJSON(H):H}let Y;return typeof V.content=="string"?Y=(0,o.parseRawGrammar)(V.content,V.format==="json"?"grammar.json":"grammar.plist"):Y=V.content,Y}},getInjections:w=>{const F=this.textmateRegistry.getProvider(w);return F&&F.getInjections?F.getInjections(w):[]}}),this.activateLanguages()}getLanguages(){return[...h.monaco.languages.getLanguages(),...this.dynamicLanguages]}activateLanguages(){for(const{id:w}of this.getLanguages())this.editorDocumentModelService.hasLanguage(w)&&this.activateLanguage(w)}async getOnigLib(){if(f)return new Z;const w=await this.rendererRuntime.provideResourceUri(u.EKnownResources.OnigWasm),V=await(await fetch(w)).arrayBuffer();return await(0,a.loadWASM)(V),f=!0,new Z}listenPreferenceChange(){this.preferenceService.onPreferenceChanged(w=>{if(w.preferenceName==="editor.maxTokenizationLineLength")for(const F of this.activatedLanguage)this.setTokensProviderByLanguageId(F)})}async testTokenize(w,F){const V=this.textmateRegistry.getScope(F);if(!V)return;const Y=this.textmateRegistry.getGrammarConfiguration(F)(),_=N(F),H=await this.grammarRegistry.loadGrammarWithConfiguration(V,_,Y);let X=o.INITIAL;const S=H.tokenizeLine(w,X),Q=(0,g.getDebugLogger)("tokenize");Q.log(`
|
|
28073
28073
|
Tokenizing line: ${w}`);for(let O=0;O<S.tokens.length;O++){const M=S.tokens[O];Q.log(` - token from ${M.startIndex} to ${M.endIndex} (${w.substring(M.startIndex,M.endIndex)}) with scopes ${M.scopes.join(", ")}`)}X=S.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")}};n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.TextmateRegistry)],R.prototype,"textmateRegistry",void 0),n.__decorate([(0,c.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],R.prototype,"fileServiceClient",void 0),n.__decorate([(0,c.Autowired)(g.PreferenceService),n.__metadata("design:type",Object)],R.prototype,"preferenceService",void 0),n.__decorate([(0,c.Autowired)(g.ILogger),n.__metadata("design:type",Object)],R.prototype,"logger",void 0),n.__decorate([(0,c.Autowired)(d.IEditorDocumentModelService),n.__metadata("design:type",Object)],R.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,c.Autowired)(u.RendererRuntime),n.__metadata("design:type",u.RendererRuntime)],R.prototype,"rendererRuntime",void 0),R=n.__decorate([(0,c.Injectable)()],R),e.TextmateService=R},88412:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyContribution=e.executeProvideSubtypesCommand=e.executeProvideSupertypesCommand=e.executePrepareTypeHierarchyCommand=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(40191),g=t(28694),u=t(82196);e.executePrepareTypeHierarchyCommand={id:"_executePrepareTypeHierarchy"},e.executeProvideSupertypesCommand={id:"_executeProvideSupertypes"},e.executeProvideSubtypesCommand={id:"_executeProvideSubtypes"};const G=new c.RawContextKey("editorHasCallHierarchyProvider",!1);let p=class{registerCommands(b){b.registerCommand(e.executePrepareTypeHierarchyCommand,{execute:(I,r)=>this.typeHierarchyService.prepareTypeHierarchyProvider(I,r)}),b.registerCommand(e.executeProvideSupertypesCommand,{execute:I=>this.typeHierarchyService.provideSupertypes(I)}),b.registerCommand(e.executeProvideSubtypesCommand,{execute:I=>this.typeHierarchyService.provideSubtypes(I)})}registerEditorFeature(b){this.ctxHasProvider=G.bind(this.contextKeyService),b.registerEditorFeatureContribution({contribute:I=>{const r=I.monacoEditor;return o.Event.any(r.onDidChangeModel,r.onDidChangeModelLanguage,g.TypeHierarchyProviderRegistry.onDidChange)(()=>{r.hasModel()&&this.ctxHasProvider.set(g.TypeHierarchyProviderRegistry.has(r.getModel()))})}})}};n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"contextKeyService",void 0),n.__decorate([(0,a.Autowired)(g.ITypeHierarchyService),n.__metadata("design:type",Object)],p.prototype,"typeHierarchyService",void 0),p=n.__decorate([(0,o.Domain)(o.CommandContribution,u.BrowserEditorContribution)],p),e.TypeHierarchyContribution=p},7795:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyService=e.TypeHierarchyModel=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(28694),g=t(96689),{isNonEmptyArray:u}=o.arrays;class G{static async create(b,I,r){const[l]=c.TypeHierarchyProviderRegistry.ordered(b);if(!l)return;const s=await l.prepareTypeHierarchy(b,I,r);if(s)return new G(s.roots.reduce((d,m)=>d+m._sessionId,""),l,s.roots,new o.RefCountedDisposable(s))}constructor(b,I,r,l){this.id=b,this.provider=I,this.roots=r,this.ref=l,this.root=r[0]}dispose(){this.ref.release()}fork(b){const I=this;return new class extends G{constructor(){super(I.id,I.provider,[b],I.ref.acquire())}}}async provideSupertypes(b,I){try{const r=await this.provider.provideSupertypes(b,I);if(u(r))return r}catch(r){(0,o.onUnexpectedExternalError)(r)}return[]}async provideSubtypes(b,I){try{const r=await this.provider.provideSubtypes(b,I);if(u(r))return r}catch(r){(0,o.onUnexpectedExternalError)(r)}return[]}}e.TypeHierarchyModel=G;let p=class{constructor(){this.models=new Map}registerTypeHierarchyProvider(b,I){c.TypeHierarchyProviderRegistry.register(b,I)}async prepareTypeHierarchyProvider(b,I){let r=this.modelService.getModelReference(o.URI.parse(b.toString())),l=r?.instance.getMonacoModel();if(r?.dispose(),!l){const s=await this.modelService.createModelReference(o.URI.parse(b.toString()));l=s.instance.getMonacoModel(),r=s}try{const s=await G.create(l,I,o.CancellationToken.None);return s?(this.models.set(s.id,s),this.models.forEach((d,m,v)=>{v.size>10&&(d.dispose(),this.models.delete(m))}),[s.root]):[]}finally{r?.dispose()}}async provideSupertypes(b){const I=this.models.get(b._sessionId);if(I)return I.provideSupertypes(b,o.CancellationToken.None)}async provideSubtypes(b){const I=this.models.get(b._sessionId);if(I)return I.provideSubtypes(b,o.CancellationToken.None)}};n.__decorate([(0,a.Autowired)(g.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"modelService",void 0),p=n.__decorate([(0,a.Injectable)()],p),e.TypeHierarchyService=p},93532:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationMenuModel=e.NavigationBarViewService=e.NavigationMenuContainer=e.NavigationMenu=e.NavigationItem=e.NavigationBar=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(83794),c=t(25150),g=n.__importStar(t(14041)),u=t(76003),G=t(97267),p=t(41869),h=t(26209),b=n.__importDefault(t(69418)),I=t(82196),r=t(50674),l=({editorGroup:m})=>{const v=(0,p.useInjectable)(I.IBreadCrumbService),f=(0,p.useDesignStyles)(b.default.navigation_container,"navigation_container"),N=(0,p.useDesignStyles)(b.default.navigation_icon,"navigation_icon");if((0,r.useUpdateOnGroupTabChange)(m),(0,p.useUpdateOnEvent)(v.onDidUpdateBreadCrumbResults,[],Z=>{var y;const E=m.currentEditor&&m.currentEditor.currentDocumentModel?m.currentEditor:null,R=m.currentEditor&&m.currentEditor.currentDocumentModel?m.currentEditor.currentDocumentModel.uri:(y=m.currentResource)===null||y===void 0?void 0:y.uri;return!!R&&Z.editor===E&&Z.uri.isEqual(R)}),m.resources.length===0||!m.currentResource)return null;let W;return m.currentEditor&&m.currentEditor.currentDocumentModel?W=v.getBreadCrumbs(m.currentEditor.currentDocumentModel.uri,m.currentEditor):W=v.getBreadCrumbs(m.currentResource.uri,null),W?W.length===0?null:g.default.createElement("div",{className:(0,a.default)("kt-navigation-container",f),onContextMenu:Z=>{Z.preventDefault()}},W.map((Z,y)=>g.default.createElement(g.default.Fragment,{key:y+"-crumb:"+Z.name},y>0&&g.default.createElement(G.Icon,{icon:"right",size:"small",className:N}),g.default.createElement(e.NavigationItem,{part:Z,editorGroup:m})))):null};e.NavigationBar=l,e.NavigationItem=(0,g.memo)(({part:m,editorGroup:v})=>{const f=(0,p.useInjectable)(s),N=(0,p.useInjectable)(h.BreadCrumbsMenuService),W=(0,g.useRef)(),Z=(0,p.useDesignStyles)(b.default["navigation-part"],"navigation-part"),y=(0,g.useCallback)(async()=>{if(m.getSiblings&&W.current){const{left:E,top:R,height:A}=W.current.getBoundingClientRect(),w=await m.getSiblings();let F=E;window.innerWidth-F<210&&(F=window.innerWidth-200-5),f.showMenu(w.parts,F,R+A+5,w.currentIndex,m.uri,v)}},[W.current,m]);return g.default.createElement("span",{onClick:y,onContextMenu:E=>{!m.isSymbol&&m.uri&&N.show(E.nativeEvent.x,E.nativeEvent.y,v,m.uri),E.preventDefault()},className:Z,ref:W},m.icon&&g.default.createElement("span",{className:m.icon}),g.default.createElement("span",null,m.name))}),e.NavigationMenu=(0,c.observer)(({model:m})=>{let v=window.innerHeight-m.y-20,f=m.y;const N=m.parts.length*22;v<100&&v<N&&(v=100,f=window.innerHeight-20-v);const W=(0,g.useRef)(),Z=(0,p.useDesignStyles)(b.default.navigation_menu,"navigation_menu"),y=(0,p.useDesignStyles)(b.default.navigation_menu_item,"navigation_menu_item"),E=(0,p.useInjectable)(s),R=(0,g.useCallback)(()=>{p.fastdom.measure(()=>{try{if(W.current){const A=W.current.querySelector(`.${b.default.navigation_menu_item_current}`);A&&A.scrollIntoView({behavior:"auto",block:"center"})}}catch{}})},[W.current]);return g.default.createElement("div",{className:Z,style:{left:m.x+"px",top:f+"px",maxHeight:v+"px",height:N+"px"}},g.default.createElement(G.Scrollbars,{className:b.default.navigation_menu_items,universal:!0,forwardedRef:A=>{W.current=A,R()}},m.parts.map((A,w)=>{let F;const V=A.getChildren?async()=>{if(F){const{left:_,top:H,width:X}=F.getBoundingClientRect();let S=_+X+5;window.innerWidth-S<210&&(S=_-X-5);const Q=await A.getChildren();m.showSubMenu(Q,S,H,m)}}:void 0,Y=A.onClick?()=>{A.onClick(),E.dispose()}:void 0;return g.default.createElement("div",{onClick:Y||V,ref:_=>F=_,className:(0,a.default)(y,{[b.default.navigation_menu_item_current]:w===m.initialIndex}),key:"menu-"+A.name},g.default.createElement("span",{className:A.icon||(0,p.getIcon)("smile")}),g.default.createElement("span",{className:b.default.navigation_menu_item_label},A.name),A.getChildren&&g.default.createElement("span",{className:b.default.navigation_right,onClick:Y&&V?_=>{_.stopPropagation(),V()}:void 0},g.default.createElement(G.Icon,{icon:"right",size:"small"})))})),m.subMenu&&g.default.createElement(e.NavigationMenu,{model:m.subMenu}))}),e.NavigationMenuContainer=(0,c.observer)(()=>{const m=(0,p.useInjectable)(s),v=(0,g.useRef)();return(0,g.useEffect)(()=>{if(v.current){const f=new p.Disposable;return f.addDispose(new p.DomListener(window,"mouseup",()=>{m.dispose()})),f.addDispose(new p.DomListener(v.current,"mouseup",N=>{N.stopPropagation()})),f.dispose.bind(f)}}),m.current?g.default.createElement("div",{tabIndex:1,ref:v},g.default.createElement(e.NavigationMenu,{model:m.current})):null});let s=class{constructor(){this.current=null,this.editorGroup=null,(0,o.makeObservable)(this)}showMenu(v,f,N,W,Z,y){this.current=new d(v,f,N,W,Z),this.editorGroup=y}dispose(){this.current&&this.current.dispose(),this.current=null}};n.__decorate([o.observable.ref,n.__metadata("design:type",Object)],s.prototype,"current",void 0),n.__decorate([o.observable.ref,n.__metadata("design:type",Object)],s.prototype,"editorGroup",void 0),n.__decorate([o.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array,Object,Object,Object,Object,Object]),n.__metadata("design:returntype",void 0)],s.prototype,"showMenu",null),n.__decorate([o.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],s.prototype,"dispose",null),s=n.__decorate([(0,u.Injectable)(),n.__metadata("design:paramtypes",[])],s),e.NavigationBarViewService=s;class d{constructor(v,f,N,W=-1,Z){this.parts=v,this.x=f,this.y=N,this.initialIndex=W,this.uri=Z,this.subMenu=null,(0,o.makeObservable)(this)}showSubMenu(v,f,N,W){this.subMenu=new d(v,f,N,-1,W)}dispose(){this.subMenu&&this.subMenu.dispose(),this.subMenu=null}}n.__decorate([o.observable.ref,n.__metadata("design:type",Object)],d.prototype,"subMenu",void 0),n.__decorate([o.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array,Object,Object,Object]),n.__metadata("design:returntype",void 0)],d.prototype,"showSubMenu",null),n.__decorate([o.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],d.prototype,"dispose",null),e.NavigationMenuModel=d},71145:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookService=void 0;const n=t(85608),a=t(76003),o=t(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}};c=n.__decorate([(0,a.Injectable)()],c),e.NotebookService=c},34885:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorPreferenceContribution=void 0;const n=t(85608),a=t(41869),o=t(24328);let c=class{constructor(){this.schema=o.editorPreferenceSchema}};c=n.__decorate([(0,a.Domain)(a.PreferenceContribution)],c),e.EditorPreferenceContribution=c},6043:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getConvertedMonacoOptions=e.isDiffEditorOption=e.isEditorOption=e.diffEditorOptionsConverters=e.textModelUpdateOptionsConverters=e.editorOptionsConverters=void 0;const n=t(41869),{removeUndefined:a}=n.objects;e.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:b=>({enabled:b})}],["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.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:b=>({stickyScroll:{enabled:b}})}],["editor.forceReadOnly",{monaco:"readOnly",convert:b=>{if(b)return!0}}],["editor.unicodeHighlight",{monaco:"unicodeHighlight"}],["editor.inlineSuggest.showToolbar",{monaco:"inlineSuggest",convert:b=>{if(b)return{showToolbar:b}}}]]),e.textModelUpdateOptionsConverters=new Map([["editor.tabSize",{monaco:"tabSize"}],["editor.indentSize",{monaco:"indentSize"}],["editor.insertSpaces",{monaco:"insertSpaces"}],["editor.trimAutoWhitespace",{monaco:"trimAutoWhitespace"}]]),e.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:b=>({enabled:b})}],["diffEditor.experimental.stickyScroll.enabled",{monaco:"experimental",convert:b=>({stickyScroll:{enabled:b}})}],["diffEditor.hideUnchangedRegions.enabled",{monaco:"hideUnchangedRegions",convert:b=>({enabled:b})}],["diffEditor.hideUnchangedRegions.revealLineCount",{monaco:"hideUnchangedRegions",convert:b=>({revealLineCount:b})}],["diffEditor.hideUnchangedRegions.minimumLineCount",{monaco:"hideUnchangedRegions",convert:b=>({minimumLineCount:b})}],["diffEditor.hideUnchangedRegions.contextLineCount",{monaco:"hideUnchangedRegions",convert:b=>({contextLineCount:b})}],["diffEditor.experimental.showMoves",{monaco:"experimental",convert:b=>({showMoves:b})}],["diffEditor.experimental.showEmptyDecorations",{monaco:"experimental",convert:b=>({showEmptyDecorations:b})}]]);function o(b,I){if(I.has(b))return!0;{const r=I.keys();for(const l of r)if(b.startsWith(l))return!0}return!1}function c(b){return o(b,e.editorOptionsConverters)||o(b,e.textModelUpdateOptionsConverters)||o(b,e.diffEditorOptionsConverters)}e.isEditorOption=c;function g(b){return o(b,e.diffEditorOptionsConverters)}e.isDiffEditorOption=g;const u=[...e.editorOptionsConverters.keys()],G=[...e.textModelUpdateOptionsConverters.keys()],p=[...e.diffEditorOptionsConverters.keys()];function h(b,I,r,l){const s=I?n.Uri.parse(I):void 0,d=(y,E)=>y.reduce((R,A)=>{const w=b.getValue(A,{resource:s,overrideIdentifier:r});if(w!==void 0){const F=E.get(A);if(!F)return R[A]=w,R;const V=F?F.monaco:A,Y=F?.convert?F.convert(w):w;R[V]?Object.assign(R[V],Y):R[V]=Y}return R},{}),m=l?l.filter(y=>e.editorOptionsConverters.has(y)):[...u],v=l?l.filter(y=>e.textModelUpdateOptionsConverters.has(y)):[...G],f=l?l.filter(y=>e.diffEditorOptionsConverters.has(y)):[...p],N=a(d(m,e.editorOptionsConverters)),W=a(d(v,e.textModelUpdateOptionsConverters)),Z=a(d(f,e.diffEditorOptionsConverters));return{editorOptions:N,modelOptions:W,diffOptions:Z}}e.getConvertedMonacoOptions=h},24328:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorPreferences=e.editorPreferenceSchema=e.DIFF_EDITOR_DEFAULTS=e.EDITOR_DEFAULTS=e.EDITOR_INLINE_SUGGEST_DEFAULTS=e.EDITOR_SUGGEST_DEFAULTS=e.EDITOR_MODEL_DEFAULTS=e.EDITOR_FONT_DEFAULTS=e.USUAL_WORD_SEPARATORS=void 0;const n=t(41869),a=t(82196);e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const o="Consolas, 'Courier New', monospace",c="Menlo, Monaco, 'Courier New', monospace",g="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";e.EDITOR_FONT_DEFAULTS={fontFamily:n.isOSX?c:n.isLinux?g:o,fontWeight:"normal",fontSize:12,tabSize:2,renderWhitespace:!1,cursorStyle:"line",insertSpace:!0,wordWrap:"off",wordWrapColumn:80,lineHeight:0,letterSpacing:0},e.EDITOR_MODEL_DEFAULTS={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},e.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}},e.EDITOR_INLINE_SUGGEST_DEFAULTS={enabled:!0,showToolbar:"onHover"},e.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:e.USUAL_WORD_SEPARATORS,lineNumbersMinChars:3,lineDecorationsWidth:10,readOnly:!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,sticky:!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:a.ShowLightbulbIconMode.On,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}},e.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 u={"editor.ariaLabel":{type:"string",default:e.EDITOR_DEFAULTS.viewInfo.ariaLabel,description:"%editor.configuration.ariaLabel%"},"editor.extraEditorClassName":{type:"string",description:"%editor.configuration.extraEditorClassName%"},"editor.fixedOverflowWidgets":{type:"boolean",default:e.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:e.EDITOR_DEFAULTS.lineNumbersMinChars,description:"%editor.configuration.lineNumbersMinChars%"},"editor.lineDecorationsWidth":{type:"number",default:e.EDITOR_DEFAULTS.lineDecorationsWidth,description:"%editor.configuration.lineDecorationsWidth%"},"editor.fontFamily":{type:"string",default:e.EDITOR_FONT_DEFAULTS.fontFamily,description:"%editor.configuration.fontFamily%"},"editor.fontWeight":{type:"string",default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:"%editor.configuration.fontWeight%"},"editor.fontSize":{type:"number",default:e.EDITOR_FONT_DEFAULTS.fontSize,description:(0,n.localize)("fontSize","Controls the font size in pixels.")},"editor.lineHeight":{type:"number",default:e.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:e.EDITOR_SUGGEST_DEFAULTS.filterGraceful,description:"%editor.configuration.suggest.filterGraceful%"},"editor.suggest.localityBonus":{type:"boolean",default:e.EDITOR_SUGGEST_DEFAULTS.localityBonus,description:"%editor.configuration.suggest.localityBonus%"},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.EDITOR_SUGGEST_DEFAULTS.shareSuggestSelections,description:"%editor.configuration.suggest.shareSuggestSelections%"},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.EDITOR_SUGGEST_DEFAULTS.snippetsPreventQuickSuggestions,description:"%editor.configuration.suggest.snippetsPreventQuickSuggestions%"},"editor.suggest.showIcons":{type:"boolean",default:e.EDITOR_SUGGEST_DEFAULTS.showIcons,description:"%editor.configuration.suggest.showIcons%"},"editor.suggest.maxVisibleSuggestions":{type:"number",default:e.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:e.EDITOR_SUGGEST_DEFAULTS.preview,description:"%editor.configuration.suggest.preview%"},"editor.suggest.details.visible":{type:"boolean",default:e.EDITOR_SUGGEST_DEFAULTS.detailsVisible,description:"%editor.configuration.suggest.details.visible%"},"editor.inlineSuggest.enabled":{type:"boolean",default:e.EDITOR_INLINE_SUGGEST_DEFAULTS.enabled,description:"%editor.configuration.inlineSuggest.enabled%"},"editor.inlineSuggest.showToolbar":{type:"string",default:e.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:e.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:e.EDITOR_DEFAULTS.viewInfo.renderFinalNewline,description:"%editor.configuration.renderFinalNewline%"},"editor.rulers":{type:"array",items:{type:"number"},default:e.EDITOR_DEFAULTS.viewInfo.rulers,description:"%editor.configuration.rulers%"},"editor.wordSeparators":{type:"string",default:e.EDITOR_DEFAULTS.wordSeparators,description:"%editor.configuration.wordSeparators%"},"editor.tabSize":{type:"number",default:e.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:"%editor.configuration.tabSize%"},"editor.insertSpaces":{type:"boolean",default:e.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:"%editor.configuration.insertSpaces%"},"editor.detectIndentation":{type:"boolean",default:e.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:"%editor.configuration.detectIndentation%"},"editor.roundedSelection":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.roundedSelection,description:"%editor.configuration.roundedSelection%"},"editor.scrollBeyondLastLine":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine,description:"%editor.configuration.scrollBeyondLastLine%"},"editor.scrollBeyondLastColumn":{type:"number",default:e.EDITOR_DEFAULTS.viewInfo.scrollBeyondLastColumn,description:"%editor.configuration.scrollBeyondLastColumn%"},"editor.smoothScrolling":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.smoothScrolling,description:"%editor.configuration.smoothScrolling%"},"editor.minimap.enabled":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.minimap.enabled,description:"%editor.configuration.minimap.enabled%"},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.EDITOR_DEFAULTS.viewInfo.minimap.side,description:"%editor.configuration.minimap.side%"},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.EDITOR_DEFAULTS.viewInfo.minimap.showSlider,description:"%editor.configuration.minimap.showSlider%"},"editor.minimap.renderCharacters":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters,description:"%editor.configuration.minimap.renderCharacters%"},"editor.minimap.maxColumn":{type:"number",default:e.EDITOR_DEFAULTS.viewInfo.minimap.maxColumn,description:"%editor.configuration.minimap.maxColumn%"},"editor.hover.enabled":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.hover.enabled,description:"%editor.configuration.hover.enabled%"},"editor.hover.delay":{type:"number",default:e.EDITOR_DEFAULTS.contribInfo.hover.delay,description:(0,n.localize)("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.hover.sticky,description:"%editor.configuration.hover.sticky%"},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.find.seedSearchStringFromSelection,description:"%editor.configuration.find.seedSearchStringFromSelection%"},"editor.find.autoFindInSelection":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.find.autoFindInSelection,description:"%editor.configuration.find.autoFindInSelection%"},"editor.find.globalFindClipboard":{type:"boolean",default:e.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:e.EDITOR_DEFAULTS.wordWrap,description:"%editor.configuration.wordWrap%"},"editor.wordWrapColumn":{type:"integer",default:e.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:e.EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity,markdownDescription:"%editor.configuration.mouseWheelScrollSensitivity%"},"editor.fastScrollSensitivity":{type:"number",default:e.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:e.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:e.EDITOR_DEFAULTS.contribInfo.quickSuggestions,description:"%editor.configuration.quickSuggestions%"},"editor.quickSuggestionsDelay":{type:"integer",default:e.EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay,minimum:0,description:"%editor.configuration.quickSuggestionsDelay%"},"editor.parameterHints.enabled":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.parameterHints.enabled,description:"%editor.configuration.parameterHints.enabled%"},"editor.parameterHints.cycle":{type:"boolean",default:e.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:e.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:e.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:e.EDITOR_DEFAULTS.autoSurround,description:"%editor.configuration.autoSurround%"},"editor.formatOnType":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.formatOnType,description:"%editor.configuration.formatOnType%"},"editor.formatOnPaste":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.formatOnPaste,description:"%editor.configuration.formatOnPaste%"},"editor.autoIndent":{type:"boolean",default:e.EDITOR_DEFAULTS.autoIndent,description:"%editor.configuration.autoIndent%"},"editor.suggestOnTriggerCharacters":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters,description:"%editor.configuration.suggestOnTriggerCharacters%"},"editor.acceptSuggestionOnEnter":{type:"string",enum:["on","smart","off"],default:e.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:e.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:e.EDITOR_DEFAULTS.emptySelectionClipboard,description:"%editor.configuration.emptySelectionClipboard%"},"editor.copyWithSyntaxHighlighting":{type:"boolean",default:e.EDITOR_DEFAULTS.copyWithSyntaxHighlighting,description:"%editor.configuration.copyWithSyntaxHighlighting%"},"editor.wordBasedSuggestions":{type:"boolean",default:e.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:e.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:e.EDITOR_DEFAULTS.contribInfo.selectionHighlight,description:"%editor.configuration.selectionHighlight%"},"editor.occurrencesHighlight":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.occurrencesHighlight,description:"%editor.configuration.occurrencesHighlight%"},"editor.overviewRulerLanes":{type:"integer",default:3,description:"%editor.configuration.overviewRulerLanes%"},"editor.overviewRulerBorder":{type:"boolean",default:e.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:e.EDITOR_DEFAULTS.viewInfo.mouseWheelZoom,markdownDescription:"%editor.configuration.mouseWheelZoom%"},"editor.cursorSmoothCaretAnimation":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.cursorSmoothCaretAnimation,description:"%editor.configuration.cursorSmoothCaretAnimation%"},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:e.EDITOR_FONT_DEFAULTS.cursorStyle,description:"%editor.configuration.cursorStyle%"},"editor.cursorWidth":{type:"integer",default:e.EDITOR_DEFAULTS.viewInfo.cursorWidth,markdownDescription:"%editor.configuration.cursorWidth%"},"editor.fontLigatures":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.fontLigatures,description:"%editor.configuration.fontLigatures%"},"editor.hideCursorInOverviewRuler":{type:"boolean",default:e.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:e.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:e.EDITOR_DEFAULTS.viewInfo.renderControlCharacters,description:"%editor.configuration.renderControlCharacters%"},"editor.guides.indentation":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.guides.indentation,description:"%editor.configuration.guides.indentation%"},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.guides.highlightActiveIndentGuide,description:"%editor.configuration.guides.highlightActiveIndentation%"},"editor.guides.bracketPairs":{type:"boolean",default:e.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:e.EDITOR_DEFAULTS.viewInfo.renderLineHighlight,description:"%editor.configuration.renderLineHighlight%"},"editor.codeLens":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.codeLens,description:"%editor.configuration.codeLens%"},"editor.folding":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.folding,description:"%editor.configuration.folding%"},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:e.EDITOR_DEFAULTS.contribInfo.foldingStrategy,markdownDescription:"%editor.configuration.foldingStrategy%"},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:e.EDITOR_DEFAULTS.contribInfo.showFoldingControls,description:"%editor.configuration.showFoldingControls%"},"editor.matchBrackets":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.matchBrackets,description:"%editor.configuration.matchBrackets%"},"editor.glyphMargin":{type:"boolean",default:e.EDITOR_DEFAULTS.viewInfo.glyphMargin,description:"%editor.configuration.glyphMargin%"},"editor.useTabStops":{type:"boolean",default:e.EDITOR_DEFAULTS.useTabStops,description:"%editor.configuration.useTabStops%"},"editor.trimAutoWhitespace":{type:"boolean",default:e.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:"%editor.configuration.trimAutoWhitespace%"},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:"%editor.configuration.stablePeek%"},"editor.dragAndDrop":{type:"boolean",default:e.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:e.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:e.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:e.EDITOR_DEFAULTS.contribInfo.links,description:"%editor.configuration.links%"},"editor.colorDecorators":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.colorDecorators,description:"%editor.configuration.colorDecorators%"},"editor.lightbulb.enabled":{type:"string",default:e.EDITOR_DEFAULTS.contribInfo.lightbulbEnabled,enum:[a.ShowLightbulbIconMode.Off,a.ShowLightbulbIconMode.OnCode,a.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:e.EDITOR_DEFAULTS.contribInfo.codeActionsOnSave,description:"%editor.configuration.codeActionsOnSave%"},"editor.codeActionsOnSaveTimeout":{type:"number",default:e.EDITOR_DEFAULTS.contribInfo.codeActionsOnSaveTimeout,description:"%editor.configuration.codeActionsOnSaveTimeout%"},"editor.codeActionsOnSaveNotification":{type:"boolean",default:!0,description:"%editor.configuration.codeActionsOnSaveNotification%"},"editor.selectionClipboard":{type:"boolean",default:e.EDITOR_DEFAULTS.contribInfo.selectionClipboard,description:"%editor.configuration.selectionClipboard%",included:n.isLinux},"editor.largeFileOptimizations":{type:"boolean",default:e.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%"},"diffEditor.renderIndicators":{type:"boolean",default:e.DIFF_EDITOR_DEFAULTS.renderIndicators,description:"%editor.configuration.renderIndicators%"},"diffEditor.minimap":{type:"boolean",default:e.DIFF_EDITOR_DEFAULTS.minimap},"diffEditor.experimental.stickyScroll.enabled":{type:"boolean",default:e.DIFF_EDITOR_DEFAULTS.experimental.stickyScroll.enable}},G={"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:e.EDITOR_FONT_DEFAULTS.fontFamily},"editor.fontSize":{type:"number",default:e.EDITOR_FONT_DEFAULTS.fontSize,minimum:6},"editor.tabSize":{type:"number",default:e.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:e.EDITOR_FONT_DEFAULTS.renderWhitespace},"editor.cursorStyle":{type:"string",enum:["line","block","block-outline","line-thin","underline","underline-thin"],default:e.EDITOR_FONT_DEFAULTS.cursorStyle},"editor.insertSpaces":{type:"boolean",default:e.EDITOR_FONT_DEFAULTS.insertSpace},"editor.wordWrap":{type:"string",enum:["off","on"],default:e.EDITOR_FONT_DEFAULTS.wordWrap},"editor.wordWrapColumn":{type:"number",default:e.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:e.DIFF_EDITOR_DEFAULTS.renderSideBySide,description:"%diffEditor.configuration.renderSideBySide%"},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:e.DIFF_EDITOR_DEFAULTS.ignoreTrimWhitespace,description:"%diffEditor.configuration.ignoreTrimWhitespace%"},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:e.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.enabled,description:"Controls whether the diff editor shows unchanged regions."},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:e.DIFF_EDITOR_DEFAULTS.hideUnchangedRegions.revealLineCount,description:"Controls how many lines are used for unchanged regions.",minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:e.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:e.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:e.DIFF_EDITOR_DEFAULTS.experimental.showMoves,description:"Controls whether the diff editor should show detected code moves."},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:e.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:e.DIFF_EDITOR_DEFAULTS.experimental.collapseUnchangedRegions,description:"Controls whether the diff editor shows unchanged regions."}};e.editorPreferenceSchema={type:"object",properties:Object.assign(Object.assign({},u),G)},e.EditorPreferences=Symbol("EditorPreference")},90915:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createEditorPreferenceProxy=void 0;const n=t(41869),a=t(24328);function o(c,g,u){return(0,n.createPreferenceProxy)(c,a.editorPreferenceSchema,{resourceUri:g,overrideIdentifier:u})}e.createEditorPreferenceProxy=o},53135:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GoToLineQuickOpenHandler=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(74404),g=n.__importStar(t(20868)),u=t(55979),G=t(82196);class p extends u.AbstractGotoLineQuickAccessProvider{clearDecorations(I){super.clearDecorations(I)}preview(I,r){I.revealRangeInCenter(r,g.editor.ScrollType.Smooth),this.addDecorations(I,r)}goTo(I,r,l=!0){this.gotoLocation({editor:I},{range:r,preserveFocus:l,keyMods:{alt:!1,ctrlCmd:!1}})}}let h=class{constructor(){this.prefix=":",this.description=(0,o.localize)("quickopen.goToLine.desc"),this.quickAccess=new p}getFirstSelection(){const I=this.workbenchEditorService.currentEditor,r=I?.getSelections();return r?.[0]}getRange(I=1,r=1){return{startLineNumber:I,endLineNumber:I,startColumn:r,endColumn:r}}init(){var I;this.savedViewState=(0,o.withNullAsUndefined)((I=this.workbenchEditorService.currentEditor)===null||I===void 0?void 0:I.monacoEditor.saveViewState())}getModel(){var I,r,l,s,d;const m=this.workbenchEditorService.currentEditor,v=this.getFirstSelection();if(!v||!m)return{onType:(Z,y)=>{y([new c.QuickOpenItem({label:(0,o.localize)("quickopen.goToLine.notValid"),run:()=>!1})])}};const f=(I=v.positionLineNumber)!==null&&I!==void 0?I:1,N=(r=v.positionColumn)!==null&&r!==void 0?r:1,W=(d=(s=(l=m.currentDocumentModel)===null||l===void 0?void 0:l.getMonacoModel())===null||s===void 0?void 0:s.getLineCount())!==null&&d!==void 0?d:1;return{onType:(Z,y)=>{const E=Z.split(/,|:|#|:|,/).map(w=>parseInt(w,10)).filter(w=>!isNaN(w)),R=E[0],A=E[1];if(R){let w=(0,o.formatLocalize)("quickopen.goToLine.lineInfo",R);A&&(w+=(0,o.formatLocalize)("quickopen.goToLine.colInfo",A));const F=this.getRange(R,A);y([new c.QuickOpenItem({label:w,run:V=>V===c.Mode.PREVIEW?(this.quickAccess.preview(m.monacoEditor,F),!1):(this.quickAccess.goTo(m.monacoEditor,F,!0),!0)})])}else this.quickAccess.clearDecorations(m.monacoEditor),y([new c.QuickOpenItem({label:(0,o.formatLocalize)("quickopen.goToLine.defaultMessage",f,N,W),run:()=>!1})])}}}getOptions(){return{}}onClose(I){const r=this.workbenchEditorService.currentEditor;r&&(r.monacoEditor.focus(),this.quickAccess.clearDecorations(r.monacoEditor),I&&this.savedViewState&&r.monacoEditor.restoreViewState(this.savedViewState))}};n.__decorate([(0,a.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],h.prototype,"quickOpenService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],h.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(G.WorkbenchEditorService),n.__metadata("design:type",G.WorkbenchEditorService)],h.prototype,"workbenchEditorService",void 0),h=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],h),e.GoToLineQuickOpenHandler=h},50236:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolInformationQuickOpenItem=e.WorkspaceSymbolQuickOpenHandler=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(97821),u=t(51500),G=t(48069),p=t(23418);let h=class extends g.QuickOpenBaseAction{constructor(){super({id:"workspace-symbol:splitToRight",tooltip:(0,c.localize)("quickOpen.openOnTheRightSide"),class:(0,o.getIcon)("embed")})}async run(s){await s.openSide()}};h=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],h);let b=class{hasActions(){return!0}getActions(){return[this.workspaceSymbolOpenSideActionOpen]}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",h)],b.prototype,"workspaceSymbolOpenSideActionOpen",void 0),b=n.__decorate([(0,a.Injectable)()],b);let I=class{constructor(){this.prefix="#",this.cancellationSource=new o.CancellationTokenSource}get description(){return(0,c.localize)("editor.workspaceSymbol.description")}getModel(){return{onType:(s,d)=>{if(s===""){d([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbol.search"),run:()=>!1})]);return}if(s==="#")return void d([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbolClass.search"),run:()=>!1})]);if(this.languageService.workspaceSymbolProviders.length===0){d([new o.QuickOpenItem({label:(0,c.localize)("editor.workspaceSymbol.notfound"),run:()=>!1})]);return}const m=s[0]==="#",v=[];this.cancellationSource.cancel();const f=new o.CancellationTokenSource;this.cancellationSource=f;const N={query:m?s.slice(1):s},W=this.reporterService.time(c.REPORT_NAME.QUICK_OPEN_MEASURE);Promise.all(this.languageService.workspaceSymbolProviders.map(async Z=>{let y=await Z.provideWorkspaceSymbols(N,f.token);if(m&&(y=y?.filter(E=>E.kind===G.SymbolKind.Class)),y&&y.length&&!f.token.isCancellationRequested){const E=await Promise.all(y.map(async R=>{const A=await this.workspaceService.asRelativePath(new o.URI(R.location.uri).parent);return new r(R,Z,this.workbenchEditorService,f.token,A?.path||"")}));v.push(...E),d(v,this.workspaceSymbolActionProvider)}return y})).catch(Z=>{this.logger.log(Z)}).finally(()=>{f.token.isCancellationRequested||(v.length||d([]),W.timeEnd(m?"class":"symbol",{lookFor:s,stat:{symbol:v.length}}))})}}}getOptions(){return{fuzzyMatchLabel:{enableSeparateSubstringMatching:!0},showItemsWithoutHighlight:!0,fuzzyMatchDescription:!1,getPlaceholderItem:(s,d)=>new o.QuickOpenItem({label:(0,c.localize)(d.startsWith("##")?"editor.workspaceSymbolClass.notfound":"editor.workspaceSymbol.notfound"),run:()=>!1})}}onClose(){this.cancellationSource.cancel()}onToggle(){this.cancellationSource.cancel()}};n.__decorate([(0,a.Autowired)(p.ILanguageService),n.__metadata("design:type",Object)],I.prototype,"languageService",void 0),n.__decorate([(0,a.Autowired)(u.IWorkspaceService),n.__metadata("design:type",Object)],I.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(c.ILogger),n.__metadata("design:type",Object)],I.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(p.WorkbenchEditorService),n.__metadata("design:type",p.WorkbenchEditorService)],I.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",b)],I.prototype,"workspaceSymbolActionProvider",void 0),n.__decorate([(0,a.Autowired)(c.IReporterService),n.__metadata("design:type",Object)],I.prototype,"reporterService",void 0),I=n.__decorate([(0,a.Injectable)()],I),e.WorkspaceSymbolQuickOpenHandler=I;class r extends o.QuickOpenItem{constructor(s,d,m,v,f){super({}),this.symbol=s,this.provider=d,this.workbenchEditorService=m,this.token=v,this.relativePath=f}getLabel(){return this.symbol.name}getUri(){return new o.URI(this.symbol.location.uri)}getIconClass(){return(0,o.getSymbolIcon)(this.symbol.kind)}getDescription(){const s=this.symbol.containerName;return`${s?`${s} \xB7 `:""}${decodeURIComponent(this.relativePath)}`}fromRange(s){if(!s)return;const{start:d,end:m}=s;return{startLineNumber:d.line+1,startColumn:d.character+1,endLineNumber:m.line+1,endColumn:m.character+1}}open(s,d){this.workbenchEditorService.open(s,{range:this.fromRange(d)})}run(s){const d=this.getUri();return s===o.QuickOpenMode.OPEN&&this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(m=>{m?this.open(d,m.location.range):this.open(d,this.symbol.location.range)}),!0}openSide(){const s=this.getUri();return this.provider.resolveWorkspaceSymbol(this.symbol,this.token).then(d=>{this.workbenchEditorService.open(s,{preview:!1,split:p.EditorGroupSplitAction.Right,range:this.fromRange(d?d.location.range:this.symbol.location.range),focus:!0})})}}e.SymbolInformationQuickOpenItem=r},80200:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceServiceImpl=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(43718),u=t(23418),{addElement:G}=g.arrays;let p=class extends c.WithEventBus{constructor(){super(),this.providers=[],this.resources=new Map,this.gettingResources=new Map,this.resourceDecoration=new Map,this.cachedProvider=new g.LRUMap(500,200),this.onRegisterResourceProviderEmitter=new g.Emitter,this.onRegisterResourceProvider=this.onRegisterResourceProviderEmitter.event,this.onUnregisterResourceProviderEmitter=new g.Emitter,this.onUnregisterResourceProvider=this.onUnregisterResourceProviderEmitter.event}onResourceNeedUpdateEvent(r){const l=r.payload;if(this.resources.has(l.toString())){const s=this.resources.get(l.toString());this.doGetResource(l).then(d=>{s&&(Object.assign(s?.resource,d?.resource),s.provider=d?.provider),this.eventBus.fire(new u.ResourceDidUpdateEvent(l))})}}onResourceDecorationNeedChangeEvent(r){this.getResourceDecoration(r.payload.uri);let l=!1;const s=this.resourceDecoration.get(r.payload.uri.toString())||{};new Set([...Object.keys(s),...Object.keys(r.payload.decoration)]).forEach(d=>{s[d]!==r.payload.decoration[d]&&(l=!0)}),l&&(Object.assign(this.resourceDecoration.get(r.payload.uri.toString()),r.payload.decoration),this.eventBus.fire(new u.ResourceDecorationChangeEvent(r.payload)))}getSupportedSchemes(){return Array.from(this.providers.values()).map(r=>r.scheme).filter(Boolean)}async getResource(r){if(!this.resources.has(r.toString())){const l=await this.doGetResource(r);if(!l)return null;const s={resource:(0,a.observable)(Object.assign({},l.resource)),provider:l.provider};this.resources.set(r.toString(),s)}return this.resources.get(r.toString()).resource}handlesUri(r){return!!this.calculateProvider(r)}async doGetResource(r){if(!this.gettingResources.has(r.toString())){const l=(async()=>{const s=this.calculateProvider(r);if(s){const d=await s.provideResource(r);return d.uri=r,{resource:d,provider:s}}else return this.logger.error("URI has no resource provider: "+r),null})();this.gettingResources.set(r.toString(),l),l.finally(()=>{this.gettingResources.delete(r.toString())})}return this.gettingResources.get(r.toString())}registerResourceProvider(r){this.onRegisterResourceProviderEmitter.fire(r);const l=new g.Disposable;return l.addDispose(G(this.providers,r)),l.addDispose({dispose:()=>{for(const s of this.resources.values())s.provider===r&&(s.provider=b,this.onUnregisterResourceProviderEmitter.fire(r));this.cachedProvider.clear()}}),this.cachedProvider.clear(),l}async shouldCloseResource(r,l){const s=this.getProvider(r.uri);return!s||!s.shouldCloseResource?!0:await s.shouldCloseResource(r,l)}async shouldCloseResourceWithoutConfirm(r){const l=this.getProvider(r.uri);return l&&l.shouldCloseResourceWithoutConfirm?await l.shouldCloseResourceWithoutConfirm(r):!1}async close(r,l){const s=this.getProvider(r.uri);return!s||!s.close?!0:await s.close(r,l)}calculateProvider(r){if(this.cachedProvider.has(r.toString()))return this.cachedProvider.get(r.toString());let l,s={weight:-1,index:-1};function d(m,v,f){s={weight:v,index:f},l=m}return this.providers.forEach((m,v)=>{let f=-1;m.handlesUri?f=m.handlesUri(r):m.scheme&&(f=m.scheme===r.scheme?10:-1),f>=0&&(f>s.weight||f===s.weight&&v>s.index)&&d(m,f,v)}),this.cachedProvider.set(r.toString(),l),l}getProvider(r){const l=this.resources.get(r.toString());if(l)return l.provider}getResourceDecoration(r){return this.resourceDecoration.has(r.toString())||this.resourceDecoration.set(r.toString(),(0,a.observable)(h)),this.resourceDecoration.get(r.toString())}getResourceSubname(r,l){const s=this.getProvider(r.uri);return s&&s.provideResourceSubname?s.provideResourceSubname(r,l):null}disposeResource(r){const l=this.getProvider(r.uri);if(this.resources.delete(r.uri.toString()),this.resourceDecoration.delete(r.uri.toString()),!(!l||!l.onDisposeResource))return l.onDisposeResource(r)}};n.__decorate([(0,o.Autowired)(g.ILogger),n.__metadata("design:type",Object)],p.prototype,"logger",void 0),n.__decorate([(0,c.OnEvent)(u.ResourceNeedUpdateEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.ResourceNeedUpdateEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceNeedUpdateEvent",null),n.__decorate([(0,c.OnEvent)(u.ResourceDecorationNeedChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.ResourceDecorationNeedChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onResourceDecorationNeedChangeEvent",null),p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.ResourceServiceImpl=p;const h={dirty:!1,readOnly:!1},b={handlesUri:()=>-1,provideResource:I=>({uri:I,name:"",icon:""})}},52795:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorActions=e.Tabs=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(25918),u=t(1149),G=t(63373),p=t(93899),h=t(48560),b=t(43718),I=t(23418),r=t(19352),l=n.__importDefault(t(62711)),s=t(78680),d=t(82196),m=t(50674),v=t(72570).UU,f=({group:W})=>{const Z=(0,o.useRef)(),y=(0,o.useRef)(),E=(0,o.useRef)(),R=(0,o.useRef)(null),A=(0,o.useRef)(null),w=(0,h.useInjectable)(I.ResourceService),F=(0,h.useInjectable)(c.IEventBus),V=(0,o.useContext)(c.ConfigContext),Y=(0,h.useInjectable)(I.WorkbenchEditorService),_=(0,h.useInjectable)(s.TabTitleMenuService),H=(0,h.useInjectable)(c.PreferenceService),X=(0,h.useInjectable)(p.IMenuRegistry),S=(0,h.useInjectable)(d.IEditorTabService),Q=(0,h.useInjectable)(u.LayoutViewSizeConfig),O=(0,h.useInjectable)(c.ComponentRegistry),M=(0,c.useDesignStyles)(l.default.tab_right,"tab_right"),T=(0,c.useDesignStyles)(l.default.close_tab,"close_tab"),B=(0,c.useDesignStyles)(l.default.kt_editor_close_icon,"kt_editor_close_icon"),x=(0,c.useDesignStyles)(l.default.kt_editor_tabs_content,"kt_editor_tabs_content"),D=(0,c.useDesignStyles)(l.default.kt_editor_tabs_current_last,"kt_editor_tabs_current_last"),J=(0,c.useDesignStyles)(l.default.kt_editor_tab,"kt_editor_tab"),k=(0,c.useDesignStyles)(l.default.kt_editor_tab_current_prev,"kt_editor_tab_current_prev"),z=(0,c.useDesignStyles)(l.default.kt_editor_tab_current_next,"kt_editor_tab_current_next"),P=(0,c.useDesignStyles)(l.default.kt_editor_tab_current,"kt_editor_tab_current"),U=(0,c.useDesignStyles)(l.default.kt_editor_tab_dirty,"kt_editor_tab_dirty"),ne=(0,c.useDesignStyles)(l.default.kt_editor_tabs,"kt_editor_tabs"),re=(0,c.useDesignStyles)(l.default.kt_editor_tabs_scroll_wrapper,"kt_editor_tabs_scroll_wrapper"),[ae,ue]=(0,o.useState)({}),[$,pe]=(0,o.useState)(!!H.get("editor.wrapTab")),[ge,q]=(0,o.useState)(new Map),[le,ie]=(0,o.useState)(),he=(0,o.useMemo)(()=>(0,c.getSlotLocation)(v,V.layoutConfig),[]),ee=o.default.useMemo(()=>{var Ze,Ee;const Ve=(Ee=(Ze=O.getComponentRegistryInfo(I.TabbarRightExtraContentId))===null||Ze===void 0?void 0:Ze.views)===null||Ee===void 0?void 0:Ee[0];if(Ve)return Ve},[]);(0,m.useUpdateOnGroupTabChange)(W),(0,h.useUpdateOnEventBusEvent)(I.ResourceDidUpdateEvent,[W.resources],Ze=>!!E&&W.resources.findIndex(Ee=>Ee.uri.isEqual(Ze))!==-1),(0,o.useEffect)(()=>{const Ze=new c.Disposable;return Ze.addDispose(W.onDidEditorGroupContentLoading(Ee=>{var Ve;(Ve=W.resourceStatus.get(Ee))===null||Ve===void 0||Ve.finally(()=>{ue(Object.assign({},ae,{[Ee.uri.toString()]:!1}))}),ue(Object.assign({},ae,{[Ee.uri.toString()]:!0}))})),Ze.addDispose(W.onDidEditorGroupTabChanged(()=>{$||te()})),()=>{Ze.dispose()}},[W]);const j=(0,o.useCallback)((Ze,Ee,Ve)=>{if(Ze.dataTransfer.getData("uri")){const Ce=new c.URI(Ze.dataTransfer.getData("uri"));let Te;Ze.dataTransfer.getData("uri-source-group")&&(Te=Y.getEditorGroup(Ze.dataTransfer.getData("uri-source-group"))),W.dropUri(Ce,d.DragOverPosition.CENTER,Te,Ve)}Ze.dataTransfer.files.length>0&&F.fire(new d.EditorGroupFileDropEvent({group:W,tabIndex:Ee,files:Ze.dataTransfer.files}))},[W]),te=(0,o.useCallback)(()=>{c.fastdom.measure(()=>{try{if(Z.current&&W.currentResource){const Ze=Z.current.querySelector("."+l.default.kt_editor_tab+"[data-uri='"+W.currentResource.uri.toString()+"']");Ze&&Ze.scrollIntoView({block:"nearest",inline:"nearest"})}}catch{}})},[W,Z.current]),oe=(0,o.useCallback)(()=>{R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{c.fastdom.measure(()=>{var Ze;const Ee=(Ze=A.current)===null||Ze===void 0?void 0:Ze.offsetWidth;Ee!==le&&ie(Ee)})},200)},[A.current,R.current,le]);(0,o.useEffect)(()=>{$||queueMicrotask(()=>{te()})},[$,Z.current]),(0,o.useEffect)(()=>{if(!$){const Ze=new c.Disposable;return Z.current&&Ze.addDispose(new c.DomListener(Z.current,"mousewheel",N)),Ze.addDispose(F.onDirective(c.ResizeEvent.createDirective(he),()=>{te()})),Ze.addDispose(F.onDirective(d.GridResizeEvent.createDirective(W.grid.uid),()=>{te()})),()=>{Ze.dispose()}}},[$]);const ce=(0,o.useCallback)(()=>{c.fastdom.measureAtNextFrame(()=>{if(E.current&&$){const Ze=new Map;let Ee,Ve;const Ce=Array.from(E.current.children);Ce.pop(),Ce.forEach(Te=>{Te.offsetTop!==Ee&&(Ee=Te.offsetTop,Ve&&Ze.set(Ce.indexOf(Ve),!0)),Ve=Te,Ze.set(Ce.indexOf(Te),!1)}),q(Ze)}})},[E.current,$]);(0,o.useEffect)(()=>{oe()},[A.current,$]),(0,o.useEffect)(ce,[$,E.current,W,W.resources.length]),(0,o.useEffect)(()=>{const Ze=new c.DisposableCollection;return Ze.push(F.onDirective(c.ResizeEvent.createDirective(he),()=>{ce()})),Ze.push(H.onPreferenceChanged(Ee=>{Ee.preferenceName==="editor.wrapTab"&&pe(!!Ee.newValue)})),Ze.push(Y.onDidCurrentEditorGroupChanged(()=>{oe()})),Ze.push(c.Event.debounce(c.Event.filter(X.onDidChangeMenu,Ee=>Ee===p.MenuId.EditorTitle),()=>{},200)(()=>{oe()})),()=>{Ze.dispose()}},[]),(0,o.useEffect)(()=>{const Ze=new c.DisposableCollection;return Ze.push(W.onDidEditorFocusChange(Ee=>{oe()})),()=>{Ze.dispose()}},[W]);const Ie=(0,o.useCallback)(Ze=>{Ze.preventDefault(),Ze.stopPropagation(),y.current&&y.current.classList.add(l.default.kt_on_drag_over)},[y.current]),Ge=(0,o.useCallback)(Ze=>{y.current&&y.current.classList.remove(l.default.kt_on_drag_over)},[y.current]),se=(0,o.useCallback)(Ze=>{y.current&&y.current.classList.remove(l.default.kt_on_drag_over),j&&j(Ze,-1)},[j,y.current]),me=(0,o.useCallback)(Ze=>{Ze.target===Ze.currentTarget&&Y.createUntitledResource()},[Y]),ve=o.default.useCallback((Ze,Ee)=>{const Ve=w.getResourceDecoration(Ze.uri),Ce=w.getResourceSubname(Ze,W.resources);return S.renderEditorTab(o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:ae[Ze.uri.toString()]?"loading_indicator":(0,a.default)(Ze.icon)}," "),o.default.createElement("div",{tabIndex:0,role:"tab","aria-selected":Ee?"true":"false"},Ze.name),Ce?o.default.createElement("div",{className:l.default.subname},Ce):null,Ve.readOnly?o.default.createElement("span",{className:(0,a.default)((0,c.getExternalIcon)("lock"),l.default.editor_readonly_icon)}):null,o.default.createElement("div",{className:M},o.default.createElement("div",{className:(0,a.default)({[l.default.kt_hidden]:!Ve.dirty,[l.default.dirty]:!0})}),o.default.createElement("div",{className:T,onMouseDown:Te=>{Te.stopPropagation(),W.close(Ze.uri)}},S.renderTabCloseComponent(o.default.createElement("div",{className:(0,a.default)((0,c.getIcon)("close"),B),tabIndex:0,role:"button","aria-label":(0,b.formatLocalize)("editor.closeTab.title",Ze.name)}))))),Ee)},[S]),We=()=>{const Ze=W.resources.length===0,Ee=W.resources.findIndex(Ve=>W.currentResource===Ve);return o.default.createElement("div",{draggable:!1,className:(0,a.default)({[x]:!0,[l.default.kt_editor_tabs_content_empty]:Ze,[D]:Ee===W.resources.length-1}),ref:E,role:"tablist"},W.resources.map((Ve,Ce)=>{let Te;const He=w.getResourceDecoration(Ve.uri);return o.default.createElement("div",{draggable:!0,title:Ve.title,className:(0,a.default)({[J]:!0,[l.default.last_in_row]:ge.get(Ce),[k]:Ee-1===Ce,[z]:Ee+1===Ce,[P]:W.currentResource===Ve,[l.default.kt_editor_tab_preview]:W.previewURI&&W.previewURI.isEqual(Ve.uri),[U]:He.dirty}),style:$&&Ce===W.resources.length-1?{marginRight:le,height:Q.editorTabsHeight}:{height:Q.editorTabsHeight},onContextMenu:xe=>{_.show(xe.nativeEvent.x,xe.nativeEvent.y,Ve&&Ve.uri,W),xe.preventDefault()},key:Ve.uri.toString(),onMouseUp:xe=>{xe.nativeEvent.button===c.MouseEventButton.Middle&&(xe.preventDefault(),xe.stopPropagation(),W.close(Ve.uri))},onMouseDown:xe=>{xe.nativeEvent.button===c.MouseEventButton.Left&&W.open(Ve.uri,{focus:!0})},"data-uri":Ve.uri.toString(),onDragOver:xe=>{xe.preventDefault(),xe.stopPropagation(),Te&&Te.classList.add(l.default.kt_on_drag_over)},onDragLeave:xe=>{Te&&Te.classList.remove(l.default.kt_on_drag_over)},onDrop:xe=>{Te&&Te.classList.remove(l.default.kt_on_drag_over),j&&j(xe,Ce,Ve)},onDoubleClick:xe=>{W.pinPreviewed(Ve.uri)},ref:xe=>Te=xe,onDragStart:xe=>{xe.dataTransfer.setData("uri",Ve.uri.toString()),xe.dataTransfer.setData("uri-source-group",W.name)}},ve(Ve,W.currentResource===Ve))}))};return o.default.createElement("div",{id:G.VIEW_CONTAINERS.EDITOR_TABS,className:ne},o.default.createElement("div",{className:re,ref:y,onDragOver:Ie,onDragLeave:Ge,onDrop:se,onDoubleClick:me},$?o.default.createElement("div",{className:l.default.kt_editor_wrap_container},We()):o.default.createElement(r.Scroll,{forwardedRef:Ze=>Ze?Z.current=Ze:null,className:l.default.kt_editor_tabs_scroll},We())),o.default.createElement(e.EditorActions,{className:(0,a.default)({[l.default.kt_editor_wrap_mode_action]:$}),ref:A,group:W}),(0,c.renderView)(ee))};e.Tabs=f,e.EditorActions=(0,o.forwardRef)((W,Z)=>{const y=(0,c.useDesignStyles)(l.default.editor_actions,"editor_actions"),{group:E,className:R}=W,A=(0,o.useCallback)(()=>{var O,M;return E.currentResource?[E.currentResource.uri,E,((O=E.currentOrPreviousFocusedEditor)===null||O===void 0?void 0:O.currentUri)||((M=E.currentEditor)===null||M===void 0?void 0:M.currentUri)]:void 0},[E]),w=(0,h.useInjectable)(d.IEditorActionRegistry),F=(0,h.useInjectable)(I.WorkbenchEditorService),V=(0,h.useInjectable)(u.LayoutViewSizeConfig),Y=w.getMenu(E),[_,H]=(0,o.useState)(F.currentEditorGroup===E),[X,S]=(0,o.useState)(A()),Q=Y.getMergedMenuNodes().length===0;return(0,o.useEffect)(()=>{const O=new c.DisposableCollection;return O.push(F.onDidCurrentEditorGroupChanged(()=>{H(F.currentEditorGroup===E)})),O.push(F.onActiveResourceChange(()=>{S(A())})),O.push(E.onDidEditorGroupTabChanged(()=>{S(A())})),()=>{O.dispose()}},[E]),o.default.createElement("div",{ref:Z,className:(0,a.default)(y,R,{[l.default.editor_actions_no_actions]:Q}),style:{height:V.editorTabsHeight}},o.default.createElement(g.InlineMenuBar,{menus:Y,context:X,regroup:(O,M)=>_?[O,M]:[[],M]}))});function N(W){(this.offsetWidth+this.scrollLeft+W.deltaX>this.scrollWidth||this.scrollLeft+W.deltaX<0)&&W.preventDefault()}},82196:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorTabService=e.ResoucesOfActiveComponentChangedEvent=e.CodeEditorDidVisibleEvent=e.EditorComponentDisposeEvent=e.ResourceOpenTypeChangedEvent=e.IEditorFeatureRegistry=e.IBreadCrumbService=e.CompareResult=e.ICompareService=e.IEditorActionRegistry=e.EditorDecorationTypeRemovedEvent=e.EditorDecorationChangeEvent=e.EditorDecorationProviderRegistrationEvent=e.RegisterEditorSideComponentEvent=e.EditorGroupsResetSizeEvent=e.EditorGroupIndexChangedEvent=e.EditorConfigurationChangedEvent=e.EditorVisibleChangeEvent=e.EditorSelectionChangeEvent=e.IEditorDecorationCollectionService=e.EditorGroupFileDropEvent=e.EditorActiveResourceStateChangedEvent=e.EditorGroupChangeEvent=e.EditorGroupDisposeEvent=e.EditorGroupCloseEvent=e.EditorGroupOpenEvent=e.GridResizeEvent=e.BrowserEditorContribution=e.EditorComponentRegistry=e.RegisterEditorComponentEvent=e.RegisterEditorComponentResolverEvent=e.EditorComponentRenderMode=void 0;const n=t(85608),a=t(41869);n.__exportStar(t(23418),e);var o;(function(V){V[V.ONE_PER_RESOURCE=1]="ONE_PER_RESOURCE",V[V.ONE_PER_GROUP=2]="ONE_PER_GROUP",V[V.ONE_PER_WORKBENCH=3]="ONE_PER_WORKBENCH"})(o=e.EditorComponentRenderMode||(e.EditorComponentRenderMode={}));class c extends a.BasicEvent{}e.RegisterEditorComponentResolverEvent=c;class g extends a.BasicEvent{}e.RegisterEditorComponentEvent=g;class u{}e.EditorComponentRegistry=u,e.BrowserEditorContribution=Symbol("BrowserEditorContribution");class G extends a.BasicEvent{static createDirective(Y){return`grid-resize-${Y}`}}e.GridResizeEvent=G;class p extends a.BasicEvent{}e.EditorGroupOpenEvent=p;class h extends a.BasicEvent{}e.EditorGroupCloseEvent=h;class b extends a.BasicEvent{}e.EditorGroupDisposeEvent=b;class I extends a.BasicEvent{}e.EditorGroupChangeEvent=I;class r extends a.BasicEvent{}e.EditorActiveResourceStateChangedEvent=r;class l extends a.BasicEvent{}e.EditorGroupFileDropEvent=l,e.IEditorDecorationCollectionService=Symbol("IEditorDecorationCollectionService");class s extends a.BasicEvent{}e.EditorSelectionChangeEvent=s;class d extends a.BasicEvent{}e.EditorVisibleChangeEvent=d;class m extends a.BasicEvent{}e.EditorConfigurationChangedEvent=m;class v extends a.BasicEvent{}e.EditorGroupIndexChangedEvent=v;class f extends a.BasicEvent{}e.EditorGroupsResetSizeEvent=f;class N extends a.BasicEvent{}e.RegisterEditorSideComponentEvent=N;class W extends a.BasicEvent{}e.EditorDecorationProviderRegistrationEvent=W;class Z extends a.BasicEvent{}e.EditorDecorationChangeEvent=Z;class y extends a.BasicEvent{}e.EditorDecorationTypeRemovedEvent=y,e.IEditorActionRegistry=Symbol("IEditorActionRegistry"),e.ICompareService=Symbol("ICompareService");var E;(function(V){V.revert="revert",V.accept="accept",V.cancel="cancel"})(E=e.CompareResult||(e.CompareResult={})),e.IBreadCrumbService=Symbol("IBreadScrumbService"),e.IEditorFeatureRegistry=Symbol("IEditorFeatureRegistry");class R extends a.BasicEvent{}e.ResourceOpenTypeChangedEvent=R;class A extends a.BasicEvent{}e.EditorComponentDisposeEvent=A;class w extends a.BasicEvent{}e.CodeEditorDidVisibleEvent=w;class F extends a.BasicEvent{}e.ResoucesOfActiveComponentChangedEvent=F,e.IEditorTabService=Symbol("IEditorTabService")},17878:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledSchemeResourceProvider=e.UntitledSchemeDocumentProvider=e.UntitledDocumentIdCounter=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(72665),g=t(23418),u=t(96689);let G=class{constructor(){this._id=1}get id(){return this._id++}};G=n.__decorate([(0,a.Injectable)()],G),e.UntitledDocumentIdCounter=G;let p=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(I){return I===o.Schemes.untitled}async provideEncoding(I){return this.preferenceService.get("files.encoding",void 0,I.toString(),(0,o.getLanguageIdFromMonaco)(I))||"utf8"}async provideEOL(I){const r=await this.applicationService.getBackendOS(),l=this.preferenceService.get("files.eol","auto",I.toString(),(0,o.getLanguageIdFromMonaco)(I));return l!=="auto"?l:r===o.OperatingSystem.Windows?`\r
|
|
28074
28074
|
`:`
|
|
28075
|
-
`}async provideEditorDocumentModelContent(I,r){return""}isReadonly(I){return!1}isAlwaysDirty(I){return!0}disposeEvenDirty(I){return!0}closeAutoSave(I){return!0}async saveDocumentModel(I,r,l,s,d,m=!1){const{name:v}=I.getParsedQuery(),f=I.path.toString()!=="/"?o.path.dirname(I.path.toString()):this.appConfig.workspaceDir,N=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:v||I.displayName,defaultUri:o.URI.file(o.isWindows?f.replaceAll("\\","/"):f)});return N&&(await this.editorDocumentModelService.saveEditorDocumentModel(N,r,l,s,d,m),await this.workbenchEditorService.open(N,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:o.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};n.__decorate([(0,a.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,a.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],p.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],p.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],p.prototype,"applicationService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),p=n.__decorate([(0,a.Injectable)()],p),e.UntitledSchemeDocumentProvider=p;let h=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=o.Schemes.untitled}provideResource(I){const{name:r}=I.getParsedQuery();return{name:r||I.displayName,uri:I,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(I){const r=this.documentModelService.getModelDescription(I.uri,"close-resource-check");return!!(r&&r.dirty)}async close(I,r){const l=this.documentModelService.getModelReference(I.uri,"close-resource-check");if(!l)return!1;if(r===g.AskSaveResult.SAVE){const s=await l.instance.save();return l.dispose(),s}else return r===g.AskSaveResult.REVERT?(await l.instance.revert(),l.dispose(),!0):!r||r===g.AskSaveResult.CANCEL?(l.dispose(),!1):(l.dispose(),!0)}async shouldCloseResource(I){const r=this.documentModelService.getModelDescription(I.uri,"close-resource-check");if(!r||!r.dirty)return!0;const l={[(0,o.localize)("file.prompt.dontSave","Don't Save")]:g.AskSaveResult.REVERT,[(0,o.localize)("file.prompt.save","Save")]:g.AskSaveResult.SAVE,[(0,o.localize)("file.prompt.cancel","Cancel")]:g.AskSaveResult.CANCEL},s=await this.dialogService.open((0,o.formatLocalize)("saveChangesMessage",I.name),o.MessageType.Info,Object.keys(l));return await this.close(I,l[s])}};n.__decorate([(0,a.Autowired)(c.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,a.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],h.prototype,"documentModelService",void 0),h=n.__decorate([(0,a.Injectable)()],h),e.UntitledSchemeResourceProvider=h},33835:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditor=void 0;const a=t(85608).__importDefault(t(14041)),o=t(41869),c=t(23418),g=t(96689),u=G=>{const p=a.default.useRef(),h=(0,o.useInjectable)(c.EditorCollectionService),b=(0,o.useInjectable)(g.IEditorDocumentModelService),[I,r]=a.default.useState(void 0),[l,s]=a.default.useState(void 0),[d,m]=a.default.useState(void 0),[v,f]=a.default.useState(void 0);let N=!1;return a.default.useEffect(()=>{if(p.current){I&&I.dispose();const W=h.createCodeEditor(p.current,Object.assign({automaticLayout:!0},G.options));r(W),l&&W.open(l)}return()=>{N=!0,I&&I.dispose(),l&&l.dispose()}},[p.current]),G&&I&&G.editorRef&&G.editorRef(I),d&&v!==d&&(f(d),b.createModelReference(new o.URI(d),"editor-react-component").then(W=>{l&&l.dispose(),!N&&W.instance.uri.toString()===d?s(W):W.dispose()})),l&&I&&I.currentDocumentModel!==l.instance&&I.open(l),G.uri&&G.uri.toString()!==d&&m(G.uri.toString()),a.default.createElement("div",Object.assign({ref:W=>W&&(p.current=W)},G))};e.CodeEditor=u},50674:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useUpdateOnGroupTabChange=void 0;const n=t(41869);function a(o){return(0,n.useUpdateOnEvent)(o.onDidEditorGroupTabChanged,[o])}e.useUpdateOnGroupTabChange=a},6670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorSuggestWidgetContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(38144);let u=class{contribute(p){const h=new o.DisposableCollection,b=p.monacoEditor.getContribution(g.SuggestController.ID);if(b&&b.widget&&b.widget.value){const I=b.widget.value;h.push(I.onDidSelect(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:r}))})),h.push(I.onDidHide(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:r}))})),h.push(I.onDidShow(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:r}))})),h.push(I.onDidFocus(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:r}))})),I&&I._setDetailsVisible&&I._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return h}};n.__decorate([(0,a.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],u.prototype,"eventBus",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],u.prototype,"preferenceService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.EditorSuggestWidgetContribution=u},67903:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTopPaddingContribution=void 0;class t{contribute(a){return a.monacoEditor.onDidChangeModel(()=>{a.monacoEditor.changeViewZones(o=>{o.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})})})}}e.EditorTopPaddingContribution=t},51553:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroup=e.WorkbenchEditorServiceImpl=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(91830),u=t(75524),G=t(43718),p=n.__importStar(t(20868)),h=t(72665),b=t(23418),I=t(96689),r=t(76759),l=t(47049),s=t(82196),d=t(17878),m=10,v=y=>!!(y.supportsRevive&&!y.deleted);let f=class extends G.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new G.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new G.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new G.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new G.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new G.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new G.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new G.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.editorGroupIdGen=0,this.initialize()}setEditorContextKeyService(E){this.editorContextKeyService=E}setCurrentGroup(E){var R;if(E){if(this._currentEditorGroup===E)return;this._currentEditorGroup=E,this._onActiveResourceChange.fire(E.currentResource),this.eventBus.fire(new s.EditorActiveResourceStateChangedEvent({resource:E.currentResource,openType:E.currentOpenType,editorUri:(R=this.currentEditor)===null||R===void 0?void 0:R.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(E){var R;E.payload.group===this.currentEditorGroup&&this.eventBus.fire(new s.EditorActiveResourceStateChangedEvent({resource:E.payload.newResource,openType:E.payload.newOpenType,editorUri:(R=this.currentEditor)===null||R===void 0?void 0:R.currentUri}))}getAllOpenedUris(){const E=[];for(const R of this.editorGroups)for(const A of R.resources)E.findIndex(F=>F.isEqual(A.uri))===-1&&E.push(A.uri);return E}async getAllOpenedDocuments(){const E=[];for(const R of this.editorGroups)for(const A of R.resources){if(A.uri.scheme!=="file")continue;if(E.findIndex(F=>F.uri.isEqual(A.uri))===-1){const F=await R.getDocumentModelRef(A.uri);F&&E.push(F.instance)}}return E}async saveAll(E,R){for(const A of this.editorGroups)await A.saveAll(E,R)}hasDirty(){for(const E of this.editorGroups)if(E.hasDirty())return!0;return!1}calcDirtyCount(){const E=new Set;return this.editorGroups.reduce((R,A)=>R+A.calcDirtyCount(E),0)}createEditorGroup(){const E=this.injector.get(N,[this.generateRandomEditorGroupName(),this.editorGroupIdGen++]);this.editorGroups.push(E);const R=new G.Disposable(E.onDidEditorGroupBodyChanged(()=>{E===this.currentEditorGroup&&(!E.currentOpenType&&E.currentResource||this._onActiveResourceChange.fire(E.currentResource))}),E.onDidEditorFocusChange(()=>{var w;E===this.currentEditorGroup&&(!E.currentOpenType&&E.currentResource||this._onActiveEditorUriChange.fire((w=E.currentOrPreviousFocusedEditor)===null||w===void 0?void 0:w.currentUri))}));E.addDispose({dispose:()=>{R.dispose()}});const A=E.onDidEditorGroupTabChanged(()=>{this.saveOpenedResourceState()});return E.addDispose({dispose:()=>{A.dispose()}}),E.onCurrentEditorCursorChange(w=>{this._currentEditorGroup===E&&this._onCursorChange.fire(w)}),E}generateRandomEditorGroupName(){let E=(0,G.makeRandomHexString)(5);for(;this.editorGroups.findIndex(R=>R.name===E)!==-1;)E=(0,G.makeRandomHexString)(5);return E}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(G.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(E,R){await this.initialize();let A=this.currentEditorGroup,w;if(R&&typeof R.groupIndex<"u"?w=R.groupIndex:R&&R.relativeGroupIndex&&(w=this.currentEditorGroup.index+R.relativeGroupIndex),typeof w=="number"&&w>=0){if(w>=this.editorGroups.length)return A.open(E,Object.assign({},R,{split:b.EditorGroupSplitAction.Right}));A=this.sortedEditorGroups[w]||this.currentEditorGroup}return A.open(E,R)}async openUris(E){await this.initialize(),await this.currentEditorGroup.openUris(E)}getEditorGroup(E){return this.editorGroups.find(R=>R.name===E)}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(E){const R=this.editorGroups.findIndex(A=>A===E);if(R!==-1){if(this.editorGroups.length===1)return;this.editorGroups.splice(R,1),this.currentEditorGroup===E&&this.setCurrentGroup(this.editorGroups[0]);for(let A=R;A<this.editorGroups.length;A++)this.eventBus.fire(new s.EditorGroupIndexChangedEvent({group:this.editorGroups[A],index:A}))}}async saveOpenedResourceState(){if(this._restoring)return;const E=this.topGrid.serialize();await this.openedResourceState.set("grid",E)}prepareContextKeyService(){const E=A=>{let w=null;const F=this.documentModelManager.getModelDescription(A,"resourceContextKey");return F&&(w=F.languageId),w},R=new g.ResourceContextKey(this.editorContextKeyService,A=>{const w=E(A);return w||E(A)});this.onActiveResourceChange(A=>{this.currentEditor&&this.currentEditor.currentUri?R.set(this.currentEditor.currentUri):A?R.set(A.uri):R.reset()}),this.currentEditor&&this.currentEditor.currentUri?R.set(this.currentEditor.currentUri):this.currentResource?R.set(this.currentResource.uri):R.reset()}onDomCreated(E){this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(E)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let E={editorGroup:{uris:[],previewIndex:-1}};this.appConfig.disableRestoreEditorGroupState||(E=this.openedResourceState.get("grid",E)),this.topGrid=new l.EditorGrid,this.addDispose(this.topGrid),this.addDispose(this.topGrid.onDidGridAndDesendantStateChange(()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const R=[],A=this.topGrid.deserialize(E,()=>this.createEditorGroup(),R).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(R).then(()=>{this._restoring=!1;for(const w of this.contributions.getContributions())w.onDidRestoreState&&w.onDidRestoreState()}),A}async closeAll(E,R){for(const A of this.editorGroups.slice(0))E?await A.close(E,{force:R}):await A.closeAll()}async closeAllOnlyConfirmOnce(){const E=[];for(const H of this.editorGroups)for(const X of H.resources)E.push(X);const A=(await Promise.all(E.map(async H=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(H),resource:H})))).filter(H=>H.shouldClose);if(A.length===0)return!1;const w={[(0,G.localize)("file.prompt.dontSave","Don't Save")]:s.AskSaveResult.REVERT,[(0,G.localize)("file.prompt.save","Save")]:s.AskSaveResult.SAVE,[(0,G.localize)("file.prompt.cancel","Cancel")]:s.AskSaveResult.CANCEL};let V=A.slice(0,m).map(H=>H.resource.name).join("\u3001");A.length>m&&(A.length-m===1?V+=(0,G.localize)("file.prompt.more.one"):V+=(0,G.formatLocalize)("file.prompt.more.number",A.length-m));const Y=await this.dialogService.open((0,c.toMarkdown)((0,G.formatLocalize)("saveNFilesChangesMessage",A.length,V),this.openner),G.MessageType.Info,Object.keys(w)),_=w[Y];return _===s.AskSaveResult.SAVE?(await Promise.all(A.map(H=>{var X,S;return(S=(X=this.resourceService).close)===null||S===void 0?void 0:S.call(X,H.resource,s.AskSaveResult.SAVE)})),!1):_===s.AskSaveResult.REVERT?(await Promise.all(A.map(H=>{var X,S;return(S=(X=this.resourceService).close)===null||S===void 0?void 0:S.call(X,H.resource,s.AskSaveResult.REVERT)})),!1):!0}async close(E,R){return this.closeAll(E,R)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(E){if(E.payload.resource.uri.scheme===G.Schemes.untitled){const{index:R}=E.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(R,10)),this.untitledCloseIndex.sort((A,w)=>A-w)}}createUntitledURI(){const E=this.untitledCloseIndex.shift()||this.untitledIndex.id;return new G.URI().withScheme(G.Schemes.untitled).withQuery(`name=Untitled-${E}&index=${E}`)}createUntitledResource(E={uri:this.createUntitledURI()}){return this.open(E.uri,Object.assign({preview:!1,focus:!0},E.resourceOpenOptions))}};n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(b.ResourceService),n.__metadata("design:type",b.ResourceService)],f.prototype,"resourceService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(G.StorageProvider),n.__metadata("design:type",Function)],f.prototype,"getStorage",void 0),n.__decorate([(0,o.Autowired)(h.IDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],f.prototype,"openner",void 0),n.__decorate([(0,o.Autowired)(s.BrowserEditorContribution),n.__metadata("design:type",Object)],f.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"documentModelManager",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",d.UntitledDocumentIdCounter)],f.prototype,"untitledIndex",void 0),n.__decorate([(0,G.OnEvent)(s.EditorGroupChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.EditorGroupChangeEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorGroupChangeEvent",null),n.__decorate([(0,G.OnEvent)(s.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"handleOnCloseUntitledResource",null),f=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],f),e.WorkbenchEditorServiceImpl=f;let N=class extends G.WithEventBus{constructor(E,R){super(),this.name=E,this.groupId=R,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new G.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new G.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupTabOperation=new G.Emitter,this.onDidEditorGroupTabOperation=this._onDidEditorGroupTabOperation.event,this._onDidEditorGroupBodyChanged=new G.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new G.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 G.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 G.ReadyEvent,this.diffEditorReady=new G.ReadyEvent,this.diffEditorDomReady=new G.ReadyEvent,this.mergeEditorReady=new G.ReadyEvent,this.mergeEditorDomReady=new G.ReadyEvent,this._restoringState=!1,this.eventBus.onDirective(c.ResizeEvent.createDirective((0,c.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)),()=>{this.doLayoutEditors()}),this.eventBus.on(s.GridResizeEvent,A=>{A.payload.gridId===this.grid.uid&&this.doLayoutEditors()}),this.eventBus.on(s.EditorComponentDisposeEvent,A=>{this.activeComponents.delete(A.payload),this.activateComponentsProps.delete(A.payload)}),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged(E=>{E.preferenceName==="explorer.autoReveal"&&(this.explorerAutoRevealConfig=E.newValue)}))}attachDiffEditorDom(E){this._diffEditorDomNodeAttached||(this._diffEditorDomNode=E,this.diffEditorDomReady.ready(),this._diffEditorDomNodeAttached=!0)}attachMergeEditorDom(E){this._mergeEditorDomNodeAttached||(this._mergeEditorDomNode=E,this.mergeEditorDomReady.ready(),this._mergeEditorDomNodeAttached=!0)}attachToDom(E){this._domNode=E,E&&(this.contextKeyService.attachToDomNode(E),this.layoutEditors())}layoutEditors(){c.fastdom.measure(()=>{if(this._domNode){const E=this._domNode.offsetWidth,R=this._domNode.offsetHeight;(E!==this._prevDomWidth||R!==this._prevDomHeight)&&this.doLayoutEditors(),this._prevDomWidth=E,this._prevDomHeight=R}})}_layoutEditorWorker(){if(this.currentOpenType)switch(this.currentOpenType.type){case s.EditorOpenType.code:this.codeEditor&&this.codeEditor.layout();break;case s.EditorOpenType.diff:this.diffEditor&&this.diffEditor.layout();break;default:break}}doLayoutEditors(){this._measure&&this._measure.dispose(),this._measure=c.fastdom.mutate(()=>{this._layoutEditorWorker()})}setContextKeys(){var E;if(!this._resourceContext){const R=A=>{let w=null;const F=this.documentModelManager.getModelDescription(A,"resourceContextKey");return F&&(w=F.languageId),w};this._resourceContext=new g.ResourceContextKey(this.contextKeyService,A=>R(A)),this._diffResourceContextKey=new g.ResourceContextKey(this.contextKeyService,A=>R(A),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!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._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set((E=this.currentResource)===null||E===void 0?void 0:E.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const E=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new G.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(E),this.diffEditor.originalEditor.onBlur(E),this.diffEditor.modifiedEditor.onBlur(E)),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(E){E.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(E.payload.uri)&&this.pinPreviewed(),this.resources.find(A=>A.uri.isEqual(E.payload.uri))&&this.notifyTabChanged()}resetOpenType(){this._currentOpenType=null}oResourceOpenTypeChangedEvent(E){const R=E.payload;this.cachedResourcesOpenTypes.has(R.toString())&&this.cachedResourcesOpenTypes.delete(R.toString()),this.currentResource&&this.currentResource.uri.isEqual(R)&&(this.resetOpenType(),this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const E=this.currentResource,R=await this.editorComponentRegistry.resolveEditorComponent(E);this.currentResource===E&&(this.availableOpenTypes=R,this.cachedResourcesOpenTypes.set(E.uri.toString(),R))}}pinPreviewed(E){const R=this.previewURI;E===void 0?this.previewURI=null:this.previewURI&&this.previewURI.isEqual(E)&&(this.previewURI=null),R!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(E){this._onDidEditorGroupContentLoading.fire(E)}get currentEditor(){return this.currentOpenType?this.currentOpenType.type===s.EditorOpenType.code?this.codeEditor:this.currentOpenType.type===s.EditorOpenType.diff?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType){if(this.currentOpenType.type===s.EditorOpenType.code){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if(this.currentOpenType.type===s.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===s.EditorOpenType.code?this.codeEditor:null}createEditor(E){this.codeEditor=this.collectionService.createCodeEditor(E,{},{[c.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.addDispose(this.codeEditor.onRefOpen(()=>{this.doLayoutEditors()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged(R=>{this._onCurrentEditorCursorChange.fire(R)})),this.toDispose.push(this.codeEditor.onSelectionsChanged(R=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:R.selections,source:R.source,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onVisibleRangesChanged(R=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:R,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))})),this.eventBus.fire(new s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.code,editorId:this.codeEditor.getId()})),this.codeEditorReady.ready()}createMergeEditor(E){this.mergeEditor=this.collectionService.createMergeEditor(E,{},{[c.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),this.mergeEditorReady.ready()}createDiffEditor(E){this.diffEditor=this.collectionService.createDiffEditor(E,{},{[c.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 s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.diff,editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.diff,editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(E,R){this.toDispose.push(E.onSelectionsChanged(A=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:A.selections,source:A.source,editorUri:G.URI.from(E.monacoEditor.getModel().uri),side:R}))})),this.toDispose.push(E.onVisibleRangesChanged(A=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:A,editorUri:E.currentUri}))})),this.toDispose.push(E.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:E.currentUri}))}))}async split(E,R,A){var w,F,V;const Y=this.workbenchEditorService.createEditorGroup(),_=E===b.EditorGroupSplitAction.Left||E===b.EditorGroupSplitAction.Right?l.SplitDirection.Horizontal:l.SplitDirection.Vertical,H=E===b.EditorGroupSplitAction.Left||E===b.EditorGroupSplitAction.Top;if(this.grid.split(_,Y,H),A&&!A.scrollTop&&(A.scrollTop=(w=this.currentEditor)===null||w===void 0?void 0:w.monacoEditor.getScrollTop()),A&&!A.scrollLeft&&(A.scrollLeft=(F=this.currentEditor)===null||F===void 0?void 0:F.monacoEditor.getScrollLeft()),A&&!A?.range){const X=(V=this.currentCodeEditor)===null||V===void 0?void 0:V.monacoEditor.getSelection();X&&(A.range=new p.Range(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn))}return Y.open(R,Object.assign(Object.assign({},A),{preview:!1,revealRangeInCenter:!1}))}async open(E,R={}){if(E.scheme===G.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(E.withoutFragment().toString()),R&&R.split)return this.split(R.split,E,Object.assign({},R,{split:void 0,preview:!1}));if(!this.openingPromise.has(E.toString())){const w=this.doOpen(E,R);this.openingPromise.set(E.toString(),w),w.then(()=>{this.openingPromise.delete(E.toString())},()=>{this.openingPromise.delete(E.toString())})}return this.preferenceService.get("editor.previewMode")&&((0,G.isUndefinedOrNull)(R.preview)?!0:R.preview)||this.openingPromise.get(E.toString()).then(()=>{this.pinPreviewed(E)}),this.openingPromise.get(E.toString())}async pin(E){return this.pinPreviewed(E)}getPreventScrollOption(E={}){var R;return(R=E.preventScroll)!==null&&R!==void 0?R:this.preferenceService.get("editor.preventScrollAfterFocused")}async doOpen(E,R={}){var A,w,F;if(!this.resourceService.handlesUri(E))return this.openerService.open(E),!1;let V;try{const Y=this.preferenceService.get("editor.previewMode")&&((0,G.isUndefinedOrNull)(R.preview)?!0:R.preview);if(this.currentResource&&this.currentResource.uri.isEqual(E)&&(!R.forceOpenType||R.forceOpenType.type===((A=this.currentOpenType)===null||A===void 0?void 0:A.type))){if(R.focus&&this.currentEditor){const _=this.getPreventScrollOption(R);(w=this._domNode)===null||w===void 0||w.focus({preventScroll:_}),this.currentEditor.monacoEditor.focus()}return R.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(R.range),setTimeout(()=>{var _;(_=this.currentEditor)===null||_===void 0||_.monacoEditor.revealRangeInCenter(R.range,0)},0)),this.locationInTree(R,E),this.notifyTabChanged(),{group:this,resource:this.currentResource}}else{const _=this._currentOpenType,H=this._currentResource;let X=null,S=this.resources.find(M=>M.uri.toString()===E.toString());if(!S){if(S=await this.resourceService.getResource(E),!S)throw new Error("This uri cannot be opened!: "+E);if(S.deleted){if(R.deletedPolicy==="fail")throw new Error("resource deleted "+E);if(R.deletedPolicy==="skip")return!1}R&&R.label&&(S.name=R.label),R&&(0,G.isDefined)(R.supportsRevive)&&(S.supportsRevive=R.supportsRevive);let M=null;if(R&&R.index!==void 0&&R.index<this.resources.length)M=this.resources[R.index],this.resources.splice(R.index,0,S),X={type:"open",resource:S,index:R.index};else if(this.currentResource){const T=this.resources.indexOf(this.currentResource);this.resources.splice(T+1,0,S),X={type:"open",resource:S,index:T+1},M=this.currentResource}else this.resources.push(S),X={type:"open",resource:S,index:this.resources.length-1};Y&&(this.previewURI&&await this.close(this.previewURI,{treatAsNotCurrent:!0,force:R.forceClose}),this.previewURI=S.uri),R.replace&&M&&await this.close(M.uri,{treatAsNotCurrent:!0,force:R.forceClose})}if(R.backend)return this.notifyTabChanged(),!1;if(H&&this.resourceOpenHistory[this.resourceOpenHistory.length-1]!==H.uri){this.resourceOpenHistory.push(H.uri);const M=(F=this.currentCodeEditor)===null||F===void 0?void 0:F.getSelections();M&&M.length>0&&this.recentFilesManager.updateMostRecentlyOpenedFile(H.uri.toString(),{lineNumber:M[0].selectionStartLineNumber,column:M[0].selectionStartColumn})}this._currentOpenType=null,this._currentResource=S;const Q=this.reporterService.time(G.REPORT_NAME.EDITOR_REACTIVE);V=new G.Deferred,this.resourceStatus.set(S,V.promise);const O=setTimeout(()=>{this.notifyTabLoading(S)},60);this.notifyTabChanged(),this.notifyBodyChanged();try{await this.displayResourceComponent(S,R)}finally{X&&this._onDidEditorGroupTabOperation.fire(X)}return this._currentOrPreviousFocusedEditor=this.currentEditor,clearTimeout(O),V.resolve(),Q.timeEnd(S.uri.toString()),this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new s.EditorGroupOpenEvent({group:this,resource:S})),this.locationInTree(R,E),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:_,oldResource:H})),{group:this,resource:S}}}catch(Y){return(0,G.getDebugLogger)().error(Y),V&&V.reject(),(0,r.isEditorError)(Y,r.EditorTabChangedError)||this.messageService.error((0,G.formatLocalize)("editor.failToOpen",E.displayName,Y.message),[],!0),!1}}locationInTree(E,R){E?.backend||(E?.disableNavigate||this.locateInFileTree(R),E.disableNavigateOnOpendEditor||this.locateInOpenedEditor(R))}locateInFileTree(E){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(c.FILE_COMMANDS.LOCATION.id,E)}locateInOpenedEditor(E){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(c.OPEN_EDITORS_COMMANDS.LOCATION.id,E)}async openUris(E){for(const R of E)await this.open(R)}async getDocumentModelRef(E){const R=E.toString();return this.holdDocumentModelRefs.has(R)||this.holdDocumentModelRefs.set(R,await this.documentModelManager.createModelReference(E,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(R)}disposeDocumentRef(E){if(E.scheme==="diff"){const R=E.getParsedQuery();this.doDisposeDocRef(new G.URI(R.original)),this.doDisposeDocRef(new G.URI(R.modified)),this.diffEditor.disposeModel(R.original,R.modified)}else E.scheme==="mergeEditor"?this.mergeEditor&&this.mergeEditor.dispose():this.doDisposeDocRef(E)}doDisposeDocRef(E){const R=E.toString();this.holdDocumentModelRefs.has(R)&&(this.holdDocumentModelRefs.get(R).dispose(),this.holdDocumentModelRefs.delete(R))}async openCodeEditor(E,R){this.resolveTabChanged(E,this.currentResource),await this.codeEditorReady.onceReady(async()=>{var A;const w=await this.getDocumentModelRef(E.uri);if(await this.codeEditor.open(w),R.range){const F=new p.Range(R.range.startLineNumber,R.range.startColumn,R.range.endLineNumber,R.range.endColumn);this.codeEditor.monacoEditor.setSelection(F),R.revealRangeInCenter&&setTimeout(()=>{this.codeEditor.monacoEditor.revealRangeInCenter(F,1)})}if(queueMicrotask(()=>{R.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(R.scrollTop),R.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(R.scrollLeft)}),R.focus){const F=this.getPreventScrollOption(R);(A=this._domNode)===null||A===void 0||A.focus({preventScroll:F});const V=this.eventBus.on(s.CodeEditorDidVisibleEvent,Y=>{var _;if(Y.payload.groupName===this.name&&Y.payload.type===s.EditorOpenType.code){if(V.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(!((_=this.codeEditor.currentUri)===null||_===void 0)&&_.isEqual(E.uri)))try{this.codeEditor.focus()}catch{}}})}w.instance.dirty&&this.pinPreviewed(E.uri)})}async openDiffEditor(E,R){this.diffEditor||await this.diffEditorDomReady.onceReady(()=>{var V;const Y=document.createElement("div");(V=this._diffEditorDomNode)===null||V===void 0||V.appendChild(Y),this.createDiffEditor(Y)});const A=E,[w,F]=await Promise.all([this.getDocumentModelRef(A.metadata.original),this.getDocumentModelRef(A.metadata.modified)]);await this.diffEditorReady.onceReady(async()=>{var V;if(!(!w||!F)&&(await this.diffEditor.compare(w,F,R,E.uri),R.focus)){const Y=this.getPreventScrollOption(R);(V=this._domNode)===null||V===void 0||V.focus({preventScroll:Y});const _=this.eventBus.on(s.CodeEditorDidVisibleEvent,H=>{if(H.payload.groupName===this.name&&H.payload.type===s.EditorOpenType.diff){if(_.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch{}}})}})}async openMergeEditor(E){const{metadata:R}=E;if(!R)return;this.mergeEditor||await this.mergeEditorDomReady.onceReady(()=>{var O;const M=document.createElement("div");(O=this._mergeEditorDomNode)===null||O===void 0||O.appendChild(M),this.createMergeEditor(M)});const{ancestor:A,input1:w,input2:F,output:V}=R,Y=u.MergeEditorInputData.from(w),_=u.MergeEditorInputData.from(F),[H,X,S,Q]=await Promise.all([this.getDocumentModelRef(G.URI.parse(A)),this.getDocumentModelRef(Y.uri),this.getDocumentModelRef(G.URI.parse(V)),this.getDocumentModelRef(_.uri)]);await this.mergeEditorReady.onceReady(async()=>{await this.mergeEditor.open({ancestor:{uri:G.URI.parse(R.ancestor),textModel:H.instance.getMonacoModel(),baseContent:H.instance.baseContent||""},input1:Y.setTextModel(X.instance.getMonacoModel()),input2:_.setTextModel(Q.instance.getMonacoModel()),output:{uri:G.URI.parse(R.output),textModel:S.instance.getMonacoModel()}})})}async openCustomEditor(E,R){const A=this.editorComponentRegistry.getEditorComponent(R),w=this.editorComponentRegistry.getEditorInitialProps(R);if(A){if(this.activateComponentsProps.set(A,w),A.renderMode===s.EditorComponentRenderMode.ONE_PER_RESOURCE){const F=this.activeComponents.get(A)||[];F.findIndex(Y=>Y.uri.toString()===E.uri.toString())===-1&&F.push(E),this.activeComponents.set(A,F)}else if(A.renderMode===s.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(A,[E]);else if(A.renderMode===s.EditorComponentRenderMode.ONE_PER_WORKBENCH){const F=[];this.workbenchEditorService.editorGroups.forEach(V=>{if(V===this)return;const Y=V.resources.find(_=>_.uri.isEqual(E.uri));Y&&F.push(V.close(Y.uri))}),await Promise.all(F).catch((0,G.getDebugLogger)().error),this.activeComponents.set(A,[E])}}else throw new Error("Cannot find Editor Component with id: "+R);this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}async displayResourceComponent(E,R){R.revealRangeInCenter===void 0&&(R.revealRangeInCenter=!0);const A=E,w=await this.resolveOpenType(E,R);if(w){const{activeOpenType:F,openTypes:V}=w;switch(this.availableOpenTypes=V,R.preserveFocus&&(R.focus=!1),F.type){case s.EditorOpenType.code:await this.openCodeEditor(E,R);break;case s.EditorOpenType.diff:await this.openDiffEditor(E,R);break;case s.EditorOpenType.mergeEditor:await this.openMergeEditor(E);break;case s.EditorOpenType.component:await this.openCustomEditor(E,F.componentId);break;default:return}this.resolveTabChanged(A,this.currentResource),this._currentOpenType=F,this.notifyBodyChanged(),this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(E.uri.toString(),F)}}resolveTabChanged(E,R){if(E!==R)throw new r.EditorTabChangedError}getLastOpenType(E){return this.cachedResourcesActiveOpenTypes.get(E.uri.toString())}async resolveOpenType(E,R){const A=this.cachedResourcesOpenTypes.get(E.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(E),w=this.preferenceService.get("workbench.editorAssociations"),F=W(A,this.cachedResourcesActiveOpenTypes.get(E.uri.toString()),E,w,R.forceOpenType);return this.cachedResourcesOpenTypes.set(E.uri.toString(),A),{activeOpenType:F,openTypes:A}}async close(E,{treatAsNotCurrent:R,force:A}={}){const w=this.resources.findIndex(F=>F.uri.toString()===E.toString());if(w!==-1){const F=this.resources[w];if(!A&&!await this.shouldClose(F))return!1;if(this.resources.splice(w,1),this._onDidEditorGroupTabOperation.fire({type:"close",resource:F,index:w}),this.eventBus.fire(new s.EditorGroupCloseEvent({group:this,resource:F})),this.previewURI&&this.previewURI.isEqual(E)&&(this.previewURI=null),F===this.currentResource&&!R){let V;for(;this.resourceOpenHistory.length>0;)if(this.resources.findIndex(Y=>Y.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1])!==-1){V=this.resourceOpenHistory.pop();break}else this.resourceOpenHistory.pop();if(V)this.open(V);else{let Y=w;for(;Y>0&&!this.resources[Y];)Y--;this.resources[Y]?this.open(this.resources[Y].uri):this.backToEmpty()}}else this.notifyTabChanged();this.removeResouceFromActiveComponents(F),this.disposeDocumentRef(E)}return this.resources.length===0&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[]),!0}removeResouceFromActiveComponents(E){this.activeComponents.forEach((R,A)=>{const w=R.indexOf(E);w!==-1&&(R.splice(w,1),this.eventBus.fire(new s.ResoucesOfActiveComponentChangedEvent({component:A,resources:R})))})}async shouldClose(E){const R=this.workbenchEditorService.editorGroups.map(A=>A.resources);if(await this.resourceService.shouldCloseResource(E,R)){let A=0;for(const w of R)for(const F of w)if(F.uri.isEqual(E.uri)&&(A++,A>=2))break;return A<=1&&this.resourceService.disposeResource(E),!0}else return!1}backToEmpty(){const E=this._currentOpenType,R=this._currentResource;this._currentResource=null,this.resetOpenType(),this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:E,oldResource:R}))}async closeAll(){for(const R of this.resources)if(!await this.shouldClose(R))return!1;return this.resources.splice(0,this.resources.length).reverse().forEach((R,A)=>{this.clearResourceOnClose(R),this._onDidEditorGroupTabOperation.fire({type:"close",resource:R,index:A})}),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty(),!0}async closeSaved(){const E=this.resources.filter(R=>{const A=this.resourceService.getResourceDecoration(R.uri);if(!A||!A.dirty)return!0});for(const R of E)if(!await this.shouldClose(R))return;for(const R of E)await this.close(R.uri)}async closeToRight(E){const R=this.resources.findIndex(A=>A.uri.toString()===E.toString());if(R!==-1){const A=this.resources.slice(R+1);for(const w of A)if(!await this.shouldClose(w))return;this.resources.splice(R+1),A.reverse().forEach((w,F)=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:w,index:R+1+(A.length-1-F)})});for(const w of A)this.clearResourceOnClose(w);this.open(E)}}clearResourceOnClose(E){this.eventBus.fire(new s.EditorGroupCloseEvent({group:this,resource:E})),this.removeResouceFromActiveComponents(E)}async closeOthers(E){const R=this.resources.findIndex(A=>A.uri.toString()===E.toString());if(R!==-1){const A=this.resources.filter((F,V)=>V!==R);for(const F of A)if(!await this.shouldClose(F))return;const w=this.resources;this.resources=[this.resources[R]],A.reverse().forEach(F=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:F,index:w.indexOf(F)})});for(const F of A)this.clearResourceOnClose(F);await this.open(E)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(E){const R=this.availableOpenTypes.find(w=>w.type===E||w.componentId===E);if(!R||!this.currentResource||Z(R,this.currentOpenType))return;const A=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:R}),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:A,oldResource:this.currentResource}))}async dropUri(E,R,A,w){if(R!==s.DragOverPosition.CENTER)await this.split((0,b.getSplitActionFromDragDrop)(R),E,{preview:!1,focus:!0});else if(!w)await this.open(E,{preview:!1,focus:!0});else{const F=this.resources.indexOf(w);if(F===-1)await this.open(E,{preview:!1,focus:!0});else{const V=this.resources.findIndex(Y=>Y.uri.toString()===E.toString());if(V===-1)await this.open(E,{index:F,preview:!1});else{const Y=this.resources[V];V>F?(this.resources.splice(V,1),this.resources.splice(F,0,Y),this._onDidEditorGroupTabOperation.fire({type:"move",resource:Y,oldIndex:V,index:F}),await this.open(E,{preview:!1})):V<F&&(this.resources.splice(F+1,0,Y),this.resources.splice(V,1),this._onDidEditorGroupTabOperation.fire({type:"move",resource:Y,oldIndex:V,index:F}),await this.open(E,{preview:!1}))}}}A&&(A!==this?await A.close(E):R!==s.DragOverPosition.CENTER&&await this.close(E))}gainFocus(){this.workbenchEditorService.setCurrentGroup(this)}focus(){this.gainFocus(),this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.codeEditor.focus(),this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.diffEditor.focus()}dispose(){var E;(E=this.grid)===null||E===void 0||E.dispose(),this.workbenchEditorService.removeGroup(this),super.dispose(),this.codeEditor&&this.codeEditor.dispose(),this.diffEditor&&this.diffEditor.dispose(),this.toDispose.forEach(R=>R.dispose()),this.eventBus.fire(new s.EditorGroupDisposeEvent({group:this}))}getState(){const E=this.resources.filter(v).map(R=>R.uri.toString());return{uris:E,current:this.currentResource&&v(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?E.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code}isDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff}isComponentMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.component}async restoreState(E){this._restoringState=!0,this.previewURI=E.uris[E.previewIndex]?new G.URI(E.uris[E.previewIndex]):null,await Promise.all(E.uris.map(async A=>{await this.doOpen(new G.URI(A),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"})}));let R;E.current?R=new G.URI(E.current):E.uris.length>0&&(R=new G.URI(E.uris[E.uris.length-1])),R&&(await this.open(R,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(E,R){for(const A of this.resources)!E&&A.uri.scheme===G.Schemes.untitled||await this.saveResource(A,R)}async saveResource(E,R=b.SaveReason.Manual){if(await this.saveByOpenType(E,R))return;const A=this.documentModelManager.getModelReference(E.uri);A&&(await A.instance.save(void 0,R),A.dispose())}async saveByOpenType(E,R){const A=this.cachedResourcesActiveOpenTypes.get(E.uri.toString());if(A&&A.saveResource)try{return await A.saveResource(E,R),!0}catch(w){this.logger.error(w)}return!1}async saveCurrent(E=b.SaveReason.Manual){const R=this.currentResource;if(R&&!await this.saveByOpenType(R,E)&&this.currentEditor)return this.currentEditor.save()}hasDirty(){for(const E of this.resources){const R=this.documentModelManager.getModelDescription(E.uri);if(R&&R.dirty)return!0}return!1}calcDirtyCount(E=new Set){let R=0;for(const A of this.resources){const w=this.documentModelManager.getModelDescription(A.uri,"calc-dirty-count");E.has(A.uri.toString())||(E.add(A.uri.toString()),w&&w.dirty&&(R+=1))}return R}componentUndo(){const E=this.currentOpenType;E?.undo&&E.undo(this.currentResource)}componentRedo(){const E=this.currentOpenType;E?.redo&&E.redo(this.currentResource)}toJSON(){return{name:this.name}}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b.EditorCollectionService)],N.prototype,"collectionService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b.ResourceService)],N.prototype,"resourceService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.EditorComponentRegistry)],N.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,o.Autowired)(b.WorkbenchEditorService),n.__metadata("design:type",f)],N.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],N.prototype,"documentModelManager",void 0),n.__decorate([(0,o.Autowired)(G.CommandService),n.__metadata("design:type",Object)],N.prototype,"commands",void 0),n.__decorate([(0,o.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],N.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(c.RecentFilesManager),n.__metadata("design:type",c.RecentFilesManager)],N.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(h.IMessageService),n.__metadata("design:type",Object)],N.prototype,"messageService",void 0),n.__decorate([(0,o.Autowired)(G.IReporterService),n.__metadata("design:type",Object)],N.prototype,"reporterService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],N.prototype,"config",void 0),n.__decorate([(0,o.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],N.prototype,"openerService",void 0),n.__decorate([(0,o.Autowired)(G.ILogger),n.__metadata("design:type",Object)],N.prototype,"logger",void 0),n.__decorate([a.observable.shallow,n.__metadata("design:type",Array)],N.prototype,"availableOpenTypes",void 0),n.__decorate([(0,G.OnEvent)(b.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[b.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],N.prototype,"onResourceDecorationChangeEvent",null),n.__decorate([(0,G.OnEvent)(s.ResourceOpenTypeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ResourceOpenTypeChangedEvent]),n.__metadata("design:returntype",void 0)],N.prototype,"oResourceOpenTypeChangedEvent",null),n.__decorate([(0,G.OnEvent)(s.RegisterEditorComponentEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],N.prototype,"onRegisterEditorComponentEvent",null),N=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Number])],N),e.EditorGroup=N;function W(y,E,R,A,w){if(w)return y.find(F=>Z(F,w))||y[0];if(E)return y.find(F=>Z(F,E))||y[0];if(A){const F=y.find(V=>{const Y=Object.keys(A).find(X=>(0,G.match)(X,R.uri.path.toString().toLowerCase())||(0,G.match)(X,R.uri.path.base.toLowerCase())),_=Y&&A[Y];if(!_)return!1;const H=`${G.CUSTOM_EDITOR_SCHEME}-${_}`;return V.componentId===H});if(F)return F}return y[0]}function Z(y,E){return y.type===E.type&&(y.type!==s.EditorOpenType.component||y.componentId===E.componentId)}},94180:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabbarLeftExtraContentId=e.TabbarRightExtraContentId=void 0,e.TabbarRightExtraContentId="tabbar-right-extra-content",e.TabbarLeftExtraContentId="tabbar-left-extra-content"},93107:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseRangeFrom=e.parseCacheValueFrom=e.isDocChangesCache=e.isDocContentCache=e.IDocPersistentCacheProvider=void 0;const n=t(44781);e.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider");function a(u){return u.hasOwnProperty("content")}e.isDocContentCache=a;function o(u){return u.hasOwnProperty("changeMatrix")}e.isDocChangesCache=o;function c(u){const G=u.text,p=u.range.startLineNumber,h=u.range.startColumn,b=u.range.endLineNumber,I=u.range.endColumn;return[G,p,h,b,I]}e.parseCacheValueFrom=c;function g(u){const[G,p,h,b,I]=u;return n.Range.lift({startLineNumber:p,startColumn:h,endLineNumber:b,endColumn:I})}e.parseRangeFrom=g},55113:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSimpleEditorOptions=e.AUTO_SAVE_MODE=e.SaveReason=e.Direction=e.EditorGroupSplitAction=e.DragOverPosition=e.EditorOpenType=e.IEditorPriority=e.OverviewRulerLane=e.WorkbenchEditorService=e.DidApplyEditorDecorationFromProvider=e.DidChangeEditorGroupUriEvent=e.CollectionEditorsUpdateEvent=e.EditorCollectionService=e.EditorType=e.ShowLightbulbIconMode=void 0;const n=t(85608),a=t(76003),o=t(43718);var c=t(20868);Object.defineProperty(e,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return c.ShowLightbulbIconMode}});var g;(function(W){W[W.CODE=0]="CODE",W[W.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",W[W.MODIFIED_DIFF=2]="MODIFIED_DIFF",W.MERGE_EDITOR_DIFF="MERGE_EDITOR_DIFF"})(g=e.EditorType||(e.EditorType={}));let u=class{};u=n.__decorate([(0,a.Injectable)()],u),e.EditorCollectionService=u;class G extends o.BasicEvent{}e.CollectionEditorsUpdateEvent=G;class p extends o.BasicEvent{}e.DidChangeEditorGroupUriEvent=p;class h extends o.BasicEvent{}e.DidApplyEditorDecorationFromProvider=h;class b{}e.WorkbenchEditorService=b;var I;(function(W){W[W.Left=1]="Left",W[W.Center=2]="Center",W[W.Right=4]="Right",W[W.Full=7]="Full"})(I=e.OverviewRulerLane||(e.OverviewRulerLane={}));var r;(function(W){W.builtin="builtin",W.option="option",W.exclusive="exclusive",W.default="default"})(r=e.IEditorPriority||(e.IEditorPriority={}));var l;(function(W){W.code="code",W.diff="diff",W.mergeEditor="mergeEditor",W.component="component"})(l=e.EditorOpenType||(e.EditorOpenType={}));var s;(function(W){W.LEFT="left",W.RIGHT="right",W.TOP="top",W.BOTTOM="bottom",W.CENTER="center"})(s=e.DragOverPosition||(e.DragOverPosition={}));var d;(function(W){W[W.Top=1]="Top",W[W.Bottom=2]="Bottom",W[W.Left=3]="Left",W[W.Right=4]="Right"})(d=e.EditorGroupSplitAction||(e.EditorGroupSplitAction={}));var m;(function(W){W.UP="up",W.DOWN="down",W.LEFT="left",W.RIGHT="right"})(m=e.Direction||(e.Direction={}));var v;(function(W){W[W.Manual=1]="Manual",W[W.AfterDelay=2]="AfterDelay",W[W.FocusOut=3]="FocusOut"})(v=e.SaveReason||(e.SaveReason={}));var f;(function(W){W.OFF="off",W.AFTER_DELAY="afterDelay",W.EDITOR_FOCUS_CHANGE="editorFocusChange",W.WINDOWS_LOST_FOCUS="windowLostFocus"})(f=e.AUTO_SAVE_MODE||(e.AUTO_SAVE_MODE={}));function N(){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}}}e.getSimpleEditorOptions=N},23418:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(94180),e),n.__exportStar(t(93107),e),n.__exportStar(t(55113),e),n.__exportStar(t(23950),e),n.__exportStar(t(27693),e),n.__exportStar(t(46225),e),n.__exportStar(t(4308),e),n.__exportStar(t(39467),e)},27693:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageStatusService=void 0,e.ILanguageStatusService=Symbol("ILanguageStatusService")},23950:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asMonacoDiagnostic=e.asMonacoDiagnostics=e.asRelatedInformation=e.asRelatedInformations=e.asSeverity=e.DiagnosticTag=e.DiagnosticSeverity=e.ILanguageService=void 0;const n=t(43718),a=t(26592);e.ILanguageService=Symbol("ILanguageService");var o;(function(b){b[b.Error=1]="Error",b[b.Warning=2]="Warning",b[b.Information=3]="Information",b[b.Hint=4]="Hint"})(o=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var c;(function(b){b[b.Unnecessary=1]="Unnecessary",b[b.Deprecated=2]="Deprecated"})(c=e.DiagnosticTag||(e.DiagnosticTag={}));function g(b){return b===1?n.MarkerSeverity.Error:b===2?n.MarkerSeverity.Warning:b===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}e.asSeverity=g;function u(b){if(b)return b.map(I=>G(I))}e.asRelatedInformations=u;function G(b){return{resource:a.URI.parse(b.location.uri),startLineNumber:b.location.range.start.line+1,startColumn:b.location.range.start.character+1,endLineNumber:b.location.range.end.line+1,endColumn:b.location.range.end.character+1,message:b.message}}e.asRelatedInformation=G;function p(b){if(b)return b.map(I=>h(I))}e.asMonacoDiagnostics=p;function h(b){return{code:typeof b.code=="number"?b.code.toString():typeof b.code=="object"?{value:b.code.value.toString(),target:b.code.target}:b.code,severity:g(b.severity),message:b.message,source:b.source,startLineNumber:b.range.start.line+1,startColumn:b.range.start.character+1,endLineNumber:b.range.end.line+1,endColumn:b.range.end.character+1,relatedInformation:u(b.relatedInformation),tags:b.tags}}e.asMonacoDiagnostic=h},46225:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookCellScheme=e.INotebookService=e.CellKind=e.NotebookCellsChangeType=void 0;var t;(function(a){a[a.ModelChange=1]="ModelChange",a[a.Move=2]="Move",a[a.ChangeCellLanguage=5]="ChangeCellLanguage",a[a.Initialize=6]="Initialize",a[a.ChangeCellMetadata=7]="ChangeCellMetadata",a[a.Output=8]="Output",a[a.OutputItem=9]="OutputItem",a[a.ChangeCellContent=10]="ChangeCellContent",a[a.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",a[a.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",a[a.ChangeCellMime=13]="ChangeCellMime",a[a.Unknown=100]="Unknown"})(t=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var n;(function(a){a[a.Markup=1]="Markup",a[a.Code=2]="Code"})(n=e.CellKind||(e.CellKind={})),e.INotebookService=Symbol("INotebookService"),e.notebookCellScheme="vscode-notebook-cell"},4308:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AskSaveResult=e.isDiffResource=e.DIFF_SCHEME=e.ResourceDecorationNeedChangeEvent=e.ResourceDecorationChangeEvent=e.ResourceRemoveEvent=e.ResourceDidUpdateEvent=e.ResourceNeedUpdateEvent=e.ResourceService=void 0;const n=t(43718);class a{}e.ResourceService=a;class o extends n.BasicEvent{}e.ResourceNeedUpdateEvent=o;class c extends n.BasicEvent{}e.ResourceDidUpdateEvent=c;class g extends n.BasicEvent{}e.ResourceRemoveEvent=g;class u extends n.BasicEvent{}e.ResourceDecorationChangeEvent=u;class G extends n.BasicEvent{}e.ResourceDecorationNeedChangeEvent=G,e.DIFF_SCHEME="diff";function p(b){return b.uri.scheme===e.DIFF_SCHEME}e.isDiffResource=p;var h;(function(b){b[b.REVERT=1]="REVERT",b[b.SAVE=2]="SAVE",b[b.CANCEL=3]="CANCEL"})(h=e.AskSaveResult||(e.AskSaveResult={}))},39467:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSplitActionFromDragDrop=void 0;const n=t(55113);function a(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]}e.getSplitActionFromDragDrop=a},54414:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(23418),e)},32595:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerContribution=e.EXPLORER_CONTAINER_ID=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(30144);Object.defineProperty(e,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return c.EXPLORER_CONTAINER_ID}});const g=t(21634),u=t(68456),G=t(43718);let p=class{registerComponent(b){b.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:Object.assign(Object.assign({},g.browserViews.properties),{description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))})})}};n.__decorate([(0,a.Autowired)(G.IExtensionsSchemaService),n.__metadata("design:type",Object)],p.prototype,"extensionsSchemaService",void 0),p=n.__decorate([(0,o.Domain)(o.ClientAppContribution,u.ComponentContribution)],p),e.ExplorerContribution=p},59027:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(32595);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c.ExplorerContribution]}};g=n.__decorate([(0,a.Injectable)()],g),e.ExplorerModule=g},18531:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpressFileServerContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(32242),g=t(90242);let u=class{registerStaticResolver(p){p.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:h=>{const b=new o.URI(this.appConfig.staticServicePath||g.EXPRESS_SERVER_PATH),[I,r]=h.codeUri.path.split("?");return b.resolve(`assets${decodeURIComponent(I)}`).withQuery(r)},roots:[this.appConfig.staticServicePath||g.EXPRESS_SERVER_PATH]})}};n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),u=n.__decorate([(0,o.Domain)(c.StaticResourceContribution)],u),e.ExpressFileServerContribution=u},98885:(L,e,t)=>{"use strict";var n;n={value:!0},e.Q=void 0;const a=t(85608),o=t(76003),c=t(41869),g=t(18531);let u=class extends c.BrowserModule{constructor(){super(...arguments),this.providers=[g.ExpressFileServerContribution]}};u=a.__decorate([(0,o.Injectable)()],u),e.Q=u},90242:(L,e,t)=>{"use strict";var n=t(39907);Object.defineProperty(e,"__esModule",{value:!0}),e.ALLOW_MIME=e.EXPRESS_SERVER_PATH=e.EXPRESS_SERVER_PORT=void 0,e.EXPRESS_SERVER_PORT=8e3,e.EXPRESS_SERVER_PATH=n.env.STATIC_SERVER_PATH||`http://127.0.0.1:${e.EXPRESS_SERVER_PORT}/`,e.ALLOW_MIME={gif:"image/gif",jpg:"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:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENSION_SCHEME=e.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=void 0;const n=t(30144);e.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=n.EXTENSION_CONTAINER_ID,e.EXTENSION_SCHEME="extension"},6449:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionOverview=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(68974),g=t(95422),u=t(43718),G=t(93374),p=t(29150),h=n.__importDefault(t(40769));var b;(function(l){l.details="Details",l.changelog="ChangeLog",l.deps="Dependencies"})(b||(b={}));const I=[b.details,b.changelog,b.deps],r=({resource:l})=>{var s,d,m,v,f,N,W,Z,y,E,R,A,w,F,V,Y,_,H,X,S,Q,O,M,T,B;const x=(0,g.useInjectable)(p.VSXExtensionServiceToken),[D,J]=(0,a.useState)(!0),[k,z]=(0,a.useState)(((s=l.metadata)===null||s===void 0?void 0:s.state)===p.InstallState.INSTALLED?4:0),[P,U]=(0,a.useState)(b.details),[ne,re]=(0,a.useState)({}),ae=(0,a.useCallback)(q=>{const le=I[q];le&&U(le)},[]),ue=(0,a.useCallback)(async()=>{var q;const le=await x.getRemoteRawExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);if(le){const ie=["readme","changelog"].map(j=>{var te,oe;const ce=(te=le.files)===null||te===void 0?void 0:te[j];return ce?fetch(ce).then(Ie=>Ie.text()):(oe=le[j])!==null&&oe!==void 0?oe:""}),[he,ee]=await Promise.all(ie);re({readme:he,changelog:ee,downloadCount:le.downloadCount})}J(!1)},[l]),$=(0,a.useCallback)(async()=>{var q;const le=await x.getLocalExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);le&&(z(1),x.install(le).finally(()=>{z(4)}))},[l]),pe=(0,a.useCallback)(async()=>{var q;const le=await x.getLocalExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);le&&(z(2),x.uninstall(le).finally(()=>{z(3)}))},[l]);(0,a.useEffect)(()=>{ue()},[l]);const ge=(0,a.useMemo)(()=>{var q,le,ie;const he=[];if(((q=l.metadata)===null||q===void 0?void 0:q.state)!==p.InstallState.NOT_INSTALLED)if(k!==3)he.push(a.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:pe,disabled:k===2},(0,u.localize)(k===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return he.push(a.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,u.localize)("marketplace.extension.uninstalled"))),he;return((le=l.metadata)===null||le===void 0?void 0:le.state)===p.InstallState.NOT_INSTALLED?k===4?he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))):he.push(a.default.createElement(o.Button,{size:"small",key:"install",onClick:$,disabled:k!==0},(0,u.localize)(k===1?"marketplace.extension.installing":"marketplace.extension.install"))):((ie=l.metadata)===null||ie===void 0?void 0:ie.state)===p.InstallState.SHOULD_UPDATE?k===4?he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))):he.push(a.default.createElement(o.Button,{size:"small",key:"update",onClick:$,disabled:k!==0},(0,u.localize)(k===1?"marketplace.extension.updating":"marketplace.extension.update"))):he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))),he},[l,k]);return a.default.createElement("div",{className:h.default.extension_overview_container},a.default.createElement(c.Progress,{loading:D}),a.default.createElement("div",{className:h.default.extension_overview_header},!((d=l.metadata)===null||d===void 0)&&d.iconUrl?a.default.createElement("img",{src:(m=l.metadata)===null||m===void 0?void 0:m.iconUrl,alt:(0,u.replaceLocalizePlaceholder)((v=l.metadata)===null||v===void 0?void 0:v.displayName,(f=l.metadata)===null||f===void 0?void 0:f.extensionId)}):a.default.createElement("div",{className:h.default.default_icon},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),a.default.createElement("div",{className:h.default.extension_detail},a.default.createElement("div",{className:h.default.extension_name},a.default.createElement("h1",null,a.default.createElement("a",{href:`${(N=l.metadata)===null||N===void 0?void 0:N.openVSXRegistry}/extension/${(W=l.metadata)===null||W===void 0?void 0:W.namespace.toLowerCase()}/${(Z=l.metadata)===null||Z===void 0?void 0:Z.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer"},(0,u.replaceLocalizePlaceholder)((y=l.metadata)===null||y===void 0?void 0:y.displayName,(E=l.metadata)===null||E===void 0?void 0:E.extensionId)||((R=l.metadata)===null||R===void 0?void 0:R.name))),a.default.createElement("span",{className:h.default.extension_id},((A=l.metadata)===null||A===void 0?void 0:A.namespace.toLowerCase())+"."+((w=l.metadata)===null||w===void 0?void 0:w.name.toLowerCase()))),a.default.createElement("div",{className:h.default.manifest},a.default.createElement("span",null,a.default.createElement("a",{href:(F=l.metadata)===null||F===void 0?void 0:F.namespaceUrl,target:"_blank",rel:"noopener noreferrer"},(V=l.metadata)===null||V===void 0?void 0:V.namespace)),a.default.createElement("span",null,a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),((Y=l.metadata)===null||Y===void 0?void 0:Y.downloadCount)||ne.downloadCount),((_=l.metadata)===null||_===void 0?void 0:_.averageRating)&&a.default.createElement("span",null,(H=l.metadata)===null||H===void 0?void 0:H.averageRating),((X=l.metadata)===null||X===void 0?void 0:X.repository)&&a.default.createElement("span",null,a.default.createElement("a",{href:(S=l.metadata)===null||S===void 0?void 0:S.repository,target:"blank"},"Repository")),((Q=l.metadata)===null||Q===void 0?void 0:Q.license)&&a.default.createElement("span",null,a.default.createElement("a",{href:(O=l.metadata)===null||O===void 0?void 0:O.files.license,target:"blank"},"License")),a.default.createElement("span",null,"v",(M=l.metadata)===null||M===void 0?void 0:M.version)),a.default.createElement("div",{className:h.default.description},(0,u.replaceLocalizePlaceholder)((T=l.metadata)===null||T===void 0?void 0:T.description,(B=l.metadata)===null||B===void 0?void 0:B.extensionId)),a.default.createElement("div",{className:h.default.buttons},ge))),a.default.createElement("div",{className:h.default.extension_overview_body},a.default.createElement(o.Tabs,{className:h.default.tabs,value:P,onChange:ae,tabs:[b.details,b.changelog]}),a.default.createElement("div",{className:h.default.extension_content},P===b.details&&ne.readme&&a.default.createElement(G.Markdown,{content:ne.readme}),P===b.changelog&&ne.changelog&&a.default.createElement(G.Markdown,{content:ne.changelog}))))};e.ExtensionOverview=r},87791:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extension=e.ExtensionViewType=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(43718),u=t(29150),G=n.__importDefault(t(90425));var p;(function(h){h[h.MARKETPLACE=0]="MARKETPLACE",h[h.INSTALLED=1]="INSTALLED"})(p=e.ExtensionViewType||(e.ExtensionViewType={})),e.Extension=a.default.memo(({extension:h,onInstall:b,onClick:I,type:r,installedExtensions:l,openVSXRegistry:s})=>{const d=(0,c.useDesignStyles)(G.default.extension_item,"extension_item"),[m,v]=(0,a.useState)(),f=l?.find(A=>A.namespace===h.namespace&&A.name===h.name),N=!!(r===p.INSTALLED||f),W=N&&r===p.MARKETPLACE&&f?.version!==h.version,[Z,y]=(0,a.useState)(N),E=(0,a.useCallback)(A=>{A.stopPropagation(),v(!0),b(h).then(()=>{v(!1),y(!0)})},[h]),R=(0,a.useCallback)(()=>{I(h,Z?W?u.InstallState.SHOULD_UPDATE:u.InstallState.INSTALLED:u.InstallState.NOT_INSTALLED)},[h]);return a.default.createElement("div",{className:d,onClick:R},h.iconUrl?a.default.createElement("img",{className:G.default.icon,src:h.iconUrl,alt:(0,g.replaceLocalizePlaceholder)(h.displayName,`${h.publisher}.${h.name}`)}):a.default.createElement("div",{className:G.default.default_icon},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),a.default.createElement("div",{className:G.default.extension_detail},a.default.createElement("div",{className:G.default.base_info},a.default.createElement("span",{className:G.default.display_name},(0,g.replaceLocalizePlaceholder)(h.displayName,`${h.publisher}.${h.name}`)||h.name),a.default.createElement("span",{className:G.default.version},h.version),!Z&&a.default.createElement("span",{className:G.default.download_count},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),h.downloadCount)),a.default.createElement("span",{className:G.default.description},(0,g.replaceLocalizePlaceholder)(h.description,`${h.publisher}.${h.name}`)),a.default.createElement("div",{className:G.default.footer},a.default.createElement("span",{className:G.default.namespace},h.namespace),r===p.MARKETPLACE&&(N?W?a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:m},(0,g.localize)(m?"marketplace.extension.updating":"marketplace.extension.update")):a.default.createElement("span",{className:G.default.state_text},(0,g.localize)("marketplace.extension.installed")):a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:m},(0,g.localize)(m?"marketplace.extension.installing":"marketplace.extension.install"))),r===p.INSTALLED&&a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:!0},(0,g.localize)("marketplace.extension.installed")))))})},38105:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenVsxExtensionManagerModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(29150),g=t(70274),u=t(67761);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.VSXExtensionContribution,{token:c.VSXExtensionServiceToken,useClass:u.VSXExtensionService}],this.backServices=[{servicePath:c.VSXExtensionServicePath,token:c.VSXExtensionBackSerivceToken}]}};G=n.__decorate([(0,a.Injectable)()],G),e.OpenVsxExtensionManagerModule=G},70274:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(57517),u=t(63067),G=t(52416),p=t(29150),h=t(21082),b=t(6449),I=t(73689);let r=class{initialize(){}onDidRender(){const s=this.mainLayoutService.getTabbarHandler(h.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);s&&(s.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):s.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(s){s.registerResourceProvider({scheme:h.EXTENSION_SCHEME,provideResource:async d=>{const{extensionId:m,state:v}=d.getParsedQuery(),f=await this.vsxExtensionService.getLocalExtension(m),N=this.iconService.fromIcon("",f?.iconUrl,G.IconType.Background);return{uri:d,metadata:Object.assign(Object.assign({},f),{extensionId:m,state:v,openVSXRegistry:this.vsxExtensionService.openVSXRegistry}),icon:N||(0,o.getIcon)("extension"),name:(0,c.replaceLocalizePlaceholder)(f?.displayName,m)||""}}})}registerEditorComponent(s){const d=`${h.EXTENSION_SCHEME}_detail`;s.registerEditorComponent({component:b.ExtensionOverview,uid:d,scheme:h.EXTENSION_SCHEME}),s.registerEditorComponentResolver(h.EXTENSION_SCHEME,(m,v,f)=>{f?.([{type:g.EditorOpenType.component,componentId:d}])})}registerComponent(s){s.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,c.localize)("marketplace.extension.container"),priority:5,containerId:h.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:I.VSXExtensionView,activateKeyBinding:"ctrlcmd+shift+x"})}};n.__decorate([(0,a.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],r.prototype,"mainLayoutService",void 0),n.__decorate([(0,a.Autowired)(p.VSXExtensionServiceToken),n.__metadata("design:type",Object)],r.prototype,"vsxExtensionService",void 0),n.__decorate([(0,a.Autowired)(G.IIconService),n.__metadata("design:type",Object)],r.prototype,"iconService",void 0),r=n.__decorate([(0,c.Domain)(o.ClientAppContribution,u.MainLayoutContribution,o.ComponentContribution,g.BrowserEditorContribution)],r),e.VSXExtensionContribution=r},67761:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionService=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(57517),u=t(98453),G=t(71354),p=t(52416),h=t(12456),b=t(29150);let I=class extends c.Disposable{constructor(){super(),this.extensions=a.observable.array([]),this.installedExtensions=a.observable.array([]),this.openVSXRegistry="",this.tasks=new Map,(0,a.makeObservable)(this),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 l="sumi-upload-file-status";if(this.tasks.size===1){const s=(0,c.localize)("marketplace.extension.installing"),d={text:s,alignment:c.StatusBarAlignment.RIGHT,tooltip:s,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(l,d)}}async install(l){var s,d;const m=this.getExtensionId(l);if(this.tasks.has(m)||!l.downloadUrl)return;const v=this.backService.install({id:m,name:(s=l.name)!==null&&s!==void 0?s:"-",url:l.downloadUrl,version:(d=l.version)!==null&&d!==void 0?d:"-"});return this.tasks.set(m,v),this.updateStatusBar(),v.then(async f=>{if(this.tasks.delete(m),this.updateStatusBar(),await this.extensionManagementService.postChangedExtension(!1,f),this.themeService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}if(this.iconService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.ICON_THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}if(this.productIconService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.PRODUCT_ICON_THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}})}async uninstall(l){l&&l.path&&await this.extensionManagementService.postUninstallExtension(l.path)}async disable(l){l&&l.path&&this.extensionManagementService.postDisableExtension(l.path)}async enable(l){l&&l.path&&this.extensionManagementService.postEnableExtension(l.path)}getExtensionId(l){var s,d,m;return(s=l?.extensionId)!==null&&s!==void 0?s:((d=l?.namespace)===null||d===void 0?void 0:d.toLowerCase())+"."+((m=l?.name)===null||m===void 0?void 0:m.toLowerCase())}async getLocalExtension(l){return l?this.extensions.find(d=>this.getExtensionId(d)===l)||this.installedExtensions.find(d=>this.getExtensionId(d)===l):void 0}async getRemoteRawExtension(l){if(!l)return;const s={extensionId:l},d=await this.backService.getExtension(s);if(d&&d.extensions&&d.extensions.length>=1)return Object.assign({},d.extensions[0])}async getOpenVSXRegistry(){this.openVSXRegistry=await this.backService.getOpenVSXRegistry()}async openExtensionEditor(l,s){this.workbenchEditorService.open(new c.URI(`extension://?extensionId=${l}&state=${s}`),{preview:!0})}async search(l){const s={query:l,size:50,sortBy:"downloadCount"};this.searchValue=l;const d=await this.backService.search(s);d.extensions&&(0,a.runInAction)(()=>{this.extensions=d.extensions.filter(m=>!this.installedExtensions.find(v=>this.getExtensionId(v)===this.getExtensionId(m))).map(m=>Object.assign(Object.assign({},m),{publisher:m.namespace,iconUrl:m.files.icon,downloadUrl:m.files.download,readme:m.files.readme}))})}async searchInstalledExtensions(l){this.installedExtensions=this.installedExtensions.sort((s,d)=>{const m=(0,c.fuzzyScore)(l,l.toLowerCase(),0,s.name,s.name.toLowerCase(),0,!0),v=(0,c.fuzzyScore)(l,l.toLowerCase(),0,d.name,d.name.toLowerCase(),0,!0);return m?v?v[0]-m[0]:-1:1})}getInstalledExtensions(){this.installedExtensions=this.extensionInstanceService.getExtensionInstances().map(l=>{const s=l.extensionId;return{namespace:s&&s.includes(".")?s.split(".")[0]:l.packageJSON.publisher,name:l.packageJSON.name,id:l.extensionId,version:l.packageJSON.version,displayName:l.packageJSON.displayName,description:l.packageJSON.description,publisher:l.packageJSON.publisher,iconUrl:l.packageJSON.icon&&l.extensionLocation.toString()+`/${l.packageJSON.icon}`,path:l.path,realpath:l.realPath}})}};n.__decorate([(0,o.Autowired)(b.VSXExtensionServicePath),n.__metadata("design:type",Object)],I.prototype,"backService",void 0),n.__decorate([(0,o.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],I.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(G.AbstractExtInstanceManagementService),n.__metadata("design:type",G.AbstractExtInstanceManagementService)],I.prototype,"extensionInstanceService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",u.ExtensionManagementService)],I.prototype,"extensionManagementService",void 0),n.__decorate([(0,o.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],I.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(p.IIconService),n.__metadata("design:type",Object)],I.prototype,"iconService",void 0),n.__decorate([(0,o.Autowired)(p.IProductIconService),n.__metadata("design:type",Object)],I.prototype,"productIconService",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],I.prototype,"commandService",void 0),n.__decorate([a.observable.shallow,n.__metadata("design:type",Array)],I.prototype,"extensions",void 0),n.__decorate([a.observable,n.__metadata("design:type",Array)],I.prototype,"installedExtensions",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],I.prototype,"openVSXRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],I.prototype,"statusBarService",void 0),n.__decorate([a.observable,n.__metadata("design:type",Map)],I.prototype,"tasks",void 0),n.__decorate([(0,c.pMemoize)(r=>r),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],I.prototype,"search",null),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],I.prototype,"searchInstalledExtensions",null),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],I.prototype,"getInstalledExtensions",null),I=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],I),e.VSXExtensionService=I},73689:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionView=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(25150),c=n.__importStar(t(14041)),g=t(14041),u=t(97267),G=t(41869),p=t(68974),h=t(43718),b=t(5567),I=t(29150),r=t(21082),l=t(87791),s=n.__importDefault(t(68143)),d=[I.TabActiveKey.MARKETPLACE,I.TabActiveKey.INSTALLED];e.VSXExtensionView=(0,o.observer)(()=>{const[m,v]=(0,g.useState)(I.TabActiveKey.MARKETPLACE),[f,N]=(0,g.useState)(!1),W=(0,G.useInjectable)(I.VSXExtensionServiceToken),Z=(0,a.default)(A=>{N(!0);let w;m===I.TabActiveKey.MARKETPLACE?w=W.search(A):w=W.searchInstalledExtensions(A),typeof w=="object"&&w.then&&w.then(()=>{N(!1)})},500),y=(0,g.useCallback)(A=>W.install(A),[]),E=(0,g.useCallback)((A,w)=>{const F=W.getExtensionId(A);W.openExtensionEditor(F,w)},[]),R=(0,g.useCallback)(A=>{const w=d[A];w&&v(w)},[]);return c.createElement("div",{className:s.default.panel},c.createElement(u.Tabs,{mini:!0,className:s.default.tabs,value:d.indexOf(m),onChange:R,tabs:[(0,h.localize)("marketplace.panel.tab.marketplace"),(0,h.localize)("marketplace.tab.installed")]}),c.createElement("div",{style:{padding:"8px"}},c.createElement(b.AutoFocusedInput,{containerId:r.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,h.localize)("marketplace.panel.tab.placeholder.search"),value:"",onChange:A=>Z(A.target.value)})),m===I.TabActiveKey.MARKETPLACE&&c.createElement("div",{className:s.default.extensions_view},c.createElement(p.Progress,{loading:f}),W.extensions.map((A,w)=>c.createElement(l.Extension,{key:`${w}:${A.namespace}-${A.name}`,onClick:E,onInstall:y,extension:A,type:l.ExtensionViewType.MARKETPLACE,installedExtensions:W.installedExtensions,openVSXRegistry:W.openVSXRegistry}))),m===I.TabActiveKey.INSTALLED&&c.createElement("div",{className:s.default.extensions_view},W.installedExtensions.map((A,w)=>c.createElement(l.Extension,{key:`${w}:${A.namespace}-${A.name}`,onClick:E,onInstall:y,extension:A,type:l.ExtensionViewType.INSTALLED,openVSXRegistry:W.openVSXRegistry}))))})},29150:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IOpenvsxMarketplaceService=e.IAlipayCloudMarketplaceService=e.VSXExtensionServicePath=e.VSXExtensionBackSerivceToken=e.VSXExtensionServiceToken=e.VSXExtension=e.InstallState=e.TabActiveKey=e.EnableScope=void 0;var t;(function(c){c.GLOBAL="GLOBAL",c.WORKSPACE="WORKSPACE"})(t=e.EnableScope||(e.EnableScope={}));var n;(function(c){c.MARKETPLACE="marketplace",c.INSTALLED="installed"})(n=e.TabActiveKey||(e.TabActiveKey={}));var a;(function(c){c.INSTALLED="INSTALLED",c.NOT_INSTALLED="NOT_INSTALLED",c.SHOULD_UPDATE="SHOULD_UPDATE"})(a=e.InstallState||(e.InstallState={}));class o{}e.VSXExtension=o,o.KEYS=new Set(["version","iconUrl","publisher","name","displayName","description","averageRating","downloadCount","downloadUrl","readmeUrl","licenseUrl","repository","license","readme","preview","namespaceAccess","publishedBy"]),e.VSXExtensionServiceToken=Symbol("VSXExtensionSerivceToken"),e.VSXExtensionBackSerivceToken=Symbol("VSXExtensionBackSerivceToken"),e.VSXExtensionServicePath="VSXExtensionServicePath",e.IAlipayCloudMarketplaceService=Symbol("IAlipayCloudMarketplaceService"),e.IOpenvsxMarketplaceService=Symbol("IOpenvsxMarketplaceService")},53599:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageContribution=e.ExtensionStorageModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93584),g=t(7446),u=t(16132),G=t(10207),p=t(19227);let h=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IExtensionStorageService,useClass:G.ExtensionStorageService},{token:c.IExtensionStoragePathServer,useClass:u.ExtensionStoragePathServer},{token:c.IExtensionStorageServer,useClass:g.ExtensionStorageServer},b]}};h=n.__decorate([(0,o.Domain)(p.name)],h),e.ExtensionStorageModule=h;let b=class{onReconnect(){this.extensionStorageService.reConnectInit()}};n.__decorate([(0,a.Autowired)(c.IExtensionStorageService),n.__metadata("design:type",Object)],b.prototype,"extensionStorageService",void 0),b=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],b),e.ExtensionStorageContribution=b,n.__exportStar(t(10207),e)},16132:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStoragePathServer=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(96405),u=t(14951),G=t(73344),p=t(51500),{Path:h}=c.path;let b=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||p.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const r=await this.getLogsDirPath();if(!r)throw new Error("Unable to get parent log directory");const l=r,s=c.URI.file(l).toString();return await this.fileSystem.access(s)||await this.fileSystem.createFolder(s),new c.URI(r)}async provideHostStoragePath(r,l,s){const d=await this.getWorkspaceStorageDirPath(s);if(!d)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(c.URI.file(d).toString())||await this.fileSystem.createFolder(c.URI.file(d).toString());const m=await this.buildWorkspaceId(r,l,s),v=new h(d).join(m).toString();await this.fileSystem.access(c.URI.file(v).toString())||await this.fileSystem.createFolder(c.URI.file(v).toString());const f=new c.URI(v);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(f.path.toString()),this.deferredStoragePath.resolve(d),this.storagePathInitialized=!0),this.cachedStoragePath=f}async getLastWorkspaceStoragePath(){var r;return this.storagePathInitialized?(r=this.cachedStoragePath)===null||r===void 0?void 0:r.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(r){return this.hashCalculateService.calculate(r)}async buildWorkspaceId(r,l,s){const d=await this.getUserHomeDir(),m=N=>N.resolve(s||p.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${p.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(c.Schemes.file),v=N=>N.resolve(s||p.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${p.UNTITLED_WORKSPACE}`).withScheme(c.Schemes.file);if(!r){const N=v(new c.URI(d));return this.doHash(N.toString())}if(m(new c.URI(d)).toString()===r.uri){const N=l.map(W=>W.uri).sort().join(",");return this.doHash(N)}else{const N=new c.URI(r.uri);return this.doHash(N.toString())}}async getLogsDirPath(){const r=await this.loggerManager.getLogFolder();return new h(r).join(c.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(r){const l=await this.getWorkspaceDataDirPath(r);return new h(l).join(c.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(r){const l=await this.getUserHomeDir(),s=r;return new h(l).join(...c.isWindows?this.windowsDataFolders:[""],s).toString()}async getUserHomeDir(){const r=await this.fileSystem.getCurrentUserHome();if(!r)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(r.uri)}};n.__decorate([(0,a.Autowired)(u.IFileServiceClient),n.__metadata("design:type",Object)],b.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(G.ILoggerManagerClient),n.__metadata("design:type",Object)],b.prototype,"loggerManager",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(g.IHashCalculateService),n.__metadata("design:type",Object)],b.prototype,"hashCalculateService",void 0),b=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],b),e.ExtensionStoragePathServer=b},7446:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageServer=void 0;const a=t(85608),o=t(76003),c=t(43718),g=t(14951),u=t(93584),{Path:G}=c.path;let p=n=class{constructor(){this.deferredWorkspaceDataDirPath=new c.Deferred,this.storageThrottler=new c.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(b,I,r){return this.storageDelayer=new c.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(b,I,r||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(b,I){if(I)return await this.fileSystem.access(b);if(!this.storageExistPromises.has(b)){const r=this.fileSystem.access(b);this.storageExistPromises.set(b,r)}return await this.storageExistPromises.get(b)}async setupDirectories(b,I,r){const l=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(r),s=c.URI.file(l).toString();await this.fileSystem.access(s)||await this.fileSystem.createFolder(s),this.workspaceDataDirPath=l,this.globalDataPath=new G(this.workspaceDataDirPath).join(c.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const d=c.URI.file(this.globalDataPath).toString();await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const m=await this.extensionStoragePathsServer.provideHostLogPath(),v=await this.extensionStoragePathsServer.provideHostStoragePath(b,I,r);return{logUri:m.codeUri,storageUri:v.codeUri,globalStorageUri:c.Uri.file(this.globalDataPath)}}async resolveStorageTask(b){const I=Object.keys(b);for(const r of I){const l=await this.readFromFile(r);for(const{key:s,value:d}of b[r])d===void 0||(0,c.isEmptyObject)(d)?delete l[s]:l[s]=d;await this.writeToFile(r,l)}}doSet(){const b=Object.assign({},this.storageTasks);return this.storageTasks={},this.resolveStorageTask(b)}async set(b,I,r){const l=await this.getDataPath(r);if(!l)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[l]||(this.storageTasks[l]=[]),this.storageTasks[l].push({key:b,value:I}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(b,I){const r=await this.getDataPath(I);return r?(await this.readFromFile(r))[b]:{}}async getAll(b){const I=await this.getDataPath(b);return I?await this.readFromFile(I):{}}async getDataPath(b){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,b)return new G(this.globalDataPath).join("global-state.json").toString();{const I=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return I?new G(I).join("workspace-state.json").toString():void 0}}async readFromFile(b){const I=c.URI.file(b);if(!await this.asAccess(I.toString(),!0))return{};try{const{content:l}=await this.fileSystem.readFile(I.toString());return JSON.parse(l.toString())}catch(l){return this.logger.error('Failed to parse data from "',I.toString(),'". Reason:',l),{}}}async writeToFile(b,I){const r=c.URI.file(b);await this.asAccess(r.parent.toString())||await this.fileSystem.createFolder(r.parent.toString());const s=JSON.stringify(I);let d=await this.fileSystem.getFileStat(r.toString());d||(d=await this.fileSystem.createFile(r.toString())),await this.fileSystem.setContent(d,s)}};p.DEFAULT_FLUSH_DELAY=100,a.__decorate([(0,o.Autowired)(u.IExtensionStoragePathServer),a.__metadata("design:type",Object)],p.prototype,"extensionStoragePathsServer",void 0),a.__decorate([(0,o.Autowired)(g.IFileServiceClient),a.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),a.__decorate([(0,o.Autowired)(c.ILogger),a.__metadata("design:type",Object)],p.prototype,"logger",void 0),p=n=a.__decorate([(0,o.Injectable)()],p),e.ExtensionStorageServer=p},10207:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(51500),u=t(93584);let G=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const h=await this.workspaceService.roots,b=this.workspaceService.workspace,I=this.appConfig.extensionStorageDirName||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(b,h,I),this._extensionStoragePath}async updateEnvState(){await this.get(c.firstSessionDateStorageKey,!0)===void 0&&await this.set(c.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(h,b,I){return this.extensionStorageServer.set(h,b,I)}get(h,b){return this.extensionStorageServer.get(h,b)}getAll(h=!1){return this.extensionStorageServer.getAll(h)}async reConnectInit(){const h=await this.workspaceService.roots,b=this.workspaceService.workspace,I=this.appConfig.extensionStorageDirName||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(b,h,I),this._extensionStoragePath}};n.__decorate([(0,a.Autowired)(u.IExtensionStorageServer),n.__metadata("design:type",Object)],G.prototype,"extensionStorageServer",void 0),n.__decorate([(0,a.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],G.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],G.prototype,"appConfig",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.ExtensionStorageService=G},93584:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(85853),e),n.__exportStar(t(56969),e),n.__exportStar(t(23618),e)},85853:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_EXTENSION_STORAGE_DIR_NAME=e.IExtensionStoragePathServer=void 0,e.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),e.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},56969:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionStorageService=e.IExtensionStorageServer=void 0,e.IExtensionStorageServer=Symbol("ExtensionStorageServer"),e.IExtensionStorageService=Symbol("ExtensionStorageService")},23618:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},50492:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(93584),e)},57962:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivationEventServiceImpl=void 0;const n=t(85608),a=n.__importDefault(t(80076)),o=t(76003),c=t(43718);let g=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new c.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(G){return this.collectTopicData.get(G)||[]}async fireEvent(G,p=""){this.activatedEventSet.add(JSON.stringify({topic:G,data:p}));let h;if(this.wildCardTopics.has(G)?h=this.eventListeners.get(G):this.eventListeners.has(G)?h=this.eventListeners.get(G):h=this.eventListeners.get(G+":"+p),h){const b=await Promise.allSettled(h.map(I=>this.tryRun(G,p,I)));for(const I of b)I.status==="rejected"&&this.logger.error(`fire event ${G}:${p} error: ${I.reason}`)}}addWildCardTopic(G){return this.wildCardTopics.add(G),{dispose:()=>{this.wildCardTopics.delete(G)}}}onEvent(G,p){const h=G.indexOf(":");let b,I;return h===-1?(b=G,I=""):(b=G.substr(0,h),I=G.substr(h+1)),this.addListener(b,{topic:b,data:I,execute:p})}addListener(G,p){if(this.collectTopicData.set(p.topic,p.data),this.wildCardTopics.has(G))return this.eventListeners.has(G)||this.eventListeners.set(G,[]),this.eventListeners.get(G).push(p),{dispose:()=>{const h=this.eventListeners.get(G).indexOf(p);h!==-1&&this.eventListeners.get(G).splice(h,1)}};{const h=G+":"+p.data;return this.eventListeners.has(h)||this.eventListeners.set(h,[]),this.eventListeners.get(h).push(p),{dispose:()=>{const b=this.eventListeners.get(h).indexOf(p);b!==-1&&this.eventListeners.get(h).splice(b,1)}}}}async tryRun(G,p,h){this.wildCardTopics.has(G)?(0,a.default)(h.data)(p)&&await h.execute():await h.execute()}};n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],g.prototype,"logger",void 0),g=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],g),e.ActivationEventServiceImpl=g},63056:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionNoExportsView=e.ExtensionLoadingView=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(68974),g=n.__importDefault(t(17267)),u=({style:p})=>a.default.createElement("div",{style:p||{},className:g.default.kt_extension_view},a.default.createElement(c.Progress,{loading:!0}));e.ExtensionLoadingView=u;const G=(p,h)=>a.default.createElement("div",{className:g.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",p,h));e.ExtensionNoExportsView=G},56405:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PortalRoot=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(41869),g=t(87420),u=t(25600),G=p=>{var h;const[b,I]=o.default.useState(null),r=(0,c.useInjectable)(u.AbstractViewExtProcessService),l=(0,c.useInjectable)(g.IThemeService);o.default.useEffect(()=>{const d=new c.DisposableCollection;return l.getCurrentTheme().then(m=>I(m.type)),d.push(l.onThemeChange(m=>{m.type&&m.type!==b&&I(m.type)})),d.dispose.bind(d)},[]);const s=p.original;return o.default.createElement(s,Object.assign({},p.otherProps,{className:(0,a.default)((h=p.otherProps)===null||h===void 0?void 0:h.className,(0,g.getThemeTypeSelector)(b)),getContainer:()=>r.getPortalShadowRoot(p.extensionId)}))};e.PortalRoot=G},82443:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TREE_VIEW_NODE_HEIGHT=e.TreeViewNode=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(25918),G=t(93899),p=t(95422),h=t(69589),b=t(42912),I=n.__importDefault(t(50790)),r=({item:l,onClick:s,onContextMenu:d,itemType:m,leftPadding:v=8,onTwistierClick:f,decorations:N,defaultLeftPadding:W=8,treeViewId:Z,decorationService:y,draggable:E,onDragStart:R,onDragEnter:A,onDragLeave:w,onDragOver:F,onDrop:V})=>{const Y=(0,p.useInjectable)(b.IIconService),_=(0,g.useDesignStyles)(I.default.expansion_toggle,"expansion_toggle"),H=(0,g.useDesignStyles)(I.default.tree_view_node,"tree_view_node"),[X,S]=(0,o.useState)(l.uri&&y.getDecoration(l.uri,!1));(0,o.useEffect)(()=>{const ie=y.onDidChangeDecorations(he=>{l.uri&&he.affectsResource(l.uri)&&S(y.getDecoration(l.uri,!1))});return()=>{ie.dispose()}},[]);const Q=(0,p.useInjectable)(b.IThemeService),O=(0,o.useCallback)(ie=>{(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&s(ie,l,m)},[l,m,s]),M=(0,o.useCallback)(ie=>{(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&(f?f(ie,l,m):s(ie,l,m))},[l,m,f,s]),T=(0,o.useCallback)(ie=>{ie.nativeEvent.which===0||!d||(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&d(ie,l,m)},[l,m,d]),B=(0,o.useCallback)(ie=>{R&&R(ie,l)},[l,R]),x=(0,o.useCallback)(ie=>{A&&A(ie,l)},[l,A]),D=(0,o.useCallback)(ie=>{w&&w(ie,l)},[l,w]),J=(0,o.useCallback)(ie=>{F&&F(ie,l)},[l,F]),k=(0,o.useCallback)(ie=>{V&&V(ie,l)},[l,V]),z=m===c.TreeNodeType.CompositeTreeNode,P=z?`${W+(l.depth||0)*(v||0)}px`:`${W+(l.depth||0)*(v||0)+8}px`,U={height:e.TREE_VIEW_NODE_HEIGHT,lineHeight:`${e.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:P},ne=(ie,he)=>N&&N?.classlist.indexOf(I.default.mod_loading)>-1?o.default.createElement(c.Loading,null):o.default.createElement("div",{onClick:he,className:(0,a.default)(I.default.tree_view_node_segment,_,(0,g.getIcon)("arrow-right"),{[`${I.default.mod_collapsed}`]:!ie.expanded})}),re=ie=>o.default.createElement("div",{className:(0,a.default)(I.default.file_icon,ie.icon),style:{maxHeight:e.TREE_VIEW_NODE_HEIGHT}}),ae=ie=>{const he=()=>{if(ie.highlights){let ee=[],j=0;const te=ie.highlights.sort((oe,ce)=>oe[0]-ce[0]);return ee=te.map((oe,ce)=>{const[Ie,Ge]=oe,se=ie.displayName.slice(j,Ie);j=Ge;const me=ie.displayName.slice(Ie,Ge),ve=[o.default.createElement("span",{key:`line_begin_${ce}_${se}`},se),o.default.createElement("span",{className:I.default.highlight,key:`line_hightlight_${ce}_${me}`},me)];if(ce===te.length-1){const We=ie.displayName.slice(Ge);ve.push(o.default.createElement("span",{key:`line_end_${ce}_${We}`},We))}return ve}),ee}else return ie.displayName};return o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment,I.default.tree_view_node_displayname,ie.strikethrough&&I.default.strikethrough)},he())},ue=()=>o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment,I.default.tree_view_node_tail)},$()),$=()=>{if(l.actions.length>0)return o.default.createElement("div",{className:I.default.tree_view_actions},o.default.createElement(u.TitleActionList,{className:I.default.inlineMenu,context:[{treeViewId:Z,treeItemId:l.treeItemId}],nav:l.actions,menuId:G.MenuId.ViewItemContext}))},pe=ie=>{if(z)return ne(ie,M)},ge=()=>l.tooltip||l.name,q=ie=>o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment_grow,I.default.tree_view_node_description)},!ie.name&&!ie.description?"\u2014\u2014":ie.description),le=()=>{if(!X)return null;const ie=X.badge||"",he=X.color,ee=he&&Q.getColor({id:he});return o.default.createElement("div",{className:I.default.tree_view_node_tail,style:{color:ee}},(0,h.transformLabelWithCodicon)(ie.slice(),{},Y.fromString.bind(Y)))};return o.default.createElement("div",{key:l.id,onClick:O,onContextMenu:T,onDragStart:B,onDragOver:J,onDragEnter:x,onDragLeave:D,onDrop:k,title:ge(),className:(0,a.default)(H,N?N.classlist:null),"data-id":l.id,style:U,draggable:E},o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_content)},pe(l),re(l),o.default.createElement("div",{className:I.default.tree_view_node_overflow_wrap},ae(l),q(l)),ue(),le()))};e.TreeViewNode=r,e.TREE_VIEW_NODE_HEIGHT=22},81302:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTabBarTreeView=void 0;const n=t(85608),a=t(25150),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(68974),G=t(41893),p=t(24429),h=t(72260),b=t(82443),I=n.__importDefault(t(17267));e.ExtensionTabBarTreeView=(0,a.observer)(({viewState:s,model:d,dataProvider:m,treeViewId:v})=>{const f=(0,g.useInjectable)(h.IMainLayoutService),N=(0,g.useInjectable)(G.IDecorationsService),W=(0,o.useMemo)(()=>f.getViewAccordionService(v),[]),Z=(0,o.useMemo)(()=>{const B=W?.getViewState(v);return B?!B.collapsed&&!B.hidden:!1},[W]),{height:y}=s,{canSelectMany:E}=d.treeViewOptions||{},R=(0,o.useRef)(null),A=(0,o.useCallback)(B=>{d.handleTreeHandler(Object.assign(Object.assign({},B),{getModel:()=>d.treeModel,hasDirectFocus:()=>R.current===document.activeElement}))},[d]),w=(0,o.useCallback)((B,x)=>{B.stopPropagation();const{toggleDirectory:D}=d;D(x)},[d]),F=(0,o.useCallback)(B=>V(B)?!1:B.shiftKey,[]),V=(0,o.useCallback)(B=>{const{metaKey:x,ctrlKey:D}=B;return g.isOSX&&x||D},[]),Y=(0,o.useCallback)((B,x,D)=>{B.stopPropagation();const{handleItemClick:J,handleItemToggleClick:k,handleItemRangeClick:z}=d;if(!x)return;const P=F(event),U=V(event);E?P?z(x,D):U?k(x,D):J(x,D):J(x,D)},[E,d]),_=(0,o.useCallback)((B,x)=>{const{handleContextMenu:D}=d;D(B,x)},[d]),H=B=>{const{handleContextMenu:x}=d;x(B)},X=(0,o.useCallback)(()=>{const{enactiveNodeDecoration:B}=d;B()},[d]),S=(0,o.useCallback)((B,x)=>{const{handleDragStart:D}=d;D(B,x)},[d]),Q=(0,o.useCallback)((B,x)=>{const{handleDragOver:D}=d;D(B,x)},[d]),O=(0,o.useCallback)((B,x)=>{const{handleDragEnter:D}=d;D(B,x)},[d]),M=(0,o.useCallback)((B,x)=>{const{handleDrop:D}=d;D(B,x)},[d]),T=(0,o.useCallback)((B,x)=>{const{handleDragLeave:D}=d;D(B,x)},[d]);return(0,o.useEffect)(()=>{var B;const x=()=>{d.handleTreeBlur()};return(B=R.current)===null||B===void 0||B.addEventListener("blur",x,!0),()=>{var D;(D=R.current)===null||D===void 0||D.removeEventListener("blur",x,!0)}},[R.current]),o.default.createElement("div",{className:I.default.kt_extension_view,tabIndex:-1,ref:R,onContextMenu:H,onClick:X,"data-tree-view-id":v},o.default.createElement(l,{height:y,isVisible:Z,handleTreeReady:A,handleItemClicked:Y,handleTwistierClick:w,handleContextMenu:_,handleDragStart:S,handleDragOver:Q,handleDragEnter:O,handleDragLeave:T,handleDrop:M,draggable:d.draggable,treeViewId:v,model:d,dataProvider:m,decorationService:N}))});function r(s,d){return s.isVisible===d.isVisible&&s.model===d.model&&s.treeViewId===d.treeViewId&&s.height===d.height}const l=(0,o.memo)(({model:s,treeViewId:d,height:m,isVisible:v,dataProvider:f,handleTreeReady:N,handleItemClicked:W,handleTwistierClick:Z,handleContextMenu:y,handleDragStart:E,handleDragOver:R,handleDragEnter:A,handleDragLeave:w,handleDrop:F,draggable:V,decorationService:Y})=>{const[_,H]=(0,o.useState)(!1),[X,S]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let O=!1;return(async()=>(await s.whenReady,s.treeModel&&v&&await s.treeModel.ensureReady,O||H(!0)))(),()=>{O=!0,s&&s.removeNodeDecoration()}},[s,v]),(0,o.useEffect)(()=>{const O=f.onDidChangeEmpty(()=>{f.isTreeEmpty!==X&&S(f.isTreeEmpty)});return()=>O.dispose()},[]);const Q=(0,o.useCallback)(O=>o.default.createElement(b.TreeViewNode,{item:O.item,itemType:O.itemType,decorations:s.decorations.getDecorations(O.item),onClick:W,onTwistierClick:Z,onContextMenu:y,onDragStart:E,onDragOver:R,onDragEnter:A,onDragLeave:w,onDrop:F,defaultLeftPadding:8,leftPadding:8,treeViewId:d,draggable:V,decorationService:Y}),[s.treeModel]);if(_){if(X)return o.default.createElement(p.WelcomeView,{viewId:d});if(s.treeModel)return o.default.createElement(c.RecycleTree,{height:m,itemHeight:b.TREE_VIEW_NODE_HEIGHT,onReady:N,model:s.treeModel},Q)}else return o.default.createElement(u.Progress,{loading:!0});return null},r);l.displayName="ExtensionsTreeView"},88341:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionWebviewView=e.WebviewViewShouldShowEvent=void 0;const a=t(85608).__importDefault(t(14041)),o=t(41869),c=t(99220);class g extends o.BasicEvent{}e.WebviewViewShouldShowEvent=g;const u=({viewId:G})=>{const p=a.default.useRef(null),h=(0,o.useInjectable)(o.IEventBus),b=(0,o.useInjectable)(c.ExtensionService);return a.default.useEffect(()=>{const I=new o.CancellationTokenSource,r=new o.Disposable({dispose:()=>I.cancel()});return b.eagerExtensionsActivated.promise.then(()=>{I.token.isCancellationRequested||p.current&&h.fire(new g({viewType:G,container:p.current,title:"",cancellationToken:I.token,disposer:r}))}),()=>{r.dispose()}},[]),a.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:p})};e.ExtensionWebviewView=u},17428:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(81302),e),n.__exportStar(t(63056),e)},21167:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkthroughsEditorView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(93374),G=t(52416),p=t(99220),h=t(17441),b=n.__importDefault(t(42076)),I=({resource:{uri:d}})=>{const m=(0,g.useInjectable)(h.WalkthroughsService),v=(0,g.useInjectable)(g.IContextKeyService),{query:f,authority:N}=d,[W,Z]=(0,o.useState)(),[y,E]=(0,o.useState)();(0,o.useEffect)(()=>{W&&W.steps.length>0&&(y||E(W.steps[0].id))},[W,y]),(0,o.useEffect)(()=>{f&&Z(m.getWalkthrough(f))},[f,W]);const R=(0,o.useCallback)(()=>{var A;return W&&((A=W.steps.find(w=>w.id===y))===null||A===void 0?void 0:A.media)},[y,W]);return o.default.createElement("div",{className:b.default.getting_started_container},o.default.createElement("div",{className:b.default.getting_started_detailsContent},o.default.createElement("div",{className:b.default.category_container},o.default.createElement("div",{className:b.default.category_icon},W&&W.icon.type==="image"&&o.default.createElement("img",{src:W.icon.path})),o.default.createElement("div",{className:b.default.category_description_container},o.default.createElement("h2",{className:b.default.category_title},W?.title),o.default.createElement("div",{className:b.default.category_description},W?.description))),o.default.createElement("div",{className:b.default.steps_container},o.default.createElement("div",{className:b.default.getting_started_detail_container},o.default.createElement("div",{className:b.default.step_list_container},W?W.steps.filter(A=>v.match(A.when)).map(A=>o.default.createElement(r,{key:A.id,step:A,isExpanded:A.id===y,onSelected:E})):null))),o.default.createElement("div",{className:b.default.getting_started_media},y&&o.default.createElement(l,{media:R(),extensionId:N,stepId:y}))))};e.WalkthroughsEditorView=I;const r=({step:d,isExpanded:m,onSelected:v})=>{const f=(0,g.useInjectable)(g.IOpenerService),N=(0,g.useInjectable)(h.WalkthroughsService),W=(0,g.useInjectable)(G.IIconService),[Z,y]=(0,o.useState)(!1),{description:E}=d;(0,o.useEffect)(()=>{const V=N.onDidProgressStep(Y=>{const{id:_,done:H}=Y;_===d.id&&H&&y(H)});return()=>V.dispose()},[]);const R=(0,o.useCallback)(()=>{y(!Z),N.progressByEvent(p.CompletionEventsType.stepSelected+":"+d.id)},[Z,d.id]),A=(0,o.useCallback)(V=>{const{href:Y}=V;f.open(Y),/^http(s)?:\/\//.test(Y)&&N.progressByEvent(p.CompletionEventsType.onLink+":"+Y)},[]),w=(0,o.useCallback)(()=>{if(E.length===0)return null;const V=[];return E.map((Y,_)=>{if(Y.nodes.length===1&&typeof Y.nodes[0]!="string"){const H=Y.nodes[0];V.push(o.default.createElement("div",{key:_.toString()+V.length,title:H.title},o.default.createElement(c.Button,{onClick:()=>A(H)},(0,g.transformLabelWithCodicon)(H.label,{},W.fromString.bind(W)))))}else{const H=Y.nodes.map((X,S)=>typeof X=="string"?X:o.default.createElement("a",{key:X.label+"#"+S,title:X.title,onClick:()=>A(X)},X.label));V.push(o.default.createElement("p",{key:_.toString()+V.length.toString()+H.length.toString()},H))}}),o.default.createElement("div",{className:b.default.step_description_container},o.default.createElement(o.default.Fragment,null,V))},[E]),F=(0,o.useCallback)(()=>(0,g.transformLabelWithCodicon)(d.title,{},W.fromString.bind(W)),[d.title]);return o.default.createElement("div",{className:(0,a.default)(b.default.getting_started_step,m&&b.default.expanded),onClick:()=>v(d.id)},o.default.createElement("div",{className:b.default.checkbox},o.default.createElement(c.CheckBox,{id:d.id,onChange:R,checked:Z})),o.default.createElement("div",{className:b.default.step_container},o.default.createElement("h3",{className:b.default.step_title},F()),m&&w()))},l=({media:d,extensionId:m,stepId:v})=>{const f=(0,g.useInjectable)(G.IThemeService),N=(0,g.useInjectable)(h.WalkthroughsService),[W,Z]=(0,o.useState)(""),[y,E]=(0,o.useState)(""),R=(0,o.useCallback)(async A=>d?.type==="image"?"":A?(await N.getFileContent(m,A)).toString():"",[d]);if((0,o.useEffect)(()=>{const A=N.getStepsByExtension(v);A&&(d&&d.type==="svg"&&A.media.svg&&R(A.media.svg).then(Z),d&&d.type==="markdown"&&A.media.markdown&&R(A.media.markdown).then(E))},[d,v]),!d)return null;if(d.type==="image"){const A=f.getCurrentThemeSync().type,w=d.path[A].toString(!0).replace(/ /g,"%20");return o.default.createElement(o.default.Fragment,null,o.default.createElement("img",{alt:d.altText,srcSet:w.toLowerCase().endsWith(".svg")?w:w+" 1.5x"}))}return d.type==="svg"?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:b.default.media_svg_container,dangerouslySetInnerHTML:{__html:W}})):d.type==="markdown"?o.default.createElement(o.default.Fragment,null,o.default.createElement(s,{content:y,media:d})):null},s=({content:d,media:m})=>{const v=(0,g.useInjectable)(g.IOpenerService);if(m.type!=="markdown")return null;const f=(0,o.useCallback)(()=>m.base.resolve("/").toString(),[m,d]);return o.default.createElement(u.Markdown,{content:d,options:{baseUrl:f()},onLinkClick:N=>v.open(N)})}},87444:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtCommandManagementImpl=void 0;const n=t(85608),a=t(76003),o=t(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(u,G){this.proxyCommandExecutorRegistry.set(u,G)}async executeExtensionCommand(u,G,p){const h=this.proxyCommandExecutorRegistry.get(u);if(!h)throw new Error('Proxy command executor "'+u+'" is not existed');return h.$executeExtensionCommand(G,...p)}registerExtensionCommandEnv(u,G="node"){return this.commandEnvRegistry.set(u,G),{dispose:()=>{this.commandEnvRegistry.delete(u)}}}getExtensionCommandEnv(u){return this.commandEnvRegistry.get(u)}};c=n.__decorate([(0,a.Injectable)()],c),e.ExtCommandManagementImpl=c},49413:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtInstanceManagementService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(99220),u=t(42734);let G=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 h of this.extensionMap.values())h.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(h){h.forEach(b=>{this.extensionMap.has(b)&&this.extensionMap.get(b).dispose()})}resetExtensionInstances(){for(const h of this.extensionMap.values())h.reset()}getExtensionInstanceByPath(h){return this.extensionMap.get(h)}getExtensionInstanceByExtId(h){for(const b of this.extensionMap.values())if(b.id===h)return b}deleteExtensionInstanceByPath(h){this.extensionMap.delete(h),this.onDidChangeEmitter.fire()}addExtensionInstance(h){this.extensionMap.set(h.path,h),this.onDidChangeEmitter.fire()}async checkExtensionEnable(h){await this.whenReady;const b=this.globalStorage.get(h.extensionId,g.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(h.extensionId,b)===g.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(h,b,I){const r=typeof h=="string"?await this.extensionNodeClient.getExtension(h,(0,c.getLanguageId)(),{}):h;if(r)return this.injector.get(u.Extension,[r,await this.checkExtensionEnable(r),b||(this.appConfig.extensionDir?r.realPath.startsWith(this.appConfig.extensionDir):!1),!!I])}checkIsBuiltin(h){const b=this.getExtensionCandidateByPath(h.realPath);return(this.appConfig.extensionDir?h.realPath.startsWith(this.appConfig.extensionDir):!1)||(b?b.isBuiltin:!1)}checkIsDevelopment(h){const b=this.getExtensionCandidateByPath(h.realPath);return!!b?.isDevelopment}getExtensionCandidateByPath(h){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find(b=>b.path===h)}};n.__decorate([(0,a.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],G.prototype,"storageProvider",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],G.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],G.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(g.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],G.prototype,"extensionNodeClient",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.ExtInstanceManagementService=G},98453:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(14951),g=t(99220),u=t(82389),G=t(71354),p=t(35321);let h=class extends o.WithEventBus{async getExtensionProps(I,r){const l=await this.extensionNodeClient.getExtension(I,(0,o.getLanguageId)(),r);if(l){const s=this.getExtensionByPath(I);if(s)return Object.assign(Object.assign({},s.toJSON()),{extraMetadata:l.extraMetadata})}}getExtensionByPath(I){return this.extInstanceManagementService.getExtensionInstances().find(r=>I===r.path)}getExtensionByExtId(I){return this.extInstanceManagementService.getExtensionInstances().find(r=>I===r.id)}async postChangedExtension(I,r,l){const{upgrade:s,extensionPath:d,oldExtensionPath:m,isBuiltin:v}=typeof I=="boolean"?{upgrade:I,extensionPath:r,oldExtensionPath:l,isBuiltin:!1}:I,f=this.extInstanceManagementService.getExtensionInstanceByPath(d);if(f){this.logger.warn(`Extension ${f.id} already exists, skip activate`);return}const N=await this.extInstanceManagementService.createExtensionInstance(d,!!v);if(N)return s&&this.disableExtension(m),await this.enableExtension(N)}async postEnableExtension(I){const r=await this.extInstanceManagementService.getExtensionInstanceByPath(I);if(r)return await this.enableExtension(r)}async postDisableExtension(I){return this.disableExtension(I)}async postUninstallExtension(I){return this.uninstallExtension(I)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(I=>I.toJSON())}disableExtension(I){const r=this.extInstanceManagementService.getExtensionInstanceByPath(I);r&&(r.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(I))}async enableExtension(I){this.extInstanceManagementService.addExtensionInstance(I),I.enable(),await I.initialize(),this.eventBus.fire(new G.ExtensionDidEnabledEvent(I.toJSON())),this.sumiContributesService.register(I.id,I.packageJSON.sumiContributes||{}),this.contributesService.register(I.id,I.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(I){try{return await this.fileService.delete(o.URI.file(I).toString()),!0}catch(r){return this.logger.error(r),!1}}async uninstallExtension(I){const r=this.extInstanceManagementService.getExtensionInstanceByPath(I);r&&(r.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(I)),await this.removeExtension(I),this.eventBus.fire(new G.ExtensionDidUninstalledEvent)}};n.__decorate([(0,a.Autowired)(G.AbstractExtInstanceManagementService),n.__metadata("design:type",G.AbstractExtInstanceManagementService)],h.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,a.Autowired)(g.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],h.prototype,"extensionNodeClient",void 0),n.__decorate([(0,a.Autowired)(p.VSCodeContributesServiceToken),n.__metadata("design:type",p.VSCodeContributesService)],h.prototype,"contributesService",void 0),n.__decorate([(0,a.Autowired)(u.SumiContributionsServiceToken),n.__metadata("design:type",u.SumiContributionsService)],h.prototype,"sumiContributesService",void 0),n.__decorate([(0,a.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),h=n.__decorate([(0,a.Injectable)()],h),e.ExtensionManagementService=h},20670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeExtProcessService=void 0;const n=t(85608),a=t(76003),o=t(8919),c=t(18740),g=t(41869),u=t(99220),G=t(72464),p=t(46147),h=t(37846),b=t(28949),I=t(51072),r=t(17802);let l=class{constructor(){this._apiFactoryDisposables=new g.DisposableStore,this.ready=new g.Deferred,this._extHostUpdated=new g.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(d,m){!this.appConfig.noExtHost&&!m&&(await this._extHostUpdated.promise,await(await this.getProxy()).$activateExtension(d.id))}async updateExtensionData(d){if(this.extensions=d,this.protocol){const m=await this.getProxy();await m.$updateExtHostData(),m.$fireChangeEvent()}}getExtension(d){return this.extensions.find(m=>m.id===d)}async $activateExtension(d){const m=this.extensions.find(v=>v.path===d);m&&await m.activate()}async $getExtensions(){return this.extensions.map(d=>d.toJSON())}async getProxy(){return await this.ready.promise,this.protocol.getProxy(p.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const d=(0,r.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(d),this._apiFactoryDisposables.add((0,g.toDisposable)((0,I.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,g.toDisposable)((0,b.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await d.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const d=new g.Disposable,m=this.mainThreadExtenderContributionProvider.getContributions();for(const f of m)f.registerMainThreadExtender(this.mainThreadExtenderService);const v=this.mainThreadExtenderService.getMainThreadExtenders();for(const f of v){const N=this.injector.get(f.serviceClass,[this.protocol]);this.protocol.set(f.identifier,N),d.addDispose(N)}return d}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 d,m;this.channel&&this.channel.dispose(),this.protocol&&((m=(d=this.protocol).dispose)===null||m===void 0||m.call(d)),this.channel=await this.channelHandler.openChannel(u.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)(h.knownProtocols)})}};n.__decorate([(0,a.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],l.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(u.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],l.prototype,"extensionNodeClient",void 0),n.__decorate([(0,a.Autowired)(g.IApplicationService),n.__metadata("design:type",Object)],l.prototype,"applicationService",void 0),n.__decorate([(0,a.Autowired)(c.WSChannelHandler),n.__metadata("design:type",c.WSChannelHandler)],l.prototype,"channelHandler",void 0),n.__decorate([(0,a.Autowired)(G.IMainThreadExtenderService),n.__metadata("design:type",Object)],l.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,a.Autowired)(G.MainThreadExtenderContribution),n.__metadata("design:type",Object)],l.prototype,"mainThreadExtenderContributionProvider",void 0),l=n.__decorate([(0,a.Injectable)()],l),e.NodeExtProcessService=l},90731:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewExtProcessService=void 0;const a=t(85608),o=t(76003),c=t(65973),g=t(8919),u=t(41869),G=t(40827),p=t(43718),h=t(61656),b=t(99220),I=t(25600),r=t(17428),l=t(54107),s=t(9438),d=t(8403),m=t(31738),{Path:v,posix:f}=u.path,N="load";let W=n=class extends p.Disposable{constructor(){super(...arguments),this.debugLogger=(0,p.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(y){return this.extensions.find(E=>E.id===y)}async initExtension(y){this.extensions=y}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(y){}async $getExtensions(){return this.extensions.map(y=>y.toJSON())}async disposeProcess(){}activate(){const y=this.requireInterceptorContributionProvider.getContributions();for(const E of y)E.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(y,E)=>{let R,A=`Error: ${y.message}`;for(const w of E)if(A+=`
|
|
28075
|
+
`}async provideEditorDocumentModelContent(I,r){return""}isReadonly(I){return!1}isAlwaysDirty(I){return!0}disposeEvenDirty(I){return!0}closeAutoSave(I){return!0}async saveDocumentModel(I,r,l,s,d,m=!1){const{name:v}=I.getParsedQuery(),f=I.path.toString()!=="/"?o.path.dirname(I.path.toString()):this.appConfig.workspaceDir,N=await this.commandService.tryExecuteCommand("file.save",{showNameInput:!0,defaultFileName:v||I.displayName,defaultUri:o.URI.file(o.isWindows?f.replaceAll("\\","/"):f)});return N&&(await this.editorDocumentModelService.saveEditorDocumentModel(N,r,l,s,d,m),await this.workbenchEditorService.open(N,{preview:!1,focus:!0,replace:!0,forceClose:!0})),{state:o.SaveTaskResponseState.SUCCESS}}onDidDisposeModel(){}};n.__decorate([(0,a.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"editorDocumentModelService",void 0),n.__decorate([(0,a.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],p.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],p.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],p.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],p.prototype,"applicationService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),p=n.__decorate([(0,a.Injectable)()],p),e.UntitledSchemeDocumentProvider=p;let h=class extends o.WithEventBus{constructor(){super(...arguments),this.scheme=o.Schemes.untitled}provideResource(I){const{name:r}=I.getParsedQuery();return{name:r||I.displayName,uri:I,icon:"",metadata:null}}async shouldCloseResourceWithoutConfirm(I){const r=this.documentModelService.getModelDescription(I.uri,"close-resource-check");return!!(r&&r.dirty)}async close(I,r){const l=this.documentModelService.getModelReference(I.uri,"close-resource-check");if(!l)return!1;if(r===g.AskSaveResult.SAVE){const s=await l.instance.save();return l.dispose(),s}else return r===g.AskSaveResult.REVERT?(await l.instance.revert(),l.dispose(),!0):!r||r===g.AskSaveResult.CANCEL?(l.dispose(),!1):(l.dispose(),!0)}async shouldCloseResource(I){const r=this.documentModelService.getModelDescription(I.uri,"close-resource-check");if(!r||!r.dirty)return!0;const l={[(0,o.localize)("file.prompt.dontSave","Don't Save")]:g.AskSaveResult.REVERT,[(0,o.localize)("file.prompt.save","Save")]:g.AskSaveResult.SAVE,[(0,o.localize)("file.prompt.cancel","Cancel")]:g.AskSaveResult.CANCEL},s=await this.dialogService.open((0,o.formatLocalize)("saveChangesMessage",I.name),o.MessageType.Info,Object.keys(l));return await this.close(I,l[s])}};n.__decorate([(0,a.Autowired)(c.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,a.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],h.prototype,"documentModelService",void 0),h=n.__decorate([(0,a.Injectable)()],h),e.UntitledSchemeResourceProvider=h},33835:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditor=void 0;const a=t(85608).__importDefault(t(14041)),o=t(41869),c=t(23418),g=t(96689),u=G=>{const p=a.default.useRef(),h=(0,o.useInjectable)(c.EditorCollectionService),b=(0,o.useInjectable)(g.IEditorDocumentModelService),[I,r]=a.default.useState(void 0),[l,s]=a.default.useState(void 0),[d,m]=a.default.useState(void 0),[v,f]=a.default.useState(void 0);let N=!1;return a.default.useEffect(()=>{if(p.current){I&&I.dispose();const W=h.createCodeEditor(p.current,Object.assign({automaticLayout:!0},G.options));r(W),l&&W.open(l)}return()=>{N=!0,I&&I.dispose(),l&&l.dispose()}},[p.current]),G&&I&&G.editorRef&&G.editorRef(I),d&&v!==d&&(f(d),b.createModelReference(new o.URI(d),"editor-react-component").then(W=>{l&&l.dispose(),!N&&W.instance.uri.toString()===d?s(W):W.dispose()})),l&&I&&I.currentDocumentModel!==l.instance&&I.open(l),G.uri&&G.uri.toString()!==d&&m(G.uri.toString()),a.default.createElement("div",Object.assign({ref:W=>W&&(p.current=W)},G))};e.CodeEditor=u},50674:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useUpdateOnGroupTabChange=void 0;const n=t(41869);function a(o){return(0,n.useUpdateOnEvent)(o.onDidEditorGroupTabChanged,[o])}e.useUpdateOnGroupTabChange=a},6670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorSuggestWidgetContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(38144);let u=class{contribute(p){const h=new o.DisposableCollection,b=p.monacoEditor.getContribution(g.SuggestController.ID);if(b&&b.widget&&b.widget.value){const I=b.widget.value;h.push(I.onDidSelect(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidSelect",data:r}))})),h.push(I.onDidHide(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidHide",data:r}))})),h.push(I.onDidShow(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidShow",data:r}))})),h.push(I.onDidFocus(r=>{this.eventBus.fire(new o.SuggestEvent({eventType:"onDidFocus",data:r}))})),I&&I._setDetailsVisible&&I._setDetailsVisible(this.preferenceService.get("editor.suggest.details.visible",!0))}return h}};n.__decorate([(0,a.Autowired)(c.IEventBus),n.__metadata("design:type",Object)],u.prototype,"eventBus",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],u.prototype,"preferenceService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.EditorSuggestWidgetContribution=u},67903:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTopPaddingContribution=void 0;class t{contribute(a){return a.monacoEditor.onDidChangeModel(()=>{a.monacoEditor.changeViewZones(o=>{o.addZone({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:0})})})}}e.EditorTopPaddingContribution=t},51553:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroup=e.WorkbenchEditorServiceImpl=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(91830),u=t(75524),G=t(43718),p=n.__importStar(t(20868)),h=t(72665),b=t(23418),I=t(96689),r=t(76759),l=t(47049),s=t(82196),d=t(17878),m=10,v=y=>!!(y.supportsRevive&&!y.deleted);let f=class extends G.WithEventBus{constructor(){super(),this.editorGroups=[],this._onDidEditorGroupsChanged=new G.Emitter,this.onDidEditorGroupsChanged=this._onDidEditorGroupsChanged.event,this._sortedEditorGroups=[],this._onActiveResourceChange=new G.Emitter,this.onActiveResourceChange=this._onActiveResourceChange.event,this._onActiveEditorUriChange=new G.Emitter,this.onActiveEditorUriChange=this._onActiveEditorUriChange.event,this._onCursorChange=new G.Emitter,this.onCursorChange=this._onCursorChange.event,this._onDidCurrentEditorGroupChanged=new G.Emitter,this.onDidCurrentEditorGroupChanged=this._onDidCurrentEditorGroupChanged.event,this._restoring=!0,this.contributionsReady=new G.Deferred,this.untitledCloseIndex=[],this.gridReady=!1,this._onDidGridReady=new G.Emitter,this.onDidGridReady=this._onDidGridReady.event,this.editorGroupIdGen=0,this.initialize()}setEditorContextKeyService(E){this.editorContextKeyService=E}setCurrentGroup(E){var R;if(E){if(this._currentEditorGroup===E)return;this._currentEditorGroup=E,this._onActiveResourceChange.fire(E.currentResource),this.eventBus.fire(new s.EditorActiveResourceStateChangedEvent({resource:E.currentResource,openType:E.currentOpenType,editorUri:(R=this.currentEditor)===null||R===void 0?void 0:R.currentUri})),this._onDidCurrentEditorGroupChanged.fire(this._currentEditorGroup)}}onEditorGroupChangeEvent(E){var R;E.payload.group===this.currentEditorGroup&&this.eventBus.fire(new s.EditorActiveResourceStateChangedEvent({resource:E.payload.newResource,openType:E.payload.newOpenType,editorUri:(R=this.currentEditor)===null||R===void 0?void 0:R.currentUri}))}getAllOpenedUris(){const E=[];for(const R of this.editorGroups)for(const A of R.resources)E.findIndex(F=>F.isEqual(A.uri))===-1&&E.push(A.uri);return E}async getAllOpenedDocuments(){const E=[];for(const R of this.editorGroups)for(const A of R.resources){if(A.uri.scheme!=="file")continue;if(E.findIndex(F=>F.uri.isEqual(A.uri))===-1){const F=await R.getDocumentModelRef(A.uri);F&&E.push(F.instance)}}return E}async saveAll(E,R){for(const A of this.editorGroups)await A.saveAll(E,R)}hasDirty(){for(const E of this.editorGroups)if(E.hasDirty())return!0;return!1}calcDirtyCount(){const E=new Set;return this.editorGroups.reduce((R,A)=>R+A.calcDirtyCount(E),0)}createEditorGroup(){const E=this.injector.get(N,[this.generateRandomEditorGroupName(),this.editorGroupIdGen++]);this.editorGroups.push(E);const R=new G.Disposable(E.onDidEditorGroupBodyChanged(()=>{E===this.currentEditorGroup&&(!E.currentOpenType&&E.currentResource||this._onActiveResourceChange.fire(E.currentResource))}),E.onDidEditorFocusChange(()=>{var w;E===this.currentEditorGroup&&(!E.currentOpenType&&E.currentResource||this._onActiveEditorUriChange.fire((w=E.currentOrPreviousFocusedEditor)===null||w===void 0?void 0:w.currentUri))}));E.addDispose({dispose:()=>{R.dispose()}});const A=E.onDidEditorGroupTabChanged(()=>{this.saveOpenedResourceState()});return E.addDispose({dispose:()=>{A.dispose()}}),E.onCurrentEditorCursorChange(w=>{this._currentEditorGroup===E&&this._onCursorChange.fire(w)}),E}generateRandomEditorGroupName(){let E=(0,G.makeRandomHexString)(5);for(;this.editorGroups.findIndex(R=>R.name===E)!==-1;)E=(0,G.makeRandomHexString)(5);return E}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(G.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(E,R){await this.initialize();let A=this.currentEditorGroup,w;if(R&&typeof R.groupIndex<"u"?w=R.groupIndex:R&&R.relativeGroupIndex&&(w=this.currentEditorGroup.index+R.relativeGroupIndex),typeof w=="number"&&w>=0){if(w>=this.editorGroups.length)return A.open(E,Object.assign({},R,{split:b.EditorGroupSplitAction.Right}));A=this.sortedEditorGroups[w]||this.currentEditorGroup}return A.open(E,R)}async openUris(E){await this.initialize(),await this.currentEditorGroup.openUris(E)}getEditorGroup(E){return this.editorGroups.find(R=>R.name===E)}get currentResource(){return this.currentEditorGroup?this.currentEditorGroup.currentResource:null}removeGroup(E){const R=this.editorGroups.findIndex(A=>A===E);if(R!==-1){if(this.editorGroups.length===1)return;this.editorGroups.splice(R,1),this.currentEditorGroup===E&&this.setCurrentGroup(this.editorGroups[0]);for(let A=R;A<this.editorGroups.length;A++)this.eventBus.fire(new s.EditorGroupIndexChangedEvent({group:this.editorGroups[A],index:A}))}}async saveOpenedResourceState(){if(this._restoring)return;const E=this.topGrid.serialize();await this.openedResourceState.set("grid",E)}prepareContextKeyService(){const E=A=>{let w=null;const F=this.documentModelManager.getModelDescription(A,"resourceContextKey");return F&&(w=F.languageId),w},R=new g.ResourceContextKey(this.editorContextKeyService,A=>{const w=E(A);return w||E(A)});this.onActiveResourceChange(A=>{this.currentEditor&&this.currentEditor.currentUri?R.set(this.currentEditor.currentUri):A?R.set(A.uri):R.reset()}),this.currentEditor&&this.currentEditor.currentUri?R.set(this.currentEditor.currentUri):this.currentResource?R.set(this.currentResource.uri):R.reset()}onDomCreated(E){this.editorContextKeyService&&this.editorContextKeyService.attachToDomNode(E)}notifyGroupChanged(){this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}async restoreState(){let E={editorGroup:{uris:[],previewIndex:-1}};this.appConfig.disableRestoreEditorGroupState||(E=this.openedResourceState.get("grid",E)),this.topGrid=new l.EditorGrid,this.addDispose(this.topGrid),this.addDispose(this.topGrid.onDidGridAndDesendantStateChange(()=>{this._sortedEditorGroups=void 0,this._onDidEditorGroupsChanged.fire()}));const R=[],A=this.topGrid.deserialize(E,()=>this.createEditorGroup(),R).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(R).then(()=>{this._restoring=!1;for(const w of this.contributions.getContributions())w.onDidRestoreState&&w.onDidRestoreState()}),A}async closeAll(E,R){for(const A of this.editorGroups.slice(0))E?await A.close(E,{force:R}):await A.closeAll()}async closeAllOnlyConfirmOnce(){const E=[];for(const H of this.editorGroups)for(const X of H.resources)E.push(X);const A=(await Promise.all(E.map(async H=>({shouldClose:await this.resourceService.shouldCloseResourceWithoutConfirm(H),resource:H})))).filter(H=>H.shouldClose);if(A.length===0)return!1;const w={[(0,G.localize)("file.prompt.dontSave","Don't Save")]:s.AskSaveResult.REVERT,[(0,G.localize)("file.prompt.save","Save")]:s.AskSaveResult.SAVE,[(0,G.localize)("file.prompt.cancel","Cancel")]:s.AskSaveResult.CANCEL};let V=A.slice(0,m).map(H=>H.resource.name).join("\u3001");A.length>m&&(A.length-m===1?V+=(0,G.localize)("file.prompt.more.one"):V+=(0,G.formatLocalize)("file.prompt.more.number",A.length-m));const Y=await this.dialogService.open((0,c.toMarkdown)((0,G.formatLocalize)("saveNFilesChangesMessage",A.length,V),this.openner),G.MessageType.Info,Object.keys(w)),_=w[Y];return _===s.AskSaveResult.SAVE?(await Promise.all(A.map(H=>{var X,S;return(S=(X=this.resourceService).close)===null||S===void 0?void 0:S.call(X,H.resource,s.AskSaveResult.SAVE)})),!1):_===s.AskSaveResult.REVERT?(await Promise.all(A.map(H=>{var X,S;return(S=(X=this.resourceService).close)===null||S===void 0?void 0:S.call(X,H.resource,s.AskSaveResult.REVERT)})),!1):!0}async close(E,R){return this.closeAll(E,R)}get sortedEditorGroups(){return this._sortedEditorGroups||(this._sortedEditorGroups=[],this.topGrid.sortEditorGroups(this._sortedEditorGroups)),this._sortedEditorGroups}handleOnCloseUntitledResource(E){if(E.payload.resource.uri.scheme===G.Schemes.untitled){const{index:R}=E.payload.resource.uri.getParsedQuery();this.untitledCloseIndex.push(parseInt(R,10)),this.untitledCloseIndex.sort((A,w)=>A-w)}}createUntitledURI(){const E=this.untitledCloseIndex.shift()||this.untitledIndex.id;return new G.URI().withScheme(G.Schemes.untitled).withQuery(`name=Untitled-${E}&index=${E}`)}createUntitledResource(E={uri:this.createUntitledURI()}){return this.open(E.uri,Object.assign({preview:!1,focus:!0},E.resourceOpenOptions))}};n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],f.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(b.ResourceService),n.__metadata("design:type",b.ResourceService)],f.prototype,"resourceService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],f.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(G.StorageProvider),n.__metadata("design:type",Function)],f.prototype,"getStorage",void 0),n.__decorate([(0,o.Autowired)(h.IDialogService),n.__metadata("design:type",Object)],f.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],f.prototype,"openner",void 0),n.__decorate([(0,o.Autowired)(s.BrowserEditorContribution),n.__metadata("design:type",Object)],f.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],f.prototype,"documentModelManager",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",d.UntitledDocumentIdCounter)],f.prototype,"untitledIndex",void 0),n.__decorate([(0,G.OnEvent)(s.EditorGroupChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.EditorGroupChangeEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"onEditorGroupChangeEvent",null),n.__decorate([(0,G.OnEvent)(s.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],f.prototype,"handleOnCloseUntitledResource",null),f=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],f),e.WorkbenchEditorServiceImpl=f;let N=class extends G.WithEventBus{constructor(E,R){super(),this.name=E,this.groupId=R,this.openingPromise=new Map,this._onDidEditorFocusChange=this.registerDispose(new G.Emitter),this.onDidEditorFocusChange=this._onDidEditorFocusChange.event,this._onDidEditorGroupTabChanged=new G.Emitter,this.onDidEditorGroupTabChanged=this._onDidEditorGroupTabChanged.event,this._onDidEditorGroupTabOperation=new G.Emitter,this.onDidEditorGroupTabOperation=this._onDidEditorGroupTabOperation.event,this._onDidEditorGroupBodyChanged=new G.Emitter,this.onDidEditorGroupBodyChanged=this._onDidEditorGroupBodyChanged.event,this._onDidEditorGroupContentLoading=new G.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 G.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 G.ReadyEvent,this.diffEditorReady=new G.ReadyEvent,this.diffEditorDomReady=new G.ReadyEvent,this.mergeEditorReady=new G.ReadyEvent,this.mergeEditorDomReady=new G.ReadyEvent,this._restoringState=!1,this.eventBus.onDirective(c.ResizeEvent.createDirective((0,c.getSlotLocation)("@opensumi/ide-editor",this.config.layoutConfig)),()=>{this.doLayoutEditors()}),this.eventBus.on(s.GridResizeEvent,A=>{A.payload.gridId===this.grid.uid&&this.doLayoutEditors()}),this.eventBus.on(s.EditorComponentDisposeEvent,A=>{this.activeComponents.delete(A.payload),this.activateComponentsProps.delete(A.payload)}),this.listenToExplorerAutoRevealConfig()}listenToExplorerAutoRevealConfig(){this.explorerAutoRevealConfig=!!this.preferenceService.get("explorer.autoReveal"),this.disposables.push(this.preferenceService.onPreferenceChanged(E=>{E.preferenceName==="explorer.autoReveal"&&(this.explorerAutoRevealConfig=E.newValue)}))}attachDiffEditorDom(E){this._diffEditorDomNodeAttached||(this._diffEditorDomNode=E,this.diffEditorDomReady.ready(),this._diffEditorDomNodeAttached=!0)}attachMergeEditorDom(E){this._mergeEditorDomNodeAttached||(this._mergeEditorDomNode=E,this.mergeEditorDomReady.ready(),this._mergeEditorDomNodeAttached=!0)}attachToDom(E){this._domNode=E,E&&(this.contextKeyService.attachToDomNode(E),this.layoutEditors())}layoutEditors(){c.fastdom.measure(()=>{if(this._domNode){const E=this._domNode.offsetWidth,R=this._domNode.offsetHeight;(E!==this._prevDomWidth||R!==this._prevDomHeight)&&this.doLayoutEditors(),this._prevDomWidth=E,this._prevDomHeight=R}})}_layoutEditorWorker(){if(this.currentOpenType)switch(this.currentOpenType.type){case s.EditorOpenType.code:this.codeEditor&&this.codeEditor.layout();break;case s.EditorOpenType.diff:this.diffEditor&&this.diffEditor.layout();break;default:break}}doLayoutEditors(){this._measure&&this._measure.dispose(),this._measure=c.fastdom.mutate(()=>{this._layoutEditorWorker()})}setContextKeys(){var E;if(!this._resourceContext){const R=A=>{let w=null;const F=this.documentModelManager.getModelDescription(A,"resourceContextKey");return F&&(w=F.languageId),w};this._resourceContext=new g.ResourceContextKey(this.contextKeyService,A=>R(A)),this._diffResourceContextKey=new g.ResourceContextKey(this.contextKeyService,A=>R(A),"diffResource"),this._editorLangIDContextKey=this.contextKeyService.createKey("editorLangId",""),this._isInDiffEditorContextKey=this.contextKeyService.createKey("isInDiffEditor",!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._isInDiffEditorContextKey.set(this.isDiffEditorMode()),this._isInDiffRightEditorContextKey.set(this.isDiffEditorMode()),this._isInEditorComponentContextKey.set(this.isComponentMode()),this.isDiffEditorMode()&&this._diffResourceContextKey.set((E=this.currentResource)===null||E===void 0?void 0:E.uri),this.updateContextKeyWhenDiffEditorChangesFocus()}updateContextKeyWhenDiffEditorChangesFocus(){if(this.updateContextKeyWhenEditorChangesFocusDisposer||!this.diffEditor)return;const E=()=>{this.currentFocusedEditor||(this.setContextKeys(),this._onDidEditorFocusChange.fire())};this.updateContextKeyWhenEditorChangesFocusDisposer=new G.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(E),this.diffEditor.originalEditor.onBlur(E),this.diffEditor.modifiedEditor.onBlur(E)),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(E){E.payload.decoration.dirty&&this.previewURI&&this.previewURI.isEqual(E.payload.uri)&&this.pinPreviewed(),this.resources.find(A=>A.uri.isEqual(E.payload.uri))&&this.notifyTabChanged()}resetOpenType(){this._currentOpenType=null}oResourceOpenTypeChangedEvent(E){const R=E.payload;this.cachedResourcesOpenTypes.has(R.toString())&&this.cachedResourcesOpenTypes.delete(R.toString()),this.currentResource&&this.currentResource.uri.isEqual(R)&&(this.resetOpenType(),this.notifyBodyChanged(),this.displayResourceComponent(this.currentResource,{}))}async onRegisterEditorComponentEvent(){if(this.currentResource){const E=this.currentResource,R=await this.editorComponentRegistry.resolveEditorComponent(E);this.currentResource===E&&(this.availableOpenTypes=R,this.cachedResourcesOpenTypes.set(E.uri.toString(),R))}}pinPreviewed(E){const R=this.previewURI;E===void 0?this.previewURI=null:this.previewURI&&this.previewURI.isEqual(E)&&(this.previewURI=null),R!==this.previewURI&&this.notifyTabChanged()}notifyTabChanged(){this._restoringState||this._onDidEditorGroupTabChanged.fire()}notifyBodyChanged(){this._onDidEditorGroupBodyChanged.fire()}notifyTabLoading(E){this._onDidEditorGroupContentLoading.fire(E)}get currentEditor(){return this.currentOpenType?this.currentOpenType.type===s.EditorOpenType.code?this.codeEditor:this.currentOpenType.type===s.EditorOpenType.diff?this.diffEditor.modifiedEditor:null:null}get currentOrPreviousFocusedEditor(){return this._currentOrPreviousFocusedEditor||this.currentEditor}get currentFocusedEditor(){if(this.currentOpenType){if(this.currentOpenType.type===s.EditorOpenType.code){if(this.codeEditor.monacoEditor.hasWidgetFocus())return this.codeEditor}else if(this.currentOpenType.type===s.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===s.EditorOpenType.code?this.codeEditor:null}createEditor(E){this.codeEditor=this.collectionService.createCodeEditor(E,{},{[c.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),setTimeout(()=>{this.doLayoutEditors()}),this.addDispose(this.codeEditor.onRefOpen(()=>{this.doLayoutEditors()})),this.toDispose.push(this.codeEditor.onCursorPositionChanged(R=>{this._onCurrentEditorCursorChange.fire(R)})),this.toDispose.push(this.codeEditor.onSelectionsChanged(R=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:R.selections,source:R.source,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onVisibleRangesChanged(R=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:R,editorUri:this.codeEditor.currentUri}))})),this.toDispose.push(this.codeEditor.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.eventBus.fire(new s.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:this.codeEditor.currentUri}))})),this.eventBus.fire(new s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.code,editorId:this.codeEditor.getId()})),this.codeEditorReady.ready()}createMergeEditor(E){this.mergeEditor=this.collectionService.createMergeEditor(E,{},{[c.ServiceNames.CONTEXT_KEY_SERVICE]:this.contextKeyService.contextKeyService}),this.mergeEditorReady.ready()}createDiffEditor(E){this.diffEditor=this.collectionService.createDiffEditor(E,{},{[c.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 s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.diff,editorId:this.diffEditor.modifiedEditor.getId()})),this.eventBus.fire(new s.CodeEditorDidVisibleEvent({groupName:this.name,type:s.EditorOpenType.diff,editorId:this.diffEditor.originalEditor.getId()})),this.diffEditorReady.ready()}addDiffEditorEventListeners(E,R){this.toDispose.push(E.onSelectionsChanged(A=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorSelectionChangeEvent({group:this,resource:this.currentResource,selections:A.selections,source:A.source,editorUri:G.URI.from(E.monacoEditor.getModel().uri),side:R}))})),this.toDispose.push(E.onVisibleRangesChanged(A=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorVisibleChangeEvent({group:this,resource:this.currentResource,visibleRanges:A,editorUri:E.currentUri}))})),this.toDispose.push(E.onConfigurationChanged(()=>{this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.eventBus.fire(new s.EditorConfigurationChangedEvent({group:this,resource:this.currentResource,editorUri:E.currentUri}))}))}async split(E,R,A){var w,F,V;const Y=this.workbenchEditorService.createEditorGroup(),_=E===b.EditorGroupSplitAction.Left||E===b.EditorGroupSplitAction.Right?l.SplitDirection.Horizontal:l.SplitDirection.Vertical,H=E===b.EditorGroupSplitAction.Left||E===b.EditorGroupSplitAction.Top;if(this.grid.split(_,Y,H),A&&!A.scrollTop&&(A.scrollTop=(w=this.currentEditor)===null||w===void 0?void 0:w.monacoEditor.getScrollTop()),A&&!A.scrollLeft&&(A.scrollLeft=(F=this.currentEditor)===null||F===void 0?void 0:F.monacoEditor.getScrollLeft()),A&&!A?.range){const X=(V=this.currentCodeEditor)===null||V===void 0?void 0:V.monacoEditor.getSelection();X&&(A.range=new p.Range(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn))}return Y.open(R,Object.assign(Object.assign({},A),{preview:!1,revealRangeInCenter:!1}))}async open(E,R={}){if(E.scheme===G.Schemes.file&&this.recentFilesManager.setMostRecentlyOpenedFile(E.withoutFragment().toString()),R&&R.split)return this.split(R.split,E,Object.assign({},R,{split:void 0,preview:!1}));if(!this.openingPromise.has(E.toString())){const w=this.doOpen(E,R);this.openingPromise.set(E.toString(),w),w.then(()=>{this.openingPromise.delete(E.toString())},()=>{this.openingPromise.delete(E.toString())})}return this.preferenceService.get("editor.previewMode")&&((0,G.isUndefinedOrNull)(R.preview)?!0:R.preview)||this.openingPromise.get(E.toString()).then(()=>{this.pinPreviewed(E)}),this.openingPromise.get(E.toString())}async pin(E){return this.pinPreviewed(E)}getPreventScrollOption(E={}){var R;return(R=E.preventScroll)!==null&&R!==void 0?R:this.preferenceService.get("editor.preventScrollAfterFocused")}async doOpen(E,R={}){var A,w,F;if(!this.resourceService.handlesUri(E))return this.openerService.open(E),!1;let V;try{const Y=this.preferenceService.get("editor.previewMode")&&((0,G.isUndefinedOrNull)(R.preview)?!0:R.preview);if(this.currentResource&&this.currentResource.uri.isEqual(E)&&(!R.forceOpenType||R.forceOpenType.type===((A=this.currentOpenType)===null||A===void 0?void 0:A.type))){if(R.focus&&this.currentEditor){const _=this.getPreventScrollOption(R);(w=this._domNode)===null||w===void 0||w.focus({preventScroll:_}),this.currentEditor.monacoEditor.focus()}return R.range&&this.currentEditor&&(this.currentEditor.monacoEditor.setSelection(R.range),setTimeout(()=>{var _;(_=this.currentEditor)===null||_===void 0||_.monacoEditor.revealRangeInCenter(R.range,0)},0)),this.locationInTree(R,E),this.notifyTabChanged(),{group:this,resource:this.currentResource}}else{const _=this._currentOpenType,H=this._currentResource;let X=null,S=this.resources.find(M=>M.uri.toString()===E.toString());if(!S){if(S=await this.resourceService.getResource(E),!S)throw new Error("This uri cannot be opened!: "+E);if(S.deleted){if(R.deletedPolicy==="fail")throw new Error("resource deleted "+E);if(R.deletedPolicy==="skip")return!1}R&&R.label&&(S.name=R.label),R&&(0,G.isDefined)(R.supportsRevive)&&(S.supportsRevive=R.supportsRevive);let M=null;if(R&&R.index!==void 0&&R.index<this.resources.length)M=this.resources[R.index],this.resources.splice(R.index,0,S),X={type:"open",resource:S,index:R.index};else if(this.currentResource){const T=this.resources.indexOf(this.currentResource);this.resources.splice(T+1,0,S),X={type:"open",resource:S,index:T+1},M=this.currentResource}else this.resources.push(S),X={type:"open",resource:S,index:this.resources.length-1};Y&&(this.previewURI&&await this.close(this.previewURI,{treatAsNotCurrent:!0,force:R.forceClose}),this.previewURI=S.uri),R.replace&&M&&await this.close(M.uri,{treatAsNotCurrent:!0,force:R.forceClose})}if(R.backend)return this.notifyTabChanged(),!1;if(H&&this.resourceOpenHistory[this.resourceOpenHistory.length-1]!==H.uri){this.resourceOpenHistory.push(H.uri);const M=(F=this.currentCodeEditor)===null||F===void 0?void 0:F.getSelections();M&&M.length>0&&this.recentFilesManager.updateMostRecentlyOpenedFile(H.uri.toString(),{lineNumber:M[0].selectionStartLineNumber,column:M[0].selectionStartColumn})}this._currentOpenType=null,this._currentResource=S;const Q=this.reporterService.time(G.REPORT_NAME.EDITOR_REACTIVE);V=new G.Deferred,this.resourceStatus.set(S,V.promise);const O=setTimeout(()=>{this.notifyTabLoading(S)},60);this.notifyTabChanged(),this.notifyBodyChanged();try{await this.displayResourceComponent(S,R)}finally{X&&this._onDidEditorGroupTabOperation.fire(X)}return this._currentOrPreviousFocusedEditor=this.currentEditor,clearTimeout(O),V.resolve(),Q.timeEnd(S.uri.toString()),this._onDidEditorFocusChange.fire(),this.setContextKeys(),this.eventBus.fire(new s.EditorGroupOpenEvent({group:this,resource:S})),this.locationInTree(R,E),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:_,oldResource:H})),{group:this,resource:S}}}catch(Y){return(0,G.getDebugLogger)().error(Y),V&&V.reject(),(0,r.isEditorError)(Y,r.EditorTabChangedError)||this.messageService.error((0,G.formatLocalize)("editor.failToOpen",E.displayName,Y.message),[],!0),!1}}locationInTree(E,R){E?.backend||(E?.disableNavigate||this.locateInFileTree(R),E.disableNavigateOnOpendEditor||this.locateInOpenedEditor(R))}locateInFileTree(E){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(c.FILE_COMMANDS.LOCATION.id,E)}locateInOpenedEditor(E){this.explorerAutoRevealConfig&&this.commands.tryExecuteCommand(c.OPEN_EDITORS_COMMANDS.LOCATION.id,E)}async openUris(E){for(const R of E)await this.open(R)}async getDocumentModelRef(E){const R=E.toString();return this.holdDocumentModelRefs.has(R)||this.holdDocumentModelRefs.set(R,await this.documentModelManager.createModelReference(E,"editor-group-"+this.name)),this.holdDocumentModelRefs.get(R)}disposeDocumentRef(E){if(E.scheme==="diff"){const R=E.getParsedQuery();this.doDisposeDocRef(new G.URI(R.original)),this.doDisposeDocRef(new G.URI(R.modified))}else E.scheme==="mergeEditor"?this.mergeEditor&&this.mergeEditor.dispose():this.doDisposeDocRef(E)}doDisposeDocRef(E){const R=E.toString();this.holdDocumentModelRefs.has(R)&&(this.holdDocumentModelRefs.get(R).dispose(),this.holdDocumentModelRefs.delete(R))}async openCodeEditor(E,R){this.resolveTabChanged(E,this.currentResource),await this.codeEditorReady.onceReady(async()=>{var A;const w=await this.getDocumentModelRef(E.uri);if(await this.codeEditor.open(w),R.range){const F=new p.Range(R.range.startLineNumber,R.range.startColumn,R.range.endLineNumber,R.range.endColumn);this.codeEditor.monacoEditor.setSelection(F),R.revealRangeInCenter&&setTimeout(()=>{this.codeEditor.monacoEditor.revealRangeInCenter(F,1)})}if(queueMicrotask(()=>{R.scrollTop&&this.codeEditor.monacoEditor.setScrollTop(R.scrollTop),R.scrollLeft&&this.codeEditor.monacoEditor.setScrollLeft(R.scrollLeft)}),R.focus){const F=this.getPreventScrollOption(R);(A=this._domNode)===null||A===void 0||A.focus({preventScroll:F});const V=this.eventBus.on(s.CodeEditorDidVisibleEvent,Y=>{var _;if(Y.payload.groupName===this.name&&Y.payload.type===s.EditorOpenType.code){if(V.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.codeEditor&&(!((_=this.codeEditor.currentUri)===null||_===void 0)&&_.isEqual(E.uri)))try{this.codeEditor.focus()}catch{}}})}w.instance.dirty&&this.pinPreviewed(E.uri)})}async openDiffEditor(E,R){this.diffEditor||await this.diffEditorDomReady.onceReady(()=>{var V;const Y=document.createElement("div");(V=this._diffEditorDomNode)===null||V===void 0||V.appendChild(Y),this.createDiffEditor(Y)});const A=E,[w,F]=await Promise.all([this.getDocumentModelRef(A.metadata.original),this.getDocumentModelRef(A.metadata.modified)]);await this.diffEditorReady.onceReady(async()=>{var V;if(!(!w||!F)&&(await this.diffEditor.compare(w,F,R,E.uri),R.focus)){const Y=this.getPreventScrollOption(R);(V=this._domNode)===null||V===void 0||V.focus({preventScroll:Y});const _=this.eventBus.on(s.CodeEditorDidVisibleEvent,H=>{if(H.payload.groupName===this.name&&H.payload.type===s.EditorOpenType.diff){if(_.dispose(),this.disposed||this!==this.workbenchEditorService.currentEditorGroup)return;if(this.currentEditor===this.diffEditor.modifiedEditor)try{this.diffEditor.focus()}catch{}}})}})}async openMergeEditor(E){const{metadata:R}=E;if(!R)return;this.mergeEditor||await this.mergeEditorDomReady.onceReady(()=>{var O;const M=document.createElement("div");(O=this._mergeEditorDomNode)===null||O===void 0||O.appendChild(M),this.createMergeEditor(M)});const{ancestor:A,input1:w,input2:F,output:V}=R,Y=u.MergeEditorInputData.from(w),_=u.MergeEditorInputData.from(F),[H,X,S,Q]=await Promise.all([this.getDocumentModelRef(G.URI.parse(A)),this.getDocumentModelRef(Y.uri),this.getDocumentModelRef(G.URI.parse(V)),this.getDocumentModelRef(_.uri)]);await this.mergeEditorReady.onceReady(async()=>{await this.mergeEditor.open({ancestor:{uri:G.URI.parse(R.ancestor),textModel:H.instance.getMonacoModel(),baseContent:H.instance.baseContent||""},input1:Y.setTextModel(X.instance.getMonacoModel()),input2:_.setTextModel(Q.instance.getMonacoModel()),output:{uri:G.URI.parse(R.output),textModel:S.instance.getMonacoModel()}})})}async openCustomEditor(E,R){const A=this.editorComponentRegistry.getEditorComponent(R),w=this.editorComponentRegistry.getEditorInitialProps(R);if(A){if(this.activateComponentsProps.set(A,w),A.renderMode===s.EditorComponentRenderMode.ONE_PER_RESOURCE){const F=this.activeComponents.get(A)||[];F.findIndex(Y=>Y.uri.toString()===E.uri.toString())===-1&&F.push(E),this.activeComponents.set(A,F)}else if(A.renderMode===s.EditorComponentRenderMode.ONE_PER_GROUP)this.activeComponents.set(A,[E]);else if(A.renderMode===s.EditorComponentRenderMode.ONE_PER_WORKBENCH){const F=[];this.workbenchEditorService.editorGroups.forEach(V=>{if(V===this)return;const Y=V.resources.find(_=>_.uri.isEqual(E.uri));Y&&F.push(V.close(Y.uri))}),await Promise.all(F).catch((0,G.getDebugLogger)().error),this.activeComponents.set(A,[E])}}else throw new Error("Cannot find Editor Component with id: "+R);this._onCurrentEditorCursorChange.fire({position:null,selectionLength:0})}async displayResourceComponent(E,R){R.revealRangeInCenter===void 0&&(R.revealRangeInCenter=!0);const A=E,w=await this.resolveOpenType(E,R);if(w){const{activeOpenType:F,openTypes:V}=w;switch(this.availableOpenTypes=V,R.preserveFocus&&(R.focus=!1),F.type){case s.EditorOpenType.code:await this.openCodeEditor(E,R);break;case s.EditorOpenType.diff:await this.openDiffEditor(E,R);break;case s.EditorOpenType.mergeEditor:await this.openMergeEditor(E);break;case s.EditorOpenType.component:await this.openCustomEditor(E,F.componentId);break;default:return}this.resolveTabChanged(A,this.currentResource),this._currentOpenType=F,this.notifyBodyChanged(),this.doLayoutEditors(),this.cachedResourcesActiveOpenTypes.set(E.uri.toString(),F)}}resolveTabChanged(E,R){if(E!==R)throw new r.EditorTabChangedError}getLastOpenType(E){return this.cachedResourcesActiveOpenTypes.get(E.uri.toString())}async resolveOpenType(E,R){const A=this.cachedResourcesOpenTypes.get(E.uri.toString())||await this.editorComponentRegistry.resolveEditorComponent(E),w=this.preferenceService.get("workbench.editorAssociations"),F=W(A,this.cachedResourcesActiveOpenTypes.get(E.uri.toString()),E,w,R.forceOpenType);return this.cachedResourcesOpenTypes.set(E.uri.toString(),A),{activeOpenType:F,openTypes:A}}async close(E,{treatAsNotCurrent:R,force:A}={}){const w=this.resources.findIndex(F=>F.uri.toString()===E.toString());if(w!==-1){const F=this.resources[w];if(!A&&!await this.shouldClose(F))return!1;if(this.resources.splice(w,1),this._onDidEditorGroupTabOperation.fire({type:"close",resource:F,index:w}),this.eventBus.fire(new s.EditorGroupCloseEvent({group:this,resource:F})),this.previewURI&&this.previewURI.isEqual(E)&&(this.previewURI=null),F===this.currentResource&&!R){let V;for(;this.resourceOpenHistory.length>0;)if(this.resources.findIndex(Y=>Y.uri===this.resourceOpenHistory[this.resourceOpenHistory.length-1])!==-1){V=this.resourceOpenHistory.pop();break}else this.resourceOpenHistory.pop();if(V)this.open(V);else{let Y=w;for(;Y>0&&!this.resources[Y];)Y--;this.resources[Y]?this.open(this.resources[Y].uri):this.backToEmpty()}}else this.notifyTabChanged();this.removeResouceFromActiveComponents(F),this.disposeDocumentRef(E)}return this.resources.length===0&&(this.grid.parent&&this.dispose(),this.availableOpenTypes=[]),!0}removeResouceFromActiveComponents(E){this.activeComponents.forEach((R,A)=>{const w=R.indexOf(E);w!==-1&&(R.splice(w,1),this.eventBus.fire(new s.ResoucesOfActiveComponentChangedEvent({component:A,resources:R})))})}async shouldClose(E){const R=this.workbenchEditorService.editorGroups.map(A=>A.resources);if(await this.resourceService.shouldCloseResource(E,R)){let A=0;for(const w of R)for(const F of w)if(F.uri.isEqual(E.uri)&&(A++,A>=2))break;return A<=1&&this.resourceService.disposeResource(E),!0}else return!1}backToEmpty(){const E=this._currentOpenType,R=this._currentResource;this._currentResource=null,this.resetOpenType(),this.notifyTabChanged(),this.notifyBodyChanged(),this._currentOrPreviousFocusedEditor=null,this._onDidEditorFocusChange.fire(),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:E,oldResource:R}))}async closeAll(){for(const R of this.resources)if(!await this.shouldClose(R))return!1;return this.resources.splice(0,this.resources.length).reverse().forEach((R,A)=>{this.clearResourceOnClose(R),this._onDidEditorGroupTabOperation.fire({type:"close",resource:R,index:A})}),this.activeComponents.clear(),this.workbenchEditorService.editorGroups.length>1&&this.dispose(),this.previewURI=null,this.backToEmpty(),!0}async closeSaved(){const E=this.resources.filter(R=>{const A=this.resourceService.getResourceDecoration(R.uri);if(!A||!A.dirty)return!0});for(const R of E)if(!await this.shouldClose(R))return;for(const R of E)await this.close(R.uri)}async closeToRight(E){const R=this.resources.findIndex(A=>A.uri.toString()===E.toString());if(R!==-1){const A=this.resources.slice(R+1);for(const w of A)if(!await this.shouldClose(w))return;this.resources.splice(R+1),A.reverse().forEach((w,F)=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:w,index:R+1+(A.length-1-F)})});for(const w of A)this.clearResourceOnClose(w);this.open(E)}}clearResourceOnClose(E){this.eventBus.fire(new s.EditorGroupCloseEvent({group:this,resource:E})),this.removeResouceFromActiveComponents(E)}async closeOthers(E){const R=this.resources.findIndex(A=>A.uri.toString()===E.toString());if(R!==-1){const A=this.resources.filter((F,V)=>V!==R);for(const F of A)if(!await this.shouldClose(F))return;const w=this.resources;this.resources=[this.resources[R]],A.reverse().forEach(F=>{this._onDidEditorGroupTabOperation.fire({type:"close",resource:F,index:w.indexOf(F)})});for(const F of A)this.clearResourceOnClose(F);await this.open(E)}}get currentResource(){return this._currentResource}get currentOpenType(){return this._currentOpenType}async changeOpenType(E){const R=this.availableOpenTypes.find(w=>w.type===E||w.componentId===E);if(!R||!this.currentResource||Z(R,this.currentOpenType))return;const A=this.currentOpenType;await this.displayResourceComponent(this.currentResource,{forceOpenType:R}),this.eventBus.fire(new s.EditorGroupChangeEvent({group:this,newOpenType:this.currentOpenType,newResource:this.currentResource,oldOpenType:A,oldResource:this.currentResource}))}async dropUri(E,R,A,w){if(R!==s.DragOverPosition.CENTER)await this.split((0,b.getSplitActionFromDragDrop)(R),E,{preview:!1,focus:!0});else if(!w)await this.open(E,{preview:!1,focus:!0});else{const F=this.resources.indexOf(w);if(F===-1)await this.open(E,{preview:!1,focus:!0});else{const V=this.resources.findIndex(Y=>Y.uri.toString()===E.toString());if(V===-1)await this.open(E,{index:F,preview:!1});else{const Y=this.resources[V];V>F?(this.resources.splice(V,1),this.resources.splice(F,0,Y),this._onDidEditorGroupTabOperation.fire({type:"move",resource:Y,oldIndex:V,index:F}),await this.open(E,{preview:!1})):V<F&&(this.resources.splice(F+1,0,Y),this.resources.splice(V,1),this._onDidEditorGroupTabOperation.fire({type:"move",resource:Y,oldIndex:V,index:F}),await this.open(E,{preview:!1}))}}}A&&(A!==this?await A.close(E):R!==s.DragOverPosition.CENTER&&await this.close(E))}gainFocus(){this.workbenchEditorService.setCurrentGroup(this)}focus(){this.gainFocus(),this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code&&this.codeEditor.focus(),this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff&&this.diffEditor.focus()}dispose(){var E;(E=this.grid)===null||E===void 0||E.dispose(),this.workbenchEditorService.removeGroup(this),super.dispose(),this.codeEditor&&this.codeEditor.dispose(),this.diffEditor&&this.diffEditor.dispose(),this.toDispose.forEach(R=>R.dispose()),this.eventBus.fire(new s.EditorGroupDisposeEvent({group:this}))}getState(){const E=this.resources.filter(v).map(R=>R.uri.toString());return{uris:E,current:this.currentResource&&v(this.currentResource)?this.currentResource.uri.toString():void 0,previewIndex:this.previewURI?E.indexOf(this.previewURI.toString()):-1}}isCodeEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.code}isDiffEditorMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.diff}isComponentMode(){return!!this.currentOpenType&&this.currentOpenType.type===s.EditorOpenType.component}async restoreState(E){this._restoringState=!0,this.previewURI=E.uris[E.previewIndex]?new G.URI(E.uris[E.previewIndex]):null,await Promise.all(E.uris.map(async A=>{await this.doOpen(new G.URI(A),{disableNavigate:!0,backend:!0,preview:!1,deletedPolicy:"skip"})}));let R;E.current?R=new G.URI(E.current):E.uris.length>0&&(R=new G.URI(E.uris[E.uris.length-1])),R&&(await this.open(R,{deletedPolicy:"skip"})||this.resources[0]&&await this.open(this.resources[0].uri)),this._restoringState=!1,this.notifyTabChanged()}async saveAll(E,R){for(const A of this.resources)!E&&A.uri.scheme===G.Schemes.untitled||await this.saveResource(A,R)}async saveResource(E,R=b.SaveReason.Manual){if(await this.saveByOpenType(E,R))return;const A=this.documentModelManager.getModelReference(E.uri);A&&(await A.instance.save(void 0,R),A.dispose())}async saveByOpenType(E,R){const A=this.cachedResourcesActiveOpenTypes.get(E.uri.toString());if(A&&A.saveResource)try{return await A.saveResource(E,R),!0}catch(w){this.logger.error(w)}return!1}async saveCurrent(E=b.SaveReason.Manual){const R=this.currentResource;if(R&&!await this.saveByOpenType(R,E)&&this.currentEditor)return this.currentEditor.save()}hasDirty(){for(const E of this.resources){const R=this.documentModelManager.getModelDescription(E.uri);if(R&&R.dirty)return!0}return!1}calcDirtyCount(E=new Set){let R=0;for(const A of this.resources){const w=this.documentModelManager.getModelDescription(A.uri,"calc-dirty-count");E.has(A.uri.toString())||(E.add(A.uri.toString()),w&&w.dirty&&(R+=1))}return R}componentUndo(){const E=this.currentOpenType;E?.undo&&E.undo(this.currentResource)}componentRedo(){const E=this.currentOpenType;E?.redo&&E.redo(this.currentResource)}toJSON(){return{name:this.name}}};n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b.EditorCollectionService)],N.prototype,"collectionService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",b.ResourceService)],N.prototype,"resourceService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",s.EditorComponentRegistry)],N.prototype,"editorComponentRegistry",void 0),n.__decorate([(0,o.Autowired)(b.WorkbenchEditorService),n.__metadata("design:type",f)],N.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(I.IEditorDocumentModelService),n.__metadata("design:type",Object)],N.prototype,"documentModelManager",void 0),n.__decorate([(0,o.Autowired)(G.CommandService),n.__metadata("design:type",Object)],N.prototype,"commands",void 0),n.__decorate([(0,o.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],N.prototype,"preferenceService",void 0),n.__decorate([(0,o.Autowired)(c.RecentFilesManager),n.__metadata("design:type",c.RecentFilesManager)],N.prototype,"recentFilesManager",void 0),n.__decorate([(0,o.Autowired)(h.IMessageService),n.__metadata("design:type",Object)],N.prototype,"messageService",void 0),n.__decorate([(0,o.Autowired)(G.IReporterService),n.__metadata("design:type",Object)],N.prototype,"reporterService",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],N.prototype,"config",void 0),n.__decorate([(0,o.Autowired)(c.IOpenerService),n.__metadata("design:type",Object)],N.prototype,"openerService",void 0),n.__decorate([(0,o.Autowired)(G.ILogger),n.__metadata("design:type",Object)],N.prototype,"logger",void 0),n.__decorate([a.observable.shallow,n.__metadata("design:type",Array)],N.prototype,"availableOpenTypes",void 0),n.__decorate([(0,G.OnEvent)(b.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[b.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],N.prototype,"onResourceDecorationChangeEvent",null),n.__decorate([(0,G.OnEvent)(s.ResourceOpenTypeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ResourceOpenTypeChangedEvent]),n.__metadata("design:returntype",void 0)],N.prototype,"oResourceOpenTypeChangedEvent",null),n.__decorate([(0,G.OnEvent)(s.RegisterEditorComponentEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Promise)],N.prototype,"onRegisterEditorComponentEvent",null),N=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Number])],N),e.EditorGroup=N;function W(y,E,R,A,w){if(w)return y.find(F=>Z(F,w))||y[0];if(E)return y.find(F=>Z(F,E))||y[0];if(A){const F=y.find(V=>{const Y=Object.keys(A).find(X=>(0,G.match)(X,R.uri.path.toString().toLowerCase())||(0,G.match)(X,R.uri.path.base.toLowerCase())),_=Y&&A[Y];if(!_)return!1;const H=`${G.CUSTOM_EDITOR_SCHEME}-${_}`;return V.componentId===H});if(F)return F}return y[0]}function Z(y,E){return y.type===E.type&&(y.type!==s.EditorOpenType.component||y.componentId===E.componentId)}},94180:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabbarLeftExtraContentId=e.TabbarRightExtraContentId=void 0,e.TabbarRightExtraContentId="tabbar-right-extra-content",e.TabbarLeftExtraContentId="tabbar-left-extra-content"},93107:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseRangeFrom=e.parseCacheValueFrom=e.isDocChangesCache=e.isDocContentCache=e.IDocPersistentCacheProvider=void 0;const n=t(44781);e.IDocPersistentCacheProvider=Symbol("IDocPersistentCacheProvider");function a(u){return u.hasOwnProperty("content")}e.isDocContentCache=a;function o(u){return u.hasOwnProperty("changeMatrix")}e.isDocChangesCache=o;function c(u){const G=u.text,p=u.range.startLineNumber,h=u.range.startColumn,b=u.range.endLineNumber,I=u.range.endColumn;return[G,p,h,b,I]}e.parseCacheValueFrom=c;function g(u){const[G,p,h,b,I]=u;return n.Range.lift({startLineNumber:p,startColumn:h,endLineNumber:b,endColumn:I})}e.parseRangeFrom=g},55113:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSimpleEditorOptions=e.AUTO_SAVE_MODE=e.SaveReason=e.Direction=e.EditorGroupSplitAction=e.DragOverPosition=e.EditorOpenType=e.IEditorPriority=e.OverviewRulerLane=e.WorkbenchEditorService=e.DidApplyEditorDecorationFromProvider=e.DidChangeEditorGroupUriEvent=e.CollectionEditorsUpdateEvent=e.EditorCollectionService=e.EditorType=e.ShowLightbulbIconMode=void 0;const n=t(85608),a=t(76003),o=t(43718);var c=t(20868);Object.defineProperty(e,"ShowLightbulbIconMode",{enumerable:!0,get:function(){return c.ShowLightbulbIconMode}});var g;(function(W){W[W.CODE=0]="CODE",W[W.ORIGINAL_DIFF=1]="ORIGINAL_DIFF",W[W.MODIFIED_DIFF=2]="MODIFIED_DIFF",W.MERGE_EDITOR_DIFF="MERGE_EDITOR_DIFF"})(g=e.EditorType||(e.EditorType={}));let u=class{};u=n.__decorate([(0,a.Injectable)()],u),e.EditorCollectionService=u;class G extends o.BasicEvent{}e.CollectionEditorsUpdateEvent=G;class p extends o.BasicEvent{}e.DidChangeEditorGroupUriEvent=p;class h extends o.BasicEvent{}e.DidApplyEditorDecorationFromProvider=h;class b{}e.WorkbenchEditorService=b;var I;(function(W){W[W.Left=1]="Left",W[W.Center=2]="Center",W[W.Right=4]="Right",W[W.Full=7]="Full"})(I=e.OverviewRulerLane||(e.OverviewRulerLane={}));var r;(function(W){W.builtin="builtin",W.option="option",W.exclusive="exclusive",W.default="default"})(r=e.IEditorPriority||(e.IEditorPriority={}));var l;(function(W){W.code="code",W.diff="diff",W.mergeEditor="mergeEditor",W.component="component"})(l=e.EditorOpenType||(e.EditorOpenType={}));var s;(function(W){W.LEFT="left",W.RIGHT="right",W.TOP="top",W.BOTTOM="bottom",W.CENTER="center"})(s=e.DragOverPosition||(e.DragOverPosition={}));var d;(function(W){W[W.Top=1]="Top",W[W.Bottom=2]="Bottom",W[W.Left=3]="Left",W[W.Right=4]="Right"})(d=e.EditorGroupSplitAction||(e.EditorGroupSplitAction={}));var m;(function(W){W.UP="up",W.DOWN="down",W.LEFT="left",W.RIGHT="right"})(m=e.Direction||(e.Direction={}));var v;(function(W){W[W.Manual=1]="Manual",W[W.AfterDelay=2]="AfterDelay",W[W.FocusOut=3]="FocusOut"})(v=e.SaveReason||(e.SaveReason={}));var f;(function(W){W.OFF="off",W.AFTER_DELAY="afterDelay",W.EDITOR_FOCUS_CHANGE="editorFocusChange",W.WINDOWS_LOST_FOCUS="windowLostFocus"})(f=e.AUTO_SAVE_MODE||(e.AUTO_SAVE_MODE={}));function N(){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}}}e.getSimpleEditorOptions=N},23418:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(94180),e),n.__exportStar(t(93107),e),n.__exportStar(t(55113),e),n.__exportStar(t(23950),e),n.__exportStar(t(27693),e),n.__exportStar(t(46225),e),n.__exportStar(t(4308),e),n.__exportStar(t(39467),e)},27693:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageStatusService=void 0,e.ILanguageStatusService=Symbol("ILanguageStatusService")},23950:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asMonacoDiagnostic=e.asMonacoDiagnostics=e.asRelatedInformation=e.asRelatedInformations=e.asSeverity=e.DiagnosticTag=e.DiagnosticSeverity=e.ILanguageService=void 0;const n=t(43718),a=t(26592);e.ILanguageService=Symbol("ILanguageService");var o;(function(b){b[b.Error=1]="Error",b[b.Warning=2]="Warning",b[b.Information=3]="Information",b[b.Hint=4]="Hint"})(o=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var c;(function(b){b[b.Unnecessary=1]="Unnecessary",b[b.Deprecated=2]="Deprecated"})(c=e.DiagnosticTag||(e.DiagnosticTag={}));function g(b){return b===1?n.MarkerSeverity.Error:b===2?n.MarkerSeverity.Warning:b===3?n.MarkerSeverity.Info:n.MarkerSeverity.Hint}e.asSeverity=g;function u(b){if(b)return b.map(I=>G(I))}e.asRelatedInformations=u;function G(b){return{resource:a.URI.parse(b.location.uri),startLineNumber:b.location.range.start.line+1,startColumn:b.location.range.start.character+1,endLineNumber:b.location.range.end.line+1,endColumn:b.location.range.end.character+1,message:b.message}}e.asRelatedInformation=G;function p(b){if(b)return b.map(I=>h(I))}e.asMonacoDiagnostics=p;function h(b){return{code:typeof b.code=="number"?b.code.toString():typeof b.code=="object"?{value:b.code.value.toString(),target:b.code.target}:b.code,severity:g(b.severity),message:b.message,source:b.source,startLineNumber:b.range.start.line+1,startColumn:b.range.start.character+1,endLineNumber:b.range.end.line+1,endColumn:b.range.end.character+1,relatedInformation:u(b.relatedInformation),tags:b.tags}}e.asMonacoDiagnostic=h},46225:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookCellScheme=e.INotebookService=e.CellKind=e.NotebookCellsChangeType=void 0;var t;(function(a){a[a.ModelChange=1]="ModelChange",a[a.Move=2]="Move",a[a.ChangeCellLanguage=5]="ChangeCellLanguage",a[a.Initialize=6]="Initialize",a[a.ChangeCellMetadata=7]="ChangeCellMetadata",a[a.Output=8]="Output",a[a.OutputItem=9]="OutputItem",a[a.ChangeCellContent=10]="ChangeCellContent",a[a.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",a[a.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",a[a.ChangeCellMime=13]="ChangeCellMime",a[a.Unknown=100]="Unknown"})(t=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var n;(function(a){a[a.Markup=1]="Markup",a[a.Code=2]="Code"})(n=e.CellKind||(e.CellKind={})),e.INotebookService=Symbol("INotebookService"),e.notebookCellScheme="vscode-notebook-cell"},4308:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AskSaveResult=e.isDiffResource=e.DIFF_SCHEME=e.ResourceDecorationNeedChangeEvent=e.ResourceDecorationChangeEvent=e.ResourceRemoveEvent=e.ResourceDidUpdateEvent=e.ResourceNeedUpdateEvent=e.ResourceService=void 0;const n=t(43718);class a{}e.ResourceService=a;class o extends n.BasicEvent{}e.ResourceNeedUpdateEvent=o;class c extends n.BasicEvent{}e.ResourceDidUpdateEvent=c;class g extends n.BasicEvent{}e.ResourceRemoveEvent=g;class u extends n.BasicEvent{}e.ResourceDecorationChangeEvent=u;class G extends n.BasicEvent{}e.ResourceDecorationNeedChangeEvent=G,e.DIFF_SCHEME="diff";function p(b){return b.uri.scheme===e.DIFF_SCHEME}e.isDiffResource=p;var h;(function(b){b[b.REVERT=1]="REVERT",b[b.SAVE=2]="SAVE",b[b.CANCEL=3]="CANCEL"})(h=e.AskSaveResult||(e.AskSaveResult={}))},39467:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSplitActionFromDragDrop=void 0;const n=t(55113);function a(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]}e.getSplitActionFromDragDrop=a},54414:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(23418),e)},32595:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerContribution=e.EXPLORER_CONTAINER_ID=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(30144);Object.defineProperty(e,"EXPLORER_CONTAINER_ID",{enumerable:!0,get:function(){return c.EXPLORER_CONTAINER_ID}});const g=t(21634),u=t(68456),G=t(43718);let p=class{registerComponent(b){b.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:Object.assign(Object.assign({},g.browserViews.properties),{description:(0,o.formatLocalize)("sumiContributes.browserViews.location.custom",(0,o.localize)("explorer.title"))})})}};n.__decorate([(0,a.Autowired)(G.IExtensionsSchemaService),n.__metadata("design:type",Object)],p.prototype,"extensionsSchemaService",void 0),p=n.__decorate([(0,o.Domain)(o.ClientAppContribution,u.ComponentContribution)],p),e.ExplorerContribution=p},59027:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(32595);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c.ExplorerContribution]}};g=n.__decorate([(0,a.Injectable)()],g),e.ExplorerModule=g},18531:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExpressFileServerContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(32242),g=t(90242);let u=class{registerStaticResolver(p){p.registerStaticResourceProvider({scheme:o.Schemes.file,resolveStaticResource:h=>{const b=new o.URI(this.appConfig.staticServicePath||g.EXPRESS_SERVER_PATH),[I,r]=h.codeUri.path.split("?");return b.resolve(`assets${decodeURIComponent(I)}`).withQuery(r)},roots:[this.appConfig.staticServicePath||g.EXPRESS_SERVER_PATH]})}};n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],u.prototype,"appConfig",void 0),u=n.__decorate([(0,o.Domain)(c.StaticResourceContribution)],u),e.ExpressFileServerContribution=u},98885:(L,e,t)=>{"use strict";var n;n={value:!0},e.Q=void 0;const a=t(85608),o=t(76003),c=t(41869),g=t(18531);let u=class extends c.BrowserModule{constructor(){super(...arguments),this.providers=[g.ExpressFileServerContribution]}};u=a.__decorate([(0,o.Injectable)()],u),e.Q=u},90242:(L,e,t)=>{"use strict";var n=t(39907);Object.defineProperty(e,"__esModule",{value:!0}),e.ALLOW_MIME=e.EXPRESS_SERVER_PATH=e.EXPRESS_SERVER_PORT=void 0,e.EXPRESS_SERVER_PORT=8e3,e.EXPRESS_SERVER_PATH=n.env.STATIC_SERVER_PATH||`http://127.0.0.1:${e.EXPRESS_SERVER_PORT}/`,e.ALLOW_MIME={gif:"image/gif",jpg:"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:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENSION_SCHEME=e.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=void 0;const n=t(30144);e.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID=n.EXTENSION_CONTAINER_ID,e.EXTENSION_SCHEME="extension"},6449:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionOverview=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(68974),g=t(95422),u=t(43718),G=t(93374),p=t(29150),h=n.__importDefault(t(40769));var b;(function(l){l.details="Details",l.changelog="ChangeLog",l.deps="Dependencies"})(b||(b={}));const I=[b.details,b.changelog,b.deps],r=({resource:l})=>{var s,d,m,v,f,N,W,Z,y,E,R,A,w,F,V,Y,_,H,X,S,Q,O,M,T,B;const x=(0,g.useInjectable)(p.VSXExtensionServiceToken),[D,J]=(0,a.useState)(!0),[k,z]=(0,a.useState)(((s=l.metadata)===null||s===void 0?void 0:s.state)===p.InstallState.INSTALLED?4:0),[P,U]=(0,a.useState)(b.details),[ne,re]=(0,a.useState)({}),ae=(0,a.useCallback)(q=>{const le=I[q];le&&U(le)},[]),ue=(0,a.useCallback)(async()=>{var q;const le=await x.getRemoteRawExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);if(le){const ie=["readme","changelog"].map(j=>{var te,oe;const ce=(te=le.files)===null||te===void 0?void 0:te[j];return ce?fetch(ce).then(Ie=>Ie.text()):(oe=le[j])!==null&&oe!==void 0?oe:""}),[he,ee]=await Promise.all(ie);re({readme:he,changelog:ee,downloadCount:le.downloadCount})}J(!1)},[l]),$=(0,a.useCallback)(async()=>{var q;const le=await x.getLocalExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);le&&(z(1),x.install(le).finally(()=>{z(4)}))},[l]),pe=(0,a.useCallback)(async()=>{var q;const le=await x.getLocalExtension((q=l.metadata)===null||q===void 0?void 0:q.extensionId);le&&(z(2),x.uninstall(le).finally(()=>{z(3)}))},[l]);(0,a.useEffect)(()=>{ue()},[l]);const ge=(0,a.useMemo)(()=>{var q,le,ie;const he=[];if(((q=l.metadata)===null||q===void 0?void 0:q.state)!==p.InstallState.NOT_INSTALLED)if(k!==3)he.push(a.default.createElement(o.Button,{size:"small",key:"uninstall",onClick:pe,disabled:k===2},(0,u.localize)(k===2?"marketplace.extension.uninstalling":"marketplace.extension.uninstall")));else return he.push(a.default.createElement(o.Button,{size:"small",key:"uninstalled",disabled:!0},(0,u.localize)("marketplace.extension.uninstalled"))),he;return((le=l.metadata)===null||le===void 0?void 0:le.state)===p.InstallState.NOT_INSTALLED?k===4?he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))):he.push(a.default.createElement(o.Button,{size:"small",key:"install",onClick:$,disabled:k!==0},(0,u.localize)(k===1?"marketplace.extension.installing":"marketplace.extension.install"))):((ie=l.metadata)===null||ie===void 0?void 0:ie.state)===p.InstallState.SHOULD_UPDATE?k===4?he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))):he.push(a.default.createElement(o.Button,{size:"small",key:"update",onClick:$,disabled:k!==0},(0,u.localize)(k===1?"marketplace.extension.updating":"marketplace.extension.update"))):he.push(a.default.createElement(o.Button,{size:"small",key:"installed",disabled:!0},(0,u.localize)("marketplace.extension.installed"))),he},[l,k]);return a.default.createElement("div",{className:h.default.extension_overview_container},a.default.createElement(c.Progress,{loading:D}),a.default.createElement("div",{className:h.default.extension_overview_header},!((d=l.metadata)===null||d===void 0)&&d.iconUrl?a.default.createElement("img",{src:(m=l.metadata)===null||m===void 0?void 0:m.iconUrl,alt:(0,u.replaceLocalizePlaceholder)((v=l.metadata)===null||v===void 0?void 0:v.displayName,(f=l.metadata)===null||f===void 0?void 0:f.extensionId)}):a.default.createElement("div",{className:h.default.default_icon},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),a.default.createElement("div",{className:h.default.extension_detail},a.default.createElement("div",{className:h.default.extension_name},a.default.createElement("h1",null,a.default.createElement("a",{href:`${(N=l.metadata)===null||N===void 0?void 0:N.openVSXRegistry}/extension/${(W=l.metadata)===null||W===void 0?void 0:W.namespace.toLowerCase()}/${(Z=l.metadata)===null||Z===void 0?void 0:Z.name.toLowerCase()}`,target:"_blank",rel:"noopener noreferrer"},(0,u.replaceLocalizePlaceholder)((y=l.metadata)===null||y===void 0?void 0:y.displayName,(E=l.metadata)===null||E===void 0?void 0:E.extensionId)||((R=l.metadata)===null||R===void 0?void 0:R.name))),a.default.createElement("span",{className:h.default.extension_id},((A=l.metadata)===null||A===void 0?void 0:A.namespace.toLowerCase())+"."+((w=l.metadata)===null||w===void 0?void 0:w.name.toLowerCase()))),a.default.createElement("div",{className:h.default.manifest},a.default.createElement("span",null,a.default.createElement("a",{href:(F=l.metadata)===null||F===void 0?void 0:F.namespaceUrl,target:"_blank",rel:"noopener noreferrer"},(V=l.metadata)===null||V===void 0?void 0:V.namespace)),a.default.createElement("span",null,a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),((Y=l.metadata)===null||Y===void 0?void 0:Y.downloadCount)||ne.downloadCount),((_=l.metadata)===null||_===void 0?void 0:_.averageRating)&&a.default.createElement("span",null,(H=l.metadata)===null||H===void 0?void 0:H.averageRating),((X=l.metadata)===null||X===void 0?void 0:X.repository)&&a.default.createElement("span",null,a.default.createElement("a",{href:(S=l.metadata)===null||S===void 0?void 0:S.repository,target:"blank"},"Repository")),((Q=l.metadata)===null||Q===void 0?void 0:Q.license)&&a.default.createElement("span",null,a.default.createElement("a",{href:(O=l.metadata)===null||O===void 0?void 0:O.files.license,target:"blank"},"License")),a.default.createElement("span",null,"v",(M=l.metadata)===null||M===void 0?void 0:M.version)),a.default.createElement("div",{className:h.default.description},(0,u.replaceLocalizePlaceholder)((T=l.metadata)===null||T===void 0?void 0:T.description,(B=l.metadata)===null||B===void 0?void 0:B.extensionId)),a.default.createElement("div",{className:h.default.buttons},ge))),a.default.createElement("div",{className:h.default.extension_overview_body},a.default.createElement(o.Tabs,{className:h.default.tabs,value:P,onChange:ae,tabs:[b.details,b.changelog]}),a.default.createElement("div",{className:h.default.extension_content},P===b.details&&ne.readme&&a.default.createElement(G.Markdown,{content:ne.readme}),P===b.changelog&&ne.changelog&&a.default.createElement(G.Markdown,{content:ne.changelog}))))};e.ExtensionOverview=r},87791:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extension=e.ExtensionViewType=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(43718),u=t(29150),G=n.__importDefault(t(90425));var p;(function(h){h[h.MARKETPLACE=0]="MARKETPLACE",h[h.INSTALLED=1]="INSTALLED"})(p=e.ExtensionViewType||(e.ExtensionViewType={})),e.Extension=a.default.memo(({extension:h,onInstall:b,onClick:I,type:r,installedExtensions:l,openVSXRegistry:s})=>{const d=(0,c.useDesignStyles)(G.default.extension_item,"extension_item"),[m,v]=(0,a.useState)(),f=l?.find(A=>A.namespace===h.namespace&&A.name===h.name),N=!!(r===p.INSTALLED||f),W=N&&r===p.MARKETPLACE&&f?.version!==h.version,[Z,y]=(0,a.useState)(N),E=(0,a.useCallback)(A=>{A.stopPropagation(),v(!0),b(h).then(()=>{v(!1),y(!0)})},[h]),R=(0,a.useCallback)(()=>{I(h,Z?W?u.InstallState.SHOULD_UPDATE:u.InstallState.INSTALLED:u.InstallState.NOT_INSTALLED)},[h]);return a.default.createElement("div",{className:d,onClick:R},h.iconUrl?a.default.createElement("img",{className:G.default.icon,src:h.iconUrl,alt:(0,g.replaceLocalizePlaceholder)(h.displayName,`${h.publisher}.${h.name}`)}):a.default.createElement("div",{className:G.default.default_icon},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("extension")})),a.default.createElement("div",{className:G.default.extension_detail},a.default.createElement("div",{className:G.default.base_info},a.default.createElement("span",{className:G.default.display_name},(0,g.replaceLocalizePlaceholder)(h.displayName,`${h.publisher}.${h.name}`)||h.name),a.default.createElement("span",{className:G.default.version},h.version),!Z&&a.default.createElement("span",{className:G.default.download_count},a.default.createElement(o.Icon,{iconClass:(0,o.getIcon)("download")}),h.downloadCount)),a.default.createElement("span",{className:G.default.description},(0,g.replaceLocalizePlaceholder)(h.description,`${h.publisher}.${h.name}`)),a.default.createElement("div",{className:G.default.footer},a.default.createElement("span",{className:G.default.namespace},h.namespace),r===p.MARKETPLACE&&(N?W?a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:m},(0,g.localize)(m?"marketplace.extension.updating":"marketplace.extension.update")):a.default.createElement("span",{className:G.default.state_text},(0,g.localize)("marketplace.extension.installed")):a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:m},(0,g.localize)(m?"marketplace.extension.installing":"marketplace.extension.install"))),r===p.INSTALLED&&a.default.createElement(o.Button,{type:"primary",size:"small",onClick:E,disabled:!0},(0,g.localize)("marketplace.extension.installed")))))})},38105:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenVsxExtensionManagerModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(29150),g=t(70274),u=t(67761);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.VSXExtensionContribution,{token:c.VSXExtensionServiceToken,useClass:u.VSXExtensionService}],this.backServices=[{servicePath:c.VSXExtensionServicePath,token:c.VSXExtensionBackSerivceToken}]}};G=n.__decorate([(0,a.Injectable)()],G),e.OpenVsxExtensionManagerModule=G},70274:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(57517),u=t(63067),G=t(52416),p=t(29150),h=t(21082),b=t(6449),I=t(73689);let r=class{initialize(){}onDidRender(){const s=this.mainLayoutService.getTabbarHandler(h.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID);s&&(s.isActivated()?this.vsxExtensionService.getOpenVSXRegistry().then(()=>{this.vsxExtensionService.search("")}):s.onActivate(async()=>{!this.vsxExtensionService.openVSXRegistry&&await this.vsxExtensionService.getOpenVSXRegistry(),this.vsxExtensionService.search("")}))}registerResource(s){s.registerResourceProvider({scheme:h.EXTENSION_SCHEME,provideResource:async d=>{const{extensionId:m,state:v}=d.getParsedQuery(),f=await this.vsxExtensionService.getLocalExtension(m),N=this.iconService.fromIcon("",f?.iconUrl,G.IconType.Background);return{uri:d,metadata:Object.assign(Object.assign({},f),{extensionId:m,state:v,openVSXRegistry:this.vsxExtensionService.openVSXRegistry}),icon:N||(0,o.getIcon)("extension"),name:(0,c.replaceLocalizePlaceholder)(f?.displayName,m)||""}}})}registerEditorComponent(s){const d=`${h.EXTENSION_SCHEME}_detail`;s.registerEditorComponent({component:b.ExtensionOverview,uid:d,scheme:h.EXTENSION_SCHEME}),s.registerEditorComponentResolver(h.EXTENSION_SCHEME,(m,v,f)=>{f?.([{type:g.EditorOpenType.component,componentId:d}])})}registerComponent(s){s.register("@opensumi/ide-extension-manager",[],{iconClass:(0,o.getIcon)("extension"),title:(0,c.localize)("marketplace.extension.container"),priority:5,containerId:h.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,component:I.VSXExtensionView,activateKeyBinding:"ctrlcmd+shift+x"})}};n.__decorate([(0,a.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],r.prototype,"mainLayoutService",void 0),n.__decorate([(0,a.Autowired)(p.VSXExtensionServiceToken),n.__metadata("design:type",Object)],r.prototype,"vsxExtensionService",void 0),n.__decorate([(0,a.Autowired)(G.IIconService),n.__metadata("design:type",Object)],r.prototype,"iconService",void 0),r=n.__decorate([(0,c.Domain)(o.ClientAppContribution,u.MainLayoutContribution,o.ComponentContribution,g.BrowserEditorContribution)],r),e.VSXExtensionContribution=r},67761:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionService=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(57517),u=t(98453),G=t(71354),p=t(52416),h=t(12456),b=t(29150);let I=class extends c.Disposable{constructor(){super(),this.extensions=a.observable.array([]),this.installedExtensions=a.observable.array([]),this.openVSXRegistry="",this.tasks=new Map,(0,a.makeObservable)(this),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 l="sumi-upload-file-status";if(this.tasks.size===1){const s=(0,c.localize)("marketplace.extension.installing"),d={text:s,alignment:c.StatusBarAlignment.RIGHT,tooltip:s,iconClass:"kaitian-icon kticon-cloud-server"};this.installStatus=this.statusBarService.addElement(l,d)}}async install(l){var s,d;const m=this.getExtensionId(l);if(this.tasks.has(m)||!l.downloadUrl)return;const v=this.backService.install({id:m,name:(s=l.name)!==null&&s!==void 0?s:"-",url:l.downloadUrl,version:(d=l.version)!==null&&d!==void 0?d:"-"});return this.tasks.set(m,v),this.updateStatusBar(),v.then(async f=>{if(this.tasks.delete(m),this.updateStatusBar(),await this.extensionManagementService.postChangedExtension(!1,f),this.themeService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}if(this.iconService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.ICON_THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}if(this.productIconService.getAvailableThemeInfos().some(y=>y.extensionId===l.originId)){this.commandService.executeCommand(h.PRODUCT_ICON_THEME_TOGGLE_COMMAND.id,{extensionId:l.originId});return}})}async uninstall(l){l&&l.path&&await this.extensionManagementService.postUninstallExtension(l.path)}async disable(l){l&&l.path&&this.extensionManagementService.postDisableExtension(l.path)}async enable(l){l&&l.path&&this.extensionManagementService.postEnableExtension(l.path)}getExtensionId(l){var s,d,m;return(s=l?.extensionId)!==null&&s!==void 0?s:((d=l?.namespace)===null||d===void 0?void 0:d.toLowerCase())+"."+((m=l?.name)===null||m===void 0?void 0:m.toLowerCase())}async getLocalExtension(l){return l?this.extensions.find(d=>this.getExtensionId(d)===l)||this.installedExtensions.find(d=>this.getExtensionId(d)===l):void 0}async getRemoteRawExtension(l){if(!l)return;const s={extensionId:l},d=await this.backService.getExtension(s);if(d&&d.extensions&&d.extensions.length>=1)return Object.assign({},d.extensions[0])}async getOpenVSXRegistry(){this.openVSXRegistry=await this.backService.getOpenVSXRegistry()}async openExtensionEditor(l,s){this.workbenchEditorService.open(new c.URI(`extension://?extensionId=${l}&state=${s}`),{preview:!0})}async search(l){const s={query:l,size:50,sortBy:"downloadCount"};this.searchValue=l;const d=await this.backService.search(s);d.extensions&&(0,a.runInAction)(()=>{this.extensions=d.extensions.filter(m=>!this.installedExtensions.find(v=>this.getExtensionId(v)===this.getExtensionId(m))).map(m=>Object.assign(Object.assign({},m),{publisher:m.namespace,iconUrl:m.files.icon,downloadUrl:m.files.download,readme:m.files.readme}))})}async searchInstalledExtensions(l){this.installedExtensions=this.installedExtensions.sort((s,d)=>{const m=(0,c.fuzzyScore)(l,l.toLowerCase(),0,s.name,s.name.toLowerCase(),0,!0),v=(0,c.fuzzyScore)(l,l.toLowerCase(),0,d.name,d.name.toLowerCase(),0,!0);return m?v?v[0]-m[0]:-1:1})}getInstalledExtensions(){this.installedExtensions=this.extensionInstanceService.getExtensionInstances().map(l=>{const s=l.extensionId;return{namespace:s&&s.includes(".")?s.split(".")[0]:l.packageJSON.publisher,name:l.packageJSON.name,id:l.extensionId,version:l.packageJSON.version,displayName:l.packageJSON.displayName,description:l.packageJSON.description,publisher:l.packageJSON.publisher,iconUrl:l.packageJSON.icon&&l.extensionLocation.toString()+`/${l.packageJSON.icon}`,path:l.path,realpath:l.realPath}})}};n.__decorate([(0,o.Autowired)(b.VSXExtensionServicePath),n.__metadata("design:type",Object)],I.prototype,"backService",void 0),n.__decorate([(0,o.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],I.prototype,"workbenchEditorService",void 0),n.__decorate([(0,o.Autowired)(G.AbstractExtInstanceManagementService),n.__metadata("design:type",G.AbstractExtInstanceManagementService)],I.prototype,"extensionInstanceService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",u.ExtensionManagementService)],I.prototype,"extensionManagementService",void 0),n.__decorate([(0,o.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],I.prototype,"themeService",void 0),n.__decorate([(0,o.Autowired)(p.IIconService),n.__metadata("design:type",Object)],I.prototype,"iconService",void 0),n.__decorate([(0,o.Autowired)(p.IProductIconService),n.__metadata("design:type",Object)],I.prototype,"productIconService",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],I.prototype,"commandService",void 0),n.__decorate([a.observable.shallow,n.__metadata("design:type",Array)],I.prototype,"extensions",void 0),n.__decorate([a.observable,n.__metadata("design:type",Array)],I.prototype,"installedExtensions",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],I.prototype,"openVSXRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IStatusBarService),n.__metadata("design:type",Object)],I.prototype,"statusBarService",void 0),n.__decorate([a.observable,n.__metadata("design:type",Map)],I.prototype,"tasks",void 0),n.__decorate([(0,c.pMemoize)(r=>r),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],I.prototype,"search",null),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",Promise)],I.prototype,"searchInstalledExtensions",null),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],I.prototype,"getInstalledExtensions",null),I=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],I),e.VSXExtensionService=I},73689:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSXExtensionView=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(25150),c=n.__importStar(t(14041)),g=t(14041),u=t(97267),G=t(41869),p=t(68974),h=t(43718),b=t(5567),I=t(29150),r=t(21082),l=t(87791),s=n.__importDefault(t(68143)),d=[I.TabActiveKey.MARKETPLACE,I.TabActiveKey.INSTALLED];e.VSXExtensionView=(0,o.observer)(()=>{const[m,v]=(0,g.useState)(I.TabActiveKey.MARKETPLACE),[f,N]=(0,g.useState)(!1),W=(0,G.useInjectable)(I.VSXExtensionServiceToken),Z=(0,a.default)(A=>{N(!0);let w;m===I.TabActiveKey.MARKETPLACE?w=W.search(A):w=W.searchInstalledExtensions(A),typeof w=="object"&&w.then&&w.then(()=>{N(!1)})},500),y=(0,g.useCallback)(A=>W.install(A),[]),E=(0,g.useCallback)((A,w)=>{const F=W.getExtensionId(A);W.openExtensionEditor(F,w)},[]),R=(0,g.useCallback)(A=>{const w=d[A];w&&v(w)},[]);return c.createElement("div",{className:s.default.panel},c.createElement(u.Tabs,{mini:!0,className:s.default.tabs,value:d.indexOf(m),onChange:R,tabs:[(0,h.localize)("marketplace.panel.tab.marketplace"),(0,h.localize)("marketplace.tab.installed")]}),c.createElement("div",{style:{padding:"8px"}},c.createElement(b.AutoFocusedInput,{containerId:r.OPEN_VSX_EXTENSION_MANAGER_CONTAINER_ID,placeholder:(0,h.localize)("marketplace.panel.tab.placeholder.search"),value:"",onChange:A=>Z(A.target.value)})),m===I.TabActiveKey.MARKETPLACE&&c.createElement("div",{className:s.default.extensions_view},c.createElement(p.Progress,{loading:f}),W.extensions.map((A,w)=>c.createElement(l.Extension,{key:`${w}:${A.namespace}-${A.name}`,onClick:E,onInstall:y,extension:A,type:l.ExtensionViewType.MARKETPLACE,installedExtensions:W.installedExtensions,openVSXRegistry:W.openVSXRegistry}))),m===I.TabActiveKey.INSTALLED&&c.createElement("div",{className:s.default.extensions_view},W.installedExtensions.map((A,w)=>c.createElement(l.Extension,{key:`${w}:${A.namespace}-${A.name}`,onClick:E,onInstall:y,extension:A,type:l.ExtensionViewType.INSTALLED,openVSXRegistry:W.openVSXRegistry}))))})},29150:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IOpenvsxMarketplaceService=e.IAlipayCloudMarketplaceService=e.VSXExtensionServicePath=e.VSXExtensionBackSerivceToken=e.VSXExtensionServiceToken=e.VSXExtension=e.InstallState=e.TabActiveKey=e.EnableScope=void 0;var t;(function(c){c.GLOBAL="GLOBAL",c.WORKSPACE="WORKSPACE"})(t=e.EnableScope||(e.EnableScope={}));var n;(function(c){c.MARKETPLACE="marketplace",c.INSTALLED="installed"})(n=e.TabActiveKey||(e.TabActiveKey={}));var a;(function(c){c.INSTALLED="INSTALLED",c.NOT_INSTALLED="NOT_INSTALLED",c.SHOULD_UPDATE="SHOULD_UPDATE"})(a=e.InstallState||(e.InstallState={}));class o{}e.VSXExtension=o,o.KEYS=new Set(["version","iconUrl","publisher","name","displayName","description","averageRating","downloadCount","downloadUrl","readmeUrl","licenseUrl","repository","license","readme","preview","namespaceAccess","publishedBy"]),e.VSXExtensionServiceToken=Symbol("VSXExtensionSerivceToken"),e.VSXExtensionBackSerivceToken=Symbol("VSXExtensionBackSerivceToken"),e.VSXExtensionServicePath="VSXExtensionServicePath",e.IAlipayCloudMarketplaceService=Symbol("IAlipayCloudMarketplaceService"),e.IOpenvsxMarketplaceService=Symbol("IOpenvsxMarketplaceService")},53599:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageContribution=e.ExtensionStorageModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93584),g=t(7446),u=t(16132),G=t(10207),p=t(19227);let h=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IExtensionStorageService,useClass:G.ExtensionStorageService},{token:c.IExtensionStoragePathServer,useClass:u.ExtensionStoragePathServer},{token:c.IExtensionStorageServer,useClass:g.ExtensionStorageServer},b]}};h=n.__decorate([(0,o.Domain)(p.name)],h),e.ExtensionStorageModule=h;let b=class{onReconnect(){this.extensionStorageService.reConnectInit()}};n.__decorate([(0,a.Autowired)(c.IExtensionStorageService),n.__metadata("design:type",Object)],b.prototype,"extensionStorageService",void 0),b=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],b),e.ExtensionStorageContribution=b,n.__exportStar(t(10207),e)},16132:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStoragePathServer=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(96405),u=t(14951),G=t(73344),p=t(51500),{Path:h}=c.path;let b=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||p.DEFAULT_WORKSPACE_SUFFIX_NAME}async provideHostLogPath(){const r=await this.getLogsDirPath();if(!r)throw new Error("Unable to get parent log directory");const l=r,s=c.URI.file(l).toString();return await this.fileSystem.access(s)||await this.fileSystem.createFolder(s),new c.URI(r)}async provideHostStoragePath(r,l,s){const d=await this.getWorkspaceStorageDirPath(s);if(!d)throw new Error("Unable to get parent storage directory");await this.fileSystem.access(c.URI.file(d).toString())||await this.fileSystem.createFolder(c.URI.file(d).toString());const m=await this.buildWorkspaceId(r,l,s),v=new h(d).join(m).toString();await this.fileSystem.access(c.URI.file(v).toString())||await this.fileSystem.createFolder(c.URI.file(v).toString());const f=new c.URI(v);return this.storagePathInitialized||(this.deferredWorkspaceStoragePath.resolve(f.path.toString()),this.deferredStoragePath.resolve(d),this.storagePathInitialized=!0),this.cachedStoragePath=f}async getLastWorkspaceStoragePath(){var r;return this.storagePathInitialized?(r=this.cachedStoragePath)===null||r===void 0?void 0:r.path.toString():this.deferredWorkspaceStoragePath.promise}async getLastStoragePath(){return this.deferredStoragePath.promise}doHash(r){return this.hashCalculateService.calculate(r)}async buildWorkspaceId(r,l,s){const d=await this.getUserHomeDir(),m=N=>N.resolve(s||p.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${p.UNTITLED_WORKSPACE}.${this.workspaceSuffixName}`).withScheme(c.Schemes.file),v=N=>N.resolve(s||p.WORKSPACE_USER_STORAGE_FOLDER_NAME).resolve(`${p.UNTITLED_WORKSPACE}`).withScheme(c.Schemes.file);if(!r){const N=v(new c.URI(d));return this.doHash(N.toString())}if(m(new c.URI(d)).toString()===r.uri){const N=l.map(W=>W.uri).sort().join(",");return this.doHash(N)}else{const N=new c.URI(r.uri);return this.doHash(N.toString())}}async getLogsDirPath(){const r=await this.loggerManager.getLogFolder();return new h(r).join(c.StoragePaths.EXTENSIONS_LOGS_DIR).toString()}async getWorkspaceStorageDirPath(r){const l=await this.getWorkspaceDataDirPath(r);return new h(l).join(c.StoragePaths.EXTENSIONS_WORKSPACE_STORAGE_DIR).toString()}async getWorkspaceDataDirPath(r){const l=await this.getUserHomeDir(),s=r;return new h(l).join(...c.isWindows?this.windowsDataFolders:[""],s).toString()}async getUserHomeDir(){const r=await this.fileSystem.getCurrentUserHome();if(!r)throw new Error("Unable to get user home directory");return await this.fileSystem.getFsPath(r.uri)}};n.__decorate([(0,a.Autowired)(u.IFileServiceClient),n.__metadata("design:type",Object)],b.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(G.ILoggerManagerClient),n.__metadata("design:type",Object)],b.prototype,"loggerManager",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(g.IHashCalculateService),n.__metadata("design:type",Object)],b.prototype,"hashCalculateService",void 0),b=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],b),e.ExtensionStoragePathServer=b},7446:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageServer=void 0;const a=t(85608),o=t(76003),c=t(43718),g=t(14951),u=t(93584),{Path:G}=c.path;let p=n=class{constructor(){this.deferredWorkspaceDataDirPath=new c.Deferred,this.storageThrottler=new c.Throttler,this.storageTasks={},this.storageExistPromises=new Map}async init(b,I,r){return this.storageDelayer=new c.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),await this.setupDirectories(b,I,r||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME)}async asAccess(b,I){if(I)return await this.fileSystem.access(b);if(!this.storageExistPromises.has(b)){const r=this.fileSystem.access(b);this.storageExistPromises.set(b,r)}return await this.storageExistPromises.get(b)}async setupDirectories(b,I,r){const l=await this.extensionStoragePathsServer.getWorkspaceDataDirPath(r),s=c.URI.file(l).toString();await this.fileSystem.access(s)||await this.fileSystem.createFolder(s),this.workspaceDataDirPath=l,this.globalDataPath=new G(this.workspaceDataDirPath).join(c.StoragePaths.EXTENSIONS_GLOBAL_STORAGE_DIR).toString();const d=c.URI.file(this.globalDataPath).toString();await this.fileSystem.access(d)||await this.fileSystem.createFolder(d),this.deferredWorkspaceDataDirPath.resolve(this.workspaceDataDirPath);const m=await this.extensionStoragePathsServer.provideHostLogPath(),v=await this.extensionStoragePathsServer.provideHostStoragePath(b,I,r);return{logUri:m.codeUri,storageUri:v.codeUri,globalStorageUri:c.Uri.file(this.globalDataPath)}}async resolveStorageTask(b){const I=Object.keys(b);for(const r of I){const l=await this.readFromFile(r);for(const{key:s,value:d}of b[r])d===void 0||(0,c.isEmptyObject)(d)?delete l[s]:l[s]=d;await this.writeToFile(r,l)}}doSet(){const b=Object.assign({},this.storageTasks);return this.storageTasks={},this.resolveStorageTask(b)}async set(b,I,r){const l=await this.getDataPath(r);if(!l)throw new Error("Cannot save data: no opened workspace");return this.storageTasks[l]||(this.storageTasks[l]=[]),this.storageTasks[l].push({key:b,value:I}),this.storageDelayer.trigger(()=>this.storageThrottler.queue(this.doSet.bind(this)))}async get(b,I){const r=await this.getDataPath(I);return r?(await this.readFromFile(r))[b]:{}}async getAll(b){const I=await this.getDataPath(b);return I?await this.readFromFile(I):{}}async getDataPath(b){if(this.workspaceDataDirPath===void 0&&await this.deferredWorkspaceDataDirPath.promise,b)return new G(this.globalDataPath).join("global-state.json").toString();{const I=await this.extensionStoragePathsServer.getLastWorkspaceStoragePath();return I?new G(I).join("workspace-state.json").toString():void 0}}async readFromFile(b){const I=c.URI.file(b);if(!await this.asAccess(I.toString(),!0))return{};try{const{content:l}=await this.fileSystem.readFile(I.toString());return JSON.parse(l.toString())}catch(l){return this.logger.error('Failed to parse data from "',I.toString(),'". Reason:',l),{}}}async writeToFile(b,I){const r=c.URI.file(b);await this.asAccess(r.parent.toString())||await this.fileSystem.createFolder(r.parent.toString());const s=JSON.stringify(I);let d=await this.fileSystem.getFileStat(r.toString());d||(d=await this.fileSystem.createFile(r.toString())),await this.fileSystem.setContent(d,s)}};p.DEFAULT_FLUSH_DELAY=100,a.__decorate([(0,o.Autowired)(u.IExtensionStoragePathServer),a.__metadata("design:type",Object)],p.prototype,"extensionStoragePathsServer",void 0),a.__decorate([(0,o.Autowired)(g.IFileServiceClient),a.__metadata("design:type",Object)],p.prototype,"fileSystem",void 0),a.__decorate([(0,o.Autowired)(c.ILogger),a.__metadata("design:type",Object)],p.prototype,"logger",void 0),p=n=a.__decorate([(0,o.Injectable)()],p),e.ExtensionStorageServer=p},10207:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionStorageService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(51500),u=t(93584);let G=class{constructor(){this._init=this.init(),this.updateEnvState()}get whenReady(){return this._init}get extensionStoragePath(){return this._extensionStoragePath}async init(){const h=await this.workspaceService.roots,b=this.workspaceService.workspace,I=this.appConfig.extensionStorageDirName||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(b,h,I),this._extensionStoragePath}async updateEnvState(){await this.get(c.firstSessionDateStorageKey,!0)===void 0&&await this.set(c.firstSessionDateStorageKey,{date:new Date().toUTCString()},!0)}set(h,b,I){return this.extensionStorageServer.set(h,b,I)}get(h,b){return this.extensionStorageServer.get(h,b)}getAll(h=!1){return this.extensionStorageServer.getAll(h)}async reConnectInit(){const h=await this.workspaceService.roots,b=this.workspaceService.workspace,I=this.appConfig.extensionStorageDirName||u.DEFAULT_EXTENSION_STORAGE_DIR_NAME;return this._extensionStoragePath=await this.extensionStorageServer.init(b,h,I),this._extensionStoragePath}};n.__decorate([(0,a.Autowired)(u.IExtensionStorageServer),n.__metadata("design:type",Object)],G.prototype,"extensionStorageServer",void 0),n.__decorate([(0,a.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],G.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],G.prototype,"appConfig",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.ExtensionStorageService=G},93584:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(85853),e),n.__exportStar(t(56969),e),n.__exportStar(t(23618),e)},85853:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_EXTENSION_STORAGE_DIR_NAME=e.IExtensionStoragePathServer=void 0,e.IExtensionStoragePathServer=Symbol("IExtensionStoragePathServer"),e.DEFAULT_EXTENSION_STORAGE_DIR_NAME=".sumi"},56969:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionStorageService=e.IExtensionStorageServer=void 0,e.IExtensionStorageServer=Symbol("ExtensionStorageServer"),e.IExtensionStorageService=Symbol("ExtensionStorageService")},23618:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},50492:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(93584),e)},57962:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivationEventServiceImpl=void 0;const n=t(85608),a=n.__importDefault(t(80076)),o=t(76003),c=t(43718);let g=class{constructor(){this.eventListeners=new Map,this.collectTopicData=new c.MultiMap,this.wildCardTopics=new Set,this.activatedEventSet=new Set,this.wildCardTopics.add("workspaceContains")}getTopicsData(G){return this.collectTopicData.get(G)||[]}async fireEvent(G,p=""){this.activatedEventSet.add(JSON.stringify({topic:G,data:p}));let h;if(this.wildCardTopics.has(G)?h=this.eventListeners.get(G):this.eventListeners.has(G)?h=this.eventListeners.get(G):h=this.eventListeners.get(G+":"+p),h){const b=await Promise.allSettled(h.map(I=>this.tryRun(G,p,I)));for(const I of b)I.status==="rejected"&&this.logger.error(`fire event ${G}:${p} error: ${I.reason}`)}}addWildCardTopic(G){return this.wildCardTopics.add(G),{dispose:()=>{this.wildCardTopics.delete(G)}}}onEvent(G,p){const h=G.indexOf(":");let b,I;return h===-1?(b=G,I=""):(b=G.substr(0,h),I=G.substr(h+1)),this.addListener(b,{topic:b,data:I,execute:p})}addListener(G,p){if(this.collectTopicData.set(p.topic,p.data),this.wildCardTopics.has(G))return this.eventListeners.has(G)||this.eventListeners.set(G,[]),this.eventListeners.get(G).push(p),{dispose:()=>{const h=this.eventListeners.get(G).indexOf(p);h!==-1&&this.eventListeners.get(G).splice(h,1)}};{const h=G+":"+p.data;return this.eventListeners.has(h)||this.eventListeners.set(h,[]),this.eventListeners.get(h).push(p),{dispose:()=>{const b=this.eventListeners.get(h).indexOf(p);b!==-1&&this.eventListeners.get(h).splice(b,1)}}}}async tryRun(G,p,h){this.wildCardTopics.has(G)?(0,a.default)(h.data)(p)&&await h.execute():await h.execute()}};n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],g.prototype,"logger",void 0),g=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],g),e.ActivationEventServiceImpl=g},63056:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionNoExportsView=e.ExtensionLoadingView=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(68974),g=n.__importDefault(t(17267)),u=({style:p})=>a.default.createElement("div",{style:p||{},className:g.default.kt_extension_view},a.default.createElement(c.Progress,{loading:!0}));e.ExtensionLoadingView=u;const G=(p,h)=>a.default.createElement("div",{className:g.default.kt_extension_no_exports_view},(0,o.formatLocalize)("extension.no.view.found",p,h));e.ExtensionNoExportsView=G},56405:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PortalRoot=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(41869),g=t(87420),u=t(25600),G=p=>{var h;const[b,I]=o.default.useState(null),r=(0,c.useInjectable)(u.AbstractViewExtProcessService),l=(0,c.useInjectable)(g.IThemeService);o.default.useEffect(()=>{const d=new c.DisposableCollection;return l.getCurrentTheme().then(m=>I(m.type)),d.push(l.onThemeChange(m=>{m.type&&m.type!==b&&I(m.type)})),d.dispose.bind(d)},[]);const s=p.original;return o.default.createElement(s,Object.assign({},p.otherProps,{className:(0,a.default)((h=p.otherProps)===null||h===void 0?void 0:h.className,(0,g.getThemeTypeSelector)(b)),getContainer:()=>r.getPortalShadowRoot(p.extensionId)}))};e.PortalRoot=G},82443:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TREE_VIEW_NODE_HEIGHT=e.TreeViewNode=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(25918),G=t(93899),p=t(95422),h=t(69589),b=t(42912),I=n.__importDefault(t(50790)),r=({item:l,onClick:s,onContextMenu:d,itemType:m,leftPadding:v=8,onTwistierClick:f,decorations:N,defaultLeftPadding:W=8,treeViewId:Z,decorationService:y,draggable:E,onDragStart:R,onDragEnter:A,onDragLeave:w,onDragOver:F,onDrop:V})=>{const Y=(0,p.useInjectable)(b.IIconService),_=(0,g.useDesignStyles)(I.default.expansion_toggle,"expansion_toggle"),H=(0,g.useDesignStyles)(I.default.tree_view_node,"tree_view_node"),[X,S]=(0,o.useState)(l.uri&&y.getDecoration(l.uri,!1));(0,o.useEffect)(()=>{const ie=y.onDidChangeDecorations(he=>{l.uri&&he.affectsResource(l.uri)&&S(y.getDecoration(l.uri,!1))});return()=>{ie.dispose()}},[]);const Q=(0,p.useInjectable)(b.IThemeService),O=(0,o.useCallback)(ie=>{(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&s(ie,l,m)},[l,m,s]),M=(0,o.useCallback)(ie=>{(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&(f?f(ie,l,m):s(ie,l,m))},[l,m,f,s]),T=(0,o.useCallback)(ie=>{ie.nativeEvent.which===0||!d||(m===c.TreeNodeType.TreeNode||m===c.TreeNodeType.CompositeTreeNode)&&d(ie,l,m)},[l,m,d]),B=(0,o.useCallback)(ie=>{R&&R(ie,l)},[l,R]),x=(0,o.useCallback)(ie=>{A&&A(ie,l)},[l,A]),D=(0,o.useCallback)(ie=>{w&&w(ie,l)},[l,w]),J=(0,o.useCallback)(ie=>{F&&F(ie,l)},[l,F]),k=(0,o.useCallback)(ie=>{V&&V(ie,l)},[l,V]),z=m===c.TreeNodeType.CompositeTreeNode,P=z?`${W+(l.depth||0)*(v||0)}px`:`${W+(l.depth||0)*(v||0)+8}px`,U={height:e.TREE_VIEW_NODE_HEIGHT,lineHeight:`${e.TREE_VIEW_NODE_HEIGHT}px`,paddingLeft:P},ne=(ie,he)=>N&&N?.classlist.indexOf(I.default.mod_loading)>-1?o.default.createElement(c.Loading,null):o.default.createElement("div",{onClick:he,className:(0,a.default)(I.default.tree_view_node_segment,_,(0,g.getIcon)("arrow-right"),{[`${I.default.mod_collapsed}`]:!ie.expanded})}),re=ie=>o.default.createElement("div",{className:(0,a.default)(I.default.file_icon,ie.icon),style:{maxHeight:e.TREE_VIEW_NODE_HEIGHT}}),ae=ie=>{const he=()=>{if(ie.highlights){let ee=[],j=0;const te=ie.highlights.sort((oe,ce)=>oe[0]-ce[0]);return ee=te.map((oe,ce)=>{const[Ie,Ge]=oe,se=ie.displayName.slice(j,Ie);j=Ge;const me=ie.displayName.slice(Ie,Ge),ve=[o.default.createElement("span",{key:`line_begin_${ce}_${se}`},se),o.default.createElement("span",{className:I.default.highlight,key:`line_hightlight_${ce}_${me}`},me)];if(ce===te.length-1){const We=ie.displayName.slice(Ge);ve.push(o.default.createElement("span",{key:`line_end_${ce}_${We}`},We))}return ve}),ee}else return ie.displayName};return o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment,I.default.tree_view_node_displayname,ie.strikethrough&&I.default.strikethrough)},he())},ue=()=>o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment,I.default.tree_view_node_tail)},$()),$=()=>{if(l.actions.length>0)return o.default.createElement("div",{className:I.default.tree_view_actions},o.default.createElement(u.TitleActionList,{className:I.default.inlineMenu,context:[{treeViewId:Z,treeItemId:l.treeItemId}],nav:l.actions,menuId:G.MenuId.ViewItemContext}))},pe=ie=>{if(z)return ne(ie,M)},ge=()=>l.tooltip||l.name,q=ie=>o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_segment_grow,I.default.tree_view_node_description)},!ie.name&&!ie.description?"\u2014\u2014":ie.description),le=()=>{if(!X)return null;const ie=X.badge||"",he=X.color,ee=he&&Q.getColor({id:he});return o.default.createElement("div",{className:I.default.tree_view_node_tail,style:{color:ee}},(0,h.transformLabelWithCodicon)(ie.slice(),{},Y.fromString.bind(Y)))};return o.default.createElement("div",{key:l.id,onClick:O,onContextMenu:T,onDragStart:B,onDragOver:J,onDragEnter:x,onDragLeave:D,onDrop:k,title:ge(),className:(0,a.default)(H,N?N.classlist:null),"data-id":l.id,style:U,draggable:E},o.default.createElement("div",{className:(0,a.default)(I.default.tree_view_node_content)},pe(l),re(l),o.default.createElement("div",{className:I.default.tree_view_node_overflow_wrap},ae(l),q(l)),ue(),le()))};e.TreeViewNode=r,e.TREE_VIEW_NODE_HEIGHT=22},81302:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTabBarTreeView=void 0;const n=t(85608),a=t(25150),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(68974),G=t(41893),p=t(24429),h=t(72260),b=t(82443),I=n.__importDefault(t(17267));e.ExtensionTabBarTreeView=(0,a.observer)(({viewState:s,model:d,dataProvider:m,treeViewId:v})=>{const f=(0,g.useInjectable)(h.IMainLayoutService),N=(0,g.useInjectable)(G.IDecorationsService),W=(0,o.useMemo)(()=>f.getViewAccordionService(v),[]),Z=(0,o.useMemo)(()=>{const B=W?.getViewState(v);return B?!B.collapsed&&!B.hidden:!1},[W]),{height:y}=s,{canSelectMany:E}=d.treeViewOptions||{},R=(0,o.useRef)(null),A=(0,o.useCallback)(B=>{d.handleTreeHandler(Object.assign(Object.assign({},B),{getModel:()=>d.treeModel,hasDirectFocus:()=>R.current===document.activeElement}))},[d]),w=(0,o.useCallback)((B,x)=>{B.stopPropagation();const{toggleDirectory:D}=d;D(x)},[d]),F=(0,o.useCallback)(B=>V(B)?!1:B.shiftKey,[]),V=(0,o.useCallback)(B=>{const{metaKey:x,ctrlKey:D}=B;return g.isOSX&&x||D},[]),Y=(0,o.useCallback)((B,x,D)=>{B.stopPropagation();const{handleItemClick:J,handleItemToggleClick:k,handleItemRangeClick:z}=d;if(!x)return;const P=F(event),U=V(event);E?P?z(x,D):U?k(x,D):J(x,D):J(x,D)},[E,d]),_=(0,o.useCallback)((B,x)=>{const{handleContextMenu:D}=d;D(B,x)},[d]),H=B=>{const{handleContextMenu:x}=d;x(B)},X=(0,o.useCallback)(()=>{const{enactiveNodeDecoration:B}=d;B()},[d]),S=(0,o.useCallback)((B,x)=>{const{handleDragStart:D}=d;D(B,x)},[d]),Q=(0,o.useCallback)((B,x)=>{const{handleDragOver:D}=d;D(B,x)},[d]),O=(0,o.useCallback)((B,x)=>{const{handleDragEnter:D}=d;D(B,x)},[d]),M=(0,o.useCallback)((B,x)=>{const{handleDrop:D}=d;D(B,x)},[d]),T=(0,o.useCallback)((B,x)=>{const{handleDragLeave:D}=d;D(B,x)},[d]);return(0,o.useEffect)(()=>{var B;const x=()=>{d.handleTreeBlur()};return(B=R.current)===null||B===void 0||B.addEventListener("blur",x,!0),()=>{var D;(D=R.current)===null||D===void 0||D.removeEventListener("blur",x,!0)}},[R.current]),o.default.createElement("div",{className:I.default.kt_extension_view,tabIndex:-1,ref:R,onContextMenu:H,onClick:X,"data-tree-view-id":v},o.default.createElement(l,{height:y,isVisible:Z,handleTreeReady:A,handleItemClicked:Y,handleTwistierClick:w,handleContextMenu:_,handleDragStart:S,handleDragOver:Q,handleDragEnter:O,handleDragLeave:T,handleDrop:M,draggable:d.draggable,treeViewId:v,model:d,dataProvider:m,decorationService:N}))});function r(s,d){return s.isVisible===d.isVisible&&s.model===d.model&&s.treeViewId===d.treeViewId&&s.height===d.height}const l=(0,o.memo)(({model:s,treeViewId:d,height:m,isVisible:v,dataProvider:f,handleTreeReady:N,handleItemClicked:W,handleTwistierClick:Z,handleContextMenu:y,handleDragStart:E,handleDragOver:R,handleDragEnter:A,handleDragLeave:w,handleDrop:F,draggable:V,decorationService:Y})=>{const[_,H]=(0,o.useState)(!1),[X,S]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let O=!1;return(async()=>(await s.whenReady,s.treeModel&&v&&await s.treeModel.ensureReady,O||H(!0)))(),()=>{O=!0,s&&s.removeNodeDecoration()}},[s,v]),(0,o.useEffect)(()=>{const O=f.onDidChangeEmpty(()=>{f.isTreeEmpty!==X&&S(f.isTreeEmpty)});return()=>O.dispose()},[]);const Q=(0,o.useCallback)(O=>o.default.createElement(b.TreeViewNode,{item:O.item,itemType:O.itemType,decorations:s.decorations.getDecorations(O.item),onClick:W,onTwistierClick:Z,onContextMenu:y,onDragStart:E,onDragOver:R,onDragEnter:A,onDragLeave:w,onDrop:F,defaultLeftPadding:8,leftPadding:8,treeViewId:d,draggable:V,decorationService:Y}),[s.treeModel]);if(_){if(X)return o.default.createElement(p.WelcomeView,{viewId:d});if(s.treeModel)return o.default.createElement(c.RecycleTree,{height:m,itemHeight:b.TREE_VIEW_NODE_HEIGHT,onReady:N,model:s.treeModel},Q)}else return o.default.createElement(u.Progress,{loading:!0});return null},r);l.displayName="ExtensionsTreeView"},88341:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionWebviewView=e.WebviewViewShouldShowEvent=void 0;const a=t(85608).__importDefault(t(14041)),o=t(41869),c=t(99220);class g extends o.BasicEvent{}e.WebviewViewShouldShowEvent=g;const u=({viewId:G})=>{const p=a.default.useRef(null),h=(0,o.useInjectable)(o.IEventBus),b=(0,o.useInjectable)(c.ExtensionService);return a.default.useEffect(()=>{const I=new o.CancellationTokenSource,r=new o.Disposable({dispose:()=>I.cancel()});return b.eagerExtensionsActivated.promise.then(()=>{I.token.isCancellationRequested||p.current&&h.fire(new g({viewType:G,container:p.current,title:"",cancellationToken:I.token,disposer:r}))}),()=>{r.dispose()}},[]),a.default.createElement("div",{style:{height:"100%",width:"100%",position:"relative"},className:"webview-view-component",ref:p})};e.ExtensionWebviewView=u},17428:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(81302),e),n.__exportStar(t(63056),e)},21167:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkthroughsEditorView=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(93374),G=t(52416),p=t(99220),h=t(17441),b=n.__importDefault(t(42076)),I=({resource:{uri:d}})=>{const m=(0,g.useInjectable)(h.WalkthroughsService),v=(0,g.useInjectable)(g.IContextKeyService),{query:f,authority:N}=d,[W,Z]=(0,o.useState)(),[y,E]=(0,o.useState)();(0,o.useEffect)(()=>{W&&W.steps.length>0&&(y||E(W.steps[0].id))},[W,y]),(0,o.useEffect)(()=>{f&&Z(m.getWalkthrough(f))},[f,W]);const R=(0,o.useCallback)(()=>{var A;return W&&((A=W.steps.find(w=>w.id===y))===null||A===void 0?void 0:A.media)},[y,W]);return o.default.createElement("div",{className:b.default.getting_started_container},o.default.createElement("div",{className:b.default.getting_started_detailsContent},o.default.createElement("div",{className:b.default.category_container},o.default.createElement("div",{className:b.default.category_icon},W&&W.icon.type==="image"&&o.default.createElement("img",{src:W.icon.path})),o.default.createElement("div",{className:b.default.category_description_container},o.default.createElement("h2",{className:b.default.category_title},W?.title),o.default.createElement("div",{className:b.default.category_description},W?.description))),o.default.createElement("div",{className:b.default.steps_container},o.default.createElement("div",{className:b.default.getting_started_detail_container},o.default.createElement("div",{className:b.default.step_list_container},W?W.steps.filter(A=>v.match(A.when)).map(A=>o.default.createElement(r,{key:A.id,step:A,isExpanded:A.id===y,onSelected:E})):null))),o.default.createElement("div",{className:b.default.getting_started_media},y&&o.default.createElement(l,{media:R(),extensionId:N,stepId:y}))))};e.WalkthroughsEditorView=I;const r=({step:d,isExpanded:m,onSelected:v})=>{const f=(0,g.useInjectable)(g.IOpenerService),N=(0,g.useInjectable)(h.WalkthroughsService),W=(0,g.useInjectable)(G.IIconService),[Z,y]=(0,o.useState)(!1),{description:E}=d;(0,o.useEffect)(()=>{const V=N.onDidProgressStep(Y=>{const{id:_,done:H}=Y;_===d.id&&H&&y(H)});return()=>V.dispose()},[]);const R=(0,o.useCallback)(()=>{y(!Z),N.progressByEvent(p.CompletionEventsType.stepSelected+":"+d.id)},[Z,d.id]),A=(0,o.useCallback)(V=>{const{href:Y}=V;f.open(Y),/^http(s)?:\/\//.test(Y)&&N.progressByEvent(p.CompletionEventsType.onLink+":"+Y)},[]),w=(0,o.useCallback)(()=>{if(E.length===0)return null;const V=[];return E.map((Y,_)=>{if(Y.nodes.length===1&&typeof Y.nodes[0]!="string"){const H=Y.nodes[0];V.push(o.default.createElement("div",{key:_.toString()+V.length,title:H.title},o.default.createElement(c.Button,{onClick:()=>A(H)},(0,g.transformLabelWithCodicon)(H.label,{},W.fromString.bind(W)))))}else{const H=Y.nodes.map((X,S)=>typeof X=="string"?X:o.default.createElement("a",{key:X.label+"#"+S,title:X.title,onClick:()=>A(X)},X.label));V.push(o.default.createElement("p",{key:_.toString()+V.length.toString()+H.length.toString()},H))}}),o.default.createElement("div",{className:b.default.step_description_container},o.default.createElement(o.default.Fragment,null,V))},[E]),F=(0,o.useCallback)(()=>(0,g.transformLabelWithCodicon)(d.title,{},W.fromString.bind(W)),[d.title]);return o.default.createElement("div",{className:(0,a.default)(b.default.getting_started_step,m&&b.default.expanded),onClick:()=>v(d.id)},o.default.createElement("div",{className:b.default.checkbox},o.default.createElement(c.CheckBox,{id:d.id,onChange:R,checked:Z})),o.default.createElement("div",{className:b.default.step_container},o.default.createElement("h3",{className:b.default.step_title},F()),m&&w()))},l=({media:d,extensionId:m,stepId:v})=>{const f=(0,g.useInjectable)(G.IThemeService),N=(0,g.useInjectable)(h.WalkthroughsService),[W,Z]=(0,o.useState)(""),[y,E]=(0,o.useState)(""),R=(0,o.useCallback)(async A=>d?.type==="image"?"":A?(await N.getFileContent(m,A)).toString():"",[d]);if((0,o.useEffect)(()=>{const A=N.getStepsByExtension(v);A&&(d&&d.type==="svg"&&A.media.svg&&R(A.media.svg).then(Z),d&&d.type==="markdown"&&A.media.markdown&&R(A.media.markdown).then(E))},[d,v]),!d)return null;if(d.type==="image"){const A=f.getCurrentThemeSync().type,w=d.path[A].toString(!0).replace(/ /g,"%20");return o.default.createElement(o.default.Fragment,null,o.default.createElement("img",{alt:d.altText,srcSet:w.toLowerCase().endsWith(".svg")?w:w+" 1.5x"}))}return d.type==="svg"?o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:b.default.media_svg_container,dangerouslySetInnerHTML:{__html:W}})):d.type==="markdown"?o.default.createElement(o.default.Fragment,null,o.default.createElement(s,{content:y,media:d})):null},s=({content:d,media:m})=>{const v=(0,g.useInjectable)(g.IOpenerService);if(m.type!=="markdown")return null;const f=(0,o.useCallback)(()=>m.base.resolve("/").toString(),[m,d]);return o.default.createElement(u.Markdown,{content:d,options:{baseUrl:f()},onLinkClick:N=>v.open(N)})}},87444:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtCommandManagementImpl=void 0;const n=t(85608),a=t(76003),o=t(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(u,G){this.proxyCommandExecutorRegistry.set(u,G)}async executeExtensionCommand(u,G,p){const h=this.proxyCommandExecutorRegistry.get(u);if(!h)throw new Error('Proxy command executor "'+u+'" is not existed');return h.$executeExtensionCommand(G,...p)}registerExtensionCommandEnv(u,G="node"){return this.commandEnvRegistry.set(u,G),{dispose:()=>{this.commandEnvRegistry.delete(u)}}}getExtensionCommandEnv(u){return this.commandEnvRegistry.get(u)}};c=n.__decorate([(0,a.Injectable)()],c),e.ExtCommandManagementImpl=c},49413:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtInstanceManagementService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(99220),u=t(42734);let G=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 h of this.extensionMap.values())h.dispose();this.extensionMap=new Map}disposeExtensionInstancesByPath(h){h.forEach(b=>{this.extensionMap.has(b)&&this.extensionMap.get(b).dispose()})}resetExtensionInstances(){for(const h of this.extensionMap.values())h.reset()}getExtensionInstanceByPath(h){return this.extensionMap.get(h)}getExtensionInstanceByExtId(h){for(const b of this.extensionMap.values())if(b.id===h)return b}deleteExtensionInstanceByPath(h){this.extensionMap.delete(h),this.onDidChangeEmitter.fire()}addExtensionInstance(h){this.extensionMap.set(h.path,h),this.onDidChangeEmitter.fire()}async checkExtensionEnable(h){await this.whenReady;const b=this.globalStorage.get(h.extensionId,g.EXTENSION_ENABLE.ENABLE);return this.workspaceStorage.get(h.extensionId,b)===g.EXTENSION_ENABLE.ENABLE}async createExtensionInstance(h,b,I){const r=typeof h=="string"?await this.extensionNodeClient.getExtension(h,(0,c.getLanguageId)(),{}):h;if(r)return this.injector.get(u.Extension,[r,await this.checkExtensionEnable(r),b||(this.appConfig.extensionDir?r.realPath.startsWith(this.appConfig.extensionDir):!1),!!I])}checkIsBuiltin(h){const b=this.getExtensionCandidateByPath(h.realPath);return(this.appConfig.extensionDir?h.realPath.startsWith(this.appConfig.extensionDir):!1)||(b?b.isBuiltin:!1)}checkIsDevelopment(h){const b=this.getExtensionCandidateByPath(h.realPath);return!!b?.isDevelopment}getExtensionCandidateByPath(h){return this.appConfig.extensionCandidate&&this.appConfig.extensionCandidate.find(b=>b.path===h)}};n.__decorate([(0,a.Autowired)(o.StorageProvider),n.__metadata("design:type",Function)],G.prototype,"storageProvider",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],G.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],G.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(g.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],G.prototype,"extensionNodeClient",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.ExtInstanceManagementService=G},98453:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(14951),g=t(99220),u=t(82389),G=t(71354),p=t(35321);let h=class extends o.WithEventBus{async getExtensionProps(I,r){const l=await this.extensionNodeClient.getExtension(I,(0,o.getLanguageId)(),r);if(l){const s=this.getExtensionByPath(I);if(s)return Object.assign(Object.assign({},s.toJSON()),{extraMetadata:l.extraMetadata})}}getExtensionByPath(I){return this.extInstanceManagementService.getExtensionInstances().find(r=>I===r.path)}getExtensionByExtId(I){return this.extInstanceManagementService.getExtensionInstances().find(r=>I===r.id)}async postChangedExtension(I,r,l){const{upgrade:s,extensionPath:d,oldExtensionPath:m,isBuiltin:v}=typeof I=="boolean"?{upgrade:I,extensionPath:r,oldExtensionPath:l,isBuiltin:!1}:I,f=this.extInstanceManagementService.getExtensionInstanceByPath(d);if(f){this.logger.warn(`Extension ${f.id} already exists, skip activate`);return}const N=await this.extInstanceManagementService.createExtensionInstance(d,!!v);if(N)return s&&this.disableExtension(m),await this.enableExtension(N)}async postEnableExtension(I){const r=await this.extInstanceManagementService.getExtensionInstanceByPath(I);if(r)return await this.enableExtension(r)}async postDisableExtension(I){return this.disableExtension(I)}async postUninstallExtension(I){return this.uninstallExtension(I)}getAllExtensionJson(){return this.extInstanceManagementService.getExtensionInstances().map(I=>I.toJSON())}disableExtension(I){const r=this.extInstanceManagementService.getExtensionInstanceByPath(I);r&&(r.disable(),this.extInstanceManagementService.deleteExtensionInstanceByPath(I))}async enableExtension(I){this.extInstanceManagementService.addExtensionInstance(I),I.enable(),await I.initialize(),this.eventBus.fire(new G.ExtensionDidEnabledEvent(I.toJSON())),this.sumiContributesService.register(I.id,I.packageJSON.sumiContributes||{}),this.contributesService.register(I.id,I.contributes),this.sumiContributesService.initialize(),this.contributesService.initialize()}async removeExtension(I){try{return await this.fileService.delete(o.URI.file(I).toString()),!0}catch(r){return this.logger.error(r),!1}}async uninstallExtension(I){const r=this.extInstanceManagementService.getExtensionInstanceByPath(I);r&&(r.dispose(),this.extInstanceManagementService.deleteExtensionInstanceByPath(I)),await this.removeExtension(I),this.eventBus.fire(new G.ExtensionDidUninstalledEvent)}};n.__decorate([(0,a.Autowired)(G.AbstractExtInstanceManagementService),n.__metadata("design:type",G.AbstractExtInstanceManagementService)],h.prototype,"extInstanceManagementService",void 0),n.__decorate([(0,a.Autowired)(g.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],h.prototype,"extensionNodeClient",void 0),n.__decorate([(0,a.Autowired)(p.VSCodeContributesServiceToken),n.__metadata("design:type",p.VSCodeContributesService)],h.prototype,"contributesService",void 0),n.__decorate([(0,a.Autowired)(u.SumiContributionsServiceToken),n.__metadata("design:type",u.SumiContributionsService)],h.prototype,"sumiContributesService",void 0),n.__decorate([(0,a.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileService",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],h.prototype,"logger",void 0),h=n.__decorate([(0,a.Injectable)()],h),e.ExtensionManagementService=h},20670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeExtProcessService=void 0;const n=t(85608),a=t(76003),o=t(8919),c=t(18740),g=t(41869),u=t(99220),G=t(72464),p=t(46147),h=t(37846),b=t(28949),I=t(51072),r=t(17802);let l=class{constructor(){this._apiFactoryDisposables=new g.DisposableStore,this.ready=new g.Deferred,this._extHostUpdated=new g.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(d,m){!this.appConfig.noExtHost&&!m&&(await this._extHostUpdated.promise,await(await this.getProxy()).$activateExtension(d.id))}async updateExtensionData(d){if(this.extensions=d,this.protocol){const m=await this.getProxy();await m.$updateExtHostData(),m.$fireChangeEvent()}}getExtension(d){return this.extensions.find(m=>m.id===d)}async $activateExtension(d){const m=this.extensions.find(v=>v.path===d);m&&await m.activate()}async $getExtensions(){return this.extensions.map(d=>d.toJSON())}async getProxy(){return await this.ready.promise,this.protocol.getProxy(p.ExtHostAPIIdentifier.ExtHostExtensionService)}async createBrowserMainThreadAPI(){const d=(0,r.initSharedAPIProxy)(this.protocol,this.injector);this._apiFactoryDisposables.add(d),this._apiFactoryDisposables.add((0,g.toDisposable)((0,I.initNodeThreadAPIProxy)(this.protocol,this.injector,this))),this._apiFactoryDisposables.add((0,g.toDisposable)((0,b.createSumiAPIFactory)(this.protocol,this.injector))),this._apiFactoryDisposables.add(this.createExternalSumiAPIFactory()),await d.setup()}getSpawnOptions(){return{}}createExternalSumiAPIFactory(){const d=new g.Disposable,m=this.mainThreadExtenderContributionProvider.getContributions();for(const f of m)f.registerMainThreadExtender(this.mainThreadExtenderService);const v=this.mainThreadExtenderService.getMainThreadExtenders();for(const f of v){const N=this.injector.get(f.serviceClass,[this.protocol]);this.protocol.set(f.identifier,N),d.addDispose(N)}return d}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 d,m;this.channel&&this.channel.dispose(),this.protocol&&((m=(d=this.protocol).dispose)===null||m===void 0||m.call(d)),this.channel=await this.channelHandler.openChannel(u.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)(h.knownProtocols)})}};n.__decorate([(0,a.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],l.prototype,"appConfig",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],l.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(u.ExtensionNodeServiceServerPath),n.__metadata("design:type",Object)],l.prototype,"extensionNodeClient",void 0),n.__decorate([(0,a.Autowired)(g.IApplicationService),n.__metadata("design:type",Object)],l.prototype,"applicationService",void 0),n.__decorate([(0,a.Autowired)(c.WSChannelHandler),n.__metadata("design:type",c.WSChannelHandler)],l.prototype,"channelHandler",void 0),n.__decorate([(0,a.Autowired)(G.IMainThreadExtenderService),n.__metadata("design:type",Object)],l.prototype,"mainThreadExtenderService",void 0),n.__decorate([(0,a.Autowired)(G.MainThreadExtenderContribution),n.__metadata("design:type",Object)],l.prototype,"mainThreadExtenderContributionProvider",void 0),l=n.__decorate([(0,a.Injectable)()],l),e.NodeExtProcessService=l},90731:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewExtProcessService=void 0;const a=t(85608),o=t(76003),c=t(65973),g=t(8919),u=t(41869),G=t(40827),p=t(43718),h=t(61656),b=t(99220),I=t(25600),r=t(17428),l=t(54107),s=t(9438),d=t(8403),m=t(31738),{Path:v,posix:f}=u.path,N="load";let W=n=class extends p.Disposable{constructor(){super(...arguments),this.debugLogger=(0,p.getDebugLogger)(),this.extensions=[],this.activatedViewExtensionMap=new Map,this.portalShadowRootMap=new Map,this.shadowRootBodyMap=new Map}getExtension(y){return this.extensions.find(E=>E.id===y)}async initExtension(y){this.extensions=y}async getActivatedExtensions(){return[]}getProxy(){}async $activateExtension(y){}async $getExtensions(){return this.extensions.map(y=>y.toJSON())}async disposeProcess(){}activate(){const y=this.requireInterceptorContributionProvider.getContributions();for(const E of y)E.registerRequireInterceptor(this.requireInterceptorService);this.extendExtensionErrorStackTrace()}extendExtensionErrorStackTrace(){Error.stackTraceLimit=100,Error.prepareStackTrace=(y,E)=>{let R,A=`Error: ${y.message}`;for(const w of E)if(A+=`
|
|
28076
28076
|
at ${w.toString()}`,!R&&w.isEval()){const F=w.getEvalOrigin(),V=this.getExtension.apply(this,[F]);if(V){R=V;const Y=w.getColumnNumber(),_=w.getLineNumber();A=`
|
|
28077
28077
|
at ${R.name} (${R.workerScriptPath}:${_}:${Y})`+A}}if(R){const w=`${R&&R.name} - ${y.name||"Error"}: ${y.message||""}${A}`;return this.debugLogger.log("get error",w),this.reportRuntimeError(y,R,w),w}return y.stack}}reportRuntimeError(y,E,R){var A;y&&y.message&&this.reporterService.point(p.REPORT_NAME.RUNTIME_ERROR_EXTENSION,E.id,{stackTraceMessage:R,error:y.message,version:(A=E.packageJSON)===null||A===void 0?void 0:A.version})}getRegisterViewKind(y){return n.tabBarLocation.includes(y)?"replace":"add"}async activeExtension(y,E){var R;const{extendConfig:A,packageJSON:w,contributes:F}=y;if(!((R=A?.browser)===null||R===void 0)&&R.main){(0,c.warning)(!1,"[Deprecated warning]: kaitian.js is deprecated, please use `package.json#sumiContributes` instead"),await this.activateExtensionByDeprecatedExtendConfig(y);return}w.sumiContributes&&F?.browserMain&&await this.activeExtensionContributes(y)}async activeExtensionContributes(y){var E;const{contributes:R}=y,A=new u.URI(y.extensionLocation.with({path:f.join(y.extensionLocation.path,R.browserMain)})),{moduleExports:w,proxiedHead:F}=await this.getExtensionModuleExports(A.toString(),y);if(R.browserViews){const{browserViews:Y}=R;this.appConfig.useExperimentalShadowDom&&this.registerPortalShadowRoot(y.id);const _=Object.keys(Y).reduce((H,X)=>(H[X]={type:this.getRegisterViewKind(X),view:Y[X].view.map(S=>{var{id:Q,titleComponentId:O,title:M}=S,T=a.__rest(S,["id","titleComponentId","title"]);return Object.assign(Object.assign({},T),{title:(0,p.replaceLocalizePlaceholder)(M,y.id),id:Q,component:this.getModuleExportsComponent(w,y,Q,F),titleComponent:O&&this.getModuleExportsComponent(w,y,O,F)})})},H),{});this.registerBrowserComponent(_,y)}if(R.toolbar&&(!((E=R.toolbar)===null||E===void 0)&&E.actions)){for(const Y of R.toolbar.actions)if(Y.type==="button"&&Y.popoverComponent){const _=w[Y.popoverComponent];if(!_){this.logger.error(`Can not find CustomPopover from extension ${y.id}, id: ${Y.popoverComponent}`);continue}if(this.appConfig.useExperimentalShadowDom){const H=X=>(0,d.getShadowRoot)(_,y,X,Y.popoverComponent,F,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet);this.toolbarPopoverRegistry.registerComponent(`${y.id}:${Y.popoverComponent}`,H)}else this.toolbarPopoverRegistry.registerComponent(`${y.id}:${Y.popoverComponent}`,_)}}const V=Y=>{if(R.scm&&R.scm.additional){const{input:_}=R.scm.additional;if(!_)return;const{addonBefore:H,addonAfter:X}=_,S=(Q,O)=>{Q.forEach(M=>{const T=w[M];if(T||this.logger.error(`Can not find ${O} from extension ${y.id}, id: ${T}`),this.appConfig.useExperimentalShadowDom){const B=x=>(0,d.getShadowRoot)(T,y,x,Q,F,this.appConfig.componentCDNType,this.appConfig.extensionBrowserStyleSheet);Y.input.appendProps({[O]:B})}else Y.input.appendProps({[O]:T})})};H&&S(H,"addonBefore"),X&&S(X,"addonAfter")}};this.addDispose(this.scmService.onDidAddRepository(Y=>{V(Y)})),this.scmService.repositories.forEach(Y=>{V(Y)})}async activateExtensionByDeprecatedExtendConfig(y){const{extendConfig:E}=y;this.logger.verbose(`register view by Deprecated config ${y.id}`);const R=await this.staticResourceService.resolveStaticResource(u.URI.file(new v(y.path).join(E.browser.main).toString()));try{const A=y;if(this.appConfig.useExperimentalShadowDom){this.registerPortalShadowRoot(y.id);const{moduleExports:w,proxiedHead:F}=await this.loadBrowserModuleUseInterceptor(R.toString(),y,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(w,y,F),A)}else{const{moduleExports:w}=await this.loadBrowserModule(R.toString(),y,!0);this.registerBrowserComponent(this.normalizeDeprecatedViewsConfig(w,y),A)}}catch(A){A.errorCode===N?this.logger.error(`[Extension-Host] failed to load ${y.name} - browser module, path:
|
|
28078
28078
|
|
|
@@ -28457,7 +28457,7 @@ body.vscode-high-contrast #scroll-to-top:hover {
|
|
|
28457
28457
|
<a id="scroll-to-top" role="button" aria-label="scroll to top" href="#"><span class="icon"></span></a>
|
|
28458
28458
|
${I}
|
|
28459
28459
|
</body>
|
|
28460
|
-
</html>`}function b(I){const r=new DOMParser().parseFromString(I,"text/html"),l=r.documentElement.querySelectorAll("svg");if(l)for(let s=0;s<l.length;s++){const d=l[s];d.parentNode&&d.parentNode.removeChild(l[s])}return r.documentElement.outerHTML}},21066:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkdownService=void 0,e.IMarkdownService=Symbol("IMarkdownService")},93374:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(21066),e),n.__exportStar(t(31101),e)},99669:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(11666),g=t(24493),u=t(23368);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.MarkersContribution,{token:c.IMarkerService,useClass:u.MarkerService}]}};G=n.__decorate([(0,a.Injectable)()],G),e.MarkersModule=G},60589:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContextKey=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(379);let g=class{initScopedContext(G){this._contextKeyService=this.globalContextkeyService.createScoped(G),this.markersTreeVisibility=c.MarkersTreeVisibilityContextKey.bind(this._contextKeyService),this.markerFocus=c.MarkerFocusContextKey.bind(this._contextKeyService)}get service(){return this._contextKeyService}};n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"globalContextkeyService",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.MarkersContextKey=g},24493:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(63067),g=t(11666),u=t(63670),G=t(23368),p=t(15952),h=n.__importDefault(t(31773)),b=t(73073);function I(l){const d="99+";return l>=100?d:l.toString()}let r=class extends o.Disposable{constructor(){super(...arguments),this.statusBarId="markers-status"}onDidRender(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s&&(this.addDispose(this.markerService.getManager().onMarkerChanged(()=>{const d=this.markerService.getBadge();s.setBadge(d||"")})),this.markerService.viewReady.then(()=>{s.isActivated()&&this.markerModelService.activate()}),this.addDispose(s.onActivate(()=>{this.markerModelService.activate()})),this.addDispose(s.onInActivate(()=>{this.markerModelService.deactivate()}))),this.updateStatusBar(),this.addDispose(this.markerService.getManager().onMarkerChanged(()=>{this.updateStatusBar()}))}updateStatusBar(){const d=this.markerService.getManager().getStats();if(d){const m=[],v=[`$(codicon/error) ${I(d.errors)}`,`$(codicon/warning) ${I(d.warnings)}`];d.errors>0&&m.push(`Errors(${d.errors})`),d.warnings>0&&m.push(`Warnings(${d.warnings})`),d.infos>0&&(m.push(`Infos(${d.infos})`),v.push(`$(codicon/info) ${I(d.infos)}`)),this.statusBar.addElement(this.statusBarId,{name:(0,o.localize)("status-bar.editor-langStatus"),alignment:o.StatusBarAlignment.LEFT,text:v.join(" "),priority:1,tooltip:m.length>0?m.join(", "):(0,o.localize)("markers.status.no.problems"),onClick:()=>{this.toggleMarkerTabbar()}})}else this.statusBar.removeElement(this.statusBarId)}registerComponent(s){s.register("@opensumi/ide-markers",{id:g.MARKER_CONTAINER_ID,component:p.MarkerPanel},{title:h.default.markerTitle(),priority:11,containerId:g.MARKER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+m",titleComponent:u.MarkerFilterPanel})}showMarkerTabbar(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s?.activate()}toggleMarkerTabbar(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s&&(s.isActivated()?s.deactivate():s.activate())}registerCommands(s){s.registerCommand({id:o.MARKER_COMMANDS.SHOW_ERRORS_WARNINGS.id},{execute:()=>{this.showMarkerTabbar()}}),s.registerCommand({id:o.MARKER_COMMANDS.TOGGLE_SHOW_ERRORS_WARNINGS.id},{execute:()=>{this.toggleMarkerTabbar()}})}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",o.Logger)],r.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],r.prototype,"mainlayoutService",void 0),n.__decorate([(0,a.Autowired)(g.IMarkerService),n.__metadata("design:type",G.MarkerService)],r.prototype,"markerService",void 0),n.__decorate([(0,a.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],r.prototype,"statusBar",void 0),n.__decorate([(0,a.Autowired)(b.MarkerModelService),n.__metadata("design:type",b.MarkerModelService)],r.prototype,"markerModelService",void 0),r=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,c.MainLayoutContribution)],r),e.MarkersContribution=r},14298:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Filter=e.FilterOptions=void 0;const n=t(85608),a=t(41869),o=t(11666),c=n.__importDefault(t(31773));class g{constructor(p="",h=[]){this.filter=p,this.filterErrors=!1,this.filterWarnings=!1,this.filterInfos=!1,this.textFilter="",p=p.trim();const b=Array.isArray(h)?h:[],I=Array.isArray(h)?(0,a.getEmptyExpression)():h,r=(0,a.getEmptyExpression)();if(p){const l=(0,a.splitGlobAware)(p,",").map(s=>s.trim()).filter(s=>!!s.length);for(const s of l)this.filterErrors=this.filterErrors||this.matches(s,c.default.markerPanelFilterErrors()),this.filterWarnings=this.filterWarnings||this.matches(s,c.default.markerPanelFilterWarnings()),this.filterInfos=this.filterInfos||this.matches(s,c.default.markerPanelFilterInfos()),a.strings.startsWith(s,"!")?this.setPattern(I,a.strings.ltrim(s,"!")):(this.setPattern(r,s),this.textFilter+=` ${s}`)}this.excludesMatcher=new o.ResourceGlobMatcher(I,b),this.includesMatcher=new o.ResourceGlobMatcher(r,[]),this.textFilter=this.textFilter.trim()}setPattern(p,h){h[0]==="."&&(h="*"+h),p[`**/${h}/**`]=!0,p[`**/${h}`]=!0}matches(p,h){const b=(0,a.matchesPrefix)(p,h);return!!(b&&b.length>0)}}e.FilterOptions=g,g._filter=a.matchesFuzzy2,g._messageFilter=a.matchesFuzzy;class u{constructor(p){this.options=p}filterModel(p){const h=this.options.includesMatcher.matches(new a.URI(p.resource)),b=p.filename?g._filter(this.options.textFilter,p.filename):void 0,I=h||b&&b.length>0;if(I)return o.MarkerModelBuilder.buildFilterModel(p,this.filterMarkerItems(p.markers,!1),I,!0,{filenameMatches:b});{const r=this.filterMarkerItems(p.markers,!0);return o.MarkerModelBuilder.buildFilterModel(p,r,!1,r.length>0)}}filterMarkerItems(p,h){if(!p||p.length<=0)return[];const b=p.map(I=>this.filterMarkerItem(I));return h?b.filter(I=>I.match===!0):b}filterMarkerItem(p){if(this.options.filterErrors&&a.MarkerSeverity.Error===p.severity||this.options.filterWarnings&&a.MarkerSeverity.Warning===p.severity||this.options.filterInfos&&a.MarkerSeverity.Info===p.severity||!this.options.textFilter)return o.MarkerItemBuilder.buildFilterItem(p,!0);const h=p.message?g._filter(this.options.textFilter,p.message):void 0,b=p.source?g._filter(this.options.textFilter,p.source):void 0,I=p.code?g._filter(this.options.textFilter,p.code):void 0;return h||b||I?o.MarkerItemBuilder.buildFilterItem(p,!0,{messageMatches:h,sourceMatches:b,codeMatches:I}):o.MarkerItemBuilder.buildFilterItem(p,!1)}}e.Filter=u},63670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerFilterPanel=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(25150),c=n.__importDefault(t(14041)),g=t(41869),u=t(5567),G=t(11666),p=t(14298),h=n.__importDefault(t(30790)),b=n.__importDefault(t(31773));e.MarkerFilterPanel=(0,o.observer)(()=>{const I=(0,g.useInjectable)(G.IMarkerService),r=(0,g.useDesignStyles)(h.default.markerFilterContent,"markerFilterContent"),l=(0,g.useDesignStyles)(h.default.filterInput,"filterInput"),[s,d]=c.default.useState("");(0,g.useDisposable)(()=>[I.onMarkerFilterChanged(v=>{v===void 0&&d("")})]);const m=(0,a.default)(v=>{d(v),I.fireFilterChanged(v?new p.FilterOptions(v):void 0)},250);return c.default.createElement("div",{className:r},c.default.createElement(u.AutoFocusedInput,{containerId:G.MARKER_CONTAINER_ID,hasClear:!0,className:l,placeholder:b.default.markerPanelFilterInputPlaceholder(),value:s,onValueChange:m}))})},75068:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIconStyle=e.HIGH_CONTRAST_DARK=e.HIGH_CONTRAST_LIGHT=e.LIGHT=e.DARK=void 0;const n=t(41869),a=t(52416),o=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.58318 2.02842C9.96435 2.16331 11.2561 2.77279 12.2383 3.75307C13.3643 4.87923 13.9978 6.40584 14 7.99829C14.0004 9.38617 13.5196 10.7313 12.6396 11.8045C11.7595 12.8778 10.5345 13.6127 9.17333 13.8841C7.81215 14.1556 6.39895 13.9467 5.1745 13.2931C3.95005 12.6394 2.99008 11.5815 2.45814 10.2995C1.92619 9.0175 1.85517 7.59072 2.25717 6.26222C2.65917 4.93373 3.50933 3.7857 4.66282 3.0137C5.8163 2.24171 7.20177 1.89351 8.58318 2.02842ZM8.68038 1.03316C10.292 1.19055 11.7993 1.90184 12.9453 3.04585C14.2587 4.35938 14.9976 6.14013 15 7.99764C15.0005 9.61695 14.4396 11.1864 13.4129 12.4385C12.3861 13.6907 10.9569 14.5482 9.36889 14.8648C7.78084 15.1815 6.13211 14.9378 4.70359 14.1752C3.27506 13.4127 2.1551 12.1784 1.53449 10.6828C0.913887 9.18708 0.831027 7.52251 1.30003 5.97259C1.76903 4.42268 2.76089 3.08331 4.10662 2.18265C5.45236 1.28199 7.06873 0.875761 8.68038 1.03316ZM5.52498 5L8.00004 7.47506L10.4751 5L11.1822 5.70711L8.70714 8.18217L11.1818 10.6569L10.4747 11.364L8.00004 8.88927L5.52535 11.364L4.81824 10.6569L7.29293 8.18217L4.81787 5.70711L5.52498 5Z" fill="'),c=encodeURIComponent('"/></svg>'),g=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.58318 2.02842C9.96435 2.16331 11.2561 2.77279 12.2383 3.75307C13.3643 4.87923 13.9978 6.40584 14 7.99829C14.0004 9.38617 13.5196 10.7313 12.6396 11.8045C11.7595 12.8778 10.5345 13.6127 9.17333 13.8841C7.81215 14.1556 6.39895 13.9467 5.1745 13.2931C3.95005 12.6394 2.99008 11.5815 2.45814 10.2995C1.92619 9.0175 1.85517 7.59072 2.25717 6.26222C2.65917 4.93373 3.50933 3.7857 4.66282 3.0137C5.8163 2.24171 7.20177 1.89351 8.58318 2.02842ZM8.68038 1.03316C10.292 1.19055 11.7993 1.90184 12.9453 3.04585C14.2587 4.35938 14.9976 6.14013 15 7.99764C15.0005 9.61695 14.4396 11.1864 13.4129 12.4385C12.3861 13.6907 10.9569 14.5482 9.36889 14.8648C7.78084 15.1815 6.13211 14.9378 4.70359 14.1752C3.27506 13.4127 2.1551 12.1784 1.53449 10.6828C0.913887 9.18708 0.831027 7.52251 1.30003 5.97259C1.76903 4.42268 2.76089 3.08331 4.10662 2.18265C5.45236 1.28199 7.06873 0.875761 8.68038 1.03316ZM5.52498 5L8.00004 7.47506L10.4751 5L11.1822 5.70711L8.70714 8.18217L11.1818 10.6569L10.4747 11.364L8.00004 8.88927L5.52535 11.364L4.81824 10.6569L7.29293 8.18217L4.81787 5.70711L5.52498 5Z" fill="'),u=encodeURIComponent('"/></svg>'),G=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.12 13.9725L15 12.5L9.37927 2H7.61924L1.9985 12.5L2.87852 13.9725H14.12ZM2.87852 12.9725L8.49925 2.47249L14.12 12.9725H2.87852ZM7.98952 6H8.98802V10H7.98952V6ZM7.98952 11H8.98802V12H7.98952V11Z" fill="'),p=encodeURIComponent('"/></svg>'),h=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.12 13.9725L15 12.5L9.37927 2H7.61924L1.9985 12.5L2.87852 13.9725H14.12ZM2.87852 12.9725L8.49925 2.47249L14.12 12.9725H2.87852ZM7.98952 6H8.98802V10H7.98952V6ZM7.98952 11H8.98802V12H7.98952V11Z" fill="'),b=encodeURIComponent('"/></svg>'),I=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.5C3 4.46243 5.46243 2 8.5 2C11.5376 2 14 4.46243 14 7.5C14 10.5376 11.5376 13 8.5 13C5.46243 13 3 10.5376 3 7.5ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5ZM8 4V5H9V4H8ZM8 6L8 10H9L9 6H8Z" fill="'),r=encodeURIComponent('"/></svg>'),l=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.5C3 4.46243 5.46243 2 8.5 2C11.5376 2 14 4.46243 14 7.5C14 10.5376 11.5376 13 8.5 13C5.46243 13 3 10.5376 3 7.5ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5ZM8 4V5H9V4H8ZM8 6L8 10H9L9 6H8Z" fill="'),s=encodeURIComponent('"/></svg>');function d(f,N){switch(f){case n.MarkerSeverity.Hint:{const W=N===a.LIGHT?a.Color.fromHex("#75BEFF"):a.Color.fromHex("#007ACC");return N===a.LIGHT?I+encodeURIComponent(W.toString())+r:l+encodeURIComponent(W.toString())+s}case n.MarkerSeverity.Info:{const W=N===a.LIGHT?a.Color.fromHex("#007ACC"):a.Color.fromHex("#75BEFF");return N===a.LIGHT?I+encodeURIComponent(W.toString())+r:l+encodeURIComponent(W.toString())+s}case n.MarkerSeverity.Warning:{const W=N===a.LIGHT?a.Color.fromHex("#DDB100"):a.Color.fromHex("#fc0");return N===a.LIGHT?G+encodeURIComponent(W.toString())+p:h+encodeURIComponent(W.toString())+b}case n.MarkerSeverity.Error:{const W=N===a.LIGHT?a.Color.fromHex("#A1260D"):a.Color.fromHex("#F48771");return N===a.LIGHT?o+encodeURIComponent(W.toString())+c:g+encodeURIComponent(W.toString())+u}}return""}function m(f,N){return{background:`url("data:image/svg+xml,${d(f,N)}") center center no-repeat`,height:"16px",width:"16px",minWidth:"16px",marginRight:"5px"}}var v=t(52416);Object.defineProperty(e,"DARK",{enumerable:!0,get:function(){return v.DARK}}),Object.defineProperty(e,"LIGHT",{enumerable:!0,get:function(){return v.LIGHT}}),Object.defineProperty(e,"HIGH_CONTRAST_LIGHT",{enumerable:!0,get:function(){return v.HIGH_CONTRAST_LIGHT}}),Object.defineProperty(e,"HIGH_CONTRAST_DARK",{enumerable:!0,get:function(){return v.HIGH_CONTRAST_DARK}}),e.SeverityIconStyle={[a.LIGHT]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.LIGHT),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.LIGHT),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.LIGHT),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.LIGHT)},[a.DARK]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.DARK),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.DARK),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.DARK),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.DARK)},[a.HIGH_CONTRAST_DARK]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.HIGH_CONTRAST_DARK)},[a.HIGH_CONTRAST_LIGHT]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.HIGH_CONTRAST_LIGHT)}}},23368:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(26542),g=t(43718),u=t(57517),G=t(9132),p=t(60589),h=t(75465),b=t(93094),I=1e3;let r=class extends G.Themable{get viewReady(){return this.viewReadyDeferred.promise}constructor(){super(),this.viewSize={h:0},this.viewReadyDeferred=new g.Deferred,this.onMarkerFilterChangedEmitter=new g.Emitter,this.onMarkerFilterChanged=this.onMarkerFilterChangedEmitter.event,this.onResourceOpenEmitter=new g.Emitter,this.onResouceOpen=this.onResourceOpenEmitter.event,this.onResourceCloseEmitter=new g.Emitter,this.onResourceClose=this.onResourceCloseEmitter.event,(0,a.makeObservable)(this),this.markerViewModel=new h.MarkerViewModel(this,this.labelService)}get contextKey(){return this.markersContextKey}initContextKey(s){this.markersContextKey.initScopedContext(s),this.viewReadyDeferred.resolve()}onEditorGroupOpen(s){const m=s.payload.resource.uri.toString();this.markerManager.onEditorGroupOpen(m),this.onResourceOpenEmitter.fire(m)}onEditorGroupClose(s){const m=s.payload.resource.uri.toString();this.markerManager.onEditorGroupClose(m),this.onResourceCloseEmitter.fire(m)}resolveChildren(s){return s?b.MarkerRoot.is(s)?Array.from(this.markerViewModel.markers.values()).map(d=>new b.MarkerGroupNode(this,d,s)):b.MarkerGroupNode.is(s)?s.model.markers.map(d=>new b.MarkerNode(this,d,s)):[]:[new b.MarkerRoot(this)]}fireFilterChanged(s){this.onMarkerFilterChangedEmitter.fire(s)}getViewModel(){return this.markerViewModel}getThemeType(){return this.themeService.getCurrentThemeSync().type}getManager(){return this.markerManager}getBadge(){const s=this.markerManager.getStats();if(s){const d=s.errors+s.infos+s.warnings;if(d>I)return"1K+";if(d===I)return"1K";if(d>0)return String(d)}}};n.__decorate([(0,o.Autowired)(c.LabelService),n.__metadata("design:type",c.LabelService)],r.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(g.MarkerManager),n.__metadata("design:type",Object)],r.prototype,"markerManager",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],r.prototype,"viewSize",void 0),n.__decorate([(0,o.Autowired)(p.MarkersContextKey),n.__metadata("design:type",p.MarkersContextKey)],r.prototype,"markersContextKey",void 0),n.__decorate([(0,g.OnEvent)(u.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorGroupOpenEvent]),n.__metadata("design:returntype",void 0)],r.prototype,"onEditorGroupOpen",null),n.__decorate([(0,g.OnEvent)(u.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],r.prototype,"onEditorGroupClose",null),r=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],r),e.MarkerService=r},15952:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerPanel=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(11666),u=n.__importDefault(t(13345)),G=n.__importDefault(t(31773)),p=t(7683),h=t(73073),b=({viewState:l})=>{const[s,d]=(0,a.useState)(),m=(0,c.useInjectable)(h.MarkerModelService);(0,a.useEffect)(()=>{const N=new c.Disposable;return N.addDispose(m.onDidUpdateTreeModel(W=>{d(W)})),m.initTreeModel(),()=>{N.dispose()}},[]);const v=(0,a.useCallback)(N=>{m.handleTreeHandler(N)},[m]),f=(0,a.useCallback)(N=>{const W=(0,a.useCallback)(()=>{m.handleItemClick(N.item)},[m]);return a.default.createElement(p.MarkerNodeRendered,{item:N.item,itemType:N.itemType,decorations:m.decorations.getDecorations(N.item),defaultLeftPadding:8,onClick:W,leftPadding:8})},[s]);return s?a.default.createElement(o.RecycleTree,{height:l.height,itemHeight:p.MARKER_TREE_NODE_HEIGHT,supportDynamicHeights:!0,onReady:v,model:s,placeholder:()=>a.default.createElement(I,null)},f):a.default.createElement("div",{className:u.default.empty},G.default.markerPanelContentEmpty())},I=()=>{const l=(0,c.useInjectable)(g.IMarkerService);return l.getViewModel().hasFilter()?a.default.createElement("div",{className:u.default.empty},G.default.markerPanelFilterContentEmpty(),a.default.createElement("div",{className:u.default.reset,onClick:()=>{l.fireFilterChanged(void 0)}},G.default.markerPanelFilterReset())):a.default.createElement("div",{className:u.default.empty},G.default.markerPanelContentEmpty())},r=({viewState:l})=>{const s=(0,c.useInjectable)(h.MarkerModelService),d=(0,c.useInjectable)(g.IMarkerService),m=(0,a.useRef)(null),v=(0,a.useCallback)(()=>{const{enactiveNodeDecoration:f}=s;f()},[s]);return(0,a.useEffect)(()=>{var f;const N=()=>{s.handleTreeBlur()};return m.current&&d.initContextKey(m.current),(f=m.current)===null||f===void 0||f.addEventListener("blur",N,!0),()=>{var W;(W=m.current)===null||W===void 0||W.removeEventListener("blur",N,!0),s.handleTreeBlur()}},[]),a.default.createElement("div",{className:u.default.markersContent,tabIndex:-1,ref:m,onClick:v},a.default.createElement(b,{viewState:l}))};e.MarkerPanel=r},75465:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerViewModel=void 0;const n=t(85608),a=t(83794),o=t(43718),c=t(11666),g=t(14298),{isFalsyOrEmpty:u,mergeSort:G}=o.arrays;function p(b,I){return o.MarkerSeverity.compare(b.severity,I.severity)||(0,o.compareRangesUsingStarts)(b,I)}class h extends o.Disposable{constructor(I,r){super(),this._service=I,this.labelService=r,this.markers=new Map,(0,a.makeObservable)(this),this.addDispose([this._service.getManager().onMarkerChanged(this._onMarkerChanged,this),this._service.onMarkerFilterChanged(this._onMarkerFilterChanged,this)])}_onMarkerChanged(I){I&&I.forEach(r=>{this.updateMarker(r,this._service.getManager().getMarkers({resource:r,severities:o.MarkerSeverity.Error|o.MarkerSeverity.Warning|o.MarkerSeverity.Info}))})}_onMarkerFilterChanged(I){this.filter=I?new g.Filter(I):void 0;const r=this._service.getManager().getResources();r&&this._onMarkerChanged(r)}updateMarker(I,r){if(u(r))this.markers.delete(I.toString());else{const l=G(r,p),{icon:s,filename:d,longname:m}=this.getUriInfos(I),v=c.MarkerModelBuilder.buildModel(I,s,d,m,l);if(this.filter){const f=this.filter.filterModel(v);f.match?this.markers.set(I,f):this.markers.delete(I)}else this.markers.set(I,v)}}getUriInfos(I){const r=new o.URI(I);return{icon:this.labelService.getIcon(r),filename:this.labelService.getName(r),longname:this.labelService.getLongName(r)}}hasData(){return this.markers.size>0}hasFilter(){return this.filter!==void 0}}n.__decorate([a.observable,n.__metadata("design:type",Map)],h.prototype,"markers",void 0),e.MarkerViewModel=h},31773:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(41869);class a{}e.default=a,a.markerTitle=()=>(0,n.localize)("markers.title"),a.markerPanelContentEmpty=()=>(0,n.localize)("markers.panel.content.empty"),a.markerPanelFilterInputPlaceholder=()=>(0,n.localize)("markers.filter.placeholder"),a.markerPanelFilterErrors=()=>(0,n.localize)("markers.panel.filter.errors","errors"),a.markerPanelFilterWarnings=()=>(0,n.localize)("markers.panel.filter.warnings","warnings"),a.markerPanelFilterInfos=()=>(0,n.localize)("markers.panel.filter.infos","infos"),a.markerPanelFilterContentEmpty=()=>(0,n.localize)("markers.filter.content.empty"),a.markerPanelFilterReset=()=>(0,n.localize)("markers.filter.reset")},7683:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MARKER_TREE_NODE_HEIGHT=e.MarkerNodeRendered=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(93094),G=n.__importDefault(t(45098)),p=(0,o.memo)(({model:d})=>o.default.createElement("div",{className:G.default.title_description},d.longname)),h=(0,o.memo)(({data:d,matches:m,className:v})=>{const f=[];let N=0;return m.forEach(W=>{N<W.start&&f.push(o.default.createElement("span",{key:`highlight-data-${N}-${W.start}`},d.substring(N,W.start))),f.push(o.default.createElement("span",{key:`highlight-data-${W.start}-${W.end}`,className:G.default.highlight},d.substring(W.start,W.end))),N=W.end}),N<d.length&&f.push(o.default.createElement("span",{key:`highlight-data-${N}-${d.length-1}`},d.substring(N))),o.default.createElement("div",{className:v},f)}),b=(0,o.memo)(({marker:d})=>{const m=d.matches&&d.matches.messageMatches;return m?o.default.createElement(h,{data:d.message,matches:m,className:G.default.detail_name}):o.default.createElement("div",{className:G.default.detail_name},d.message)}),I=(0,o.memo)(({data:d,href:m,matches:v,type:f})=>{const N=(0,g.useInjectable)(g.IOpenerService),W=v?o.default.createElement(h,{data:d,matches:v,className:f}):o.default.createElement(o.default.Fragment,null,d);return typeof m<"u"?o.default.createElement("a",{className:G.default.codeHref,rel:"noopener",target:"_blank",onClick:(0,g.withPrevented)(()=>{N.open(new g.URI(m))}),title:d},W):W}),r=(0,o.memo)(({marker:d})=>{const m=d.matches&&d.matches.sourceMatches,v=d.matches&&d.matches.codeMatches;return o.default.createElement("div",{className:G.default.detail_description},o.default.createElement("div",{className:G.default.typeContainer},m?d.source&&o.default.createElement(h,{data:d.source,matches:m,className:G.default.type}):d.source,d.code&&"(",d.code&&o.default.createElement(I,{data:d.code,href:d.codeHref,matches:v,type:G.default.type}),d.code&&")"),o.default.createElement("div",{className:G.default.position},`[Ln ${d.startLineNumber}, Col ${d.startColumn}]`))}),l=(0,o.memo)(({model:d})=>{const m=d.matches&&d.matches.filenameMatches;return m?o.default.createElement(h,{data:d.filename,matches:m,className:G.default.title}):o.default.createElement("div",{className:G.default.title},d.filename)}),s=({item:d,defaultLeftPadding:m=8,leftPadding:v=8,itemType:f,decorations:N,onClick:W})=>{const Z=(0,g.useDesignStyles)(G.default.expansion_toggle,"expansion_toggle"),y=(0,o.useCallback)(S=>{S.stopPropagation(),(f===c.TreeNodeType.TreeNode||f===c.TreeNodeType.CompositeTreeNode)&&W(S,d,f)},[W]),E=`${m+(d.depth||0)*(v||0)+(u.MarkerGroupNode.is(d)?0:16)}px`,R={lineHeight:`${e.MARKER_TREE_NODE_HEIGHT}px`,paddingLeft:E},A=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.icon,u.MarkerGroupNode.is(S)&&S.icon),style:Object.assign({height:e.MARKER_TREE_NODE_HEIGHT,lineHeight:`${e.MARKER_TREE_NODE_HEIGHT}px`},!u.MarkerGroupNode.is(S)&&S.iconStyle)}),[]),w=(0,o.useCallback)(S=>u.MarkerGroupNode.is(S)?o.default.createElement(l,{model:S.model}):o.default.createElement(b,{marker:S.marker}),[]),F=(0,o.useCallback)(S=>u.MarkerGroupNode.is(S)?o.default.createElement(p,{model:S.model}):o.default.createElement(r,{marker:S.marker}),[]),V=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.segment,G.default.tail)},Y(S)),[]),Y=(0,o.useCallback)(S=>{if(u.MarkerGroupNode.is(S))return o.default.createElement(c.Badge,{className:G.default.status},S.badge)},[]),_=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.segment,Z,(0,g.getIcon)("arrow-right"),{[`${G.default.mod_collapsed}`]:!S.expanded})}),[]),H=(0,o.useCallback)(S=>{if(u.MarkerGroupNode.is(S))return _(S)},[]),X=(0,o.useCallback)(()=>d.tooltip,[d]);return o.default.createElement("div",{key:d.id,onClick:y,title:X(),className:(0,a.default)(G.default.marker_node,N?N.classlist:null),style:R,"data-id":d.id},o.default.createElement("div",{className:G.default.content},H(d),A(d),o.default.createElement("div",{className:G.default.overflow_wrap},w(d),F(d)),V(d)))};e.MarkerNodeRendered=s,e.MARKER_TREE_NODE_HEIGHT=22},73073:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerModelService=e.MarkerTreeModel=void 0;const n=t(85608),a=t(76003),o=t(97267),c=t(41869),g=t(54414),u=t(6287),G=t(93094),p=n.__importDefault(t(45098));let h=class extends o.TreeModel{constructor(r){super(),this.init(r)}};h=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[G.MarkerRoot])],h),e.MarkerTreeModel=h;let b=class{constructor(){this.selectedDecoration=new o.Decoration(p.default.mod_selected),this.focusedDecoration=new o.Decoration(p.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new c.Emitter,this.disposableCollection=new c.DisposableCollection,this._whenReady=new c.Deferred,this.activeNodeDecoration=(r,l=!0)=>{var s;if(this.preContextMenuFocusedNode&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode),this.preContextMenuFocusedNode=null),r){for(const d of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(d);for(const d of this.focusedDecoration.appliedTargets.keys())this.focusedDecoration.removeTarget(d);this.selectedDecoration.addTarget(r),this.focusedDecoration.addTarget(r),this._focusedNode=r,this._selectedNodes=[r],l&&((s=this.treeModel)===null||s===void 0||s.dispatchChange())}},this.enactiveNodeDecoration=()=>{var r;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(r=this.treeModel)===null||r===void 0||r.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=r=>{this.activeNodeDecoration(r),G.MarkerGroupNode.is(r)?this.toggleDirectory(r):r.marker&&this.workbenchEditorService.open(new c.URI(r.marker.resource),{disableNavigate:!0,range:{startLineNumber:r.marker.startLineNumber,startColumn:r.marker.startColumn,endLineNumber:r.marker.endLineNumber,endColumn:r.marker.endColumn}})},this.toggleDirectory=async r=>{r.expanded?this.markerTreeHandle.collapseNode(r):this.markerTreeHandle.expandNode(r)},this.isDirtyTree=!1}get whenReady(){return this._whenReady.promise}get flushEventQueuePromise(){return this.refreshDeferred&&this.refreshDeferred.promise}get markerTreeHandle(){return this._markerTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const r=await this.markerService.resolveChildren();if(!r)return;const l=r[0];l&&(this._treeModel=this.injector.get(h,[l]),await this._treeModel.ensureReady,this.initDecorations(l),this.disposableCollection.push(this.markerService.getManager().onMarkerChanged(()=>{this.refresh()})),this.disposableCollection.push(this.markerService.onMarkerFilterChanged(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel),this._whenReady.resolve())}initDecorations(r){return this._decorations=new o.DecorationsManager(r),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(r){this._markerTreeHandle=r}async refresh(){await this.whenReady,await this.markerService.viewReady,(0,c.runWhenIdle)(()=>{this.markerService.contextKey&&this.markerService.contextKey.markersTreeVisibility.get()?this.treeModel.root.refresh():this.isDirtyTree=!0})}activate(){this.markerService.contextKey.markersTreeVisibility&&(this.markerService.contextKey.markersTreeVisibility.set(!0),this.isDirtyTree&&(this.refresh(),this.isDirtyTree=!1))}deactivate(){this.markerService.contextKey.markersTreeVisibility&&this.markerService.contextKey.markersTreeVisibility.set(!1)}dispose(){this.disposableCollection.dispose()}};n.__decorate([(0,a.Autowired)(u.IMarkerService),n.__metadata("design:type",Function)],b.prototype,"markerService",void 0),n.__decorate([(0,a.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],b.prototype,"injector",void 0),b=n.__decorate([(0,a.Injectable)()],b),e.MarkerModelService=b},93094:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNode=e.MarkerGroupNode=e.MarkerRoot=void 0;const n=t(97267),a=t(75068);class o extends n.CompositeTreeNode{static is(G){return!!G&&!G.parent}constructor(G){super(G,void 0)}get expanded(){return!0}}e.MarkerRoot=o;class c extends n.CompositeTreeNode{constructor(G,p,h){super(G,h),this.model=p,this.isExpanded=!0}get tooltip(){return this.model.resource}get badge(){return this.model.size()}get icon(){return this.model.icon}dispose(){super.dispose()}}e.MarkerGroupNode=c;class g extends n.TreeNode{constructor(G,p,h){super(G,h,void 0),this.marker=p}get iconStyle(){return a.SeverityIconStyle[this._tree.getThemeType()][this.marker.severity]}get tooltip(){return this.marker.message}}e.MarkerNode=g},11666:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(6287),e),n.__exportStar(t(96835),e)},96835:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasToIgnoreCase=e.isEqualAuthority=e.relativePath=e.ResourceGlobMatcher=void 0;const n=t(43718);class a{constructor(G,p){this.expressionsByRoot=n.TernarySearchTree.forPaths(),this.globalExpression=(0,n.parseGlob)(G);for(const h of p)this.expressionsByRoot.set(h.root.toString(),{root:h.root,expression:(0,n.parseGlob)(h.expression)})}matches(G){const p=this.expressionsByRoot.findSubstr(G.toString());if(p){const h=o(p.root,G);if(h&&p.expression(h))return!0}return!!this.globalExpression(G.codeUri.path)}}e.ResourceGlobMatcher=a;function o(u,G,p=g(u)){if(u.scheme!==G.scheme||!c(u.authority,G.authority))return;if(u.scheme===n.Schemes.file){const I=n.path.relative(u.codeUri.path,G.codeUri.path);return n.isWindows?n.path.toSlashes(I):I}let h=u.codeUri.path||"/";const b=G.codeUri.path||"/";if(p){let I=0;for(const r=Math.min(h.length,b.length);I<r&&!(h.charCodeAt(I)!==b.charCodeAt(I)&&h.charAt(I).toLowerCase()!==b.charAt(I).toLowerCase());I++);h=b.substr(0,I)+h.substr(I)}return n.path.relative(h,b)}e.relativePath=o;function c(u,G){return u===G||n.strings.equalsIgnoreCase(u,G)}e.isEqualAuthority=c;function g(u){return u&&u.scheme===n.Schemes.file?!n.isLinux:!0}e.hasToIgnoreCase=g},6287:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerModelBuilder=e.MarkerItemBuilder=e.IMarkerService=e.MARKER_CONTAINER_ID=void 0;var n=t(30144);Object.defineProperty(e,"MARKER_CONTAINER_ID",{enumerable:!0,get:function(){return n.MARKER_CONTAINER_ID}}),e.IMarkerService=Symbol("IMarkerService");class a{static buildFilterItem(g,u,G){return Object.assign(Object.assign({},g),{match:u,matches:G})}}e.MarkerItemBuilder=a;class o{static buildModel(g,u,G,p,h){return{match:!0,resource:g,icon:u,filename:G,longname:p,markers:h,size:()=>h.length}}static buildFilterModel(g,u,G,p,h){const b=G||p;return Object.assign(Object.assign({},g),{match:b,markers:u,matches:h,size:()=>{if(b)return u.length;let I=0;return u.forEach(r=>{r.match&&I++}),I}})}}e.MarkerModelBuilder=o},64523:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(19727),g=t(70842),u=t(64267);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.MenuBarContribution,{token:u.AbstractMenubarStore,useClass:u.MenubarStore}],this.webProviders=[c.MenuBarWebContribution]}};G=n.__decorate([(0,a.Injectable)()],G),e.MenuBarModule=G},19727:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarWebContribution=void 0;const n=t(85608),a=t(41869),o=t(68456),c=t(98295),g=t(55496);let u=class extends a.Disposable{registerComponent(p){p.register("@opensumi/ide-toolbar-action",{id:"ide-toolbar-action",component:g.ToolbarAction})}registerToolbarActions(p){p.addLocation("menu-right"),p.addLocation("menu-left")}};u=n.__decorate([(0,c.Domain)(o.ComponentContribution,a.ToolBarActionContribution)],u),e.MenuBarWebContribution=u},70842:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68456),g=t(98295),u=t(64267),G=t(47905);let p=class extends o.Disposable{constructor(){super(),this.addDispose(this.menubarStore.onDidMenuBarChange(b=>{this.menubarStore.registerMenusBarByCompact(b)})),this.addDispose(this.preferenceService.onSpecificPreferenceChange("menubar.compactMode",({newValue:b})=>{b?this.menubarStore.registerMenuItemByCompactMenu():this.menubarStore.unregisterMenusBarByCompact()}))}registerComponent(b){b.register("@opensumi/ide-menu-bar",{id:"ide-menu-bar",component:G.MenuBarMixToolbarAction},{size:27})}};n.__decorate([(0,a.Autowired)(u.MenubarStore),n.__metadata("design:type",u.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),p=n.__decorate([(0,g.Domain)(c.ComponentContribution),n.__metadata("design:paramtypes",[])],p),e.MenuBarContribution=p},64267:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenubarStore=e.AbstractMenubarStore=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(83794),c=t(76003),g=t(41869),u=t(93899);class G extends g.Disposable{}e.AbstractMenubarStore=G;let p=class extends g.Disposable{get onDidMenuBarChange(){return this._onDidMenuBarChange.event}constructor(){super(),this.menubarItems=o.observable.array([]),this.menuItems=o.observable.map(),this._onDidMenuBarChange=new g.Emitter,this.handleMenubarClick=(0,a.default)(b=>{this.updateMenuNodes(b)},500,{leading:!0,trailing:!0}),(0,o.makeObservable)(this),this.build(),this.registerDispose(this.menubarService.onDidMenubarChange(this.handleMenubarChanged,this,this.disposables)),this.registerDispose(this.menubarService.onDidMenuChange(this.handleMenuChanged,this,this.disposables))}getMenubarSubItems(b){return this.menubarService.rebuildMenuNodes(b),this.menubarService.getMenuNodes(b)||[]}updateMenuNodes(b){const I=this.getMenubarSubItems(b);this.menuItems.set(b,I)}build(){const b=this.menubarService.getMenubarItems();this.menubarItems.splice(0,this.menubarItems.length,...b),b.forEach(({id:I})=>{this.updateMenuNodes(I)}),this._onDidMenuBarChange.fire(this.menubarItems)}handleMenuChanged(b){this.updateMenuNodes(b)}handleMenubarChanged(){const b=this.menubarService.getMenubarItems();this.menubarItems.replace(b),this._onDidMenuBarChange.fire(this.menubarItems)}unregisterMenusBarByCompact(b=u.MenuId.ActivityBarTopExtra){this.menuRegistry.unregisterMenuItem(b,u.MenuId.MenubarCompactMenu)}registerMenuItemByCompactMenu(b=u.MenuId.ActivityBarTopExtra){this.menuRegistry.registerMenuItem(b,{submenu:u.MenuId.MenubarCompactMenu,iconClass:(0,g.getExternalIcon)("menu"),order:1,group:"navigation"})}registerMenusBarByCompact(b=this.menubarItems){this.menuRegistry.registerMenuItems(u.MenuId.MenubarCompactMenu,b.map(I=>({label:I.label,submenu:I.id})))}};n.__decorate([(0,c.Autowired)(u.AbstractMenubarService),n.__metadata("design:type",u.AbstractMenubarService)],p.prototype,"menubarService",void 0),n.__decorate([(0,c.Autowired)(u.IMenuRegistry),n.__metadata("design:type",u.IMenuRegistry)],p.prototype,"menuRegistry",void 0),n.__decorate([o.observable,n.__metadata("design:type",Object)],p.prototype,"menubarItems",void 0),n.__decorate([o.observable,n.__metadata("design:type",Object)],p.prototype,"menuItems",void 0),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],p.prototype,"updateMenuNodes",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"build",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleMenubarChanged",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function)],p.prototype,"handleMenubarClick",void 0),p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.MenubarStore=p},47905:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconMenuBar=e.MenuBarActionWrapper=e.MenuBarMixToolbarAction=e.MenuBar=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(99613),G=t(40604),p=t(41869),h=t(25918),b=t(1149),I=t(93899),r=t(42912),l=n.__importDefault(t(83747)),s=t(64267),d=(0,o.observer)(({id:f,label:N,focusMode:W,afterMenubarClick:Z,afterMenuClick:y})=>{const E=(0,p.useInjectable)(s.MenubarStore),R=(0,p.useInjectable)(r.IIconService),[A,w]=c.default.useState(!1),F=c.default.useCallback(()=>{E.handleMenubarClick(f),w(W?!0:X=>!X),Z()},[f]),V=()=>{w(!1),y()},Y=c.default.useCallback(()=>{W&&E.handleMenubarClick(f)},[f,W]),_=X=>{w(X)},H=E.menuItems.get(f)||[];return c.default.createElement(u.Dropdown,{className:"kt-menu",transitionName:"",align:{offset:[0,0]},visible:A,onVisibleChange:_,overlay:c.default.createElement(h.MenuActionList,{data:H,afterClick:V,iconService:R}),trigger:W?["click","hover"]:["click"]},c.default.createElement("div",{className:(0,a.default)(l.default.menubar,{[l.default["menu-open"]]:A}),onMouseOver:Y,onClick:F},N))});e.MenuBar=(0,o.observer)(()=>{var f;const N=(0,p.useInjectable)(s.MenubarStore),W=(0,p.useInjectable)(p.ComponentRegistry),Z=(0,p.useInjectable)(b.LayoutViewSizeConfig),[y,E]=c.default.useState(!1),R=c.default.useRef(),A=c.default.useCallback(Y=>{!R.current&&Y.relatedTarget&&(R.current=Y.relatedTarget)},[]),w=c.default.useCallback(()=>{R.current&&(R.current.focus(),R.current=void 0),E(!1)},[y]),F=c.default.useCallback(()=>{E(!1)},[y]),V=(f=W.getComponentRegistryInfo("@opensumi/ide-menu-bar-logo"))===null||f===void 0?void 0:f.views[0].component;return c.default.createElement(g.ClickOutside,{className:l.default.menubars,style:{height:Z.menubarHeight},mouseEvents:["click","contextmenu"],tabIndex:-1,onFocus:A,onOutsideClick:F},V?c.default.createElement(V,null):c.default.createElement("div",{className:l.default.logoIconEmpty}),N.menubarItems.map(({id:Y,label:_})=>c.default.createElement(d,{key:Y,id:Y,label:_,focusMode:y,afterMenuClick:w,afterMenubarClick:()=>E(H=>!H)})))}),e.MenuBar.displayName="MenuBar";const m=f=>c.default.createElement("div",{className:(0,a.default)(l.default.menubarWrapper,f.className)},c.default.createElement(e.MenuBar,null),c.default.createElement(p.SlotRenderer,{slot:"action",flex:1}));e.MenuBarMixToolbarAction=m,e.MenuBarMixToolbarAction.displayName="MenuBarMixToolbarAction",e.MenuBarActionWrapper=(0,G.Deprecated)(e.MenuBarMixToolbarAction,"please use `MenuBarMixToolbarAction`");const v=()=>{const N=(0,p.useInjectable)(I.AbstractMenuService).createMenu(I.MenuId.IconMenubarContext);return c.default.createElement("div",{className:l.default.icon_menubar_container},c.default.createElement(h.InlineActionBar,{menus:N,type:"icon",className:l.default.menubar_action,isFlattenMenu:!0}))};e.IconMenuBar=v},55496:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToolbarAction=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(41869),u=n.__importDefault(t(30582));e.ToolbarAction=(0,o.observer)(()=>c.default.createElement("div",{className:u.default.toolbarActionsWrapper},c.default.createElement(g.ToolbarLocation,{location:"menu-left",preferences:{noDropDown:!0},className:(0,a.default)(u.default.toolbarActions,u.default.toolbarActionsLeft)}),c.default.createElement(g.ToolbarLocation,{location:"menu-right",className:(0,a.default)(u.default.toolbarActions,u.default.toolbarActionsRight)})))},87308:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(58065),e)},72106:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoEnhanceModule=void 0;const n=t(85608),a=t(76003),o=t(41869);let c=class{onDidStart(){}};c=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],c);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c]}};g=n.__decorate([(0,a.Injectable)()],g),e.MonacoEnhanceModule=g},48327:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PeekViewWidget=void 0;const n=t(41869),a=t(43718),o=t(58065);class c extends o.ZoneWidget{constructor(u,G={}){super(u),this.editor=u,this.options=G,this._onDidClose=new a.Emitter,this.onDidClose=this._onDidClose.event}dispose(){this.isDisposed||(this.isDisposed=!0,super.dispose(),this._onDidClose.fire(this))}_fillContainer(u){this.setCssClass("peekview-widget"),this._headElement=document.createElement("div"),this._headElement.classList.add("head"),this._bodyElement=document.createElement("div"),this._bodyElement.classList.add("body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),u.appendChild(this._headElement),u.appendChild(this._bodyElement)}async _fillHead(u,G){const p=document.createElement("div");p.classList.add("peekview-title"),this.options.supportOnTitleClick&&p.classList.add("clickable"),this._headElement.append(p),this._fillTitleIcon(p),this._primaryHeading=document.createElement("span"),this._primaryHeading.classList.add("filename"),this._secondaryHeading=document.createElement("span"),this._secondaryHeading.classList.add("dirname"),this._metaHeading=document.createElement("span"),this._metaHeading.classList.add("meta"),p.append(this._primaryHeading,this._secondaryHeading,this._metaHeading),this._actionbarElement=document.createElement("div"),this._actionbarElement.classList.add("peekview-actions"),await this._fillActionBarOptions(this._actionbarElement);const h=document.createElement("span");h.className=`action-item ${(0,n.getExternalIcon)("chrome-close")}`;const b=()=>this.dispose();h.addEventListener("click",b),this.addDispose(a.Disposable.create(()=>{h.removeEventListener("click",b)})),this._actionbarElement.append(h),this._headElement.append(this._actionbarElement)}_fillTitleIcon(u){}_onTitleClick(u){}setTitle(u,G){if(this._primaryHeading&&this._secondaryHeading)if(this._primaryHeading.innerText=u,this._primaryHeading.setAttribute("title",u),G)this._secondaryHeading.innerText=G;else for(;this._secondaryHeading.firstChild;)this._secondaryHeading.firstChild.remove()}setMetaTitle(u){this._metaHeading&&(u?(this._metaHeading.innerText=u,this._metaHeading.style.display=""):this._metaHeading.style.display="none")}}e.PeekViewWidget=c},58065:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeZoneWidget=e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const n=t(85608),a=t(41869),o=t(6397),c=n.__importStar(t(20868)),g=t(52416),u=t(50189),G=t(16011),p=t(31324),h=t(43255);class b{constructor(f,N,W,Z,y,E,R,A){this.id=(0,a.uuid)(),this.domNode=f,this.afterLineNumber=N,this.afterColumn=W,this.heightInLines=Z,this.showInHiddenAreas=R,this.ordinal=A,this._onDomNodeTop=y,this._onComputedHeight=E}onDomNodeTop(f){this._onDomNodeTop(f)}onComputedHeight(f){this._onComputedHeight(f)}}e.ViewZoneDelegate=b;class I extends a.Disposable{constructor(f,N){super(),this.id=f,this.dom=N}getPosition(){return null}getDomNode(){return this.dom}getId(){return this.id}}e.OverlayWidgetDelegate=I,I.id="monaco-enhance-overlay-widget";class r{constructor(f){this._editor=f,this._ruleName=r._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color="rgba(0, 122, 204)",this._height=-1}dispose(){this.hide(),(0,u.removeCSSRulesContainingSelector)(this._ruleName)}set color(f){this._color!==f&&(this._color=f,this._updateStyle())}set height(f){this._height!==f&&(this._height=f,this._updateStyle())}_updateStyle(){(0,u.removeCSSRulesContainingSelector)(this._ruleName),(0,u.createCSSRule)(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: 0px; margin-left: -${this._height}px; width: 0px !important; left: 0px !important;`)}show(f){this._updateStyle(),f.startColumn===1&&(f=Object.assign(Object.assign({},f),{startLineNumber:f.endLineNumber,startColumn:2})),this._decorations.set([{range:f,options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:h.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}])}hide(){this._decorations.clear()}}r._IdGenerator=new o.IdGenerator(".arrow-decoration-");const l=new g.Color(new g.RGBA(0,122,204)),s={showArrow:!0,showFrame:!0,className:"",frameColor:l,arrowColor:l,keepEditorSelection:!1};class d extends a.Disposable{constructor(f,N){super(),this.editor=f,this.options=N,this._arrow=null,this.width=0,this.left=0,this._resizeSash=null,this._onDomNodeTop=new a.Emitter,this.onDomNodeTop=this._onDomNodeTop.event,this._container=document.createElement("div"),this._listenEvents()}_showImpl(f,N){var W,Z,y;const E=f,{endLineNumber:R,endColumn:A}=f,w=document.createElement("div"),F=this.editor.getLayoutInfo(),V=this.editor.getOption(p.EditorOption.lineHeight);if(w.style.overflow="hidden",this.editor.changeViewZones(_=>{var H,X;this._viewZone&&(_.removeZone(this._viewZone.id),this._viewZone=null),this._overlay&&(this.editor.removeOverlayWidget(this._overlay),this._overlay=null),this._container.style.top="-1000px",this._viewZone=new b(w,R,A,N,S=>this._onViewZoneTop(S),S=>this._onViewZoneHeight(S),(H=this.options)===null||H===void 0?void 0:H.showInHiddenAreas,(X=this.options)===null||X===void 0?void 0:X.ordinal),this._viewZone.id=_.addZone(this._viewZone),this._overlay=new I(I.id+this._viewZone.id,this._container),this.editor.addOverlayWidget(this._overlay)}),this._arrow||(this._arrow=new r(this.editor),this.disposables.push(this._arrow)),!((W=this.options)===null||W===void 0)&&W.arrowColor){const _=(y=(Z=this.options)===null||Z===void 0?void 0:Z.arrowColor)===null||y===void 0?void 0:y.toString();this._arrow.color=_}const Y=Math.round(V/3);this._arrow.height=Y,this._arrow.show(E),this.layout(F)}get currentRange(){return this._current}get currentHeightInLines(){return this._linesCount}show(f,N){this._current=f,this._linesCount=N,this.applyClass(),this._showImpl(f,N)}hideImpl(){var f;this._viewZone&&this.editor.changeViewZones(N=>{this._viewZone&&(N.removeZone(this._viewZone.id),this._viewZone=null)}),this._overlay&&(this.editor.removeOverlayWidget(this._overlay),this._overlay=null),this._container.remove(),(f=this._arrow)===null||f===void 0||f.hide()}hide(){this.hideImpl()}create(){this._fillContainer(this._container),this._initSash(),this.applyStyle(),this._arrow=new r(this.editor),this.disposables.push(this._arrow)}_getLeft(f){return f.minimap&&f.minimap.minimapWidth>0&&f.minimap.minimapLeft===0?f.minimap.minimapWidth:0}_getWidth(f){const N=f.minimap?f.minimap.minimapWidth+5:0;return f.width-N-f.verticalScrollbarWidth}_onViewZoneTop(f){this._container.style.top=`${f}px`,this._onDomNodeTop.fire(f)}_onViewZoneHeight(f){this._container.style.height=`${f}px`,this._resizeSash&&this._resizeSash.layout()}setCssClass(f,N){this._container&&(N&&this._container.classList.remove(N),this._container.classList.add(f))}layout(f){this.left=this._getLeft(f),this.width=this._getWidth(f),this.render()}render(){this._container.style.width=`${this.width}px`,this._container.style.left=`${this.left}px`,this.applyStyle()}_relayout(f){this._viewZone&&this._viewZone.heightInLines!==f&&this.editor.changeViewZones(N=>{this._viewZone&&(this._viewZone.heightInLines=f,N.layoutZone(this._viewZone.id))})}_listenEvents(){this.editor.onDidLayoutChange(f=>{this.layout(f)})}_initSash(){var f;if(this._resizeSash)return;this._resizeSash=new G.Sash(this._container,this,{orientation:G.Orientation.HORIZONTAL}),this.addDispose(this._resizeSash),!((f=this.options)===null||f===void 0)&&f.isResizeable||(this._resizeSash.state=G.SashState.Disabled);let N;this.addDispose(this._resizeSash.onDidStart(W=>{this._viewZone&&(N={startY:W.startY,heightInLines:this._viewZone.heightInLines})})),this.addDispose(this._resizeSash.onDidEnd(()=>{N=void 0})),this.addDispose(this._resizeSash.onDidChange(W=>{if(N){const Z=(W.currentY-N.startY)/this.editor.getOption(p.EditorOption.lineHeight),y=Z<0?Math.ceil(Z):Math.floor(Z),E=N.heightInLines+y;E>5&&E<35&&this._relayout(E)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return this._container.style.height===null?0:parseInt(this._container.style.height,10)}dispose(){this.hideImpl(),super.dispose()}}e.ZoneWidget=d;class m extends d{constructor(f,N,W){super(f,W),this.editor=f,this.range=N,this.options=W,this._onChangeZoneWidget=new a.Emitter,this.onChangeZoneWidget=this._onChangeZoneWidget.event,this.onFirstDisplay=a.Event.once(this.onDomNodeTop),this._isShow=!1,this.lineHeight=this.editor.getOption(c.editor.EditorOption.lineHeight),this.addDispose(this.editor.onDidChangeConfiguration(Z=>{Z.hasChanged(c.editor.EditorOption.lineHeight)&&(this.lineHeight=this.editor.getOption(c.editor.EditorOption.lineHeight),this.wrap&&this.resizeZoneWidget())})),a.Event.once(this.onDomNodeTop)(()=>{window.requestAnimationFrame(()=>{this.resizeZoneWidget()})})}observeContainer(f){this.wrap=f;const N=new IntersectionObserver(Z=>{for(const y of Z)y.isIntersecting&&this.resizeZoneWidget()}),W=new MutationObserver(Z=>{Z.forEach(y=>{if(y.type==="childList"){for(const E of Array.from(y.target.childNodes))if(E.nodeType===Node.ELEMENT_NODE&&E.querySelectorAll){const R=E.querySelectorAll("img");R.length&&R.forEach(A=>{const w=new a.DomListener(A,"load",()=>{this.resizeZoneWidget(),w.dispose()});this.addDispose(w)})}}}),this.resizeZoneWidget()});return N.observe(this.wrap),W.observe(this.wrap,{childList:!0,subtree:!0}),{dispose(){N.disconnect(),W.disconnect()}}}resizeZoneWidget(){let f=this.wrap.offsetHeight;if(!f&&this.preWrapperHeight&&(f=this.preWrapperHeight),f){const N=f/this.lineHeight;this._isShow&&this.heightInLines!==N&&(this.heightInLines=N,this.show(),this.preWrapperHeight=f)}}show(){const f=!this.wrap.offsetHeight&&!this.preWrapperHeight;this.resize(),this.fireChangeEvent(),f&&this.resizeZoneWidget()}fireChangeEvent(){this._onChangeZoneWidget.fire(this.range)}resize(){const f=document.activeElement;super.show(this.range,this.heightInLines),f?.focus({preventScroll:!0})}}e.ResizeZoneWidget=m},20303:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(87308),e)},52659:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactInlineContentWidget=void 0;const n=t(85608),a=n.__importDefault(t(97331)),o=n.__importDefault(t(14041)),c=n.__importDefault(t(25873)),g=t(76003),u=t(41869),G=t(43718),p=n.__importStar(t(33096)),h=t(90052);let b=class extends G.Disposable{get isHidden(){return this._isHidden}constructor(r){super(),this.editor=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this.positionPreference=[h.ContentWidgetPositionPreference.BELOW],this.root=null,this.addDispose((0,G.runWhenIdle)(()=>{this.root=c.default.createRoot(this.getDomNode()),this.root.render(o.default.createElement(u.ConfigProvider,{value:this.appConfig},this.renderView())),this.layoutContentWidget()})),this.addDispose(G.Disposable.create(()=>{this.hide(),this.root&&this.root.unmount()}))}setPositionPreference(r){this.positionPreference=r}setOptions(r){this.options=r}show(r){r&&(this.disposed||this.options&&this.options.selection&&this.options.selection.equalsRange(r.selection)||(this.setOptions(r),this._isHidden=!1,this.editor.addContentWidget(this)))}hide(){this._isHidden=!0,this.editor.removeContentWidget(this)}resume(){this._isHidden&&(this._isHidden=!1,this.editor.addContentWidget(this))}getId(){return this.id()}layoutContentWidget(){this.editor.layoutContentWidget(this)}getClassName(){return this.getId()}getDomNode(){this.domNode||(this.domNode=document.createElement("div"),requestAnimationFrame(()=>{this.domNode.classList.add(this.getClassName()),this.domNode.style.zIndex=u.StackingLevelStr.Overlay}));const r=(0,a.default)(()=>{requestAnimationFrame(()=>this.layoutContentWidget())},G.FRAME_THREE),l=p.createLayoutEventType(this.id());return this.domNode.addEventListener(l,r),this.addDispose(G.Disposable.create(()=>{this.domNode.removeEventListener(l,r)})),this.domNode}getPosition(){if(!this.options)return null;const{position:r}=this.options;return r?{position:r,preference:this.positionPreference}:null}isOutOfArea(){const l=this.editor.getLayoutInfo().contentLeft,s=this.getMiniMapWidth();return this.editor.getLayoutInfo().width-l-s<270}getMiniMapWidth(){return this.editor.getLayoutInfo().minimap.minimapWidth}getLineHeight(){return this.editor.getOption(p.EditorOption.lineHeight)}};n.__decorate([(0,g.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),b=n.__decorate([(0,g.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],b),e.ReactInlineContentWidget=b},55218:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICallHierarchyService=e.CallHierarchyProviderRegistry=void 0;const n=t(40497);e.CallHierarchyProviderRegistry=new n.LanguageFeatureRegistry,e.ICallHierarchyService=Symbol("ICallHierarchyService")},21880:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMonacoActionRegistry=e.IMonacoCommandsRegistry=e.ICommandServiceToken=e.EditorExtensionsRegistry=e.CommandsRegistry=void 0;var n=t(71827);Object.defineProperty(e,"CommandsRegistry",{enumerable:!0,get:function(){return n.CommandsRegistry}});var a=t(97682);Object.defineProperty(e,"EditorExtensionsRegistry",{enumerable:!0,get:function(){return a.EditorExtensionsRegistry}}),e.ICommandServiceToken=Symbol("ICommandService"),e.IMonacoCommandsRegistry=Symbol("IMonacoCommandsRegistry"),e.IMonacoActionRegistry=Symbol("IMonacoActionRegistry")},61468:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeActions=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(81175),G=n.__importDefault(t(46843)),p=({uri:h,summary:b,editorType:I,containerClassName:r,onReset:l,onSwitchEditor:s,canNavigate:d,handleNext:m,handlePrev:v,beforeAddons:f,afterAddons:N,isAIResolving:W,onAIResolve:Z})=>{const y=(0,u.useInMergeChanges)(h?.toString()||""),E=(0,c.useInjectable)(c.AINativeConfigService),R=(0,o.useCallback)(()=>E.capabilities.supportsConflictResolve,[E]),A=(0,o.useCallback)(()=>{d&&v()},[v,d]),w=(0,o.useCallback)(()=>{d&&m()},[m,d]);return o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_float_container,r)},o.default.createElement("div",{className:G.default.merge_editor_float_container_info},o.default.createElement("div",{className:G.default.merge_editor_nav_operator},o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_nav_operator_btn,{[G.default.disabled]:!d}),onClick:A},(0,c.localize)("mergeEditor.conflict.prev")),o.default.createElement("div",{className:G.default["vertical-divider"]}),o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_nav_operator_btn,{[G.default.disabled]:!d}),onClick:w},(0,c.localize)("mergeEditor.conflict.next"))),o.default.createElement("div",{className:G.default["vertical-divider"]}),o.default.createElement("div",null,b)),o.default.createElement("div",{className:G.default["horizontal-divider"]}),o.default.createElement("div",{className:G.default.merge_editor_float_container_operation_bar},I==="text"&&y&&o.default.createElement(g.Button,{id:"merge.editor.open.3way",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:s,style:{alignSelf:"flex-start"}},o.default.createElement(g.Icon,{icon:"swap"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.open.3way"))),I==="3way"&&o.default.createElement(g.Button,{id:"merge.editor.open.tradition",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:s},o.default.createElement(g.Icon,{icon:"swap"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.open.tradition"))),o.default.createElement("div",{style:{flex:1}}),f?o.default.createElement(o.default.Fragment,null,f,o.default.createElement("span",{className:G.default.line_vertical})):null,o.default.createElement(g.Button,{id:"merge.editor.rest",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:l},o.default.createElement(g.Icon,{icon:"discard"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.reset"))),R()&&o.default.createElement(g.Button,{id:"merge.editor.conflict.resolve.all",size:"default",className:`${G.default.merge_conflict_bottom_btn} ${G.default.magic_btn}`,onClick:Z},W?o.default.createElement(o.default.Fragment,null,o.default.createElement(g.Icon,{icon:"circle-pause"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.conflict.ai.resolve.all.stop"))):o.default.createElement(o.default.Fragment,null,o.default.createElement(g.Icon,{icon:"magic-wand"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.conflict.ai.resolve.all")))),N?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:G.default.line_vertical}),N):null))};e.MergeActions=p},34712:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(34239),e)},93961:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappingManagerService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(9514),g=t(89995),u=t(33078),G=t(24093);let p=class extends o.Disposable{constructor(){super(),this.documentMappingTurnLeft=this.injector.get(u.DocumentMapping,[G.EDiffRangeTurn.ORIGIN]),this.documentMappingTurnRight=this.injector.get(u.DocumentMapping,[G.EDiffRangeTurn.MODIFIED]),this.markCompleteFactoryTurnLeft=this.markCompleteFactory(G.EDiffRangeTurn.ORIGIN),this.markCompleteFactoryTurnRight=this.markCompleteFactory(G.EDiffRangeTurn.MODIFIED),this.revokeActionsFactoryTurnLeft=this.revokeActionsFactory(G.EDiffRangeTurn.ORIGIN),this.revokeActionsFactoryTurnRight=this.revokeActionsFactory(G.EDiffRangeTurn.MODIFIED)}revokeActionsFactory(b){const I=b===G.EDiffRangeTurn.ORIGIN?this.documentMappingTurnLeft:this.documentMappingTurnRight;return r=>{const l=I.reverse(r);if(!l)return;l.cancel();const s=I.adjacentComputeRangeMap.get(l.id);s&&s.cancel()}}markCompleteFactory(b){const I=b===G.EDiffRangeTurn.ORIGIN?this.documentMappingTurnLeft:this.documentMappingTurnRight;return(r,l)=>{const s=I.adjacentComputeRangeMap.get(r.id);if(s&&(r.done(l),s.done(l),s.turnDirection===G.ETurnDirection.BOTH)){const d=r.turnDirection===G.ETurnDirection.CURRENT?this.documentMappingTurnRight:this.documentMappingTurnLeft,m=d.reverse(s);if(!m)return;const v=d.adjacentComputeRangeMap.get(m.id);if(!v)return;v.done(l)}}}inputComputeResultRangeMappingTurnLeft(b){this.documentMappingTurnLeft.inputComputeResultRangeMapping(b)}inputComputeResultRangeMappingTurnRight(b){this.documentMappingTurnRight.inputComputeResultRangeMapping(b)}markCompleteTurnLeft(b,I){this.markCompleteFactoryTurnLeft(b,I)}markCompleteTurnRight(b,I){this.markCompleteFactoryTurnRight(b,I)}revokeActionsTurnLeft(b){this.revokeActionsFactoryTurnLeft(b)}revokeActionsTurnRight(b){this.revokeActionsFactoryTurnRight(b)}clearMapping(){this.documentMappingTurnLeft.clear(),this.documentMappingTurnRight.clear()}findNextLineRanges(b){const[I,r]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(l=>l.findNextOppositeRange(b));return{[G.EditorViewType.CURRENT]:I,[G.EditorViewType.INCOMING]:r}}findTouchesRanges(b,I=!0){const[r,l]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(s=>s.findTouchesRange(b,I));return{[G.EditorViewType.CURRENT]:r,[G.EditorViewType.INCOMING]:l}}findIncludeRanges(b){const[I,r]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(l=>l.findIncludeRange(b));return{[G.EditorViewType.CURRENT]:I,[G.EditorViewType.INCOMING]:r}}getAllDiffRanges(){return(0,c.distinct)(this.documentMappingTurnLeft.getModifiedRange().concat(this.documentMappingTurnRight.getOriginalRange()),b=>b.id)}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(g.MappingManagerDataStore),n.__metadata("design:type",g.MappingManagerDataStore)],p.prototype,"dataStore",void 0),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.MappingManagerService=p},89995:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappingManagerDataStore=void 0;const n=t(85608),a=t(76003),o=t(41869);let c=class{constructor(){this._onDataChangeEmitter=new o.Emitter,this.onDataChange=this._onDataChangeEmitter.event,this.conflictsTotal=0,this.nonConflictsUnresolvedCount=0,this.conflictsResolvedCount=0,this.nonConflictingChangesResolvedTotal=0,this.nonConflictingChangesResolvedLeft=0,this.nonConflictingChangesResolvedRight=0,this.nonConflictingChangesResolvedBoth=0,this.userManualResolveNonConflicts=!1}get conflictsCount(){return{total:this.conflictsTotal,resolved:this.conflictsResolvedCount,lefted:this.conflictsTotal-this.conflictsResolvedCount,nonConflicts:this.nonConflictsUnresolvedCount}}updateConflictsCount(u){typeof u.total<"u"&&(this.conflictsTotal=u.total),typeof u.resolved<"u"&&(this.conflictsResolvedCount=u.resolved),typeof u.nonConflicts<"u"&&(this.nonConflictsUnresolvedCount=u.nonConflicts)}get nonConflictingChangesResolvedCount(){return{total:this.nonConflictingChangesResolvedTotal,left:this.nonConflictingChangesResolvedLeft,right:this.nonConflictingChangesResolvedRight,both:this.nonConflictingChangesResolvedBoth,userManualResolveNonConflicts:this.userManualResolveNonConflicts}}updateNonConflictingChangesResolvedCount(u){typeof u.total<"u"&&(this.nonConflictingChangesResolvedTotal=u.total),typeof u.left<"u"&&(this.nonConflictingChangesResolvedLeft=u.left),typeof u.right<"u"&&(this.nonConflictingChangesResolvedRight=u.right),typeof u.both<"u"&&(this.nonConflictingChangesResolvedBoth=u.both),typeof u.userManualResolveNonConflicts<"u"&&(this.userManualResolveNonConflicts=u.userManualResolveNonConflicts)}emitChange(){this._onDataChangeEmitter.fire()}canNavigate(){return this.conflictsCount.lefted>0}summary(){const u=this.conflictsCount,G=this.nonConflictingChangesResolvedCount,h=u.lefted===0&&u.resolved===u.total?(0,o.localize)("merge-conflicts.conflicts.all-resolved"):(0,o.formatLocalize)("merge-conflicts.conflicts.partial-resolved",u.resolved,u.lefted);let b=(0,o.localize)("merge-conflicts.merge.type.auto");G.userManualResolveNonConflicts&&(b=(0,o.localize)("merge-conflicts.merge.type.manual"));const I=[];if(G.total>0){I.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.progress",G.total,b));const s=[];if(G.left>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.left",G.left)),G.right>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.right",G.right)),G.both>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.base",G.both)),s.length>0){const d=s.join("\uFF1B");I.push(` (${d})`)}}const r=I.join("");return[(0,o.formatLocalize)("merge-conflicts.conflicts.summary",u.total,h),u.nonConflicts>0?(0,o.formatLocalize)("merge-conflicts.non-conflicts.summary",u.nonConflicts):"",r].filter(Boolean).join(" | ")}};c=n.__decorate([(0,a.Injectable)()],c),e.MappingManagerDataStore=c},36885:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorWidget=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),c=t(76003),g=t(41869),u=t(43718),G=t(96177),p=t(24093),h=t(13914);let b=0,I=class extends u.Disposable{constructor(l,s,d){super(),this.container=l,this.options=s,this.viewStateMap=new Map,this._id=++b,this.layout(),this.addDispose(this.mergeEditorService.onRestoreState(m=>{if(m){const v=m.toString();this.viewStateMap.delete(v),this.outputUri=void 0;const f=this.mergeEditorService.getNutrition();if(f){const{ancestor:N}=f,{baseContent:W,textModel:Z}=N;Z.setValue(W);const y=this.getResultEditor().getModel();y&&y.setValue(W)}}}))}async open(l){const{ancestor:s,input1:d,input2:m,output:v}=l;this.mergeEditorService.setNutritionAndLaunch(l),this.saveViewState(this.outputUri),this.outputUri=v.uri;const f=this.outputUri.toString();if(this.setModel({ours:d.textModel,result:s.textModel,theirs:m.textModel}),this.viewStateMap.has(f)){const N=this.viewStateMap.get(f);this.restoreViewState(N);const{turnLeft:W,turnRight:Z}=N;await this.mergeEditorService.compare(W,Z)}else await this.mergeEditorService.compare();return this.updateOptions(this.options),Promise.resolve()}getOursEditor(){return this.mergeEditorService.getCurrentEditor()}getResultEditor(){return this.mergeEditorService.getResultEditor()}getTheirsEditor(){return this.mergeEditorService.getIncomingEditor()}getCodeEditorCollect(){return[]}onDidDispose(l){return this.onDispose(l)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return"MERGE_EDITOR_DIFF"}updateOptions(l){this.mergeEditorService.updateOptions(l)}onVisible(){}onHide(){}layout(l){o.default.createRoot(this.container).render(a.default.createElement(g.ConfigProvider,{value:this.configContext},a.default.createElement(h.Grid,null)))}focus(){}hasTextFocus(){return!1}getSupportedActions(){return[]}saveViewState(l){if(!l)return null;const s=l.toString();return this.viewStateMap.set(s,{[p.EditorViewType.CURRENT]:this.getOursEditor().saveViewState(),[p.EditorViewType.RESULT]:this.getResultEditor().saveViewState(),[p.EditorViewType.INCOMING]:this.getTheirsEditor().saveViewState(),turnLeft:this.mergeEditorService.getTurnLeftRangeMapping(),turnRight:this.mergeEditorService.getTurnRightRangeMapping()}),null}restoreViewState(l){const{[p.EditorViewType.CURRENT]:s,[p.EditorViewType.RESULT]:d,[p.EditorViewType.INCOMING]:m}=l;this.getOursEditor().restoreViewState(s),this.getResultEditor().restoreViewState(d),this.getTheirsEditor().restoreViewState(m)}getVisibleColumnFromPosition(l){return 1}getStatusbarColumn(l){return 1}getPosition(){return null}setPosition(l,s){}revealLine(l,s){}revealLineInCenter(l,s){}revealLineInCenterIfOutsideViewport(l,s){}revealLineNearTop(l,s){}revealPosition(l,s){}revealPositionInCenter(l,s){}revealPositionInCenterIfOutsideViewport(l,s){}revealPositionNearTop(l,s){}getSelection(){return null}getSelections(){return null}setSelection(l,s){}setSelections(l,s){}revealLines(l,s,d){}revealLinesInCenter(l,s,d){}revealLinesInCenterIfOutsideViewport(l,s,d){}revealLinesNearTop(l,s,d){}revealRange(l,s){}revealRangeInCenter(l,s){}revealRangeAtTop(l,s){}revealRangeInCenterIfOutsideViewport(l,s){}revealRangeNearTop(l,s){}revealRangeNearTopIfOutsideViewport(l,s){}trigger(l,s,d){}getModel(){return null}setModel(l){const s=l;this.getOursEditor().setModel(s.ours),this.getResultEditor().setModel(s.result),this.getTheirsEditor().setModel(s.theirs)}createDecorationsCollection(l){throw Error("Method not implemented.")}changeDecorations(l){}};n.__decorate([(0,c.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],I.prototype,"configContext",void 0),n.__decorate([(0,c.Autowired)(G.MergeEditorService),n.__metadata("design:type",G.MergeEditorService)],I.prototype,"mergeEditorService",void 0),I=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[HTMLElement,Object,Object])],I),e.MergeEditorWidget=I},96177:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(38070),g=t(81878),u=t(43718),G=t(27833),p=t(14951),h=t(72665),b=t(93961),I=t(38889),r=t(24093),l=t(66245),s=t(51472),d=t(66557),m=t(23600),v=t(13744),f=t(22883);let N=class extends o.Disposable{constructor(){super(),this.isCancelAllAIResolveConflict=!1,this._onDidInputNutrition=new o.Emitter,this.onDidInputNutrition=this._onDidInputNutrition.event,this._onDidMount=new o.Emitter,this.onDidMount=this._onDidMount.event,this._onRestoreState=new o.Emitter,this.onRestoreState=this._onRestoreState.event,this._onHasIntelligentLoadingChange=new o.Emitter,this.onHasIntelligentLoadingChange=this._onHasIntelligentLoadingChange.event,this.loadingDispose=new o.Disposable,this.computerDiffModel=new I.ComputerDiffModel,this.scrollSynchronizer=new v.ScrollSynchronizer,this.stickinessConnectManager=new f.StickinessConnectManager,this.actionsManager=this.injector.get(l.ActionsManager,[this.mappingManagerService,this.mergeConflictReportService])}initListenEvent(){this.addDispose(this.resultView.onDidChangeContent(()=>{this.resultView.updateDecorations().updateActions(),this.currentView.launchChange(),this.incomingView.launchChange()}))}listenIntelligentLoadingChange(){this.loadingDispose.dispose();let Z=!1;this.loadingDispose.addDispose(this.resultView.onChangeRangeIntelligentState(y=>{if(y.getIntelligentStateModel().isLoading){this._onHasIntelligentLoadingChange.fire(!0),Z=!0;return}(0,u.runWhenIdle)(()=>{const R=this.mappingManagerService.getAllDiffRanges().filter(A=>A.isConflictPoint);Z&&R.every(A=>!A.getIntelligentStateModel().isLoading)&&(this._onHasIntelligentLoadingChange.fire(!1),this.loadingDispose.dispose())},1)}))}setNutritionAndLaunch(Z){this.nutrition=Z,this._onDidInputNutrition.fire(Z)}getNutrition(){return this.nutrition}instantiationCodeEditor(Z,y,E){this.currentView&&this.resultView&&this.incomingView||(this.currentView=this.injector.get(s.CurrentCodeEditor,[Z,this.monacoService,this.injector]),this.resultView=this.injector.get(m.ResultCodeEditor,[y,this.monacoService,this.injector]),this.incomingView=this.injector.get(d.IncomingCodeEditor,[E,this.monacoService,this.injector]),this.scrollSynchronizer.mount(this.currentView,this.resultView,this.incomingView),this.stickinessConnectManager.mount(this.currentView,this.resultView,this.incomingView),this.actionsManager.mount(this.currentView,this.resultView,this.incomingView),this._onDidMount.fire({currentView:this.currentView,resultView:this.resultView,incomingView:this.incomingView}),this.initListenEvent())}dispose(){super.dispose(),this.currentView.dispose(),this.resultView.dispose(),this.incomingView.dispose(),this.scrollSynchronizer.dispose(),this.stickinessConnectManager.dispose(),this.actionsManager.dispose(),this.loadingDispose.dispose(),this.mergeConflictReportService.dispose()}acceptLeft(Z=!1,y){this.mappingManagerService.documentMappingTurnLeft.getOriginalRange().filter(A=>A.isComplete===!1).filter(A=>Z&&A.isConflictPoint?null:A).forEach(A=>{if(A.isMerge){const w=this.mappingManagerService.documentMappingTurnLeft.adjacentComputeRangeMap.get(A.id);if(w&&w.isComplete){this.currentView.launchConflictActionsEvent({range:A,action:r.APPEND_ACTIONS,reason:y});return}}this.currentView.launchConflictActionsEvent({range:A,action:r.ACCEPT_CURRENT_ACTIONS,reason:y})})}acceptRight(Z=!1,y){this.mappingManagerService.documentMappingTurnRight.getModifiedRange().filter(A=>A.isComplete===!1).filter(A=>Z&&A.isConflictPoint?null:A).forEach(A=>{if(A.isMerge){const w=this.mappingManagerService.documentMappingTurnRight.adjacentComputeRangeMap.get(A.id);if(w&&w.isComplete){this.currentView.launchConflictActionsEvent({range:A,action:r.APPEND_ACTIONS,reason:y});return}}this.incomingView.launchConflictActionsEvent({range:A,action:r.ACCEPT_CURRENT_ACTIONS,reason:y})})}async accept(){const Z=(0,o.localize)("mergeEditor.conflict.action.apply.confirm.continue"),y=(0,o.localize)("mergeEditor.conflict.action.apply.confirm.complete"),E=async()=>{if(!this.nutrition)return;const{output:w}=this.nutrition,{uri:F}=w,V=await this.fileServiceClient.getFileStat(F.toString(),!1);if(!V)return;const Y=this.resultView.getModel(),_=this.mappingManagerService.getAllDiffRanges(),H=_.filter(O=>O.getIntelligentStateModel().isComplete===!0).length;let X=0;_.filter(O=>O.isConflictPoint&&O.getIntelligentStateModel().isComplete).forEach(O=>{const T=O.getIntelligentStateModel().answerCode,B=Y.getValueInRange(O.toRange())||"";T.trim()===B.trim()&&(X+=1)}),this.mergeConflictReportService.report(this.resultView.getUri(),{useAiConflictPointNum:H,receiveNum:X});const S=this.resultView.getEditor().getValue();await this.fileServiceClient.setContent(V,S),this.fireRestoreState(F),await this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE.id);const Q=await this.commandService.executeCommand(o.SCM_COMMANDS.GetSCMResource.id,F);Q&&await this.commandService.executeCommand(G.GitCommands.Stage,Q)},{completeCount:R,shouldCount:A}=this.resultView.completeSituation();if(A!==R){const w=await this.dialogService.info((0,o.localize)("mergeEditor.conflict.action.apply.confirm.title"),[Z,y]);return w===Z?!1:(w===y&&await E(),!0)}else return await E(),!0}async stopAllAIResolveConflict(){this.isCancelAllAIResolveConflict=!0,this.resultView.cancelRequestToken(),this.resultView.hideStopWidget()}async handleAIResolveConflict(){this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"clickAllNum"),this.listenIntelligentLoadingChange(),(0,u.runWhenIdle)(()=>{this.acceptLeft(!0,r.ECompleteReason.AutoResolvedNonConflictBeforeRunAI)},0),(0,u.runWhenIdle)(()=>{this.acceptRight(!0,r.ECompleteReason.AutoResolvedNonConflictBeforeRunAI)},1),(0,u.runWhenIdle)(async()=>{var Z,y,E,R;this.isCancelAllAIResolveConflict=!1;const w=this.mappingManagerService.getAllDiffRanges().filter(X=>X.isConflictPoint&&!X.getIntelligentStateModel().isLoading);let F=0,V=w.length;try{for(var Y=!0,_=n.__asyncValues(w),H;H=await _.next(),Z=H.done,!Z;){R=H.value,Y=!1;try{const X=R,S=this.resultView.getFlushRange(X)||X,Q=await this.actionsManager.handleAIConflictResolve(S,{isRegenerate:!1});if(this.isCancelAllAIResolveConflict){this.isCancelAllAIResolveConflict=!1;return}if(!Q)continue;Q.isCancel&&(V-=1),Q.isSuccess&&(F+=1)}finally{Y=!0}}}catch(X){y={error:X}}finally{try{!Y&&!Z&&(E=_.return)&&await E.call(_)}finally{if(y)throw y.error}}F!==V&&g.message.warning((0,u.formatLocalize)("aiNative.resolve.conflict.message.not.processed.yet",F,V-F))},2)}fireRestoreState(Z){this._onRestoreState.fire(Z)}getCurrentEditor(){return this.currentView.getEditor()}getResultEditor(){return this.resultView.getEditor()}getIncomingEditor(){return this.incomingView.getEditor()}getTurnLeftRangeMapping(){return this.mappingManagerService.documentMappingTurnLeft.getMetaLineRangeMapping()}getTurnRightRangeMapping(){return this.mappingManagerService.documentMappingTurnRight.getMetaLineRangeMapping()}updateOptions(Z){this.currentView.updateOptions(Z),this.incomingView.updateOptions(Z),this.resultView.updateOptions(Z)}async compare(Z=[],y=[]){this.mappingManagerService.clearMapping();let E=Z,R=y;if(Z.length===0&&y.length===0){this.resultView.reset();const[w,F]=await Promise.all([this.computerDiffModel.computeDiff(this.currentView.getModel(),this.resultView.getModel()),this.computerDiffModel.computeDiff(this.resultView.getModel(),this.incomingView.getModel())]);E=w.changes,R=F.changes}this.currentView.inputDiffComputingResult(E),this.incomingView.inputDiffComputingResult(R),this.resultView.inputDiffComputingResult(),this.preferenceService.getValid("mergeEditor.autoApplyNonConflictChanges",!1)&&(this.acceptLeft(!0,r.ECompleteReason.AutoResolvedNonConflict),this.acceptRight(!0,r.ECompleteReason.AutoResolvedNonConflict)),this.currentView.updateDecorations().updateActions(),this.incomingView.updateDecorations().updateActions(),this.resultView.updateDecorations().updateActions()}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],N.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.MonacoService),n.__metadata("design:type",o.MonacoService)],N.prototype,"monacoService",void 0),n.__decorate([(0,a.Autowired)(b.MappingManagerService),n.__metadata("design:type",b.MappingManagerService)],N.prototype,"mappingManagerService",void 0),n.__decorate([(0,a.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],N.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(h.IDialogService),n.__metadata("design:type",Object)],N.prototype,"dialogService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],N.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(c.MergeConflictReportService),n.__metadata("design:type",c.MergeConflictReportService)],N.prototype,"mergeConflictReportService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],N.prototype,"preferenceService",void 0),N=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],N),e.MergeEditorService=N},38889:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputerDiffModel=void 0;const n=t(46739),a=t(28240),o=t(83e3),c=t(2253),g=t(96178),u=t(75526);class G{constructor(){this.editorWorkerService=o.StandaloneServices.get(a.IEditorWorkerService)}convertDiffResult(h){return{identical:h.identical,quitEarly:h.quitEarly,moves:[],changes:h.changes.map(b=>{var I;return new c.DetailedLineRangeMapping(new u.LineRange(b.original.startLineNumber,b.original.endLineNumberExclusive),new u.LineRange(b.modified.startLineNumber,b.modified.endLineNumberExclusive),(I=b.innerChanges)===null||I===void 0?void 0:I.map(r=>new n.RangeMapping(new g.InnerRange(r.originalRange.startLineNumber,r.originalRange.startColumn,r.originalRange.endLineNumber,r.originalRange.endColumn),new g.InnerRange(r.modifiedRange.startLineNumber,r.modifiedRange.startColumn,r.modifiedRange.endLineNumber,r.modifiedRange.endColumn))))})}}async computeDiff(h,b){const I=await this.editorWorkerService.computeDiff(h.uri,b.uri,{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1},"advanced"),r={quitEarly:!1,identical:!1,changes:[],moves:[]};return h.isDisposed()||b.isDisposed()?r:I?this.convertDiffResult(I):r}}e.ComputerDiffModel=G},91376:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConflictActions=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(88104),g=t(66076);let u=class extends o.Disposable{get editor(){return this.codeEditor.getEditor()}constructor(p){super(),this.codeEditor=p,this.deltaDecoration=[],this.actionsCollect=new Map}createActionDecoration(p){const{range:h}=p;return{id:"",editorDecoration:{range:{startLineNumber:h.startLineNumber,startColumn:0,endLineNumber:h.startLineNumber,endColumn:0},options:c.ModelDecorationOptions.register(Object.assign({description:h.id},p.decorationOptions))}}}dispose(){super.dispose(),this.actionsCollect.clear()}clearDecorations(){this.editor.changeDecorations(p=>{for(const h of this.deltaDecoration)p.removeDecoration(h.id);this.deltaDecoration=[]})}clearDecorationsById(p){this.editor.changeDecorations(h=>{p&&(h.removeDecoration(p),this.deltaDecoration=this.deltaDecoration.filter(b=>b.id!==p))})}setActions(p){const h=p.map(b=>{const{range:I}=b;return this.actionsCollect.set(I.id,b),this.createActionDecoration(b)});this.editor.changeDecorations(b=>{b.deltaDecorations(this.deltaDecoration.map(I=>I.id),h.map(I=>I.editorDecoration)).forEach((I,r)=>h[r].id=I),this.deltaDecoration=h})}clearActions(p){if(this.actionsCollect.has(p)){const h=this.actionsCollect.get(p),b=this.deltaDecoration.find(I=>I.editorDecoration.options.description===h.range.id);b&&this.clearDecorationsById(b.id),this.actionsCollect.delete(p)}}updateActions(p){this.clearDecorations(),this.setActions(p)}getActions(){return this.actionsCollect.values()}getAction(p){return this.actionsCollect.get(p)}};u=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[g.BaseCodeEditor])],u),e.ConflictActions=u},98025:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorDecorations=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(43255),g=t(88104),u=t(24093),G=t(66076),p=t(31775);let h=class extends o.Disposable{get editor(){return this.codeEditor.getEditor()}constructor(I,r){super(),this.codeEditor=I,this.editorViewType=r,this.deltaDecoration=[],this.lineWidgetSet=new Set,this._onDidChangeLineWidget=new o.Emitter,this.onDidChangeLineWidget=this._onDidChangeLineWidget.event,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=this._onDidChangeDecorations.event,this.initListenEvent()}initListenEvent(){this.addDispose(o.Event.any(this.editor.onDidChangeModelDecorations,this.onDidChangeLineWidget)(()=>{this.launchChange()}))}launchChange(){this._onDidChangeDecorations.fire(this)}createLineDecoration(I){const r=I.startLineNumber,s=Math.max(I.startLineNumber,I.endLineNumberExclusive-1)-r+1,d=g.ModelDecorationOptions.register({description:I.id,className:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.diff_line_background,u.DECORATIONS_CLASSNAME.range_type[I.type]),isWholeLine:!0,stickiness:c.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges});return Array.from({length:s}).map((m,v)=>{let f=" ";const N=` ${u.DECORATIONS_CLASSNAME.conflict_wrap} `;s!==1&&(f+=v===0?u.DECORATIONS_CLASSNAME.stretch_bottom:v===s-1?u.DECORATIONS_CLASSNAME.stretch_top:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.stretch_top,u.DECORATIONS_CLASSNAME.stretch_bottom)),I.isComplete&&(f+=N);const W=Object.assign(Object.assign({},d),this.codeEditor.getMonacoDecorationOptions(d,I));return{id:"",editorDecoration:{range:{startLineNumber:r+v,startColumn:0,endLineNumber:r+v,endColumn:Number.MAX_SAFE_INTEGER},options:Object.assign(Object.assign({},W),{className:(W.className||"")+f,marginClassName:(W.marginClassName||"")+f,linesDecorationsClassName:(W.linesDecorationsClassName||"")+f})}}})}createInnerCharDecoration(I){return{id:"",editorDecoration:{range:I,options:g.ModelDecorationOptions.register({description:I.toString(),className:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.diff_inner_char_background,I.type),isWholeLine:!1})}}}createGuideLineWidget(I){const r=new p.GuidelineWidget(this.editor);return r.create(),I.isComplete&&r.addClassName(u.DECORATIONS_CLASSNAME.dashed),r.addClassName(u.DECORATIONS_CLASSNAME.range_type[I.type]).showByLine(Math.max(0,Math.max(0,I.startLineNumber-1))),r}setDecorations(I,r){this.editor.changeDecorations(l=>{const s=[];for(const d of I)if(d.isEmpty){const m=this.createGuideLineWidget(d);this.lineWidgetSet.add(m),this._onDidChangeLineWidget.fire()}else s.push(...this.createLineDecoration(d));for(const d of r)for(const m of d)m.isEmpty()||s.push(this.createInnerCharDecoration(m));s.forEach(d=>{d.id=l.addDecoration(d.editorDecoration.range,d.editorDecoration.options)}),this.deltaDecoration=s})}cleanUpLineWidget(I){I.forEach(r=>{r.hide()}),I.clear()}clearDecorations(){return this.editor.changeDecorations(I=>{for(const r of this.deltaDecoration)I.removeDecoration(r.id);this.deltaDecoration=[]}),this.cleanUpLineWidget(this.lineWidgetSet),this}updateDecorations(I,r){return this.clearDecorations(),this.render(I,r),this}getDecorations(){return this.deltaDecoration}getLineWidgets(){return Array.from(this.lineWidgetSet.keys())}render(I,r){this.setDecorations(I,r)}dispose(){super.dispose(),this.lineWidgetSet.forEach(I=>I.dispose())}};h=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__param(0,(0,a.Optional)()),n.__param(1,(0,a.Optional)()),n.__metadata("design:paramtypes",[G.BaseCodeEditor,String])],h),e.MergeEditorDecorations=h},33078:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentMapping=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(2253),g=t(24093);let u=class extends o.Disposable{constructor(p){super(),this.diffRangeTurn=p,this.adjacentComputeRangeMap=new Map,this.computeRangeMap=new Map}ensureSort(p){return Array.from(p).sort((h,b)=>h.startLineNumber-b.startLineNumber)}getMetaLineRangeMapping(){const p=[];return this.computeRangeMap.forEach(h=>{this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?p.push(new c.DetailedLineRangeMapping(h,this.adjacentComputeRangeMap.get(h.id),[])):this.diffRangeTurn===g.EDiffRangeTurn.MODIFIED&&p.push(new c.DetailedLineRangeMapping(this.adjacentComputeRangeMap.get(h.id),h,[]))}),p}getOriginalRange(){return this.ensureSort(this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?this.computeRangeMap.values():this.adjacentComputeRangeMap.values())}getModifiedRange(){return this.ensureSort(this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?this.adjacentComputeRangeMap.values():this.computeRangeMap.values())}reverse(p){const h=this.adjacentComputeRangeMap.entries();for(const b of h){const[I,r]=b;if(r.id===p.id&&this.computeRangeMap.has(I))return this.computeRangeMap.get(I)}}inputComputeResultRangeMapping(p){switch(this.diffRangeTurn){case g.EDiffRangeTurn.ORIGIN:p.forEach(({modified:h,original:b})=>{this.addRange(b,h)});break;case g.EDiffRangeTurn.MODIFIED:p.forEach(({modified:h,original:b})=>{this.addRange(h,b)});break}}deltaAdjacentQueueAfter(p,h,b=!1){const I=this.adjacentComputeRangeMap.get(p.id);if(I)for(const[r,l]of this.adjacentComputeRangeMap.entries())l.isAfter(I)?this.adjacentComputeRangeMap.set(r,l.delta(h)):b&&l.id===I.id&&this.adjacentComputeRangeMap.set(r,l.delta(h))}deltaEndAdjacentQueue(p,h){for(const[b,I]of this.adjacentComputeRangeMap.entries())I.id===p.id?this.adjacentComputeRangeMap.set(b,p.deltaEnd(h)):I.isAfter(p)&&this.adjacentComputeRangeMap.set(b,I.delta(h))}clear(){this.computeRangeMap.clear(),this.adjacentComputeRangeMap.clear()}deleteRange(p){this.computeRangeMap.delete(p.id),this.adjacentComputeRangeMap.delete(p.id)}addRange(p,h){this.computeRangeMap.set(p.id,p),this.adjacentComputeRangeMap.set(p.id,h)}findNextOppositeRange(p){const h=this.ensureSort(this.adjacentComputeRangeMap.values());for(const b of h)if(b.id!==p.id&&b.isAfter(p))return b}findIncludeRange(p){const h=this.ensureSort(this.adjacentComputeRangeMap.values());for(const b of h)if(b.isInclude(p))return b}findTouchesRange(p,h=!0){const b=this.ensureSort(this.adjacentComputeRangeMap.values());for(const I of b)if(h?I.isTouches(p)||I.isContact(p):I.isTouches(p)&&!I.isContact(p))return I}};u=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[String])],u),e.DocumentMapping=u},96178:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InnerRange=void 0;const n=t(44781);class a extends n.Range{get isComplete(){return this._isComplete}get completeReason(){return this._completeReason}get turnDirection(){return this._turnDirection}static fromPositions(c,g=c){return new a(c.lineNumber,c.column,g.lineNumber,g.column)}setTurnDirection(c){return this._turnDirection=c,this}done(c){return this._isComplete=!0,this._completeReason=c,this}cancel(){return this._isComplete=!1,this._completeReason=void 0,this}get type(){return this._type}constructor(c,g,u,G){super(c,g,u,G),this._type="insert"}setType(c){return this._type=c,this}}e.InnerRange=a},75526:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;const n=t(43718),a=t(52451),o=t(88354),c=t(24093),g=t(96178);class u{constructor(){this._isLoading=!1,this._isComplete=!1,this._answerCode=""}setAnswerCode(b){return this._answerCode=b,this}setLoading(b){return this._isLoading=b,this}setIsComplete(b){return this._isComplete=b,this}get answerCode(){return this._answerCode}get isLoading(){return this._isLoading}get isComplete(){return this._isComplete}setAll(b,I=!0){return I?(this.reset(),this.setIsComplete(!!b.isComplete).setLoading(!!b.isLoading).setAnswerCode(b.answerCode||"")):(b.isComplete!==void 0&&this.setIsComplete(!!b.isComplete),b.isLoading!==void 0&&this.setLoading(!!b.isLoading),b.answerCode!==void 0&&this.setAnswerCode(b.answerCode)),this}reset(){this.setLoading(!1),this.setIsComplete(!1),this.setAnswerCode("")}}class G{constructor(){this.metaRanges=[]}get isMerge(){return this.metaRanges.length>0}get isAllowCombination(){const b=this.metaRanges.length;if(b<=1)return!1;let I=0;for(let r=0;r<b;r++){const l=this.metaRanges[I],s=this.metaRanges[r];if(l.id!==s.id){if(!s.isContact(l))return!1;I+=1}}return!0}add(b){return this.metaRanges.push(b),this}reset(){return this.metaRanges=[],this}has(b){return this.metaRanges.some(I=>I.id===b.id)}getMetaRanges(){return this.metaRanges}}class p extends a.LineRange{static fromPositions(b,I=b){return new p(b,I)}get id(){return this._id}get type(){return this._type}get isComplete(){return this._isComplete}get completeReason(){return this._completeReason}get turnDirection(){return this._turnDirection}get isMerge(){return this.mergeStateModel.isMerge}get isAllowCombination(){return this.mergeStateModel.isAllowCombination}get isConflictPoint(){return this.isMerge&&this.type==="modify"}constructor(b,I){super(b,I),this._isComplete=!1,this._id=(0,n.uuid)(6),this.mergeStateModel=new G,this.intelligentStateModel=new u}setId(b){return this._id=b,this}setTurnDirection(b){return this._turnDirection=b,this}done(b){return this._isComplete=!0,this._completeReason=b,this}cancel(){return this._isComplete=!1,this._completeReason=void 0,this}setMergeStateModel(b){return this.mergeStateModel=b,this}setIntelligentStateModel(b){return this.intelligentStateModel=b,this}getIntelligentStateModel(){return this.intelligentStateModel}setType(b){return this._type=b,this}isTendencyRight(b){return this.isEmpty&&!b.isEmpty}isTendencyLeft(b){return!this.isEmpty&&b.isEmpty}isAfter(b){return this.startLineNumber>=b.endLineNumberExclusive}isBefore(b){return b.startLineNumber>=this.endLineNumberExclusive}isTouches(b){return this.endLineNumberExclusive>=b.startLineNumber&&b.endLineNumberExclusive>=this.startLineNumber}isContact(b){return this.startLineNumber===b.endLineNumberExclusive||this.endLineNumberExclusive===b.startLineNumber}isInclude(b){return b instanceof p?this.startLineNumber<=b.startLineNumber&&this.endLineNumberExclusive>=b.endLineNumberExclusive:b instanceof g.InnerRange?this.isEmpty?!1:this.startLineNumber<=b.startLineNumber&&this.endLineNumberExclusive>=b.endLineNumber:!1}equals(b){return this.startLineNumber===b.startLineNumber&&this.length===b.length}get metaMergeRanges(){return this.mergeStateModel.getMetaRanges()}recordMergeRange(b){return this.mergeStateModel.add(b),this}merge(b,I=!0){return I&&(this.mergeStateModel.has(this)||this.recordMergeRange(this),this.recordMergeRange(b)),this.retainState(new p(Math.min(this.startLineNumber,b.startLineNumber),Math.max(this.endLineNumberExclusive,b.endLineNumberExclusive))).setTurnDirection(c.ETurnDirection.BOTH)}born(){const b=p.fromPositions(this.startLineNumber,this.endLineNumberExclusive),I=b.id;return this.retainState(b).setId(I)}toRange(b,I){return g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.endLineNumberExclusive,I??1)).setType(this._type)}toInclusiveRange(b,I){return this.isEmpty?g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.startLineNumber,I??1)).setType(this._type):g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.endLineNumberExclusive-1,I??1073741824)).setType(this._type)}retainState(b){const I=b.setId(this._id).setType(this._type).setTurnDirection(this._turnDirection).setMergeStateModel(this.mergeStateModel).setIntelligentStateModel(this.intelligentStateModel);return this._isComplete?I.done(this._completeReason):I.cancel(),I}delta(b){return this.retainState(new p(this.startLineNumber+b,this.endLineNumberExclusive+b))}deltaStart(b){return this.retainState(new p(this.startLineNumber+b,this.endLineNumberExclusive))}deltaEnd(b){return this.retainState(new p(this.startLineNumber,this.endLineNumberExclusive+b))}}e.LineRange=p},69972:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyPieceModel=void 0;class t{get width(){return this._width}get height(){return this._height}get path(){return this._path}get position(){return this._position}get rangeType(){return this._rangeType}get isComplete(){return this._isComplete}constructor(a,o,c,g,u,G){this._width=a,this._height=o,this._path=c,this._position=g,this._rangeType=u,this._isComplete=!!G,this.rawData=Object.freeze({rangeType:u,width:a,height:o,position:g,path:c})}calcHeight(a,o){const{leftTop:c,rightTop:g,leftBottom:u,rightBottom:G}=this.rawData.path,p=Math.min(c-a,g-o),h=Math.max(u-a,G-o);return Math.abs(h-p)}calcPath(a,o){const{path:c}=this.rawData,g=c.leftTop-a,u=c.rightTop-o,G=Math.max(0,g-u),p=Math.max(0,u-g),h=Math.min(this.height,G+(c.leftBottom-c.leftTop)),b=Math.min(this.height,p+(c.rightBottom-c.rightTop));return{leftTop:G,rightTop:p,leftBottom:h,rightBottom:b}}movePosition(a,o){const c=this.rawData.position.top,{leftTop:g,rightTop:u}=this.rawData.path,G=c+Math.min(g-a,u-o);return this._position={top:G},this._height=this.calcHeight(a,o),this._path=this.calcPath(a,o),this}}e.StickyPieceModel=t},81413:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeMachineDocument=void 0;class t{constructor(){this.collectMap=new Map}record(a,o){this.collectMap.has(a)||this.collectMap.set(a,o)}getMetaData(a){return this.collectMap.get(a)}}e.TimeMachineDocument=t},34239:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findRangeForNavigation=e.NavigationDirection=void 0;const a=t(85608).__importStar(t(33096));var o;(function(g){g[g.Forwards=0]="Forwards",g[g.Backwards=1]="Backwards"})(o=e.NavigationDirection||(e.NavigationDirection={}));function c(g,u,G){if(!u||u.length===0||!G)return null;if(u.length===1)return u[0].containsPosition(G)?{canNavigate:!1}:{canNavigate:!0,range:u[0]};let p,h,b;if(g===o.Forwards)p=I=>a.Position.isBefore(G,I.getStartPosition()),h=()=>u[0],b=u;else if(g===o.Backwards)p=I=>a.Position.isBefore(I.getStartPosition(),G),h=()=>u[u.length-1],b=u.slice().reverse();else throw new Error(`Unsupported direction ${g}`);for(const I of b)if(p(I)&&!I.containsPosition(G))return{canNavigate:!0,range:I};return{canNavigate:!0,range:h()}}e.findRangeForNavigation=c},24093:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIResolveConflictContentWidget=e.ADDRESSING_TAG_CLASSNAME=e.CONFLICT_ACTIONS_ICON=e.AI_RESOLVE_REGENERATE_ACTIONS=e.AI_RESOLVE_ACTIONS=e.APPEND_ACTIONS=e.REVOKE_ACTIONS=e.IGNORE_ACTIONS=e.ACCEPT_COMBINATION_ACTIONS=e.ACCEPT_CURRENT_ACTIONS=e.DECORATIONS_CLASSNAME=e.EDiffRangeTurn=e.EditorViewType=e.ETurnDirection=e.ECompleteReason=void 0;const n=t(85608),a=t(41869),o=n.__importDefault(t(89543));var c;(function(b){b.UserManual="user_manual",b.AIResolved="ai_resolved",b.AutoResolvedNonConflictBeforeRunAI="auto_resolved_non_conflict_before_run_ai",b.AutoResolvedNonConflict="auto_resolved_non_conflict"})(c=e.ECompleteReason||(e.ECompleteReason={}));var g;(function(b){b.BOTH="both",b.CURRENT="current",b.INCOMING="incoming"})(g=e.ETurnDirection||(e.ETurnDirection={}));var u;(function(b){b.CURRENT="current",b.RESULT="result",b.INCOMING="incoming"})(u=e.EditorViewType||(e.EditorViewType={}));var G;(function(b){b.ORIGIN="origin",b.MODIFIED="modified"})(G=e.EDiffRangeTurn||(e.EDiffRangeTurn={}));var p;(function(b){b.combine=(...I)=>I.reduce((r,l)=>r+" "+l," "),b.conflict_wrap=o.default.conflict_wrap,b.stretch_top=o.default.stretch_top,b.stretch_bottom=o.default.stretch_bottom,b.stretch_left=o.default.stretch_left,b.stretch_right=o.default.stretch_right,b.margin_className=o.default.merge_editor_margin_className,b.diff_line_background=o.default.merge_editor_diff_line_background,b.diff_inner_char_background=o.default.merge_editor_diff_inner_char_background,b.guide_underline_widget=o.default.merge_editor_guide_underline_widget,b.offset_right=o.default.offset_right,b.offset_left=o.default.offset_left,b.rotate_turn_left=o.default.rotate_turn_left,b.rotate_turn_right=o.default.rotate_turn_right,b.ai_resolve_icon=o.default.ai_resolve_icon,b.ai_resolve_loading_icon=o.default.ai_resolve_loading_icon,b.ai_resolve_complete=o.default.ai_resolve_complete,b.ai_resolve_complete_lines_decorations=o.default.ai_resolve_complete_lines_decorations,b.range_type={insert:o.default.insert,modify:o.default.modify,remove:o.default.remove},b.dashed=o.default.dashed})(p=e.DECORATIONS_CLASSNAME||(e.DECORATIONS_CLASSNAME={})),e.ACCEPT_CURRENT_ACTIONS="accpet_current",e.ACCEPT_COMBINATION_ACTIONS="accpet_combination",e.IGNORE_ACTIONS="ignore",e.REVOKE_ACTIONS="revoke",e.APPEND_ACTIONS="append",e.AI_RESOLVE_ACTIONS="ai_resolve",e.AI_RESOLVE_REGENERATE_ACTIONS="ai_regenerate_resolve";var h;(function(b){const I=o.default.conflict_actions;b.RIGHT=`${I} ${e.ACCEPT_CURRENT_ACTIONS} ${(0,a.getIcon)("doubleright")}`,b.ROTATE_RIGHT=`${I} ${e.APPEND_ACTIONS} ${p.rotate_turn_right} ${(0,a.getIcon)("doubleright")}`,b.LEFT=`${I} ${e.ACCEPT_CURRENT_ACTIONS} ${(0,a.getIcon)("doubleleft")}`,b.ROTATE_LEFT=`${I} ${e.APPEND_ACTIONS} ${p.rotate_turn_left} ${(0,a.getIcon)("doubleleft")}`,b.WAND=`${I} ${e.ACCEPT_COMBINATION_ACTIONS} ${(0,a.getExternalIcon)("wand")}`,b.CLOSE=`${I} ${e.IGNORE_ACTIONS} ${(0,a.getIcon)("close")}`,b.REVOKE=`${I} ${e.REVOKE_ACTIONS} ${(0,a.getIcon)("revoke")}`,b.AI_RESOLVE=`${I} ${e.AI_RESOLVE_ACTIONS} ${p.ai_resolve_icon} ${(0,a.getIcon)("magic-wand")}`,b.AI_RESOLVE_LOADING=`${I} ${p.ai_resolve_loading_icon} ${(0,a.getIcon)("loading")}`})(h=e.CONFLICT_ACTIONS_ICON||(e.CONFLICT_ACTIONS_ICON={})),e.ADDRESSING_TAG_CLASSNAME="ADDRESSING_TAG_CLASSNAME_",e.AIResolveConflictContentWidget="ai-resolve-conflict-content-widget"},66245:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsManager=void 0;const n=t(85608),a=t(76003),o=t(38070),c=t(43718),g=t(19582),u=t(88354),G=t(93961),p=t(96178),h=t(75526),b=t(24093),I=n.__importDefault(t(89543));let r=class extends c.Disposable{constructor(s,d){super(),this.mappingManagerService=s,this.mergeConflictReportService=d}applyLineRangeEdits(s){if(!this.resultView)return;const d=this.resultView.getModel(),m=d.getEOL();if(!d)return;const v=d.getLineCount();d.applyEdits(s.map(f=>{const{range:N,text:W}=f;return N.endLineNumberExclusive<=v?{range:N.toRange(),text:W?W+m:null}:N.startLineNumber===1?{range:p.InnerRange.fromPositions(new u.Position(1,1),new u.Position(v,Number.MAX_SAFE_INTEGER)),text:W?W+m:null}:{range:p.InnerRange.fromPositions(new u.Position(N.startLineNumber-1,Number.MAX_SAFE_INTEGER),new u.Position(v,Number.MAX_SAFE_INTEGER)),text:W?m+W:null}}),!1)}pickMapping(s){switch(s.turnDirection){case b.ETurnDirection.BOTH:return;case b.ETurnDirection.CURRENT:return this.mappingManagerService.documentMappingTurnLeft;case b.ETurnDirection.INCOMING:return this.mappingManagerService.documentMappingTurnRight}}pickViewEditor(s){switch(s.turnDirection){case b.ETurnDirection.INCOMING:return this.incomingView;case b.ETurnDirection.CURRENT:return this.currentView;default:return this.resultView}}handleAcceptChange(s,d,m){var v,f,N;const W=this.pickMapping(s);if(!W)return;const y=this.pickViewEditor(s).getModel(),E=y.getEOL(),R=y.getValueInRange(s.toInclusiveRange()),A=W.adjacentComputeRangeMap.get(s.id);A&&(this.applyLineRangeEdits(d(s,A,{applyText:R,eol:E})),this.markComplete(s,m),A.isMerge&&((v=this.currentView)===null||v===void 0||v.updateActions(),(f=this.incomingView)===null||f===void 0||f.updateActions()),(N=this.resultView)===null||N===void 0||N.updateActions())}handleAcceptRevoke(s){var d,m,v,f;const{turnDirection:N}=s,W=this.pickViewEditor(s),Z=this.resultView.getContentInTimeMachineDocument(s.id);if(!Z)return;switch(N){case b.ETurnDirection.CURRENT:this.mappingManagerService.revokeActionsTurnLeft(s);break;case b.ETurnDirection.INCOMING:this.mappingManagerService.revokeActionsTurnRight(s);break;case b.ETurnDirection.BOTH:this.mappingManagerService.revokeActionsTurnLeft(s),this.mappingManagerService.revokeActionsTurnRight(s);break}const{text:y}=Z;this.applyLineRangeEdits([{range:s,text:y}]),(d=this.resultView)===null||d===void 0||d.changeRangeIntelligentState(s,{},!0),(m=this.resultView)===null||m===void 0||m.updateActions(),N===b.ETurnDirection.BOTH?((v=this.incomingView)===null||v===void 0||v.updateDecorations().updateActions(),(f=this.currentView)===null||f===void 0||f.updateDecorations().updateActions()):W.updateDecorations().updateActions()}handleAcceptCombination(s,d){var m;const v=this.mappingManagerService.documentMappingTurnLeft.reverse(s),f=this.mappingManagerService.documentMappingTurnRight.reverse(s);if(!v||!f)return;const[N,W]=[v.metaMergeRanges,f.metaMergeRanges],[Z,y]=[new Set(N).values(),new Set(W).values()];let E=N[0].startLineNumber===v.startLineNumber?0:1;const R=N.length+W.length;let A="";Array.from({length:R}).forEach((w,F)=>{const Y=(E===0?this.currentView:this.incomingView).getModel(),_=F===R-1?"":Y.getEOL(),{value:H}=E===0?Z.next():y.next();A+=Y.getValueInRange(H.toRange())+_,E^=1}),this.applyLineRangeEdits([{text:A,range:s}]),this.markComplete(v,d),this.markComplete(f,d),(m=this.resultView)===null||m===void 0||m.updateActions()}async handleAIConflictResolve(s,d){var m,v,f,N;if(!this.resultView||!this.resultView.getModel())return;const Z=this.mappingManagerService.documentMappingTurnLeft.reverse(s),y=this.mappingManagerService.documentMappingTurnRight.reverse(s);if(!Z||!y)return;this.resultView.changeRangeIntelligentState(s,{isLoading:!0},!1),this.resultView.updateDecorations().updateActions();const E=this.resultView.renderSkeletonDecoration(s,[I.default.skeleton_decoration,I.default.skeleton_decoration_background]),R=this.resultView.getContentInTimeMachineDocument(s.id);if(!R)return;const A=R.text,w=(v=(m=this.currentView)===null||m===void 0?void 0:m.getModel())===null||v===void 0?void 0:v.getValueInRange(Z.toInclusiveRange()),F=(N=(f=this.incomingView)===null||f===void 0?void 0:f.getModel())===null||N===void 0?void 0:N.getValueInRange(y.toInclusiveRange());this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"clickNum");const V=await this.resultView.requestAIResolveConflict({base:A||"",current:w||"",incoming:F||""},s,!!d?.isRegenerate);if(this.resultView.changeRangeIntelligentState(s,{isLoading:!1},!1),E(),c.ReplyResponse.is(V)){const Y=V.message;return this.resultView.changeRangeIntelligentState(s,{isComplete:!0,answerCode:Y},!0),this.applyLineRangeEdits([{range:s,text:Y}]),this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"aiOutputNum"),this.resultView.updateDecorations().updateActions(),{isSuccess:!0,isCancel:!1,errorCode:0,errorMsg:""}}return this.resultView.updateDecorations().updateActions(),c.CancelResponse.is(V)?(this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"cancelNum"),{isSuccess:!1,isCancel:!0,errorCode:0,errorMsg:""}):c.ErrorResponse.is(V)?{isSuccess:!1,isCancel:!1,errorCode:V.error||0,errorMsg:V.message||""}:{isSuccess:!1,isCancel:!1,errorCode:0,errorMsg:""}}markComplete(s,d){const{turnDirection:m}=s;switch(m){case b.ETurnDirection.CURRENT:{this.mappingManagerService.markCompleteTurnLeft(s,d),this.currentView.updateDecorations().updateActions();break}case b.ETurnDirection.INCOMING:{this.mappingManagerService.markCompleteTurnRight(s,d),this.incomingView.updateDecorations().updateActions();break}}}initListenEvent(){!this.currentView||!this.resultView||!this.incomingView||(this.addDispose(c.Event.any(this.currentView.onDidActionsProvider,this.resultView.onDidActionsProvider,this.incomingView.onDidActionsProvider)(({provider:s,editor:d})=>{const{provideActionsItems:m}=s;d.setConflictActions(m.call(d))})),this.addDispose(c.Event.any(this.currentView.onDidConflictActions,this.resultView.onDidConflictActions,this.incomingView.onDidConflictActions)(async({range:s,action:d,reason:m})=>{var v;switch(d){case b.ACCEPT_CURRENT_ACTIONS:this.handleAcceptChange(s,(f,N,{applyText:W})=>[{range:N,text:W}],m);break;case b.IGNORE_ACTIONS:this.markComplete(s,m),(v=this.resultView)===null||v===void 0||v.updateActions();break;case b.REVOKE_ACTIONS:this.handleAcceptRevoke(s);break;case b.ACCEPT_COMBINATION_ACTIONS:this.handleAcceptCombination(s,m);break;case b.APPEND_ACTIONS:this.handleAcceptChange(s,(f,N,{applyText:W,eol:Z})=>[{range:h.LineRange.fromPositions(N.endLineNumberExclusive,N.endLineNumberExclusive),text:W}],m);break;case b.AI_RESOLVE_ACTIONS:case b.AI_RESOLVE_REGENERATE_ACTIONS:if(this.resultView){const f=this.resultView.getFlushRange(s)||s;await this.handleAIConflictResolve(f,{isRegenerate:d===b.AI_RESOLVE_REGENERATE_ACTIONS})}break}this.resultView&&this.resultView.updateDecorations(),this.currentView&&this.currentView.launchChange(),this.incomingView&&this.incomingView.launchChange()})))}mount(s,d,m){this.currentView=s,this.resultView=d,this.incomingView=m;const v=(f,N)=>{const W=N.actionsProvider;if(!W)return;let{mouseDownGuard:Z}=W;const{onActionsClick:y}=W;if(typeof Z>"u"&&(Z=E=>{if(E.event.rightButton||E.target.type!==g.MouseTargetType.GUTTER_LINE_DECORATIONS)return!1;const{element:R}=E.target;return!!R?.className.includes(b.ADDRESSING_TAG_CLASSNAME)}),Z(f)&&y){const E=f.target.element,{classList:R}=E,A=Array.from(R).find(w=>w.startsWith(b.ADDRESSING_TAG_CLASSNAME));if(A){const w=A.replace(b.ADDRESSING_TAG_CLASSNAME,""),F=N.conflictActions.getAction(w);let V;const Y=[b.ACCEPT_CURRENT_ACTIONS,b.ACCEPT_COMBINATION_ACTIONS,b.IGNORE_ACTIONS,b.REVOKE_ACTIONS,b.APPEND_ACTIONS,b.AI_RESOLVE_ACTIONS];for(const _ of Y)if(R.contains(_)){V=_;break}V&&F&&y.call(N,F.range,V)}}};this.addDispose(s.getEditor().onMouseDown(f=>v(f,s))),this.addDispose(m.getEditor().onMouseDown(f=>v(f,m))),this.addDispose(d.getEditor().onMouseDown(f=>v(f,d))),this.initListenEvent()}};r=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__metadata("design:paramtypes",[G.MappingManagerService,o.MergeConflictReportService])],r),e.ActionsManager=r},66076:(L,e,t)=>{"use strict";var n,a;Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCodeEditor=void 0;const o=t(85608),c=t(43718),g=t(31324),u=t(93961),G=t(91376),p=t(98025),h=t(24093);class b extends c.Disposable{constructor(r,l,s){super(),this.container=r,this.monacoService=l,this.injector=s,n.set(this,void 0),a.set(this,void 0),this._onDidConflictActions=new c.Emitter,this.onDidConflictActions=this._onDidConflictActions.event,this._onDidActionsProvider=new c.Emitter,this.onDidActionsProvider=this._onDidActionsProvider.event,this.mount()}launchConflictActionsEvent(r){this._onDidConflictActions.fire(r)}dispose(){super.dispose(),this.editor.dispose(),this.decorations.dispose(),o.__classPrivateFieldGet(this,a,"f").dispose()}mount(){this.editor=this.monacoService.createCodeEditor(this.container),this.updateOptions({}),this.decorations=this.injector.get(p.MergeEditorDecorations,[this,this.getEditorViewType()]),o.__classPrivateFieldSet(this,a,this.injector.get(G.ConflictActions,[this]),"f"),this.mappingManagerService=this.injector.get(u.MappingManagerService),this.addDispose(c.Event.debounce(c.Event.any(this.decorations.onDidChangeDecorations,this.editor.onDidLayoutChange),()=>{},0)(()=>{const r=this.editor.getOption(g.EditorOption.lineDecorationsWidth),s=this.editor.getLayoutInfo().contentLeft-(typeof r=="number"?r:0),d=this.decorations.getLineWidgets();d.length>0&&d.forEach(m=>{m&&m.setContainerStyle({left:s+"px"})})}))}get onDidChangeDecorations(){return this.decorations.onDidChangeDecorations}getEditor(){return this.editor}getModel(){return this.editor.getModel()}launchChange(){this.decorations.launchChange()}prepareRenderDecorations(r=0){const[l,s]=r===0?[this.documentMapping.getModifiedRange(),this.documentMapping.getOriginalRange()]:[this.documentMapping.getOriginalRange(),this.documentMapping.getModifiedRange()],d=[],m=[];return l.forEach((v,f)=>{var N;const W=s[f];W&&(y=>{var E,R;const A=r===1?h.ETurnDirection.CURRENT:h.ETurnDirection.INCOMING;W.setType(y).setTurnDirection((E=W.turnDirection)!==null&&E!==void 0?E:A),d.push(v.setType(y).setTurnDirection((R=v.turnDirection)!==null&&R!==void 0?R:A))})((N=v.type)!==null&&N!==void 0?N:v.isTendencyRight(W)?"remove":v.isTendencyLeft(W)?"insert":"modify")}),[d,m]}updateOptions(r){this.editor.updateOptions(Object.assign(Object.assign(Object.assign({},r),{automaticLayout:!0,wordBasedSuggestions:!0,renderLineHighlight:"all",folding:!1,lineNumbersMinChars:0,minimap:{enabled:!1},codeLens:!1,scrollBeyondLastLine:!0}),this.getMonacoEditorOptions()))}updateActions(){return this.conflictActions.updateActions(this.provideActionsItems()),this}updateDecorations(){const[r,l]=this.prepareRenderDecorations();return this.decorations.updateDecorations(r,l),this}registerActionsProvider(r){o.__classPrivateFieldGet(this,n,"f")||(o.__classPrivateFieldSet(this,n,r,"f"),this._onDidActionsProvider.fire({provider:r,editor:this}))}setConflictActions(r){o.__classPrivateFieldGet(this,a,"f").setActions(r)}get actionsProvider(){return o.__classPrivateFieldGet(this,n,"f")}get conflictActions(){return o.__classPrivateFieldGet(this,a,"f")}clearActions(r){this.conflictActions.clearActions(r.id)}clearDecorations(){this.decorations.clearDecorations()}getUri(){var r;return(r=this.getModel())===null||r===void 0?void 0:r.uri.path.toString()}}e.BaseCodeEditor=b,n=new WeakMap,a=new WeakMap},51472:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentCodeEditor=void 0;const n=t(85608),a=t(76003),o=t(19582),c=t(57762),g=t(24093),u=t(66076);let G=class extends u.BaseCodeEditor{get documentMapping(){return this.mappingManagerService.documentMappingTurnLeft}getMonacoEditorOptions(){return{readOnly:!0,lineNumbersMinChars:5}}prepareRenderDecorations(){return super.prepareRenderDecorations(1)}provideActionsItems(){return this.documentMapping.getOriginalRange().filter(b=>!b.isComplete).map(b=>{const I=`${g.ADDRESSING_TAG_CLASSNAME}${b.id}`;let r=g.CONFLICT_ACTIONS_ICON.RIGHT;if(b.isMerge){const l=this.documentMapping.adjacentComputeRangeMap.get(b.id);l&&l.isComplete&&(r=g.CONFLICT_ACTIONS_ICON.ROTATE_RIGHT)}return{range:b,decorationOptions:{glyphMarginClassName:g.DECORATIONS_CLASSNAME.combine(r,g.DECORATIONS_CLASSNAME.offset_left,I),marginClassName:g.DECORATIONS_CLASSNAME.combine(g.CONFLICT_ACTIONS_ICON.CLOSE,I)}}})}getMonacoDecorationOptions(h,b){return{marginClassName:g.DECORATIONS_CLASSNAME.combine(g.DECORATIONS_CLASSNAME.margin_className,g.DECORATIONS_CLASSNAME.range_type[b.type],g.DECORATIONS_CLASSNAME.stretch_right,g.DECORATIONS_CLASSNAME.stretch_left),className:g.DECORATIONS_CLASSNAME.combine(h.className||"",g.DECORATIONS_CLASSNAME.stretch_right)}}getEditorViewType(){return g.EditorViewType.CURRENT}launchConflictActionsEvent(h){super.launchConflictActionsEvent(Object.assign(Object.assign({},h),{withViewType:g.EditorViewType.CURRENT}))}inputDiffComputingResult(h){this.mappingManagerService.inputComputeResultRangeMappingTurnLeft(h),this.updateDecorations(),this.registerActionsProvider({provideActionsItems:this.provideActionsItems,mouseDownGuard:b=>!(b.target.type!==o.MouseTargetType.UNKNOWN||b.event.rightButton||!b.target.element),onActionsClick:(b,I)=>{(I===g.ACCEPT_CURRENT_ACTIONS||I===g.IGNORE_ACTIONS||I===g.APPEND_ACTIONS)&&this.launchConflictActionsEvent({range:b,action:I,reason:g.ECompleteReason.UserManual})}}),requestAnimationFrame(()=>{this.layout()})}layout(){const h=this.getEditor(),b=h.getDomNode();if(b){const I=b.querySelector("."+c.Margin.OUTER_CLASS_NAME),r=h?._modelData.hasRealView?h?._modelData.view._scrollbar.scrollbarDomNode.domNode:null;I&&r&&(I.style.right="0px",r.style.left="0px")}}};G=n.__decorate([(0,a.Injectable)({multiple:!0})],G),e.CurrentCodeEditor=G},66557:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IncomingCodeEditor=void 0;const n=t(85608),a=t(76003),o=t(24093),c=t(66076);let g=class extends c.BaseCodeEditor{get documentMapping(){return this.mappingManagerService.documentMappingTurnRight}getMonacoEditorOptions(){return{readOnly:!0,lineDecorationsWidth:42}}provideActionsItems(){return this.documentMapping.getModifiedRange().filter(p=>!p.isComplete).map(p=>{const h=`${o.ADDRESSING_TAG_CLASSNAME}${p.id}`;let b=o.CONFLICT_ACTIONS_ICON.LEFT;if(p.isMerge){const I=this.documentMapping.adjacentComputeRangeMap.get(p.id);I&&I.isComplete&&(b=o.CONFLICT_ACTIONS_ICON.ROTATE_LEFT)}return{range:p,decorationOptions:{glyphMarginClassName:o.DECORATIONS_CLASSNAME.combine(o.CONFLICT_ACTIONS_ICON.CLOSE,o.DECORATIONS_CLASSNAME.offset_right,h),firstLineDecorationClassName:o.DECORATIONS_CLASSNAME.combine(b,h)}}})}getMonacoDecorationOptions(G){return{linesDecorationsClassName:o.DECORATIONS_CLASSNAME.combine(o.DECORATIONS_CLASSNAME.stretch_right,o.DECORATIONS_CLASSNAME.stretch_left,G.className||""),className:o.DECORATIONS_CLASSNAME.combine(o.DECORATIONS_CLASSNAME.stretch_left,G.className||"")}}getEditorViewType(){return o.EditorViewType.INCOMING}launchConflictActionsEvent(G){super.launchConflictActionsEvent(Object.assign(Object.assign({},G),{withViewType:o.EditorViewType.INCOMING}))}inputDiffComputingResult(G){this.mappingManagerService.inputComputeResultRangeMappingTurnRight(G),this.updateDecorations(),this.registerActionsProvider({provideActionsItems:this.provideActionsItems,onActionsClick:(p,h)=>{(h===o.ACCEPT_CURRENT_ACTIONS||h===o.IGNORE_ACTIONS||h===o.APPEND_ACTIONS)&&this.launchConflictActionsEvent({range:p,action:h,reason:o.ECompleteReason.UserManual})}})}};g=n.__decorate([(0,a.Injectable)({multiple:!0})],g),e.IncomingCodeEditor=g},23600:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultCodeEditor=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(38070),u=t(43718),G=t(72665),p=t(88354),h=t(15194),b=t(83e3),I=t(18895),r=t(5863),l=t(23773),s=t(89995),d=t(96178),m=t(75526),v=t(81413),f=t(34239),N=t(24093),W=t(67641),Z=t(92572),y=t(80922),E=t(66076),R=w=>new p.Position(Math.max(w.startLineNumber,w.endLineNumberExclusive-1),1);let A=class extends E.BaseCodeEditor{getMonacoEditorOptions(){return{lineNumbersMinChars:2,lineDecorationsWidth:24}}constructor(F,V,Y){super(F,V,Y),this._onDidChangeContent=new c.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this._onChangeRangeIntelligentState=new c.Emitter,this.onChangeRangeIntelligentState=this._onChangeRangeIntelligentState.event,this.cancelIndicatorMap=new Map,this.supportAIConflictResolve=!1,this.isFirstInputComputeDiff=!0,this.timeMachineDocument=Y.get(v.TimeMachineDocument,[]),this.initListenEvent(),this.resolveResultWidgetManager=new W.WidgetFactory(Z.ResolveResultWidget,this,this.injector,R),this.stopWidgetManager=new W.WidgetFactory(y.StopWidget,this,this.injector,R),this.aiNativeConfigService.capabilities.supportsConflictResolve&&(this.aiBackService=Y.get(u.AIBackSerivcePath),this.resolveConflictRegistry=Y.get(u.ResolveConflictRegistryToken),this.supportAIConflictResolve=!0)}hideResolveResultWidget(F){F?this.resolveResultWidgetManager.hideWidget(F):this.resolveResultWidgetManager.hideAll()}hideStopWidget(F){F?this.stopWidgetManager.hideWidget(F):this.stopWidgetManager.hideAll()}renderSkeletonDecoration(F,V){var Y;const _=X=>({range:d.InnerRange.fromPositions(new p.Position(F.startLineNumber,1),new p.Position(Math.max(F.startLineNumber,F.endLineNumberExclusive-1),1)),options:{isWholeLine:!0,description:"skeleton",className:X}}),H=(Y=this.getModel())===null||Y===void 0?void 0:Y.deltaDecorations([],V.map(X=>_(X)));return()=>{var X;H&&((X=this.getModel())===null||X===void 0||X.deltaDecorations(H,[]))}}async requestAIResolveConflict(F,V,Y=!1){if(!this.resolveConflictRegistry)return;const _=this.resolveConflictRegistry.getThreeWayHandler();if(!_)return;if(Y){const X=this.getModel().getValueInRange(V.toRange());F.resultContent=X}return await _.providerRequest(F,{isRegenerate:Y},this.createRequestToken(V.id).token)}createRequestToken(F){const V=new c.CancellationTokenSource;return this.cancelIndicatorMap.set(F,V),V}cancelRequestToken(F){if(F){if(!this.cancelIndicatorMap.has(F))return;const V=this.cancelIndicatorMap.get(F);V?.cancel();return}this.cancelIndicatorMap.forEach(V=>{V.cancel()}),this.cancelIndicatorMap.clear()}changeRangeIntelligentState(F,V,Y=!0){F.getIntelligentStateModel().setAll(V,Y),this._onChangeRangeIntelligentState.fire(F)}getFlushRange(F){const V=F.id;return this.mappingManagerService.getAllDiffRanges().find(_=>_.id===V)}async formatDocument(F){const V={scrollTop:this.editor.getScrollTop(),scrollLeft:this.editor.getScrollLeft()};await b.StandaloneServices.get(I.IInstantiationService).invokeFunction(h.formatDocumentRangesWithSelectedProvider,this.getModel(),F.toInclusiveRange(),h.FormattingMode.Explicit,r.Progress.None,c.CancellationToken.None,!0),(0,c.runWhenIdle)(()=>{this.editor.setScrollPosition(V)})}initListenEvent(){let F=0;this.addDispose(this.editor.onDidChangeModel(()=>{const V=this.editor.getModel();V&&(F=V.getLineCount()),this.hideResolveResultWidget()})),this.supportAIConflictResolve&&this.addDispose(this.editor.onMouseMove((0,a.default)(V=>{const{target:Y}=V;if(Y.type===l.editor.MouseTargetType.GUTTER_LINE_DECORATIONS){this.hideResolveResultWidget();return}const _=Y.position;if(!_)return;const H=this.mappingManagerService.getAllDiffRanges(),X=m.LineRange.fromPositions(_.lineNumber);if(H.some(Q=>Q.isTouches(X))){const Q=H.find(M=>M.isTouches(X));if(!Q)return;Q.getIntelligentStateModel().isComplete?this.resolveResultWidgetManager.addWidget(Q):this.hideResolveResultWidget(Q.id)}else this.hideResolveResultWidget()},10))),this.addDispose(this.editor.onDidChangeModelContent(async V=>{const Y=this.editor.getModel();if(Y&&Y.getLineCount()!==F){F=Y.getLineCount();const{changes:_,eol:H}=V,X=[];_.forEach(S=>{var Q;const{text:O,range:M}=S,T=((Q=O.match(new RegExp(H,"ig")))!==null&&Q!==void 0?Q:[]).length,{startLineNumber:B,endLineNumber:x}=M,D=B-x+T;D!==0&&X.push({startLineNumber:B,endLineNumber:x,offset:D})}),X.forEach(S=>{const{startLineNumber:Q,endLineNumber:O,offset:M}=S,T=m.LineRange.fromPositions(Q,O+Math.max(0,M)),{[N.EditorViewType.CURRENT]:B,[N.EditorViewType.INCOMING]:x}=this.mappingManagerService.findIncludeRanges(T),{[N.EditorViewType.CURRENT]:D,[N.EditorViewType.INCOMING]:J}=this.mappingManagerService.findTouchesRanges(T),{[N.EditorViewType.CURRENT]:k,[N.EditorViewType.INCOMING]:z}=this.mappingManagerService.findNextLineRanges(T);if(B)this.mappingManagerService.documentMappingTurnLeft.deltaEndAdjacentQueue(B,M);else if(D)this.mappingManagerService.documentMappingTurnLeft.deltaEndAdjacentQueue(D,M);else if(k){const P=this.mappingManagerService.documentMappingTurnLeft.reverse(k);P&&this.mappingManagerService.documentMappingTurnLeft.deltaAdjacentQueueAfter(P,M,!0)}if(x)this.mappingManagerService.documentMappingTurnRight.deltaEndAdjacentQueue(x,M);else if(J)this.mappingManagerService.documentMappingTurnRight.deltaEndAdjacentQueue(J,M);else if(z){const P=this.mappingManagerService.documentMappingTurnRight.reverse(z);P&&this.mappingManagerService.documentMappingTurnRight.deltaAdjacentQueueAfter(P,M,!0)}}),this._onDidChangeContent.fire()}}))}provideActionsItems(F){if(!Array.isArray(F))return[];const V=Y=>{if(Y.isComplete)return N.CONFLICT_ACTIONS_ICON.REVOKE;if(this.supportAIConflictResolve&&Y.type==="modify"){const _=Y.getIntelligentStateModel();if(_.isLoading)return N.CONFLICT_ACTIONS_ICON.AI_RESOLVE_LOADING;if(_.isComplete)return N.CONFLICT_ACTIONS_ICON.REVOKE;if(Y.isMerge)return N.CONFLICT_ACTIONS_ICON.AI_RESOLVE}return Y.isAllowCombination&&Y.isMerge?N.CONFLICT_ACTIONS_ICON.WAND:""};return F.map(Y=>({range:Y,decorationOptions:{firstLineDecorationClassName:N.DECORATIONS_CLASSNAME.combine(V(Y),`${N.ADDRESSING_TAG_CLASSNAME}${Y.id}`)}}))}distillNeedMergeRanges(F){var V;const Y=new Map,_=F.length;let H=0,X;F.sort((S,Q)=>S.startLineNumber-Q.startLineNumber);for(let S=0;S<_;S++){const Q=F[H],O=F[S];if(Q.id!==O.id){if(X){X.isTouches(O)?(X=X.merge(O),Y.set(H,{rawRanges:(((V=Y.get(H))===null||V===void 0?void 0:V.rawRanges)||[]).concat(O),mergeRange:X})):(X=void 0,H=S);continue}else if(Q.isTouches(O)){X=Q.merge(O),Y.set(H,{rawRanges:[Q,O],mergeRange:X});continue}H+=1}}return Array.from(Y.values())}handleNeedMergeRanges(F){const V=Y=>Y.turnDirection===N.ETurnDirection.CURRENT?this.mappingManagerService.documentMappingTurnLeft:this.mappingManagerService.documentMappingTurnRight;for(let{rawRanges:Y,mergeRange:_}of F){const H=Y.length;if(H<=1)continue;Y=Y.sort((M,T)=>M.startLineNumber===T.startLineNumber?M.endLineNumberExclusive-T.endLineNumberExclusive:M.startLineNumber-T.startLineNumber);const X=Y[1],S=Y[H-2];let Q,O;for(const M of Y){const T=V(M),B=T.reverse(M);let x=B;x&&(M.id===X.id&&(x=x.deltaStart(Math.min(0,Y[0].startLineNumber-X.startLineNumber)).deltaEnd(Math.max(0,S.endLineNumberExclusive-Y[H-1].endLineNumberExclusive))),M.id===S.id&&(x=x.deltaEnd(Math.max(0,Y[H-1].endLineNumberExclusive-S.endLineNumberExclusive))),M.turnDirection===N.ETurnDirection.CURRENT&&(Q=(Q?Q.merge(x,!1):x).recordMergeRange(B)),M.turnDirection===N.ETurnDirection.INCOMING&&(O=(O?O.merge(x,!1):x).recordMergeRange(B)),T.deleteRange(x))}if(Q){const M=Q.setTurnDirection(N.ETurnDirection.CURRENT).setType("modify");this.mappingManagerService.documentMappingTurnLeft.addRange(M,_)}if(O){const M=O.setTurnDirection(N.ETurnDirection.INCOMING).setType("modify");this.mappingManagerService.documentMappingTurnRight.addRange(M,_)}}}getDiffRangesAfterDistill(){let F=this.mappingManagerService.getAllDiffRanges();if(this.isFirstInputComputeDiff){const V=this.distillNeedMergeRanges(F);this.handleNeedMergeRanges(V),F=this.mappingManagerService.getAllDiffRanges(),this.isFirstInputComputeDiff=!1}return F}prepareRenderDecorations(){const F=[],V=this.getDiffRangesAfterDistill();let Y=0,_=0,H=0,X=0,S=0,Q=0,O=0,M=!1;return V.forEach(T=>{if(T.isComplete)switch(T.completeReason){case N.ECompleteReason.AIResolved:case N.ECompleteReason.UserManual:if(T.isConflictPoint){Y++,H++;break}M=!0;case N.ECompleteReason.AutoResolvedNonConflictBeforeRunAI:case N.ECompleteReason.AutoResolvedNonConflict:switch(X++,T.turnDirection){case N.ETurnDirection.CURRENT:S++;break;case N.ETurnDirection.INCOMING:Q++;break;case N.ETurnDirection.BOTH:O++;break}break}else T.isConflictPoint?Y++:_++}),this.dataStore.updateConflictsCount({total:Y,resolved:H,nonConflicts:_}),this.dataStore.updateNonConflictingChangesResolvedCount({total:X,left:S,right:Q,both:O,userManualResolveNonConflicts:M}),this.dataStore.emitChange(),this.supportAIConflictResolve&&V.filter(T=>T.isConflictPoint).forEach(T=>{const B=T.getIntelligentStateModel();this.hideStopWidget(T.id),B.isLoading&&this.stopWidgetManager.addWidget(T)}),[V,F]}getMonacoDecorationOptions(F,V){const Y=()=>{const _=V.getIntelligentStateModel();return!!(this.supportAIConflictResolve&&_.isComplete&&!_.isLoading)};return{linesDecorationsClassName:N.DECORATIONS_CLASSNAME.combine(F.className||"",N.DECORATIONS_CLASSNAME.stretch_right,Y()?N.DECORATIONS_CLASSNAME.ai_resolve_complete_lines_decorations:"",V.turnDirection===N.ETurnDirection.CURRENT||V.turnDirection===N.ETurnDirection.BOTH?N.DECORATIONS_CLASSNAME.stretch_left:""),className:N.DECORATIONS_CLASSNAME.combine(F.className||"",Y()?N.DECORATIONS_CLASSNAME.ai_resolve_complete:"",V.turnDirection===N.ETurnDirection.CURRENT?N.DECORATIONS_CLASSNAME.stretch_left:N.DECORATIONS_CLASSNAME.combine(N.DECORATIONS_CLASSNAME.stretch_left,N.DECORATIONS_CLASSNAME.stretch_right))}}reset(){this.isFirstInputComputeDiff=!0}getEditorViewType(){return N.EditorViewType.RESULT}updateActions(){return this.conflictActions.updateActions(this.provideActionsItems(this.mappingManagerService.getAllDiffRanges())),this}getContentInTimeMachineDocument(F){return this.timeMachineDocument.getMetaData(F)}completeSituation(){const F=this.mappingManagerService.getAllDiffRanges();let V=0;for(const Y of F)(Y.isComplete||Y.getIntelligentStateModel().isComplete)&&(V+=1);return{completeCount:V,shouldCount:F.length}}launchConflictActionsEvent(F){super.launchConflictActionsEvent(Object.assign(Object.assign({},F),{withViewType:N.EditorViewType.RESULT}))}inputDiffComputingResult(){this.updateDecorations();const F=this.mappingManagerService.getAllDiffRanges();this.registerActionsProvider({provideActionsItems:()=>this.provideActionsItems(F),onActionsClick:(V,Y)=>{(Y===N.REVOKE_ACTIONS||Y===N.ACCEPT_COMBINATION_ACTIONS||Y===N.AI_RESOLVE_ACTIONS||Y===N.AI_RESOLVE_REGENERATE_ACTIONS)&&this.launchConflictActionsEvent({range:V,action:Y,reason:N.ECompleteReason.UserManual})}}),F.forEach(V=>{this.timeMachineDocument.record(V.id,{range:V,text:V.isEmpty?null:this.editor.getModel().getValueInRange(V.toInclusiveRange())})}),(0,c.runWhenIdle)(()=>{const V=F.reduce((Y,_)=>_.isConflictPoint?Y+1:Y,0);this.mergeConflictReportService.record(this.getUri(),{conflictPointNum:V,editorMode:u.MergeConflictEditorMode["3way"]})})}findDiffRange(F){const V=this.editor.getVisibleRanges();if(V.length===0)return;const Y=this.mappingManagerService.getAllDiffRanges().map(X=>X.toInclusiveRange()),_=this.editor.getPosition()||V[0].getStartPosition(),H=(0,f.findRangeForNavigation)(F,Y,_);if(H)if(H.canNavigate){if(!H.range)return}else{this.messageService.warning("No other conflicts within this editor");return}else{this.messageService.warning("No conflicts found in this editor");return}return H.range}navigate(F){const V=this.findDiffRange(F);V&&(this.editor.setSelection(V),this.editor.revealRangeNearTopIfOutsideViewport(V),this.editor.focus())}navigateForwards(){this.navigate(f.NavigationDirection.Forwards)}navigateBackwards(){this.navigate(f.NavigationDirection.Backwards)}};n.__decorate([(0,o.Autowired)(c.AINativeConfigService),n.__metadata("design:type",c.AINativeConfigService)],A.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,o.Autowired)(g.MergeConflictReportService),n.__metadata("design:type",g.MergeConflictReportService)],A.prototype,"mergeConflictReportService",void 0),n.__decorate([(0,o.Autowired)(s.MappingManagerDataStore),n.__metadata("design:type",s.MappingManagerDataStore)],A.prototype,"dataStore",void 0),n.__decorate([(0,o.Autowired)(G.IMessageService),n.__metadata("design:type",Object)],A.prototype,"messageService",void 0),A=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[HTMLDivElement,c.MonacoService,o.Injector])],A),e.ResultCodeEditor=A},13914:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(25918),G=t(93899),p=t(75524),h=t(43718),b=t(51500),I=t(61468),r=t(89995),l=t(96177),s=t(24093),d=n.__importDefault(t(89543)),m=t(80282),v=t(22883),f=({contrastType:Z})=>{const y=(0,c.useInjectable)(G.AbstractMenuService),[E,R]=(0,o.useReducer)(T=>(T+1)%1e6,0),A=(0,c.useInjectable)(l.MergeEditorService),w=(0,c.useInjectable)(b.IWorkspaceService),F=(0,c.useInjectable)(c.CommandService),V=(0,c.useInjectable)(h.CommandRegistry),[Y,_]=(0,o.useState)(),[H,X]=(0,o.useState)(""),[S,Q]=(0,o.useState)();(0,c.useDisposable)(()=>V.afterExecuteCommand(c.EDITOR_COMMANDS.CHANGE_ENCODING.id,()=>{R(),setTimeout(()=>{A.compare()},h.FRAME_THREE)}),[V,A]);const O=(0,o.useCallback)(T=>{if(w.workspace){const x=new c.URI(w.workspace.uri).relative(T);return x?x.toString():T.toString()}return T.toString()},[]);o.default.useEffect(()=>{const T=A.onDidInputNutrition(B=>{const{input1:x,input2:D,output:J,ancestor:k}=B;Z===s.EditorViewType.CURRENT?(_(x.getRaw()),Q(x.uri)):Z===s.EditorViewType.INCOMING?(_(D.getRaw()),Q(D.uri)):Z===s.EditorViewType.RESULT&&(_(new p.MergeEditorInputData(J.uri,"Result",O(J.uri),"").getRaw()),Q(k.uri))});return()=>{T.dispose()}},[A]),o.default.useEffect(()=>{S&&F.executeCommand(c.EDITOR_COMMANDS.GET_ENCODING.id,S).then(T=>{X(T||"")})},[S,E]);const M=(0,o.useCallback)(()=>{const T=y.createMenu(G.MenuId.MergeEditorResultTitleContext);return(0,G.generateMergedInlineActions)({menus:T}).filter(x=>Z===s.EditorViewType.RESULT?!0:x.id!==c.EDITOR_COMMANDS.MERGEEDITOR_RESET.id).map(x=>(x.id===c.EDITOR_COMMANDS.CHANGE_ENCODING.id&&S&&H&&(x.updateLabel(H.toLocaleUpperCase()),x.argsTransformer=()=>[S]),o.default.createElement(u.InlineActionWidget,{key:x.id,data:x})))},[Z,S,H]);return o.default.createElement("div",{className:d.default.title_head_container},Y&&o.default.createElement("div",{className:d.default.content},o.default.createElement("span",{className:d.default.title,title:Y.title},Y.title),o.default.createElement("span",{className:d.default.description,title:Y.description},Y.description),o.default.createElement("span",{className:d.default.detail,title:Y.detail},Y.detail)),o.default.createElement("div",{className:d.default.actions_container},M()))},N=()=>{const Z=(0,c.useInjectable)(l.MergeEditorService),y=(0,c.useInjectable)(c.CommandService),[E,R]=(0,o.useState)(!1),[A,w]=(0,o.useState)(!1),F=(0,c.useInjectable)(c.ILogger);(0,o.useEffect)(()=>{const B=Z.onHasIntelligentLoadingChange(x=>{w(x)});return()=>B.dispose()},[Z]);const V=(0,o.useCallback)(async()=>{R(!0);try{const B=await Z.accept()}catch(B){F.error(B)}finally{R(!1)}},[Z]),Y=(0,o.useCallback)(()=>{Z.acceptLeft(!1,s.ECompleteReason.UserManual)},[Z]),_=(0,o.useCallback)(()=>{Z.acceptRight(!1,s.ECompleteReason.UserManual)},[Z]),H=(0,o.useCallback)(()=>{A?Z.stopAllAIResolveConflict():Z.handleAIResolveConflict()},[Z,A]),X=(0,c.useInjectable)(r.MappingManagerDataStore),[S,Q]=(0,o.useState)(""),[O,M]=(0,o.useState)(!1);(0,o.useEffect)(()=>{const B=(0,a.default)(()=>{Q(X.summary()),M(X.canNavigate())},80,{leading:!0}),x=X.onDataChange(()=>{B()});return B(),()=>x.dispose()},[X]);const T=(0,o.useCallback)(async()=>{await Z.stopAllAIResolveConflict(),(0,c.runWhenIdle)(()=>{y.executeCommand(c.EDITOR_COMMANDS.MERGEEDITOR_RESET.id)})},[Z]);return o.default.createElement(I.MergeActions,{containerClassName:d.default.merge_editor_float_container,editorType:"3way",summary:S,onReset:T,onSwitchEditor:()=>{var B,x;let D=(x=(B=Z.getCurrentEditor())===null||B===void 0?void 0:B.getModel())===null||x===void 0?void 0:x.uri;D&&(D.scheme!=="file"&&(D=D.with({scheme:"file",path:D.path,query:""})),y.executeCommand(c.EDITOR_COMMANDS.API_OPEN_EDITOR_COMMAND_ID,D))},canNavigate:O,handlePrev:()=>{Z.resultView.navigateForwards()},handleNext:()=>{Z.resultView.navigateBackwards()},isAIResolving:A,onAIResolve:H,beforeAddons:o.default.createElement("div",{id:"merge.editor.action.button.accept",className:d.default.action_category},o.default.createElement(g.Button,{className:d.default.merge_conflict_bottom_btn,size:"default",onClick:Y},o.default.createElement(g.Icon,{icon:"left"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.action.button.accept.left"))),o.default.createElement(g.Button,{className:d.default.merge_conflict_bottom_btn,size:"default",onClick:_},o.default.createElement("span",null,(0,c.localize)("mergeEditor.action.button.accept.right")),o.default.createElement(g.Icon,{icon:"right"}))),afterAddons:o.default.createElement(g.Button,{loading:E,id:"merge.editor.action.button.apply",size:"default",className:d.default.merge_editor_apply_btn,onClick:V},(0,c.localize)("mergeEditor.action.button.apply-and-stash"))})},W=()=>{const Z=(0,c.useInjectable)(l.MergeEditorService),y=o.default.useRef(null),E=o.default.useRef(null),R=o.default.useRef(null);return(0,o.useEffect)(()=>{const[A,w,F]=[E.current,R.current,y.current];return A&&w&&F&&Z.instantiationCodeEditor(A,w,F),()=>{Z.dispose()}},[Z]),o.default.createElement("div",{className:d.default.merge_editor_container},o.default.createElement(g.SplitPanel,{overflow:"hidden",id:"merge_editor_container",flex:2},o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.CURRENT}),o.default.createElement("div",{className:d.default.content},o.default.createElement("div",{className:d.default.minimap_container},o.default.createElement(m.MiniMap,{contrastType:s.EditorViewType.CURRENT})),o.default.createElement("div",{className:d.default.editor_container,ref:E}))),o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.RESULT}),o.default.createElement("div",{className:d.default.editor_container},o.default.createElement(v.WithViewStickinessConnectComponent,{contrastType:s.EditorViewType.CURRENT}),o.default.createElement("div",{className:d.default.editor_container,ref:R}),o.default.createElement(v.WithViewStickinessConnectComponent,{contrastType:s.EditorViewType.INCOMING}))),o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.INCOMING}),o.default.createElement("div",{className:d.default.content},o.default.createElement("div",{className:d.default.editor_container,ref:y}),o.default.createElement("div",{className:d.default.minimap_container},o.default.createElement(m.MiniMap,{contrastType:s.EditorViewType.INCOMING}))))),o.default.createElement(N,null))};e.Grid=W},31775:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GuidelineWidget=void 0;const n=t(34819),a=t(24093);class o extends n.ZoneWidget{applyClass(){}applyStyle(){}_fillContainer(){this.setCssClass(a.DECORATIONS_CLASSNAME.guide_underline_widget)}constructor(g){super(g,{showArrow:!1,showFrame:!1,arrowColor:void 0,frameColor:void 0,keepEditorSelection:!0})}revealRange(g,u){}getRecordLine(){return this.recordLine}setContainerStyle(g){var u;const G=Object.keys(g);for(const p of G)Object.prototype.hasOwnProperty.call((u=this.container)===null||u===void 0?void 0:u.style,p)&&(this.container.style[p]=g[p])}addClassName(g){return this.setCssClass(g),this}showByLine(g){this.recordLine=g,super.hide(),super.show({startLineNumber:g,startColumn:0,endLineNumber:g,endColumn:Number.MAX_SAFE_INTEGER},0)}}e.GuidelineWidget=o},80282:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MiniMap=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(31324),u=t(96177),G=t(24093),p=n.__importDefault(t(89543)),h=({contrastType:b})=>{const I=(0,c.useInjectable)(u.MergeEditorService),[r,l]=o.default.useState([]);(0,o.useEffect)(()=>{const d=new c.Disposable;return d.addDispose(I.onDidMount(m=>{const{currentView:v,incomingView:f}=m;b===G.EditorViewType.CURRENT?d.addDispose(c.Event.debounce(v.onDidChangeDecorations,()=>{},16)(()=>{s(v,v.documentMapping.getOriginalRange())})):b===G.EditorViewType.INCOMING&&d.addDispose(c.Event.debounce(f.onDidChangeDecorations,()=>{},16)(()=>{s(f,f.documentMapping.getModifiedRange())}))})),()=>d.dispose()},[I,b]);const s=(0,o.useCallback)((d,m)=>{const v=d.getEditor(),f=v.getOption(g.EditorOption.lineHeight),N=v.getContentHeight(),W=[];m.forEach(Z=>{Z.isComplete||W.push({top:(Z.startLineNumber-1)*f/N*100+"%",height:Z.length*f/N*100+"%",className:p.default[Z.type]})}),l(W)},[]);return o.default.createElement("div",{className:p.default.minimap_content},r.map((d,m)=>o.default.createElement("span",{key:m,className:(0,a.default)(p.default.block,d.className),style:{top:d.top,height:d.height}})))};e.MiniMap=h},13744:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollSynchronizer=void 0;const n=t(43718),a=t(51472),o=t(66557),c=t(23600);class g extends n.Disposable{constructor(){super(),this._onScrollChange=new n.Emitter,this.onScrollChange=this._onScrollChange.event}mount(G,p,h){this.addDispose(n.Event.buffer(this.onScrollChange)(({event:b,editor:I})=>{if(!b.scrollTopChanged&&!b.scrollLeftChanged&&!b.scrollHeightChanged)return;let r=[null,null];I instanceof a.CurrentCodeEditor?r=[p,h]:I instanceof c.ResultCodeEditor?r=[G,h]:I instanceof o.IncomingCodeEditor&&(r=[G,p]),r.length===2&&r.forEach(l=>{l.getEditor().setScrollPosition({scrollLeft:b.scrollLeft,scrollTop:b.scrollTop})})})),this.addDispose(G.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:G})})),this.addDispose(h.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:h})})),this.addDispose(p.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:p})}))}}e.ScrollSynchronizer=g},22883:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickinessConnectManager=e.WithViewStickinessConnectComponent=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(43718),g=t(31324),u=t(96177),G=t(69972),p=t(24093),h=n.__importDefault(t(89543)),b=({piece:l})=>{const{leftTop:s,rightTop:d,leftBottom:m,rightBottom:v}=l.path,f=()=>a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{className:l.rangeType,strokeOpacity:0,d:`M0,${s} L${l.width},${d} L${l.width},${v} L0,${m} z`}),a.default.createElement("path",{className:l.rangeType,fillOpacity:0,strokeLinecap:"round",strokeWidth:2,d:`M0,${s} L${l.width},${d} M${l.width},${v} L0,${m}`})),N=()=>a.default.createElement("path",{className:l.rangeType,fillOpacity:0,strokeDasharray:3,strokeWidth:2,d:`M0,${s} L${l.width},${d} M${l.width},${v} L0,${m}`});return a.default.createElement("div",{className:h.default.piece_view_lines,style:{top:l.position.top,width:l.width}},a.default.createElement("svg",{viewBox:`0 0 ${l.width} ${l.height}`,style:{height:l.height}},l.isComplete?N():f()))},I=({contrastType:l})=>{const s=(0,o.useInjectable)(u.MergeEditorService),[d,m]=a.default.useState([]);return a.default.useEffect(()=>{const v=new c.Disposable;return v.addDispose(c.Event.filter(s.stickinessConnectManager.onDidChangePiece,({editorType:f})=>f===l)(({pieces:f})=>{m(f)})),v.addDispose(s.scrollSynchronizer.onScrollChange(()=>{const[f,N]=s.stickinessConnectManager.getScrollTopWithBoth(l),W=d.map(Z=>Z.movePosition(f,N));m(W)})),()=>v.dispose()},[s,d]),a.default.createElement("div",{className:h.default.stickiness_connect_container},d.map((v,f)=>a.default.createElement(b,{key:f,piece:v})))};e.WithViewStickinessConnectComponent=I;class r extends c.Disposable{constructor(){super(),this._onDidChangePiece=new c.Emitter,this.onDidChangePiece=this._onDidChangePiece.event}generatePiece(s,d,m,v=0){const f=[],{marginWidth:N,lineHeight:W}=m;return s.forEach((Z,y)=>{const E=d[y],R=Math.min(Z.startLineNumber,E.startLineNumber),A=Math.max(Z.endLineNumberExclusive,E.endLineNumberExclusive),w=N,F=W*(A-R),V={top:(R-1)*W},Y={leftTop:Math.abs(R-Z.startLineNumber)*W,rightTop:Math.abs(R-E.startLineNumber)*W,leftBottom:(Z.endLineNumberExclusive-R)*W,rightBottom:(E.endLineNumberExclusive-R)*W};f.push(new G.StickyPieceModel(w,F,Y,V,h.default[Z.type],v===0?Z.isComplete:E.isComplete))}),f}computePiece(s){if(s===p.EditorViewType.RESULT||!(this.currentView||this.resultView||this.incomingView))return;const d=s===p.EditorViewType.CURRENT?this.currentView:this.incomingView,{documentMapping:m}=d,[v,f]=[m.getOriginalRange(),m.getModifiedRange()],N=d.getEditor().getOption(g.EditorOption.lineHeight);let Z=(s===p.EditorViewType.CURRENT?this.resultView.getEditor().getLayoutInfo():this.incomingView.getEditor().getLayoutInfo()).contentLeft;const y=(s===p.EditorViewType.CURRENT?this.resultView:this.incomingView).getEditor().getOption(g.EditorOption.lineDecorationsWidth);Z-=typeof y=="number"?y:0;const E=this.generatePiece(v,f,{marginWidth:Z,lineHeight:N},s===p.EditorViewType.INCOMING?1:0).map(R=>R.movePosition(...this.getScrollTopWithBoth(s)));this._onDidChangePiece.fire({pieces:E,editorType:s})}getScrollTopWithBoth(s){if(s===p.EditorViewType.RESULT)return[0,0];if(!(this.currentView||this.resultView||this.incomingView))return[0,0];let d,m;return s===p.EditorViewType.CURRENT?(d=this.currentView.getEditor(),m=this.resultView.getEditor()):s===p.EditorViewType.INCOMING&&(d=this.resultView.getEditor(),m=this.incomingView.getEditor()),d&&m?[d.getScrollTop(),m.getScrollTop()]:[0,0]}mount(s,d,m){this.currentView=s,this.resultView=d,this.incomingView=m,this.addDispose(c.Event.debounce(s.onDidChangeDecorations,()=>{},1)(()=>{this.computePiece(p.EditorViewType.CURRENT)})),this.addDispose(c.Event.debounce(m.onDidChangeDecorations,()=>{},1)(()=>{this.computePiece(p.EditorViewType.INCOMING)}))}}e.StickinessConnectManager=r},67641:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetFactory=e.defaultPositionFactory=void 0;const n=t(41869),a=c=>new n.Position(c.endLineNumberExclusive,1);e.defaultPositionFactory=a;class o{constructor(g,u,G,p=e.defaultPositionFactory){this.contentWidget=g,this.editor=u,this.injector=G,this.positionFactory=p,this.widgetMap=new Map}hasWidget(g){return this.widgetMap.get(g.id)!==void 0}hideAll(){this.widgetMap.forEach(g=>{g.hide()}),this.widgetMap.clear()}hideWidget(g){const u=this.widgetMap.get(g);u&&(u.hide(),this.widgetMap.delete(g))}addWidget(g,...u){const G=g.id;this.widgetMap.has(G)&&this.hideWidget(G);const p=this.positionFactory(g),h=this.injector.get(this.contentWidget,[G,this.editor,g,...u]);h.show({position:p}),this.widgetMap.set(G,h)}}e.WidgetFactory=o},92572:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveResultWidget=e.WapperAIInlineResult=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(76003),c=t(97267),g=t(81878),u=t(89195),G=t(66205),p=t(43718),h=t(52659),b=t(75526),I=t(24093),r=s=>{const{iconItems:d,isRenderThumbs:m,codeEditor:v,range:f,id:N,disablePopover:W=!1}=s,[Z,y]=a.default.useState(!1),E=(0,a.useMemo)(()=>(0,p.uuid)(4),[]),R=(0,a.useCallback)(H=>{H.stopPropagation(),H.preventDefault(),y(!1)},[Z]),A=(0,a.useCallback)(H=>{H.stopPropagation(),H.preventDefault(),R(H),w()},[Z]),w=(0,a.useCallback)(()=>{v.launchConflictActionsEvent({range:f,action:I.AI_RESOLVE_REGENERATE_ACTIONS,reason:I.ECompleteReason.UserManual}),v.hideResolveResultWidget(N)},[f,v,N]),F=(0,a.useMemo)(()=>a.default.createElement("div",{style:{padding:"8px 12px"}},a.default.createElement(g.DialogContent,{type:"confirm",buttons:[a.default.createElement(c.Button,{size:"small",onClick:R,type:"secondary"},(0,p.localize)("ButtonCancel")),a.default.createElement(c.Button,{size:"small",onClick:A},(0,p.localize)("ButtonOK"))],icon:{color:"var(--notificationsWarningIcon-foreground)",className:"question-circle"},title:(0,p.localize)("aiNative.resolve.conflict.dialog.afresh"),message:(0,p.localize)("aiNative.resolve.conflict.dialog.detection"),visible:!0,messageType:c.MessageType.Warning})),[Z]),V=(0,a.useCallback)(()=>a.default.createElement(g.Popover,{visible:Z,id:E,content:F,position:g.PopoverPosition.bottom},a.default.createElement("span",null,(0,p.localize)("aiNative.operate.afresh.title"))),[Z]),Y=(0,a.useCallback)(()=>{var H;const S=f.getIntelligentStateModel().answerCode,Q=((H=v.editor.getModel())===null||H===void 0?void 0:H.getValueInRange(f.toRange()))||"";if(S.trim()===Q.trim())w();else{if(W){w();return}y(!0)}},[f,v,Z,W]),_=(0,a.useMemo)(()=>d.concat([{icon:"afresh",text:V(),onClick:Y}]),[d,Z]);return a.default.createElement(u.AIInlineResult,{iconItems:_,isRenderThumbs:m})};e.WapperAIInlineResult=r;let l=class extends h.ReactInlineContentWidget{constructor(d,m,v){super(m.editor),this.uid=d,this.codeEditor=m,this.lineRange=v}isRenderThumbs(){return!0}iconItems(){return[{icon:"discard",text:(0,p.localize)("aiNative.operate.discard.title"),onClick:()=>{this.codeEditor.launchConflictActionsEvent({range:this.lineRange,action:I.REVOKE_ACTIONS,reason:I.ECompleteReason.UserManual}),this.codeEditor.hideResolveResultWidget()}}]}renderView(){const d=this.iconItems(),m=this.isRenderThumbs();return a.default.createElement(G.ContentWidgetContainerPanel,{style:{transform:"translateY(4px)"}},a.default.createElement(e.WapperAIInlineResult,{id:this.uid,iconItems:d,isRenderThumbs:m,codeEditor:this.codeEditor,range:this.lineRange}))}id(){return`${I.AIResolveConflictContentWidget}_${this.uid}`}};l=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,b.LineRange])],l),e.ResolveResultWidget=l},80922:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWidget=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(76003),c=t(89195),g=t(66205),u=t(43718),G=t(92572);let p=class extends G.ResolveResultWidget{isRenderThumbs(){return!1}iconItems(){return[{icon:"circle-pause",text:(0,u.localize)("aiNative.operate.stop.title"),onClick:()=>{this.codeEditor.cancelRequestToken(this.lineRange.id),this.codeEditor.hideStopWidget(this.lineRange.id)}}]}id(){return`${super.id()}_stop_${this.uid}`}renderView(){const b=this.iconItems(),I=this.isRenderThumbs();return a.default.createElement(g.ContentWidgetContainerPanel,{style:{transform:"translateY(4px)"}},a.default.createElement(c.AIInlineResult,{iconItems:b,isRenderThumbs:I}))}};p=n.__decorate([(0,o.Injectable)({multiple:!0})],p),e.StopWidget=p},62660:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextmateTokenizer=void 0,e.ITextmateTokenizer=Symbol("ITextmateTokenizer")},28694:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyProviderRegistry=e.ITypeHierarchyService=void 0;const n=t(40497);e.ITypeHierarchyService=Symbol("ITypeHierarchyService"),e.TypeHierarchyProviderRegistry=new n.LanguageFeatureRegistry},62663:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoModule=e.monacoBrowser=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(99721),g=t(70238),u=t(62501),G=n.__importDefault(t(44161)),p=t(80405),h=t(30198);t(89543),e.monacoBrowser=n.__importStar(t(23773));let b=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[o.MonacoContribution,o.JsonSchemaContribution],this.providers=[u.MonacoClientContribution,{token:o.MonacoService,useClass:G.default},{token:o.ISchemaStore,useClass:h.SchemaStore},{token:o.MonacoOverrideServiceRegistry,useClass:p.MonacoOverrideServiceRegistryImpl},{token:o.IJSONSchemaRegistry,useClass:h.SchemaRegistry},{token:o.IContextKeyService,useClass:g.MonacoContextKeyService},{token:c.IConfigurationService,useClass:g.ConfigurationService}]}};b=n.__decorate([(0,a.Injectable)()],b),e.MonacoModule=b},18981:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerData=e.createMonacoEditorApi=void 0;const n=t(80673),a=t(19582),o=t(31324),c=t(74444),g=t(6727),u=t(53092),G=t(43255),p=t(99005),h=t(25061),b=t(34835);Object.defineProperty(e,"IMarkerData",{enumerable:!0,get:function(){return b.IMarkerData}});function I(){return Object.freeze({create:p.create,onDidCreateEditor:p.onDidCreateEditor,createDiffEditor:p.createDiffEditor,createModel:p.createModel,setModelLanguage:p.setModelLanguage,setModelMarkers:p.setModelMarkers,getModelMarkers:p.getModelMarkers,getModels:p.getModels,getModel:p.getModel,onDidCreateModel:p.onDidCreateModel,onWillDisposeModel:p.onWillDisposeModel,onDidChangeModelLanguage:p.onDidChangeModelLanguage,createWebWorker:p.createWebWorker,colorizeElement:p.colorizeElement,colorize:p.colorize,colorizeModelLine:p.colorizeModelLine,tokenize:p.tokenize,defineTheme:p.defineTheme,setTheme:p.setTheme,remeasureFonts:p.remeasureFonts,AccessibilitySupport:h.AccessibilitySupport,ContentWidgetPositionPreference:a.ContentWidgetPositionPreference,CursorChangeReason:g.CursorChangeReason,DefaultEndOfLine:G.DefaultEndOfLine,EditorAutoIndentStrategy:o.EditorAutoIndentStrategy,EditorOption:o.EditorOption,EndOfLinePreference:G.EndOfLinePreference,EndOfLineSequence:G.EndOfLineSequence,MinimapPosition:G.MinimapPosition,MouseTargetType:a.MouseTargetType,OverlayWidgetPositionPreference:a.OverlayWidgetPositionPreference,OverviewRulerLane:G.OverviewRulerLane,RenderLineNumbersType:o.RenderLineNumbersType,RenderMinimap:o.RenderMinimap,ScrollbarVisibility:n.ScrollbarVisibility,ScrollType:u.ScrollType,TextEditorCursorBlinkingStyle:o.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:o.TextEditorCursorStyle,TrackedRangeStickiness:G.TrackedRangeStickiness,WrappingIndent:o.WrappingIndent,ConfigurationChangedEvent:o.ConfigurationChangedEvent,BareFontInfo:c.BareFontInfo,FontInfo:c.FontInfo,TextModelResolvedOptions:G.TextModelResolvedOptions,FindMatch:G.FindMatch,EditorType:u.EditorType,EditorOptions:o.EditorOptions})}e.createMonacoEditorApi=I},52902:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceEdit=e.URI=e.monacoApi=e.monaco=void 0;const n=t(31324),a=t(18981),o=t(79865);n.EditorOptions.wrappingIndent.defaultValue=n.WrappingIndent.None,n.EditorOptions.glyphMargin.defaultValue=!1,n.EditorOptions.autoIndent.defaultValue=n.EditorAutoIndentStrategy.Advanced,n.EditorOptions.overviewRulerLanes.defaultValue=2,e.monaco=Object.freeze({editor:(0,a.createMonacoEditorApi)(),languages:(0,o.createMonacoLanguageApi)()}),e.monacoApi=e.monaco;var c=t(26592);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return c.URI}});var g=t(4225);Object.defineProperty(e,"ResourceEdit",{enumerable:!0,get:function(){return g.ResourceEdit}})},79865:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.languageFeaturesService=e.createMonacoLanguageApi=void 0;const n=t(48069),a=t(93782),o=t(42241),c=t(83e3);function g(){return Object.freeze({register:o.register,getLanguages:o.getLanguages,onLanguage:o.onLanguage,getEncodedLanguageId:o.getEncodedLanguageId,setLanguageConfiguration:o.setLanguageConfiguration,setTokensProvider:o.setTokensProvider,setMonarchTokensProvider:o.setMonarchTokensProvider,registerReferenceProvider:o.registerReferenceProvider,registerRenameProvider:o.registerRenameProvider,registerSignatureHelpProvider:o.registerSignatureHelpProvider,registerHoverProvider:o.registerHoverProvider,registerDocumentSymbolProvider:o.registerDocumentSymbolProvider,registerDocumentHighlightProvider:o.registerDocumentHighlightProvider,registerDefinitionProvider:o.registerDefinitionProvider,registerImplementationProvider:o.registerImplementationProvider,registerTypeDefinitionProvider:o.registerTypeDefinitionProvider,registerCodeLensProvider:o.registerCodeLensProvider,registerCodeActionProvider:o.registerCodeActionProvider,registerDocumentFormattingEditProvider:o.registerDocumentFormattingEditProvider,registerDocumentRangeFormattingEditProvider:o.registerDocumentRangeFormattingEditProvider,registerOnTypeFormattingEditProvider:o.registerOnTypeFormattingEditProvider,registerLinkProvider:o.registerLinkProvider,registerColorProvider:o.registerColorProvider,registerFoldingRangeProvider:o.registerFoldingRangeProvider,registerDeclarationProvider:o.registerDeclarationProvider,registerSelectionRangeProvider:o.registerSelectionRangeProvider,registerCompletionItemProvider:o.registerCompletionItemProvider,registerInlineCompletionsProvider:o.registerInlineCompletionsProvider,registerNewSymbolNameProvider:o.registerNewSymbolNameProvider,FoldingRangeKind:n.FoldingRangeKind,onLanguageEncountered:o.onLanguageEncountered,registerDocumentRangeSemanticTokensProvider:o.registerDocumentRangeSemanticTokensProvider,registerInlineEditProvider:o.registerInlineEditProvider,registerTokensProviderFactory:o.registerTokensProviderFactory,registerLinkedEditingRangeProvider:o.registerLinkedEditingRangeProvider,registerDocumentSemanticTokensProvider:o.registerDocumentSemanticTokensProvider,registerInlayHintsProvider:o.registerInlayHintsProvider,setColorMap:o.setColorMap})}e.createMonacoLanguageApi=g,e.languageFeaturesService=c.StandaloneServices.get(a.ILanguageFeaturesService)},60304:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.createStaticServiceApi=void 0;const n=t(4225),a=t(75189),o=t(14162),c=t(28240),g=t(91686),u=t(87822),G=t(88208),p=t(83e3);Object.defineProperty(e,"StandaloneServices",{enumerable:!0,get:function(){return p.StandaloneServices}});const h=t(7760),b=t(71827),I=t(99721),r=t(87423),l=t(30551),s=t(98793),d=t(54777),m=t(34835),v=t(18407),f=t(5863),N=t(95891),W=t(11619);function Z(){return Object.freeze({configurationService:p.StandaloneServices.get(I.IConfigurationService),resourceConfigurationService:p.StandaloneServices.get(G.ITextResourceConfigurationService),contextService:p.StandaloneServices.get(r.IContextKeyService),labelService:p.StandaloneServices.get(s.ILabelService),telemetryService:p.StandaloneServices.get(W.ITelemetryService),dialogService:p.StandaloneServices.get(l.IDialogService),notificationService:p.StandaloneServices.get(v.INotificationService),markerService:p.StandaloneServices.get(m.IMarkerService),modeService:p.StandaloneServices.get(o.ILanguageService),languageService:p.StandaloneServices.get(o.ILanguageService),markerDecorationsService:p.StandaloneServices.get(g.IMarkerDecorationsService),standaloneThemeService:p.StandaloneServices.get(h.IStandaloneThemeService),logService:p.StandaloneServices.get(d.ILogService),modelService:p.StandaloneServices.get(u.IModelService),codeEditorService:p.StandaloneServices.get(a.ICodeEditorService),editorProgressService:p.StandaloneServices.get(f.IEditorProgressService),storageService:p.StandaloneServices.get(N.IStorageService),editorWorkerService:p.StandaloneServices.get(c.IEditorWorkerService),bulkEditService:p.StandaloneServices.get(n.IBulkEditService),commandService:p.StandaloneServices.get(b.ICommandService)})}e.createStaticServiceApi=Z},68475:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(91405),e)},90052:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetPositionPreference=e.MouseTargetType=void 0;var n=t(19582);Object.defineProperty(e,"MouseTargetType",{enumerable:!0,get:function(){return n.MouseTargetType}}),Object.defineProperty(e,"ContentWidgetPositionPreference",{enumerable:!0,get:function(){return n.ContentWidgetPositionPreference}})},23773:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editor=void 0;const n=t(85608);e.editor=n.__importStar(t(90052))},74386:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoMenus=void 0;const n=t(41869);var a;(function(o){o.SELECTION_GROUP={id:"1_selection_group",actions:[n.EDITOR_COMMANDS.SELECT_ALL.id,"editor.action.smartSelect.expand","editor.action.smartSelect.shrink"]},o.SELECTION_MOVE_GROUP={id:"2_copy_move_group",actions:["editor.action.copyLinesUpAction","editor.action.copyLinesDownAction","editor.action.moveLinesUpAction","editor.action.moveLinesDownAction"]},o.SELECTION_CURSOR_GROUP={id:"3_cursor_group",actions:["editor.action.insertCursorAbove","editor.action.insertCursorBelow","editor.action.insertCursorAtEndOfEachLineSelected","editor.action.addSelectionToNextFindMatch","editor.action.addSelectionToPreviousFindMatch","editor.action.selectHighlights"]},o.SELECTION_GROUPS=[o.SELECTION_GROUP,o.SELECTION_MOVE_GROUP,o.SELECTION_CURSOR_GROUP]})(a=e.MonacoMenus||(e.MonacoMenus={}))},32002:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoSnippetSuggestion=e.JsonSerializedSnippet=e.MonacoSnippetSuggestProvider=void 0;const a=t(85608),o=a.__importStar(t(23304)),c=t(76003),g=t(43718),u=t(42933),G=t(57711),p=a.__importStar(t(33096)),h=t(79865),{Path:b}=g.path;let I=n=class{constructor(){this._debugDisplayName="MonacoSnippetSuggestProvider",this.snippets=new Map,this.pendingSnippets=new Map}get registeredLanguageIds(){const d=[];return this.pendingSnippets.forEach((m,v)=>{v!=="*"&&d.push(v)}),d}async provideCompletionItems(d,m,v,f){if(m.column>=n._maxPrefix||v.triggerKind===p.languages.CompletionTriggerKind.TriggerCharacter&&v.triggerCharacter===" ")return;const N=d.getLanguageId();await this.loadSnippets(N);const W=this.snippets.get(N)||[],Z={lineNumber:m.lineNumber,column:1},y=[],R=d.getLineContent(m.lineNumber).substr(0,m.column-1).toLowerCase(),A=R.match(/\s$/);for(;Z.column<m.column;){const V=d.getWordAtPosition(Z);V?(y.push(V.startColumn-1),Z.column=V.endColumn+1,V.endColumn-1<R.length&&!/\s/.test(R[V.endColumn-1])&&y.push(V.endColumn-1)):(/\s/.test(R[Z.column-1])||y.push(Z.column-1),Z.column+=1)}const w=new Set;W.forEach(w.add,w);const F=[];for(const V of y)w.forEach(Y=>{(0,g.isPatternInWord)(R,V,R.length,Y.prefix.toLowerCase(),0,Y.prefix.length)&&(F.push(new l(Y,p.Range.fromPositions(m.delta(0,-(R.length-V)),m))),w.delete(Y))});(A||y.length===0)&&w.forEach(V=>{F.push(new l(V,p.Range.fromPositions(m)))}),F.sort(l.compareByLabel);for(let V=0;V<F.length;V++){const Y=F[V];let _=V+1;for(;_<F.length&&Y.label===F[_].label;_++)F[_].label=(0,g.localize)("snippetSuggest.longLabel",F[_].label,F[_].snippet.name);_>V+1&&(F[V].label=(0,g.localize)("snippetSuggest.longLabel",F[V].label,F[V].snippet.name),V=_)}return{suggestions:F}}resolveCompletionItem(d,m){return Promise.resolve(d)}async loadSnippets(d){const m=[];m.push(...this.pendingSnippets.get(d)||[]),m.push(...this.pendingSnippets.get("*")||[]),m.length&&await Promise.all(m)}fromPath(d,m){const v=new g.DisposableCollection(g.Disposable.create(()=>{})),f=new b(m.extPath).join(d.replace(/^\.\//,"")).toString(),N=this.loadURI(g.Uri.file(f),m,v),{language:W}=m,Z=Array.isArray(W)?W:W?[W]:["*"];for(const y of Z){const E=this.pendingSnippets.get(y)||[];E.push(N),this.pendingSnippets.set(y,E),v.push(g.Disposable.create(()=>{const R=E.indexOf(N);R!==-1&&E.splice(R,1),this.pendingSnippets.delete(y)}))}return v}async loadURI(d,m,v){try{const{content:f}=await this.filesystem.resolveContent(d.toString(),{encoding:"utf-8"});if(v.disposed)return;const N=f&&o.parse(f,void 0,{disallowComments:!1});v.push(this.fromJSON(N,m))}catch(f){this.logger.error(f)}}fromJSON(d,{language:m,source:v}){const f=new g.DisposableCollection;return this.parseSnippets(d,(N,W)=>{let{prefix:Z,body:y,description:E}=W;if(Array.isArray(y)&&(y=y.join(`
|
|
28460
|
+
</html>`}function b(I){const r=new DOMParser().parseFromString(I,"text/html"),l=r.documentElement.querySelectorAll("svg");if(l)for(let s=0;s<l.length;s++){const d=l[s];d.parentNode&&d.parentNode.removeChild(l[s])}return r.documentElement.outerHTML}},21066:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkdownService=void 0,e.IMarkdownService=Symbol("IMarkdownService")},93374:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(21066),e),n.__exportStar(t(31101),e)},99669:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(11666),g=t(24493),u=t(23368);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.MarkersContribution,{token:c.IMarkerService,useClass:u.MarkerService}]}};G=n.__decorate([(0,a.Injectable)()],G),e.MarkersModule=G},60589:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContextKey=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(379);let g=class{initScopedContext(G){this._contextKeyService=this.globalContextkeyService.createScoped(G),this.markersTreeVisibility=c.MarkersTreeVisibilityContextKey.bind(this._contextKeyService),this.markerFocus=c.MarkerFocusContextKey.bind(this._contextKeyService)}get service(){return this._contextKeyService}};n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"globalContextkeyService",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.MarkersContextKey=g},24493:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(63067),g=t(11666),u=t(63670),G=t(23368),p=t(15952),h=n.__importDefault(t(31773)),b=t(73073);function I(l){const d="99+";return l>=100?d:l.toString()}let r=class extends o.Disposable{constructor(){super(...arguments),this.statusBarId="markers-status"}onDidRender(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s&&(this.addDispose(this.markerService.getManager().onMarkerChanged(()=>{const d=this.markerService.getBadge();s.setBadge(d||"")})),this.markerService.viewReady.then(()=>{s.isActivated()&&this.markerModelService.activate()}),this.addDispose(s.onActivate(()=>{this.markerModelService.activate()})),this.addDispose(s.onInActivate(()=>{this.markerModelService.deactivate()}))),this.updateStatusBar(),this.addDispose(this.markerService.getManager().onMarkerChanged(()=>{this.updateStatusBar()}))}updateStatusBar(){const d=this.markerService.getManager().getStats();if(d){const m=[],v=[`$(codicon/error) ${I(d.errors)}`,`$(codicon/warning) ${I(d.warnings)}`];d.errors>0&&m.push(`Errors(${d.errors})`),d.warnings>0&&m.push(`Warnings(${d.warnings})`),d.infos>0&&(m.push(`Infos(${d.infos})`),v.push(`$(codicon/info) ${I(d.infos)}`)),this.statusBar.addElement(this.statusBarId,{name:(0,o.localize)("status-bar.editor-langStatus"),alignment:o.StatusBarAlignment.LEFT,text:v.join(" "),priority:1,tooltip:m.length>0?m.join(", "):(0,o.localize)("markers.status.no.problems"),onClick:()=>{this.toggleMarkerTabbar()}})}else this.statusBar.removeElement(this.statusBarId)}registerComponent(s){s.register("@opensumi/ide-markers",{id:g.MARKER_CONTAINER_ID,component:p.MarkerPanel},{title:h.default.markerTitle(),priority:11,containerId:g.MARKER_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+m",titleComponent:u.MarkerFilterPanel})}showMarkerTabbar(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s?.activate()}toggleMarkerTabbar(){const s=this.mainlayoutService.getTabbarHandler(g.MARKER_CONTAINER_ID);s&&(s.isActivated()?s.deactivate():s.activate())}registerCommands(s){s.registerCommand({id:o.MARKER_COMMANDS.SHOW_ERRORS_WARNINGS.id},{execute:()=>{this.showMarkerTabbar()}}),s.registerCommand({id:o.MARKER_COMMANDS.TOGGLE_SHOW_ERRORS_WARNINGS.id},{execute:()=>{this.toggleMarkerTabbar()}})}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",o.Logger)],r.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],r.prototype,"mainlayoutService",void 0),n.__decorate([(0,a.Autowired)(g.IMarkerService),n.__metadata("design:type",G.MarkerService)],r.prototype,"markerService",void 0),n.__decorate([(0,a.Autowired)(o.IStatusBarService),n.__metadata("design:type",Object)],r.prototype,"statusBar",void 0),n.__decorate([(0,a.Autowired)(b.MarkerModelService),n.__metadata("design:type",b.MarkerModelService)],r.prototype,"markerModelService",void 0),r=n.__decorate([(0,o.Domain)(o.CommandContribution,o.ComponentContribution,c.MainLayoutContribution)],r),e.MarkersContribution=r},14298:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Filter=e.FilterOptions=void 0;const n=t(85608),a=t(41869),o=t(11666),c=n.__importDefault(t(31773));class g{constructor(p="",h=[]){this.filter=p,this.filterErrors=!1,this.filterWarnings=!1,this.filterInfos=!1,this.textFilter="",p=p.trim();const b=Array.isArray(h)?h:[],I=Array.isArray(h)?(0,a.getEmptyExpression)():h,r=(0,a.getEmptyExpression)();if(p){const l=(0,a.splitGlobAware)(p,",").map(s=>s.trim()).filter(s=>!!s.length);for(const s of l)this.filterErrors=this.filterErrors||this.matches(s,c.default.markerPanelFilterErrors()),this.filterWarnings=this.filterWarnings||this.matches(s,c.default.markerPanelFilterWarnings()),this.filterInfos=this.filterInfos||this.matches(s,c.default.markerPanelFilterInfos()),a.strings.startsWith(s,"!")?this.setPattern(I,a.strings.ltrim(s,"!")):(this.setPattern(r,s),this.textFilter+=` ${s}`)}this.excludesMatcher=new o.ResourceGlobMatcher(I,b),this.includesMatcher=new o.ResourceGlobMatcher(r,[]),this.textFilter=this.textFilter.trim()}setPattern(p,h){h[0]==="."&&(h="*"+h),p[`**/${h}/**`]=!0,p[`**/${h}`]=!0}matches(p,h){const b=(0,a.matchesPrefix)(p,h);return!!(b&&b.length>0)}}e.FilterOptions=g,g._filter=a.matchesFuzzy2,g._messageFilter=a.matchesFuzzy;class u{constructor(p){this.options=p}filterModel(p){const h=this.options.includesMatcher.matches(new a.URI(p.resource)),b=p.filename?g._filter(this.options.textFilter,p.filename):void 0,I=h||b&&b.length>0;if(I)return o.MarkerModelBuilder.buildFilterModel(p,this.filterMarkerItems(p.markers,!1),I,!0,{filenameMatches:b});{const r=this.filterMarkerItems(p.markers,!0);return o.MarkerModelBuilder.buildFilterModel(p,r,!1,r.length>0)}}filterMarkerItems(p,h){if(!p||p.length<=0)return[];const b=p.map(I=>this.filterMarkerItem(I));return h?b.filter(I=>I.match===!0):b}filterMarkerItem(p){if(this.options.filterErrors&&a.MarkerSeverity.Error===p.severity||this.options.filterWarnings&&a.MarkerSeverity.Warning===p.severity||this.options.filterInfos&&a.MarkerSeverity.Info===p.severity||!this.options.textFilter)return o.MarkerItemBuilder.buildFilterItem(p,!0);const h=p.message?g._filter(this.options.textFilter,p.message):void 0,b=p.source?g._filter(this.options.textFilter,p.source):void 0,I=p.code?g._filter(this.options.textFilter,p.code):void 0;return h||b||I?o.MarkerItemBuilder.buildFilterItem(p,!0,{messageMatches:h,sourceMatches:b,codeMatches:I}):o.MarkerItemBuilder.buildFilterItem(p,!1)}}e.Filter=u},63670:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerFilterPanel=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(25150),c=n.__importDefault(t(14041)),g=t(41869),u=t(5567),G=t(11666),p=t(14298),h=n.__importDefault(t(30790)),b=n.__importDefault(t(31773));e.MarkerFilterPanel=(0,o.observer)(()=>{const I=(0,g.useInjectable)(G.IMarkerService),r=(0,g.useDesignStyles)(h.default.markerFilterContent,"markerFilterContent"),l=(0,g.useDesignStyles)(h.default.filterInput,"filterInput"),[s,d]=c.default.useState("");(0,g.useDisposable)(()=>[I.onMarkerFilterChanged(v=>{v===void 0&&d("")})]);const m=(0,a.default)(v=>{d(v),I.fireFilterChanged(v?new p.FilterOptions(v):void 0)},250);return c.default.createElement("div",{className:r},c.default.createElement(u.AutoFocusedInput,{containerId:G.MARKER_CONTAINER_ID,hasClear:!0,className:l,placeholder:b.default.markerPanelFilterInputPlaceholder(),value:s,onValueChange:m}))})},75068:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIconStyle=e.HIGH_CONTRAST_DARK=e.HIGH_CONTRAST_LIGHT=e.LIGHT=e.DARK=void 0;const n=t(41869),a=t(52416),o=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.58318 2.02842C9.96435 2.16331 11.2561 2.77279 12.2383 3.75307C13.3643 4.87923 13.9978 6.40584 14 7.99829C14.0004 9.38617 13.5196 10.7313 12.6396 11.8045C11.7595 12.8778 10.5345 13.6127 9.17333 13.8841C7.81215 14.1556 6.39895 13.9467 5.1745 13.2931C3.95005 12.6394 2.99008 11.5815 2.45814 10.2995C1.92619 9.0175 1.85517 7.59072 2.25717 6.26222C2.65917 4.93373 3.50933 3.7857 4.66282 3.0137C5.8163 2.24171 7.20177 1.89351 8.58318 2.02842ZM8.68038 1.03316C10.292 1.19055 11.7993 1.90184 12.9453 3.04585C14.2587 4.35938 14.9976 6.14013 15 7.99764C15.0005 9.61695 14.4396 11.1864 13.4129 12.4385C12.3861 13.6907 10.9569 14.5482 9.36889 14.8648C7.78084 15.1815 6.13211 14.9378 4.70359 14.1752C3.27506 13.4127 2.1551 12.1784 1.53449 10.6828C0.913887 9.18708 0.831027 7.52251 1.30003 5.97259C1.76903 4.42268 2.76089 3.08331 4.10662 2.18265C5.45236 1.28199 7.06873 0.875761 8.68038 1.03316ZM5.52498 5L8.00004 7.47506L10.4751 5L11.1822 5.70711L8.70714 8.18217L11.1818 10.6569L10.4747 11.364L8.00004 8.88927L5.52535 11.364L4.81824 10.6569L7.29293 8.18217L4.81787 5.70711L5.52498 5Z" fill="'),c=encodeURIComponent('"/></svg>'),g=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.58318 2.02842C9.96435 2.16331 11.2561 2.77279 12.2383 3.75307C13.3643 4.87923 13.9978 6.40584 14 7.99829C14.0004 9.38617 13.5196 10.7313 12.6396 11.8045C11.7595 12.8778 10.5345 13.6127 9.17333 13.8841C7.81215 14.1556 6.39895 13.9467 5.1745 13.2931C3.95005 12.6394 2.99008 11.5815 2.45814 10.2995C1.92619 9.0175 1.85517 7.59072 2.25717 6.26222C2.65917 4.93373 3.50933 3.7857 4.66282 3.0137C5.8163 2.24171 7.20177 1.89351 8.58318 2.02842ZM8.68038 1.03316C10.292 1.19055 11.7993 1.90184 12.9453 3.04585C14.2587 4.35938 14.9976 6.14013 15 7.99764C15.0005 9.61695 14.4396 11.1864 13.4129 12.4385C12.3861 13.6907 10.9569 14.5482 9.36889 14.8648C7.78084 15.1815 6.13211 14.9378 4.70359 14.1752C3.27506 13.4127 2.1551 12.1784 1.53449 10.6828C0.913887 9.18708 0.831027 7.52251 1.30003 5.97259C1.76903 4.42268 2.76089 3.08331 4.10662 2.18265C5.45236 1.28199 7.06873 0.875761 8.68038 1.03316ZM5.52498 5L8.00004 7.47506L10.4751 5L11.1822 5.70711L8.70714 8.18217L11.1818 10.6569L10.4747 11.364L8.00004 8.88927L5.52535 11.364L4.81824 10.6569L7.29293 8.18217L4.81787 5.70711L5.52498 5Z" fill="'),u=encodeURIComponent('"/></svg>'),G=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.12 13.9725L15 12.5L9.37927 2H7.61924L1.9985 12.5L2.87852 13.9725H14.12ZM2.87852 12.9725L8.49925 2.47249L14.12 12.9725H2.87852ZM7.98952 6H8.98802V10H7.98952V6ZM7.98952 11H8.98802V12H7.98952V11Z" fill="'),p=encodeURIComponent('"/></svg>'),h=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.12 13.9725L15 12.5L9.37927 2H7.61924L1.9985 12.5L2.87852 13.9725H14.12ZM2.87852 12.9725L8.49925 2.47249L14.12 12.9725H2.87852ZM7.98952 6H8.98802V10H7.98952V6ZM7.98952 11H8.98802V12H7.98952V11Z" fill="'),b=encodeURIComponent('"/></svg>'),I=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.5C3 4.46243 5.46243 2 8.5 2C11.5376 2 14 4.46243 14 7.5C14 10.5376 11.5376 13 8.5 13C5.46243 13 3 10.5376 3 7.5ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5ZM8 4V5H9V4H8ZM8 6L8 10H9L9 6H8Z" fill="'),r=encodeURIComponent('"/></svg>'),l=encodeURIComponent('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.5C3 4.46243 5.46243 2 8.5 2C11.5376 2 14 4.46243 14 7.5C14 10.5376 11.5376 13 8.5 13C5.46243 13 3 10.5376 3 7.5ZM2 7.5C2 3.91015 4.91015 1 8.5 1C12.0899 1 15 3.91015 15 7.5C15 11.0899 12.0899 14 8.5 14C4.91015 14 2 11.0899 2 7.5ZM8 4V5H9V4H8ZM8 6L8 10H9L9 6H8Z" fill="'),s=encodeURIComponent('"/></svg>');function d(f,N){switch(f){case n.MarkerSeverity.Hint:{const W=N===a.LIGHT?a.Color.fromHex("#75BEFF"):a.Color.fromHex("#007ACC");return N===a.LIGHT?I+encodeURIComponent(W.toString())+r:l+encodeURIComponent(W.toString())+s}case n.MarkerSeverity.Info:{const W=N===a.LIGHT?a.Color.fromHex("#007ACC"):a.Color.fromHex("#75BEFF");return N===a.LIGHT?I+encodeURIComponent(W.toString())+r:l+encodeURIComponent(W.toString())+s}case n.MarkerSeverity.Warning:{const W=N===a.LIGHT?a.Color.fromHex("#DDB100"):a.Color.fromHex("#fc0");return N===a.LIGHT?G+encodeURIComponent(W.toString())+p:h+encodeURIComponent(W.toString())+b}case n.MarkerSeverity.Error:{const W=N===a.LIGHT?a.Color.fromHex("#A1260D"):a.Color.fromHex("#F48771");return N===a.LIGHT?o+encodeURIComponent(W.toString())+c:g+encodeURIComponent(W.toString())+u}}return""}function m(f,N){return{background:`url("data:image/svg+xml,${d(f,N)}") center center no-repeat`,height:"16px",width:"16px",minWidth:"16px",marginRight:"5px"}}var v=t(52416);Object.defineProperty(e,"DARK",{enumerable:!0,get:function(){return v.DARK}}),Object.defineProperty(e,"LIGHT",{enumerable:!0,get:function(){return v.LIGHT}}),Object.defineProperty(e,"HIGH_CONTRAST_LIGHT",{enumerable:!0,get:function(){return v.HIGH_CONTRAST_LIGHT}}),Object.defineProperty(e,"HIGH_CONTRAST_DARK",{enumerable:!0,get:function(){return v.HIGH_CONTRAST_DARK}}),e.SeverityIconStyle={[a.LIGHT]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.LIGHT),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.LIGHT),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.LIGHT),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.LIGHT)},[a.DARK]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.DARK),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.DARK),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.DARK),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.DARK)},[a.HIGH_CONTRAST_DARK]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.HIGH_CONTRAST_DARK),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.HIGH_CONTRAST_DARK)},[a.HIGH_CONTRAST_LIGHT]:{[n.MarkerSeverity.Hint]:m(n.MarkerSeverity.Hint,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Info]:m(n.MarkerSeverity.Info,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Warning]:m(n.MarkerSeverity.Warning,a.HIGH_CONTRAST_LIGHT),[n.MarkerSeverity.Error]:m(n.MarkerSeverity.Error,a.HIGH_CONTRAST_LIGHT)}}},23368:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(26542),g=t(43718),u=t(57517),G=t(9132),p=t(60589),h=t(75465),b=t(93094),I=1e3;let r=class extends G.Themable{get viewReady(){return this.viewReadyDeferred.promise}constructor(){super(),this.viewSize={h:0},this.viewReadyDeferred=new g.Deferred,this.onMarkerFilterChangedEmitter=new g.Emitter,this.onMarkerFilterChanged=this.onMarkerFilterChangedEmitter.event,this.onResourceOpenEmitter=new g.Emitter,this.onResourceOpen=this.onResourceOpenEmitter.event,this.onResourceCloseEmitter=new g.Emitter,this.onResourceClose=this.onResourceCloseEmitter.event,(0,a.makeObservable)(this),this.markerViewModel=new h.MarkerViewModel(this,this.labelService)}get contextKey(){return this.markersContextKey}initContextKey(s){this.markersContextKey.initScopedContext(s),this.viewReadyDeferred.resolve()}onEditorGroupOpen(s){const m=s.payload.resource.uri.toString();this.markerManager.onEditorGroupOpen(m),this.onResourceOpenEmitter.fire(m)}onEditorGroupClose(s){const m=s.payload.resource.uri.toString();this.markerManager.onEditorGroupClose(m),this.onResourceCloseEmitter.fire(m)}resolveChildren(s){return s?b.MarkerRoot.is(s)?Array.from(this.markerViewModel.markers.values()).map(d=>new b.MarkerGroupNode(this,d,s)):b.MarkerGroupNode.is(s)?s.model.markers.map(d=>new b.MarkerNode(this,d,s)):[]:[new b.MarkerRoot(this)]}fireFilterChanged(s){this.onMarkerFilterChangedEmitter.fire(s)}getViewModel(){return this.markerViewModel}getThemeType(){return this.themeService.getCurrentThemeSync().type}getManager(){return this.markerManager}getBadge(){const s=this.markerManager.getStats();if(s){const d=s.errors+s.infos+s.warnings;if(d>I)return"1K+";if(d===I)return"1K";if(d>0)return String(d)}}};n.__decorate([(0,o.Autowired)(c.LabelService),n.__metadata("design:type",c.LabelService)],r.prototype,"labelService",void 0),n.__decorate([(0,o.Autowired)(g.MarkerManager),n.__metadata("design:type",Object)],r.prototype,"markerManager",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],r.prototype,"viewSize",void 0),n.__decorate([(0,o.Autowired)(p.MarkersContextKey),n.__metadata("design:type",p.MarkersContextKey)],r.prototype,"markersContextKey",void 0),n.__decorate([(0,g.OnEvent)(u.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorGroupOpenEvent]),n.__metadata("design:returntype",void 0)],r.prototype,"onEditorGroupOpen",null),n.__decorate([(0,g.OnEvent)(u.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.EditorGroupCloseEvent]),n.__metadata("design:returntype",void 0)],r.prototype,"onEditorGroupClose",null),r=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],r),e.MarkerService=r},15952:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerPanel=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(11666),u=n.__importDefault(t(13345)),G=n.__importDefault(t(31773)),p=t(7683),h=t(73073),b=({viewState:l})=>{const[s,d]=(0,a.useState)(),m=(0,c.useInjectable)(h.MarkerModelService);(0,a.useEffect)(()=>{const N=new c.Disposable;return N.addDispose(m.onDidUpdateTreeModel(W=>{d(W)})),m.initTreeModel(),()=>{N.dispose()}},[]);const v=(0,a.useCallback)(N=>{m.handleTreeHandler(N)},[m]),f=(0,a.useCallback)(N=>{const W=(0,a.useCallback)(()=>{m.handleItemClick(N.item)},[m]);return a.default.createElement(p.MarkerNodeRendered,{item:N.item,itemType:N.itemType,decorations:m.decorations.getDecorations(N.item),defaultLeftPadding:8,onClick:W,leftPadding:8})},[s]);return s?a.default.createElement(o.RecycleTree,{height:l.height,itemHeight:p.MARKER_TREE_NODE_HEIGHT,supportDynamicHeights:!0,onReady:v,model:s,placeholder:()=>a.default.createElement(I,null)},f):a.default.createElement("div",{className:u.default.empty},G.default.markerPanelContentEmpty())},I=()=>{const l=(0,c.useInjectable)(g.IMarkerService);return l.getViewModel().hasFilter()?a.default.createElement("div",{className:u.default.empty},G.default.markerPanelFilterContentEmpty(),a.default.createElement("div",{className:u.default.reset,onClick:()=>{l.fireFilterChanged(void 0)}},G.default.markerPanelFilterReset())):a.default.createElement("div",{className:u.default.empty},G.default.markerPanelContentEmpty())},r=({viewState:l})=>{const s=(0,c.useInjectable)(h.MarkerModelService),d=(0,c.useInjectable)(g.IMarkerService),m=(0,a.useRef)(null),v=(0,a.useCallback)(()=>{const{enactiveNodeDecoration:f}=s;f()},[s]);return(0,a.useEffect)(()=>{var f;const N=()=>{s.handleTreeBlur()};return m.current&&d.initContextKey(m.current),(f=m.current)===null||f===void 0||f.addEventListener("blur",N,!0),()=>{var W;(W=m.current)===null||W===void 0||W.removeEventListener("blur",N,!0),s.handleTreeBlur()}},[]),a.default.createElement("div",{className:u.default.markersContent,tabIndex:-1,ref:m,onClick:v},a.default.createElement(b,{viewState:l}))};e.MarkerPanel=r},75465:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerViewModel=void 0;const n=t(85608),a=t(83794),o=t(43718),c=t(11666),g=t(14298),{isFalsyOrEmpty:u,mergeSort:G}=o.arrays;function p(b,I){return o.MarkerSeverity.compare(b.severity,I.severity)||(0,o.compareRangesUsingStarts)(b,I)}class h extends o.Disposable{constructor(I,r){super(),this._service=I,this.labelService=r,this.markers=new Map,(0,a.makeObservable)(this),this.addDispose([this._service.getManager().onMarkerChanged(this._onMarkerChanged,this),this._service.onMarkerFilterChanged(this._onMarkerFilterChanged,this)])}_onMarkerChanged(I){I&&I.forEach(r=>{this.updateMarker(r,this._service.getManager().getMarkers({resource:r,severities:o.MarkerSeverity.Error|o.MarkerSeverity.Warning|o.MarkerSeverity.Info}))})}_onMarkerFilterChanged(I){this.filter=I?new g.Filter(I):void 0;const r=this._service.getManager().getResources();r&&this._onMarkerChanged(r)}updateMarker(I,r){if(u(r))this.markers.delete(I.toString());else{const l=G(r,p),{icon:s,filename:d,longname:m}=this.getUriInfos(I),v=c.MarkerModelBuilder.buildModel(I,s,d,m,l);if(this.filter){const f=this.filter.filterModel(v);f.match?this.markers.set(I,f):this.markers.delete(I)}else this.markers.set(I,v)}}getUriInfos(I){const r=new o.URI(I);return{icon:this.labelService.getIcon(r),filename:this.labelService.getName(r),longname:this.labelService.getLongName(r)}}hasData(){return this.markers.size>0}hasFilter(){return this.filter!==void 0}}n.__decorate([a.observable,n.__metadata("design:type",Map)],h.prototype,"markers",void 0),e.MarkerViewModel=h},31773:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(41869);class a{}e.default=a,a.markerTitle=()=>(0,n.localize)("markers.title"),a.markerPanelContentEmpty=()=>(0,n.localize)("markers.panel.content.empty"),a.markerPanelFilterInputPlaceholder=()=>(0,n.localize)("markers.filter.placeholder"),a.markerPanelFilterErrors=()=>(0,n.localize)("markers.panel.filter.errors","errors"),a.markerPanelFilterWarnings=()=>(0,n.localize)("markers.panel.filter.warnings","warnings"),a.markerPanelFilterInfos=()=>(0,n.localize)("markers.panel.filter.infos","infos"),a.markerPanelFilterContentEmpty=()=>(0,n.localize)("markers.filter.content.empty"),a.markerPanelFilterReset=()=>(0,n.localize)("markers.filter.reset")},7683:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MARKER_TREE_NODE_HEIGHT=e.MarkerNodeRendered=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(93094),G=n.__importDefault(t(45098)),p=(0,o.memo)(({model:d})=>o.default.createElement("div",{className:G.default.title_description},d.longname)),h=(0,o.memo)(({data:d,matches:m,className:v})=>{const f=[];let N=0;return m.forEach(W=>{N<W.start&&f.push(o.default.createElement("span",{key:`highlight-data-${N}-${W.start}`},d.substring(N,W.start))),f.push(o.default.createElement("span",{key:`highlight-data-${W.start}-${W.end}`,className:G.default.highlight},d.substring(W.start,W.end))),N=W.end}),N<d.length&&f.push(o.default.createElement("span",{key:`highlight-data-${N}-${d.length-1}`},d.substring(N))),o.default.createElement("div",{className:v},f)}),b=(0,o.memo)(({marker:d})=>{const m=d.matches&&d.matches.messageMatches;return m?o.default.createElement(h,{data:d.message,matches:m,className:G.default.detail_name}):o.default.createElement("div",{className:G.default.detail_name},d.message)}),I=(0,o.memo)(({data:d,href:m,matches:v,type:f})=>{const N=(0,g.useInjectable)(g.IOpenerService),W=v?o.default.createElement(h,{data:d,matches:v,className:f}):o.default.createElement(o.default.Fragment,null,d);return typeof m<"u"?o.default.createElement("a",{className:G.default.codeHref,rel:"noopener",target:"_blank",onClick:(0,g.withPrevented)(()=>{N.open(new g.URI(m))}),title:d},W):W}),r=(0,o.memo)(({marker:d})=>{const m=d.matches&&d.matches.sourceMatches,v=d.matches&&d.matches.codeMatches;return o.default.createElement("div",{className:G.default.detail_description},o.default.createElement("div",{className:G.default.typeContainer},m?d.source&&o.default.createElement(h,{data:d.source,matches:m,className:G.default.type}):d.source,d.code&&"(",d.code&&o.default.createElement(I,{data:d.code,href:d.codeHref,matches:v,type:G.default.type}),d.code&&")"),o.default.createElement("div",{className:G.default.position},`[Ln ${d.startLineNumber}, Col ${d.startColumn}]`))}),l=(0,o.memo)(({model:d})=>{const m=d.matches&&d.matches.filenameMatches;return m?o.default.createElement(h,{data:d.filename,matches:m,className:G.default.title}):o.default.createElement("div",{className:G.default.title},d.filename)}),s=({item:d,defaultLeftPadding:m=8,leftPadding:v=8,itemType:f,decorations:N,onClick:W})=>{const Z=(0,g.useDesignStyles)(G.default.expansion_toggle,"expansion_toggle"),y=(0,o.useCallback)(S=>{S.stopPropagation(),(f===c.TreeNodeType.TreeNode||f===c.TreeNodeType.CompositeTreeNode)&&W(S,d,f)},[W]),E=`${m+(d.depth||0)*(v||0)+(u.MarkerGroupNode.is(d)?0:16)}px`,R={lineHeight:`${e.MARKER_TREE_NODE_HEIGHT}px`,paddingLeft:E},A=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.icon,u.MarkerGroupNode.is(S)&&S.icon),style:Object.assign({height:e.MARKER_TREE_NODE_HEIGHT,lineHeight:`${e.MARKER_TREE_NODE_HEIGHT}px`},!u.MarkerGroupNode.is(S)&&S.iconStyle)}),[]),w=(0,o.useCallback)(S=>u.MarkerGroupNode.is(S)?o.default.createElement(l,{model:S.model}):o.default.createElement(b,{marker:S.marker}),[]),F=(0,o.useCallback)(S=>u.MarkerGroupNode.is(S)?o.default.createElement(p,{model:S.model}):o.default.createElement(r,{marker:S.marker}),[]),V=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.segment,G.default.tail)},Y(S)),[]),Y=(0,o.useCallback)(S=>{if(u.MarkerGroupNode.is(S))return o.default.createElement(c.Badge,{className:G.default.status},S.badge)},[]),_=(0,o.useCallback)(S=>o.default.createElement("div",{className:(0,a.default)(G.default.segment,Z,(0,g.getIcon)("arrow-right"),{[`${G.default.mod_collapsed}`]:!S.expanded})}),[]),H=(0,o.useCallback)(S=>{if(u.MarkerGroupNode.is(S))return _(S)},[]),X=(0,o.useCallback)(()=>d.tooltip,[d]);return o.default.createElement("div",{key:d.id,onClick:y,title:X(),className:(0,a.default)(G.default.marker_node,N?N.classlist:null),style:R,"data-id":d.id},o.default.createElement("div",{className:G.default.content},H(d),A(d),o.default.createElement("div",{className:G.default.overflow_wrap},w(d),F(d)),V(d)))};e.MarkerNodeRendered=s,e.MARKER_TREE_NODE_HEIGHT=22},73073:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerModelService=e.MarkerTreeModel=void 0;const n=t(85608),a=t(76003),o=t(97267),c=t(41869),g=t(54414),u=t(6287),G=t(93094),p=n.__importDefault(t(45098));let h=class extends o.TreeModel{constructor(r){super(),this.init(r)}};h=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[G.MarkerRoot])],h),e.MarkerTreeModel=h;let b=class{constructor(){this.selectedDecoration=new o.Decoration(p.default.mod_selected),this.focusedDecoration=new o.Decoration(p.default.mod_focused),this._selectedNodes=[],this.onDidUpdateTreeModelEmitter=new c.Emitter,this.disposableCollection=new c.DisposableCollection,this._whenReady=new c.Deferred,this.activeNodeDecoration=(r,l=!0)=>{var s;if(this.preContextMenuFocusedNode&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedNode),this.selectedDecoration.removeTarget(this.preContextMenuFocusedNode),this.preContextMenuFocusedNode=null),r){for(const d of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(d);for(const d of this.focusedDecoration.appliedTargets.keys())this.focusedDecoration.removeTarget(d);this.selectedDecoration.addTarget(r),this.focusedDecoration.addTarget(r),this._focusedNode=r,this._selectedNodes=[r],l&&((s=this.treeModel)===null||s===void 0||s.dispatchChange())}},this.enactiveNodeDecoration=()=>{var r;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(r=this.treeModel)===null||r===void 0||r.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=r=>{this.activeNodeDecoration(r),G.MarkerGroupNode.is(r)?this.toggleDirectory(r):r.marker&&this.workbenchEditorService.open(new c.URI(r.marker.resource),{disableNavigate:!0,range:{startLineNumber:r.marker.startLineNumber,startColumn:r.marker.startColumn,endLineNumber:r.marker.endLineNumber,endColumn:r.marker.endColumn}})},this.toggleDirectory=async r=>{r.expanded?this.markerTreeHandle.collapseNode(r):this.markerTreeHandle.expandNode(r)},this.isDirtyTree=!1}get whenReady(){return this._whenReady.promise}get flushEventQueuePromise(){return this.refreshDeferred&&this.refreshDeferred.promise}get markerTreeHandle(){return this._markerTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}async initTreeModel(){const r=await this.markerService.resolveChildren();if(!r)return;const l=r[0];l&&(this._treeModel=this.injector.get(h,[l]),await this._treeModel.ensureReady,this.initDecorations(l),this.disposableCollection.push(this.markerService.getManager().onMarkerChanged(()=>{this.refresh()})),this.disposableCollection.push(this.markerService.onMarkerFilterChanged(()=>{this.refresh()})),this.onDidUpdateTreeModelEmitter.fire(this._treeModel),this._whenReady.resolve())}initDecorations(r){return this._decorations=new o.DecorationsManager(r),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}handleTreeHandler(r){this._markerTreeHandle=r}async refresh(){await this.whenReady,await this.markerService.viewReady,(0,c.runWhenIdle)(()=>{this.markerService.contextKey&&this.markerService.contextKey.markersTreeVisibility.get()?this.treeModel.root.refresh():this.isDirtyTree=!0})}activate(){this.markerService.contextKey.markersTreeVisibility&&(this.markerService.contextKey.markersTreeVisibility.set(!0),this.isDirtyTree&&(this.refresh(),this.isDirtyTree=!1))}deactivate(){this.markerService.contextKey.markersTreeVisibility&&this.markerService.contextKey.markersTreeVisibility.set(!1)}dispose(){this.disposableCollection.dispose()}};n.__decorate([(0,a.Autowired)(u.IMarkerService),n.__metadata("design:type",Function)],b.prototype,"markerService",void 0),n.__decorate([(0,a.Autowired)(g.WorkbenchEditorService),n.__metadata("design:type",g.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],b.prototype,"injector",void 0),b=n.__decorate([(0,a.Injectable)()],b),e.MarkerModelService=b},93094:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNode=e.MarkerGroupNode=e.MarkerRoot=void 0;const n=t(97267),a=t(75068);class o extends n.CompositeTreeNode{static is(G){return!!G&&!G.parent}constructor(G){super(G,void 0)}get expanded(){return!0}}e.MarkerRoot=o;class c extends n.CompositeTreeNode{constructor(G,p,h){super(G,h),this.model=p,this.isExpanded=!0}get tooltip(){return this.model.resource}get badge(){return this.model.size()}get icon(){return this.model.icon}dispose(){super.dispose()}}e.MarkerGroupNode=c;class g extends n.TreeNode{constructor(G,p,h){super(G,h,void 0),this.marker=p}get iconStyle(){return a.SeverityIconStyle[this._tree.getThemeType()][this.marker.severity]}get tooltip(){return this.marker.message}}e.MarkerNode=g},11666:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(6287),e),n.__exportStar(t(96835),e)},96835:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasToIgnoreCase=e.isEqualAuthority=e.relativePath=e.ResourceGlobMatcher=void 0;const n=t(43718);class a{constructor(G,p){this.expressionsByRoot=n.TernarySearchTree.forPaths(),this.globalExpression=(0,n.parseGlob)(G);for(const h of p)this.expressionsByRoot.set(h.root.toString(),{root:h.root,expression:(0,n.parseGlob)(h.expression)})}matches(G){const p=this.expressionsByRoot.findSubstr(G.toString());if(p){const h=o(p.root,G);if(h&&p.expression(h))return!0}return!!this.globalExpression(G.codeUri.path)}}e.ResourceGlobMatcher=a;function o(u,G,p=g(u)){if(u.scheme!==G.scheme||!c(u.authority,G.authority))return;if(u.scheme===n.Schemes.file){const I=n.path.relative(u.codeUri.path,G.codeUri.path);return n.isWindows?n.path.toSlashes(I):I}let h=u.codeUri.path||"/";const b=G.codeUri.path||"/";if(p){let I=0;for(const r=Math.min(h.length,b.length);I<r&&!(h.charCodeAt(I)!==b.charCodeAt(I)&&h.charAt(I).toLowerCase()!==b.charAt(I).toLowerCase());I++);h=b.substr(0,I)+h.substr(I)}return n.path.relative(h,b)}e.relativePath=o;function c(u,G){return u===G||n.strings.equalsIgnoreCase(u,G)}e.isEqualAuthority=c;function g(u){return u&&u.scheme===n.Schemes.file?!n.isLinux:!0}e.hasToIgnoreCase=g},6287:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerModelBuilder=e.MarkerItemBuilder=e.IMarkerService=e.MARKER_CONTAINER_ID=void 0;var n=t(30144);Object.defineProperty(e,"MARKER_CONTAINER_ID",{enumerable:!0,get:function(){return n.MARKER_CONTAINER_ID}}),e.IMarkerService=Symbol("IMarkerService");class a{static buildFilterItem(g,u,G){return Object.assign(Object.assign({},g),{match:u,matches:G})}}e.MarkerItemBuilder=a;class o{static buildModel(g,u,G,p,h){return{match:!0,resource:g,icon:u,filename:G,longname:p,markers:h,size:()=>h.length}}static buildFilterModel(g,u,G,p,h){const b=G||p;return Object.assign(Object.assign({},g),{match:b,markers:u,matches:h,size:()=>{if(b)return u.length;let I=0;return u.forEach(r=>{r.match&&I++}),I}})}}e.MarkerModelBuilder=o},64523:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(19727),g=t(70842),u=t(64267);let G=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[g.MenuBarContribution,{token:u.AbstractMenubarStore,useClass:u.MenubarStore}],this.webProviders=[c.MenuBarWebContribution]}};G=n.__decorate([(0,a.Injectable)()],G),e.MenuBarModule=G},19727:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarWebContribution=void 0;const n=t(85608),a=t(41869),o=t(68456),c=t(98295),g=t(55496);let u=class extends a.Disposable{registerComponent(p){p.register("@opensumi/ide-toolbar-action",{id:"ide-toolbar-action",component:g.ToolbarAction})}registerToolbarActions(p){p.addLocation("menu-right"),p.addLocation("menu-left")}};u=n.__decorate([(0,c.Domain)(o.ComponentContribution,a.ToolBarActionContribution)],u),e.MenuBarWebContribution=u},70842:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBarContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68456),g=t(98295),u=t(64267),G=t(47905);let p=class extends o.Disposable{constructor(){super(),this.addDispose(this.menubarStore.onDidMenuBarChange(b=>{this.menubarStore.registerMenusBarByCompact(b)})),this.addDispose(this.preferenceService.onSpecificPreferenceChange("menubar.compactMode",({newValue:b})=>{b?this.menubarStore.registerMenuItemByCompactMenu():this.menubarStore.unregisterMenusBarByCompact()}))}registerComponent(b){b.register("@opensumi/ide-menu-bar",{id:"ide-menu-bar",component:G.MenuBarMixToolbarAction},{size:27})}};n.__decorate([(0,a.Autowired)(u.MenubarStore),n.__metadata("design:type",u.MenubarStore)],p.prototype,"menubarStore",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),p=n.__decorate([(0,g.Domain)(c.ComponentContribution),n.__metadata("design:paramtypes",[])],p),e.MenuBarContribution=p},64267:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenubarStore=e.AbstractMenubarStore=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(83794),c=t(76003),g=t(41869),u=t(93899);class G extends g.Disposable{}e.AbstractMenubarStore=G;let p=class extends g.Disposable{get onDidMenuBarChange(){return this._onDidMenuBarChange.event}constructor(){super(),this.menubarItems=o.observable.array([]),this.menuItems=o.observable.map(),this._onDidMenuBarChange=new g.Emitter,this.handleMenubarClick=(0,a.default)(b=>{this.updateMenuNodes(b)},500,{leading:!0,trailing:!0}),(0,o.makeObservable)(this),this.build(),this.registerDispose(this.menubarService.onDidMenubarChange(this.handleMenubarChanged,this,this.disposables)),this.registerDispose(this.menubarService.onDidMenuChange(this.handleMenuChanged,this,this.disposables))}getMenubarSubItems(b){return this.menubarService.rebuildMenuNodes(b),this.menubarService.getMenuNodes(b)||[]}updateMenuNodes(b){const I=this.getMenubarSubItems(b);this.menuItems.set(b,I)}build(){const b=this.menubarService.getMenubarItems();this.menubarItems.splice(0,this.menubarItems.length,...b),b.forEach(({id:I})=>{this.updateMenuNodes(I)}),this._onDidMenuBarChange.fire(this.menubarItems)}handleMenuChanged(b){this.updateMenuNodes(b)}handleMenubarChanged(){const b=this.menubarService.getMenubarItems();this.menubarItems.replace(b),this._onDidMenuBarChange.fire(this.menubarItems)}unregisterMenusBarByCompact(b=u.MenuId.ActivityBarTopExtra){this.menuRegistry.unregisterMenuItem(b,u.MenuId.MenubarCompactMenu)}registerMenuItemByCompactMenu(b=u.MenuId.ActivityBarTopExtra){this.menuRegistry.registerMenuItem(b,{submenu:u.MenuId.MenubarCompactMenu,iconClass:(0,g.getExternalIcon)("menu"),order:1,group:"navigation"})}registerMenusBarByCompact(b=this.menubarItems){this.menuRegistry.registerMenuItems(u.MenuId.MenubarCompactMenu,b.map(I=>({label:I.label,submenu:I.id})))}};n.__decorate([(0,c.Autowired)(u.AbstractMenubarService),n.__metadata("design:type",u.AbstractMenubarService)],p.prototype,"menubarService",void 0),n.__decorate([(0,c.Autowired)(u.IMenuRegistry),n.__metadata("design:type",u.IMenuRegistry)],p.prototype,"menuRegistry",void 0),n.__decorate([o.observable,n.__metadata("design:type",Object)],p.prototype,"menubarItems",void 0),n.__decorate([o.observable,n.__metadata("design:type",Object)],p.prototype,"menuItems",void 0),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],p.prototype,"updateMenuNodes",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"build",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],p.prototype,"handleMenubarChanged",null),n.__decorate([o.action.bound,n.__metadata("design:type",Function)],p.prototype,"handleMenubarClick",void 0),p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.MenubarStore=p},47905:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconMenuBar=e.MenuBarActionWrapper=e.MenuBarMixToolbarAction=e.MenuBar=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(97267),u=t(99613),G=t(40604),p=t(41869),h=t(25918),b=t(1149),I=t(93899),r=t(42912),l=n.__importDefault(t(83747)),s=t(64267),d=(0,o.observer)(({id:f,label:N,focusMode:W,afterMenubarClick:Z,afterMenuClick:y})=>{const E=(0,p.useInjectable)(s.MenubarStore),R=(0,p.useInjectable)(r.IIconService),[A,w]=c.default.useState(!1),F=c.default.useCallback(()=>{E.handleMenubarClick(f),w(W?!0:X=>!X),Z()},[f]),V=()=>{w(!1),y()},Y=c.default.useCallback(()=>{W&&E.handleMenubarClick(f)},[f,W]),_=X=>{w(X)},H=E.menuItems.get(f)||[];return c.default.createElement(u.Dropdown,{className:"kt-menu",transitionName:"",align:{offset:[0,0]},visible:A,onVisibleChange:_,overlay:c.default.createElement(h.MenuActionList,{data:H,afterClick:V,iconService:R}),trigger:W?["click","hover"]:["click"]},c.default.createElement("div",{className:(0,a.default)(l.default.menubar,{[l.default["menu-open"]]:A}),onMouseOver:Y,onClick:F},N))});e.MenuBar=(0,o.observer)(()=>{var f;const N=(0,p.useInjectable)(s.MenubarStore),W=(0,p.useInjectable)(p.ComponentRegistry),Z=(0,p.useInjectable)(b.LayoutViewSizeConfig),[y,E]=c.default.useState(!1),R=c.default.useRef(),A=c.default.useCallback(Y=>{!R.current&&Y.relatedTarget&&(R.current=Y.relatedTarget)},[]),w=c.default.useCallback(()=>{R.current&&(R.current.focus(),R.current=void 0),E(!1)},[y]),F=c.default.useCallback(()=>{E(!1)},[y]),V=(f=W.getComponentRegistryInfo("@opensumi/ide-menu-bar-logo"))===null||f===void 0?void 0:f.views[0].component;return c.default.createElement(g.ClickOutside,{className:l.default.menubars,style:{height:Z.menubarHeight},mouseEvents:["click","contextmenu"],tabIndex:-1,onFocus:A,onOutsideClick:F},V?c.default.createElement(V,null):c.default.createElement("div",{className:l.default.logoIconEmpty}),N.menubarItems.map(({id:Y,label:_})=>c.default.createElement(d,{key:Y,id:Y,label:_,focusMode:y,afterMenuClick:w,afterMenubarClick:()=>E(H=>!H)})))}),e.MenuBar.displayName="MenuBar";const m=f=>c.default.createElement("div",{className:(0,a.default)(l.default.menubarWrapper,f.className)},c.default.createElement(e.MenuBar,null),c.default.createElement(p.SlotRenderer,{slot:"action",flex:1}));e.MenuBarMixToolbarAction=m,e.MenuBarMixToolbarAction.displayName="MenuBarMixToolbarAction",e.MenuBarActionWrapper=(0,G.Deprecated)(e.MenuBarMixToolbarAction,"please use `MenuBarMixToolbarAction`");const v=()=>{const N=(0,p.useInjectable)(I.AbstractMenuService).createMenu(I.MenuId.IconMenubarContext);return c.default.createElement("div",{className:l.default.icon_menubar_container},c.default.createElement(h.InlineActionBar,{menus:N,type:"icon",className:l.default.menubar_action,isFlattenMenu:!0}))};e.IconMenuBar=v},55496:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToolbarAction=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=t(25150),c=n.__importDefault(t(14041)),g=t(41869),u=n.__importDefault(t(30582));e.ToolbarAction=(0,o.observer)(()=>c.default.createElement("div",{className:u.default.toolbarActionsWrapper},c.default.createElement(g.ToolbarLocation,{location:"menu-left",preferences:{noDropDown:!0},className:(0,a.default)(u.default.toolbarActions,u.default.toolbarActionsLeft)}),c.default.createElement(g.ToolbarLocation,{location:"menu-right",className:(0,a.default)(u.default.toolbarActions,u.default.toolbarActionsRight)})))},87308:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(58065),e)},72106:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoEnhanceModule=void 0;const n=t(85608),a=t(76003),o=t(41869);let c=class{onDidStart(){}};c=n.__decorate([(0,o.Domain)(o.ClientAppContribution)],c);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c]}};g=n.__decorate([(0,a.Injectable)()],g),e.MonacoEnhanceModule=g},48327:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PeekViewWidget=void 0;const n=t(41869),a=t(43718),o=t(58065);class c extends o.ZoneWidget{constructor(u,G={}){super(u),this.editor=u,this.options=G,this._onDidClose=new a.Emitter,this.onDidClose=this._onDidClose.event}dispose(){this.isDisposed||(this.isDisposed=!0,super.dispose(),this._onDidClose.fire(this))}_fillContainer(u){this.setCssClass("peekview-widget"),this._headElement=document.createElement("div"),this._headElement.classList.add("head"),this._bodyElement=document.createElement("div"),this._bodyElement.classList.add("body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),u.appendChild(this._headElement),u.appendChild(this._bodyElement)}async _fillHead(u,G){const p=document.createElement("div");p.classList.add("peekview-title"),this.options.supportOnTitleClick&&p.classList.add("clickable"),this._headElement.append(p),this._fillTitleIcon(p),this._primaryHeading=document.createElement("span"),this._primaryHeading.classList.add("filename"),this._secondaryHeading=document.createElement("span"),this._secondaryHeading.classList.add("dirname"),this._metaHeading=document.createElement("span"),this._metaHeading.classList.add("meta"),p.append(this._primaryHeading,this._secondaryHeading,this._metaHeading),this._actionbarElement=document.createElement("div"),this._actionbarElement.classList.add("peekview-actions"),await this._fillActionBarOptions(this._actionbarElement);const h=document.createElement("span");h.className=`action-item ${(0,n.getExternalIcon)("chrome-close")}`;const b=()=>this.dispose();h.addEventListener("click",b),this.addDispose(a.Disposable.create(()=>{h.removeEventListener("click",b)})),this._actionbarElement.append(h),this._headElement.append(this._actionbarElement)}_fillTitleIcon(u){}_onTitleClick(u){}setTitle(u,G){if(this._primaryHeading&&this._secondaryHeading)if(this._primaryHeading.innerText=u,this._primaryHeading.setAttribute("title",u),G)this._secondaryHeading.innerText=G;else for(;this._secondaryHeading.firstChild;)this._secondaryHeading.firstChild.remove()}setMetaTitle(u){this._metaHeading&&(u?(this._metaHeading.innerText=u,this._metaHeading.style.display=""):this._metaHeading.style.display="none")}}e.PeekViewWidget=c},58065:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizeZoneWidget=e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const n=t(85608),a=t(41869),o=t(6397),c=n.__importStar(t(20868)),g=t(52416),u=t(50189),G=t(16011),p=t(31324),h=t(43255);class b{constructor(f,N,W,Z,y,E,R,A){this.id=(0,a.uuid)(),this.domNode=f,this.afterLineNumber=N,this.afterColumn=W,this.heightInLines=Z,this.showInHiddenAreas=R,this.ordinal=A,this._onDomNodeTop=y,this._onComputedHeight=E}onDomNodeTop(f){this._onDomNodeTop(f)}onComputedHeight(f){this._onComputedHeight(f)}}e.ViewZoneDelegate=b;class I extends a.Disposable{constructor(f,N){super(),this.id=f,this.dom=N}getPosition(){return null}getDomNode(){return this.dom}getId(){return this.id}}e.OverlayWidgetDelegate=I,I.id="monaco-enhance-overlay-widget";class r{constructor(f){this._editor=f,this._ruleName=r._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color="rgba(0, 122, 204)",this._height=-1}dispose(){this.hide(),(0,u.removeCSSRulesContainingSelector)(this._ruleName)}set color(f){this._color!==f&&(this._color=f,this._updateStyle())}set height(f){this._height!==f&&(this._height=f,this._updateStyle())}_updateStyle(){(0,u.removeCSSRulesContainingSelector)(this._ruleName),(0,u.createCSSRule)(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: 0px; margin-left: -${this._height}px; width: 0px !important; left: 0px !important;`)}show(f){this._updateStyle(),f.startColumn===1&&(f=Object.assign(Object.assign({},f),{startLineNumber:f.endLineNumber,startColumn:2})),this._decorations.set([{range:f,options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:h.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}])}hide(){this._decorations.clear()}}r._IdGenerator=new o.IdGenerator(".arrow-decoration-");const l=new g.Color(new g.RGBA(0,122,204)),s={showArrow:!0,showFrame:!0,className:"",frameColor:l,arrowColor:l,keepEditorSelection:!1};class d extends a.Disposable{constructor(f,N){super(),this.editor=f,this.options=N,this._arrow=null,this.width=0,this.left=0,this._resizeSash=null,this._onDomNodeTop=new a.Emitter,this.onDomNodeTop=this._onDomNodeTop.event,this._container=document.createElement("div"),this._listenEvents()}_showImpl(f,N){var W,Z,y;const E=f,{endLineNumber:R,endColumn:A}=f,w=document.createElement("div"),F=this.editor.getLayoutInfo(),V=this.editor.getOption(p.EditorOption.lineHeight);if(w.style.overflow="hidden",this.editor.changeViewZones(_=>{var H,X;this._viewZone&&(_.removeZone(this._viewZone.id),this._viewZone=null),this._overlay&&(this.editor.removeOverlayWidget(this._overlay),this._overlay=null),this._container.style.top="-1000px",this._viewZone=new b(w,R,A,N,S=>this._onViewZoneTop(S),S=>this._onViewZoneHeight(S),(H=this.options)===null||H===void 0?void 0:H.showInHiddenAreas,(X=this.options)===null||X===void 0?void 0:X.ordinal),this._viewZone.id=_.addZone(this._viewZone),this._overlay=new I(I.id+this._viewZone.id,this._container),this.editor.addOverlayWidget(this._overlay)}),this._arrow||(this._arrow=new r(this.editor),this.disposables.push(this._arrow)),!((W=this.options)===null||W===void 0)&&W.arrowColor){const _=(y=(Z=this.options)===null||Z===void 0?void 0:Z.arrowColor)===null||y===void 0?void 0:y.toString();this._arrow.color=_}const Y=Math.round(V/3);this._arrow.height=Y,this._arrow.show(E),this.layout(F)}get currentRange(){return this._current}get currentHeightInLines(){return this._linesCount}show(f,N){this._current=f,this._linesCount=N,this.applyClass(),this._showImpl(f,N)}hideImpl(){var f;this._viewZone&&this.editor.changeViewZones(N=>{this._viewZone&&(N.removeZone(this._viewZone.id),this._viewZone=null)}),this._overlay&&(this.editor.removeOverlayWidget(this._overlay),this._overlay=null),this._container.remove(),(f=this._arrow)===null||f===void 0||f.hide()}hide(){this.hideImpl()}create(){this._fillContainer(this._container),this._initSash(),this.applyStyle(),this._arrow=new r(this.editor),this.disposables.push(this._arrow)}_getLeft(f){return f.minimap&&f.minimap.minimapWidth>0&&f.minimap.minimapLeft===0?f.minimap.minimapWidth:0}_getWidth(f){const N=f.minimap?f.minimap.minimapWidth+5:0;return f.width-N-f.verticalScrollbarWidth}_onViewZoneTop(f){this._container.style.top=`${f}px`,this._onDomNodeTop.fire(f)}_onViewZoneHeight(f){this._container.style.height=`${f}px`,this._resizeSash&&this._resizeSash.layout()}setCssClass(f,N){this._container&&(N&&this._container.classList.remove(N),this._container.classList.add(f))}layout(f){this.left=this._getLeft(f),this.width=this._getWidth(f),this.render()}render(){this._container.style.width=`${this.width}px`,this._container.style.left=`${this.left}px`,this.applyStyle()}_relayout(f){this._viewZone&&this._viewZone.heightInLines!==f&&this.editor.changeViewZones(N=>{this._viewZone&&(this._viewZone.heightInLines=f,N.layoutZone(this._viewZone.id))})}_listenEvents(){this.editor.onDidLayoutChange(f=>{this.layout(f)})}_initSash(){var f;if(this._resizeSash)return;this._resizeSash=new G.Sash(this._container,this,{orientation:G.Orientation.HORIZONTAL}),this.addDispose(this._resizeSash),!((f=this.options)===null||f===void 0)&&f.isResizeable||(this._resizeSash.state=G.SashState.Disabled);let N;this.addDispose(this._resizeSash.onDidStart(W=>{this._viewZone&&(N={startY:W.startY,heightInLines:this._viewZone.heightInLines})})),this.addDispose(this._resizeSash.onDidEnd(()=>{N=void 0})),this.addDispose(this._resizeSash.onDidChange(W=>{if(N){const Z=(W.currentY-N.startY)/this.editor.getOption(p.EditorOption.lineHeight),y=Z<0?Math.ceil(Z):Math.floor(Z),E=N.heightInLines+y;E>5&&E<35&&this._relayout(E)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return this._container.style.height===null?0:parseInt(this._container.style.height,10)}dispose(){this.hideImpl(),super.dispose()}}e.ZoneWidget=d;class m extends d{constructor(f,N,W){super(f,W),this.editor=f,this.range=N,this.options=W,this._onChangeZoneWidget=new a.Emitter,this.onChangeZoneWidget=this._onChangeZoneWidget.event,this.onFirstDisplay=a.Event.once(this.onDomNodeTop),this._isShow=!1,this.lineHeight=this.editor.getOption(c.editor.EditorOption.lineHeight),this.addDispose(this.editor.onDidChangeConfiguration(Z=>{Z.hasChanged(c.editor.EditorOption.lineHeight)&&(this.lineHeight=this.editor.getOption(c.editor.EditorOption.lineHeight),this.wrap&&this.resizeZoneWidget())})),a.Event.once(this.onDomNodeTop)(()=>{window.requestAnimationFrame(()=>{this.resizeZoneWidget()})})}observeContainer(f){this.wrap=f;const N=new IntersectionObserver(Z=>{for(const y of Z)y.isIntersecting&&this.resizeZoneWidget()}),W=new MutationObserver(Z=>{Z.forEach(y=>{if(y.type==="childList"){for(const E of Array.from(y.target.childNodes))if(E.nodeType===Node.ELEMENT_NODE&&E.querySelectorAll){const R=E.querySelectorAll("img");R.length&&R.forEach(A=>{const w=new a.DomListener(A,"load",()=>{this.resizeZoneWidget(),w.dispose()});this.addDispose(w)})}}}),this.resizeZoneWidget()});return N.observe(this.wrap),W.observe(this.wrap,{childList:!0,subtree:!0}),{dispose(){N.disconnect(),W.disconnect()}}}resizeZoneWidget(){let f=this.wrap.offsetHeight;if(!f&&this.preWrapperHeight&&(f=this.preWrapperHeight),f){const N=f/this.lineHeight;this._isShow&&this.heightInLines!==N&&(this.heightInLines=N,this.show(),this.preWrapperHeight=f)}}show(){const f=!this.wrap.offsetHeight&&!this.preWrapperHeight;this.resize(),this.fireChangeEvent(),f&&this.resizeZoneWidget()}fireChangeEvent(){this._onChangeZoneWidget.fire(this.range)}resize(){const f=document.activeElement;super.show(this.range,this.heightInLines),f?.focus({preventScroll:!0})}}e.ResizeZoneWidget=m},20303:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(87308),e)},52659:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactInlineContentWidget=void 0;const n=t(85608),a=n.__importDefault(t(97331)),o=n.__importDefault(t(14041)),c=n.__importDefault(t(25873)),g=t(76003),u=t(41869),G=t(43718),p=n.__importStar(t(33096)),h=t(90052);let b=class extends G.Disposable{get isHidden(){return this._isHidden}constructor(r){super(),this.editor=r,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this.positionPreference=[h.ContentWidgetPositionPreference.BELOW],this.root=null,this.addDispose((0,G.runWhenIdle)(()=>{this.root=c.default.createRoot(this.getDomNode()),this.root.render(o.default.createElement(u.ConfigProvider,{value:this.appConfig},this.renderView())),this.layoutContentWidget()})),this.addDispose(G.Disposable.create(()=>{this.hide(),this.root&&this.root.unmount()}))}setPositionPreference(r){this.positionPreference=r}setOptions(r){this.options=r}show(r){r&&(this.disposed||this.options&&this.options.selection&&this.options.selection.equalsRange(r.selection)||(this.setOptions(r),this._isHidden=!1,this.editor.addContentWidget(this)))}hide(){this._isHidden=!0,this.editor.removeContentWidget(this)}resume(){this._isHidden&&(this._isHidden=!1,this.editor.addContentWidget(this))}getId(){return this.id()}layoutContentWidget(){this.editor.layoutContentWidget(this)}getClassName(){return this.getId()}getDomNode(){this.domNode||(this.domNode=document.createElement("div"),requestAnimationFrame(()=>{this.domNode.classList.add(this.getClassName()),this.domNode.style.zIndex=u.StackingLevelStr.Overlay}));const r=(0,a.default)(()=>{requestAnimationFrame(()=>this.layoutContentWidget())},G.FRAME_THREE),l=p.createLayoutEventType(this.id());return this.domNode.addEventListener(l,r),this.addDispose(G.Disposable.create(()=>{this.domNode.removeEventListener(l,r)})),this.domNode}getPosition(){if(!this.options)return null;const{position:r}=this.options;return r?{position:r,preference:this.positionPreference}:null}isOutOfArea(){const l=this.editor.getLayoutInfo().contentLeft,s=this.getMiniMapWidth();return this.editor.getLayoutInfo().width-l-s<270}getMiniMapWidth(){return this.editor.getLayoutInfo().minimap.minimapWidth}getLineHeight(){return this.editor.getOption(p.EditorOption.lineHeight)}};n.__decorate([(0,g.Autowired)(u.AppConfig),n.__metadata("design:type",Object)],b.prototype,"appConfig",void 0),b=n.__decorate([(0,g.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object])],b),e.ReactInlineContentWidget=b},55218:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICallHierarchyService=e.CallHierarchyProviderRegistry=void 0;const n=t(40497);e.CallHierarchyProviderRegistry=new n.LanguageFeatureRegistry,e.ICallHierarchyService=Symbol("ICallHierarchyService")},21880:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMonacoActionRegistry=e.IMonacoCommandsRegistry=e.ICommandServiceToken=e.EditorExtensionsRegistry=e.CommandsRegistry=void 0;var n=t(71827);Object.defineProperty(e,"CommandsRegistry",{enumerable:!0,get:function(){return n.CommandsRegistry}});var a=t(97682);Object.defineProperty(e,"EditorExtensionsRegistry",{enumerable:!0,get:function(){return a.EditorExtensionsRegistry}}),e.ICommandServiceToken=Symbol("ICommandService"),e.IMonacoCommandsRegistry=Symbol("IMonacoCommandsRegistry"),e.IMonacoActionRegistry=Symbol("IMonacoActionRegistry")},61468:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeActions=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(81175),G=n.__importDefault(t(46843)),p=({uri:h,summary:b,editorType:I,containerClassName:r,onReset:l,onSwitchEditor:s,canNavigate:d,handleNext:m,handlePrev:v,beforeAddons:f,afterAddons:N,isAIResolving:W,onAIResolve:Z})=>{const y=(0,u.useInMergeChanges)(h?.toString()||""),E=(0,c.useInjectable)(c.AINativeConfigService),R=(0,o.useCallback)(()=>E.capabilities.supportsConflictResolve,[E]),A=(0,o.useCallback)(()=>{d&&v()},[v,d]),w=(0,o.useCallback)(()=>{d&&m()},[m,d]);return o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_float_container,r)},o.default.createElement("div",{className:G.default.merge_editor_float_container_info},o.default.createElement("div",{className:G.default.merge_editor_nav_operator},o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_nav_operator_btn,{[G.default.disabled]:!d}),onClick:A},(0,c.localize)("mergeEditor.conflict.prev")),o.default.createElement("div",{className:G.default["vertical-divider"]}),o.default.createElement("div",{className:(0,a.default)(G.default.merge_editor_nav_operator_btn,{[G.default.disabled]:!d}),onClick:w},(0,c.localize)("mergeEditor.conflict.next"))),o.default.createElement("div",{className:G.default["vertical-divider"]}),o.default.createElement("div",null,b)),o.default.createElement("div",{className:G.default["horizontal-divider"]}),o.default.createElement("div",{className:G.default.merge_editor_float_container_operation_bar},I==="text"&&y&&o.default.createElement(g.Button,{id:"merge.editor.open.3way",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:s,style:{alignSelf:"flex-start"}},o.default.createElement(g.Icon,{icon:"swap"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.open.3way"))),I==="3way"&&o.default.createElement(g.Button,{id:"merge.editor.open.tradition",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:s},o.default.createElement(g.Icon,{icon:"swap"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.open.tradition"))),o.default.createElement("div",{style:{flex:1}}),f?o.default.createElement(o.default.Fragment,null,f,o.default.createElement("span",{className:G.default.line_vertical})):null,o.default.createElement(g.Button,{id:"merge.editor.rest",className:G.default.merge_conflict_bottom_btn,size:"default",onClick:l},o.default.createElement(g.Icon,{icon:"discard"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.reset"))),R()&&o.default.createElement(g.Button,{id:"merge.editor.conflict.resolve.all",size:"default",className:`${G.default.merge_conflict_bottom_btn} ${G.default.magic_btn}`,onClick:Z},W?o.default.createElement(o.default.Fragment,null,o.default.createElement(g.Icon,{icon:"circle-pause"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.conflict.ai.resolve.all.stop"))):o.default.createElement(o.default.Fragment,null,o.default.createElement(g.Icon,{icon:"magic-wand"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.conflict.ai.resolve.all")))),N?o.default.createElement(o.default.Fragment,null,o.default.createElement("span",{className:G.default.line_vertical}),N):null))};e.MergeActions=p},34712:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(34239),e)},93961:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappingManagerService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(9514),g=t(89995),u=t(33078),G=t(24093);let p=class extends o.Disposable{constructor(){super(),this.documentMappingTurnLeft=this.injector.get(u.DocumentMapping,[G.EDiffRangeTurn.ORIGIN]),this.documentMappingTurnRight=this.injector.get(u.DocumentMapping,[G.EDiffRangeTurn.MODIFIED]),this.markCompleteFactoryTurnLeft=this.markCompleteFactory(G.EDiffRangeTurn.ORIGIN),this.markCompleteFactoryTurnRight=this.markCompleteFactory(G.EDiffRangeTurn.MODIFIED),this.revokeActionsFactoryTurnLeft=this.revokeActionsFactory(G.EDiffRangeTurn.ORIGIN),this.revokeActionsFactoryTurnRight=this.revokeActionsFactory(G.EDiffRangeTurn.MODIFIED)}revokeActionsFactory(b){const I=b===G.EDiffRangeTurn.ORIGIN?this.documentMappingTurnLeft:this.documentMappingTurnRight;return r=>{const l=I.reverse(r);if(!l)return;l.cancel();const s=I.adjacentComputeRangeMap.get(l.id);s&&s.cancel()}}markCompleteFactory(b){const I=b===G.EDiffRangeTurn.ORIGIN?this.documentMappingTurnLeft:this.documentMappingTurnRight;return(r,l)=>{const s=I.adjacentComputeRangeMap.get(r.id);if(s&&(r.done(l),s.done(l),s.turnDirection===G.ETurnDirection.BOTH)){const d=r.turnDirection===G.ETurnDirection.CURRENT?this.documentMappingTurnRight:this.documentMappingTurnLeft,m=d.reverse(s);if(!m)return;const v=d.adjacentComputeRangeMap.get(m.id);if(!v)return;v.done(l)}}}inputComputeResultRangeMappingTurnLeft(b){this.documentMappingTurnLeft.inputComputeResultRangeMapping(b)}inputComputeResultRangeMappingTurnRight(b){this.documentMappingTurnRight.inputComputeResultRangeMapping(b)}markCompleteTurnLeft(b,I){this.markCompleteFactoryTurnLeft(b,I)}markCompleteTurnRight(b,I){this.markCompleteFactoryTurnRight(b,I)}revokeActionsTurnLeft(b){this.revokeActionsFactoryTurnLeft(b)}revokeActionsTurnRight(b){this.revokeActionsFactoryTurnRight(b)}clearMapping(){this.documentMappingTurnLeft.clear(),this.documentMappingTurnRight.clear()}findNextLineRanges(b){const[I,r]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(l=>l.findNextOppositeRange(b));return{[G.EditorViewType.CURRENT]:I,[G.EditorViewType.INCOMING]:r}}findTouchesRanges(b,I=!0){const[r,l]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(s=>s.findTouchesRange(b,I));return{[G.EditorViewType.CURRENT]:r,[G.EditorViewType.INCOMING]:l}}findIncludeRanges(b){const[I,r]=[this.documentMappingTurnLeft,this.documentMappingTurnRight].map(l=>l.findIncludeRange(b));return{[G.EditorViewType.CURRENT]:I,[G.EditorViewType.INCOMING]:r}}getAllDiffRanges(){return(0,c.distinct)(this.documentMappingTurnLeft.getModifiedRange().concat(this.documentMappingTurnRight.getOriginalRange()),b=>b.id)}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],p.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(g.MappingManagerDataStore),n.__metadata("design:type",g.MappingManagerDataStore)],p.prototype,"dataStore",void 0),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.MappingManagerService=p},89995:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MappingManagerDataStore=void 0;const n=t(85608),a=t(76003),o=t(41869);let c=class{constructor(){this._onDataChangeEmitter=new o.Emitter,this.onDataChange=this._onDataChangeEmitter.event,this.conflictsTotal=0,this.nonConflictsUnresolvedCount=0,this.conflictsResolvedCount=0,this.nonConflictingChangesResolvedTotal=0,this.nonConflictingChangesResolvedLeft=0,this.nonConflictingChangesResolvedRight=0,this.nonConflictingChangesResolvedBoth=0,this.userManualResolveNonConflicts=!1}get conflictsCount(){return{total:this.conflictsTotal,resolved:this.conflictsResolvedCount,lefted:this.conflictsTotal-this.conflictsResolvedCount,nonConflicts:this.nonConflictsUnresolvedCount}}updateConflictsCount(u){typeof u.total<"u"&&(this.conflictsTotal=u.total),typeof u.resolved<"u"&&(this.conflictsResolvedCount=u.resolved),typeof u.nonConflicts<"u"&&(this.nonConflictsUnresolvedCount=u.nonConflicts)}get nonConflictingChangesResolvedCount(){return{total:this.nonConflictingChangesResolvedTotal,left:this.nonConflictingChangesResolvedLeft,right:this.nonConflictingChangesResolvedRight,both:this.nonConflictingChangesResolvedBoth,userManualResolveNonConflicts:this.userManualResolveNonConflicts}}updateNonConflictingChangesResolvedCount(u){typeof u.total<"u"&&(this.nonConflictingChangesResolvedTotal=u.total),typeof u.left<"u"&&(this.nonConflictingChangesResolvedLeft=u.left),typeof u.right<"u"&&(this.nonConflictingChangesResolvedRight=u.right),typeof u.both<"u"&&(this.nonConflictingChangesResolvedBoth=u.both),typeof u.userManualResolveNonConflicts<"u"&&(this.userManualResolveNonConflicts=u.userManualResolveNonConflicts)}emitChange(){this._onDataChangeEmitter.fire()}canNavigate(){return this.conflictsCount.lefted>0}summary(){const u=this.conflictsCount,G=this.nonConflictingChangesResolvedCount,h=u.lefted===0&&u.resolved===u.total?(0,o.localize)("merge-conflicts.conflicts.all-resolved"):(0,o.formatLocalize)("merge-conflicts.conflicts.partial-resolved",u.resolved,u.lefted);let b=(0,o.localize)("merge-conflicts.merge.type.auto");G.userManualResolveNonConflicts&&(b=(0,o.localize)("merge-conflicts.merge.type.manual"));const I=[];if(G.total>0){I.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.progress",G.total,b));const s=[];if(G.left>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.left",G.left)),G.right>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.right",G.right)),G.both>0&&s.push((0,o.formatLocalize)("merge-conflicts.non-conflicts.from.base",G.both)),s.length>0){const d=s.join("\uFF1B");I.push(` (${d})`)}}const r=I.join("");return[(0,o.formatLocalize)("merge-conflicts.conflicts.summary",u.total,h),u.nonConflicts>0?(0,o.formatLocalize)("merge-conflicts.non-conflicts.summary",u.nonConflicts):"",r].filter(Boolean).join(" | ")}};c=n.__decorate([(0,a.Injectable)()],c),e.MappingManagerDataStore=c},36885:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorWidget=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=n.__importDefault(t(25873)),c=t(76003),g=t(41869),u=t(43718),G=t(96177),p=t(24093),h=t(13914);let b=0,I=class extends u.Disposable{constructor(l,s,d){super(),this.container=l,this.options=s,this.viewStateMap=new Map,this._id=++b,this.layout(),this.addDispose(this.mergeEditorService.onRestoreState(m=>{if(m){const v=m.toString();this.viewStateMap.delete(v),this.outputUri=void 0;const f=this.mergeEditorService.getNutrition();if(f){const{ancestor:N}=f,{baseContent:W,textModel:Z}=N;Z.setValue(W);const y=this.getResultEditor().getModel();y&&y.setValue(W)}}}))}async open(l){const{ancestor:s,input1:d,input2:m,output:v}=l;this.mergeEditorService.setNutritionAndLaunch(l),this.saveViewState(this.outputUri),this.outputUri=v.uri;const f=this.outputUri.toString();if(this.setModel({ours:d.textModel,result:s.textModel,theirs:m.textModel}),this.viewStateMap.has(f)){const N=this.viewStateMap.get(f);this.restoreViewState(N);const{turnLeft:W,turnRight:Z}=N;await this.mergeEditorService.compare(W,Z)}else await this.mergeEditorService.compare();return this.updateOptions(this.options),Promise.resolve()}getOursEditor(){return this.mergeEditorService.getCurrentEditor()}getResultEditor(){return this.mergeEditorService.getResultEditor()}getTheirsEditor(){return this.mergeEditorService.getIncomingEditor()}getCodeEditorCollect(){return[]}onDidDispose(l){return this.onDispose(l)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return"MERGE_EDITOR_DIFF"}updateOptions(l){this.mergeEditorService.updateOptions(l)}onVisible(){}onHide(){}layout(l){o.default.createRoot(this.container).render(a.default.createElement(g.ConfigProvider,{value:this.configContext},a.default.createElement(h.Grid,null)))}focus(){}hasTextFocus(){return!1}getSupportedActions(){return[]}saveViewState(l){if(!l)return null;const s=l.toString();return this.viewStateMap.set(s,{[p.EditorViewType.CURRENT]:this.getOursEditor().saveViewState(),[p.EditorViewType.RESULT]:this.getResultEditor().saveViewState(),[p.EditorViewType.INCOMING]:this.getTheirsEditor().saveViewState(),turnLeft:this.mergeEditorService.getTurnLeftRangeMapping(),turnRight:this.mergeEditorService.getTurnRightRangeMapping()}),null}restoreViewState(l){const{[p.EditorViewType.CURRENT]:s,[p.EditorViewType.RESULT]:d,[p.EditorViewType.INCOMING]:m}=l;this.getOursEditor().restoreViewState(s),this.getResultEditor().restoreViewState(d),this.getTheirsEditor().restoreViewState(m)}getVisibleColumnFromPosition(l){return 1}getStatusbarColumn(l){return 1}getPosition(){return null}setPosition(l,s){}revealLine(l,s){}revealLineInCenter(l,s){}revealLineInCenterIfOutsideViewport(l,s){}revealLineNearTop(l,s){}revealPosition(l,s){}revealPositionInCenter(l,s){}revealPositionInCenterIfOutsideViewport(l,s){}revealPositionNearTop(l,s){}getSelection(){return null}getSelections(){return null}setSelection(l,s){}setSelections(l,s){}revealLines(l,s,d){}revealLinesInCenter(l,s,d){}revealLinesInCenterIfOutsideViewport(l,s,d){}revealLinesNearTop(l,s,d){}revealRange(l,s){}revealRangeInCenter(l,s){}revealRangeAtTop(l,s){}revealRangeInCenterIfOutsideViewport(l,s){}revealRangeNearTop(l,s){}revealRangeNearTopIfOutsideViewport(l,s){}trigger(l,s,d){}getModel(){return null}setModel(l){const s=l;this.getOursEditor().setModel(s.ours),this.getResultEditor().setModel(s.result),this.getTheirsEditor().setModel(s.theirs)}createDecorationsCollection(l){throw Error("Method not implemented.")}changeDecorations(l){}};n.__decorate([(0,c.Autowired)(g.AppConfig),n.__metadata("design:type",Object)],I.prototype,"configContext",void 0),n.__decorate([(0,c.Autowired)(G.MergeEditorService),n.__metadata("design:type",G.MergeEditorService)],I.prototype,"mergeEditorService",void 0),I=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[HTMLElement,Object,Object])],I),e.MergeEditorWidget=I},96177:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(38070),g=t(81878),u=t(43718),G=t(27833),p=t(14951),h=t(72665),b=t(93961),I=t(38889),r=t(24093),l=t(66245),s=t(51472),d=t(66557),m=t(23600),v=t(13744),f=t(22883);let N=class extends o.Disposable{constructor(){super(),this.isCancelAllAIResolveConflict=!1,this._onDidInputNutrition=new o.Emitter,this.onDidInputNutrition=this._onDidInputNutrition.event,this._onDidMount=new o.Emitter,this.onDidMount=this._onDidMount.event,this._onRestoreState=new o.Emitter,this.onRestoreState=this._onRestoreState.event,this._onHasIntelligentLoadingChange=new o.Emitter,this.onHasIntelligentLoadingChange=this._onHasIntelligentLoadingChange.event,this.loadingDispose=new o.Disposable,this.computerDiffModel=new I.ComputerDiffModel,this.scrollSynchronizer=new v.ScrollSynchronizer,this.stickinessConnectManager=new f.StickinessConnectManager,this.actionsManager=this.injector.get(l.ActionsManager,[this.mappingManagerService,this.mergeConflictReportService])}initListenEvent(){this.addDispose(this.resultView.onDidChangeContent(()=>{this.resultView.updateDecorations().updateActions(),this.currentView.launchChange(),this.incomingView.launchChange()}))}listenIntelligentLoadingChange(){this.loadingDispose.dispose();let Z=!1;this.loadingDispose.addDispose(this.resultView.onChangeRangeIntelligentState(y=>{if(y.getIntelligentStateModel().isLoading){this._onHasIntelligentLoadingChange.fire(!0),Z=!0;return}(0,u.runWhenIdle)(()=>{const R=this.mappingManagerService.getAllDiffRanges().filter(A=>A.isConflictPoint);Z&&R.every(A=>!A.getIntelligentStateModel().isLoading)&&(this._onHasIntelligentLoadingChange.fire(!1),this.loadingDispose.dispose())},1)}))}setNutritionAndLaunch(Z){this.nutrition=Z,this._onDidInputNutrition.fire(Z)}getNutrition(){return this.nutrition}instantiationCodeEditor(Z,y,E){this.currentView&&this.resultView&&this.incomingView||(this.currentView=this.injector.get(s.CurrentCodeEditor,[Z,this.monacoService,this.injector]),this.resultView=this.injector.get(m.ResultCodeEditor,[y,this.monacoService,this.injector]),this.incomingView=this.injector.get(d.IncomingCodeEditor,[E,this.monacoService,this.injector]),this.scrollSynchronizer.mount(this.currentView,this.resultView,this.incomingView),this.stickinessConnectManager.mount(this.currentView,this.resultView,this.incomingView),this.actionsManager.mount(this.currentView,this.resultView,this.incomingView),this._onDidMount.fire({currentView:this.currentView,resultView:this.resultView,incomingView:this.incomingView}),this.initListenEvent())}dispose(){super.dispose(),this.currentView.dispose(),this.resultView.dispose(),this.incomingView.dispose(),this.scrollSynchronizer.dispose(),this.stickinessConnectManager.dispose(),this.actionsManager.dispose(),this.loadingDispose.dispose(),this.mergeConflictReportService.dispose()}acceptLeft(Z=!1,y){this.mappingManagerService.documentMappingTurnLeft.getOriginalRange().filter(A=>A.isComplete===!1).filter(A=>Z&&A.isConflictPoint?null:A).forEach(A=>{if(A.isMerge){const w=this.mappingManagerService.documentMappingTurnLeft.adjacentComputeRangeMap.get(A.id);if(w&&w.isComplete){this.currentView.launchConflictActionsEvent({range:A,action:r.APPEND_ACTIONS,reason:y});return}}this.currentView.launchConflictActionsEvent({range:A,action:r.ACCEPT_CURRENT_ACTIONS,reason:y})})}acceptRight(Z=!1,y){this.mappingManagerService.documentMappingTurnRight.getModifiedRange().filter(A=>A.isComplete===!1).filter(A=>Z&&A.isConflictPoint?null:A).forEach(A=>{if(A.isMerge){const w=this.mappingManagerService.documentMappingTurnRight.adjacentComputeRangeMap.get(A.id);if(w&&w.isComplete){this.currentView.launchConflictActionsEvent({range:A,action:r.APPEND_ACTIONS,reason:y});return}}this.incomingView.launchConflictActionsEvent({range:A,action:r.ACCEPT_CURRENT_ACTIONS,reason:y})})}async accept(){const Z=(0,o.localize)("mergeEditor.conflict.action.apply.confirm.continue"),y=(0,o.localize)("mergeEditor.conflict.action.apply.confirm.complete"),E=async()=>{if(!this.nutrition)return;const{output:w}=this.nutrition,{uri:F}=w,V=await this.fileServiceClient.getFileStat(F.toString(),!1);if(!V)return;const Y=this.resultView.getModel(),_=this.mappingManagerService.getAllDiffRanges(),H=_.filter(O=>O.getIntelligentStateModel().isComplete===!0).length;let X=0;_.filter(O=>O.isConflictPoint&&O.getIntelligentStateModel().isComplete).forEach(O=>{const T=O.getIntelligentStateModel().answerCode,B=Y.getValueInRange(O.toRange())||"";T.trim()===B.trim()&&(X+=1)}),this.mergeConflictReportService.report(this.resultView.getUri(),{useAiConflictPointNum:H,receiveNum:X});const S=this.resultView.getEditor().getValue();await this.fileServiceClient.setContent(V,S),this.fireRestoreState(F),await this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE.id);const Q=await this.commandService.executeCommand(o.SCM_COMMANDS.GetSCMResource.id,F);Q&&await this.commandService.executeCommand(G.GitCommands.Stage,Q)},{completeCount:R,shouldCount:A}=this.resultView.completeSituation();if(A!==R){const w=await this.dialogService.info((0,o.localize)("mergeEditor.conflict.action.apply.confirm.title"),[Z,y]);return w===Z?!1:(w===y&&await E(),!0)}else return await E(),!0}async stopAllAIResolveConflict(){this.isCancelAllAIResolveConflict=!0,this.resultView.cancelRequestToken(),this.resultView.hideStopWidget()}async handleAIResolveConflict(){this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"clickAllNum"),this.listenIntelligentLoadingChange(),(0,u.runWhenIdle)(()=>{this.acceptLeft(!0,r.ECompleteReason.AutoResolvedNonConflictBeforeRunAI)},0),(0,u.runWhenIdle)(()=>{this.acceptRight(!0,r.ECompleteReason.AutoResolvedNonConflictBeforeRunAI)},1),(0,u.runWhenIdle)(async()=>{var Z,y,E,R;this.isCancelAllAIResolveConflict=!1;const w=this.mappingManagerService.getAllDiffRanges().filter(X=>X.isConflictPoint&&!X.getIntelligentStateModel().isLoading);let F=0,V=w.length;try{for(var Y=!0,_=n.__asyncValues(w),H;H=await _.next(),Z=H.done,!Z;){R=H.value,Y=!1;try{const X=R,S=this.resultView.getFlushRange(X)||X,Q=await this.actionsManager.handleAIConflictResolve(S,{isRegenerate:!1});if(this.isCancelAllAIResolveConflict){this.isCancelAllAIResolveConflict=!1;return}if(!Q)continue;Q.isCancel&&(V-=1),Q.isSuccess&&(F+=1)}finally{Y=!0}}}catch(X){y={error:X}}finally{try{!Y&&!Z&&(E=_.return)&&await E.call(_)}finally{if(y)throw y.error}}F!==V&&g.message.warning((0,u.formatLocalize)("aiNative.resolve.conflict.message.not.processed.yet",F,V-F))},2)}fireRestoreState(Z){this._onRestoreState.fire(Z)}getCurrentEditor(){return this.currentView.getEditor()}getResultEditor(){return this.resultView.getEditor()}getIncomingEditor(){return this.incomingView.getEditor()}getTurnLeftRangeMapping(){return this.mappingManagerService.documentMappingTurnLeft.getMetaLineRangeMapping()}getTurnRightRangeMapping(){return this.mappingManagerService.documentMappingTurnRight.getMetaLineRangeMapping()}updateOptions(Z){this.currentView.updateOptions(Z),this.incomingView.updateOptions(Z),this.resultView.updateOptions(Z)}async compare(Z=[],y=[]){this.mappingManagerService.clearMapping();let E=Z,R=y;if(Z.length===0&&y.length===0){this.resultView.reset();const[w,F]=await Promise.all([this.computerDiffModel.computeDiff(this.currentView.getModel(),this.resultView.getModel()),this.computerDiffModel.computeDiff(this.resultView.getModel(),this.incomingView.getModel())]);E=w.changes,R=F.changes}this.currentView.inputDiffComputingResult(E),this.incomingView.inputDiffComputingResult(R),this.resultView.inputDiffComputingResult(),this.preferenceService.getValid("mergeEditor.autoApplyNonConflictChanges",!1)&&(this.acceptLeft(!0,r.ECompleteReason.AutoResolvedNonConflict),this.acceptRight(!0,r.ECompleteReason.AutoResolvedNonConflict)),this.currentView.updateDecorations().updateActions(),this.incomingView.updateDecorations().updateActions(),this.resultView.updateDecorations().updateActions()}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],N.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.MonacoService),n.__metadata("design:type",o.MonacoService)],N.prototype,"monacoService",void 0),n.__decorate([(0,a.Autowired)(b.MappingManagerService),n.__metadata("design:type",b.MappingManagerService)],N.prototype,"mappingManagerService",void 0),n.__decorate([(0,a.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],N.prototype,"fileServiceClient",void 0),n.__decorate([(0,a.Autowired)(h.IDialogService),n.__metadata("design:type",Object)],N.prototype,"dialogService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],N.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(c.MergeConflictReportService),n.__metadata("design:type",c.MergeConflictReportService)],N.prototype,"mergeConflictReportService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],N.prototype,"preferenceService",void 0),N=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],N),e.MergeEditorService=N},38889:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputerDiffModel=void 0;const n=t(46739),a=t(28240),o=t(83e3),c=t(2253),g=t(96178),u=t(75526);class G{constructor(){this.editorWorkerService=o.StandaloneServices.get(a.IEditorWorkerService)}convertDiffResult(h){return{identical:h.identical,quitEarly:h.quitEarly,moves:[],changes:h.changes.map(b=>{var I;return new c.DetailedLineRangeMapping(new u.LineRange(b.original.startLineNumber,b.original.endLineNumberExclusive),new u.LineRange(b.modified.startLineNumber,b.modified.endLineNumberExclusive),(I=b.innerChanges)===null||I===void 0?void 0:I.map(r=>new n.RangeMapping(new g.InnerRange(r.originalRange.startLineNumber,r.originalRange.startColumn,r.originalRange.endLineNumber,r.originalRange.endColumn),new g.InnerRange(r.modifiedRange.startLineNumber,r.modifiedRange.startColumn,r.modifiedRange.endLineNumber,r.modifiedRange.endColumn))))})}}async computeDiff(h,b){const I=await this.editorWorkerService.computeDiff(h.uri,b.uri,{ignoreTrimWhitespace:!1,maxComputationTimeMs:0,computeMoves:!1},"advanced"),r={quitEarly:!1,identical:!1,changes:[],moves:[]};return h.isDisposed()||b.isDisposed()?r:I?this.convertDiffResult(I):r}}e.ComputerDiffModel=G},91376:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConflictActions=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(88104),g=t(66076);let u=class extends o.Disposable{get editor(){return this.codeEditor.getEditor()}constructor(p){super(),this.codeEditor=p,this.deltaDecoration=[],this.actionsCollect=new Map}createActionDecoration(p){const{range:h}=p;return{id:"",editorDecoration:{range:{startLineNumber:h.startLineNumber,startColumn:0,endLineNumber:h.startLineNumber,endColumn:0},options:c.ModelDecorationOptions.register(Object.assign({description:h.id},p.decorationOptions))}}}dispose(){super.dispose(),this.actionsCollect.clear()}clearDecorations(){this.editor.changeDecorations(p=>{for(const h of this.deltaDecoration)p.removeDecoration(h.id);this.deltaDecoration=[]})}clearDecorationsById(p){this.editor.changeDecorations(h=>{p&&(h.removeDecoration(p),this.deltaDecoration=this.deltaDecoration.filter(b=>b.id!==p))})}setActions(p){const h=p.map(b=>{const{range:I}=b;return this.actionsCollect.set(I.id,b),this.createActionDecoration(b)});this.editor.changeDecorations(b=>{b.deltaDecorations(this.deltaDecoration.map(I=>I.id),h.map(I=>I.editorDecoration)).forEach((I,r)=>h[r].id=I),this.deltaDecoration=h})}clearActions(p){if(this.actionsCollect.has(p)){const h=this.actionsCollect.get(p),b=this.deltaDecoration.find(I=>I.editorDecoration.options.description===h.range.id);b&&this.clearDecorationsById(b.id),this.actionsCollect.delete(p)}}updateActions(p){this.clearDecorations(),this.setActions(p)}getActions(){return this.actionsCollect.values()}getAction(p){return this.actionsCollect.get(p)}};u=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[g.BaseCodeEditor])],u),e.ConflictActions=u},98025:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorDecorations=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(43255),g=t(88104),u=t(24093),G=t(66076),p=t(31775);let h=class extends o.Disposable{get editor(){return this.codeEditor.getEditor()}constructor(I,r){super(),this.codeEditor=I,this.editorViewType=r,this.deltaDecoration=[],this.lineWidgetSet=new Set,this._onDidChangeLineWidget=new o.Emitter,this.onDidChangeLineWidget=this._onDidChangeLineWidget.event,this._onDidChangeDecorations=new o.Emitter,this.onDidChangeDecorations=this._onDidChangeDecorations.event,this.initListenEvent()}initListenEvent(){this.addDispose(o.Event.any(this.editor.onDidChangeModelDecorations,this.onDidChangeLineWidget)(()=>{this.launchChange()}))}launchChange(){this._onDidChangeDecorations.fire(this)}createLineDecoration(I){const r=I.startLineNumber,s=Math.max(I.startLineNumber,I.endLineNumberExclusive-1)-r+1,d=g.ModelDecorationOptions.register({description:I.id,className:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.diff_line_background,u.DECORATIONS_CLASSNAME.range_type[I.type]),isWholeLine:!0,stickiness:c.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges});return Array.from({length:s}).map((m,v)=>{let f=" ";const N=` ${u.DECORATIONS_CLASSNAME.conflict_wrap} `;s!==1&&(f+=v===0?u.DECORATIONS_CLASSNAME.stretch_bottom:v===s-1?u.DECORATIONS_CLASSNAME.stretch_top:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.stretch_top,u.DECORATIONS_CLASSNAME.stretch_bottom)),I.isComplete&&(f+=N);const W=Object.assign(Object.assign({},d),this.codeEditor.getMonacoDecorationOptions(d,I));return{id:"",editorDecoration:{range:{startLineNumber:r+v,startColumn:0,endLineNumber:r+v,endColumn:Number.MAX_SAFE_INTEGER},options:Object.assign(Object.assign({},W),{className:(W.className||"")+f,marginClassName:(W.marginClassName||"")+f,linesDecorationsClassName:(W.linesDecorationsClassName||"")+f})}}})}createInnerCharDecoration(I){return{id:"",editorDecoration:{range:I,options:g.ModelDecorationOptions.register({description:I.toString(),className:u.DECORATIONS_CLASSNAME.combine(u.DECORATIONS_CLASSNAME.diff_inner_char_background,I.type),isWholeLine:!1})}}}createGuideLineWidget(I){const r=new p.GuidelineWidget(this.editor);return r.create(),I.isComplete&&r.addClassName(u.DECORATIONS_CLASSNAME.dashed),r.addClassName(u.DECORATIONS_CLASSNAME.range_type[I.type]).showByLine(Math.max(0,Math.max(0,I.startLineNumber-1))),r}setDecorations(I,r){this.editor.changeDecorations(l=>{const s=[];for(const d of I)if(d.isEmpty){const m=this.createGuideLineWidget(d);this.lineWidgetSet.add(m),this._onDidChangeLineWidget.fire()}else s.push(...this.createLineDecoration(d));for(const d of r)for(const m of d)m.isEmpty()||s.push(this.createInnerCharDecoration(m));s.forEach(d=>{d.id=l.addDecoration(d.editorDecoration.range,d.editorDecoration.options)}),this.deltaDecoration=s})}cleanUpLineWidget(I){I.forEach(r=>{r.hide()}),I.clear()}clearDecorations(){return this.editor.changeDecorations(I=>{for(const r of this.deltaDecoration)I.removeDecoration(r.id);this.deltaDecoration=[]}),this.cleanUpLineWidget(this.lineWidgetSet),this}updateDecorations(I,r){return this.clearDecorations(),this.render(I,r),this}getDecorations(){return this.deltaDecoration}getLineWidgets(){return Array.from(this.lineWidgetSet.keys())}render(I,r){this.setDecorations(I,r)}dispose(){super.dispose(),this.lineWidgetSet.forEach(I=>I.dispose())}};h=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__param(0,(0,a.Optional)()),n.__param(1,(0,a.Optional)()),n.__metadata("design:paramtypes",[G.BaseCodeEditor,String])],h),e.MergeEditorDecorations=h},33078:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentMapping=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(2253),g=t(24093);let u=class extends o.Disposable{constructor(p){super(),this.diffRangeTurn=p,this.adjacentComputeRangeMap=new Map,this.computeRangeMap=new Map}ensureSort(p){return Array.from(p).sort((h,b)=>h.startLineNumber-b.startLineNumber)}getMetaLineRangeMapping(){const p=[];return this.computeRangeMap.forEach(h=>{this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?p.push(new c.DetailedLineRangeMapping(h,this.adjacentComputeRangeMap.get(h.id),[])):this.diffRangeTurn===g.EDiffRangeTurn.MODIFIED&&p.push(new c.DetailedLineRangeMapping(this.adjacentComputeRangeMap.get(h.id),h,[]))}),p}getOriginalRange(){return this.ensureSort(this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?this.computeRangeMap.values():this.adjacentComputeRangeMap.values())}getModifiedRange(){return this.ensureSort(this.diffRangeTurn===g.EDiffRangeTurn.ORIGIN?this.adjacentComputeRangeMap.values():this.computeRangeMap.values())}reverse(p){const h=this.adjacentComputeRangeMap.entries();for(const b of h){const[I,r]=b;if(r.id===p.id&&this.computeRangeMap.has(I))return this.computeRangeMap.get(I)}}inputComputeResultRangeMapping(p){switch(this.diffRangeTurn){case g.EDiffRangeTurn.ORIGIN:p.forEach(({modified:h,original:b})=>{this.addRange(b,h)});break;case g.EDiffRangeTurn.MODIFIED:p.forEach(({modified:h,original:b})=>{this.addRange(h,b)});break}}deltaAdjacentQueueAfter(p,h,b=!1){const I=this.adjacentComputeRangeMap.get(p.id);if(I)for(const[r,l]of this.adjacentComputeRangeMap.entries())l.isAfter(I)?this.adjacentComputeRangeMap.set(r,l.delta(h)):b&&l.id===I.id&&this.adjacentComputeRangeMap.set(r,l.delta(h))}deltaEndAdjacentQueue(p,h){for(const[b,I]of this.adjacentComputeRangeMap.entries())I.id===p.id?this.adjacentComputeRangeMap.set(b,p.deltaEnd(h)):I.isAfter(p)&&this.adjacentComputeRangeMap.set(b,I.delta(h))}clear(){this.computeRangeMap.clear(),this.adjacentComputeRangeMap.clear()}deleteRange(p){this.computeRangeMap.delete(p.id),this.adjacentComputeRangeMap.delete(p.id)}addRange(p,h){this.computeRangeMap.set(p.id,p),this.adjacentComputeRangeMap.set(p.id,h)}findNextOppositeRange(p){const h=this.ensureSort(this.adjacentComputeRangeMap.values());for(const b of h)if(b.id!==p.id&&b.isAfter(p))return b}findIncludeRange(p){const h=this.ensureSort(this.adjacentComputeRangeMap.values());for(const b of h)if(b.isInclude(p))return b}findTouchesRange(p,h=!0){const b=this.ensureSort(this.adjacentComputeRangeMap.values());for(const I of b)if(h?I.isTouches(p)||I.isContact(p):I.isTouches(p)&&!I.isContact(p))return I}};u=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[String])],u),e.DocumentMapping=u},96178:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InnerRange=void 0;const n=t(44781);class a extends n.Range{get isComplete(){return this._isComplete}get completeReason(){return this._completeReason}get turnDirection(){return this._turnDirection}static fromPositions(c,g=c){return new a(c.lineNumber,c.column,g.lineNumber,g.column)}setTurnDirection(c){return this._turnDirection=c,this}done(c){return this._isComplete=!0,this._completeReason=c,this}cancel(){return this._isComplete=!1,this._completeReason=void 0,this}get type(){return this._type}constructor(c,g,u,G){super(c,g,u,G),this._type="insert"}setType(c){return this._type=c,this}}e.InnerRange=a},75526:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;const n=t(43718),a=t(52451),o=t(88354),c=t(24093),g=t(96178);class u{constructor(){this._isLoading=!1,this._isComplete=!1,this._answerCode=""}setAnswerCode(b){return this._answerCode=b,this}setLoading(b){return this._isLoading=b,this}setIsComplete(b){return this._isComplete=b,this}get answerCode(){return this._answerCode}get isLoading(){return this._isLoading}get isComplete(){return this._isComplete}setAll(b,I=!0){return I?(this.reset(),this.setIsComplete(!!b.isComplete).setLoading(!!b.isLoading).setAnswerCode(b.answerCode||"")):(b.isComplete!==void 0&&this.setIsComplete(!!b.isComplete),b.isLoading!==void 0&&this.setLoading(!!b.isLoading),b.answerCode!==void 0&&this.setAnswerCode(b.answerCode)),this}reset(){this.setLoading(!1),this.setIsComplete(!1),this.setAnswerCode("")}}class G{constructor(){this.metaRanges=[]}get isMerge(){return this.metaRanges.length>0}get isAllowCombination(){const b=this.metaRanges.length;if(b<=1)return!1;let I=0;for(let r=0;r<b;r++){const l=this.metaRanges[I],s=this.metaRanges[r];if(l.id!==s.id){if(!s.isContact(l))return!1;I+=1}}return!0}add(b){return this.metaRanges.push(b),this}reset(){return this.metaRanges=[],this}has(b){return this.metaRanges.some(I=>I.id===b.id)}getMetaRanges(){return this.metaRanges}}class p extends a.LineRange{static fromPositions(b,I=b){return new p(b,I)}get id(){return this._id}get type(){return this._type}get isComplete(){return this._isComplete}get completeReason(){return this._completeReason}get turnDirection(){return this._turnDirection}get isMerge(){return this.mergeStateModel.isMerge}get isAllowCombination(){return this.mergeStateModel.isAllowCombination}get isConflictPoint(){return this.isMerge&&this.type==="modify"}constructor(b,I){super(b,I),this._isComplete=!1,this._id=(0,n.uuid)(6),this.mergeStateModel=new G,this.intelligentStateModel=new u}setId(b){return this._id=b,this}setTurnDirection(b){return this._turnDirection=b,this}done(b){return this._isComplete=!0,this._completeReason=b,this}cancel(){return this._isComplete=!1,this._completeReason=void 0,this}setMergeStateModel(b){return this.mergeStateModel=b,this}setIntelligentStateModel(b){return this.intelligentStateModel=b,this}getIntelligentStateModel(){return this.intelligentStateModel}setType(b){return this._type=b,this}isTendencyRight(b){return this.isEmpty&&!b.isEmpty}isTendencyLeft(b){return!this.isEmpty&&b.isEmpty}isAfter(b){return this.startLineNumber>=b.endLineNumberExclusive}isBefore(b){return b.startLineNumber>=this.endLineNumberExclusive}isTouches(b){return this.endLineNumberExclusive>=b.startLineNumber&&b.endLineNumberExclusive>=this.startLineNumber}isContact(b){return this.startLineNumber===b.endLineNumberExclusive||this.endLineNumberExclusive===b.startLineNumber}isInclude(b){return b instanceof p?this.startLineNumber<=b.startLineNumber&&this.endLineNumberExclusive>=b.endLineNumberExclusive:b instanceof g.InnerRange?this.isEmpty?!1:this.startLineNumber<=b.startLineNumber&&this.endLineNumberExclusive>=b.endLineNumber:!1}equals(b){return this.startLineNumber===b.startLineNumber&&this.length===b.length}get metaMergeRanges(){return this.mergeStateModel.getMetaRanges()}recordMergeRange(b){return this.mergeStateModel.add(b),this}merge(b,I=!0){return I&&(this.mergeStateModel.has(this)||this.recordMergeRange(this),this.recordMergeRange(b)),this.retainState(new p(Math.min(this.startLineNumber,b.startLineNumber),Math.max(this.endLineNumberExclusive,b.endLineNumberExclusive))).setTurnDirection(c.ETurnDirection.BOTH)}born(){const b=p.fromPositions(this.startLineNumber,this.endLineNumberExclusive),I=b.id;return this.retainState(b).setId(I)}toRange(b,I){return g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.endLineNumberExclusive,I??1)).setType(this._type)}toInclusiveRange(b,I){return this.isEmpty?g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.startLineNumber,I??1)).setType(this._type):g.InnerRange.fromPositions(new o.Position(this.startLineNumber,b??1),new o.Position(this.endLineNumberExclusive-1,I??1073741824)).setType(this._type)}retainState(b){const I=b.setId(this._id).setType(this._type).setTurnDirection(this._turnDirection).setMergeStateModel(this.mergeStateModel).setIntelligentStateModel(this.intelligentStateModel);return this._isComplete?I.done(this._completeReason):I.cancel(),I}delta(b){return this.retainState(new p(this.startLineNumber+b,this.endLineNumberExclusive+b))}deltaStart(b){return this.retainState(new p(this.startLineNumber+b,this.endLineNumberExclusive))}deltaEnd(b){return this.retainState(new p(this.startLineNumber,this.endLineNumberExclusive+b))}}e.LineRange=p},69972:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyPieceModel=void 0;class t{get width(){return this._width}get height(){return this._height}get path(){return this._path}get position(){return this._position}get rangeType(){return this._rangeType}get isComplete(){return this._isComplete}constructor(a,o,c,g,u,G){this._width=a,this._height=o,this._path=c,this._position=g,this._rangeType=u,this._isComplete=!!G,this.rawData=Object.freeze({rangeType:u,width:a,height:o,position:g,path:c})}calcHeight(a,o){const{leftTop:c,rightTop:g,leftBottom:u,rightBottom:G}=this.rawData.path,p=Math.min(c-a,g-o),h=Math.max(u-a,G-o);return Math.abs(h-p)}calcPath(a,o){const{path:c}=this.rawData,g=c.leftTop-a,u=c.rightTop-o,G=Math.max(0,g-u),p=Math.max(0,u-g),h=Math.min(this.height,G+(c.leftBottom-c.leftTop)),b=Math.min(this.height,p+(c.rightBottom-c.rightTop));return{leftTop:G,rightTop:p,leftBottom:h,rightBottom:b}}movePosition(a,o){const c=this.rawData.position.top,{leftTop:g,rightTop:u}=this.rawData.path,G=c+Math.min(g-a,u-o);return this._position={top:G},this._height=this.calcHeight(a,o),this._path=this.calcPath(a,o),this}}e.StickyPieceModel=t},81413:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeMachineDocument=void 0;class t{constructor(){this.collectMap=new Map}record(a,o){this.collectMap.has(a)||this.collectMap.set(a,o)}getMetaData(a){return this.collectMap.get(a)}}e.TimeMachineDocument=t},34239:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findRangeForNavigation=e.NavigationDirection=void 0;const a=t(85608).__importStar(t(33096));var o;(function(g){g[g.Forwards=0]="Forwards",g[g.Backwards=1]="Backwards"})(o=e.NavigationDirection||(e.NavigationDirection={}));function c(g,u,G){if(!u||u.length===0||!G)return null;if(u.length===1)return u[0].containsPosition(G)?{canNavigate:!1}:{canNavigate:!0,range:u[0]};let p,h,b;if(g===o.Forwards)p=I=>a.Position.isBefore(G,I.getStartPosition()),h=()=>u[0],b=u;else if(g===o.Backwards)p=I=>a.Position.isBefore(I.getStartPosition(),G),h=()=>u[u.length-1],b=u.slice().reverse();else throw new Error(`Unsupported direction ${g}`);for(const I of b)if(p(I)&&!I.containsPosition(G))return{canNavigate:!0,range:I};return{canNavigate:!0,range:h()}}e.findRangeForNavigation=c},24093:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AIResolveConflictContentWidget=e.ADDRESSING_TAG_CLASSNAME=e.CONFLICT_ACTIONS_ICON=e.AI_RESOLVE_REGENERATE_ACTIONS=e.AI_RESOLVE_ACTIONS=e.APPEND_ACTIONS=e.REVOKE_ACTIONS=e.IGNORE_ACTIONS=e.ACCEPT_COMBINATION_ACTIONS=e.ACCEPT_CURRENT_ACTIONS=e.DECORATIONS_CLASSNAME=e.EDiffRangeTurn=e.EditorViewType=e.ETurnDirection=e.ECompleteReason=void 0;const n=t(85608),a=t(41869),o=n.__importDefault(t(89543));var c;(function(b){b.UserManual="user_manual",b.AIResolved="ai_resolved",b.AutoResolvedNonConflictBeforeRunAI="auto_resolved_non_conflict_before_run_ai",b.AutoResolvedNonConflict="auto_resolved_non_conflict"})(c=e.ECompleteReason||(e.ECompleteReason={}));var g;(function(b){b.BOTH="both",b.CURRENT="current",b.INCOMING="incoming"})(g=e.ETurnDirection||(e.ETurnDirection={}));var u;(function(b){b.CURRENT="current",b.RESULT="result",b.INCOMING="incoming"})(u=e.EditorViewType||(e.EditorViewType={}));var G;(function(b){b.ORIGIN="origin",b.MODIFIED="modified"})(G=e.EDiffRangeTurn||(e.EDiffRangeTurn={}));var p;(function(b){b.combine=(...I)=>I.reduce((r,l)=>r+" "+l," "),b.conflict_wrap=o.default.conflict_wrap,b.stretch_top=o.default.stretch_top,b.stretch_bottom=o.default.stretch_bottom,b.stretch_left=o.default.stretch_left,b.stretch_right=o.default.stretch_right,b.margin_className=o.default.merge_editor_margin_className,b.diff_line_background=o.default.merge_editor_diff_line_background,b.diff_inner_char_background=o.default.merge_editor_diff_inner_char_background,b.guide_underline_widget=o.default.merge_editor_guide_underline_widget,b.offset_right=o.default.offset_right,b.offset_left=o.default.offset_left,b.rotate_turn_left=o.default.rotate_turn_left,b.rotate_turn_right=o.default.rotate_turn_right,b.ai_resolve_icon=o.default.ai_resolve_icon,b.ai_resolve_loading_icon=o.default.ai_resolve_loading_icon,b.ai_resolve_complete=o.default.ai_resolve_complete,b.ai_resolve_complete_lines_decorations=o.default.ai_resolve_complete_lines_decorations,b.range_type={insert:o.default.insert,modify:o.default.modify,remove:o.default.remove},b.dashed=o.default.dashed})(p=e.DECORATIONS_CLASSNAME||(e.DECORATIONS_CLASSNAME={})),e.ACCEPT_CURRENT_ACTIONS="accpet_current",e.ACCEPT_COMBINATION_ACTIONS="accpet_combination",e.IGNORE_ACTIONS="ignore",e.REVOKE_ACTIONS="revoke",e.APPEND_ACTIONS="append",e.AI_RESOLVE_ACTIONS="ai_resolve",e.AI_RESOLVE_REGENERATE_ACTIONS="ai_regenerate_resolve";var h;(function(b){const I=o.default.conflict_actions;b.RIGHT=`${I} ${e.ACCEPT_CURRENT_ACTIONS} ${(0,a.getIcon)("doubleright")}`,b.ROTATE_RIGHT=`${I} ${e.APPEND_ACTIONS} ${p.rotate_turn_right} ${(0,a.getIcon)("doubleright")}`,b.LEFT=`${I} ${e.ACCEPT_CURRENT_ACTIONS} ${(0,a.getIcon)("doubleleft")}`,b.ROTATE_LEFT=`${I} ${e.APPEND_ACTIONS} ${p.rotate_turn_left} ${(0,a.getIcon)("doubleleft")}`,b.WAND=`${I} ${e.ACCEPT_COMBINATION_ACTIONS} ${(0,a.getExternalIcon)("wand")}`,b.CLOSE=`${I} ${e.IGNORE_ACTIONS} ${(0,a.getIcon)("close")}`,b.REVOKE=`${I} ${e.REVOKE_ACTIONS} ${(0,a.getIcon)("revoke")}`,b.AI_RESOLVE=`${I} ${e.AI_RESOLVE_ACTIONS} ${p.ai_resolve_icon} ${(0,a.getIcon)("magic-wand")}`,b.AI_RESOLVE_LOADING=`${I} ${p.ai_resolve_loading_icon} ${(0,a.getIcon)("loading")}`})(h=e.CONFLICT_ACTIONS_ICON||(e.CONFLICT_ACTIONS_ICON={})),e.ADDRESSING_TAG_CLASSNAME="ADDRESSING_TAG_CLASSNAME_",e.AIResolveConflictContentWidget="ai-resolve-conflict-content-widget"},66245:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsManager=void 0;const n=t(85608),a=t(76003),o=t(38070),c=t(43718),g=t(19582),u=t(88354),G=t(93961),p=t(96178),h=t(75526),b=t(24093),I=n.__importDefault(t(89543));let r=class extends c.Disposable{constructor(s,d){super(),this.mappingManagerService=s,this.mergeConflictReportService=d}applyLineRangeEdits(s){if(!this.resultView)return;const d=this.resultView.getModel(),m=d.getEOL();if(!d)return;const v=d.getLineCount();d.applyEdits(s.map(f=>{const{range:N,text:W}=f;return N.endLineNumberExclusive<=v?{range:N.toRange(),text:W?W+m:null}:N.startLineNumber===1?{range:p.InnerRange.fromPositions(new u.Position(1,1),new u.Position(v,Number.MAX_SAFE_INTEGER)),text:W?W+m:null}:{range:p.InnerRange.fromPositions(new u.Position(N.startLineNumber-1,Number.MAX_SAFE_INTEGER),new u.Position(v,Number.MAX_SAFE_INTEGER)),text:W?m+W:null}}),!1)}pickMapping(s){switch(s.turnDirection){case b.ETurnDirection.BOTH:return;case b.ETurnDirection.CURRENT:return this.mappingManagerService.documentMappingTurnLeft;case b.ETurnDirection.INCOMING:return this.mappingManagerService.documentMappingTurnRight}}pickViewEditor(s){switch(s.turnDirection){case b.ETurnDirection.INCOMING:return this.incomingView;case b.ETurnDirection.CURRENT:return this.currentView;default:return this.resultView}}handleAcceptChange(s,d,m){var v,f,N;const W=this.pickMapping(s);if(!W)return;const y=this.pickViewEditor(s).getModel(),E=y.getEOL(),R=y.getValueInRange(s.toInclusiveRange()),A=W.adjacentComputeRangeMap.get(s.id);A&&(this.applyLineRangeEdits(d(s,A,{applyText:R,eol:E})),this.markComplete(s,m),A.isMerge&&((v=this.currentView)===null||v===void 0||v.updateActions(),(f=this.incomingView)===null||f===void 0||f.updateActions()),(N=this.resultView)===null||N===void 0||N.updateActions())}handleAcceptRevoke(s){var d,m,v,f;const{turnDirection:N}=s,W=this.pickViewEditor(s),Z=this.resultView.getContentInTimeMachineDocument(s.id);if(!Z)return;switch(N){case b.ETurnDirection.CURRENT:this.mappingManagerService.revokeActionsTurnLeft(s);break;case b.ETurnDirection.INCOMING:this.mappingManagerService.revokeActionsTurnRight(s);break;case b.ETurnDirection.BOTH:this.mappingManagerService.revokeActionsTurnLeft(s),this.mappingManagerService.revokeActionsTurnRight(s);break}const{text:y}=Z;this.applyLineRangeEdits([{range:s,text:y}]),(d=this.resultView)===null||d===void 0||d.changeRangeIntelligentState(s,{},!0),(m=this.resultView)===null||m===void 0||m.updateActions(),N===b.ETurnDirection.BOTH?((v=this.incomingView)===null||v===void 0||v.updateDecorations().updateActions(),(f=this.currentView)===null||f===void 0||f.updateDecorations().updateActions()):W.updateDecorations().updateActions()}handleAcceptCombination(s,d){var m;const v=this.mappingManagerService.documentMappingTurnLeft.reverse(s),f=this.mappingManagerService.documentMappingTurnRight.reverse(s);if(!v||!f)return;const[N,W]=[v.metaMergeRanges,f.metaMergeRanges],[Z,y]=[new Set(N).values(),new Set(W).values()];let E=N[0].startLineNumber===v.startLineNumber?0:1;const R=N.length+W.length;let A="";Array.from({length:R}).forEach((w,F)=>{const Y=(E===0?this.currentView:this.incomingView).getModel(),_=F===R-1?"":Y.getEOL(),{value:H}=E===0?Z.next():y.next();A+=Y.getValueInRange(H.toRange())+_,E^=1}),this.applyLineRangeEdits([{text:A,range:s}]),this.markComplete(v,d),this.markComplete(f,d),(m=this.resultView)===null||m===void 0||m.updateActions()}async handleAIConflictResolve(s,d){var m,v,f,N;if(!this.resultView||!this.resultView.getModel())return;const Z=this.mappingManagerService.documentMappingTurnLeft.reverse(s),y=this.mappingManagerService.documentMappingTurnRight.reverse(s);if(!Z||!y)return;this.resultView.changeRangeIntelligentState(s,{isLoading:!0},!1),this.resultView.updateDecorations().updateActions();const E=this.resultView.renderSkeletonDecoration(s,[I.default.skeleton_decoration,I.default.skeleton_decoration_background]),R=this.resultView.getContentInTimeMachineDocument(s.id);if(!R)return;const A=R.text,w=(v=(m=this.currentView)===null||m===void 0?void 0:m.getModel())===null||v===void 0?void 0:v.getValueInRange(Z.toInclusiveRange()),F=(N=(f=this.incomingView)===null||f===void 0?void 0:f.getModel())===null||N===void 0?void 0:N.getValueInRange(y.toInclusiveRange());this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"clickNum");const V=await this.resultView.requestAIResolveConflict({base:A||"",current:w||"",incoming:F||""},s,!!d?.isRegenerate);if(this.resultView.changeRangeIntelligentState(s,{isLoading:!1},!1),E(),c.ReplyResponse.is(V)){const Y=V.message;return this.resultView.changeRangeIntelligentState(s,{isComplete:!0,answerCode:Y},!0),this.applyLineRangeEdits([{range:s,text:Y}]),this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"aiOutputNum"),this.resultView.updateDecorations().updateActions(),{isSuccess:!0,isCancel:!1,errorCode:0,errorMsg:""}}return this.resultView.updateDecorations().updateActions(),c.CancelResponse.is(V)?(this.mergeConflictReportService.reportIncrementNum(this.resultView.getUri(),"cancelNum"),{isSuccess:!1,isCancel:!0,errorCode:0,errorMsg:""}):c.ErrorResponse.is(V)?{isSuccess:!1,isCancel:!1,errorCode:V.error||0,errorMsg:V.message||""}:{isSuccess:!1,isCancel:!1,errorCode:0,errorMsg:""}}markComplete(s,d){const{turnDirection:m}=s;switch(m){case b.ETurnDirection.CURRENT:{this.mappingManagerService.markCompleteTurnLeft(s,d),this.currentView.updateDecorations().updateActions();break}case b.ETurnDirection.INCOMING:{this.mappingManagerService.markCompleteTurnRight(s,d),this.incomingView.updateDecorations().updateActions();break}}}initListenEvent(){!this.currentView||!this.resultView||!this.incomingView||(this.addDispose(c.Event.any(this.currentView.onDidActionsProvider,this.resultView.onDidActionsProvider,this.incomingView.onDidActionsProvider)(({provider:s,editor:d})=>{const{provideActionsItems:m}=s;d.setConflictActions(m.call(d))})),this.addDispose(c.Event.any(this.currentView.onDidConflictActions,this.resultView.onDidConflictActions,this.incomingView.onDidConflictActions)(async({range:s,action:d,reason:m})=>{var v;switch(d){case b.ACCEPT_CURRENT_ACTIONS:this.handleAcceptChange(s,(f,N,{applyText:W})=>[{range:N,text:W}],m);break;case b.IGNORE_ACTIONS:this.markComplete(s,m),(v=this.resultView)===null||v===void 0||v.updateActions();break;case b.REVOKE_ACTIONS:this.handleAcceptRevoke(s);break;case b.ACCEPT_COMBINATION_ACTIONS:this.handleAcceptCombination(s,m);break;case b.APPEND_ACTIONS:this.handleAcceptChange(s,(f,N,{applyText:W,eol:Z})=>[{range:h.LineRange.fromPositions(N.endLineNumberExclusive,N.endLineNumberExclusive),text:W}],m);break;case b.AI_RESOLVE_ACTIONS:case b.AI_RESOLVE_REGENERATE_ACTIONS:if(this.resultView){const f=this.resultView.getFlushRange(s)||s;await this.handleAIConflictResolve(f,{isRegenerate:d===b.AI_RESOLVE_REGENERATE_ACTIONS})}break}this.resultView&&this.resultView.updateDecorations(),this.currentView&&this.currentView.launchChange(),this.incomingView&&this.incomingView.launchChange()})))}mount(s,d,m){this.currentView=s,this.resultView=d,this.incomingView=m;const v=(f,N)=>{const W=N.actionsProvider;if(!W)return;let{mouseDownGuard:Z}=W;const{onActionsClick:y}=W;if(typeof Z>"u"&&(Z=E=>{if(E.event.rightButton||E.target.type!==g.MouseTargetType.GUTTER_LINE_DECORATIONS)return!1;const{element:R}=E.target;return!!R?.className.includes(b.ADDRESSING_TAG_CLASSNAME)}),Z(f)&&y){const E=f.target.element,{classList:R}=E,A=Array.from(R).find(w=>w.startsWith(b.ADDRESSING_TAG_CLASSNAME));if(A){const w=A.replace(b.ADDRESSING_TAG_CLASSNAME,""),F=N.conflictActions.getAction(w);let V;const Y=[b.ACCEPT_CURRENT_ACTIONS,b.ACCEPT_COMBINATION_ACTIONS,b.IGNORE_ACTIONS,b.REVOKE_ACTIONS,b.APPEND_ACTIONS,b.AI_RESOLVE_ACTIONS];for(const _ of Y)if(R.contains(_)){V=_;break}V&&F&&y.call(N,F.range,V)}}};this.addDispose(s.getEditor().onMouseDown(f=>v(f,s))),this.addDispose(m.getEditor().onMouseDown(f=>v(f,m))),this.addDispose(d.getEditor().onMouseDown(f=>v(f,d))),this.initListenEvent()}};r=n.__decorate([(0,a.Injectable)({multiple:!1}),n.__metadata("design:paramtypes",[G.MappingManagerService,o.MergeConflictReportService])],r),e.ActionsManager=r},66076:(L,e,t)=>{"use strict";var n,a;Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCodeEditor=void 0;const o=t(85608),c=t(43718),g=t(31324),u=t(93961),G=t(91376),p=t(98025),h=t(24093);class b extends c.Disposable{constructor(r,l,s){super(),this.container=r,this.monacoService=l,this.injector=s,n.set(this,void 0),a.set(this,void 0),this._onDidConflictActions=new c.Emitter,this.onDidConflictActions=this._onDidConflictActions.event,this._onDidActionsProvider=new c.Emitter,this.onDidActionsProvider=this._onDidActionsProvider.event,this.mount()}launchConflictActionsEvent(r){this._onDidConflictActions.fire(r)}dispose(){super.dispose(),this.editor.dispose(),this.decorations.dispose(),o.__classPrivateFieldGet(this,a,"f").dispose()}mount(){this.editor=this.monacoService.createCodeEditor(this.container),this.updateOptions({}),this.decorations=this.injector.get(p.MergeEditorDecorations,[this,this.getEditorViewType()]),o.__classPrivateFieldSet(this,a,this.injector.get(G.ConflictActions,[this]),"f"),this.mappingManagerService=this.injector.get(u.MappingManagerService),this.addDispose(c.Event.debounce(c.Event.any(this.decorations.onDidChangeDecorations,this.editor.onDidLayoutChange),()=>{},0)(()=>{const r=this.editor.getOption(g.EditorOption.lineDecorationsWidth),s=this.editor.getLayoutInfo().contentLeft-(typeof r=="number"?r:0),d=this.decorations.getLineWidgets();d.length>0&&d.forEach(m=>{m&&m.setContainerStyle({left:s+"px"})})}))}get onDidChangeDecorations(){return this.decorations.onDidChangeDecorations}getEditor(){return this.editor}getModel(){return this.editor.getModel()}launchChange(){this.decorations.launchChange()}prepareRenderDecorations(r=0){const[l,s]=r===0?[this.documentMapping.getModifiedRange(),this.documentMapping.getOriginalRange()]:[this.documentMapping.getOriginalRange(),this.documentMapping.getModifiedRange()],d=[],m=[];return l.forEach((v,f)=>{var N;const W=s[f];W&&(y=>{var E,R;const A=r===1?h.ETurnDirection.CURRENT:h.ETurnDirection.INCOMING;W.setType(y).setTurnDirection((E=W.turnDirection)!==null&&E!==void 0?E:A),d.push(v.setType(y).setTurnDirection((R=v.turnDirection)!==null&&R!==void 0?R:A))})((N=v.type)!==null&&N!==void 0?N:v.isTendencyRight(W)?"remove":v.isTendencyLeft(W)?"insert":"modify")}),[d,m]}updateOptions(r){this.editor.updateOptions(Object.assign(Object.assign(Object.assign({},r),{automaticLayout:!0,wordBasedSuggestions:!0,renderLineHighlight:"all",folding:!1,lineNumbersMinChars:0,minimap:{enabled:!1},codeLens:!1,scrollBeyondLastLine:!0}),this.getMonacoEditorOptions()))}updateActions(){return this.conflictActions.updateActions(this.provideActionsItems()),this}updateDecorations(){const[r,l]=this.prepareRenderDecorations();return this.decorations.updateDecorations(r,l),this}registerActionsProvider(r){o.__classPrivateFieldGet(this,n,"f")||(o.__classPrivateFieldSet(this,n,r,"f"),this._onDidActionsProvider.fire({provider:r,editor:this}))}setConflictActions(r){o.__classPrivateFieldGet(this,a,"f").setActions(r)}get actionsProvider(){return o.__classPrivateFieldGet(this,n,"f")}get conflictActions(){return o.__classPrivateFieldGet(this,a,"f")}clearActions(r){this.conflictActions.clearActions(r.id)}clearDecorations(){this.decorations.clearDecorations()}getUri(){var r;return(r=this.getModel())===null||r===void 0?void 0:r.uri.path.toString()}}e.BaseCodeEditor=b,n=new WeakMap,a=new WeakMap},51472:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentCodeEditor=void 0;const n=t(85608),a=t(76003),o=t(19582),c=t(57762),g=t(24093),u=t(66076);let G=class extends u.BaseCodeEditor{get documentMapping(){return this.mappingManagerService.documentMappingTurnLeft}getMonacoEditorOptions(){return{readOnly:!0,lineNumbersMinChars:5}}prepareRenderDecorations(){return super.prepareRenderDecorations(1)}provideActionsItems(){return this.documentMapping.getOriginalRange().filter(b=>!b.isComplete).map(b=>{const I=`${g.ADDRESSING_TAG_CLASSNAME}${b.id}`;let r=g.CONFLICT_ACTIONS_ICON.RIGHT;if(b.isMerge){const l=this.documentMapping.adjacentComputeRangeMap.get(b.id);l&&l.isComplete&&(r=g.CONFLICT_ACTIONS_ICON.ROTATE_RIGHT)}return{range:b,decorationOptions:{glyphMarginClassName:g.DECORATIONS_CLASSNAME.combine(r,g.DECORATIONS_CLASSNAME.offset_left,I),marginClassName:g.DECORATIONS_CLASSNAME.combine(g.CONFLICT_ACTIONS_ICON.CLOSE,I)}}})}getMonacoDecorationOptions(h,b){return{marginClassName:g.DECORATIONS_CLASSNAME.combine(g.DECORATIONS_CLASSNAME.margin_className,g.DECORATIONS_CLASSNAME.range_type[b.type],g.DECORATIONS_CLASSNAME.stretch_right,g.DECORATIONS_CLASSNAME.stretch_left),className:g.DECORATIONS_CLASSNAME.combine(h.className||"",g.DECORATIONS_CLASSNAME.stretch_right)}}getEditorViewType(){return g.EditorViewType.CURRENT}launchConflictActionsEvent(h){super.launchConflictActionsEvent(Object.assign(Object.assign({},h),{withViewType:g.EditorViewType.CURRENT}))}inputDiffComputingResult(h){this.mappingManagerService.inputComputeResultRangeMappingTurnLeft(h),this.updateDecorations(),this.registerActionsProvider({provideActionsItems:this.provideActionsItems,mouseDownGuard:b=>!(b.target.type!==o.MouseTargetType.UNKNOWN||b.event.rightButton||!b.target.element),onActionsClick:(b,I)=>{(I===g.ACCEPT_CURRENT_ACTIONS||I===g.IGNORE_ACTIONS||I===g.APPEND_ACTIONS)&&this.launchConflictActionsEvent({range:b,action:I,reason:g.ECompleteReason.UserManual})}}),requestAnimationFrame(()=>{this.layout()})}layout(){const h=this.getEditor(),b=h.getDomNode();if(b){const I=b.querySelector("."+c.Margin.OUTER_CLASS_NAME),r=h?._modelData.hasRealView?h?._modelData.view._scrollbar.scrollbarDomNode.domNode:null;I&&r&&(I.style.right="0px",r.style.left="0px")}}};G=n.__decorate([(0,a.Injectable)({multiple:!0})],G),e.CurrentCodeEditor=G},66557:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IncomingCodeEditor=void 0;const n=t(85608),a=t(76003),o=t(24093),c=t(66076);let g=class extends c.BaseCodeEditor{get documentMapping(){return this.mappingManagerService.documentMappingTurnRight}getMonacoEditorOptions(){return{readOnly:!0,lineDecorationsWidth:42}}provideActionsItems(){return this.documentMapping.getModifiedRange().filter(p=>!p.isComplete).map(p=>{const h=`${o.ADDRESSING_TAG_CLASSNAME}${p.id}`;let b=o.CONFLICT_ACTIONS_ICON.LEFT;if(p.isMerge){const I=this.documentMapping.adjacentComputeRangeMap.get(p.id);I&&I.isComplete&&(b=o.CONFLICT_ACTIONS_ICON.ROTATE_LEFT)}return{range:p,decorationOptions:{glyphMarginClassName:o.DECORATIONS_CLASSNAME.combine(o.CONFLICT_ACTIONS_ICON.CLOSE,o.DECORATIONS_CLASSNAME.offset_right,h),firstLineDecorationClassName:o.DECORATIONS_CLASSNAME.combine(b,h)}}})}getMonacoDecorationOptions(G){return{linesDecorationsClassName:o.DECORATIONS_CLASSNAME.combine(o.DECORATIONS_CLASSNAME.stretch_right,o.DECORATIONS_CLASSNAME.stretch_left,G.className||""),className:o.DECORATIONS_CLASSNAME.combine(o.DECORATIONS_CLASSNAME.stretch_left,G.className||"")}}getEditorViewType(){return o.EditorViewType.INCOMING}launchConflictActionsEvent(G){super.launchConflictActionsEvent(Object.assign(Object.assign({},G),{withViewType:o.EditorViewType.INCOMING}))}inputDiffComputingResult(G){this.mappingManagerService.inputComputeResultRangeMappingTurnRight(G),this.updateDecorations(),this.registerActionsProvider({provideActionsItems:this.provideActionsItems,onActionsClick:(p,h)=>{(h===o.ACCEPT_CURRENT_ACTIONS||h===o.IGNORE_ACTIONS||h===o.APPEND_ACTIONS)&&this.launchConflictActionsEvent({range:p,action:h,reason:o.ECompleteReason.UserManual})}})}};g=n.__decorate([(0,a.Injectable)({multiple:!0})],g),e.IncomingCodeEditor=g},23600:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultCodeEditor=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(38070),u=t(43718),G=t(72665),p=t(88354),h=t(15194),b=t(83e3),I=t(18895),r=t(5863),l=t(23773),s=t(89995),d=t(96178),m=t(75526),v=t(81413),f=t(34239),N=t(24093),W=t(67641),Z=t(92572),y=t(80922),E=t(66076),R=w=>new p.Position(Math.max(w.startLineNumber,w.endLineNumberExclusive-1),1);let A=class extends E.BaseCodeEditor{getMonacoEditorOptions(){return{lineNumbersMinChars:2,lineDecorationsWidth:24}}constructor(F,V,Y){super(F,V,Y),this._onDidChangeContent=new c.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this._onChangeRangeIntelligentState=new c.Emitter,this.onChangeRangeIntelligentState=this._onChangeRangeIntelligentState.event,this.cancelIndicatorMap=new Map,this.supportAIConflictResolve=!1,this.isFirstInputComputeDiff=!0,this.timeMachineDocument=Y.get(v.TimeMachineDocument,[]),this.initListenEvent(),this.resolveResultWidgetManager=new W.WidgetFactory(Z.ResolveResultWidget,this,this.injector,R),this.stopWidgetManager=new W.WidgetFactory(y.StopWidget,this,this.injector,R),this.aiNativeConfigService.capabilities.supportsConflictResolve&&(this.aiBackService=Y.get(u.AIBackSerivcePath),this.resolveConflictRegistry=Y.get(u.ResolveConflictRegistryToken),this.supportAIConflictResolve=!0)}hideResolveResultWidget(F){F?this.resolveResultWidgetManager.hideWidget(F):this.resolveResultWidgetManager.hideAll()}hideStopWidget(F){F?this.stopWidgetManager.hideWidget(F):this.stopWidgetManager.hideAll()}renderSkeletonDecoration(F,V){var Y;const _=X=>({range:d.InnerRange.fromPositions(new p.Position(F.startLineNumber,1),new p.Position(Math.max(F.startLineNumber,F.endLineNumberExclusive-1),1)),options:{isWholeLine:!0,description:"skeleton",className:X}}),H=(Y=this.getModel())===null||Y===void 0?void 0:Y.deltaDecorations([],V.map(X=>_(X)));return()=>{var X;H&&((X=this.getModel())===null||X===void 0||X.deltaDecorations(H,[]))}}async requestAIResolveConflict(F,V,Y=!1){if(!this.resolveConflictRegistry)return;const _=this.resolveConflictRegistry.getThreeWayHandler();if(!_)return;if(Y){const X=this.getModel().getValueInRange(V.toRange());F.resultContent=X}return await _.providerRequest(F,{isRegenerate:Y},this.createRequestToken(V.id).token)}createRequestToken(F){const V=new c.CancellationTokenSource;return this.cancelIndicatorMap.set(F,V),V}cancelRequestToken(F){if(F){if(!this.cancelIndicatorMap.has(F))return;const V=this.cancelIndicatorMap.get(F);V?.cancel();return}this.cancelIndicatorMap.forEach(V=>{V.cancel()}),this.cancelIndicatorMap.clear()}changeRangeIntelligentState(F,V,Y=!0){F.getIntelligentStateModel().setAll(V,Y),this._onChangeRangeIntelligentState.fire(F)}getFlushRange(F){const V=F.id;return this.mappingManagerService.getAllDiffRanges().find(_=>_.id===V)}async formatDocument(F){const V={scrollTop:this.editor.getScrollTop(),scrollLeft:this.editor.getScrollLeft()};await b.StandaloneServices.get(I.IInstantiationService).invokeFunction(h.formatDocumentRangesWithSelectedProvider,this.getModel(),F.toInclusiveRange(),h.FormattingMode.Explicit,r.Progress.None,c.CancellationToken.None,!0),(0,c.runWhenIdle)(()=>{this.editor.setScrollPosition(V)})}initListenEvent(){let F=0;this.addDispose(this.editor.onDidChangeModel(()=>{const V=this.editor.getModel();V&&(F=V.getLineCount()),this.hideResolveResultWidget()})),this.supportAIConflictResolve&&this.addDispose(this.editor.onMouseMove((0,a.default)(V=>{const{target:Y}=V;if(Y.type===l.editor.MouseTargetType.GUTTER_LINE_DECORATIONS){this.hideResolveResultWidget();return}const _=Y.position;if(!_)return;const H=this.mappingManagerService.getAllDiffRanges(),X=m.LineRange.fromPositions(_.lineNumber);if(H.some(Q=>Q.isTouches(X))){const Q=H.find(M=>M.isTouches(X));if(!Q)return;Q.getIntelligentStateModel().isComplete?this.resolveResultWidgetManager.addWidget(Q):this.hideResolveResultWidget(Q.id)}else this.hideResolveResultWidget()},10))),this.addDispose(this.editor.onDidChangeModelContent(async V=>{const Y=this.editor.getModel();if(Y&&Y.getLineCount()!==F){F=Y.getLineCount();const{changes:_,eol:H}=V,X=[];_.forEach(S=>{var Q;const{text:O,range:M}=S,T=((Q=O.match(new RegExp(H,"ig")))!==null&&Q!==void 0?Q:[]).length,{startLineNumber:B,endLineNumber:x}=M,D=B-x+T;D!==0&&X.push({startLineNumber:B,endLineNumber:x,offset:D})}),X.forEach(S=>{const{startLineNumber:Q,endLineNumber:O,offset:M}=S,T=m.LineRange.fromPositions(Q,O+Math.max(0,M)),{[N.EditorViewType.CURRENT]:B,[N.EditorViewType.INCOMING]:x}=this.mappingManagerService.findIncludeRanges(T),{[N.EditorViewType.CURRENT]:D,[N.EditorViewType.INCOMING]:J}=this.mappingManagerService.findTouchesRanges(T),{[N.EditorViewType.CURRENT]:k,[N.EditorViewType.INCOMING]:z}=this.mappingManagerService.findNextLineRanges(T);if(B)this.mappingManagerService.documentMappingTurnLeft.deltaEndAdjacentQueue(B,M);else if(D)this.mappingManagerService.documentMappingTurnLeft.deltaEndAdjacentQueue(D,M);else if(k){const P=this.mappingManagerService.documentMappingTurnLeft.reverse(k);P&&this.mappingManagerService.documentMappingTurnLeft.deltaAdjacentQueueAfter(P,M,!0)}if(x)this.mappingManagerService.documentMappingTurnRight.deltaEndAdjacentQueue(x,M);else if(J)this.mappingManagerService.documentMappingTurnRight.deltaEndAdjacentQueue(J,M);else if(z){const P=this.mappingManagerService.documentMappingTurnRight.reverse(z);P&&this.mappingManagerService.documentMappingTurnRight.deltaAdjacentQueueAfter(P,M,!0)}}),this._onDidChangeContent.fire()}}))}provideActionsItems(F){if(!Array.isArray(F))return[];const V=Y=>{if(Y.isComplete)return N.CONFLICT_ACTIONS_ICON.REVOKE;if(this.supportAIConflictResolve&&Y.type==="modify"){const _=Y.getIntelligentStateModel();if(_.isLoading)return N.CONFLICT_ACTIONS_ICON.AI_RESOLVE_LOADING;if(_.isComplete)return N.CONFLICT_ACTIONS_ICON.REVOKE;if(Y.isMerge)return N.CONFLICT_ACTIONS_ICON.AI_RESOLVE}return Y.isAllowCombination&&Y.isMerge?N.CONFLICT_ACTIONS_ICON.WAND:""};return F.map(Y=>({range:Y,decorationOptions:{firstLineDecorationClassName:N.DECORATIONS_CLASSNAME.combine(V(Y),`${N.ADDRESSING_TAG_CLASSNAME}${Y.id}`)}}))}distillNeedMergeRanges(F){var V;const Y=new Map,_=F.length;let H=0,X;F.sort((S,Q)=>S.startLineNumber-Q.startLineNumber);for(let S=0;S<_;S++){const Q=F[H],O=F[S];if(Q.id!==O.id){if(X){X.isTouches(O)?(X=X.merge(O),Y.set(H,{rawRanges:(((V=Y.get(H))===null||V===void 0?void 0:V.rawRanges)||[]).concat(O),mergeRange:X})):(X=void 0,H=S);continue}else if(Q.isTouches(O)){X=Q.merge(O),Y.set(H,{rawRanges:[Q,O],mergeRange:X});continue}H+=1}}return Array.from(Y.values())}handleNeedMergeRanges(F){const V=Y=>Y.turnDirection===N.ETurnDirection.CURRENT?this.mappingManagerService.documentMappingTurnLeft:this.mappingManagerService.documentMappingTurnRight;for(let{rawRanges:Y,mergeRange:_}of F){const H=Y.length;if(H<=1)continue;Y=Y.sort((M,T)=>M.startLineNumber===T.startLineNumber?M.endLineNumberExclusive-T.endLineNumberExclusive:M.startLineNumber-T.startLineNumber);const X=Y[1],S=Y[H-2];let Q,O;for(const M of Y){const T=V(M),B=T.reverse(M);let x=B;x&&(M.id===X.id&&(x=x.deltaStart(Math.min(0,Y[0].startLineNumber-X.startLineNumber)).deltaEnd(Math.max(0,S.endLineNumberExclusive-Y[H-1].endLineNumberExclusive))),M.id===S.id&&(x=x.deltaEnd(Math.max(0,Y[H-1].endLineNumberExclusive-S.endLineNumberExclusive))),M.turnDirection===N.ETurnDirection.CURRENT&&(Q=(Q?Q.merge(x,!1):x).recordMergeRange(B)),M.turnDirection===N.ETurnDirection.INCOMING&&(O=(O?O.merge(x,!1):x).recordMergeRange(B)),T.deleteRange(x))}if(Q){const M=Q.setTurnDirection(N.ETurnDirection.CURRENT).setType("modify");this.mappingManagerService.documentMappingTurnLeft.addRange(M,_)}if(O){const M=O.setTurnDirection(N.ETurnDirection.INCOMING).setType("modify");this.mappingManagerService.documentMappingTurnRight.addRange(M,_)}}}getDiffRangesAfterDistill(){let F=this.mappingManagerService.getAllDiffRanges();if(this.isFirstInputComputeDiff){const V=this.distillNeedMergeRanges(F);this.handleNeedMergeRanges(V),F=this.mappingManagerService.getAllDiffRanges(),this.isFirstInputComputeDiff=!1}return F}prepareRenderDecorations(){const F=[],V=this.getDiffRangesAfterDistill();let Y=0,_=0,H=0,X=0,S=0,Q=0,O=0,M=!1;return V.forEach(T=>{if(T.isComplete)switch(T.completeReason){case N.ECompleteReason.AIResolved:case N.ECompleteReason.UserManual:if(T.isConflictPoint){Y++,H++;break}M=!0;case N.ECompleteReason.AutoResolvedNonConflictBeforeRunAI:case N.ECompleteReason.AutoResolvedNonConflict:switch(X++,T.turnDirection){case N.ETurnDirection.CURRENT:S++;break;case N.ETurnDirection.INCOMING:Q++;break;case N.ETurnDirection.BOTH:O++;break}break}else T.isConflictPoint?Y++:_++}),this.dataStore.updateConflictsCount({total:Y,resolved:H,nonConflicts:_}),this.dataStore.updateNonConflictingChangesResolvedCount({total:X,left:S,right:Q,both:O,userManualResolveNonConflicts:M}),this.dataStore.emitChange(),this.supportAIConflictResolve&&V.filter(T=>T.isConflictPoint).forEach(T=>{const B=T.getIntelligentStateModel();this.hideStopWidget(T.id),B.isLoading&&this.stopWidgetManager.addWidget(T)}),[V,F]}getMonacoDecorationOptions(F,V){const Y=()=>{const _=V.getIntelligentStateModel();return!!(this.supportAIConflictResolve&&_.isComplete&&!_.isLoading)};return{linesDecorationsClassName:N.DECORATIONS_CLASSNAME.combine(F.className||"",N.DECORATIONS_CLASSNAME.stretch_right,Y()?N.DECORATIONS_CLASSNAME.ai_resolve_complete_lines_decorations:"",V.turnDirection===N.ETurnDirection.CURRENT||V.turnDirection===N.ETurnDirection.BOTH?N.DECORATIONS_CLASSNAME.stretch_left:""),className:N.DECORATIONS_CLASSNAME.combine(F.className||"",Y()?N.DECORATIONS_CLASSNAME.ai_resolve_complete:"",V.turnDirection===N.ETurnDirection.CURRENT?N.DECORATIONS_CLASSNAME.stretch_left:N.DECORATIONS_CLASSNAME.combine(N.DECORATIONS_CLASSNAME.stretch_left,N.DECORATIONS_CLASSNAME.stretch_right))}}reset(){this.isFirstInputComputeDiff=!0}getEditorViewType(){return N.EditorViewType.RESULT}updateActions(){return this.conflictActions.updateActions(this.provideActionsItems(this.mappingManagerService.getAllDiffRanges())),this}getContentInTimeMachineDocument(F){return this.timeMachineDocument.getMetaData(F)}completeSituation(){const F=this.mappingManagerService.getAllDiffRanges();let V=0;for(const Y of F)(Y.isComplete||Y.getIntelligentStateModel().isComplete)&&(V+=1);return{completeCount:V,shouldCount:F.length}}launchConflictActionsEvent(F){super.launchConflictActionsEvent(Object.assign(Object.assign({},F),{withViewType:N.EditorViewType.RESULT}))}inputDiffComputingResult(){this.updateDecorations();const F=this.mappingManagerService.getAllDiffRanges();this.registerActionsProvider({provideActionsItems:()=>this.provideActionsItems(F),onActionsClick:(V,Y)=>{(Y===N.REVOKE_ACTIONS||Y===N.ACCEPT_COMBINATION_ACTIONS||Y===N.AI_RESOLVE_ACTIONS||Y===N.AI_RESOLVE_REGENERATE_ACTIONS)&&this.launchConflictActionsEvent({range:V,action:Y,reason:N.ECompleteReason.UserManual})}}),F.forEach(V=>{this.timeMachineDocument.record(V.id,{range:V,text:V.isEmpty?null:this.editor.getModel().getValueInRange(V.toInclusiveRange())})}),(0,c.runWhenIdle)(()=>{const V=F.reduce((Y,_)=>_.isConflictPoint?Y+1:Y,0);this.mergeConflictReportService.record(this.getUri(),{conflictPointNum:V,editorMode:u.MergeConflictEditorMode["3way"]})})}findDiffRange(F){const V=this.editor.getVisibleRanges();if(V.length===0)return;const Y=this.mappingManagerService.getAllDiffRanges().map(X=>X.toInclusiveRange()),_=this.editor.getPosition()||V[0].getStartPosition(),H=(0,f.findRangeForNavigation)(F,Y,_);if(H)if(H.canNavigate){if(!H.range)return}else{this.messageService.warning("No other conflicts within this editor");return}else{this.messageService.warning("No conflicts found in this editor");return}return H.range}navigate(F){const V=this.findDiffRange(F);V&&(this.editor.setSelection(V),this.editor.revealRangeNearTopIfOutsideViewport(V),this.editor.focus())}navigateForwards(){this.navigate(f.NavigationDirection.Forwards)}navigateBackwards(){this.navigate(f.NavigationDirection.Backwards)}};n.__decorate([(0,o.Autowired)(c.AINativeConfigService),n.__metadata("design:type",c.AINativeConfigService)],A.prototype,"aiNativeConfigService",void 0),n.__decorate([(0,o.Autowired)(g.MergeConflictReportService),n.__metadata("design:type",g.MergeConflictReportService)],A.prototype,"mergeConflictReportService",void 0),n.__decorate([(0,o.Autowired)(s.MappingManagerDataStore),n.__metadata("design:type",s.MappingManagerDataStore)],A.prototype,"dataStore",void 0),n.__decorate([(0,o.Autowired)(G.IMessageService),n.__metadata("design:type",Object)],A.prototype,"messageService",void 0),A=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[HTMLDivElement,c.MonacoService,o.Injector])],A),e.ResultCodeEditor=A},13914:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grid=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=n.__importStar(t(14041)),c=t(41869),g=t(81878),u=t(25918),G=t(93899),p=t(75524),h=t(43718),b=t(51500),I=t(61468),r=t(89995),l=t(96177),s=t(24093),d=n.__importDefault(t(89543)),m=t(80282),v=t(22883),f=({contrastType:Z})=>{const y=(0,c.useInjectable)(G.AbstractMenuService),[E,R]=(0,o.useReducer)(T=>(T+1)%1e6,0),A=(0,c.useInjectable)(l.MergeEditorService),w=(0,c.useInjectable)(b.IWorkspaceService),F=(0,c.useInjectable)(c.CommandService),V=(0,c.useInjectable)(h.CommandRegistry),[Y,_]=(0,o.useState)(),[H,X]=(0,o.useState)(""),[S,Q]=(0,o.useState)();(0,c.useDisposable)(()=>V.afterExecuteCommand(c.EDITOR_COMMANDS.CHANGE_ENCODING.id,()=>{R(),setTimeout(()=>{A.compare()},h.FRAME_THREE)}),[V,A]);const O=(0,o.useCallback)(T=>{if(w.workspace){const x=new c.URI(w.workspace.uri).relative(T);return x?x.toString():T.toString()}return T.toString()},[]);o.default.useEffect(()=>{const T=A.onDidInputNutrition(B=>{const{input1:x,input2:D,output:J,ancestor:k}=B;Z===s.EditorViewType.CURRENT?(_(x.getRaw()),Q(x.uri)):Z===s.EditorViewType.INCOMING?(_(D.getRaw()),Q(D.uri)):Z===s.EditorViewType.RESULT&&(_(new p.MergeEditorInputData(J.uri,"Result",O(J.uri),"").getRaw()),Q(k.uri))});return()=>{T.dispose()}},[A]),o.default.useEffect(()=>{S&&F.executeCommand(c.EDITOR_COMMANDS.GET_ENCODING.id,S).then(T=>{X(T||"")})},[S,E]);const M=(0,o.useCallback)(()=>{const T=y.createMenu(G.MenuId.MergeEditorResultTitleContext);return(0,G.generateMergedInlineActions)({menus:T}).filter(x=>Z===s.EditorViewType.RESULT?!0:x.id!==c.EDITOR_COMMANDS.MERGEEDITOR_RESET.id).map(x=>(x.id===c.EDITOR_COMMANDS.CHANGE_ENCODING.id&&S&&H&&(x.updateLabel(H.toLocaleUpperCase()),x.argsTransformer=()=>[S]),o.default.createElement(u.InlineActionWidget,{key:x.id,data:x})))},[Z,S,H]);return o.default.createElement("div",{className:d.default.title_head_container},Y&&o.default.createElement("div",{className:d.default.content},o.default.createElement("span",{className:d.default.title,title:Y.title},Y.title),o.default.createElement("span",{className:d.default.description,title:Y.description},Y.description),o.default.createElement("span",{className:d.default.detail,title:Y.detail},Y.detail)),o.default.createElement("div",{className:d.default.actions_container},M()))},N=()=>{const Z=(0,c.useInjectable)(l.MergeEditorService),y=(0,c.useInjectable)(c.CommandService),[E,R]=(0,o.useState)(!1),[A,w]=(0,o.useState)(!1),F=(0,c.useInjectable)(c.ILogger);(0,o.useEffect)(()=>{const B=Z.onHasIntelligentLoadingChange(x=>{w(x)});return()=>B.dispose()},[Z]);const V=(0,o.useCallback)(async()=>{R(!0);try{const B=await Z.accept()}catch(B){F.error(B)}finally{R(!1)}},[Z]),Y=(0,o.useCallback)(()=>{Z.acceptLeft(!1,s.ECompleteReason.UserManual)},[Z]),_=(0,o.useCallback)(()=>{Z.acceptRight(!1,s.ECompleteReason.UserManual)},[Z]),H=(0,o.useCallback)(()=>{A?Z.stopAllAIResolveConflict():Z.handleAIResolveConflict()},[Z,A]),X=(0,c.useInjectable)(r.MappingManagerDataStore),[S,Q]=(0,o.useState)(""),[O,M]=(0,o.useState)(!1);(0,o.useEffect)(()=>{const B=(0,a.default)(()=>{Q(X.summary()),M(X.canNavigate())},80,{leading:!0}),x=X.onDataChange(()=>{B()});return B(),()=>x.dispose()},[X]);const T=(0,o.useCallback)(async()=>{await Z.stopAllAIResolveConflict(),(0,c.runWhenIdle)(()=>{y.executeCommand(c.EDITOR_COMMANDS.MERGEEDITOR_RESET.id)})},[Z]);return o.default.createElement(I.MergeActions,{containerClassName:d.default.merge_editor_float_container,editorType:"3way",summary:S,onReset:T,onSwitchEditor:()=>{var B,x;let D=(x=(B=Z.getCurrentEditor())===null||B===void 0?void 0:B.getModel())===null||x===void 0?void 0:x.uri;D&&(D.scheme!=="file"&&(D=D.with({scheme:"file",path:D.path,query:""})),y.executeCommand(c.EDITOR_COMMANDS.API_OPEN_EDITOR_COMMAND_ID,D))},canNavigate:O,handlePrev:()=>{Z.resultView.navigateForwards()},handleNext:()=>{Z.resultView.navigateBackwards()},isAIResolving:A,onAIResolve:H,beforeAddons:o.default.createElement("div",{id:"merge.editor.action.button.accept",className:d.default.action_category},o.default.createElement(g.Button,{className:d.default.merge_conflict_bottom_btn,size:"default",onClick:Y},o.default.createElement(g.Icon,{icon:"left"}),o.default.createElement("span",null,(0,c.localize)("mergeEditor.action.button.accept.left"))),o.default.createElement(g.Button,{className:d.default.merge_conflict_bottom_btn,size:"default",onClick:_},o.default.createElement("span",null,(0,c.localize)("mergeEditor.action.button.accept.right")),o.default.createElement(g.Icon,{icon:"right"}))),afterAddons:o.default.createElement(g.Button,{loading:E,id:"merge.editor.action.button.apply",size:"default",className:d.default.merge_editor_apply_btn,onClick:V},(0,c.localize)("mergeEditor.action.button.apply-and-stash"))})},W=()=>{const Z=(0,c.useInjectable)(l.MergeEditorService),y=o.default.useRef(null),E=o.default.useRef(null),R=o.default.useRef(null);return(0,o.useEffect)(()=>{const[A,w,F]=[E.current,R.current,y.current];return A&&w&&F&&Z.instantiationCodeEditor(A,w,F),()=>{Z.dispose()}},[Z]),o.default.createElement("div",{className:d.default.merge_editor_container},o.default.createElement(g.SplitPanel,{overflow:"hidden",id:"merge_editor_container",flex:2},o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.CURRENT}),o.default.createElement("div",{className:d.default.content},o.default.createElement("div",{className:d.default.minimap_container},o.default.createElement(m.MiniMap,{contrastType:s.EditorViewType.CURRENT})),o.default.createElement("div",{className:d.default.editor_container,ref:E}))),o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.RESULT}),o.default.createElement("div",{className:d.default.editor_container},o.default.createElement(v.WithViewStickinessConnectComponent,{contrastType:s.EditorViewType.CURRENT}),o.default.createElement("div",{className:d.default.editor_container,ref:R}),o.default.createElement(v.WithViewStickinessConnectComponent,{contrastType:s.EditorViewType.INCOMING}))),o.default.createElement("div",{className:d.default.editor_container_arrange},o.default.createElement(f,{contrastType:s.EditorViewType.INCOMING}),o.default.createElement("div",{className:d.default.content},o.default.createElement("div",{className:d.default.editor_container,ref:y}),o.default.createElement("div",{className:d.default.minimap_container},o.default.createElement(m.MiniMap,{contrastType:s.EditorViewType.INCOMING}))))),o.default.createElement(N,null))};e.Grid=W},31775:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GuidelineWidget=void 0;const n=t(34819),a=t(24093);class o extends n.ZoneWidget{applyClass(){}applyStyle(){}_fillContainer(){this.setCssClass(a.DECORATIONS_CLASSNAME.guide_underline_widget)}constructor(g){super(g,{showArrow:!1,showFrame:!1,arrowColor:void 0,frameColor:void 0,keepEditorSelection:!0})}revealRange(g,u){}getRecordLine(){return this.recordLine}setContainerStyle(g){var u;const G=Object.keys(g);for(const p of G)Object.prototype.hasOwnProperty.call((u=this.container)===null||u===void 0?void 0:u.style,p)&&(this.container.style[p]=g[p])}addClassName(g){return this.setCssClass(g),this}showByLine(g){this.recordLine=g,super.hide(),super.show({startLineNumber:g,startColumn:0,endLineNumber:g,endColumn:Number.MAX_SAFE_INTEGER},0)}}e.GuidelineWidget=o},80282:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MiniMap=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importStar(t(14041)),c=t(41869),g=t(31324),u=t(96177),G=t(24093),p=n.__importDefault(t(89543)),h=({contrastType:b})=>{const I=(0,c.useInjectable)(u.MergeEditorService),[r,l]=o.default.useState([]);(0,o.useEffect)(()=>{const d=new c.Disposable;return d.addDispose(I.onDidMount(m=>{const{currentView:v,incomingView:f}=m;b===G.EditorViewType.CURRENT?d.addDispose(c.Event.debounce(v.onDidChangeDecorations,()=>{},16)(()=>{s(v,v.documentMapping.getOriginalRange())})):b===G.EditorViewType.INCOMING&&d.addDispose(c.Event.debounce(f.onDidChangeDecorations,()=>{},16)(()=>{s(f,f.documentMapping.getModifiedRange())}))})),()=>d.dispose()},[I,b]);const s=(0,o.useCallback)((d,m)=>{const v=d.getEditor(),f=v.getOption(g.EditorOption.lineHeight),N=v.getContentHeight(),W=[];m.forEach(Z=>{Z.isComplete||W.push({top:(Z.startLineNumber-1)*f/N*100+"%",height:Z.length*f/N*100+"%",className:p.default[Z.type]})}),l(W)},[]);return o.default.createElement("div",{className:p.default.minimap_content},r.map((d,m)=>o.default.createElement("span",{key:m,className:(0,a.default)(p.default.block,d.className),style:{top:d.top,height:d.height}})))};e.MiniMap=h},13744:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollSynchronizer=void 0;const n=t(43718),a=t(51472),o=t(66557),c=t(23600);class g extends n.Disposable{constructor(){super(),this._onScrollChange=new n.Emitter,this.onScrollChange=this._onScrollChange.event}mount(G,p,h){this.addDispose(n.Event.buffer(this.onScrollChange)(({event:b,editor:I})=>{if(!b.scrollTopChanged&&!b.scrollLeftChanged&&!b.scrollHeightChanged)return;let r=[null,null];I instanceof a.CurrentCodeEditor?r=[p,h]:I instanceof c.ResultCodeEditor?r=[G,h]:I instanceof o.IncomingCodeEditor&&(r=[G,p]),r.length===2&&r.forEach(l=>{l.getEditor().setScrollPosition({scrollLeft:b.scrollLeft,scrollTop:b.scrollTop})})})),this.addDispose(G.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:G})})),this.addDispose(h.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:h})})),this.addDispose(p.getEditor().onDidScrollChange(b=>{this._onScrollChange.fire({event:b,editor:p})}))}}e.ScrollSynchronizer=g},22883:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickinessConnectManager=e.WithViewStickinessConnectComponent=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(41869),c=t(43718),g=t(31324),u=t(96177),G=t(69972),p=t(24093),h=n.__importDefault(t(89543)),b=({piece:l})=>{const{leftTop:s,rightTop:d,leftBottom:m,rightBottom:v}=l.path,f=()=>a.default.createElement(a.default.Fragment,null,a.default.createElement("path",{className:l.rangeType,strokeOpacity:0,d:`M0,${s} L${l.width},${d} L${l.width},${v} L0,${m} z`}),a.default.createElement("path",{className:l.rangeType,fillOpacity:0,strokeLinecap:"round",strokeWidth:2,d:`M0,${s} L${l.width},${d} M${l.width},${v} L0,${m}`})),N=()=>a.default.createElement("path",{className:l.rangeType,fillOpacity:0,strokeDasharray:3,strokeWidth:2,d:`M0,${s} L${l.width},${d} M${l.width},${v} L0,${m}`});return a.default.createElement("div",{className:h.default.piece_view_lines,style:{top:l.position.top,width:l.width}},a.default.createElement("svg",{viewBox:`0 0 ${l.width} ${l.height}`,style:{height:l.height}},l.isComplete?N():f()))},I=({contrastType:l})=>{const s=(0,o.useInjectable)(u.MergeEditorService),[d,m]=a.default.useState([]);return a.default.useEffect(()=>{const v=new c.Disposable;return v.addDispose(c.Event.filter(s.stickinessConnectManager.onDidChangePiece,({editorType:f})=>f===l)(({pieces:f})=>{m(f)})),v.addDispose(s.scrollSynchronizer.onScrollChange(()=>{const[f,N]=s.stickinessConnectManager.getScrollTopWithBoth(l),W=d.map(Z=>Z.movePosition(f,N));m(W)})),()=>v.dispose()},[s,d]),a.default.createElement("div",{className:h.default.stickiness_connect_container},d.map((v,f)=>a.default.createElement(b,{key:f,piece:v})))};e.WithViewStickinessConnectComponent=I;class r extends c.Disposable{constructor(){super(),this._onDidChangePiece=new c.Emitter,this.onDidChangePiece=this._onDidChangePiece.event}generatePiece(s,d,m,v=0){const f=[],{marginWidth:N,lineHeight:W}=m;return s.forEach((Z,y)=>{const E=d[y],R=Math.min(Z.startLineNumber,E.startLineNumber),A=Math.max(Z.endLineNumberExclusive,E.endLineNumberExclusive),w=N,F=W*(A-R),V={top:(R-1)*W},Y={leftTop:Math.abs(R-Z.startLineNumber)*W,rightTop:Math.abs(R-E.startLineNumber)*W,leftBottom:(Z.endLineNumberExclusive-R)*W,rightBottom:(E.endLineNumberExclusive-R)*W};f.push(new G.StickyPieceModel(w,F,Y,V,h.default[Z.type],v===0?Z.isComplete:E.isComplete))}),f}computePiece(s){if(s===p.EditorViewType.RESULT||!(this.currentView||this.resultView||this.incomingView))return;const d=s===p.EditorViewType.CURRENT?this.currentView:this.incomingView,{documentMapping:m}=d,[v,f]=[m.getOriginalRange(),m.getModifiedRange()],N=d.getEditor().getOption(g.EditorOption.lineHeight);let Z=(s===p.EditorViewType.CURRENT?this.resultView.getEditor().getLayoutInfo():this.incomingView.getEditor().getLayoutInfo()).contentLeft;const y=(s===p.EditorViewType.CURRENT?this.resultView:this.incomingView).getEditor().getOption(g.EditorOption.lineDecorationsWidth);Z-=typeof y=="number"?y:0;const E=this.generatePiece(v,f,{marginWidth:Z,lineHeight:N},s===p.EditorViewType.INCOMING?1:0).map(R=>R.movePosition(...this.getScrollTopWithBoth(s)));this._onDidChangePiece.fire({pieces:E,editorType:s})}getScrollTopWithBoth(s){if(s===p.EditorViewType.RESULT)return[0,0];if(!(this.currentView||this.resultView||this.incomingView))return[0,0];let d,m;return s===p.EditorViewType.CURRENT?(d=this.currentView.getEditor(),m=this.resultView.getEditor()):s===p.EditorViewType.INCOMING&&(d=this.resultView.getEditor(),m=this.incomingView.getEditor()),d&&m?[d.getScrollTop(),m.getScrollTop()]:[0,0]}mount(s,d,m){this.currentView=s,this.resultView=d,this.incomingView=m,this.addDispose(c.Event.debounce(s.onDidChangeDecorations,()=>{},1)(()=>{this.computePiece(p.EditorViewType.CURRENT)})),this.addDispose(c.Event.debounce(m.onDidChangeDecorations,()=>{},1)(()=>{this.computePiece(p.EditorViewType.INCOMING)}))}}e.StickinessConnectManager=r},67641:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WidgetFactory=e.defaultPositionFactory=void 0;const n=t(41869),a=c=>new n.Position(c.endLineNumberExclusive,1);e.defaultPositionFactory=a;class o{constructor(g,u,G,p=e.defaultPositionFactory){this.contentWidget=g,this.editor=u,this.injector=G,this.positionFactory=p,this.widgetMap=new Map}hasWidget(g){return this.widgetMap.get(g.id)!==void 0}hideAll(){this.widgetMap.forEach(g=>{g.hide()}),this.widgetMap.clear()}hideWidget(g){const u=this.widgetMap.get(g);u&&(u.hide(),this.widgetMap.delete(g))}addWidget(g,...u){const G=g.id;this.widgetMap.has(G)&&this.hideWidget(G);const p=this.positionFactory(g),h=this.injector.get(this.contentWidget,[G,this.editor,g,...u]);h.show({position:p}),this.widgetMap.set(G,h)}}e.WidgetFactory=o},92572:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolveResultWidget=e.WapperAIInlineResult=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(76003),c=t(97267),g=t(81878),u=t(89195),G=t(66205),p=t(43718),h=t(52659),b=t(75526),I=t(24093),r=s=>{const{iconItems:d,isRenderThumbs:m,codeEditor:v,range:f,id:N,disablePopover:W=!1}=s,[Z,y]=a.default.useState(!1),E=(0,a.useMemo)(()=>(0,p.uuid)(4),[]),R=(0,a.useCallback)(H=>{H.stopPropagation(),H.preventDefault(),y(!1)},[Z]),A=(0,a.useCallback)(H=>{H.stopPropagation(),H.preventDefault(),R(H),w()},[Z]),w=(0,a.useCallback)(()=>{v.launchConflictActionsEvent({range:f,action:I.AI_RESOLVE_REGENERATE_ACTIONS,reason:I.ECompleteReason.UserManual}),v.hideResolveResultWidget(N)},[f,v,N]),F=(0,a.useMemo)(()=>a.default.createElement("div",{style:{padding:"8px 12px"}},a.default.createElement(g.DialogContent,{type:"confirm",buttons:[a.default.createElement(c.Button,{size:"small",onClick:R,type:"secondary"},(0,p.localize)("ButtonCancel")),a.default.createElement(c.Button,{size:"small",onClick:A},(0,p.localize)("ButtonOK"))],icon:{color:"var(--notificationsWarningIcon-foreground)",className:"question-circle"},title:(0,p.localize)("aiNative.resolve.conflict.dialog.afresh"),message:(0,p.localize)("aiNative.resolve.conflict.dialog.detection"),visible:!0,messageType:c.MessageType.Warning})),[Z]),V=(0,a.useCallback)(()=>a.default.createElement(g.Popover,{visible:Z,id:E,content:F,position:g.PopoverPosition.bottom},a.default.createElement("span",null,(0,p.localize)("aiNative.operate.afresh.title"))),[Z]),Y=(0,a.useCallback)(()=>{var H;const S=f.getIntelligentStateModel().answerCode,Q=((H=v.editor.getModel())===null||H===void 0?void 0:H.getValueInRange(f.toRange()))||"";if(S.trim()===Q.trim())w();else{if(W){w();return}y(!0)}},[f,v,Z,W]),_=(0,a.useMemo)(()=>d.concat([{icon:"afresh",text:V(),onClick:Y}]),[d,Z]);return a.default.createElement(u.AIInlineResult,{iconItems:_,isRenderThumbs:m})};e.WapperAIInlineResult=r;let l=class extends h.ReactInlineContentWidget{constructor(d,m,v){super(m.editor),this.uid=d,this.codeEditor=m,this.lineRange=v}isRenderThumbs(){return!0}iconItems(){return[{icon:"discard",text:(0,p.localize)("aiNative.operate.discard.title"),onClick:()=>{this.codeEditor.launchConflictActionsEvent({range:this.lineRange,action:I.REVOKE_ACTIONS,reason:I.ECompleteReason.UserManual}),this.codeEditor.hideResolveResultWidget()}}]}renderView(){const d=this.iconItems(),m=this.isRenderThumbs();return a.default.createElement(G.ContentWidgetContainerPanel,{style:{transform:"translateY(4px)"}},a.default.createElement(e.WapperAIInlineResult,{id:this.uid,iconItems:d,isRenderThumbs:m,codeEditor:this.codeEditor,range:this.lineRange}))}id(){return`${I.AIResolveConflictContentWidget}_${this.uid}`}};l=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,b.LineRange])],l),e.ResolveResultWidget=l},80922:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWidget=void 0;const n=t(85608),a=n.__importDefault(t(14041)),o=t(76003),c=t(89195),g=t(66205),u=t(43718),G=t(92572);let p=class extends G.ResolveResultWidget{isRenderThumbs(){return!1}iconItems(){return[{icon:"circle-pause",text:(0,u.localize)("aiNative.operate.stop.title"),onClick:()=>{this.codeEditor.cancelRequestToken(this.lineRange.id),this.codeEditor.hideStopWidget(this.lineRange.id)}}]}id(){return`${super.id()}_stop_${this.uid}`}renderView(){const b=this.iconItems(),I=this.isRenderThumbs();return a.default.createElement(g.ContentWidgetContainerPanel,{style:{transform:"translateY(4px)"}},a.default.createElement(c.AIInlineResult,{iconItems:b,isRenderThumbs:I}))}};p=n.__decorate([(0,o.Injectable)({multiple:!0})],p),e.StopWidget=p},62660:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextmateTokenizer=void 0,e.ITextmateTokenizer=Symbol("ITextmateTokenizer")},28694:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyProviderRegistry=e.ITypeHierarchyService=void 0;const n=t(40497);e.ITypeHierarchyService=Symbol("ITypeHierarchyService"),e.TypeHierarchyProviderRegistry=new n.LanguageFeatureRegistry},62663:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoModule=e.monacoBrowser=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(99721),g=t(70238),u=t(62501),G=n.__importDefault(t(44161)),p=t(80405),h=t(30198);t(89543),e.monacoBrowser=n.__importStar(t(23773));let b=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=[o.MonacoContribution,o.JsonSchemaContribution],this.providers=[u.MonacoClientContribution,{token:o.MonacoService,useClass:G.default},{token:o.ISchemaStore,useClass:h.SchemaStore},{token:o.MonacoOverrideServiceRegistry,useClass:p.MonacoOverrideServiceRegistryImpl},{token:o.IJSONSchemaRegistry,useClass:h.SchemaRegistry},{token:o.IContextKeyService,useClass:g.MonacoContextKeyService},{token:c.IConfigurationService,useClass:g.ConfigurationService}]}};b=n.__decorate([(0,a.Injectable)()],b),e.MonacoModule=b},18981:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerData=e.createMonacoEditorApi=void 0;const n=t(80673),a=t(19582),o=t(31324),c=t(74444),g=t(6727),u=t(53092),G=t(43255),p=t(99005),h=t(25061),b=t(34835);Object.defineProperty(e,"IMarkerData",{enumerable:!0,get:function(){return b.IMarkerData}});function I(){return Object.freeze({create:p.create,onDidCreateEditor:p.onDidCreateEditor,createDiffEditor:p.createDiffEditor,createModel:p.createModel,setModelLanguage:p.setModelLanguage,setModelMarkers:p.setModelMarkers,getModelMarkers:p.getModelMarkers,getModels:p.getModels,getModel:p.getModel,onDidCreateModel:p.onDidCreateModel,onWillDisposeModel:p.onWillDisposeModel,onDidChangeModelLanguage:p.onDidChangeModelLanguage,createWebWorker:p.createWebWorker,colorizeElement:p.colorizeElement,colorize:p.colorize,colorizeModelLine:p.colorizeModelLine,tokenize:p.tokenize,defineTheme:p.defineTheme,setTheme:p.setTheme,remeasureFonts:p.remeasureFonts,AccessibilitySupport:h.AccessibilitySupport,ContentWidgetPositionPreference:a.ContentWidgetPositionPreference,CursorChangeReason:g.CursorChangeReason,DefaultEndOfLine:G.DefaultEndOfLine,EditorAutoIndentStrategy:o.EditorAutoIndentStrategy,EditorOption:o.EditorOption,EndOfLinePreference:G.EndOfLinePreference,EndOfLineSequence:G.EndOfLineSequence,MinimapPosition:G.MinimapPosition,MouseTargetType:a.MouseTargetType,OverlayWidgetPositionPreference:a.OverlayWidgetPositionPreference,OverviewRulerLane:G.OverviewRulerLane,RenderLineNumbersType:o.RenderLineNumbersType,RenderMinimap:o.RenderMinimap,ScrollbarVisibility:n.ScrollbarVisibility,ScrollType:u.ScrollType,TextEditorCursorBlinkingStyle:o.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:o.TextEditorCursorStyle,TrackedRangeStickiness:G.TrackedRangeStickiness,WrappingIndent:o.WrappingIndent,ConfigurationChangedEvent:o.ConfigurationChangedEvent,BareFontInfo:c.BareFontInfo,FontInfo:c.FontInfo,TextModelResolvedOptions:G.TextModelResolvedOptions,FindMatch:G.FindMatch,EditorType:u.EditorType,EditorOptions:o.EditorOptions})}e.createMonacoEditorApi=I},52902:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceEdit=e.URI=e.monacoApi=e.monaco=void 0;const n=t(31324),a=t(18981),o=t(79865);n.EditorOptions.wrappingIndent.defaultValue=n.WrappingIndent.None,n.EditorOptions.glyphMargin.defaultValue=!1,n.EditorOptions.autoIndent.defaultValue=n.EditorAutoIndentStrategy.Advanced,n.EditorOptions.overviewRulerLanes.defaultValue=2,e.monaco=Object.freeze({editor:(0,a.createMonacoEditorApi)(),languages:(0,o.createMonacoLanguageApi)()}),e.monacoApi=e.monaco;var c=t(26592);Object.defineProperty(e,"URI",{enumerable:!0,get:function(){return c.URI}});var g=t(4225);Object.defineProperty(e,"ResourceEdit",{enumerable:!0,get:function(){return g.ResourceEdit}})},79865:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.languageFeaturesService=e.createMonacoLanguageApi=void 0;const n=t(48069),a=t(93782),o=t(42241),c=t(83e3);function g(){return Object.freeze({register:o.register,getLanguages:o.getLanguages,onLanguage:o.onLanguage,getEncodedLanguageId:o.getEncodedLanguageId,setLanguageConfiguration:o.setLanguageConfiguration,setTokensProvider:o.setTokensProvider,setMonarchTokensProvider:o.setMonarchTokensProvider,registerReferenceProvider:o.registerReferenceProvider,registerRenameProvider:o.registerRenameProvider,registerSignatureHelpProvider:o.registerSignatureHelpProvider,registerHoverProvider:o.registerHoverProvider,registerDocumentSymbolProvider:o.registerDocumentSymbolProvider,registerDocumentHighlightProvider:o.registerDocumentHighlightProvider,registerDefinitionProvider:o.registerDefinitionProvider,registerImplementationProvider:o.registerImplementationProvider,registerTypeDefinitionProvider:o.registerTypeDefinitionProvider,registerCodeLensProvider:o.registerCodeLensProvider,registerCodeActionProvider:o.registerCodeActionProvider,registerDocumentFormattingEditProvider:o.registerDocumentFormattingEditProvider,registerDocumentRangeFormattingEditProvider:o.registerDocumentRangeFormattingEditProvider,registerOnTypeFormattingEditProvider:o.registerOnTypeFormattingEditProvider,registerLinkProvider:o.registerLinkProvider,registerColorProvider:o.registerColorProvider,registerFoldingRangeProvider:o.registerFoldingRangeProvider,registerDeclarationProvider:o.registerDeclarationProvider,registerSelectionRangeProvider:o.registerSelectionRangeProvider,registerCompletionItemProvider:o.registerCompletionItemProvider,registerInlineCompletionsProvider:o.registerInlineCompletionsProvider,registerNewSymbolNameProvider:o.registerNewSymbolNameProvider,FoldingRangeKind:n.FoldingRangeKind,onLanguageEncountered:o.onLanguageEncountered,registerDocumentRangeSemanticTokensProvider:o.registerDocumentRangeSemanticTokensProvider,registerInlineEditProvider:o.registerInlineEditProvider,registerTokensProviderFactory:o.registerTokensProviderFactory,registerLinkedEditingRangeProvider:o.registerLinkedEditingRangeProvider,registerDocumentSemanticTokensProvider:o.registerDocumentSemanticTokensProvider,registerInlayHintsProvider:o.registerInlayHintsProvider,setColorMap:o.setColorMap})}e.createMonacoLanguageApi=g,e.languageFeaturesService=c.StandaloneServices.get(a.ILanguageFeaturesService)},60304:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.createStaticServiceApi=void 0;const n=t(4225),a=t(75189),o=t(14162),c=t(28240),g=t(91686),u=t(87822),G=t(88208),p=t(83e3);Object.defineProperty(e,"StandaloneServices",{enumerable:!0,get:function(){return p.StandaloneServices}});const h=t(7760),b=t(71827),I=t(99721),r=t(87423),l=t(30551),s=t(98793),d=t(54777),m=t(34835),v=t(18407),f=t(5863),N=t(95891),W=t(11619);function Z(){return Object.freeze({configurationService:p.StandaloneServices.get(I.IConfigurationService),resourceConfigurationService:p.StandaloneServices.get(G.ITextResourceConfigurationService),contextService:p.StandaloneServices.get(r.IContextKeyService),labelService:p.StandaloneServices.get(s.ILabelService),telemetryService:p.StandaloneServices.get(W.ITelemetryService),dialogService:p.StandaloneServices.get(l.IDialogService),notificationService:p.StandaloneServices.get(v.INotificationService),markerService:p.StandaloneServices.get(m.IMarkerService),modeService:p.StandaloneServices.get(o.ILanguageService),languageService:p.StandaloneServices.get(o.ILanguageService),markerDecorationsService:p.StandaloneServices.get(g.IMarkerDecorationsService),standaloneThemeService:p.StandaloneServices.get(h.IStandaloneThemeService),logService:p.StandaloneServices.get(d.ILogService),modelService:p.StandaloneServices.get(u.IModelService),codeEditorService:p.StandaloneServices.get(a.ICodeEditorService),editorProgressService:p.StandaloneServices.get(f.IEditorProgressService),storageService:p.StandaloneServices.get(N.IStorageService),editorWorkerService:p.StandaloneServices.get(c.IEditorWorkerService),bulkEditService:p.StandaloneServices.get(n.IBulkEditService),commandService:p.StandaloneServices.get(b.ICommandService)})}e.createStaticServiceApi=Z},68475:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(91405),e)},90052:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentWidgetPositionPreference=e.MouseTargetType=void 0;var n=t(19582);Object.defineProperty(e,"MouseTargetType",{enumerable:!0,get:function(){return n.MouseTargetType}}),Object.defineProperty(e,"ContentWidgetPositionPreference",{enumerable:!0,get:function(){return n.ContentWidgetPositionPreference}})},23773:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editor=void 0;const n=t(85608);e.editor=n.__importStar(t(90052))},74386:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoMenus=void 0;const n=t(41869);var a;(function(o){o.SELECTION_GROUP={id:"1_selection_group",actions:[n.EDITOR_COMMANDS.SELECT_ALL.id,"editor.action.smartSelect.expand","editor.action.smartSelect.shrink"]},o.SELECTION_MOVE_GROUP={id:"2_copy_move_group",actions:["editor.action.copyLinesUpAction","editor.action.copyLinesDownAction","editor.action.moveLinesUpAction","editor.action.moveLinesDownAction"]},o.SELECTION_CURSOR_GROUP={id:"3_cursor_group",actions:["editor.action.insertCursorAbove","editor.action.insertCursorBelow","editor.action.insertCursorAtEndOfEachLineSelected","editor.action.addSelectionToNextFindMatch","editor.action.addSelectionToPreviousFindMatch","editor.action.selectHighlights"]},o.SELECTION_GROUPS=[o.SELECTION_GROUP,o.SELECTION_MOVE_GROUP,o.SELECTION_CURSOR_GROUP]})(a=e.MonacoMenus||(e.MonacoMenus={}))},32002:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoSnippetSuggestion=e.JsonSerializedSnippet=e.MonacoSnippetSuggestProvider=void 0;const a=t(85608),o=a.__importStar(t(23304)),c=t(76003),g=t(43718),u=t(42933),G=t(57711),p=a.__importStar(t(33096)),h=t(79865),{Path:b}=g.path;let I=n=class{constructor(){this._debugDisplayName="MonacoSnippetSuggestProvider",this.snippets=new Map,this.pendingSnippets=new Map}get registeredLanguageIds(){const d=[];return this.pendingSnippets.forEach((m,v)=>{v!=="*"&&d.push(v)}),d}async provideCompletionItems(d,m,v,f){if(m.column>=n._maxPrefix||v.triggerKind===p.languages.CompletionTriggerKind.TriggerCharacter&&v.triggerCharacter===" ")return;const N=d.getLanguageId();await this.loadSnippets(N);const W=this.snippets.get(N)||[],Z={lineNumber:m.lineNumber,column:1},y=[],R=d.getLineContent(m.lineNumber).substr(0,m.column-1).toLowerCase(),A=R.match(/\s$/);for(;Z.column<m.column;){const V=d.getWordAtPosition(Z);V?(y.push(V.startColumn-1),Z.column=V.endColumn+1,V.endColumn-1<R.length&&!/\s/.test(R[V.endColumn-1])&&y.push(V.endColumn-1)):(/\s/.test(R[Z.column-1])||y.push(Z.column-1),Z.column+=1)}const w=new Set;W.forEach(w.add,w);const F=[];for(const V of y)w.forEach(Y=>{(0,g.isPatternInWord)(R,V,R.length,Y.prefix.toLowerCase(),0,Y.prefix.length)&&(F.push(new l(Y,p.Range.fromPositions(m.delta(0,-(R.length-V)),m))),w.delete(Y))});(A||y.length===0)&&w.forEach(V=>{F.push(new l(V,p.Range.fromPositions(m)))}),F.sort(l.compareByLabel);for(let V=0;V<F.length;V++){const Y=F[V];let _=V+1;for(;_<F.length&&Y.label===F[_].label;_++)F[_].label=(0,g.localize)("snippetSuggest.longLabel",F[_].label,F[_].snippet.name);_>V+1&&(F[V].label=(0,g.localize)("snippetSuggest.longLabel",F[V].label,F[V].snippet.name),V=_)}return{suggestions:F}}resolveCompletionItem(d,m){return Promise.resolve(d)}async loadSnippets(d){const m=[];m.push(...this.pendingSnippets.get(d)||[]),m.push(...this.pendingSnippets.get("*")||[]),m.length&&await Promise.all(m)}fromPath(d,m){const v=new g.DisposableCollection(g.Disposable.create(()=>{})),f=new b(m.extPath).join(d.replace(/^\.\//,"")).toString(),N=this.loadURI(g.Uri.file(f),m,v),{language:W}=m,Z=Array.isArray(W)?W:W?[W]:["*"];for(const y of Z){const E=this.pendingSnippets.get(y)||[];E.push(N),this.pendingSnippets.set(y,E),v.push(g.Disposable.create(()=>{const R=E.indexOf(N);R!==-1&&E.splice(R,1),this.pendingSnippets.delete(y)}))}return v}async loadURI(d,m,v){try{const{content:f}=await this.filesystem.resolveContent(d.toString(),{encoding:"utf-8"});if(v.disposed)return;const N=f&&o.parse(f,void 0,{disallowComments:!1});v.push(this.fromJSON(N,m))}catch(f){this.logger.error(f)}}fromJSON(d,{language:m,source:v}){const f=new g.DisposableCollection;return this.parseSnippets(d,(N,W)=>{let{prefix:Z,body:y,description:E}=W;if(Array.isArray(y)&&(y=y.join(`
|
|
28461
28461
|
`)),typeof y!="string")return;const R=[];if(m)Array.isArray(m)?R.push(...m):R.push(m);else if(typeof W.scope=="string")for(const A of W.scope.split(",")){const w=A.trim();w&&R.push(w)}if(Array.isArray(Z))for(const A of Z)f.push(this.push({scopes:R,name:N,prefix:A,description:E,body:y,source:v}));else f.push(this.push({scopes:R,name:N,prefix:Z,description:E,body:y,source:v}))}),f}parseSnippets(d,m){if(typeof d=="object")for(const v in d){const f=d[v];r.is(f)?m(v,f):this.parseSnippets(f,m)}}push(...d){const m=new g.DisposableCollection;for(const v of d)for(const f of v.scopes){const N=this.snippets.get(f)||[];N.push(v),this.snippets.set(f,N),m.push(g.Disposable.create(()=>{const W=N.indexOf(v);W!==-1&&(N.splice(W,1),this.snippets.delete(f))}))}return m}registerSnippetsProvider(){return h.languageFeaturesService.completionProvider.register(this.registeredLanguageIds,this)}};I._maxPrefix=1e4,a.__decorate([(0,c.Autowired)(u.IFileServiceClient),a.__metadata("design:type",Object)],I.prototype,"filesystem",void 0),a.__decorate([(0,c.Autowired)(g.ILogger),a.__metadata("design:type",Object)],I.prototype,"logger",void 0),I=n=a.__decorate([(0,c.Injectable)()],I),e.MonacoSnippetSuggestProvider=I;var r;(function(s){function d(m){return typeof m=="object"&&"body"in m&&"prefix"in m}s.is=d})(r=e.JsonSerializedSnippet||(e.JsonSerializedSnippet={}));class l{static compareByLabel(d,m){return d.label>m.label?1:d.label<m.label?-1:0}constructor(d,m){this.snippet=d,this.noAutoAccept=!0,this.type="snippet",this.snippetType="textmate",this.kind=p.languages.CompletionItemKind.Snippet,this.insertTextRules=p.languages.CompletionItemInsertTextRule.InsertAsSnippet,this.resolved=!1,this.label=d.prefix,this.detail=`${d.description||d.name} (${d.source})`,this.insertText=d.body,this.sortText=`z-${d.prefix}`,this.range=m}resolve(){if(!this.resolved){const d=new G.SnippetParser().parse(this.snippet.body).toString();this.documentation={value:"```\n"+d+"```"},this.resolved=!0}return this}}e.MonacoSnippetSuggestion=l},70238:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoContextKeyService=e.isContextKeyService=e.ConfigurationService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(43718),g=t(51500),u=t(65034),G=t(83e3),p=t(99721),h=t(86141),b=t(87423),I=t(60797),r="data-keybinding-context";let l=class extends c.Disposable{constructor(){super(),this._onDidChangeConfiguration=new u.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.preferenceService.onPreferencesChanged(this.triggerPreferencesChanged,this,this.disposables);const N=G.StandaloneServices.get(p.IConfigurationService);N.getValue=this.getValue.bind(this)}keys(){return this.logger.error("MonacoConfigurationService#keys not implement"),{default:[],user:[],workspace:[],workspaceFolder:[],memory:[]}}triggerPreferencesChanged(N){const W=Object.values(N),Z=W.filter(A=>A.scope===o.PreferenceScope.Default),y=W.filter(A=>A.scope===o.PreferenceScope.User),E=W.filter(A=>A.scope===o.PreferenceScope.Workspace),R=W.filter(A=>A.scope===o.PreferenceScope.Folder);Z.length&&this._onDidChangeConfiguration.fire({affectedKeys:new Set(Z.map(A=>A.preferenceName)),source:p.ConfigurationTarget.DEFAULT,change:{keys:[],overrides:[]},affectsConfiguration(A){return!0}}),y.length&&this._onDidChangeConfiguration.fire({affectedKeys:new Set(y.map(A=>A.preferenceName)),source:p.ConfigurationTarget.USER,change:{keys:[],overrides:[]},affectsConfiguration(A){return!0}}),E.length&&this._onDidChangeConfiguration.fire({affectedKeys:new Set(E.map(A=>A.preferenceName)),source:p.ConfigurationTarget.WORKSPACE,change:{keys:[],overrides:[]},affectsConfiguration(A){return!0}}),R.length&&this._onDidChangeConfiguration.fire({affectedKeys:new Set(R.map(A=>A.preferenceName)),source:this.workspaceService.isMultiRootWorkspaceOpened?p.ConfigurationTarget.WORKSPACE_FOLDER:p.ConfigurationTarget.WORKSPACE,change:{keys:[],overrides:[]},affectsConfiguration(A){return!0}})}getValue(N,W){let Z;typeof N!="string"?(W=N,Z=void 0):Z=N;const y=W&&"overrideIdentifier"in W&&W.overrideIdentifier||void 0,E=W&&"resource"in W&&!!W.resource&&W.resource.toString(),R=(0,o.createPreferenceProxy)(this.preferenceService,this.preferenceSchemaProvider.getCombinedSchema(),{resourceUri:E||void 0,overrideIdentifier:y,style:"both"});return Z?R[Z]:R}async updateValue(N,W,Z,y,E){let R=o.PreferenceScope.Default;typeof y=="number"?R=this.getPreferenceScope(y):typeof Z=="number"&&(R=this.getPreferenceScope(Z));const A=typeof Z=="object"&&"overrideIdentifier"in Z&&Z.overrideIdentifier||void 0,w=typeof Z=="object"&&"resource"in Z&&!!Z.resource&&Z.resource.toString();this.preferenceService.set(N,W,R,w||"",A)}inspect(N,W){const Z=typeof W=="object"&&"overrideIdentifier"in W&&W.overrideIdentifier||void 0,y=typeof W=="object"&&"resource"in W&&!!W.resource&&W.resource.toString(),E=this.preferenceService.inspect(N,y||"",Z),R=typeof E?.workspaceFolderValue<"u"?E?.workspaceFolderValue:typeof E?.workspaceValue<"u"?E?.workspaceValue:typeof E?.globalValue<"u"?E?.globalValue:typeof E?.defaultValue<"u"?E?.defaultValue:void 0;return{defaultValue:E?.defaultValue,userValue:E?.globalValue,userLocalValue:E?.globalValue,userRemoteValue:E?.globalValue,workspaceValue:E?.workspaceValue,workspaceFolderValue:E?.workspaceFolderValue,memoryValue:void 0,value:R,default:{value:E?.defaultValue,override:Z?E?.defaultValue:void 0},user:{value:E?.globalValue,override:Z?E?.globalValue:void 0},userLocal:{value:E?.globalValue,override:Z?E?.globalValue:void 0},userRemote:{value:E?.globalValue,override:Z?E?.globalValue:void 0},workspace:{value:E?.workspaceValue,override:Z?E?.workspaceValue:void 0},workspaceFolder:{value:E?.workspaceFolderValue,override:Z?E?.workspaceFolderValue:void 0},overrideIdentifiers:Z?[Z]:void 0}}async reloadConfiguration(N){throw new Error("MonacoContextKeyService#reloadConfiguration method not implement")}getPreferenceScope(N){let W;return N===p.ConfigurationTarget.DEFAULT?W=o.PreferenceScope.Default:N===p.ConfigurationTarget.USER||N===p.ConfigurationTarget.USER_LOCAL||N===p.ConfigurationTarget.USER_REMOTE?W=o.PreferenceScope.User:N===p.ConfigurationTarget.WORKSPACE?W=o.PreferenceScope.Workspace:N===p.ConfigurationTarget.WORKSPACE_FOLDER?W=o.PreferenceScope.Folder:W=o.PreferenceScope.Default,W}getConfigurationData(){throw new Error("MonacoContextKeyService#getConfigurationData method not implement")}};n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],l.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceSchemaProvider),n.__metadata("design:type",o.PreferenceSchemaProvider)],l.prototype,"preferenceSchemaProvider",void 0),n.__decorate([(0,a.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],l.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(c.ILogger),n.__metadata("design:type",Object)],l.prototype,"logger",void 0),l=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],l),e.ConfigurationService=l;function s(f){return f._myContextId!==void 0}e.isContextKeyService=s;let d=class extends c.Disposable{constructor(){super(),this._onDidChangeContext=new o.Emitter,this.onDidChangeContext=this._onDidChangeContext.event,this.expressions=new Map}bufferChangeEvents(N){this.contextKeyService.bufferChangeEvents(N)}listenToContextChanges(){this.addDispose(this.contextKeyService.onDidChangeContext(N=>{this._onDidChangeContext.fire(new o.ContextKeyChangeEvent(N))}))}createKey(N,W){return this.contextKeyService.createKey(N,W)}getKeysInWhen(N){let W;return typeof N=="string"&&(W=this.parse(N)),W?W.keys():[]}getContextValue(N){return this.contextKeyService.getContextKeyValue(N)}getValue(N){return this.contextKeyService.getContextKeyValue(N)}createScoped(N){if(N&&s(N))return this.injector.get(v,[N]);{const W=N||document.createElement("div"),Z=this.contextKeyService.createScoped(W);return this.injector.get(v,[Z])}}parse(N){if(!N)return;let W=this.expressions.get(N);if(!W){const Z=b.ContextKeyExpr.deserialize(N);W=Z||void 0,this.expressions.set(N,W)}return W}dispose(){this.contextKeyService.dispose()}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],d.prototype,"injector",void 0),d=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],d);let m=class extends d{constructor(){super(),this.contextKeyService=new h.ContextKeyService(this.configurationService),this.listenToContextChanges()}match(N,W){try{const Z=W||(window.document.activeElement instanceof HTMLElement?window.document.activeElement:void 0);let y;if(typeof N=="string"?y=this.parse(N):y=N,!Z)return this.contextKeyService.contextMatchesRules(y);const E=this.contextKeyService.getContext(Z);return I.KeybindingResolver._contextMatchesRules(E,y)}catch(Z){return(0,o.getDebugLogger)().error(Z),!1}}};n.__decorate([(0,a.Autowired)(p.IConfigurationService),n.__metadata("design:type",Object)],m.prototype,"configurationService",void 0),m=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],m),e.MonacoContextKeyService=m;let v=class extends d{constructor(N){super(),this.contextKeyService=N,this.listenToContextChanges()}match(N){try{let W;return typeof N=="string"?W=this.parse(N):W=N,this.contextKeyService.contextMatchesRules(W)}catch(W){return(0,o.getDebugLogger)().error(W),!1}}attachToDomNode(N){this.contextKeyService._domNode&&this.contextKeyService._domNode.removeAttribute(r),this.contextKeyService._domNode=N,this.contextKeyService._domNode.setAttribute(r,String(this.contextKeyService._myContextId))}};v=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[h.ContextKeyService])],v)},62501:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoClientContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(93899),g=t(43718),u=t(52416),G=t(53667),p=t(85521),h=t(97682),b=t(51408),I=t(94170),r=t(61612),l=t(15194),s=t(83e3),d=t(7760),m=n.__importStar(t(37347)),v=t(87423),f=t(18895),N=n.__importStar(t(67189)),W=t(33096),Z=t(93437),y=t(21880),E=t(62660),R=t(74386),A=t(32002),w=t(89647),F=t(47553),V=t(52197),Y=t(9267),_=Y.name,H=Y.version;let X=class{constructor(){this.toDisposeOnKeybindingChange=new g.DisposableCollection}get editorExtensionsRegistry(){return y.EditorExtensionsRegistry}async initialize(){this.registerOverrideServices();for(const O of this.monacoContributionProvider.getContributions())O.registerOverrideService&&O.registerOverrideService(this.overrideServicesRegistry),O.registerMonacoDefaultFormattingSelector&&O.registerMonacoDefaultFormattingSelector(this.registryDefaultFormattingSelector),O.registerEditorExtensionContribution&&O.registerEditorExtensionContribution((M,T,B)=>{const x=this.editorExtensionsRegistry.getSomeEditorContributions([M]);if(x.length===0)(0,h.registerEditorContribution)(M,T,B||h.EditorContributionInstantiation.Eager);else{const D=(0,g.removeReadonly)(x[0]);D.ctor=T,D.instantiation=B||h.EditorContributionInstantiation.Eager}}),O.registerPlatformLanguageAssociations&&O.registerPlatformLanguageAssociations(M=>{for(const T of M)(0,r.registerPlatformLanguageAssociation)(T,!0)});for(const O of this.schemaContributionProvider.getContributions())O.registerSchema(this.jsonContributionRegistry);this.setSchemaPreferenceListener(this.schemaStore),this.setPreferencesChangeListener(),this.registerMonacoEnvironment(),this.patchMonacoInternalServices(),this.patchMonacoInternalMenus(),this.initTextmateService(),this.keybindings.onKeybindingsChanged(()=>this.updateMonacoKeybindings())}registerMonacoEnvironment(){const O=new WeakRef(this.staticResourceService),M=(T,B)=>{const x=O.deref();if(!x)throw new Error(`Unsupported monaco worker: ${T}:${B}`);const D=x.resolveStaticResource(g.URI.from({scheme:g.Schemes.monaco,path:"worker",query:JSON.stringify({moduleId:T,label:B})}));if(D.scheme===g.Schemes.monaco)throw new Error(`Unsupported monaco worker: ${T}:${B}`);return(0,o.getWorkerBootstrapUrl)(D.toString(),`${T}:${B}`)};window.MonacoEnvironment||(window.MonacoEnvironment={getWorkerUrl:M})}registerOverrideServices(){const O=this.overrideServicesRegistry.getRegisteredService(o.ServiceNames.CODE_EDITOR_SERVICE),M=new s.StandaloneCommandService(s.StandaloneServices.get(f.IInstantiationService));this.monacoCommandService.setDelegate(M),this.overrideServicesRegistry.registerOverrideService(o.ServiceNames.COMMAND_SERVICE,this.monacoCommandService);const T=new b.OpenerService(O,this.monacoCommandService);T.registerOpener({open:B=>this.interceptOpen(new g.URI(B.toString()))}),this.overrideServicesRegistry.registerOverrideService(o.ServiceNames.OPENER_SERVICE,T),this.overrideServicesRegistry.registerOverrideService(o.ServiceNames.TELEMETRY_SERVICE,this.injector.get(V.MonacoTelemetryService))}patchMonacoInternalServices(){this.patchMonacoThemeService();const O=this.overrideServicesRegistry.getRegisteredService(o.ServiceNames.CODE_EDITOR_SERVICE);s.StandaloneServices.codeEditorService={get:()=>O}}patchMonacoInternalMenus(){const O=this.injector.get(c.IMenuRegistry),M=m.MenuRegistry;M.getMenuItems(m.MenuId.EditorContext).forEach(B=>{const x=S(B);O.registerMenuItem(c.MenuId.EditorContext,x)}),M.getMenuItems(m.MenuId.EditorContextPeek).forEach(B=>{const x=S(B);O.registerMenuItem(m.MenuId.EditorContextPeek,x)});const T=M.appendMenuItem;M.appendMenuItem=(B,x)=>{const D=new o.Disposable;return D.addDispose(T.apply(M,[B,x])),B===m.MenuId.EditorContext?D.addDispose(O.registerMenuItem(c.MenuId.EditorContext,S(x))):D.addDispose(O.registerMenuItem(B,S(x))),D}}initTextmateService(){this.textmateService.init(),this.textmateService.initialized=!0}registryDefaultFormattingSelector(O){return l.FormattingConflicts.setFormatterSelector(O)}updateMonacoKeybindings(){const O=N.KeybindingsRegistry;if(O instanceof s.StandaloneKeybindingService){const M=this.keybindings.getKeybindingByScope(o.KeybindingScope.USER);this.toDisposeOnKeybindingChange.dispose();for(const T of M){const B=this.keybindings.resolveKeybinding(T),x=(0,g.isString)(T.when)?v.ContextKeyExpr.deserialize(T.when):T.when,D=T.command;this.toDisposeOnKeybindingChange.push(O.addDynamicKeybinding(D,this.toMonacoKeybindingNumber(B),(J,...k)=>this.commandService.executeCommand(D,...k),x))}}}toMonacoKeybindingNumber(O){const[M,T]=O;O.length>2&&this.logger.warn("Key chords should not consist of more than two parts; got ",O);const B=this.toSingleMonacoKeybindingNumber(M),x=T?this.toSingleMonacoKeybindingNumber(T)<<16:0;return W.editor.KeyMod.chord(B,x)}toSingleMonacoKeybindingNumber(O){var M;let B=(((M=O.key)===null||M===void 0?void 0:M.keyCode)!==void 0?w.KEY_CODE_MAP[O.key.keyCode]:0)>>>0&255;return O.alt&&(B|=W.editor.KeyMod.Alt),O.shift&&(B|=W.editor.KeyMod.Shift),O.ctrl&&(B|=W.editor.KeyMod.WinCtrl),O.meta&&g.isOSX&&(B|=W.editor.KeyMod.CtrlCmd),B}setPreferencesChangeListener(){this.corePreferences.onPreferenceChanged(O=>{if(O.preferenceName==="files.associations")for(const M of this.monacoContributionProvider.getContributions())M.registerPlatformLanguageAssociations&&M?.registerPlatformLanguageAssociations(T=>{for(const B of T)(0,r.registerPlatformLanguageAssociation)(B,!0)})})}setSchemaPreferenceListener(O){this.schemaStore.onSchemasChanged(()=>{const M=O.getConfigurations();this.preferenceService.set("json.schemas",M,o.PreferenceScope.Default)})}patchMonacoThemeService(){const O=s.StandaloneServices.get(d.IStandaloneThemeService),M=O.getColorTheme.bind(O),T="__patched_getTokenStyleMetadata";O.getColorTheme=()=>{const B=M();return T in B||(Object.defineProperty(B,T,{enumerable:!1,configurable:!1,writable:!1,value:!0}),B.getTokenStyleMetadata=(x,D,J,k=!0,z={})=>{const{type:P,language:U}=(0,p.parseClassifierString)(x,J),ne=B.themeData.getTokenStyle(P,D,U,k,z);if(ne)return{foreground:B.themeData.getTokenColorIndex().get(ne.foreground),bold:ne.bold,underline:ne.underline,italic:ne.italic,strikethrough:void 0}}),B},O.getFileIconTheme=()=>this.iconService.currentTheme}registerCommands(){this.monacoActionRegistry.registerMonacoActions()}registerMenus(O){for(const M of R.MonacoMenus.SELECTION_GROUPS)M.actions.forEach((T,B)=>{const x=this.monacoCommandRegistry.validate(T);x&&O.registerMenuItem(c.MenuId.MenubarSelectionMenu,{command:x,group:M.id,order:B})});O.registerMenuItems(c.MenuId.MergeEditorResultTitleContext,[{command:{id:o.EDITOR_COMMANDS.CHANGE_ENCODING.id,label:"Change File Encoding"},group:"navigation"},{command:{id:o.EDITOR_COMMANDS.MERGEEDITOR_RESET.id,label:o.EDITOR_COMMANDS.MERGEEDITOR_RESET.label},group:"navigation"}])}registerKeybindings(O){var M;const T=N.KeybindingsRegistry,B=I.EditorContextKeys.focus,x=T.getDefaultKeybindings();for(const D of x){if(D.command===Z.DELEGATE_COMMANDS.UNDO||D.command===Z.DELEGATE_COMMANDS.REDO||D.command===Z.DELEGATE_COMMANDS.SELECT_ALL)continue;const J=this.monacoCommandRegistry.validate(D.command);if(J&&D.keybinding){const k=F.MonacoResolvedKeybinding.toKeybinding(D.keybinding);let z=D.when;if(!z)z=B;else if(!z.keys().includes(B.key))if(z.type===v.ContextKeyExprType.Or){const U=z.expr;z=v.ContextKeyExpr.or(...U.map(ne=>v.ContextKeyExpr.and(ne,B)))}else z=v.ContextKeyExpr.and(z,B);const P={command:J,args:D.commandArgs,keybinding:k,when:(M=z&&z.serialize())!==null&&M!==void 0?M:void 0,priority:(D.weight1?D.weight1*100:0)+(D.weight2||0)};T.registerKeybindingRule({id:`-${J}`,weight:D.weight1,primary:this.toMonacoKeybindingNumber(o.KeySequence.parse(k)),when:z}),O.registerKeybinding(P)}}}async interceptOpen(O){try{return await this.openerService.open(O),!0}catch(M){return this.logger.error(M),!1}}registerStaticResolver(O){O.registerStaticResourceProvider({scheme:g.Schemes.monaco,resolveStaticResource:M=>{switch(M.codeUri.path){case"worker":{const B=M.query;if(B){const{moduleId:x}=JSON.parse(B);if(x==="workerMain.js")return g.URI.parse((0,o.getCdnHref)(_,"worker/editor.worker.bundle.js",H,this.appConfig.componentCDNType))}break}}return M}})}};n.__decorate([(0,a.Autowired)(o.MonacoContribution),n.__metadata("design:type",Object)],X.prototype,"monacoContributionProvider",void 0),n.__decorate([(0,a.Autowired)(o.JsonSchemaContribution),n.__metadata("design:type",Object)],X.prototype,"schemaContributionProvider",void 0),n.__decorate([(0,a.Autowired)(y.ICommandServiceToken),n.__metadata("design:type",Object)],X.prototype,"monacoCommandService",void 0),n.__decorate([(0,a.Autowired)(y.IMonacoCommandsRegistry),n.__metadata("design:type",Object)],X.prototype,"monacoCommandRegistry",void 0),n.__decorate([(0,a.Autowired)(g.CommandService),n.__metadata("design:type",Object)],X.prototype,"commandService",void 0),n.__decorate([(0,a.Autowired)(y.IMonacoActionRegistry),n.__metadata("design:type",Object)],X.prototype,"monacoActionRegistry",void 0),n.__decorate([(0,a.Autowired)(E.ITextmateTokenizer),n.__metadata("design:type",Object)],X.prototype,"textmateService",void 0),n.__decorate([(0,a.Autowired)(u.IIconService),n.__metadata("design:type",G.IconService)],X.prototype,"iconService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],X.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],X.prototype,"schemaStore",void 0),n.__decorate([(0,a.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],X.prototype,"jsonContributionRegistry",void 0),n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],X.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],X.prototype,"corePreferences",void 0),n.__decorate([(0,a.Autowired)(p.ISemanticTokenRegistry),n.__metadata("design:type",Object)],X.prototype,"semanticTokenRegistry",void 0),n.__decorate([(0,a.Autowired)(A.MonacoSnippetSuggestProvider),n.__metadata("design:type",A.MonacoSnippetSuggestProvider)],X.prototype,"snippetSuggestProvider",void 0),n.__decorate([(0,a.Autowired)(o.IOpenerService),n.__metadata("design:type",Object)],X.prototype,"openerService",void 0),n.__decorate([(0,a.Autowired)(g.ILogger),n.__metadata("design:type",Object)],X.prototype,"logger",void 0),n.__decorate([(0,a.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],X.prototype,"overrideServicesRegistry",void 0),n.__decorate([(0,a.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],X.prototype,"keybindings",void 0),n.__decorate([(0,a.Autowired)(o.StaticResourceService),n.__metadata("design:type",o.StaticResourceService)],X.prototype,"staticResourceService",void 0),n.__decorate([(0,a.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],X.prototype,"appConfig",void 0),X=n.__decorate([(0,o.Domain)(o.ClientAppContribution,o.CommandContribution,c.MenuContribution,o.KeybindingContribution,o.StaticResourceContribution)],X),e.MonacoClientContribution=X;function S(Q){return m.isIMenuItem(Q)?{command:{id:Q.command.id,label:typeof Q.command.title=="string"?Q.command.title:Q.command.title.value},group:Q.group,when:Q.when,order:Q.order}:{submenu:Q.submenu,label:typeof Q.title=="string"?Q.title:Q.title.value,when:Q.when,group:Q.group,order:Q.order}}},89647:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KEY_CODE_MAP=void 0;const n=t(43718),a=t(85139);e.KEY_CODE_MAP=[],e.KEY_CODE_MAP[3]=a.KeyCode.PauseBreak,e.KEY_CODE_MAP[8]=a.KeyCode.Backspace,e.KEY_CODE_MAP[9]=a.KeyCode.Tab,e.KEY_CODE_MAP[13]=a.KeyCode.Enter,e.KEY_CODE_MAP[16]=a.KeyCode.Shift,e.KEY_CODE_MAP[17]=a.KeyCode.Ctrl,e.KEY_CODE_MAP[18]=a.KeyCode.Alt,e.KEY_CODE_MAP[19]=a.KeyCode.PauseBreak,e.KEY_CODE_MAP[20]=a.KeyCode.CapsLock,e.KEY_CODE_MAP[27]=a.KeyCode.Escape,e.KEY_CODE_MAP[32]=a.KeyCode.Space,e.KEY_CODE_MAP[33]=a.KeyCode.PageUp,e.KEY_CODE_MAP[34]=a.KeyCode.PageDown,e.KEY_CODE_MAP[35]=a.KeyCode.End,e.KEY_CODE_MAP[36]=a.KeyCode.Home,e.KEY_CODE_MAP[37]=a.KeyCode.LeftArrow,e.KEY_CODE_MAP[38]=a.KeyCode.UpArrow,e.KEY_CODE_MAP[39]=a.KeyCode.RightArrow,e.KEY_CODE_MAP[40]=a.KeyCode.DownArrow,e.KEY_CODE_MAP[45]=a.KeyCode.Insert,e.KEY_CODE_MAP[46]=a.KeyCode.Delete,e.KEY_CODE_MAP[48]=a.KeyCode.Digit0,e.KEY_CODE_MAP[49]=a.KeyCode.Digit1,e.KEY_CODE_MAP[50]=a.KeyCode.Digit2,e.KEY_CODE_MAP[51]=a.KeyCode.Digit3,e.KEY_CODE_MAP[52]=a.KeyCode.Digit4,e.KEY_CODE_MAP[53]=a.KeyCode.Digit5,e.KEY_CODE_MAP[54]=a.KeyCode.Digit6,e.KEY_CODE_MAP[55]=a.KeyCode.Digit7,e.KEY_CODE_MAP[56]=a.KeyCode.Digit8,e.KEY_CODE_MAP[57]=a.KeyCode.Digit9,e.KEY_CODE_MAP[65]=a.KeyCode.KeyA,e.KEY_CODE_MAP[66]=a.KeyCode.KeyB,e.KEY_CODE_MAP[67]=a.KeyCode.KeyC,e.KEY_CODE_MAP[68]=a.KeyCode.KeyD,e.KEY_CODE_MAP[69]=a.KeyCode.KeyE,e.KEY_CODE_MAP[70]=a.KeyCode.KeyF,e.KEY_CODE_MAP[71]=a.KeyCode.KeyG,e.KEY_CODE_MAP[72]=a.KeyCode.KeyH,e.KEY_CODE_MAP[73]=a.KeyCode.KeyI,e.KEY_CODE_MAP[74]=a.KeyCode.KeyJ,e.KEY_CODE_MAP[75]=a.KeyCode.KeyK,e.KEY_CODE_MAP[76]=a.KeyCode.KeyL,e.KEY_CODE_MAP[77]=a.KeyCode.KeyM,e.KEY_CODE_MAP[78]=a.KeyCode.KeyN,e.KEY_CODE_MAP[79]=a.KeyCode.KeyO,e.KEY_CODE_MAP[80]=a.KeyCode.KeyP,e.KEY_CODE_MAP[81]=a.KeyCode.KeyQ,e.KEY_CODE_MAP[82]=a.KeyCode.KeyR,e.KEY_CODE_MAP[83]=a.KeyCode.KeyS,e.KEY_CODE_MAP[84]=a.KeyCode.KeyT,e.KEY_CODE_MAP[85]=a.KeyCode.KeyU,e.KEY_CODE_MAP[86]=a.KeyCode.KeyV,e.KEY_CODE_MAP[87]=a.KeyCode.KeyW,e.KEY_CODE_MAP[88]=a.KeyCode.KeyX,e.KEY_CODE_MAP[89]=a.KeyCode.KeyY,e.KEY_CODE_MAP[90]=a.KeyCode.KeyZ,e.KEY_CODE_MAP[93]=a.KeyCode.ContextMenu,e.KEY_CODE_MAP[96]=a.KeyCode.Numpad0,e.KEY_CODE_MAP[97]=a.KeyCode.Numpad1,e.KEY_CODE_MAP[98]=a.KeyCode.Numpad2,e.KEY_CODE_MAP[99]=a.KeyCode.Numpad3,e.KEY_CODE_MAP[100]=a.KeyCode.Numpad4,e.KEY_CODE_MAP[101]=a.KeyCode.Numpad5,e.KEY_CODE_MAP[102]=a.KeyCode.Numpad6,e.KEY_CODE_MAP[103]=a.KeyCode.Numpad7,e.KEY_CODE_MAP[104]=a.KeyCode.Numpad8,e.KEY_CODE_MAP[105]=a.KeyCode.Numpad9,e.KEY_CODE_MAP[106]=a.KeyCode.NumpadMultiply,e.KEY_CODE_MAP[107]=a.KeyCode.NumpadAdd,e.KEY_CODE_MAP[108]=a.KeyCode.NUMPAD_SEPARATOR,e.KEY_CODE_MAP[109]=a.KeyCode.NumpadSubtract,e.KEY_CODE_MAP[110]=a.KeyCode.NumpadDecimal,e.KEY_CODE_MAP[111]=a.KeyCode.NumpadDivide,e.KEY_CODE_MAP[112]=a.KeyCode.F1,e.KEY_CODE_MAP[113]=a.KeyCode.F2,e.KEY_CODE_MAP[114]=a.KeyCode.F3,e.KEY_CODE_MAP[115]=a.KeyCode.F4,e.KEY_CODE_MAP[116]=a.KeyCode.F5,e.KEY_CODE_MAP[117]=a.KeyCode.F6,e.KEY_CODE_MAP[118]=a.KeyCode.F7,e.KEY_CODE_MAP[119]=a.KeyCode.F8,e.KEY_CODE_MAP[120]=a.KeyCode.F9,e.KEY_CODE_MAP[121]=a.KeyCode.F10,e.KEY_CODE_MAP[122]=a.KeyCode.F11,e.KEY_CODE_MAP[123]=a.KeyCode.F12,e.KEY_CODE_MAP[124]=a.KeyCode.F13,e.KEY_CODE_MAP[125]=a.KeyCode.F14,e.KEY_CODE_MAP[126]=a.KeyCode.F15,e.KEY_CODE_MAP[127]=a.KeyCode.F16,e.KEY_CODE_MAP[128]=a.KeyCode.F17,e.KEY_CODE_MAP[129]=a.KeyCode.F18,e.KEY_CODE_MAP[130]=a.KeyCode.F19,e.KEY_CODE_MAP[144]=a.KeyCode.NumLock,e.KEY_CODE_MAP[145]=a.KeyCode.ScrollLock,e.KEY_CODE_MAP[186]=a.KeyCode.Semicolon,e.KEY_CODE_MAP[187]=a.KeyCode.Equal,e.KEY_CODE_MAP[188]=a.KeyCode.Comma,e.KEY_CODE_MAP[189]=a.KeyCode.Minus,e.KEY_CODE_MAP[190]=a.KeyCode.Period,e.KEY_CODE_MAP[191]=a.KeyCode.Slash,e.KEY_CODE_MAP[192]=a.KeyCode.Backquote,e.KEY_CODE_MAP[193]=a.KeyCode.ABNT_C1,e.KEY_CODE_MAP[194]=a.KeyCode.ABNT_C2,e.KEY_CODE_MAP[219]=a.KeyCode.BracketLeft,e.KEY_CODE_MAP[220]=a.KeyCode.Backslash,e.KEY_CODE_MAP[221]=a.KeyCode.BracketRight,e.KEY_CODE_MAP[222]=a.KeyCode.Quote,e.KEY_CODE_MAP[223]=a.KeyCode.OEM_8,e.KEY_CODE_MAP[226]=a.KeyCode.IntlBackslash,e.KEY_CODE_MAP[229]=a.KeyCode.KEY_IN_COMPOSITION,e.KEY_CODE_MAP[91]=a.KeyCode.Meta,n.isWebKit&&(n.isMacintosh?e.KEY_CODE_MAP[93]=a.KeyCode.Meta:e.KEY_CODE_MAP[92]=a.KeyCode.Meta)},47553:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoResolvedKeybinding=void 0;const n=t(85608),a=t(41869),o=t(77179),c=t(73555),g=n.__importStar(t(37403)),u=t(84961),G=t(89647);class p extends c.ResolvedKeybinding{hasMultipleChords(){return!1}getChords(){return[]}getDispatchChords(){return[]}getSingleModifierDispatchChords(){return[]}constructor(b,I){super(),this.keySequence=b,this.parts=b.map(r=>({modifiers:{key:r.key?I.acceleratorForKey(r.key):null,ctrlKey:r.ctrl,shiftKey:r.shift,altKey:r.alt,metaKey:r.meta}}))}getLabel(){return o.UILabelProvider.toLabel(g.OS,this.parts.map(b=>b.modifiers),this.keyLabelProvider)}getAriaLabel(){return o.AriaLabelProvider.toLabel(g.OS,this.parts.map(b=>b.modifiers),this.keyLabelProvider)}getElectronAccelerator(){return this.getLabel()}getUserSettingsLabel(){return this.getLabel()}isWYSIWYG(){return!0}isChord(){return this.parts.length>1}getDispatchParts(){return this.parts.map((b,I)=>{const r=G.KEY_CODE_MAP[this.keySequence[I].key.keyCode];return u.USLayoutResolvedKeybinding.getDispatchStr(new c.KeyCodeChord(b.modifiers.ctrlKey,b.modifiers.shiftKey,b.modifiers.altKey,b.modifiers.metaKey,r))})}getSingleModifierDispatchParts(){return[]}getParts(){return this.parts.map(b=>new c.ResolvedChord(b.modifiers.ctrlKey,b.modifiers.shiftKey,b.modifiers.altKey,b.modifiers.metaKey,b.modifiers.key,b.modifiers.key))}keyLabelProvider(b){return b.key}static keyCode(b){var I,r,l,s,d,m;const v=b instanceof c.KeyCodeChord?b.keyCode:u.USLayoutResolvedKeybinding._scanCodeToKeyCode(b.scanCode),f={first:a.Key.getKey(this.monaco2BrowserKeyCode(v&255)),modifiers:[]};return b.ctrlKey&&(a.isOSX?(I=f.modifiers)===null||I===void 0||I.push(a.KeyModifier.MacCtrl):(r=f.modifiers)===null||r===void 0||r.push(a.KeyModifier.CtrlCmd)),b.shiftKey&&((l=f.modifiers)===null||l===void 0||l.push(a.KeyModifier.Shift)),b.altKey&&((s=f.modifiers)===null||s===void 0||s.push(a.KeyModifier.Alt)),b.metaKey&&((d=f.modifiers)===null||d===void 0?void 0:d.indexOf(a.KeyModifier.CtrlCmd))===-1&&((m=f.modifiers)===null||m===void 0||m.push(a.KeyModifier.CtrlCmd)),a.KeyCode.createKeyCode(f)}static keySequence(b){return b.chords.map(I=>this.keyCode(I))}static monaco2BrowserKeyCode(b){for(let I=0;I<G.KEY_CODE_MAP.length;I++)if(G.KEY_CODE_MAP[I]===b)return I;return-1}static toKeybinding(b){return b.chords.map(I=>this.keyCode(I)).join(" ")}}e.MonacoResolvedKeybinding=p},44161:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608),a=t(76003),o=t(41869),c=t(73555),g=t(19582),u=t(31324),G=t(29810),p=t(36885),h=t(62660),b=t(52902),I=t(47553);let r=class extends o.Disposable{get monacoBaseOptions(){return{glyphMargin:!0,lightbulb:{enabled:u.ShowLightbulbIconMode.OnCode},model:void 0,wordBasedSuggestions:"off",renderLineHighlight:"none",automaticLayout:!0,ignoreTrimWhitespace:!1}}createCodeEditor(s,d,m={}){const v=b.monaco.editor.create(s,Object.assign(Object.assign({},this.monacoBaseOptions),d),Object.assign(Object.assign({},this.overrideServiceRegistry.all()),m));return this.overrideMonacoKeybindingService(v),this.addClickEventListener(v),v}doAddClickEventListener(s){this.addDispose(s.onMouseDown(d=>{var m,v,f,N,W,Z;if(d.target.type===g.MouseTargetType.GUTTER_LINE_NUMBERS){const y=((m=d.target.position)===null||m===void 0?void 0:m.lineNumber)||((v=d.target.range)===null||v===void 0?void 0:v.startLineNumber);if(!y)return;s.setSelection(new G.Range(y,((f=d.target.range)===null||f===void 0?void 0:f.startColumn)||((N=d.target.position)===null||N===void 0?void 0:N.column)||0,y+1,((W=d.target.range)===null||W===void 0?void 0:W.startColumn)||((Z=d.target.position)===null||Z===void 0?void 0:Z.column)||0))}}))}addClickEventListener(s){if((0,g.isDiffEditor)(s)){const d=s.getOriginalEditor(),m=s.getModifiedEditor();this.doAddClickEventListener(d),this.doAddClickEventListener(m)}else this.doAddClickEventListener(s)}createDiffEditor(s,d,m={}){const v=b.monaco.editor.createDiffEditor(s,Object.assign(Object.assign({},this.monacoBaseOptions),d),Object.assign(Object.assign({},this.overrideServiceRegistry.all()),m));return this.overrideMonacoKeybindingService(v),this.addClickEventListener(v),v}createMergeEditor(s,d,m={}){return this.injector.get(p.MergeEditorWidget,[s,d,Object.assign(Object.assign({},this.overrideServiceRegistry.all()),m)])}overrideMonacoKeybindingService(s){this.overrideKeybindingResolver(s)}overrideKeybindingResolver(s){const d=s._standaloneKeybindingService;if(!d)return;d.resolveKeybinding=v=>[new I.MonacoResolvedKeybinding(I.MonacoResolvedKeybinding.keySequence(v),this.keybindingRegistry)],d.resolveKeyboardEvent=v=>{const f=new c.KeyCodeChord(v.ctrlKey,v.shiftKey,v.altKey,v.metaKey,v.keyCode).toKeybinding();return new I.MonacoResolvedKeybinding(I.MonacoResolvedKeybinding.keySequence(f),this.keybindingRegistry)};const m=d.lookupKeybinding;d.lookupKeybinding=(v,f)=>{const N=m.call(d,v,f);if(N)return N;const W=this.keybindingRegistry.getKeybindingsForCommand(v);if(W&&W.length)return new I.MonacoResolvedKeybinding(W[0].resolved,this.keybindingRegistry)}}registerOverride(s,d){this.logger.warn(!0,"MonacoService#getOverride will be deprecated, please use MonacoOverrideServiceRegistry#getRegisteredService instead."),this.overrideServiceRegistry.registerOverrideService(s,d)}getOverride(s){return this.logger.warn(!0,"MonacoService#getOverride will be deprecated, please use MonacoOverrideServiceRegistry#getRegisteredService instead."),this.overrideServiceRegistry.getRegisteredService(s)}testTokenize(s,d){this.textMateService.testTokenize(s,d)}};n.__decorate([(0,a.Autowired)(a.INJECTOR_TOKEN),n.__metadata("design:type",a.Injector)],r.prototype,"injector",void 0),n.__decorate([(0,a.Autowired)(h.ITextmateTokenizer),n.__metadata("design:type",Object)],r.prototype,"textMateService",void 0),n.__decorate([(0,a.Autowired)(o.MonacoOverrideServiceRegistry),n.__metadata("design:type",o.MonacoOverrideServiceRegistry)],r.prototype,"overrideServiceRegistry",void 0),n.__decorate([(0,a.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],r.prototype,"keybindingRegistry",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],r.prototype,"logger",void 0),r=n.__decorate([(0,a.Injectable)()],r),e.default=r},80405:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoOverrideServiceRegistryImpl=void 0;const n=t(85608),a=t(76003);let o=class{constructor(){this.overrideServices={}}registerOverrideService(g,u){if(this.overrideServices[g]){console.warn(`service ${g} is already registered.`);return}this.overrideServices[g]=u}getRegisteredService(g){return this.overrideServices[g]}all(){return this.overrideServices}};o=n.__decorate([(0,a.Injectable)()],o),e.MonacoOverrideServiceRegistryImpl=o},30198:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SchemaRegistry=e.SchemaStore=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=t(76003),c=t(41869),g=t(43718),u=t(81224),G=t(33096);let p=class{constructor(){this._schemas=[],this.onSchemasChangedEmitter=new c.Emitter,this.onSchemasChanged=this.onSchemasChangedEmitter.event,this.notifyChanged=(0,a.default)(()=>{this.onSchemasChangedEmitter.fire(void 0)},500)}register(r){const l=this._schemas.findIndex(s=>s.url===r.url);return l>-1?g.Disposable.create(()=>{this._schemas.splice(l,1),this.notifyChanged()}):(this._schemas.push(r),this.notifyChanged(),g.Disposable.create(()=>{const s=this._schemas.indexOf(r);s>-1&&(this._schemas.splice(s,1),this.notifyChanged())}))}getConfigurations(){return[...this._schemas]}};p=n.__decorate([(0,o.Injectable)()],p),e.SchemaStore=p;function h(I){return I.length>0&&I.charAt(I.length-1)==="#"?I.substring(0,I.length-1):I}let b=class{constructor(){this._onDidChangeSchema=new c.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}doResolveSchema(r){const l=new Set(["description","markdownDescription","markdownEnumDescriptions","deprecationMessage"]);return(0,u.cloneAndChangeByKV)(r,(s,d)=>{if(l.has(s)&&typeof d=="string")return(0,g.replaceLocalizePlaceholder)(d)})}registerSchema(r,l,s){this.schemasById[h(r)]=this.doResolveSchema(l);const d=this.schemaStore.register({fileMatch:s,url:r});return this._onDidChangeSchema.fire(r),d}notifySchemaChanged(r){this._onDidChangeSchema.fire(r)}getSchemaContributions(){return{schemas:this.schemasById}}};n.__decorate([(0,o.Autowired)(G.ISchemaStore),n.__metadata("design:type",Object)],b.prototype,"schemaStore",void 0),b=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],b),e.SchemaRegistry=b},52197:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonacoTelemetryService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(11619);let g=class{constructor(){this.telemetryLevel=c.TelemetryLevel.NONE,this.machineId="placeholder",this.sqmId="placeholder",this.firstSessionDate="placeholder",this.sendErrorTelemetry=!1,this._sessionId="placeholder",this.eventLogEmitter=new o.Dispatcher}onEventLog(G,p){return this.eventLogEmitter.on(G)(p)}get sessionId(){return this._sessionId}setEnabled(){}setExperimentProperty(){}publicLog(){}publicLog2(G,p){switch(G){case"renameInvokedEvent":this.eventLogEmitter.dispatch(G,p);break;default:}}publicLogError(){}publicLogError2(){}};g=n.__decorate([(0,a.Injectable)()],g),e.MonacoTelemetryService=g},92871:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyCode=e.CancellationTokenSource=e.CancellationToken=e.MonacoURI=e.Uri=void 0;const n=t(85608);var a=t(26592);Object.defineProperty(e,"Uri",{enumerable:!0,get:function(){return a.URI}});var o=t(26592);Object.defineProperty(e,"MonacoURI",{enumerable:!0,get:function(){return o.URI}}),n.__exportStar(t(90684),e);var c=t(84839);Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return c.CancellationToken}}),Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:function(){return c.CancellationTokenSource}});var g=t(85139);Object.defineProperty(e,"KeyCode",{enumerable:!0,get:function(){return g.KeyCode}})},93437:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DELEGATE_COMMANDS=void 0,e.DELEGATE_COMMANDS={UNDO:"undo",REDO:"redo",SELECT_ALL:"editor.action.selectAll"}},84555:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(48069),e),n.__exportStar(t(44781),e),n.__exportStar(t(62710),e)},2253:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DetailedLineRangeMapping=void 0;var n=t(46739);Object.defineProperty(e,"DetailedLineRangeMapping",{enumerable:!0,get:function(){return n.DetailedLineRangeMapping}})},34671:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyMod=e.IMarkerData=e.ScrollbarVisibility=e.Scrollable=e.CommandsRegistry=e.IContextKeyService=e.ScrollType=e.DetailedLineRangeMapping=e.TextModelResolvedOptions=e.OverviewRulerLane=e.EndOfLineSequence=e.FindMatch=e.TrackedRangeStickiness=e.EndOfLinePreference=void 0;const n=t(85608);var a=t(43255);Object.defineProperty(e,"EndOfLinePreference",{enumerable:!0,get:function(){return a.EndOfLinePreference}}),Object.defineProperty(e,"TrackedRangeStickiness",{enumerable:!0,get:function(){return a.TrackedRangeStickiness}}),Object.defineProperty(e,"FindMatch",{enumerable:!0,get:function(){return a.FindMatch}}),Object.defineProperty(e,"EndOfLineSequence",{enumerable:!0,get:function(){return a.EndOfLineSequence}}),Object.defineProperty(e,"OverviewRulerLane",{enumerable:!0,get:function(){return a.OverviewRulerLane}}),Object.defineProperty(e,"TextModelResolvedOptions",{enumerable:!0,get:function(){return a.TextModelResolvedOptions}}),n.__exportStar(t(6727),e);var o=t(46739);Object.defineProperty(e,"DetailedLineRangeMapping",{enumerable:!0,get:function(){return o.DetailedLineRangeMapping}}),n.__exportStar(t(31324),e),n.__exportStar(t(17679),e);var c=t(53092);Object.defineProperty(e,"ScrollType",{enumerable:!0,get:function(){return c.ScrollType}});var g=t(87423);Object.defineProperty(e,"IContextKeyService",{enumerable:!0,get:function(){return g.IContextKeyService}});var u=t(71827);Object.defineProperty(e,"CommandsRegistry",{enumerable:!0,get:function(){return u.CommandsRegistry}});var G=t(80673);Object.defineProperty(e,"Scrollable",{enumerable:!0,get:function(){return G.Scrollable}}),Object.defineProperty(e,"ScrollbarVisibility",{enumerable:!0,get:function(){return G.ScrollbarVisibility}});var p=t(34835);Object.defineProperty(e,"IMarkerData",{enumerable:!0,get:function(){return p.IMarkerData}});var h=t(29267);Object.defineProperty(e,"KeyMod",{enumerable:!0,get:function(){return h.KeyMod}})},33096:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=void 0;const n=t(85608);n.__exportStar(t(22689),e),n.__exportStar(t(91405),e),n.__exportStar(t(93437),e),n.__exportStar(t(34671),e),n.__exportStar(t(84555),e),n.__exportStar(t(92871),e),n.__exportStar(t(5624),e),e.editor=n.__importStar(t(34671)),e.languages=n.__importStar(t(2039))},2039:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t(85608);n.__exportStar(t(84555),e),n.__exportStar(t(82046),e),n.__exportStar(t(1482),e)},5624:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.positionToRange=void 0;function t(n){if(typeof n=="number")return{startLineNumber:n,endLineNumber:n,startColumn:1,endColumn:1};{const{lineNumber:a}=n;return{startLineNumber:a,endLineNumber:a,startColumn:1,endColumn:1}}}e.positionToRange=t},91405:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentAction=e.NewSymbolNameTag=e.CodeActionTriggerType=e.Emitter=e.EndOfLineSequence=e.Position=void 0;var n=t(88354);Object.defineProperty(e,"Position",{enumerable:!0,get:function(){return n.Position}});var a=t(43255);Object.defineProperty(e,"EndOfLineSequence",{enumerable:!0,get:function(){return a.EndOfLineSequence}});var o=t(65034);Object.defineProperty(e,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});var c=t(48069);Object.defineProperty(e,"CodeActionTriggerType",{enumerable:!0,get:function(){return c.CodeActionTriggerType}});var g=t(48069);Object.defineProperty(e,"NewSymbolNameTag",{enumerable:!0,get:function(){return g.NewSymbolNameTag}});var u;(function(G){G[G.None=0]="None",G[G.Indent=1]="Indent",G[G.IndentOutdent=2]="IndentOutdent",G[G.Outdent=3]="Outdent"})(u=e.IndentAction||(e.IndentAction={}))},20868:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(33096),e)},31379:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(91048),g=t(80037),u=t(92804),G=t(45007);let p=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:g.OpenedEditorDecorationService,useClass:g.OpenedEditorDecorationService},{token:G.OpenedEditorService,useClass:G.OpenedEditorService},{token:u.OpenedEditorModelService,useClass:u.OpenedEditorModelService},c.OpenedEditorContribution]}};p=n.__decorate([(0,a.Injectable)()],p),e.OpenedEditorModule=p},88234:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorFile=e.EditorFileGroup=e.EditorFileRoot=void 0;const n=t(97267),a=t(41869);class o extends n.CompositeTreeNode{static is(G){return!!G&&!G.parent}constructor(G){super(G,void 0)}get expanded(){return!0}}e.EditorFileRoot=o;class c extends n.CompositeTreeNode{static isEditorGroup(G){return typeof G.resources<"u"}static is(G){return!!G&&!!G.group}constructor(G,p,h){super(G,h),this.group=p,this.groupIndex=this.group.index}get expanded(){return!0}get name(){return(0,a.formatLocalize)("opened.editors.group.title",this.groupIndex+1)}get displayName(){return this.name}get tooltip(){return this.name}dispose(){super.dispose()}}e.EditorFileGroup=c;class g extends n.TreeNode{static is(G){return n.TreeNode.is(G)&&"uri"in G}constructor(G,p,h,b=!1,I){super(G,I,void 0,{name:`${p.uri.toString()}`}),this.resource=p,this.tooltip=h,this.dirty=b}get displayName(){return this.resource?this.resource.name:""}get uri(){return this.resource?this.resource.uri:new a.URI}}e.EditorFile=g},80691:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OPENED_EDITOR_BADGE_LIMIT=e.OPENED_EDITOR_TREE_NODE_HEIGHT=e.EditorTreeNode=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(97267),g=t(41869),u=t(65046),G=t(88234),p=n.__importDefault(t(53940)),h=({item:b,defaultLeftPadding:I=8,leftPadding:r=8,onClick:l,onContextMenu:s,itemType:d,decorationService:m,labelService:v,commandService:f,decorations:N})=>{const W=G.EditorFileGroup.is(b)?null:m.getDecoration(b.uri,!1),Z=(0,g.useDesignStyles)(p.default.opened_editor_node,"opened_editor_node"),y=(0,g.useDesignStyles)(p.default.opened_editor_node_overflow_wrap,"opened_editor_node_overflow_wrap"),E=M=>{(d===c.TreeNodeType.TreeNode||d===c.TreeNodeType.CompositeTreeNode)&&l(M,b,d)},R=M=>{M.nativeEvent.which!==0&&(d===c.TreeNodeType.TreeNode||d===c.TreeNodeType.CompositeTreeNode)&&s(M,b,d)},A=`${I+(b.depth||0)*(r||0)+(!G.EditorFileGroup.is(b)&&!G.EditorFileGroup.isRoot(b.parent)?18:0)}px`,w={color:W?W.color:"",height:e.OPENED_EDITOR_TREE_NODE_HEIGHT,lineHeight:`${e.OPENED_EDITOR_TREE_NODE_HEIGHT}px`,paddingLeft:A},F=M=>{if(G.EditorFileGroup.is(M))return null;const T=M.resource.icon||v.getIcon(M.uri,{isDirectory:!1});return o.default.createElement("div",{className:(0,a.default)(p.default.file_icon,T),style:{height:e.OPENED_EDITOR_TREE_NODE_HEIGHT,lineHeight:`${e.OPENED_EDITOR_TREE_NODE_HEIGHT}px`}})},V=M=>G.EditorFileGroup.is(M)||M.uri.scheme===u.EDITOR_WEBVIEW_SCHEME?M.displayName:M.displayName||v.getName(M.uri),Y=M=>o.default.createElement("div",{className:(0,a.default)(p.default.opened_editor_node_segment,p.default.opened_editor_node_displayname)},V(M)),_=M=>G.EditorFileGroup.is(M)||G.EditorFile.is(M)&&M.tooltip===V(M)?null:o.default.createElement("div",{className:(0,a.default)(p.default.opened_editor_node_segment_grow,p.default.opened_editor_node_description)},M.tooltip),H=()=>o.default.createElement("div",{className:(0,a.default)(p.default.opened_editor_node_segment,p.default.opened_editor_node_tail)},X()),X=()=>W?o.default.createElement("div",{className:p.default.opened_editor_node_status},W.badge.slice()):null,S=()=>{let M=b.tooltip;return W&&W.badge&&(M+=` \u2022 ${W.tooltip}`),M},Q=()=>{let M=[];return G.EditorFileGroup.is(b)?(M=[{icon:(0,g.getIcon)("save-all"),title:(0,g.localize)("opened.editors.save.byGroup"),command:g.OPEN_EDITORS_COMMANDS.SAVE_BY_GROUP.id},{icon:(0,g.getIcon)("clear"),title:(0,g.localize)("opened.editors.close.byGroup"),command:g.OPEN_EDITORS_COMMANDS.CLOSE_BY_GROUP.id}],o.default.createElement("div",{className:p.default.opened_editor_right_actions},M.map(T=>{const B=x=>{x.stopPropagation(),x.preventDefault(),f.executeCommand(T.command,b)};return o.default.createElement(c.Button,{type:"icon",key:`${b.id}-${T.command}`,iconClass:(0,a.default)(p.default.action_icon,T.icon),title:T.title,onClick:B})}))):(M=[{icon:(0,g.getIcon)("window-close"),title:(0,g.localize)("file.close"),command:g.OPEN_EDITORS_COMMANDS.CLOSE.id}],o.default.createElement("div",{className:p.default.opened_editor_left_actions},M.map(T=>{const B=x=>{x.stopPropagation(),x.preventDefault(),f.executeCommand(T.command,b)};return o.default.createElement(c.Button,{type:"icon",key:`${b.id}-${T.command}`,iconClass:(0,a.default)(p.default.action_icon,T.icon),title:T.title,onClick:B})})))},O=()=>o.default.createElement("div",{className:p.default.opened_editor_action_bar},Q());return o.default.createElement("div",{key:b.id,onClick:E,onContextMenu:R,title:S(),className:(0,a.default)(Z,N?N.classlist:null,G.EditorFile.is(b)&&b.dirty&&p.default.dirty),style:w,"data-id":b.id},O(),o.default.createElement("div",{className:(0,a.default)(p.default.opened_editor_node_content)},F(b),o.default.createElement("div",{className:y},Y(b),_(b)),H()))};e.EditorTreeNode=h,e.OPENED_EDITOR_TREE_NODE_HEIGHT=22,e.OPENED_EDITOR_BADGE_LIMIT=99},91048:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(68456),g=t(93899),u=t(54414),G=t(32595),p=t(63067),h=t(21212),b=t(53598),I=t(88234),r=t(92804);let l=class{async onStart(){this.mainLayoutService.collectViewComponent({id:h.ExplorerOpenedEditorViewId,name:(0,o.localize)("opened.editors.title"),weight:1,priority:10,collapsed:!0,component:b.ExplorerOpenEditorPanel},G.EXPLORER_CONTAINER_ID)}registerCommands(d){d.registerCommand(o.OPEN_EDITORS_COMMANDS.SAVE_ALL,{execute:()=>{this.workbenchEditorService.saveAll()}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.CLOSE_ALL,{execute:async()=>{await this.workbenchEditorService.closeAll(),this.openedEditorModelService.clear()}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.CLOSE_BY_GROUP,{execute:m=>{this.openedEditorModelService.closeAllByGroup(m)}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.SAVE_BY_GROUP,{execute:m=>{this.openedEditorModelService.saveAllByGroup(m)}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.CLOSE,{execute:async m=>{let v;m.parent&&I.EditorFileGroup.is(m.parent)&&(v=m.parent.group),await this.commandService.executeCommand(o.EDITOR_COMMANDS.CLOSE.id,{group:v,uri:m.uri}),m.parent.unlinkItem(m)}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.OPEN,{execute:m=>{let v=0;m.parent&&I.EditorFileGroup.is(m.parent)&&(v=m.parent.group.index),this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,m.uri,{groupIndex:v})}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.OPEN_TO_THE_SIDE,{execute:m=>{let v=0;m.parent&&I.EditorFileGroup.is(m.parent)&&(v=m.parent.group.index),this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,m.uri,{groupIndex:v,split:4,focus:!0})}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.COMPARE_SELECTED,{execute:m=>{this.commandService.executeCommand(o.FILE_COMMANDS.COMPARE_SELECTED.id,m.uri,[m.uri])}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.COPY_PATH,{execute:m=>{this.commandService.executeCommand(o.FILE_COMMANDS.COPY_PATH.id,m.uri,[m.uri])}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.COPY_RELATIVE_PATH,{execute:m=>{this.commandService.executeCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,m.uri,[m.uri])}}),d.registerCommand(o.OPEN_EDITORS_COMMANDS.LOCATION,{execute:m=>{this.openedEditorModelService.location(m)}})}registerToolbarItems(d){d.registerItem({id:o.OPEN_EDITORS_COMMANDS.SAVE_ALL.id,command:o.OPEN_EDITORS_COMMANDS.SAVE_ALL.id,viewId:h.ExplorerOpenedEditorViewId,label:(0,o.localize)("opened.editors.save.all")}),d.registerItem({id:o.OPEN_EDITORS_COMMANDS.CLOSE_ALL.id,command:o.OPEN_EDITORS_COMMANDS.CLOSE_ALL.id,viewId:h.ExplorerOpenedEditorViewId,label:(0,o.localize)("opened.editors.close.all")})}registerMenus(d){d.registerMenuItem(g.MenuId.OpenEditorsContext,{command:{id:o.OPEN_EDITORS_COMMANDS.OPEN.id,label:(0,o.localize)("opened.editors.open")},order:1,group:"1_open"}),d.registerMenuItem(g.MenuId.OpenEditorsContext,{command:{id:o.OPEN_EDITORS_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("opened.editors.openToTheSide")},order:2,group:"1_open"}),d.registerMenuItem(g.MenuId.OpenEditorsContext,{command:{id:o.OPEN_EDITORS_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("opened.editors.compare")},group:"2_operator"}),d.registerMenuItem(g.MenuId.OpenEditorsContext,{command:{id:o.OPEN_EDITORS_COMMANDS.COPY_PATH.id,label:(0,o.localize)("opened.editors.copyPath")},group:"3_path"}),d.registerMenuItem(g.MenuId.OpenEditorsContext,{command:{id:o.OPEN_EDITORS_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("opened.editors.copyRelativePath")},group:"3_path"})}};n.__decorate([(0,a.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],l.prototype,"mainLayoutService",void 0),n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",u.WorkbenchEditorService)],l.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(r.OpenedEditorModelService),n.__metadata("design:type",r.OpenedEditorModelService)],l.prototype,"openedEditorModelService",void 0),n.__decorate([(0,a.Autowired)(o.CommandService),n.__metadata("design:type",Object)],l.prototype,"commandService",void 0),l=n.__decorate([(0,o.Domain)(o.ClientAppContribution,c.TabBarToolbarContribution,o.CommandContribution,g.MenuContribution)],l),e.OpenedEditorContribution=l},53598:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerOpenEditorPanel=void 0;const n=t(85608),a=n.__importStar(t(14041)),o=t(97267),c=t(41869),g=t(68974),u=t(48560),G=n.__importDefault(t(65698)),p=t(80691),h=t(92804),b=({viewState:I})=>{const[l,s]=(0,a.useState)(!1),[d,m]=(0,a.useState)(!0),[v,f]=(0,a.useState)(),{width:N,height:W}=I,Z=(0,a.useRef)(null),y=(0,u.useInjectable)(h.OpenedEditorModelService),{decorationService:E,labelService:R,commandService:A}=y,w=Q=>{y.handleTreeHandler(Object.assign(Object.assign({},Q),{hasDirectFocus:()=>Z.current===document.activeElement}))},F=(0,a.useCallback)((Q,O,M)=>{Q.stopPropagation();const{handleItemClick:T}=y;O&&T(O,M)},[y]),V=(0,a.useCallback)((Q,O)=>{const{handleContextMenu:M}=y;M(Q,O)},[]),Y=(0,a.useCallback)(Q=>{const{handleContextMenu:O}=y;O(Q)},[y]),_=(0,a.useCallback)(()=>{const{enactiveFileDecoration:Q}=y;Q()},[]),H=(0,a.useCallback)(async Q=>{await y.whenReady,!Q.isCancellationRequested&&(y.treeModel&&(f(y.treeModel),await y.treeModel.ensureReady,Q.isCancellationRequested)||(m(!1),s(!0)))},[d,l,y]);(0,a.useEffect)(()=>{l&&y.onTreeModelChange(async Q=>{m(!0),Q&&await Q.ensureReady,f(Q),m(!1)})},[l]),(0,a.useEffect)(()=>{const Q=new c.CancellationTokenSource;return H(Q.token),()=>{Q.cancel()}},[]),(0,a.useEffect)(()=>{var Q;const O=()=>{y.handleTreeBlur()};return(Q=Z.current)===null||Q===void 0||Q.addEventListener("blur",O,!0),()=>{var M;(M=Z.current)===null||M===void 0||M.removeEventListener("blur",O,!0),y.handleTreeBlur()}},[Z.current]);const X=(0,a.useCallback)(Q=>a.default.createElement(p.EditorTreeNode,{item:Q.item,itemType:Q.itemType,decorationService:E,labelService:R,commandService:A,decorations:y.decorations.getDecorations(Q.item),onClick:F,onContextMenu:V,defaultLeftPadding:22,leftPadding:0}),[y.treeModel]),S=()=>l?d?a.default.createElement(g.Progress,{loading:!0}):v?a.default.createElement(o.RecycleTree,{height:W,width:N,itemHeight:22,onReady:w,model:v,placeholder:()=>a.default.createElement("span",{className:G.default.opened_editor_empty_text},(0,c.localize)("opened.editors.empty"))},X):a.default.createElement("span",{className:G.default.opened_editor_empty_text},(0,c.localize)("opened.editors.empty")):a.default.createElement("span",{className:G.default.opened_editor_empty_text},(0,c.localize)("opened.editors.empty"));return a.default.createElement("div",{className:G.default.opened_editor_container,tabIndex:-1,ref:Z,onContextMenu:Y,onClick:_},S())};e.ExplorerOpenEditorPanel=b},80037:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorDecorationService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(41893),g=t(52416);let u=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(()=>{this.onDidChangeEmitter.fire()}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(p,h=!1){p instanceof o.URI&&(p=o.Uri.parse(p.toString()));const b=this.decorationsService.getDecoration(p,h);return b?Object.assign(Object.assign({},b),{color:this.themeService.getColor({id:b.color})}):{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};n.__decorate([(0,a.Autowired)(c.IDecorationsService),n.__metadata("design:type",c.IDecorationsService)],u.prototype,"decorationsService",void 0),n.__decorate([(0,a.Autowired)(g.IThemeService),n.__metadata("design:type",Object)],u.prototype,"themeService",void 0),u=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],u),e.OpenedEditorDecorationService=u},53929:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorEventService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(54414),g=t(57517);let u=class extends o.WithEventBus{constructor(){super(),this._onDidChange=new o.Emitter,this._onDidDecorationChange=new o.Emitter,this._onDidActiveChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.onDidDecorationChange=this._onDidDecorationChange.event,this.onDidActiveChange=this._onDidActiveChange.event}onEditorGroupOpenEvent(p){this._onDidActiveChange.fire(p.payload)}onEditorGroupCloseEvent(){this._onDidChange.fire(null)}onEditorGroupDisposeEvent(){this._onDidChange.fire(null)}onResourceDecorationChangeEvent(p){this._onDidDecorationChange.fire(p.payload)}};n.__decorate([(0,o.OnEvent)(g.EditorGroupOpenEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.EditorGroupOpenEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onEditorGroupOpenEvent",null),n.__decorate([(0,o.OnEvent)(g.EditorGroupCloseEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],u.prototype,"onEditorGroupCloseEvent",null),n.__decorate([(0,o.OnEvent)(g.EditorGroupDisposeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],u.prototype,"onEditorGroupDisposeEvent",null),n.__decorate([(0,o.OnEvent)(c.ResourceDecorationChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[c.ResourceDecorationChangeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResourceDecorationChangeEvent",null),u=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],u),e.OpenedEditorEventService=u},90645:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(88234),G=t(80037);let p=n=class extends c.TreeModel{constructor(b){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(b)}init(b){this.root=b,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,this.doDispatchChange.bind(this)),this.decorationService.onDidChange(this.doDispatchChange.bind(this))}doDispatchChange(){this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})}};p.DEFAULT_FLUSH_DELAY=100,a.__decorate([(0,o.Autowired)(G.OpenedEditorDecorationService),a.__metadata("design:type",G.OpenedEditorDecorationService)],p.prototype,"decorationService",void 0),p=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.EditorFileGroup])],p),e.OpenedEditorModel=p},92804:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorModelService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(93899),G=t(26542),p=t(57517),h=t(51553),b=t(32595),I=t(63067),r=t(21212),l=t(88234),s=a.__importDefault(t(53940)),d=t(80037),m=t(53929),v=t(90645),f=t(45007),{Path:N}=g.path;let W=n=class{constructor(){this._changeEventDispatchQueue=[],this.selectedDecoration=new c.Decoration(s.default.mod_selected),this.focusedDecoration=new c.Decoration(s.default.mod_focused),this.contextMenuDecoration=new c.Decoration(s.default.mod_actived),this._selectedFiles=[],this.disposableCollection=new g.DisposableCollection,this.onDidRefreshedEmitter=new g.Emitter,this.onTreeModelChangeEmitter=new g.Emitter,this.locationDelayer=new g.ThrottledDelayer(n.DEFAULT_LOCATION_FLUSH_DELAY),this._dirtyUris=[],this.activeFileDecoration=(y,E=!0)=>{var R;this.contextMenuFile&&(this.contextMenuDecoration.removeTarget(this.contextMenuFile),this._contextMenuFile=void 0),y&&(this.removeSelectDecoration(),this.removeFocusedDecoration(),this.selectedDecoration.addTarget(y),this.focusedDecoration.addTarget(y),this._focusedFile=y,this._selectedFiles=[y],E&&((R=this.treeModel)===null||R===void 0||R.dispatchChange()))},this.selectFileDecoration=(y,E=!0)=>{var R;this.contextMenuFile&&(this.contextMenuDecoration.removeTarget(this.contextMenuFile),this._contextMenuFile=void 0),y&&(this.removeSelectDecoration(),this.removeFocusedDecoration(),this.selectedDecoration.addTarget(y),this._selectedFiles=[y],E&&((R=this.treeModel)===null||R===void 0||R.dispatchChange()))},this.activeFileActivedDecoration=y=>{var E;this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),this.removeFocusedDecoration(),this.contextMenuDecoration.addTarget(y),this._contextMenuFile=y,(E=this.treeModel)===null||E===void 0||E.dispatchChange()},this.enactiveFileDecoration=()=>{var y;this.removeFocusedDecoration(),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(y=this.treeModel)===null||y===void 0||y.dispatchChange()},this.handleContextMenu=(y,E)=>{if(!E){this.enactiveFileDecoration();return}y.stopPropagation(),y.preventDefault();const{x:R,y:A}=y.nativeEvent;this.activeFileActivedDecoration(E);const w=this.contextMenuService.createMenu({id:u.MenuId.OpenEditorsContext,contextKeyService:this.contextMenuContextKeyService}),F=w.getMergedMenuNodes();w.dispose(),this.ctxMenuRenderer.show({anchor:{x:R,y:A},menuNodes:F,args:[E]})},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleItemClick=(y,E)=>{this.activeFileDecoration(y),E===c.TreeNodeType.TreeNode&&this.openFile(y)},this.flushEventQueue=()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((R,A)=>{const w=N.pathDepth(R),F=N.pathDepth(A);return w-F});const y=[this._changeEventDispatchQueue[0]];for(const R of this._changeEventDispatchQueue)y.some(A=>R.indexOf(A)===0)||y.push(R);const E=(0,g.pSeries)(y.map(R=>async()=>{var A,w;const F=(w=(A=this.treeModel)===null||A===void 0?void 0:A.root)===null||w===void 0?void 0:w.watchEvents.get(R);return F&&typeof F.callback=="function"&&await F.callback({type:c.WatchEvent.Changed,path:R}),null}));return this._changeEventDispatchQueue=[],E},this.location=async(y,E)=>{this.locationDelayer.trigger(async()=>{await this.flushEventQueuePromise;let R=this.openedEditorService.getEditorNodeByUri(y,E);R&&this.editorTreeHandle&&(R=await this.editorTreeHandle.ensureVisible(R),R&&(this.focusedFile===R?this.activeFileDecoration(R):this.selectFileDecoration(R)))})},this.openFile=y=>{let E=0;y.parent&&l.EditorFileGroup.is(y.parent)&&(E=y.parent.group.index),this.commandService.executeCommand(g.EDITOR_COMMANDS.OPEN_RESOURCE.id,y.uri,{groupIndex:E,preserveFocus:!0,disableNavigateOnOpendEditor:!0})},this.closeFile=y=>{this.commandService.executeCommand(g.EDITOR_COMMANDS.CLOSE.id,y.uri)},this.closeAllByGroup=y=>{const E=y.group;E&&E.closeAll()},this.saveAllByGroup=y=>{const E=y.group;E&&E.saveAll()},this._whenReady=this.initTreeModel()}get flushEventQueuePromise(){return this.flushEventQueueDeferred&&this.flushEventQueueDeferred.promise}get contextMenuContextKeyService(){return this._contextMenuContextKeyService||(this._contextMenuContextKeyService=this.contextKeyService.createScoped()),this._contextMenuContextKeyService}get editorTreeHandle(){return this._openedEditorTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get contextMenuFile(){return this._contextMenuFile}get selectedFiles(){return this._selectedFiles}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}get onTreeModelChange(){return this.onTreeModelChangeEmitter.event}async initTreeModel(){const y=(await this.openedEditorService.resolveChildren())[0];y&&(this.initDecorations(y),this._treeModel=this.injector.get(v.OpenedEditorModel,[y]),this.disposableCollection.push(g.Event.any(this.labelService.onDidChange,this.editorService.onActiveResourceChange,this.editorService.onDidEditorGroupsChanged,this.editorService.onDidCurrentEditorGroupChanged,this.openedEditorEventService.onDidChange)(()=>{this.refresh()})),this.disposableCollection.push(this.openedEditorEventService.onDidDecorationChange(E=>{let R=!1;if(E&&this.treeModel){for(let A=0;A<this.treeModel.root.branchSize;A++){const w=this.treeModel.root.getTreeNodeAtIndex(A);w&&!l.EditorFileGroup.is(w)&&w.uri.isEqual(E.uri)&&(E.decoration.dirty?this.openedEditorService.addDirtyUri(w.uri.toString()):this.openedEditorService.removeDirtyUri(w.uri.toString()),R=!0)}R&&(this.setExplorerTabBarBadge(),this.refresh())}})),this.onTreeModelChangeEmitter.fire(this._treeModel))}initDecorations(y){this._decorations=new c.DecorationsManager(y),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration)}removeSelectDecoration(){this._selectedFiles.length&&this._selectedFiles.forEach(y=>{var E;const R=(E=this.treeModel)===null||E===void 0?void 0:E.root.getTreeNodeByPath(y.path);this.selectedDecoration.removeTarget(R||y)})}removeFocusedDecoration(){var y;if(this._focusedFile){const E=(y=this.treeModel)===null||y===void 0?void 0:y.root.getTreeNodeByPath(this._focusedFile.path);this.focusedDecoration.removeTarget(E||this._focusedFile),this._focusedFile=void 0}}handleTreeHandler(y){this._openedEditorTreeHandle=y}clear(){this._treeModel=null,this.onTreeModelChangeEmitter.fire(this._treeModel)}async refresh(y){var E;if(y===void 0&&(y=(E=this.treeModel)===null||E===void 0?void 0:E.root),!this._treeModel){await this.initTreeModel();return}!l.EditorFileGroup.is(y)&&y.parent&&(y=y.parent),this.queueChangeEvent(y.path,()=>{this.onDidRefreshedEmitter.fire()})}queueChangeEvent(y,E){this.flushEventQueueDeferred||(this.flushEventQueueDeferred=new g.Deferred,clearTimeout(this._eventFlushTimeout),this._eventFlushTimeout=setTimeout(async()=>{var R;await this.flushEventQueue(),(R=this.flushEventQueueDeferred)===null||R===void 0||R.resolve(),this.flushEventQueueDeferred=null,E()},n.DEFAULT_FLUSH_FILE_EVENT_DELAY)),this._changeEventDispatchQueue.indexOf(y)===-1&&this._changeEventDispatchQueue.push(y)}setExplorerTabBarBadge(){const y=this.layoutService.getTabbarHandler(b.EXPLORER_CONTAINER_ID),E=this.editorService.calcDirtyCount(),R=this.layoutService.getAccordionService(b.EXPLORER_CONTAINER_ID);if(y){const A=E>0?(0,g.formatLocalize)("opened.editors.unsaved",E.toString()):"";y.setBadge(E>0?E.toString():""),R.updateViewBadge(r.ExplorerOpenedEditorViewId,A)}}};W.DEFAULT_FLUSH_FILE_EVENT_DELAY=100,W.DEFAULT_LOCATION_FLUSH_DELAY=200,a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],W.prototype,"injector",void 0),a.__decorate([(0,o.Autowired)(u.ICtxMenuRenderer),a.__metadata("design:type",u.ICtxMenuRenderer)],W.prototype,"ctxMenuRenderer",void 0),a.__decorate([(0,o.Autowired)(u.AbstractContextMenuService),a.__metadata("design:type",u.AbstractContextMenuService)],W.prototype,"contextMenuService",void 0),a.__decorate([(0,o.Autowired)(g.IContextKeyService),a.__metadata("design:type",Object)],W.prototype,"contextKeyService",void 0),a.__decorate([(0,o.Autowired)(f.OpenedEditorService),a.__metadata("design:type",f.OpenedEditorService)],W.prototype,"openedEditorService",void 0),a.__decorate([(0,o.Autowired)(G.LabelService),a.__metadata("design:type",G.LabelService)],W.prototype,"labelService",void 0),a.__decorate([(0,o.Autowired)(d.OpenedEditorDecorationService),a.__metadata("design:type",d.OpenedEditorDecorationService)],W.prototype,"decorationService",void 0),a.__decorate([(0,o.Autowired)(m.OpenedEditorEventService),a.__metadata("design:type",m.OpenedEditorEventService)],W.prototype,"openedEditorEventService",void 0),a.__decorate([(0,o.Autowired)(p.WorkbenchEditorService),a.__metadata("design:type",h.WorkbenchEditorServiceImpl)],W.prototype,"editorService",void 0),a.__decorate([(0,o.Autowired)(g.CommandService),a.__metadata("design:type",Object)],W.prototype,"commandService",void 0),a.__decorate([(0,o.Autowired)(I.IMainLayoutService),a.__metadata("design:type",Object)],W.prototype,"layoutService",void 0),W=n=a.__decorate([(0,o.Injectable)(),a.__metadata("design:paramtypes",[])],W),e.OpenedEditorModelService=W},45007:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenedEditorService=void 0;const n=t(85608),a=t(76003),o=t(97267),c=t(41869),g=t(26542),u=t(54414),G=t(51500),p=t(88234),{Path:h}=c.path;let b=class extends o.Tree{constructor(){super(...arguments),this._dirtyUri=[],this._isGroupTree=!1,this.sortComparator=(r,l)=>{if(r.constructor===l.constructor){if(r.resource&&l.resource){const s=r.parent;if(s&&p.EditorFileGroup.is(s))return s.group.resources.indexOf(r.resource)-s.group.resources.indexOf(l.resource);{const d=this.workbenchEditorService.currentEditorGroup;if(d&&d.resources)return d.resources.indexOf(r.resource)-d.resources.indexOf(l.resource)}}return r.name.localeCompare(l.name,"kn",{numeric:!0})}return r.type===o.TreeNodeType.CompositeTreeNode?-1:l.type===o.TreeNodeType.CompositeTreeNode?1:0}}get isGroupTree(){return this._isGroupTree}addDirtyUri(r){this._dirtyUri.includes(r)||this._dirtyUri.push(r)}removeDirtyUri(r){if(this._dirtyUri.includes(r)){const l=this._dirtyUri.findIndex(s=>s===r);this._dirtyUri.splice(l,1)}}async resolveChildren(r){let l=[];if(!r)this._root=new p.EditorFileRoot(this),l=[this._root];else if(p.EditorFileRoot.is(r)){this._isGroupTree=!1;let s=[];this.workbenchEditorService.sortedEditorGroups.length<=1?s=this.workbenchEditorService.sortedEditorGroups[0].resources.slice():s=this.workbenchEditorService.sortedEditorGroups;for(const d of s)if(d.resources){this._isGroupTree=!0;const m=new p.EditorFileGroup(this,d,r);l.push(m)}else{const m=await this.getReadableTooltip(d.uri);l.push(new p.EditorFile(this,d,m,this._dirtyUri.includes(d.uri.toString()),r))}}else for(const s of r.group.resources){const d=await this.getReadableTooltip(s.uri);l.push(new p.EditorFile(this,s,d,this._dirtyUri.includes(s.uri.toString()),r))}return l}getEditorNodeByUri(r,l){var s,d;let m=this.root.path;if(r){if(this._isGroupTree){if(!l)return;const v=(0,c.formatLocalize)("opened.editors.group.title",l.index+1);m=new h(m).join(v).join(r&&r.uri?r.uri.toString():r.toString()).toString()}else m=new h(m).join(r&&r.uri?r.uri.toString():r.toString()).toString();return(s=this.root)===null||s===void 0?void 0:s.getTreeNodeByPath(m)}else{if(!l)return;const v=(0,c.formatLocalize)("opened.editors.group.title",l.index+1);return m=new h(m).join(v).toString(),(d=this.root)===null||d===void 0?void 0:d.getTreeNodeByPath(m)}}async getReadableTooltip(r){var l;if(r.scheme!==c.Schemes.file)return"";const s=await this.workspaceService.roots;for(const d of s){const m=new c.URI(d.uri);if(m.isEqualOrParent(r))return decodeURIComponent((l=m.relative(r))===null||l===void 0?void 0:l.toString())}return r.toString()}};n.__decorate([(0,a.Autowired)(u.WorkbenchEditorService),n.__metadata("design:type",u.WorkbenchEditorService)],b.prototype,"workbenchEditorService",void 0),n.__decorate([(0,a.Autowired)(G.IWorkspaceService),n.__metadata("design:type",Object)],b.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(g.LabelService),n.__metadata("design:type",g.LabelService)],b.prototype,"labelService",void 0),n.__decorate([(0,a.Autowired)(u.ResourceService),n.__metadata("design:type",u.ResourceService)],b.prototype,"resourceService",void 0),b=n.__decorate([(0,a.Injectable)()],b),e.OpenedEditorService=b},21212:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerOpenedEditorViewId=void 0,e.ExplorerOpenedEditorViewId="file-opened-editor"},46608:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(49865),g=t(77808),u=t(94787),G=t(11791),p=t(80614),h=t(29037);let b=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IOutlineDecorationService,useClass:u.OutlineDecorationService},{token:G.OutlineEventService,useClass:G.OutlineEventService},{token:h.OutlineTreeService,useClass:h.OutlineTreeService},{token:p.OutlineModelService,useClass:p.OutlineModelService},g.OutlineContribution]}};b=n.__decorate([(0,a.Injectable)()],b),e.OutlineModule=b},83890:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineTreeNode=e.OutlineCompositeTreeNode=e.OutlineRoot=void 0;const n=t(97267);class a extends n.CompositeTreeNode{static is(u){return!!u&&!u.parent}constructor(u,G){super(u,void 0),this._currentUri=G}get currentUri(){return this._currentUri}get expanded(){return!0}}e.OutlineRoot=a;class o extends n.CompositeTreeNode{static is(u){var G;return!!u&&!!u.raw&&!!(!((G=u.raw.children)===null||G===void 0)&&G.length)}constructor(u,G,p,h){super(u,G,void 0,{}),this.raw=p,this.icon=h,this.isExpanded=!0}get displayName(){return this.raw.name}get description(){return this.raw.detail}}e.OutlineCompositeTreeNode=o;class c extends n.TreeNode{static is(u){return!!u&&!!u.raw}constructor(u,G,p,h){super(u,G,void 0,{}),this.raw=p,this.icon=h}get displayName(){return this.raw.name}get description(){return this.raw.detail}}e.OutlineTreeNode=c},68635:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OUTLINE_TREE_NODE_HEIGHT=e.OutlineNode=void 0;const n=t(85608),a=n.__importDefault(t(53373)),o=n.__importDefault(t(14041)),c=t(97267),g=t(41869),u=t(17459),G=t(83890),p=n.__importDefault(t(97196)),h=({item:b,defaultLeftPadding:I=8,leftPadding:r=8,onClick:l,onTwistierClick:s,itemType:d,decorationService:m,decorations:v})=>{const f=G.OutlineTreeNode.is(b)?m.getDecoration(b):null,N=(0,g.useDesignStyles)(p.default.expansion_toggle,"expansion_toggle"),W=(0,g.useDesignStyles)(p.default.outline_node,"outline_node"),Z=Q=>{(d===c.TreeNodeType.TreeNode||d===c.TreeNodeType.CompositeTreeNode)&&l(Q,b,d)},y=Q=>{(d===c.TreeNodeType.TreeNode||d===c.TreeNodeType.CompositeTreeNode)&&(s?s(Q,b,d):l(Q,b,d))},E=`${I+(b.depth||0)*(r||0)+(G.OutlineCompositeTreeNode.is(b)?0:12)}px`,R={color:f?f.color:"",height:e.OUTLINE_TREE_NODE_HEIGHT,lineHeight:`${e.OUTLINE_TREE_NODE_HEIGHT}px`,paddingLeft:E},A=Q=>o.default.createElement("div",{className:(0,a.default)(p.default.icon,Q.icon),style:{height:e.OUTLINE_TREE_NODE_HEIGHT,lineHeight:`${e.OUTLINE_TREE_NODE_HEIGHT}px`}}),w=Q=>Q.displayName.replace(/\n/g,"\u21B5"),F=Q=>o.default.createElement("div",{className:(0,a.default)(p.default.outline_node_segment,p.default.outline_node_displayname,{[p.default.deprecated]:Q.raw.tags&&Q.raw.tags.indexOf(u.SymbolTag.Deprecated)>=0})},w(Q)),V=()=>o.default.createElement("div",{className:(0,a.default)(p.default.outline_node_segment,p.default.outline_node_tail)},Y()),Y=()=>f?o.default.createElement("div",{className:p.default.outline_node_status},f.badge.slice()):null,_=(Q,O)=>o.default.createElement("div",{onClick:O,className:(0,a.default)(p.default.file_tree_node_segment,N,(0,g.getIcon)("arrow-right"),{[`${p.default.mod_collapsed}`]:!Q.expanded})}),H=Q=>{if(G.OutlineCompositeTreeNode.is(Q))return _(Q,y)},X=()=>{let Q=b.tooltip||b.displayName;return f&&f.tooltip&&(Q+=` \u2022 ${f.tooltip}`),Q},S=Q=>G.OutlineCompositeTreeNode.is(Q)?null:o.default.createElement("div",{className:(0,a.default)(p.default.outline_node_segment_grow,p.default.outline_node_description)},Q.description);return o.default.createElement("div",{key:b.id,onClick:Z,title:X(),className:(0,a.default)(W,v?v.classlist:null),style:R,"data-id":b.id},o.default.createElement("div",{className:p.default.outline_node_content},H(b),A(b),o.default.createElement("div",{className:p.default.outline_node_overflow_wrap},F(b),S(b)),V()))};e.OutlineNode=h,e.OUTLINE_TREE_NODE_HEIGHT=22},77808:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(66e3),g=t(32595),u=t(63067),G=t(49865),p=t(40294),h=t(80614),b=t(29037);let I=class{onDidRender(){this.mainLayoutService.collectViewComponent({component:p.OutlinePanel,collapsed:!0,id:G.OUTLINE_VIEW_ID,name:(0,o.localize)("outline.title")},g.EXPLORER_CONTAINER_ID)}registerCommands(l){l.registerCommand({id:o.OUTLINE_COMMANDS.OUTLINE_COLLAPSE_ALL.id,iconClass:(0,o.getIcon)("collapse-all"),label:(0,o.localize)("outline.collapse.all")},{execute:()=>{this.outlineTreeModelService.collapseAll()}}),l.registerCommand({id:o.OUTLINE_COMMANDS.OUTLINE_FOLLOW_CURSOR.id,iconClass:(0,o.getIcon)("follow-cursor"),label:(0,o.localize)("outline.follow.cursor")},{execute:()=>{this.outlineTreeService.followCursor=!this.outlineTreeService.followCursor}}),l.registerCommand({id:o.OUTLINE_COMMANDS.OUTLINE_SORT_KIND.id,label:(0,o.localize)("outline.sort.kind")},{execute:()=>{this.outlineTreeService.sortType=2}}),l.registerCommand({id:o.OUTLINE_COMMANDS.OUTLINE_SORT_NAME.id,label:(0,o.localize)("outline.sort.name")},{execute:()=>{this.outlineTreeService.sortType=1}}),l.registerCommand({id:o.OUTLINE_COMMANDS.OUTLINE_SORT_POSITION.id,label:(0,o.localize)("outline.sort.position")},{execute:()=>{this.outlineTreeService.sortType=0}})}registerToolbarItems(l){l.registerItem({id:"outline.action.follow.cursor",viewId:"outline-view",command:o.OUTLINE_COMMANDS.OUTLINE_FOLLOW_CURSOR.id,label:(0,o.localize)("outline.follow.cursor"),toggledWhen:c.OutlineFollowCursorContext.raw}),l.registerItem({id:"outline.action.collapse.all",viewId:"outline-view",command:o.OUTLINE_COMMANDS.OUTLINE_COLLAPSE_ALL.id,label:(0,o.localize)("outline.collapse.all")}),l.registerItem({id:"outline.menu.sort.kind",viewId:"outline-view",command:o.OUTLINE_COMMANDS.OUTLINE_SORT_KIND.id,group:"inline",toggledWhen:`${c.OutlineSortTypeContext.raw} == 2`}),l.registerItem({id:"outline.menu.sort.name",viewId:"outline-view",command:o.OUTLINE_COMMANDS.OUTLINE_SORT_NAME.id,group:"inline",toggledWhen:`${c.OutlineSortTypeContext.raw} == 1`}),l.registerItem({id:"outline.menu.sort.position",viewId:"outline-view",command:o.OUTLINE_COMMANDS.OUTLINE_SORT_POSITION.id,group:"inline",toggledWhen:`${c.OutlineSortTypeContext.raw} == 0`})}};n.__decorate([(0,a.Autowired)(u.IMainLayoutService),n.__metadata("design:type",Object)],I.prototype,"mainLayoutService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",b.OutlineTreeService)],I.prototype,"outlineTreeService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",h.OutlineModelService)],I.prototype,"outlineTreeModelService",void 0),n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],I.prototype,"contextKey",void 0),I=n.__decorate([(0,o.Domain)(u.MainLayoutContribution,o.TabBarToolbarContribution,o.CommandContribution)],I),e.OutlineContribution=I},40294:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineTreeView=e.OutlinePanel=void 0;const n=t(85608),a=n.__importDefault(t(12784)),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(68974),G=t(48560),p=t(68635),h=n.__importDefault(t(78721)),b=t(80614),I=({viewState:r})=>{const{height:l}=r,s=(0,o.useRef)(null),d=(0,G.useInjectable)(b.OutlineModelService),[m,v]=(0,o.useState)(void 0),f=(0,o.useCallback)(A=>{d.handleTreeHandler(Object.assign(Object.assign({},A),{hasDirectFocus:()=>s.current===document.activeElement}))},[d,s.current]),N=(0,o.useCallback)((A,w,F)=>{A.stopPropagation();const{handleItemClick:V}=d;w&&V(w,F)},[d]),W=(0,o.useCallback)((A,w)=>{A.stopPropagation();const{toggleDirectory:F}=d;w&&F(w)},[d]),Z=(0,o.useCallback)(()=>{const{enactiveNodeDecoration:A}=d;A()},[d]);(0,o.useEffect)(()=>{v(d.treeModel);const A=d.onDidUpdateTreeModel(w=>{v(w)});return()=>{A.dispose()}},[]),(0,o.useEffect)(()=>{var A;const w=()=>{d.handleTreeBlur()};return(A=s.current)===null||A===void 0||A.addEventListener("blur",w,!0),()=>{var F;(F=s.current)===null||F===void 0||F.removeEventListener("blur",w,!0),d.handleTreeBlur()}},[s.current]);const[y,E]=o.default.useState(!1),R=o.default.useMemo(()=>y,[y]);return(0,o.useEffect)(()=>{const A=d.onLoadingStateChange((0,a.default)(w=>{E(F=>F!==w?w:F)},80,{leading:!0}));return()=>{A.dispose()}},[E]),o.default.createElement("div",{className:h.default.outline_container,tabIndex:-1,ref:s,onClick:Z},o.default.createElement(u.Progress,{loading:R}),o.default.createElement(e.OutlineTreeView,{loading:R,height:l,model:m,onItemClick:N,onTwistierClick:W,onDidTreeReady:f}))};e.OutlinePanel=I,e.OutlineTreeView=(0,o.memo)(({height:r,model:l,onItemClick:s,onTwistierClick:d,onDidTreeReady:m,loading:v})=>{const f=(0,G.useInjectable)(b.OutlineModelService),{decorationService:N,commandService:W}=f,Z=(0,o.useCallback)(y=>o.default.createElement(p.OutlineNode,{item:y.item,itemType:y.itemType,decorationService:N,commandService:W,decorations:f.decorations.getDecorations(y.item),onClick:s,onTwistierClick:d,defaultLeftPadding:8,leftPadding:8}),[l]);return l?o.default.createElement(c.RecycleTree,{height:r,itemHeight:p.OUTLINE_TREE_NODE_HEIGHT,onReady:m,model:l,placeholder:()=>o.default.createElement("span",{className:h.default.outline_empty_text},(0,g.localize)("outline.noinfo"))},Z):o.default.createElement("span",{className:h.default.outline_empty_text},v?(0,g.localize)("common.loading"):(0,g.localize)("outline.nomodel"))}),e.OutlineTreeView.displayName="OutlineTreeView"},3551:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineContextKeyService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(66e3);let g=class{constructor(G){G=G||this.globalContextKeyService,this.outlineSortTypeContext=c.OutlineSortTypeContext.bind(G),this.outlineFollowCursorContext=c.OutlineFollowCursorContext.bind(G)}};n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"globalContextKeyService",void 0),g=n.__decorate([(0,a.Injectable)(),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[Object])],g),e.OutlineContextKeyService=g},94787:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineDecorationService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(52416);let g=class{constructor(){this._diagnosisInfo=[]}updateDiagnosisInfo(G){this._diagnosisInfo=G?this.markerManager.getMarkers({resource:G.toString(),opened:!0}):[]}getDecoration(G){const p=[];let h;const b=this._diagnosisInfo.filter(I=>I.startLineNumber<=G.raw.range.startLineNumber&&I.endLineNumber>=G.raw.range.startLineNumber?!0:G.raw.range.startLineNumber<=I.startLineNumber&&G.raw.range.endLineNumber>=I.startLineNumber);for(const I of b)(I.severity===o.MarkerSeverity.Error||I.severity===o.MarkerSeverity.Warning)&&p.push(I),(!h||I.severity>h.severity)&&(h=I);return{color:h?.severity===o.MarkerSeverity.Error||h?.severity===o.MarkerSeverity.Warning?this.themeService.getColor({id:h.severity===o.MarkerSeverity.Error?c.listErrorForeground:c.listWarningForeground}):void 0,tooltip:h?.message,badge:p.length>0?p.length>9?"9+":p.length+"":""}}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",o.MarkerManager)],g.prototype,"markerManager",void 0),n.__decorate([(0,a.Autowired)(c.IThemeService),n.__metadata("design:type",Object)],g.prototype,"themeService",void 0),g=n.__decorate([(0,a.Injectable)()],g),e.OutlineDecorationService=g},11791:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineEventService=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(57517),g=t(17459),u=t(63067),G=t(49865);let p=class extends o.WithEventBus{constructor(){super(...arguments),this._onDidDocumentSymbolChange=new o.Emitter,this._onDidSelectionChange=new o.Emitter,this._onDidEditorActiveResourceStateChange=new o.Emitter,this._onDidViewCollapseChange=new o.Emitter}get onDidChange(){return this._onDidDocumentSymbolChange.event}get onDidActiveChange(){return this._onDidEditorActiveResourceStateChange.event}get onDidSelectionChange(){return this._onDidSelectionChange.event}get onDidViewCollapseChange(){return this._onDidViewCollapseChange.event}onEditorActiveResourceStateChangedEvent(b){this._onDidEditorActiveResourceStateChange.fire(b.payload.editorUri)}onEditorSelectionChangeEvent(b){this._onDidSelectionChange.fire(b.payload.editorUri)}onDocumentSymbolChange(b){this._onDidDocumentSymbolChange.fire(b.payload)}onViewCollapseChangedEvent(b){b.payload.viewId===G.OUTLINE_VIEW_ID&&this._onDidViewCollapseChange.fire(b.payload.collapsed)}};n.__decorate([(0,o.OnEvent)(c.EditorActiveResourceStateChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[c.EditorActiveResourceStateChangedEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onEditorActiveResourceStateChangedEvent",null),n.__decorate([(0,o.OnEvent)(c.EditorSelectionChangeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[c.EditorSelectionChangeEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onEditorSelectionChangeEvent",null),n.__decorate([(0,o.OnEvent)(g.DocumentSymbolChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[g.DocumentSymbolChangedEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onDocumentSymbolChange",null),n.__decorate([(0,o.OnEvent)(u.ViewCollapseChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[u.ViewCollapseChangedEvent]),n.__metadata("design:returntype",void 0)],p.prototype,"onViewCollapseChangedEvent",null),p=n.__decorate([(0,a.Injectable)()],p),e.OutlineEventService=p},84203:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineTreeModel=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(83890);let G=n=class extends c.TreeModel{constructor(h){super(),this.flushDispatchChangeDelayer=new g.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(h)}init(h){this.root=h,this.root.watcher.on(c.TreeNodeEvent.BranchDidUpdate,()=>{this.flushDispatchChangeDelayer.isTriggered()||this.flushDispatchChangeDelayer.cancel(),this.flushDispatchChangeDelayer.trigger(async()=>{this.dispatchChange()})})}};G.DEFAULT_FLUSH_DELAY=100,G=n=a.__decorate([(0,o.Injectable)({multiple:!0}),a.__param(0,(0,o.Optional)()),a.__metadata("design:paramtypes",[u.OutlineCompositeTreeNode])],G),e.OutlineTreeModel=G},80614:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(41869),u=t(57517),G=t(17459),p=t(32595),h=t(63067),b=a.__importStar(t(20868)),I=t(49865),r=a.__importDefault(t(97196)),l=t(11791),s=t(84203),d=t(29037),{Path:m}=g.path;let v=n=class{constructor(){this._allTreeModels=new g.LRUMap(100,80),this._changeEventDispatchQueue=[],this.selectedDecoration=new c.Decoration(r.default.mod_selected),this.focusedDecoration=new c.Decoration(r.default.mod_focused),this._selectedNodes=[],this.disposableCollection=new g.DisposableCollection,this.onDidRefreshedEmitter=new g.Emitter,this.onLoadingStateChangedEmitter=new g.Emitter,this.onDidUpdateTreeModelEmitter=new g.Emitter,this._ignoreFollowCursorUpdateEventTimer=0,this.clearNodeSelectedDecoration=()=>{this._selectedNodes.forEach(N=>{this.selectedDecoration.removeTarget(N)}),this._selectedNodes=[]},this.activeNodeDecoration=(N,W=!0)=>{var Z;if(N){for(const y of this.selectedDecoration.appliedTargets.keys())this.selectedDecoration.removeTarget(y);for(const y of this.focusedDecoration.appliedTargets.keys())this.focusedDecoration.removeTarget(y);this.selectedDecoration.addTarget(N),this.focusedDecoration.addTarget(N),this._focusedNode=N,this._selectedNodes=[N],W&&((Z=this.treeModel)===null||Z===void 0||Z.dispatchChange())}},this.selectNodeDecoration=(N,W=!0)=>{var Z;N&&(this.selectedNodes.length>0&&this.selectedNodes.forEach(y=>{this.selectedDecoration.removeTarget(y)}),this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),this.selectedDecoration.addTarget(N),this._selectedNodes=[N],W&&((Z=this.treeModel)===null||Z===void 0||Z.dispatchChange()))},this.activeNodeFocusedDecoration=(N,W=!1)=>{var Z;this.focusedNode!==N&&(W?this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode):this.focusedNode&&this.focusedDecoration.removeTarget(this.focusedNode),N&&(this.selectedDecoration.addTarget(N),this.focusedDecoration.addTarget(N),this._focusedNode=N,this._selectedNodes.push(N))),(Z=this.treeModel)===null||Z===void 0||Z.dispatchChange()},this.activeNodeSelectedDecoration=N=>{var W;this._selectedNodes.indexOf(N)>-1||(this.selectedNodes.length>0&&this.selectedNodes.forEach(Z=>{this.selectedDecoration.removeTarget(Z)}),this._selectedNodes=[N],this.selectedDecoration.addTarget(N),(W=this.treeModel)===null||W===void 0||W.dispatchChange())},this.enactiveNodeDecoration=()=>{var N;this.focusedNode&&(this.focusedDecoration.removeTarget(this.focusedNode),(N=this.treeModel)===null||N===void 0||N.dispatchChange()),this._focusedNode=void 0},this.handleTreeBlur=()=>{this.enactiveNodeDecoration()},this.handleItemClick=(N,W)=>{this.activeNodeDecoration(N),this.revealRange(N.raw),this._ignoreFollowCursorUpdateEventTimer++},this.toggleDirectory=async N=>{N.expanded?this.outlineTreeHandle.collapseNode(N):this.outlineTreeHandle.expandNode(N)},this.flushEventQueue=()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.length===0)return;this._changeEventDispatchQueue.sort((Z,y)=>{const E=m.pathDepth(Z),R=m.pathDepth(y);return E-R});const N=[this._changeEventDispatchQueue[0]];for(const Z of this._changeEventDispatchQueue)N.some(y=>Z.indexOf(y)===0)||N.push(Z);const W=(0,g.pSeries)(N.map(Z=>async()=>{var y,E;const R=(E=(y=this.treeModel)===null||y===void 0?void 0:y.root)===null||E===void 0?void 0:E.watchEvents.get(Z);return R&&typeof R.callback=="function"&&await R.callback({type:c.WatchEvent.Changed,path:Z}),null}));return this._changeEventDispatchQueue=[],W},this.location=async N=>{var W;await((W=this.refreshDeferred)===null||W===void 0?void 0:W.promise),N&&this.outlineTreeHandle&&(N=await this.outlineTreeHandle.ensureVisible(N,"smart"))},this.collapseAll=async()=>{var N,W;await((N=this.refreshDeferred)===null||N===void 0?void 0:N.promise),await((W=this.treeModel)===null||W===void 0?void 0:W.root.collapsedAll())},this.initTreeModelDelayer=new g.ThrottledDelayer(n.DEFAULT_INIT_TREE_MODEL_DELAY),this.refreshDelayer=new g.ThrottledDelayer(n.DEFAULT_REFRESH_DELAY),this._whenReady=this.initTreeModel()}get whenReady(){return this._whenReady}get flushEventQueuePromise(){return this.refreshDeferred&&this.refreshDeferred.promise}get outlineTreeHandle(){return this._outlineTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._activeTreeModel}get focusedNode(){return this._focusedNode}get selectedNodes(){return this._selectedNodes}get onLoadingStateChange(){return this.onLoadingStateChangedEmitter.event}get onDidRefreshed(){return this.onDidRefreshedEmitter.event}get onDidUpdateTreeModel(){return this.onDidUpdateTreeModelEmitter.event}get whenInitTreeModelReady(){return this._whenInitTreeModelReady}get whenRefreshReady(){var N;return(N=this.refreshDeferred)===null||N===void 0?void 0:N.promise}setTreeModel(N){this._activeTreeModel=N,this.onDidUpdateTreeModelEmitter.fire(this._activeTreeModel)}async doInitTreeModelByCurrentUri(N){let W;if(N){const Z=(await this.outlineTreeService.resolveChildren())[0];if(!Z){this.logger.error(`init outline tree model error: cannot resolve ${N} children`);return}W=this.injector.get(s.OutlineTreeModel,[Z]),await W.ensureReady;const y=this.initDecorations(Z);this._allTreeModels.has(N.toString())&&this._allTreeModels.delete(N.toString()),this._allTreeModels.set(N.toString(),{treeModel:W,decoration:y})}return this.setTreeModel(W),W}async initTreeModelByCurrentUri(N){var W;if(await this.outlineTreeService.whenReady,await((W=this.refreshDeferred)===null||W===void 0?void 0:W.promise),this.outlineTreeService.currentUri=N,N&&this._allTreeModels.has(N.toString())){const Z=this._allTreeModels.get(N.toString());this._decorations=Z.decoration,this.setTreeModel(Z.treeModel)}else await this.doInitTreeModelByCurrentUri(N)}async initTreeModel(){var N;this._whenInitTreeModelReady=this.initTreeModelByCurrentUri((N=this.editorService.currentEditor)===null||N===void 0?void 0:N.currentUri),await this._whenInitTreeModelReady,this.disposableCollection.push(this.markerManager.onMarkerChanged(W=>{this.outlineTreeService.currentUri&&W.find(Z=>Z===this.outlineTreeService.currentUri.toString())&&this.refresh()})),this.disposableCollection.push(this.outlineEventService.onDidActiveChange(async()=>{this.initTreeModelDelayer.isTriggered()||this.initTreeModelDelayer.cancel(),this.onLoadingStateChangedEmitter.fire(!0),this.initTreeModelDelayer.trigger(async()=>{var W;await this._whenInitTreeModelReady,this.refreshDelayer.isTriggered()||this.refreshDelayer.cancel();const Z=(W=this.editorService.currentEditor)===null||W===void 0?void 0:W.currentUri;this._whenInitTreeModelReady=this.initTreeModelByCurrentUri(Z),this.onLoadingStateChangedEmitter.fire(!1)})})),this.disposableCollection.push(this.outlineEventService.onDidSelectionChange(()=>{this.outlineTreeService.followCursor&&this.locateSelection(!1)})),this.disposableCollection.push(this.outlineEventService.onDidChange(W=>{var Z,y;W===((Z=this.editorService.currentEditor)===null||Z===void 0?void 0:Z.currentUri)&&(this.outlineTreeService.currentUri=(y=this.editorService.currentEditor)===null||y===void 0?void 0:y.currentUri,this.refresh())})),this.disposableCollection.push(this.outlineEventService.onDidViewCollapseChange(W=>{W||this.refresh()})),this.disposableCollection.push(this.outlineTreeService.onDidChange(()=>{this.refresh()})),this.disposableCollection.push(g.Disposable.create(()=>{this._allTreeModels.clear()}))}initDecorations(N){return this._decorations=new c.DecorationsManager(N),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations}locateSelection(N=!0){if(!this.outlineTreeService.currentUri)return;const W=this.documentSymbolStore.getDocumentSymbol(this.outlineTreeService.currentUri);if(W){const Z=this.findCurrentDocumentSymbol(W,this.editorService.currentEditorGroup.codeEditor.monacoEditor.getPosition()),y=this.outlineTreeService.getTreeNodeBySymbol(Z[Z.length-1]);if(y){if(this._ignoreFollowCursorUpdateEventTimer){this._ignoreFollowCursorUpdateEventTimer--;return}else this.location(y);this.activeNodeDecoration(y,!N)}}}findCurrentDocumentSymbol(N,W){const Z=[];if(!W)return Z;let y=N;for(;y&&y.length>0;){let E=!1;for(const R of y)if(this.positionInRange(W,R.range)){Z.push(R),y=R.children,E=!0;break}if(!E)break}return Z}positionInRange(N,W){return N.lineNumber<W.startLineNumber?!1:N.lineNumber===W.startLineNumber?N.column>=W.startColumn:N.lineNumber<W.endLineNumber?!0:N.lineNumber===W.endLineNumber?N.column<=W.endColumn:!1}removeNodeDecoration(){this.decorations&&(this.decorations.removeDecoration(this.selectedDecoration),this.decorations.removeDecoration(this.focusedDecoration))}handleTreeHandler(N){this._outlineTreeHandle=N}revealRange(N){const W=this.editorService.currentEditorGroup.codeEditor;W.monacoEditor.revealLineInCenter(N.range.startLineNumber),W.monacoEditor.setPosition(new b.Position(N.range.startLineNumber,N.range.endLineNumber))}async refresh(){var N,W,Z,y,E;this.onLoadingStateChangedEmitter.fire(!0),await this.whenInitTreeModelReady,await this.whenRefreshReady;const R=(N=this.treeModel)===null||N===void 0?void 0:N.root;if(!R||!(!((Z=(W=this.editorService)===null||W===void 0?void 0:W.currentEditor)===null||Z===void 0)&&Z.currentUri)){this._whenInitTreeModelReady=this.initTreeModelByCurrentUri((E=(y=this.editorService)===null||y===void 0?void 0:y.currentEditor)===null||E===void 0?void 0:E.currentUri),this.onLoadingStateChangedEmitter.fire(!1);return}return this.refreshDelayer.isTriggered()||this.refreshDelayer.cancel(),this.refreshDelayer.trigger(async()=>{var A,w,F;const V=this.mainLayoutService.getTabbarHandler(p.EXPLORER_CONTAINER_ID);if(!V||!V.isVisible||V.isCollapsed(I.OUTLINE_VIEW_ID)){this.refreshDeferred&&(this.refreshDeferred.resolve(),this.refreshDeferred=null),this.onLoadingStateChangedEmitter.fire(!1);return}this.refreshDeferred||(this.refreshDeferred=new g.Deferred),this.outlineTreeService.currentUri=(w=(A=this.editorService)===null||A===void 0?void 0:A.currentEditor)===null||w===void 0?void 0:w.currentUri,R.currentUri&&this.outlineTreeService.currentUri&&this.outlineTreeService.currentUri.isEqual(R.currentUri)&&(this.decorationService.updateDiagnosisInfo(this.outlineTreeService.currentUri),await R.refresh(),this.onDidRefreshedEmitter.fire()),(F=this.refreshDeferred)===null||F===void 0||F.resolve(),this.refreshDeferred=null,this.onLoadingStateChangedEmitter.fire(!1)})}dispose(){this.disposableCollection.dispose()}};v.DEFAULT_REFRESH_DELAY=200,v.DEFAULT_INIT_TREE_MODEL_DELAY=500,a.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),a.__metadata("design:type",o.Injector)],v.prototype,"injector",void 0),a.__decorate([(0,o.Autowired)(g.ILogger),a.__metadata("design:type",Object)],v.prototype,"logger",void 0),a.__decorate([(0,o.Autowired)(d.OutlineTreeService),a.__metadata("design:type",d.OutlineTreeService)],v.prototype,"outlineTreeService",void 0),a.__decorate([(0,o.Autowired)(g.MarkerManager),a.__metadata("design:type",g.MarkerManager)],v.prototype,"markerManager",void 0),a.__decorate([(0,o.Autowired)(I.IOutlineDecorationService),a.__metadata("design:type",Object)],v.prototype,"decorationService",void 0),a.__decorate([(0,o.Autowired)(l.OutlineEventService),a.__metadata("design:type",l.OutlineEventService)],v.prototype,"outlineEventService",void 0),a.__decorate([(0,o.Autowired)(u.WorkbenchEditorService),a.__metadata("design:type",u.WorkbenchEditorService)],v.prototype,"editorService",void 0),a.__decorate([(0,o.Autowired)(g.CommandService),a.__metadata("design:type",Object)],v.prototype,"commandService",void 0),a.__decorate([(0,o.Autowired)(G.DocumentSymbolStore),a.__metadata("design:type",G.DocumentSymbolStore)],v.prototype,"documentSymbolStore",void 0),a.__decorate([(0,o.Autowired)(h.IMainLayoutService),a.__metadata("design:type",Object)],v.prototype,"mainLayoutService",void 0),v=n=a.__decorate([(0,o.Injectable)(),a.__metadata("design:paramtypes",[])],v),e.OutlineModelService=v},29037:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineTreeService=void 0;const n=t(85608),a=t(76003),o=t(97267),c=t(41869),g=t(17459),u=t(83890),G=t(3551);let p=class extends o.Tree{constructor(){super(),this.collator=new c.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0})),this.cacheOutlineNodes=new Map,this._sortType=0,this._followCursor=!1,this.onDidChangeEmitter=new c.Emitter,this.sortComparator=(b,I)=>this.sortType===2?b.raw.kind-I.raw.kind||this.collator.getValue().compare(b.displayName,I.displayName):this.sortType===1?this.collator.getValue().compare(b.displayName,I.displayName)||(0,c.compareRangesUsingStarts)(b.raw.range,I.raw.range):(0,c.compareRangesUsingStarts)(b.raw.range,I.raw.range)||this.collator.getValue().compare(b.displayName,I.displayName),this._whenReady=this.init()}async init(){this._outlineStorage=await this.storageProvider(c.STORAGE_NAMESPACE.OUTLINE),this._sortType=this._outlineStorage.get("sortType",0),this.outlineContextKeyService.outlineSortTypeContext.set(this._sortType),this._followCursor=this._outlineStorage.get("followCursor",!1),this.outlineContextKeyService.outlineFollowCursorContext.set(this._followCursor)}get whenReady(){return this._whenReady}get onDidChange(){return this.onDidChangeEmitter.event}get currentUri(){return this._currentUri}set currentUri(b){this._currentUri=b}get followCursor(){return this._followCursor}set followCursor(b){this._followCursor!==b&&(this._followCursor=b,this.outlineContextKeyService.outlineFollowCursorContext.set(b),this._outlineStorage.set("followCursor",b),this.onDidChangeEmitter.fire())}get sortType(){return this._sortType}set sortType(b){this._sortType!==b&&(this._sortType=b,this.outlineContextKeyService.outlineSortTypeContext.set(b),this._outlineStorage.set("sortType",b),this.onDidChangeEmitter.fire())}async resolveChildren(b){var I;let r=[];if(!b)r=[new u.OutlineRoot(this,this.currentUri)];else if(b)if(u.OutlineCompositeTreeNode.is(b))b.raw&&(r=((I=b.raw.children)===null||I===void 0?void 0:I.map(l=>{var s;return!((s=l.children)===null||s===void 0)&&s.length?new u.OutlineCompositeTreeNode(this,b,l,(0,c.getSymbolIcon)(l.kind)+" outline-icon"):new u.OutlineTreeNode(this,b,l,(0,c.getSymbolIcon)(l.kind)+" outline-icon")}).filter(l=>!!l.name))||[]);else{if(!(b.currentUri||this.currentUri))return[];const l=this.documentSymbolStore.getDocumentSymbol(b.currentUri||this.currentUri);r=l?.map(s=>{var d;return!((d=s.children)===null||d===void 0)&&d.length?new u.OutlineCompositeTreeNode(this,b,s,(0,c.getSymbolIcon)(s.kind)+" outline-icon"):new u.OutlineTreeNode(this,b,s,(0,c.getSymbolIcon)(s.kind)+" outline-icon")})||[]}return this.cacheNodes(r),r}cacheNodes(b){for(const I of b)I.raw&&this.cacheOutlineNodes.set(I.raw.id,I)}getTreeNodeBySymbol(b){if(b)return this.cacheOutlineNodes.get(b.id)}};n.__decorate([(0,a.Autowired)(g.DocumentSymbolStore),n.__metadata("design:type",g.DocumentSymbolStore)],p.prototype,"documentSymbolStore",void 0),n.__decorate([(0,a.Autowired)(G.OutlineContextKeyService),n.__metadata("design:type",G.OutlineContextKeyService)],p.prototype,"outlineContextKeyService",void 0),n.__decorate([(0,a.Autowired)(c.StorageProvider),n.__metadata("design:type",Function)],p.prototype,"storageProvider",void 0),p=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.OutlineTreeService=p},49865:(L,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OUTLINE_VIEW_ID=e.IOutlineDecorationService=void 0,e.IOutlineDecorationService=Symbol("IOutlineDecorationService"),e.OUTLINE_VIEW_ID="outline-view"},89549:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(79267),g=t(63068);let u=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[c.OutputContribution],this.preferences=g.bindOutputPreference}};u=n.__decorate([(0,a.Injectable)()],u),e.OutputModule=u},79267:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(30144),g=t(68456),u=t(43718),G=t(98295),p=t(52902),h=t(5686),b=t(63068),I=t(83145),r=t(12481),l={id:"output.channel.clear",label:"%output.channel.clear%"};let s=class extends u.Disposable{constructor(){super(...arguments),this.schema=b.outputPreferenceSchema}onStart(){this.addDispose(p.monaco.languages.registerLinkProvider("log",this.outputLinkProvider))}registerToolbarItems(m){m.registerItem({id:"output.clear.action",command:l.id,iconClass:(0,o.getIcon)("clear"),viewId:c.OUTPUT_CONTAINER_ID})}registerCommands(m){m.registerCommand(l,{execute:()=>{var v;return(v=this.outputService.selectedChannel)===null||v===void 0?void 0:v.clear()}})}registerComponent(m){m.register("@opensumi/ide-output",{id:c.OUTPUT_CONTAINER_ID,component:r.Output},{title:(0,u.localize)("output.tabbar.title"),priority:9,containerId:c.OUTPUT_CONTAINER_ID,activateKeyBinding:"ctrlcmd+shift+u",titleComponent:r.ChannelSelector})}};n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",I.OutputService)],s.prototype,"outputService",void 0),n.__decorate([(0,a.Autowired)(),n.__metadata("design:type",h.OutputLinkProvider)],s.prototype,"outputLinkProvider",void 0),s=n.__decorate([(0,G.Domain)(u.CommandContribution,g.ComponentContribution,g.TabBarToolbarContribution,o.PreferenceContribution,o.ClientAppContribution)],s),e.OutputContribution=s},5686:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputLinkProvider=void 0;const n=t(85608),a=t(76003),o=t(41869),c=n.__importStar(t(20868)),g=t(51500);class u{constructor(h){if(this.patterns=new Map,this.workspaceUris=new Set,h){const b=this.workspaceUri(h);this.workspaceUris.add(b);const I=this.createPatterns(b);this.patterns.set(b,I)}}workspaceUri(h){return o.Uri.parse(h).path}updateWorkspaceUri(h){const b=this.workspaceUri(h);this.workspaceUris.has(h)||this.patterns.set(h,this.createPatterns(b))}createPatterns(h){if(!h)return[];const b=[],I='[^\\s\\(\\):<>"]',l=`${`(?:${I}| ${I})`}+\\.${I}+`,s=`${I}+`;return b.push(new RegExp(o.strings.escapeRegExpCharacters(h)+`(${l}) on line ((\\d+)(, column (\\d+))?)`,"gi")),b.push(new RegExp(o.strings.escapeRegExpCharacters(h)+`(${l}):line ((\\d+)(, column (\\d+))?)`,"gi")),b.push(new RegExp(o.strings.escapeRegExpCharacters(h)+`(${l})(\\s?\\((\\d+)(,(\\d+))?)\\)`,"gi")),b.push(new RegExp(o.strings.escapeRegExpCharacters(h)+`(${s})(:(\\d+))?(:(\\d+))?`,"gi")),b}computeLinks(h){const b=[],I=h.getValue().split(/\r\n|\r|\n/);for(const[r,l]of this.patterns){const s={toResource:d=>{if(typeof d=="string")return o.URI.parse(o.path.join(r,d)).withScheme(o.Schemes.file).toString()}};for(let d=0,m=I.length;d<m;d++)b.push(...this.toLinks(I[d],d+1,l,s))}return b}toLinks(h,b,I,r){const l=[];return I.forEach(s=>{s.lastIndex=0;let d,m=0;for(;(d=s.exec(h))!==null;){const v=o.strings.rtrim(d[1],".").replace(/\\/g,"/");let f;try{f=r.toResource(v)}catch{continue}if(d[3]){const y=d[3];if(d[5]){const E=d[5];f=o.strings.format("{0}#{1},{2}",f,y,E)}else f=o.strings.format("{0}#{1}",f,y)}const N=o.strings.multiRightTrim(d[0],["'",";",".","\u3002"]),W=h.indexOf(N,m);m+=W+N.length;const Z={startColumn:W+1,startLineNumber:b,endColumn:W+1+N.length,endLineNumber:b};if(l.some(y=>c.Range.areIntersectingOrTouching(y.range,Z)))return;l.push({range:Z,url:o.strings.multiRightTrim(f,["'",";",".","\u3002"])})}}),l}}let G=class extends o.Disposable{constructor(){var h;super(),this.linkComputer=new u((h=this.workspaceService.workspace)===null||h===void 0?void 0:h.uri),this.addDispose(this.workspaceService.onWorkspaceChanged(b=>{for(const I of b)this.linkComputer.updateWorkspaceUri(I.uri)}))}provideLinks(h){return{links:this.linkComputer.computeLinks(h)}}};n.__decorate([(0,a.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],G.prototype,"workspaceService",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.OutputLinkProvider=G},63068:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bindOutputPreference=e.OutputPreferences=e.outputPreferenceSchema=void 0;const n=t(41869);e.outputPreferenceSchema={id:"output",order:7,title:(0,n.localize)("output.configurationTitle"),type:"object",properties:{"output.logWhenNoPanel":{type:"boolean",description:(0,n.localize)("output.logWhenNoPanel"),default:!0}}},e.OutputPreferences=Symbol("OutputPreferences");function a(o){o.addProviders({token:e.OutputPreferences,useFactory:c=>{const g=c.get(n.PreferenceService);return(0,n.createPreferenceProxy)(g,e.outputPreferenceSchema)}})}e.bindOutputPreference=a},56285:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannel=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(30144),g=t(43718),u=t(57517),G=t(63067),p=n.__importStar(t(20868)),h=t(69178),b=t(63068),{removeAnsiEscapeCodes:I}=g.strings,r=5e4;let l=class extends g.Disposable{constructor(d){super(),this.name=d,this.outputLines=[],this.visible=!0,this.shouldLogToBrowser=!1,this.modelReady=new g.Deferred,this.maxChannelLine=r,this.enableHighlight=!0;const m=this.preferenceService.get("output.maxChannelLine");m&&(this.maxChannelLine=m),this.enableHighlight=!!this.preferenceService.get("output.enableLogHighlight"),this.setShouldLogToBrowser(),this.addDispose(this.preferenceService.onPreferenceChanged(f=>{switch(f.preferenceName){case"output.maxChannelLine":this.onDidMaxChannelLineChange(f);break;case"output.logWhenNoPanel":this.setShouldLogToBrowser();break;case"output.enableLogHighlight":this.onDidLogHighlightChange(f);break;default:break}}));const v=new g.URI(`${g.Schemes.walkThroughSnippet}://output/${d||(0,g.uuid)()}`);this.documentService.createModelReference(v).then(f=>{this.outputModel=f,this.monacoModel=this.outputModel.instance.getMonacoModel(),this.monacoModel.setValue((0,g.localize)("output.channel.none","<no output yet>")),this.enableHighlight&&(this.outputModel.instance.languageId="log"),this.modelReady.resolve()})}onDidMaxChannelLineChange(d){d.newValue!==this.maxChannelLine&&(this.maxChannelLine=d.newValue)}onDidLogHighlightChange(d){this.modelReady.promise.then(()=>{d.newValue!==this.enableHighlight&&(this.enableHighlight=d.newValue),d.newValue?this.outputModel.instance.languageId="log":this.outputModel.instance.languageId="plaintext"})}setShouldLogToBrowser(){const d=!this.layoutService.getTabbarHandler(c.OUTPUT_CONTAINER_ID),m=this.outputPreferences["output.logWhenNoPanel"];this.shouldLogToBrowser=!!(d&&m)}doReplace(d){this.monacoModel.setValue(d)}pushEditOperations(d){const m=this.monacoModel.getLineCount(),v=d.length;this.monacoModel.pushEditOperations([],[{range:new p.Range(m,0,m+1,v),text:d,forceMoveMarkers:!0}],()=>[])}isEmptyChannel(){return this.outputLines.length===0}doAppend(d){let m=!1;this.outputLines.length+1>=this.maxChannelLine&&(m=!0,this.outputLines=this.outputLines.slice(this.maxChannelLine/2)),this.modelReady.promise.then(()=>{this.isEmptyChannel()||m?this.doReplace(this.outputLines.join("")+d):this.pushEditOperations(d),this.outputLines.push(d)})}append(d){this.eventBus.fire(new h.ContentChangeEvent(new h.ContentChangeEventPayload(this.name,h.ContentChangeType.append,d,this.outputLines))),this.doAppend(I(d))}appendLine(d){let m=d;d.endsWith(`\r
|
|
28462
28462
|
`)||(m=d+`\r
|
|
28463
28463
|
`),this.eventBus.fire(new h.ContentChangeEvent(new h.ContentChangeEventPayload(this.name,h.ContentChangeType.appendLine,m,this.outputLines))),this.doAppend(I(m)),this.shouldLogToBrowser&&console.log(`%c[${this.name}]%c ${d}}`,"background:rgb(50, 150, 250); color: #fff","background: none; color: inherit")}replace(d){this.outputLines=[],this.modelReady.promise.then(()=>this.monacoModel.setValue("")),this.append(d)}clear(){this.outputLines=[],this.modelReady.promise.then(()=>this.monacoModel.setValue((0,g.localize)("output.channel.none","\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8F93\u51FA"))),this.eventBus.fire(new h.ContentChangeEvent(new h.ContentChangeEventPayload(this.name,h.ContentChangeType.appendLine,"",this.outputLines)))}setVisibility(d){if(this.visible=d,d){const m=this.layoutService.getTabbarHandler(c.OUTPUT_CONTAINER_ID);if(!m)return;m.isVisible||m.activate()}}async setLanguageId(d){await this.modelReady.promise,this.outputModel.instance.languageId=d}get isVisible(){return this.visible}};n.__decorate([(0,a.Autowired)(G.IMainLayoutService),n.__metadata("design:type",Object)],l.prototype,"layoutService",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],l.prototype,"preferenceService",void 0),n.__decorate([(0,a.Autowired)(b.OutputPreferences),n.__metadata("design:type",Object)],l.prototype,"outputPreferences",void 0),n.__decorate([(0,a.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],l.prototype,"documentService",void 0),n.__decorate([(0,a.Autowired)(g.IEventBus),n.__metadata("design:type",Object)],l.prototype,"eventBus",void 0),l=n.__decorate([(0,a.Injectable)({multiple:!0}),n.__param(0,(0,a.Optional)()),n.__metadata("design:paramtypes",[String])],l),e.OutputChannel=l},83145:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputService=void 0;const n=t(85608),a=t(83794),o=t(76003),c=t(41869),g=t(43718),u=t(57517),G=t(56285);let p=class extends g.WithEventBus{get onDidSelectedChannelChange(){return this.onDidSelectedChannelChangeEmitter.event}constructor(){super(),this.channels=a.observable.map(),this.onDidSelectedChannelChangeEmitter=new g.Emitter,this.keys=""+Math.random(),this.autoReveal=!0,this.enableSmartScroll=!0,(0,a.makeObservable)(this),this.enableSmartScroll=!!this.preferenceService.get("output.enableSmartScroll"),this.addDispose(this.preferenceService.onPreferenceChanged(b=>{b.preferenceName==="output.enableSmartScroll"&&b.newValue!==this.enableSmartScroll&&(this.enableSmartScroll=b.newValue)}))}updateSelectedChannel(b){this.monacoDispose&&this.monacoDispose.dispose(),this.selectedChannel=b,this.onDidSelectedChannelChangeEmitter.fire(b),this.selectedChannel.modelReady.promise.then(()=>{var I,r;const l=this.selectedChannel.outputModel.instance.getMonacoModel();(I=this.outputEditor)===null||I===void 0||I.open(this.selectedChannel.outputModel),this.enableSmartScroll&&((r=this.outputEditor)===null||r===void 0||r.monacoEditor.revealLine(l.getLineCount()),this.autoReveal=!0),this.monacoDispose=l.onDidChangeContent(()=>{var s;this.autoReveal&&this.enableSmartScroll&&((s=this.outputEditor)===null||s===void 0||s.monacoEditor.revealLine(l.getLineCount(),0))})})}set viewHeight(b){this._viewHeight=b}get viewHeight(){return this._viewHeight}getChannel(b){const I=this.channels.get(b);if(I)return I;const r=this.config.injector.get(G.OutputChannel,[b]);return this.channels.set(b,r),this.channels.size===1&&this.updateSelectedChannel(r),r}deleteChannel(b){this.channels.delete(b)}getChannels(){return Array.from(this.channels.values())}async initOutputMonacoInstance(b){this.outputEditor&&this.outputEditor.dispose(),this.outputEditor=this.editorCollectionService.createCodeEditor(b,Object.assign(Object.assign({},(0,u.getSimpleEditorOptions)()),{lineDecorationsWidth:20,automaticLayout:!0,readOnly:!0,domReadOnly:!0,extraEditorClassName:"kt-output-monaco",scrollbar:{useShadows:!1}})),this.selectedChannel&&this.updateSelectedChannel(this.selectedChannel),this.addDispose(this.outputEditor.monacoEditor.onMouseUp(I=>{var r,l;if(this.enableSmartScroll){const{range:s}=I.target,d=(l=(r=this.outputEditor)===null||r===void 0?void 0:r.currentDocumentModel)===null||l===void 0?void 0:l.getMonacoModel().getLineCount();s?.startLineNumber<d&&(this.autoReveal=!1),s?.startLineNumber>=d&&(this.autoReveal=!0)}}))}};n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],p.prototype,"config",void 0),n.__decorate([(0,o.Autowired)(u.EditorCollectionService),n.__metadata("design:type",u.EditorCollectionService)],p.prototype,"editorCollectionService",void 0),n.__decorate([(0,o.Autowired)(u.IEditorDocumentModelService),n.__metadata("design:type",Object)],p.prototype,"documentService",void 0),n.__decorate([(0,o.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],p.prototype,"preferenceService",void 0),n.__decorate([a.observable.shallow,n.__metadata("design:type",Object)],p.prototype,"channels",void 0),n.__decorate([a.observable,n.__metadata("design:type",String)],p.prototype,"keys",void 0),n.__decorate([a.observable,n.__metadata("design:type",String)],p.prototype,"_viewHeight",void 0),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",G.OutputChannel)],p.prototype,"getChannel",null),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[String]),n.__metadata("design:returntype",void 0)],p.prototype,"deleteChannel",null),p=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],p),e.OutputService=p},12481:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChannelSelector=e.Output=void 0;const n=t(85608),a=t(25150),o=n.__importStar(t(14041)),c=t(97267),g=t(41869),u=t(30144),G=t(77331),p=t(72260),h=n.__importDefault(t(33395)),b=t(83145);e.Output=(0,a.observer)(({viewState:I})=>{const r=(0,g.useInjectable)(b.OutputService),l=(0,o.useRef)(null),s=(0,g.useInjectable)(p.IMainLayoutService);return(0,o.useEffect)(()=>{r.viewHeight=String(I.height)},[I.height]),(0,o.useEffect)(()=>{if(l.current){const d=s.getTabbarHandler(u.OUTPUT_CONTAINER_ID);if(d?.isActivated())r.initOutputMonacoInstance(l.current);else{const m=d?.onActivate(()=>{r.initOutputMonacoInstance(l.current),m?.dispose()})}}},[]),o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{className:h.default.output,ref:l}))}),e.ChannelSelector=(0,a.observer)(()=>{const I="<no channels>",r=(0,g.useInjectable)(g.AppConfig),l=(0,g.useInjectable)(b.OutputService),s=[],[d,m]=o.default.useState("");l.getChannels().forEach((f,N)=>{s.push(r.isElectronRenderer?o.default.createElement("option",{value:f.name,key:`${N} - ${f.name}`},f.name):o.default.createElement(c.Option,{value:f.name,key:`${N} - ${f.name}`},f.name))}),(0,o.useEffect)(()=>{const f=l.onDidSelectedChannelChange(N=>{m(N.name)});return()=>{f.dispose()}},[]),s.length===0&&s.push(r.isElectronRenderer?o.default.createElement("option",{key:I,value:I},I):o.default.createElement(c.Option,{key:I,value:I},I));async function v(f){let N;typeof f=="object"?N=f.target.value:N=f,N!==I&&l.updateSelectedChannel(l.getChannel(N))}return r.isElectronRenderer?o.default.createElement(G.Select,{value:d||I,onChange:v},s):o.default.createElement(c.Select,{value:d||I,className:h.default.select,size:"small",maxHeight:l.viewHeight,onChange:v},s)})},69178:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentChangeEvent=e.ContentChangeEventPayload=e.ContentChangeType=void 0;const n=t(43718);var a;(function(g){g[g.appendLine=0]="appendLine",g[g.append=1]="append",g[g.clear=2]="clear"})(a=e.ContentChangeType||(e.ContentChangeType={}));class o{constructor(u,G,p,h){this.channelName=u,this.changeType=G,this.value=p,this.lines=h}}e.ContentChangeEventPayload=o;class c extends n.BasicEvent{}e.ContentChangeEvent=c},31388:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserCtxMenuService=void 0;const n=t(85608),a=t(83794),o=t(76003);let c=class{constructor(){this.visible=!1,this.onHide=void 0,this.point=void 0,this.context=void 0,this.menuNodes=a.observable.array([]),(0,a.makeObservable)(this)}show(u){const{anchor:G,onHide:p,args:h,menuNodes:b}=u;if(!Array.isArray(b)||!b.length)return;this.context=h,this.menuNodes.splice(0,this.menuNodes.length,...b);const{x:I,y:r}=G instanceof window.MouseEvent?{x:G.clientX,y:G.clientY}:G;this.onHide=p,this.point={pageX:I,pageY:r},this.visible=!0}hide(u){typeof this.onHide=="function"&&this.onHide(u),this.reset()}reset(){this.visible=!1}};n.__decorate([a.observable,n.__metadata("design:type",Object)],c.prototype,"visible",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],c.prototype,"onHide",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],c.prototype,"point",void 0),n.__decorate([a.observable,n.__metadata("design:type",Object)],c.prototype,"context",void 0),n.__decorate([a.observable,n.__metadata("design:type",Array)],c.prototype,"menuNodes",void 0),n.__decorate([a.action,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],c.prototype,"show",null),n.__decorate([a.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Boolean]),n.__metadata("design:returntype",void 0)],c.prototype,"hide",null),n.__decorate([a.action.bound,n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],c.prototype,"reset",null),c=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],c),e.BrowserCtxMenuService=c},5454:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CtxMenu=void 0;const n=t(85608),a=t(25150),o=n.__importDefault(t(14041)),c=n.__importDefault(t(26737)),g=t(97267),u=t(41869),G=t(25918),p=n.__importDefault(t(17647)),h=t(97222),b=t(42912);t(34728),e.CtxMenu=(0,a.observer)(()=>{const I=(0,u.useInjectable)(h.IBrowserCtxMenu),r=(0,u.useInjectable)(b.IIconService),l=o.default.useCallback(()=>{I.hide(!1)},[]),s=o.default.useCallback(()=>{I.visible&&I.hide(!0)},[I.visible]);return o.default.createElement(c.default,{popupPlacement:"bottomLeft",popupVisible:I.visible,action:["contextMenu"],popupAlign:{overflow:{adjustX:1,adjustY:1},offset:[window.scrollX,window.scrollY]},point:I.point||{},popupClassName:"point-popup",builtinPlacements:p.default,popup:o.default.createElement(g.ClickOutside,{mouseEvents:["click","contextmenu"],onOutsideClick:s},o.default.createElement(G.MenuActionList,{data:I.menuNodes,afterClick:l,context:I.context,iconService:r,renderSubMenuTitle:I.renderSubMenuTitle,renderMenuItem:I.renderMenuItem})),alignPoint:!0})}),e.CtxMenu.displayName="CtxMenu"},54490:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogContextKey=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(20162);let g=class{constructor(){this._contextKeyService=this.globalContextKeyService,this.dialogViewVisibleContext=c.DialogViewVisibleContext.bind(this._contextKeyService)}};n.__decorate([(0,a.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],g.prototype,"globalContextKeyService",void 0),g=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],g),e.DialogContextKey=g},73618:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogContribution=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(20162),g=t(25751);let u=class{registerCommands(p){p.registerCommand({id:o.DIALOG_COMMANDS.ENSURE.id,label:(0,o.localize)("dialog.ensure")},{execute:()=>{const h=this.dialogService.getButtons();this.dialogService.hide(h?.[h.length-1])}})}registerKeybindings(p){p.registerKeybinding({command:o.DIALOG_COMMANDS.ENSURE.id,keybinding:"enter",when:`${c.DialogViewVisibleContext.raw}`})}};n.__decorate([(0,a.Autowired)(g.IDialogService),n.__metadata("design:type",Object)],u.prototype,"dialogService",void 0),u=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution)],u),e.DialogContribution=u},16417:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogService=void 0;const n=t(85608),a=t(76003),o=t(43718),c=t(25751),g=t(54490);let u=class extends c.AbstractMessageService{constructor(){super(...arguments),this._visible=!1,this.message="",this.title="",this.closable=!0,this.props={},this.onDidDialogVisibleChangeEmitter=new o.Emitter}get onDidDialogVisibleChange(){return this.onDidDialogVisibleChangeEmitter.event}get visible(){return this._visible}open(p,h,b,I=!0,r,l){return this.deferred=new o.Deferred,this.type=h,this.message=p,this._visible=!0,this.closable=I,this.props=l??{},this.buttons=b,this.onDidDialogVisibleChangeEmitter.fire(this._visible),this.contextkeyService.dialogViewVisibleContext.set(!0),this.deferred.promise}hide(p){this._visible=!1,this.onDidDialogVisibleChangeEmitter.fire(this._visible),this.contextkeyService.dialogViewVisibleContext.set(!1),this.deferred.resolve(p)}reset(){this.type=void 0,this.message="",this.buttons=[],this.props={}}getMessage(){return this.message}getType(){return this.type}getIcon(){switch(this.type){case o.MessageType.Error:return{color:"var(--notificationsErrorIcon-foreground)",className:"close-circle"};case o.MessageType.Info:return{color:"var(--notificationsInfoIcon-foreground)",className:"info-circle"};case o.MessageType.Warning:return{color:"var(--notificationsWarningIcon-foreground)",className:"question-circle"};default:break}}getButtons(){return this.buttons}getProps(){return this.props}};n.__decorate([(0,a.Autowired)(g.DialogContextKey),n.__metadata("design:type",g.DialogContextKey)],u.prototype,"contextkeyService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.DialogService=u},21705:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=void 0;const a=t(85608).__importStar(t(14041)),o=t(97267),c=t(41869),g=t(25751),u=()=>{var G;const p=(0,c.useInjectable)(g.IDialogService),h=p.getIcon(),b=p.getMessage(),I=p.getButtons(),r=p.getType(),[l,s]=(0,a.useState)(p.visible),d=p.getProps(),m=(0,a.useCallback)(()=>{p.reset()},[p]),v=(0,a.useCallback)(()=>{p.hide()},[p]),f=(0,a.useCallback)(N=>{p.hide(N)},[p]);return(0,a.useEffect)(()=>{const N=p.onDidDialogVisibleChange(W=>{s(W)});return()=>{N.dispose()}},[]),a.default.createElement(o.Dialog,Object.assign({visible:l,onClose:v,closable:(G=p.closable)!==null&&G!==void 0?G:!0,afterClose:m,message:b,type:"confirm",messageType:r,icon:h,keyboard:!0,buttons:I?I.map((N,W)=>a.default.createElement(o.Button,{size:"large",onClick:()=>f(N),key:N,type:W===I.length-1?"primary":"secondary"},c.strings.mnemonicButtonLabel(N,!0))):a.default.createElement(o.Button,{size:"large",onClick:v,type:"primary"},(0,c.localize)("dialog.confirm"))},d))};e.Dialog=u},96194:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(97222),g=t(25751),u=t(31388),G=t(54490),p=t(73618),h=t(16417),b=t(38543),I=t(75124);let r=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:G.DialogContextKey,useClass:G.DialogContextKey},{token:g.IDialogService,useClass:h.DialogService},{token:g.IMessageService,useClass:I.MessageService},{token:c.IBrowserCtxMenu,useClass:u.BrowserCtxMenuService},p.DialogContribution],this.isOverlay=!0,this.component=b.Overlay}};r=n.__decorate([(0,a.Injectable)()],r),e.OverlayModule=r},38543:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Overlay=void 0;const n=t(85608),a=t(25150),o=n.__importDefault(t(14041)),c=t(41869),g=t(5454),u=t(21705);t(90311),e.Overlay=(0,a.observer)(()=>{const G=(0,c.useInjectable)(c.ComponentRegistry),p=(0,c.useInjectable)(c.IClientApp),[h,b]=o.default.useState([]),I=(0,c.useInjectable)(c.AppConfig);return o.default.useEffect(()=>{p.appInitialized.promise.then(()=>{var r;if(!((r=I.layoutConfig[c.SlotLocation.extra])===null||r===void 0)&&r.modules){const l=[];I.layoutConfig[c.SlotLocation.extra].modules.forEach(s=>{const d=G.getComponentRegistryInfo(s);d&&(d.views||[]).forEach(m=>{m.component&&l.push(m.component)})}),b(l)}})},[]),o.default.createElement("div",{id:"ide-overlay",className:"ide-overlay"},o.default.createElement(u.Dialog,null),o.default.createElement(g.CtxMenu,null),o.default.createElement(c.ComponentRenderer,{Component:h}))})},75124:(L,e,t)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageService=void 0;const a=t(85608),o=t(76003),c=t(97267),g=t(84605),u=t(41869),G=t(43718),p=t(25751);let h=n=class extends p.AbstractMessageService{constructor(){super(...arguments),this.showTime=0}open(I,r,l,s=!0,d){if(!I)return Promise.resolve(void 0);let m=I;if(Date.now()-this.showTime<n.SAME_MESSAGE_DURATION_MS&&typeof m=="string"&&this.preMessage===m)return Promise.resolve(void 0);this.preMessage=typeof m=="string"&&m,this.showTime=Date.now(),typeof I=="string"&&I.length>p.MAX_MESSAGE_LENGTH&&(m=`${I.substr(0,p.MAX_MESSAGE_LENGTH)}...`);const v=d&&typeof d=="string"?`${(0,G.localize)("component.message.origin")}: ${d}`:"",f=(0,G.uuid)();return(0,c.open)((0,u.toMarkdown)(m,this.openerService,{walkTokens:g.parseWithoutEscape}),r,s,f,l,v,n.DURATION[r])||Promise.resolve(void 0)}hide(){c.notification.destroy()}};h.SAME_MESSAGE_DURATION_MS=3e3,h.DURATION={[G.MessageType.Info]:15,[G.MessageType.Warning]:18,[G.MessageType.Error]:20},a.__decorate([(0,o.Autowired)(u.IOpenerService),a.__metadata("design:type",Object)],h.prototype,"openerService",void 0),h=n=a.__decorate([(0,o.Injectable)()],h),e.MessageService=h},25751:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IOpenDialogOptions=e.ISaveDialogOptions=e.IWindowDialogService=e.AbstractMessageService=e.IDialogService=e.MAX_MESSAGE_LENGTH=e.IMessageService=void 0;const n=t(43718);e.IMessageService=Symbol("IMessageService"),e.MAX_MESSAGE_LENGTH=1e3,e.IDialogService=Symbol("IDialogService");class a{info(u,G,p,h){return this.open(u,n.MessageType.Info,G,p,void 0,h)}warning(u,G,p,h){return this.open(u,n.MessageType.Warning,G,p,void 0,h)}error(u,G,p,h){return this.open(u,n.MessageType.Error,G,p,void 0,h)}}e.AbstractMessageService=a,e.IWindowDialogService=Symbol("IWindowDialogService");var o;(function(g){function u(G){return"saveLabel"in G||"showNameInput"in G||"defaultFileName"in G}g.is=u})(o=e.ISaveDialogOptions||(e.ISaveDialogOptions={}));var c;(function(g){function u(G){return"canSelectFiles"in G||"canSelectFolders"in G||"canSelectMany"in G||"openLabel"in G}g.is=u})(c=e.IOpenDialogOptions||(e.IOpenDialogOptions={}))},72665:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t(85608).__exportStar(t(25751),e)},11461:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractResourcePreferenceProvider=e.OVERRIDE_PROPERTY_PATTERN=void 0;const n=t(85608),a=n.__importStar(t(23304)),o=t(76003),c=t(41869),g=t(14951),u="\\[(.*)\\]$";e.OVERRIDE_PROPERTY_PATTERN=new RegExp(u);let G=class extends c.PreferenceProvider{constructor(){super(),this.preferences={default:{},languageSpecific:{}},this.preferenceThrottler=new c.Throttler,this.preferenceTasks=[],this.loaded=!1,this.listen()}listen(){if(this.fileSystem.handlesScheme(c.Schemes.file)&&this.fileSystem.handlesScheme(c.Schemes.userStorage))this.init();else{const h=this.fileSystem.onFileProviderChanged(b=>{this.fileSystem.handlesScheme(c.Schemes.file)&&this.fileSystem.handlesScheme(c.Schemes.userStorage)&&(this.init(),h.dispose())})}}async init(){this.readPreferences().then(()=>this._ready.resolve()).catch(()=>this._ready.resolve());const h=this.getUri(),b=await this.fileSystem.watchFileChanges(h.parent);this.toDispose.push(b),b.onFilesChanged(I=>{if(I.find(l=>l.uri.startsWith(h.parent.toString())))return this.readPreferences()}),this.toDispose.push(c.Disposable.create(()=>this.reset()))}getConfigUri(h){return h?this.contains(h)?this.getUri():void 0:this.getUri()}contains(h){if(!h)return!0;const b=this.getDomain();if(!b)return!0;const I=new c.URI(h).path;return b.some(r=>new c.URI(r).path.relativity(I)>=0)}getPreferences(h,b){return this.loaded&&this.contains(h)?this.getOnePreference(b):void 0}getLanguagePreferences(h){return this.loaded&&this.contains(h)?this.preferences.languageSpecific:void 0}getOnePreference(h){return h?this.preferences.languageSpecific[h]||{}:this.preferences.default}async resolvePreferenceTasks(h){const b=this.getUri();this.resource=this.fileSystem.getFileStat(b.toString());let I=await this.resource,r=(await this.readContents()||"").trim();for(const l of h){const{path:s,value:d}=l;if((!r||s.length===0)&&(0,c.isUndefined)(d))continue;const m={tabSize:2,insertSpaces:!0,eol:""},v=a.modify(r,s,d,{formattingOptions:m});r=a.applyEdits(r,v)}try{return I||(I=await this.fileSystem.createFile(b.toString())),await this.fileSystem.setContent(I,r),await this.readPreferences(r),!0}catch(l){return this.logger.error(`${l.toString()}`),!1}}doSetPreferenceTask(){const h=this.preferenceTasks.slice(0);return this.preferenceTasks=[],this.resolvePreferenceTasks(h)}async doSetPreference(h,b,I,r){if(!this.contains(I))return!1;const l=this.getPath(h,r);return l?(this.preferenceTasks.push({path:l,key:h,value:b}),await this.preferenceThrottler.queue(this.doSetPreferenceTask.bind(this))):!1}getPath(h,b){return b?[`[${b}]`,h]:[h]}async readPreferences(h){const b=h||await this.readContents();this.loaded=!(0,c.isUndefined)(b);const I=b?this.getParsedContent(b):{default:{},languageSpecific:{}};this.handlePreferenceChanges(I)}async readContents(){const h=this.getUri();try{const{content:b}=await this.fileSystem.readFile(h.toString());return b.toString()}catch{if(this.appConfig.useVSCodeWorkspaceConfiguration&&h.scheme===c.Schemes.file){const I=h.parent.parent.resolve(c.VSCODE_WORKSPACE_CONFIGURATION_DIR_NAME).resolve(h.displayName);try{const{content:r}=await this.fileSystem.readFile(I.toString());return r.toString()}catch{return}}return}}getParsedContent(h){const b=this.parse(h),I={default:{},languageSpecific:{}};if(typeof b!="object")return I;for(const r of Object.keys(b)){const l=b[r];if(e.OVERRIDE_PROPERTY_PATTERN.test(r)){const s=r.match(e.OVERRIDE_PROPERTY_PATTERN)[1];I.languageSpecific[s]=I.languageSpecific[s]||{};for(const d in l){const m=l[d];I.languageSpecific[s][`${d}`]=m}}else I.default[r]=l}return I}validate(h,b){return this.configurations.getPath(this.getUri())!==this.configurations.getPaths()[0]?!0:(0,c.isUndefined)(b)||this.schemaProvider.validate(h,b).valid}parse(h){if(h=h.trim(),!h)return;const b=a.stripComments(h);return a.parse(b)}handlePreferenceChanges(h){const b=Object.assign({},this.preferences);this.preferences=h;const I=this.collectChanges(this.preferences,b);(Object.keys(I.default).length>0||Object.keys(I.languageSpecific).length>0)&&this.emitPreferencesChangedEvent(I)}reset(){const h=this.preferences;this.preferences={default:{},languageSpecific:{}};const b=this.collectChanges(this.preferences,h);(Object.keys(b.default).length>0||Object.keys(b.languageSpecific).length>0)&&this.emitPreferencesChangedEvent(b)}collectChanges(h,b){const I={default:this.collectOneChanges(h.default,b.default),languageSpecific:{}},r=new Set([...Object.keys(h.languageSpecific),...Object.keys(b.languageSpecific)]);for(const l of r){const s=this.collectOneChanges(h.languageSpecific[l],b.languageSpecific[l]);Object.keys(s).length>0&&(I.languageSpecific[l]=s)}return I}collectOneChanges(h,b){const I=new Set([...Object.keys(b||{}),...Object.keys(h||{})]),r={},l=this.getUri();for(const s of I){const d=b[s],m=h[s],v=this.schemaProvider.getCombinedSchema().properties[s];if(v){const f=v.scope;if(!this.schemaProvider.isValidInScope(s,this.getScope())){this.logger.warn(`Preference ${s} in ${l} can only be defined in scopes: ${c.PreferenceScope.getScopeNames(f).join(", ")}.`);continue}}((0,c.isUndefined)(m)&&d!==m||(0,c.isUndefined)(d)&&m!==d||!c.JSONUtils.deepEqual(d,m))&&(r[s]={preferenceName:s,newValue:m,oldValue:d,scope:this.getScope(),domain:this.getDomain()})}return r}};n.__decorate([(0,o.Autowired)(c.PreferenceSchemaProvider),n.__metadata("design:type",c.PreferenceSchemaProvider)],G.prototype,"schemaProvider",void 0),n.__decorate([(0,o.Autowired)(c.PreferenceConfigurations),n.__metadata("design:type",c.PreferenceConfigurations)],G.prototype,"configurations",void 0),n.__decorate([(0,o.Autowired)(g.IFileServiceClient),n.__metadata("design:type",Object)],G.prototype,"fileSystem",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],G.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],G.prototype,"logger",void 0),G=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.AbstractResourcePreferenceProvider=G},91825:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderFilePreferenceProvider=e.FolderFilePreferenceProviderOptions=e.FolderFilePreferenceProviderFactory=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(10560),g=t(11461);e.FolderFilePreferenceProviderFactory=Symbol("FolderFilePreferenceProviderFactory"),e.FolderFilePreferenceProviderOptions=Symbol("FolderFilePreferenceProviderOptions");let u=class extends g.AbstractResourcePreferenceProvider{get folderUri(){return this._folderUri||(this._folderUri=new o.URI(this.options.folder.uri)),this._folderUri}getUri(){return this.options.configUri}getScope(){return this.workspaceService.isMultiRootWorkspaceOpened?o.PreferenceScope.Folder:o.PreferenceScope.Workspace}getDomain(){return[this.folderUri.toString()]}};n.__decorate([(0,a.Autowired)(e.FolderFilePreferenceProviderOptions),n.__metadata("design:type",Object)],u.prototype,"options",void 0),n.__decorate([(0,a.Autowired)(c.IWorkspaceService),n.__metadata("design:type",Object)],u.prototype,"workspaceService",void 0),u=n.__decorate([(0,a.Injectable)()],u),e.FolderFilePreferenceProvider=u},16814:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldersPreferencesProvider=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(79929),g=t(51500),u=t(91825);let G=class extends o.PreferenceProvider{constructor(){super(),this.providers=new Map,this.init()}async init(){await this.workspaceService.roots,this.updateProviders(),this.workspaceService.onWorkspaceChanged(()=>this.updateProviders());const h=[];for(const b of this.providers.values())h.push(b.ready.catch(I=>this.logger.error(I)));h.length>0?Promise.all(h).then(()=>this._ready.resolve()):this._ready.resolve()}updateProviders(){const h=this.workspaceService.tryGetRoots(),b=new Set(this.providers.keys());for(const I of h){const r=new o.URI(I.uri);for(const l of this.configurations.getPaths())for(const s of[...this.configurations.getSectionNames(),this.configurations.getConfigName()]){const d=this.configurations.createUri(r,l,s),m=d.toString();if(b.delete(m),!this.providers.has(m)){const v=this.createProvider({folder:I,configUri:d});this.providers.set(m,v)}}}for(const I of b){const r=this.providers.get(I);r&&(this.providers.delete(I),r.dispose())}}getConfigUri(h){for(const b of this.getFolderProviders(h)){const I=b.getConfigUri(h);if(this.configurations.isConfigUri(I))return I}}getContainingConfigUri(h){for(const b of this.getFolderProviders(h)){const I=b.getConfigUri();if(this.configurations.isConfigUri(I)&&b.contains(h))return I}}getDomain(){return this.workspaceService.tryGetRoots().map(h=>h.uri)}doResolve(h,b,I){const r={},l=this.groupProvidersByConfigName(b);for(const s of l.values())for(const d of s){const{value:m,configUri:v}=d.resolve(h,b,I);if(v&&m!==void 0){r.configUri=v,r.value=o.PreferenceProvider.merge(r.value,m);break}}return r}getPreferences(h,b){let I;const r=this.groupProvidersByConfigName(h);for(const l of r.values())for(const s of l)if(s.getConfigUri(h)){const d=s.getPreferences(void 0,b);d&&(I=o.PreferenceProvider.merge(I,d));break}return I}getLanguagePreferences(h){let b;const I=this.groupProvidersByConfigName(h);for(const r of I.values())for(const l of r)if(l.getConfigUri(h)){const s=l.getLanguagePreferences();s&&(b=o.PreferenceProvider.merge(b,s));break}return b}async doSetPreference(h,b,I,r){const l=h.split(".",1)[0],s=this.configurations.isSectionName(l)?l:this.configurations.getConfigName(),d=this.getFolderProviders(I);let m;for(const v of d){if(m===void 0){const f=v.getConfigUri(I);f&&(m=this.configurations.getPath(f))}if(this.configurations.getName(v.getConfigUri())===s){if(v.getConfigUri(I)){if(await v.setPreference(h,b,I,r))return!0}else if(this.configurations.getPath(v.getConfigUri())===m){if(await v.setPreference(h,b,I,r))return!0}else if(await v.setPreference(h,b,I,r))return!0}}return!1}groupProvidersByConfigName(h){const b=new Map,I=this.getFolderProviders(h);for(const r of[this.configurations.getConfigName(),...this.configurations.getSectionNames()]){const l=[];for(const s of I)this.configurations.getName(s.getConfigUri())===r&&l.push(s);b.set(r,l)}return b}getFolderProviders(h){if(!h)return[];const b=new o.URI(h).path;let I={relativity:Number.MAX_SAFE_INTEGER};const r=new Map;for(const l of this.providers.values()){const s=l.folderUri.toString(),d=r.get(s)||[];d.push(l),r.set(s,d);const m=l.folderUri.path.relativity(b);m>=0&&I.relativity>m&&(I={relativity:m,uri:s})}return I.uri&&r.get(I.uri)||[]}createProvider(h){const b=this.FolderFilePreferenceProviderFactory(h);return this.toDispose.push(b),this.toDispose.push(b.onDidPreferencesChanged(I=>{this.emitPreferencesChangedEvent(I)})),b}};n.__decorate([(0,a.Autowired)(u.FolderFilePreferenceProviderFactory),n.__metadata("design:type",Function)],G.prototype,"FolderFilePreferenceProviderFactory",void 0),n.__decorate([(0,a.Autowired)(o.PreferenceConfigurations),n.__metadata("design:type",o.PreferenceConfigurations)],G.prototype,"configurations",void 0),n.__decorate([(0,a.Autowired)(g.IWorkspaceService),n.__metadata("design:type",Object)],G.prototype,"workspaceService",void 0),n.__decorate([(0,a.Autowired)(c.IFileServiceClient),n.__metadata("design:type",Object)],G.prototype,"fileSystem",void 0),n.__decorate([(0,a.Autowired)(o.ILogger),n.__metadata("design:type",Object)],G.prototype,"logger",void 0),G=n.__decorate([(0,a.Injectable)(),n.__metadata("design:paramtypes",[])],G),e.FoldersPreferencesProvider=G},58408:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createPreferenceProviders=e.injectPreferenceProviders=e.injectWorkspaceFilePreferenceProvider=e.injectFolderPreferenceProvider=e.PreferencesModule=void 0;const n=t(85608),a=t(76003),o=t(41869),c=t(78132),g=t(83569),u=t(91825),G=t(16814),p=t(65146),h=t(90184),b=t(76773),I=t(25947),r=t(46392),l=t(58705);let s=class extends o.BrowserModule{constructor(){super(...arguments),this.contributionProvider=g.SettingContribution,this.providers=[...f(),{token:g.IUserStorageService,useClass:I.UserStorageServiceImpl},{token:c.IPreferenceSettingsService,useClass:h.PreferenceSettingsService},p.PreferenceContribution,I.UserStorageContribution],this.preferences=v}};s=n.__decorate([(0,a.Injectable)()],s),e.PreferencesModule=s;function d(N){N.addProviders({token:u.FolderFilePreferenceProviderFactory,useFactory:()=>W=>{const Z=N.get(c.PreferenceConfigurations),y=Z.getName(W.configUri),E=N.createChild([{token:u.FolderFilePreferenceProviderOptions,useValue:W}],{dropdownForTag:!0,tag:y});return Z.isConfigUri(W.configUri)?(E.addProviders({token:u.FolderFilePreferenceProvider,useClass:u.FolderFilePreferenceProvider}),E.get(u.FolderFilePreferenceProvider)):E.get(u.FolderFilePreferenceProvider,{tag:y,multiple:!0})}})}e.injectFolderPreferenceProvider=d;function m(N){N.addProviders({token:r.WorkspaceFilePreferenceProviderFactory,useFactory:()=>W=>N.createChild([{token:r.WorkspaceFilePreferenceProviderOptions,useValue:W},{token:r.WorkspaceFilePreferenceProvider,useClass:r.WorkspaceFilePreferenceProvider}]).get(r.WorkspaceFilePreferenceProvider)})}e.injectWorkspaceFilePreferenceProvider=m;function v(N){d(N),m(N)}e.injectPreferenceProviders=v;function f(){return[{token:c.PreferenceProvider,tag:c.PreferenceScope.Folder,useClass:G.FoldersPreferencesProvider},{token:c.PreferenceProvider,tag:c.PreferenceScope.Workspace,useClass:l.WorkspacePreferenceProvider},{token:c.PreferenceProvider,tag:c.PreferenceScope.User,useClass:b.UserPreferenceProvider}]}e.createPreferenceProviders=f},65146:(L,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferenceContribution=e.PREFERENCE_COMMANDS=e.PreferenceContextMenu=e.PrefResourceProvider=void 0;const n=t(85608),a=n.__importStar(t(23304)),o=t(76003),c=t(41869),g=t(93899),u=t(57517),G=t(42933),p=t(83569),h=t(90184),b=t(26551),I=t(99187),r=t(76773),l=t(58705),s="pref-preview",{addElement:d}=c.arrays;let m=class extends c.WithEventBus{constructor(){super(),this.scheme=p.PREF_SCHEME}provideResource(Z){return{supportsRevive:!0,name:(0,c.localize)("preference.tab.name"),icon:(0,c.getIcon)("setting"),uri:Z}}provideResourceSubname(Z,y){return null}async shouldCloseResource(Z,y){return!0}};m=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],m),e.PrefResourceProvider=m;var v;(function(W){W.OPEN="1_open"})(v=e.PreferenceContextMenu||(e.PreferenceContextMenu={}));var f;(function(W){const Z="preference";W.OPEN_USER_SETTING_FILE={id:"preference.open.user",label:"%preference.editorTitle.openUserSource%",category:Z},W.OPEN_WORKSPACE_SETTING_FILE={id:"preference.open.workspace",label:"%preference.editorTitle.openWorkspaceSource%",category:Z},W.OPEN_SOURCE_FILE={id:"preference.open.source",label:"%preference.editorTitle.openSource%",category:Z},W.PREFERENCE_INPUT_FOCUS={id:"preference.input.focus",category:Z}})(f=e.PREFERENCE_COMMANDS||(e.PREFERENCE_COMMANDS={}));let N=class{constructor(){this.settingGroupsWillRegister=h.defaultSettingGroup,this.settingSectionsWillRegister=h.defaultSettingSections}onStart(){this.saveSettings(),this.handleSettingGroups(),this.handleSettingSections(),this.registerSettings(),this.registerSettingSections()}registerCommands(Z){Z.registerCommand(c.COMMON_COMMANDS.OPEN_PREFERENCES,{execute:async y=>{await this.openPreferences(y),this.preferenceService.focusInput()}}),Z.registerCommand(c.COMMON_COMMANDS.LOCATE_PREFERENCES,{execute:async y=>(await this.openPreferences(),await this.preferenceService.scrollToGroup(y))}),Z.registerCommand(f.OPEN_USER_SETTING_FILE,{execute:()=>{this.openResource(c.PreferenceScope.User)}}),Z.registerCommand(f.OPEN_WORKSPACE_SETTING_FILE,{execute:()=>{this.openResource(c.PreferenceScope.Workspace)}}),Z.registerCommand(f.OPEN_SOURCE_FILE,{execute:async(y,E)=>{!y||typeof y!="number"?this.openResource():this.openResource(y,E)}}),Z.registerCommand(f.PREFERENCE_INPUT_FOCUS,{execute:()=>{this.preferenceService.focusInput()}})}registerMenus(Z){Z.registerMenuItem(g.MenuId.SettingsIconMenu,{command:c.COMMON_COMMANDS.OPEN_PREFERENCES.id,group:v.OPEN}),Z.registerMenuItem(g.MenuId.EditorTitle,{command:f.OPEN_SOURCE_FILE.id,iconClass:(0,c.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${p.PREF_SCHEME}`}),Z.registerMenuItem(g.MenuId.EditorTitle,{command:c.COMMON_COMMANDS.OPEN_PREFERENCES.id,iconClass:(0,c.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /settings.json/"})}registerKeybindings(Z){Z.registerKeybinding({command:c.COMMON_COMMANDS.OPEN_PREFERENCES.id,keybinding:"ctrlcmd+,"}),Z.registerKeybinding({command:f.PREFERENCE_INPUT_FOCUS.id,keybinding:"ctrlcmd+f",when:"resourceScheme == pref"})}handleSettingGroups(){for(const Z of this.contributions.getContributions())Z.handleSettingGroup&&(this.settingGroupsWillRegister=Z.handleSettingGroup(this.settingGroupsWillRegister))}handleSettingSections(){for(const Z of this.contributions.getContributions())Z.handleSettingSections&&(this.settingSectionsWillRegister=Z.handleSettingSections(Object.assign({},this.settingSectionsWillRegister)))}saveSettings(){for(const Z of this.contributions.getContributions())Z.registerSetting&&Z.registerSetting({registerSettingGroup:y=>d(this.settingGroupsWillRegister,y),registerSettingSection:(y,E)=>((A=>Object.keys(this.settingSectionsWillRegister).includes(A))(y)||(this.settingSectionsWillRegister[y]=[]),d(this.settingSectionsWillRegister[y],E))})}registerSettings(){this.settingGroupsWillRegister.forEach(Z=>{this.preferenceService.registerSettingGroup(Z)})}registerSettingSections(){Object.keys(this.settingSectionsWillRegister).forEach(Z=>{this.settingSectionsWillRegister[Z].forEach(y=>{this.preferenceService.registerSettingSection(Z,y)})})}async openPreferences(Z,y){await this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,new c.URI("/").withScheme(p.PREF_SCHEME),{preview:!1}),(0,c.isString)(Z)?this.preferenceService.search(Z):(0,c.isString)(y)&&this.preferenceService.scrollToPreference(y)}async openResource(Z,y){var E,R,A;const w=await this.preferenceService.getCurrentPreferenceUrl(Z),F=await this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,new c.URI(w),{focus:!0,groupIndex:this.workbenchEditorService.currentEditorGroup.index});if(F&&y){const V=(E=this.workbenchEditorService.editorGroups.find(Y=>Y.name===F.groupId))===null||E===void 0?void 0:E.currentEditor;if(V){const{_commandService:Y}=V.monacoEditor;let _=V.monacoEditor.getValue(),H,X,S,Q;const{index:O}=_.match(new RegExp(`\\"${y}\\"`))||{};if(O&&O>=0)X=((R=_.slice(0,O).match(new RegExp("\\n","g")))===null||R===void 0?void 0:R.length)||0,X>0&&(H=_.split(`
|