@opensumi/cli-engine 3.8.3-next-1742888942.0 → 3.8.3-next-1742981362.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/browser.js +2 -2
- package/package.json +10 -10
package/lib/browser/browser.js
CHANGED
|
@@ -31616,7 +31616,7 @@ Tokenizing line: ${O}`);for(let W=0;W<B.tokens.length;W++){const U=B.tokens[W];j
|
|
|
31616
31616
|
|
|
31617
31617
|
`),this}appendMarkdown(s){return this.value+=s,this}appendCodeblock(s,g){return this.value+="\n```",this.value+=s,this.value+=`
|
|
31618
31618
|
`,this.value+=g,this.value+="\n```\n",this}}t.MarkdownString=p;function v(_){return _ instanceof p?!0:_&&typeof _=="object"?typeof _.value=="string"&&(typeof _.isTrusted=="boolean"||_.isTrusted===void 0)&&(typeof _.supportThemeIcons=="boolean"||_.supportThemeIcons===void 0):!1}function m(_){const s=[],g=_.split("|").map(h=>h.trim());_=g[0];const l=g[1];if(l){const h=/height=(\d+)/.exec(l),u=/width=(\d+)/.exec(l),d=h?h[1]:"",E=u?u[1]:"",f=isFinite(parseInt(E,10)),a=isFinite(parseInt(d,10));f&&s.push(`width="${E}"`),a&&s.push(`height="${d}"`)}return{href:_,dimensions:s}}},53886:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(84811),t),n.__exportStar(e(38677),t),n.__exportStar(e(32112),t),n.__exportStar(e(58063),t),n.__exportStar(e(3484),t),n.__exportStar(e(84569),t),n.__exportStar(e(92771),t),n.__exportStar(e(87330),t),n.__exportStar(e(37070),t),n.__exportStar(e(32504),t),n.__exportStar(e(78941),t),n.__exportStar(e(69403),t)},32112:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},69403:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerLane=void 0;var e;(function(n){n[n.Left=1]="Left",n[n.Center=2]="Center",n[n.Right=4]="Right",n[n.Full=7]="Full"})(e||(t.OverviewRulerLane=e={}))},58063:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3484:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92771:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},51418:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},73294:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50288:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},37846:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.knownProtocols=void 0;const n=e(11431),r=e(46147);t.knownProtocols=new Map,t.knownProtocols.set(r.ExtHostAPIIdentifier.ExtHostDocuments,n.ExtensionDocumentProtocol)},35250:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectIdentifier=void 0;var e;(function(n){n.name="$ident";function r(c,p){return Object.defineProperty(c,n.name,{value:p,enumerable:!0}),c}n.mixin=r;function o(c){return c[n.name]}n.of=o})(e||(t.ObjectIdentifier=e={}))},16363:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70858:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLittleEndian=p,t.encodeSemanticTokensDto=v,t.decodeSemanticTokensDto=_;function e(s){for(let g=0,l=s.length;g<l;g+=4){const h=s[g+0],u=s[g+1],d=s[g+2],E=s[g+3];s[g+0]=E,s[g+1]=d,s[g+2]=u,s[g+3]=h}}function n(s){const g=new Uint8Array(s.buffer,s.byteOffset,s.length*4);return p()||e(g),g}function r(s){const g=s;if(p()||e(g),g.byteOffset%4===0)return new Uint32Array(g.buffer,g.byteOffset,g.length/4);{const l=new Uint8Array(g.byteLength);return l.set(g),new Uint32Array(l.buffer,l.byteOffset,l.length/4)}}let o=!0,c=!1;function p(){if(!c){c=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,o=new Uint16Array(s.buffer)[0]===513}return o}function v(s){const g=new Uint32Array(m(s));let l=0;if(g[l++]=s.id,s.type==="full")g[l++]=1,g[l++]=s.data.length,g.set(s.data,l),l+=s.data.length;else{g[l++]=2,g[l++]=s.deltas.length;for(const h of s.deltas)g[l++]=h.start,g[l++]=h.deleteCount,h.data?(g[l++]=h.data.length,g.set(h.data,l),l+=h.data.length):g[l++]=0}return n(g)}function m(s){let g=0;if(g+=2,s.type==="full")g+=1+s.data.length;else{g+=1,g+=3*s.deltas.length;for(const l of s.deltas)l.data&&(g+=l.data.length)}return g}function _(s){const g=r(s);let l=0;const h=g[l++];if(g[l++]===1){const f=g[l++],a=g.subarray(l,l+f);return l+=f,{id:h,type:"full",data:a}}const d=g[l++],E=[];for(let f=0;f<d;f++){const a=g[l++],b=g[l++],y=g[l++];let A;y>0&&(A=g.subarray(l,l+y),l+=y),E[f]={start:a,deleteCount:b,data:A}}return{id:h,type:"delta",deltas:E}}},29490:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89225:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=e,t.endsWith=n,t.isLowerAsciiLetter=r,t.isUpperAsciiLetter=o,t.equalsIgnoreCase=p,t.escapeRegExpCharacters=m,t.startsWithIgnoreCase=_;function e(s,g){if(s.length<g.length)return!1;if(s===g)return!0;for(let l=0;l<g.length;l++)if(s[l]!==g[l])return!1;return!0}function n(s,g){const l=s.length-g.length;return l>0?s.indexOf(g,l)===l:l===0?s===g:!1}function r(s){return s>=97&&s<=122}function o(s){return s>=65&&s<=90}function c(s){return r(s)||o(s)}function p(s,g){const l=s?s.length:0,h=g?g.length:0;return l!==h?!1:v(s,g)}function v(s,g,l=s.length){if(typeof s!="string"||typeof g!="string")return!1;for(let h=0;h<l;h++){const u=s.charCodeAt(h),d=g.charCodeAt(h);if(u!==d){if(c(u)&&c(d)){const E=Math.abs(u-d);if(E!==0&&E!==32)return!1}else if(String.fromCharCode(u).toLowerCase()!==String.fromCharCode(d).toLowerCase())return!1}}return!0}function m(s){return s.replace(/[-\\{}*+?|^$.[\]()#]/g,"\\$&")}function _(s,g){const l=g.length;return g.length>s.length?!1:v(s,g,l)}},54741:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskFilterDTO=void 0;var e;(function(n){function r(c){return c}n.from=r;function o(c){if(c)return Object.assign(Object.create(null),c)}n.to=o})(e||(t.TaskFilterDTO=e={}))},25535:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54056:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestItemRootImpl=t.TestItemImpl=t.MixedTestItemController=t.InvalidTestItemError=t.DuplicateTestItemError=t.diffTestItems=t.getPrivateApiFor=t.createPrivateApiFor=void 0;const e=new WeakMap,n=(E,f)=>{const a={controllerId:f};return e.set(E,a),a};t.createPrivateApiFor=n;const r=E=>e.get(E);t.getPrivateApiFor=r;const o=(E,f,a,b)=>{let y=a;return{enumerable:!0,configurable:!1,get(){return y},set(A){var S;if(!b(y,A)){const w=y;y=A,(S=E.listener)===null||S===void 0||S.call(E,{op:3,key:f,value:A,previous:w})}}}},c=(E,f)=>E===f,p={range:(E,f)=>E===f?!0:!E||!f?!1:E.isEqual(f),label:c,description:c,sortText:c,busy:c,error:c,canResolveChildren:c,tags:(E,f)=>!(E.length!==f.length||E.some(a=>!f.find(b=>a.id===b.id)))},v=Object.keys(p),m=(E,f)=>({range:o(E,"range",void 0,p.range),label:o(E,"label",f,p.label),description:o(E,"description",void 0,p.description),sortText:o(E,"sortText",void 0,p.sortText),canResolveChildren:o(E,"canResolveChildren",!1,p.canResolveChildren),busy:o(E,"busy",!1,p.busy),error:o(E,"error",void 0,p.error),tags:o(E,"tags",[],p.tags)}),_=(E,f)=>{const a=new Map;for(const b of v){const y=p[b];y(E[b],f[b])||a.set(b,f[b])}return a};t.diffTestItems=_;class s extends Error{constructor(f){super(`Attempted to insert a duplicate test item ID ${f}`)}}t.DuplicateTestItemError=s;class g extends Error{constructor(f){super(`TestItem with ID "${f}" is invalid. Make sure to create it from the createTestItem method.`)}}t.InvalidTestItemError=g;class l extends Error{constructor(f,a,b){super(`TestItem with ID "${f}" is from controller "${a}" and cannot be added as a child of an item from controller "${b}".`)}}t.MixedTestItemController=l;const h=E=>{const f=(0,t.getPrivateApiFor)(E);let a=new Map;return{get size(){return a.size},forEach(b,y){for(const A of a.values())b.call(y,A,this)},replace(b){var y;const A=new Map,S=new Set(a.keys()),w={op:4,ops:[]};for(const T of b){if(!(T instanceof u))throw new g(T.id);const D=(0,t.getPrivateApiFor)(T).controllerId;if(D!==f.controllerId)throw new l(T.id,D,f.controllerId);if(A.has(T.id))throw new s(T.id);A.set(T.id,T),S.delete(T.id),w.ops.push({op:0,item:T})}for(const T of S.keys())w.ops.push({op:1,id:T});(y=f.listener)===null||y===void 0||y.call(f,w),a=A},add(b){var y;if(!(b instanceof u))throw new g(b.id);a.set(b.id,b),(y=f.listener)===null||y===void 0||y.call(f,{op:0,item:b})},delete(b){var y;a.delete(b)&&((y=f.listener)===null||y===void 0||y.call(f,{op:1,id:b}))},get(b){return a.get(b)},toJSON(){return Array.from(a.values())},[Symbol.iterator](){return a.values()}}};class u{constructor(f,a,b,y){if(a.includes("\0"))throw new Error(`Test IDs may not include the ${JSON.stringify(a)} symbol`);const A=(0,t.createPrivateApiFor)(this,f);Object.defineProperties(this,{id:{value:a,enumerable:!0,writable:!1},uri:{value:y,enumerable:!0,writable:!1},parent:{enumerable:!1,get(){return A.parent instanceof d?void 0:A.parent}},children:{value:h(this),enumerable:!0,writable:!1},...m(A,b)})}invalidateResults(){var f,a;(a=(f=(0,t.getPrivateApiFor)(this)).listener)===null||a===void 0||a.call(f,{op:2})}}t.TestItemImpl=u;class d extends u{constructor(f,a){super(f,f,a,void 0)}}t.TestItemRootImpl=d},82086:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4809:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86162:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeviewsService=t.ITreeViewsService=t.TreeViewSelection=t.TreeViewItem=t.TreeItemCheckboxState=void 0;var e;(function(c){c[c.Unchecked=0]="Unchecked",c[c.Checked=1]="Checked"})(e||(t.TreeItemCheckboxState=e={}));class n{}t.TreeViewItem=n;var r;(function(c){function p(v){return!!v&&typeof v=="object"&&"treeViewId"in v&&"treeItemId"in v}c.is=p})(r||(t.TreeViewSelection=r={})),t.ITreeViewsService=Symbol("ITreeViewsService");class o{constructor(){this._dragOperations=new Map,this._renderedElements=new Map}removeDragOperationTransfer(p){if(p&&this._dragOperations.has(p)){const v=this._dragOperations.get(p);return this._dragOperations.delete(p),v}}addDragOperationTransfer(p,v){this._dragOperations.set(p,v)}getRenderedTreeElement(p){if(this._renderedElements.has(p))return this._renderedElements.get(p)}addRenderedTreeItemElement(p,v){this._renderedElements.set(p,v)}removeRenderedTreeItemElement(p){this._renderedElements.has(p)&&this._renderedElements.delete(p)}}t.TreeviewsService=o},64945:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43710:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=o,t.mixin=c,t.illegalArgument=p,t.isLocationArray=v,t.isDefinitionLinkArray=m,t.reviveRegExp=_,t.reviveIndentationRule=s,t.reviveOnEnterRule=g,t.reviveOnEnterRules=l,t.serializeEnterRules=h,t.serializeRegExp=u,t.serializeIndentation=d,t.serializeAutoClosingPairs=E;const r=e(85608).__importStar(e(51328));function o(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)&&!(f instanceof RegExp)&&!(f instanceof Date)}function c(f,a,b=!0){return o(f)?(o(a)&&Object.keys(a).forEach(y=>{y in f?b&&(o(f[y])&&o(a[y])?c(f[y],a[y],b):f[y]=a[y]):f[y]=a[y]}),f):a}function p(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function v(f){return Array.isArray(f)&&f.length>0&&f[0]instanceof r.Location}function m(f){return Array.isArray(f)&&f.length>0&&f[0].hasOwnProperty("targetUri")&&f[0].hasOwnProperty("targetRange")}function _(f){if(!(typeof f>"u"||f===null))return new RegExp(f.pattern,f.flags)}function s(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:_(f.increaseIndentPattern),decreaseIndentPattern:_(f.decreaseIndentPattern),indentNextLinePattern:_(f.indentNextLinePattern),unIndentedLinePattern:_(f.unIndentedLinePattern)}}function g(f){return{beforeText:_(f.beforeText),afterText:_(f.afterText),action:f.action,previousLineText:_(f.previousLineText)}}function l(f){if(!(typeof f>"u"||f===null))return f.map(g)}function h(f){if(!(typeof f>"u"||f===null))return f.map(a=>({action:a.action,beforeText:u(a.beforeText),afterText:u(a.afterText),previousLineText:u(a.previousLineText)}))}function u(f){if(!(typeof f>"u"||f===null))return{pattern:f.source,flags:(f.global?"g":"")+(f.ignoreCase?"i":"")+(f.multiline?"m":"")}}function d(f){if(!(typeof f>"u"||f===null))return{increaseIndentPattern:u(f.increaseIndentPattern),decreaseIndentPattern:u(f.decreaseIndentPattern),indentNextLinePattern:u(f.indentNextLinePattern),unIndentedLinePattern:u(f.unIndentedLinePattern)}}function E(f){if(f)return f.map(a=>({open:a.open,close:a.close,notIn:a.notIn?a.notIn.map(b=>r.SyntaxTokenType.toString(b)):void 0}))}},96833:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98116:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebviewViewResolverRegistrationRemovalEvent=t.WebviewViewResolverRegistrationEvent=void 0;const n=e(43718);class r extends n.BasicEvent{}t.WebviewViewResolverRegistrationEvent=r;class o extends n.BasicEvent{}t.WebviewViewResolverRegistrationRemovalEvent=o},55467:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92622:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationTarget=void 0,t.reviveWorkspaceEditDto=o;const n=e(43718);var r;(function(c){c[c.Global=1]="Global",c[c.Workspace=2]="Workspace",c[c.WorkspaceFolder=3]="WorkspaceFolder"})(r||(t.ConfigurationTarget=r={}));function o(c){if(c&&c.edits)for(const p of c.edits)if(typeof p.resource=="object")p.resource=n.URI.from(p.resource),p.options={openDirtyInEditor:!0},p.textEdit=p.textEdit,p.versionId=p.versionId;else{const v=p;v.newResource=p.newResource?n.URI.from(p.newResource):void 0,v.oldResource=p.oldResource?n.URI.from(p.oldResource):void 0,v.options={...v.options,showInEditor:!1}}return c}},57646:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(76003),c=e(41869),p=e(37406),v=e(57517),m=e(88819),_=s=>{const g=s.resource.uri.codeUri.fsPath,l=(0,c.useInjectable)(o.INJECTOR_TOKEN),h=(0,c.useInjectable)(c.AppConfig),u=(0,c.useInjectable)(v.WorkbenchEditorService),d=(0,c.useInjectable)(c.IEventBus),E=()=>{const a=u.currentResource;a&&(a.metadata={...a.metadata,skipPreventBinary:!0},d.fire(new v.ResourceOpenTypeChangedEvent(a.uri)))},f=[{label:(0,c.localize)("editor.file.prevent.stillOpen"),onClick:()=>E()}];return h.isElectronRenderer&&f.push({label:(0,c.localize)("editor.openExternal"),onClick:()=>l.get(p.IElectronMainUIService).openPath(g)}),r.default.createElement(m.PreventComponent,{description:(0,c.localize)("editor.cannotOpenBinary"),actions:f})};t.BinaryEditorComponent=_},60387:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalkThroughSnippetSchemeDocumentProvider=t.VscodeSchemeDocumentProvider=t.FileSchemeDocumentProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(96405),p=e(68692),v=e(14951),m=e(80449);let _=class extends p.BaseFileSystemEditorDocumentProvider{handlesUri(h){return h.scheme===o.Schemes.file?20:-1}handlesScheme(){return!1}provideEncoding(h){return super.provideEncoding(h)}preferLanguageForUri(h){if(["settings.json"].includes(h.path.base))return"jsonc"}async saveDocumentModel(h,u,d,E,f,a=!1,b=`
|
|
31619
|
-
`,y){const A=this.hashCalculateService.calculate(d);return u.length>m.FILE_SAVE_BY_CHANGE_THRESHOLD?await this.fileSchemeDocClient.saveByChange(h.toString(),{baseMd5:A,changes:E,eol:b},f,a,y):await this.fileSchemeDocClient.saveByContent(h.toString(),{baseMd5:A,content:u},f,a,y)}async provideEditorDocumentModelContentMd5(h,u){return this.fileSchemeDocClient.getMd5(h.toString(),u)}};t.FileSchemeDocumentProvider=_,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IFileSchemeDocClient),n.__metadata("design:type",Object)],_.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(c.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(h){return!0}handlesScheme(h){return h==="vscode"}async provideEditorDocumentModelContent(h,u){return this.getSchemaContent(h)}getSchemaContent(h){const u=h.toString(),d=this.jsonRegistry.getSchemaContributions().schemas[u];if(d){const E=JSON.stringify(d);if(!this.listeners[u]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(a=>{a===u&&this._onDidChangeContent.fire(h)})});this.listeners[u]=f}return E}return"{}"}onDidDisposeModel(h){h.toString()&&(this.listeners[h.toString()].dispose(),delete this.listeners[h.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let g=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(h){return h===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(h,u){return this.documentContentMaps.has(h.toString())||this.documentContentMaps.set(h.toString(),""),this.documentContentMaps.get(h.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=g,t.WalkThroughSnippetSchemeDocumentProvider=g=n.__decorate([(0,r.Injectable)()],g)},41352:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let c=class{saveByChange(v,m,_,s,g){return this.fileDocBackendService.$saveByChange(v,m,_,s,g)}saveByContent(v,m,_,s,g){return this.fileDocBackendService.$saveByContent(v,m,_,s,g)}getMd5(v,m){return this.fileDocBackendService.$getMd5(v,m)}};t.FileSchemeDocClientService=c,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],c.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=c=n.__decorate([(0,r.Injectable)()],c)},17276:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(26542),p=e(57517),v=e(17878),m=e(42933),_=e(57646),s=e(60387),g=e(88819),l=e(99025),h="video-preview",u="image-preview",d="external-file",E="large-file-prevent";let f=class{registerResource(y){y.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(y){y.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution)],f);let a=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(y=>{y.forEach(A=>{this.cachedFileType.delete(A.uri.toString())})})}registerEditorComponent(y){y.registerEditorComponent({component:l.ImagePreview,uid:u,scheme:o.Schemes.file}),y.registerEditorComponent({component:l.VideoPreview,uid:h,scheme:o.Schemes.file}),y.registerEditorComponent({component:_.BinaryEditorComponent,uid:d,scheme:o.Schemes.file}),y.registerEditorComponent({component:g.LargeFilePrevent,uid:E,scheme:o.Schemes.file}),y.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,(A,S)=>{S.length===0&&S.push({type:p.EditorOpenType.component,componentId:d})}),y.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,async(A,S)=>{const w=await this.getFileType(A.uri.toString());switch(w){case"image":{S.push({type:p.EditorOpenType.component,componentId:u});break}case"video":{S.push({type:p.EditorOpenType.component,componentId:h});break}case"binary":case"text":{const{metadata:T,uri:D}=A,I=T||{};if(w==="binary"&&!I.skipPreventBinary)break;const O=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const M=this.preference.getValid("editor.largeFile",4*1024*1024*1024);O&&(O.size||0)>M&&!I.skipPreventTooLarge?S.push({type:p.EditorOpenType.component,componentId:E}):S.push({type:p.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),y.registerEditorComponentResolver(o.Schemes.untitled,(A,S,w)=>{w([{type:p.EditorOpenType.code,priority:"default"}])})}async getFileType(y){return this.cachedFileType.has(y)||((0,c.getLanguageIdFromMonaco)(new o.URI(y))?this.cachedFileType.set(y,"text"):this.cachedFileType.set(y,await this.getRealFileType(y))),this.cachedFileType.get(y)}async getRealFileType(y){try{return await this.fileServiceClient.getFileType(y)}catch{return"text"}}};t.FileSystemEditorComponentContribution=a,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=a=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],a)},52568:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(80449),p=e(41352),v=e(17276);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[v.FileSystemEditorResourceContribution,v.FileSystemEditorComponentContribution,{token:c.IFileSchemeDocClient,useClass:p.FileSchemeDocClientService}],this.backServices=[{servicePath:c.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=m,t.FileSchemeModule=m=n.__decorate([(0,r.Injectable)()],m)},88819:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(81878),v=e(54414),m=e(82196),_=n.__importDefault(e(19996)),s=l=>o.default.createElement("div",{className:_.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(_.default.icon,(0,c.getExternalIcon)("warning"))}),o.default.createElement("div",{className:_.default.description},l.description),o.default.createElement("div",{className:_.default["actions-wrapper"]},l.actions.map((h,u)=>o.default.createElement(p.Button,{key:u,onClick:()=>h.onClick(),className:_.default["action-button"]},h.label))));t.PreventComponent=s;const g=()=>{const l=(0,c.useInjectable)(v.WorkbenchEditorService),h=(0,c.useInjectable)(c.IEventBus),u=()=>{const d=l.currentResource;d&&(d.metadata={...d.metadata,skipPreventTooLarge:!0},h.fire(new m.ResourceOpenTypeChangedEvent(d.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,c.localize)("editor.largeFile.prevent"),actions:[{label:(0,c.localize)("editor.file.prevent.stillOpen"),onClick:()=>u()}]})};t.LargeFilePrevent=g},99025:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(40827),p=n.__importDefault(e(19996)),v=_=>{const s=(0,o.useInjectable)(c.StaticResourceService);return{src:r.default.useMemo(()=>s.resolveStaticResource(_.uri).toString(),[_])}};t.VideoPreview=(0,r.memo)(_=>{const{src:s}=v(_.resource);return r.default.createElement("div",{className:p.default.kt_video_preview},r.default.createElement("video",{playsInline:!0,controls:!0,className:p.default.kt_video,src:s}))});const m=_=>{const s=r.default.useRef(),g=r.default.useRef(),{src:l}=v(_.resource);return r.default.useEffect(()=>{const h=new o.Disposable;return s.current&&(s.current.src=l),()=>{h.dispose()}},[_.resource]),r.default.createElement("div",{className:p.default.kt_image_preview},r.default.createElement("div",{ref:g},r.default.createElement("img",{ref:h=>h&&(s.current=h)})))};t.ImagePreview=m},80449:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},47720:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(84660),t)},2156:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),c=e(41869),p=e(43718),v=e(37406),m=e(8170),_=e(41682),s=e(42933),g=e(81952);let l=class{constructor(){this.providers=new Map}registerFileSystemProvider(d){const E=d.scheme;return this.providers.set(E,d),{dispose:()=>{this.providers.delete(E)}}}};t.BrowserFileSystemRegistryImpl=l,t.BrowserFileSystemRegistryImpl=l=n.__decorate([(0,o.Injectable)()],l);let h=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new c.Emitter,this.onFileProviderChangedEmitter=new c.Emitter,this._onFilesChanged=new c.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onFileProviderChanged=new c.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new c.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new c.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new c.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new c.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new c.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(d=>{d.added&&d.scheme===p.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const d=await this.getProvider(p.Schemes.file);d.initialize&&await d.initialize(this.clientId,this.appConfig.recursiveWatcherBackend)}async doGetCurrentUserHome(){const E=(await this.getProvider(p.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(E)}handlesScheme(d){return this.registry.providers.has(d)||this.fsProviders.has(d)}dispose(){return this.toDisposable.dispose()}async resolveContent(d,E){const f=this.convertUri(d),b=await(await this.getProvider(f.scheme)).readFile(f.codeUri),y=b.data||b;return{content:c.BinaryBuffer.wrap(Uint8Array.from(y)).toString(E?.encoding)}}async readFile(d){const E=this.convertUri(d),a=await(await this.getProvider(E.scheme)).readFile(E.codeUri),b=a.data||a;return{content:c.BinaryBuffer.wrap(Uint8Array.from(b))}}async readFileStream(d){const E=this.convertUri(d);return await(await this.getProvider(E.scheme)).readFileStream(E.codeUri)}async getFileStat(d,E=!0){const f=this.convertUri(d),a=await this.getProvider(f.scheme);try{const b=await a.stat(f.codeUri);if(!b)throw s.FileSystemError.FileNotFound(f.codeUri.toString(),"File not found.");return this.filterStat(b,E)}catch(b){if(s.FileSystemError.FileNotFound.is(b))return}}async setContent(d,E,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!await this.isInSync(d,y))throw this.createOutOfSyncError(d);return await b.writeFile(a.codeUri,typeof E=="string"?c.BinaryBuffer.fromString(E).buffer:E,{create:!1,overwrite:!0,encoding:f?.encoding}),await b.stat(a.codeUri)}async updateContent(d,E,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!this.checkInSync(d,y))throw this.createOutOfSyncError(d);if(E.length===0)return y;const A=await b.readFile(a.codeUri),S=this.applyContentChanges(c.BinaryBuffer.wrap(A).toString(f?.encoding),E);await b.writeFile(a.codeUri,c.BinaryBuffer.fromString(S).buffer,{create:!1,overwrite:!0,encoding:f?.encoding});const w=await b.stat(a.codeUri);if(!w)throw s.FileSystemError.FileNotFound(a.codeUri.toString(),"File not found.");return w}async createFile(d,E){const f=this.convertUri(d),a=await this.getProvider(f.scheme),b=c.BinaryBuffer.fromString(E?.content||"").buffer;let y=await a.writeFile(f.codeUri,b,{create:!0,overwrite:E&&E.overwrite||!1,encoding:E?.encoding});return y=y||await a.stat(f.codeUri),y}async createFolder(d){const E=this.convertUri(d),f=await this.getProvider(E.scheme),a=await f.createDirectory(E.codeUri);return a||await f.stat(E.codeUri)}async move(d,E,f){const a=this.convertUri(d),b=this.convertUri(E),y=await this.getProvider(a.scheme),A=await y.rename(a.codeUri,b.codeUri,{overwrite:!!(f&&f.overwrite)});return A||await y.stat(b.codeUri)}async copy(d,E,f){const a=this.convertUri(d),b=this.convertUri(E),y=await this.getProvider(a.scheme),A=await this.doGetOverwrite(f);if(!(0,s.containsExtraFileMethod)(y,"copy"))throw this.getErrorProvideNotSupport(a.scheme,"copy");const S=await y.copy(a.codeUri,b.codeUri,{overwrite:!!A});return S||await y.stat(b.codeUri)}async getFsPath(d){if(d.startsWith("file:/"))return c.FileUri.fsPath(d)}fireFilesChange(d){const E=d.changes.map(f=>({uri:f.uri,type:f.type}));this._onFilesChanged.fire(E),this.eventBus.fire(new c.FilesChangeEvent(E))}async watchFileChanges(d,E){const a=(this.appConfig.pollingWatcherDirectories||[]).some(I=>d.path.toString().startsWith(I)),b=this.convertUri(d.toString()),y=this.uriWatcherMap.get(b.toString());if(y)if(y.isDisposed())this.uriWatcherMap.delete(b.toString());else return y;const A=this.watcherId++,S=await this.getProvider(b.scheme),w=this.watcherWithSchemaMap.get(b.scheme)||[],T=await S.watch(b.codeUri,{excludes:E,pollingWatch:a});this.watcherDisposerMap.set(A,{dispose:async()=>{const I=this.uriWatcherMap.get(b.toString());await Promise.all([S.unwatch&&S.unwatch(T),I&&I.dispose()]),this.uriWatcherMap.delete(b.toString())}}),w.push(A),this.watcherWithSchemaMap.set(b.scheme,w);const D=new g.FileSystemWatcher({fileServiceClient:this,watchId:A,uri:d});return this.uriWatcherMap.set(b.toString(),D),D}async setWatchFileExcludes(d){return await(await this.getProvider(p.Schemes.file)).setWatchFileExcludes(d)}async getWatchFileExcludes(){return await(await this.getProvider(p.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(d,E){this.filesExcludes=d,this.filesExcludesMatcherList=[],E&&this.setWorkspaceRoots(E),this.updateExcludeMatcher()}async setWorkspaceRoots(d){this.workspaceRoots=d,this.updateExcludeMatcher()}async unwatchFileChanges(d){const E=this.watcherDisposerMap.get(d);if(!(!E||!E.dispose))return this.watcherDisposerMap.delete(d),E.dispose()}async delete(d,E){if(this.appConfig.isElectronRenderer&&E?.moveToTrash!==!1){const b=new c.URI(d);if(b.scheme===p.Schemes.file)return this.injector.get(v.IElectronMainUIService).moveToTrash(b.codeUri.fsPath)}const f=this.convertUri(d),a=await this.getProvider(f.scheme);await a.stat(f.codeUri),await a.delete(f.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(E)})}async getEncoding(d){return"utf8"}listCapabilities(){return _.Iterable.map(this.fsProviders,([d,E])=>({scheme:d,capabilities:E.capabilities}))}registerProvider(d,E){if(this.fsProviders.has(d))throw new Error(`The file system provider for \`${d}\` already registered`);const f=[];this.fsProviders.set(d,E),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:d,provider:E}),f.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:d,provider:E}),this.fsProviders.delete(d),this._providerChanged.add(d)}}),E.onDidChangeFile&&f.push(E.onDidChangeFile(b=>this.fireFilesChange({changes:b}))),this.toDisposable.push(E.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:E,scheme:d}))),f.push({dispose:async()=>{const b=[];(this.watcherWithSchemaMap.get(d)||[]).forEach(y=>b.push(this.unwatchFileChanges(y))),await Promise.all(b)}}),this._providerChanged.add(d),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(f);const a=new c.DisposableCollection;return a.pushAll(f),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),a}async access(d,E=s.FileAccess.Constants.F_OK){const f=this.convertUri(d),a=await this.getProvider(f.scheme);if(!(0,s.containsExtraFileMethod)(a,"access"))throw this.getErrorProvideNotSupport(f.scheme,"access");return await a.access(f.codeUri,E)}async getFileType(d){const E=this.convertUri(d),f=await this.getProvider(E.scheme);if(!(0,s.containsExtraFileMethod)(f,"getFileType"))throw this.getErrorProvideNotSupport(E.scheme,"getFileType");return await f.getFileType(d)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(d,E){return`Scheme ${d} not support this function: ${E}.`}convertUri(d){const E=new c.URI(d);if(!E.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${d}`);return E}updateExcludeMatcher(){this.filesExcludes.forEach(d=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(E=>{const a=new c.URI(E).resolve(d).path.toString();this.filesExcludesMatcherList.push((0,c.parseGlob)(a))}):this.filesExcludesMatcherList.push((0,c.parseGlob)(d))})}async shouldWaitProvider(d){const E=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:d}),{result:f}=E[0];if(f&&f.includes(d)){const a=await c.Event.toPromise(c.Event.filter(this.onFileProviderChanged,b=>b.includes(d)));if(!(0,p.isUndefined)(a))return!0}return!1}async getProvider(d){this._providerChanged.has(d)&&(await this.eventBus.fireAndAwait(new c.ExtensionActivateEvent({topic:"onFileSystem",data:d}),{timeout:3e3}),this._providerChanged.delete(d));const E=this.fsProviders.get(d);if(!E)throw new Error(`Not find ${d} provider.`);return E}async isReadonly(d){try{const E=new c.URI(d);return!!(await(await this.getProvider(E.scheme)).stat(this.convertUri(d).codeUri)).readonly}catch{return!1}}isExclude(d){const E=new c.URI(d);return this.filesExcludesMatcherList.some(f=>f(E.path.toString()))}filterStat(d,E=!0){if(d&&!this.isExclude(d.uri))return d.children&&E&&(d.children=this.filterStatChildren(d.children)),d}filterStatChildren(d){const E=[];return d.forEach(f=>{if(this.isExclude(f.uri))return!1;const a=this.filterStat(f);a&&E.push(a)}),E}applyContentChanges(d,E){let f=r.TextDocument.create("","",1,d);for(const a of E){let b=a.text;if(a.range){const y=f.offsetAt(a.range.start),A=f.offsetAt(a.range.end);b=f.getText().substr(0,y)+a.text+f.getText().substr(A)}f=r.TextDocument.create(f.uri,f.languageId,f.version,b)}return f.getText()}async isInSync(d,E){return!!this.checkInSync(d,E)}checkInSync(d,E){return E.lastModification===d.lastModification&&E.size===d.size}createOutOfSyncError(d){return s.FileSystemError.FileIsOutOfSync(d.uri)}async doGetEncoding(d){return d&&typeof d.encoding<"u"?d.encoding:this.options.encoding}async doGetOverwrite(d){return d&&typeof d.overwrite<"u"?d.overwrite:this.options.overwrite}async doGetRecursive(d){return d&&typeof d.recursive<"u"?d.recursive:this.options.recursive}async doGetMoveToTrash(d){return d&&typeof d.moveToTrash<"u"?d.moveToTrash:this.options.moveToTrash}};t.FileServiceClient=h,n.__decorate([(0,o.Autowired)(s.IBrowserFileSystemRegistry),n.__metadata("design:type",l)],h.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(p.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(m.IApplicationService),n.__metadata("design:type",Object)],h.prototype,"applicationService",void 0),t.FileServiceClient=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},69037:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(42933),p=e(2156);let v=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const _=this.contributionProvider.getContributions();await Promise.all(_.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(_.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}dispose(){this._disposables.dispose()}};t.FileServiceContribution=v,n.__decorate([(0,r.Autowired)(c.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],v.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(c.IDiskFileProvider),n.__metadata("design:type",Object)],v.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],v.prototype,"contributionProvider",void 0),t.FileServiceContribution=v=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],v)},60476:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(42933);class p{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event}watch(_,s){return this.fileServiceProvider.watch(_,s)}unwatch(_){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(_)}async stat(_){return await this.fileServiceProvider.stat(_)}readDirectory(_){return this.fileServiceProvider.readDirectory(_)}createDirectory(_){return this.fileServiceProvider.createDirectory(_)}async readFile(_,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(_)}readFileStream(_){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(_);throw new Error("readFileStream not supported")}writeFile(_,s,g){return this.fileServiceProvider.writeFile(_,Array.from(s),g)}delete(_,s){return this.fileServiceProvider.delete(_,s)}rename(_,s,g){return this.fileServiceProvider.rename(_,s,g)}}t.CoreFileServiceProviderClient=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0);let v=class extends p{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(_,s){var g,l;if(!((g=this.fileServiceProvider)===null||g===void 0)&&g.initialize)try{await((l=this.fileServiceProvider)===null||l===void 0?void 0:l.initialize(_,s))}catch(h){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",h)}}setWatchFileExcludes(_){return this.fileServiceProvider.setWatchFileExcludes(_)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(_){const s=_.changes.map(g=>({uri:g.uri,type:g.type}));this.onDidChangeFileEmitter.fire(s)}copy(_,s,g){return this.fileServiceProvider.copy(_,s,g)}access(_,s){return this.fileServiceProvider.access(_,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(_){return this.fileServiceProvider.getFileType(_)}};t.DiskFsProviderClient=v,n.__decorate([(0,r.Autowired)(c.DiskFileServicePath),n.__metadata("design:type",Object)],v.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],v.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=v=n.__decorate([(0,r.Injectable)()],v)},96708:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(42933),p=e(70671),v=e(2156),m=e(69037),_=e(60476),s=e(23188);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IFileServiceClient,useClass:v.FileServiceClient},{token:c.IBrowserFileSystemRegistry,useClass:v.BrowserFileSystemRegistryImpl},{token:c.IDiskFileProvider,useClass:_.DiskFsProviderClient},{token:c.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},m.FileServiceContribution],this.backServices=[{servicePath:c.DiskFileServicePath,clientToken:c.IDiskFileProvider,protocol:p.DiskFileServiceProtocol}]}};t.FileServiceClientModule=g,t.FileServiceClientModule=g=n.__decorate([(0,r.Injectable)()],g)},23188:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let c=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(v){throw new Error("Method not implemented.")}readFileStream(v){throw new Error("Method not implemented.")}watch(v,m){throw new Error("Method not implemented.")}stat(v){return Promise.resolve({uri:v.toString(),lastModification:0})}readDirectory(v){throw new Error("Method not implemented.")}createDirectory(v){throw new Error("Method not implemented.")}readFile(v){return this.shadowFiles.get(v.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(v,m,_){this.shadowFiles.set(v.toString(),m)}delete(v,m){throw new Error("Method not implemented.")}rename(v,m,_){throw new Error("Method not implemented.")}copy(v,m,_){throw new Error("Method not implemented.")}exists(v){throw new Error("Method not implemented.")}access(v,m){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=c,t.ShadowFileSystemProvider=c=n.__decorate([(0,r.Injectable)()],c)},81952:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(c,p){return c.filter(v=>!!v.uri.startsWith(p))}class o{constructor(p){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=p.fileServiceClient,this.watchId=p.watchId,this.uri=p.uri,this.fileServiceClient.onFilesChanged(v=>{const m=r(v,this.uri.toString());m&&m.length>0&&this.changeEmitter.fire(m)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=_,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=l,t.notEmpty=h,t.isErrnoException=u,t.handleError=d;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var c;(function(E){let f;(function(a){a.F_OK=0,a.R_OK=4,a.W_OK=2,a.X_OK=1})(f=E.Constants||(E.Constants={}))})(c||(t.FileAccess=c={}));var p;(function(E){E.FileExists="EntryExists",E.FileNotFound="EntryNotFound",E.FileNotADirectory="EntryNotADirectory",E.FileIsADirectory="EntryIsADirectory",E.FileIsOutOfSync="FileIsOutOfSync",E.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",E.FileTooLarge="EntryTooLarge",E.FileWriteLocked="EntryWriteLocked",E.NoPermissions="NoPermissions",E.Unavailable="Unavailable",E.Unknown="Unknown"})(p||(t.FileSystemProviderErrorCode=p={}));class v extends Error{static declare(f,a){return Object.assign((...b)=>_(a(...b),f),{is:b=>{var y;return(y=b.stack)===null||y===void 0?void 0:y.startsWith(f)}})}constructor(f,a){super(f),this.code=a}is(f){return this.name===f.name}}t.FileSystemProviderError=v;class m extends Error{constructor(f,a,b){super(f),this.fileOperationResult=a,this.options=b}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=m;function _(E,f){const a=new v(E.toString(),f);return s(a,f),a}function s(E,f){return E.name=f?`${f} (FileSystemError)`:"FileSystemError",E}var g;(function(E){E.FileNotFound=v.declare(p.FileNotFound,(f,a)=>`${a?a+" ":""} '${f}' is not found.`),E.FileExists=v.declare(p.FileExists,(f,a)=>`${a?a+" ":""}'${f}' already exists.`),E.FileNotADirectory=v.declare(p.FileNotADirectory,(f,a)=>`${a?a+" ":""}'${f}' is not a directory.`),E.FileIsADirectory=v.declare(p.FileIsADirectory,(f,a)=>`${a?a+" ":""}'${f}' is a directory.`),E.FileIsOutOfSync=v.declare(p.FileIsOutOfSync,(f,a)=>`${a?a+" ":""}'${f}' is out of sync.`),E.FileExceedsMemoryLimit=v.declare(p.FileExceedsMemoryLimit,(f,a)=>`${a?a+" ":""}'${f}' is exceeds memory limit.`),E.FileTooLarge=v.declare(p.FileTooLarge,(f,a)=>`${a?a+" ":""}'${f}' is too large.`),E.FileWriteLocked=v.declare(p.FileWriteLocked,(f,a)=>`${a?a+" ":""}'${f}' is locked.`),E.FileIsNoPermissions=v.declare(p.NoPermissions,(f,a)=>`${a?a+" ":""}'${f}' is no permissions.`),E.Unavailable=v.declare(p.Unavailable,(f,a)=>`${a?a+" ":""}'${f}' is unavailable.`),E.Unknown=v.declare(p.Unknown,(f,a)=>`${a?a+" ":""}'${f}' is unkonw.`)})(g||(t.FileSystemError=g={}));function l(E,f){return(0,r.hasProperty)(E,f)&&(0,r.isFunction)(E[f])}function h(E){return E!==void 0}function u(E){return E.code!==void 0&&E.errno!==void 0}function d(E){var f,a,b,y,A;if(u(E))switch(E.code){case"EEXIST":throw g.FileExists(r.Uri.file((f=E.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw g.FileIsNoPermissions(r.Uri.file((a=E.path)!==null&&a!==void 0?a:""));case"ENOENT":throw g.FileNotFound(r.Uri.file((b=E.path)!==null&&b!==void 0?b:""));case"ENOTDIR":throw g.FileNotADirectory(r.Uri.file((y=E.path)!==null&&y!==void 0?y:""));case"EISDIR":throw g.FileIsADirectory(r.Uri.file((A=E.path)!==null&&A!==void 0?A:""))}throw E}},42933:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let c;(function(p){p[p.CREATED=0]="CREATED",p[p.DELETED=1]="DELETED",p[p.MODIFIED=2]="MODIFIED",p[p.RENAMED=3]="RENAMED"})(c=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(26542),m=e(6250),_=e(2812),s=r.__importDefault(e(89200)),g=e(9018);let l=n=class{static createContainer(u,d){return u.createChild([{token:m.IFileDialogTreeService,useValue:d},{token:m.IFileDialogModel,useClass:n}])}static createModel(u,d){return n.createContainer(u,d).get(m.IFileDialogModel)}constructor(){this.selectedDecoration=new c.Decoration(s.default.mod_selected),this.focusedDecoration=new c.Decoration(s.default.mod_focused),this.loadingDecoration=new c.Decoration(s.default.mod_loading),this.cutDecoration=new c.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new p.DisposableCollection,this.onDidFocusedFileChangeEmitter=new p.Emitter,this.onDidSelectedFileChangeEmitter=new p.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(u=>{this.selectedDecoration.removeTarget(u)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles=[u],this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this._selectedFiles=[u],this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(u,d=!1)=>{u!==this.treeModel.root&&(this.focusedFile!==u&&(d?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=u):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),u&&(this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles.push(u),this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=u=>{this._selectedFiles.indexOf(u)>-1||(this._selectedFiles.push(u),this.selectedDecoration.addTarget(u),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(d=>d.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(u,d)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;u<=d;u++){const E=this.treeModel.root.getTreeNodeAtIndex(u);E&&(this._selectedFiles.push(E),this.selectedDecoration.addTarget(E))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async u=>{u.expanded?this.fileTreeHandle.collapseNode(u):this.fileTreeHandle.expandNode(u)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(u,d)=>{if(!this.focusedFile)this.handleItemClick(u,d);else if(this.focusedFile&&this.focusedFile!==u){const E=this.treeModel.root.getIndexAtTreeNode(u),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>E?this.activeFileDecorationByRange(E,f):f<E&&this.activeFileDecorationByRange(f,E)}},this.handleItemToggleClick=(u,d)=>{d!==c.TreeNodeType.CompositeTreeNode&&d!==c.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(u)>-1?this.focusedFile===u?this.enactiveFileDecoration():this.activeFileFocusedDecoration(u):this.activeFileSelectedDecoration(u))},this.handleItemClick=(u,d)=>{this.clickTimes++,(d===c.TreeNodeType.CompositeTreeNode||d===c.TreeNodeType.TreeNode)&&this.activeFileDecoration(u),d===c.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(u),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&d!==c.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(u),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const u=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(_.FileTreeModel,[u]),this.initDecorations(u),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,d=>{this.loadingDecoration.addTarget(d)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,d=>{this.loadingDecoration.removeTarget(d)}))}async updateTreeModel(u){const d=await this.fileTreeDialogService.resolveRoot(u);if(d&&d.length>0){const E=d[0];this._treeModel=this.injector.get(_.FileTreeModel,[E]),this.clearFileSelectedDecoration(),this.initDecorations(E)}}initDecorations(u){this._decorations&&this._decorations.dispose(),this._decorations=new c.DecorationsManager(u),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(u){this._fileTreeHandle=u}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=l,l.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",l.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],l.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.IFileDialogTreeService),r.__metadata("design:type",g.FileTreeDialogService)],l.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(v.LabelService),r.__metadata("design:type",v.LabelService)],l.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(p.CorePreferences),r.__metadata("design:type",Object)],l.prototype,"corePreferences",void 0),t.FileTreeDialogModel=l=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],l)},69748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(97267),p=e(41869),v=e(69959),m=n.__importDefault(e(89200)),_=({item:s,onClick:g,itemType:l,labelService:h,leftPadding:u=8,onTwistierClick:d,decorations:E,defaultLeftPadding:f=8,template:a})=>{const b=l===c.TreeNodeType.RenamePrompt,y=l===c.TreeNodeType.NewPrompt,A=b||y,S=(0,p.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),w=(0,p.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),T=W=>{(l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode)&&g(W,s,l)},D=W=>{(l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode)&&(d?d(W,s,l):g(W,s,l))},I=l===c.TreeNodeType.CompositeTreeNode;let O;A?y?O=`${f+(s.parent.depth+1||0)*(u||0)}px`:O=`${f+(s.target.depth||0)*(u||0)}px`:O=I?`${f+(s.depth||0)*(u||0)}px`:`${f+(s.depth||0)*(u||0)+8}px`;const M={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:O},R=(W,U)=>{if(E&&E?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(c.Loading,null);if(A&&W instanceof c.PromptHandle){let Q=!1;if(b?Q=W.target.type===c.TreeNodeType.CompositeTreeNode:Q=W.type===c.TreeNodeType.CompositeTreeNode,Q)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,S,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:y||!(b&&W.target.type===c.TreeNodeType.CompositeTreeNode&&W.target.expanded)})})}else return o.default.createElement("div",{onClick:U,className:(0,r.default)(m.default.file_tree_node_segment,S,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!W.expanded})})},P=W=>{let U,Q;A&&W instanceof c.PromptHandle?W instanceof c.RenamePromptHandle?(U=W.target.uri.resolve(W.$.value),Q=v.Directory.is(W.target)):(U=W.parent.uri.resolve(W.$.value),Q=W.type===c.TreeNodeType.CompositeTreeNode):(U=W.uri,Q=W.filestat.isDirectory);const V=h.getIcon(U,{isDirectory:Q});return o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,V,{expanded:Q&&W.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=W=>a?o.default.createElement(a,null):A&&W instanceof c.PromptHandle?o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(W.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},W.name),F=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},L()),L=()=>null,B=W=>{if(I)return R(W,D);if(A)return R(W,()=>{})},j=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:T,title:j(),className:(0,r.default)(w,E?E.classlist:null),style:M,draggable:l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},B(s),P(s),o.default.createElement("div",{className:A?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},k(s)),F()))};t.FileTreeDialogNode=_,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(66e3);let p=class{initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.fileDialogViewVisibleContext=c.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=p=n.__decorate([(0,r.Injectable)()],p)},9018:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(41869),p=e(26542),v=e(54414),m=e(14951),_=e(72665),s=e(51500),g=e(6250),l=e(57781),h=e(97738),u=e(68195);let d=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const a=new c.URI(f).withScheme(c.Schemes.file),b=await this.fileTreeAPI.resolveFileStat(a);b&&(this.workspaceRoot=b)}}async resolveChildren(f){if(f){if(f.uri){const{children:a}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return a}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:a}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=a[0],a}return[]}async resolveRoot(f){let a;/^file:\/\//.test(f)&&(a=new c.URI(f)),a=c.URI.file(f);const b=await this.fileTreeAPI.resolveFileStat(a);if(b){const{children:y}=await this.fileTreeAPI.resolveChildren(this,b);return this.root=y[0],y}}getDirectoryList(){const f=[];if(!this.root)return f;let a=new c.URI(this.workspaceRoot.uri);if(a&&a.parent)for(;a.parent;){const b=a.codeUri.fsPath;if(f.indexOf(b)>=0)break;f.push(b),a=a.parent}else f.push(a.codeUri.fsPath.toString());return f}sortComparator(f,a){return f.constructor===a.constructor?f.name.startsWith(".")&&!a.name.startsWith(".")?1:!f.name.startsWith(".")&&a.name.startsWith(".")?-1:f.name.localeCompare(a.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:a.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:a,newFilePath:b}=f;if(!a||!b)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const y=c.URI.file(f.newFilePath),A={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(y,A),await this.fileTreeModelService.clearFileSelectedDecoration();const S=this.fileTreeService.getNodeByPathOrUri(y);S&&await this.fileTreeModelService.activeFileDecoration(S)}catch(y){throw new Error(`Failed to open saveAs file: ${y.message}`)}}async createFile(f){try{const{oldFilePath:a,newFilePath:b}=f;if(!await this.fileServiceClient.getFileStat(a))throw new Error(`Source file not found: ${a}`);const{content:A}=await this.fileServiceClient.readFile(a);await this.fileServiceClient.createFile(b,{content:A.toString(),encoding:"utf8",overwrite:!0})}catch(a){throw new Error(`Failed to create file: ${a.message}`)}}renderCustomMsg(){return null}async getDefaultFilePath(f,a){return a}dispose(){super.dispose()}};t.FileTreeDialogService=d,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],d.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],d.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileDialogContextKey),n.__metadata("design:type",u.FileDialogContextKey)],d.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],d.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(h.FileTreeModelService),n.__metadata("design:type",h.FileTreeModelService)],d.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(g.IFileTreeService),n.__metadata("design:type",l.FileTreeService)],d.prototype,"fileTreeService",void 0),t.FileTreeDialogService=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],d)},51888:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(68974),v=e(72665),m=e(69748),_=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:g,model:l,isOpenDialog:h,fileService:u})=>{const d=(0,c.useInjectable)(v.IDialogService),E=(0,r.useRef)(null),[f,a]=(0,r.useState)(g.defaultFileName||""),[b,y]=(0,r.useState)(!1),[A,S]=(0,r.useState)(""),[w,T]=(0,r.useState)([]),D=(0,r.useRef)(g.defaultFileName||"");(0,r.useEffect)(()=>{var ie;return l&&(y(!1),R(),(ie=u.contextKey.fileDialogViewVisibleContext)===null||ie===void 0||ie.set(!0)),()=>{l.dispose()}},[l]),(0,r.useEffect)(()=>{g.defaultFileName&&(a(g.defaultFileName||""),D.current=g.defaultFileName||"")},[g]),(0,r.useEffect)(()=>{if(b){const ie=l.getDirectoryList();T(ie)}},[b]);const I=(0,r.useCallback)(()=>{const ie=l.selectedFiles.map(oe=>oe.uri.path.toString());if(D.current&&g.showNameInput&&(ie?.length===1||g.defaultUri)){const oe=ie?.length===1?ie[0]:g.defaultUri.path.toString();g?.saveAs&&u.saveAs({oldFilePath:c.path.join(oe,g?.defaultFileName||""),newFilePath:c.path.join(oe,D.current)}),d.hide([c.path.join(oe,D.current)])}else ie.length>0?d.hide(ie):A?d.hide([A]):g.defaultUri?d.hide([g.defaultUri.path.toString()]):l.treeModel&&l.treeModel.root?d.hide([l.treeModel.root.uri.path.toString()]):d.hide([]);y(!1),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d,l,g,A]),O=async ie=>{let oe=ie.treeModel.root.uri.codeUri.fsPath;return u.getDefaultFilePath&&(oe=await u.getDefaultFilePath(ie,oe)),oe},M=(0,r.useCallback)(()=>{y(!1),d.hide(),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d]),R=(0,r.useCallback)(async()=>{await l.whenReady,await l.treeModel.ensureReady;const ie=await O(l);S(ie),y(!0)},[l,A,b]),P=!h,k=(0,r.useCallback)(ie=>{l.handleTreeHandler({...ie,getModel:()=>l.treeModel})},[l]),F=(0,r.useCallback)((ie,oe)=>{ie.stopPropagation();const{toggleDirectory:le}=l;le(oe)},[l]),L=(0,r.useCallback)(ie=>B(ie)?!1:ie.shiftKey,[]),B=(0,r.useCallback)(ie=>{const{metaKey:oe,ctrlKey:le}=ie;return c.isMacintosh&&oe||le},[]),j=(0,r.useCallback)((ie,oe,le)=>{var pe;ie.stopPropagation();const{handleItemClick:q,handleItemToggleClick:Ee,handleItemRangeClick:_e}=l;if(!oe)return;const te=L(event),ge=B(event);if(te&&!P&&g.canSelectMany)_e(oe,le);else if(ge&&!P&&g.canSelectMany)Ee(oe,le);else if(P)le===o.TreeNodeType.CompositeTreeNode&&q(oe,le);else if(g.canSelectFiles&&le===o.TreeNodeType.TreeNode){const Te=new Set(Object.values((pe=g.filters)!==null&&pe!==void 0?pe:{}).flat().map(Pe=>`.${Pe}`));if(Te.size>0){const Pe=c.URI.parse(oe.filestat.uri).path.ext;Te.has(Pe)&&q(oe,le)}else q(oe,le)}else g.canSelectFolders&&le===o.TreeNodeType.CompositeTreeNode&&q(oe,le)},[l,P,g]),W=(0,r.useCallback)(async ie=>{y(!1),S(ie),await l.updateTreeModel(ie),y(!0)},[l,b,A]),U=(0,r.useCallback)(async ie=>{y(!1),S(ie),await l.updateTreeModel(ie),y(!0)},[l,b,A,w]),Q=(0,r.useCallback)(()=>u.renderCustomMsg?u.renderCustomMsg():null,[u.renderCustomMsg]),V=(0,r.useCallback)(ie=>r.default.createElement(m.FileTreeDialogNode,{item:ie.item,itemType:ie.itemType,labelService:l.labelService,decorations:l.decorations.getDecorations(ie.item),onClick:j,onTwistierClick:F,defaultLeftPadding:8,leftPadding:8}),[l.treeModel]),$=(0,r.useCallback)(()=>{if(b){if(l.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:k,model:l.treeModel},V)}else return r.default.createElement(p.Progress,{loading:!0})},[b,l]),Y=(0,r.useMemo)(()=>u.showFilePathSearch!==!1,[u.showFilePathSearch]),z=(0,r.useCallback)(()=>{if(w.length>0)return r.default.createElement(o.Select,{onChange:W,onSearchChange:U,className:_.default.select_control,size:"large",searchPlaceholder:A,value:A,showSearch:Y},w.map((ie,oe)=>r.default.createElement(o.Option,{value:ie,key:`${oe} - ${ie}`},ie)))},[w,A]),H=(0,r.useCallback)(ie=>{const{key:oe}=c.KeyCode.createKeyCode(ie),le=ie.shiftKey||ie.metaKey||ie.altKey||ie.ctrlKey;oe&&c.Key.ENTER.keyCode===oe.keyCode&&!le&&I()},[I]);(0,r.useEffect)(()=>{var ie;return E.current&&(u.initContextKey(E.current),u.contextKey.fileDialogViewVisibleContext.set(!0),(ie=E.current)===null||ie===void 0||ie.addEventListener("keyup",H)),()=>{var oe;(oe=E.current)===null||oe===void 0||oe.removeEventListener("keyup",H)}},[]);const K=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,Q(),r.default.createElement("div",{className:_.default.file_dialog_directory},z()),r.default.createElement("div",{className:_.default.file_dialog_content},$())),[z,$]),Z=(0,r.useMemo)(()=>r.default.createElement("div",{className:_.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:M,type:"ghost",className:_.default.button},(0,c.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:I,type:"primary",className:_.default.button,disabled:P&&g.showNameInput&&f.length===0},h&&g.openLabel||(0,c.localize)("dialog.file.ok"))),[M,I,P,h,f,g]),X=(0,r.useCallback)(ie=>{a(ie.target.value),D.current=ie.target.value},[f]);return r.default.createElement("div",{className:_.default.file_dialog_wrapper,ref:E},r.default.createElement("div",{className:_.default.file_dialog_directory_title},h?g.title||(0,c.localize)("dialog.file.openLabel"):g.saveLabel||(0,c.localize)("dialog.file.saveLabel")),K,!h&&g.showNameInput&&r.default.createElement("div",{className:_.default.file_dialog_file_container},r.default.createElement("span",{className:_.default.file_dialog_file_name},(0,c.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:X})),Z)};t.FileDialog=s},89508:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),c=e(41869),p=e(37406),v=e(14951),m=e(72665),_=e(57942),s=n.__importDefault(e(13294)),g=e(9018),l=e(51888);let h=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(c.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const d=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(d)this._defaultUri=new c.URI(d);else{const E=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new c.URI(E.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(d){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",d.toString()),this._defaultUri=d}async showOpenDialog(d={}){this.dialogService.reset(),await this.whenReady;const E={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(p.IElectronMainUIService),a=[];d.canSelectFiles&&a.push("openFile"),d.canSelectFolders&&a.push("openDirectory"),d.canSelectMany&&a.push("multiSelections"),c.isMacintosh&&a.push("treatPackageAsDirectory","createDirectory");const b=d.defaultUri||this.defaultUri,y=await f.showOpenDialog(c.electronEnv.currentWindowId,{defaultPath:b.codeUri.fsPath,title:d.title,buttonLabel:d.openLabel,properties:a});if(y&&y.length>0){const A=y.map(S=>c.URI.file(S));return this.updateRecentDefaultUri(A[0].parent),A}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let f;d.defaultUri?f=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):f=this.injector.get(g.FileTreeDialogService),await f.whenReady;const a=_.FileTreeDialogModel.createModel(this.injector,f),b=await this.dialogService.open({message:r.default.createElement(l.FileDialog,{key:this.idx++,fileService:f,model:a,options:{...E,...d},isOpenDialog:!0}),type:c.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),b&&b.length>0){const y=b.map(A=>c.URI.file(A));return this.updateRecentDefaultUri(y[0].parent),y}else return}}async showSaveDialog(d={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const E=d.defaultUri||this.defaultUri,a=await this.injector.get(p.IElectronMainUIService).showSaveDialog(c.electronEnv.currentWindowId,{defaultPath:E.resolve(d.defaultFileName||"").codeUri.fsPath,title:d.saveLabel,message:d.saveLabel});if(a){const b=c.URI.file(a);return this.updateRecentDefaultUri(b.parent),b}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let E;d.defaultUri?E=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):E=this.injector.get(g.FileTreeDialogService),await E.whenReady;const f=_.FileTreeDialogModel.createModel(this.injector,E),a=await this.dialogService.open({message:r.default.createElement(l.FileDialog,{key:this.idx++,fileService:E,model:f,options:d,isOpenDialog:!1}),type:c.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),a&&a.length>0){const b=c.URI.file(a[0]);return this.updateRecentDefaultUri(b.parent),b}else return}}};t.WindowDialogServiceImpl=h,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(c.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},88014:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(16413);let p=class{constructor(){this.explorerResourceIsFolder=c.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=c.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.explorerFocused=c.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=c.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=c.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=c.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=c.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=c.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=c.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=c.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.FileContextKey=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},40439:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(16413),p=e(93899),v=e(68969),m=e(98295),_=e(41893),s=e(54414),g=e(32595),l=e(63067),h=e(58296),u=e(72665),d=e(55121),E=e(51500),f=e(6250),a=e(69959),b=e(56384),y=e(57781),A=e(97738),S=e(4446);let w=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(g.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(f.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:h.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:f.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:b.FileTree},g.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);D&&D.updateViewTitle(f.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const D=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(D)}onDidRender(){this.isRendered=!0;const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);D&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(D.isActivated())}),D.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),D.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let D=(0,o.localize)("file.empty.defaultTitle");const I=this.workspaceService.workspace;return I&&(D=new o.URI(I.uri).displayName,!I.isDirectory&&D.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(D=D.slice(0,D.lastIndexOf(".")),D===E.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):D}onReconnect(){this.fileTreeService.reWatch()}revealFile(D){if(D)if(this.isRendered){const I=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!I||!I.isVisible||I.isCollapsed(f.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(D):this.fileTreeModelService.location(D)}else this.fileTreeModelService.locationOnShow(D)}registerMenus(D){D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(D){const I=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};D.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:M=>{let R=M;if(!R)return;const P=this.fileTreeService.getNodeByPathOrUri(R);P&&!P.filestat.isDirectory&&(R=P.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,R)}}),D.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async M=>{var R;let P=M;if(P||(this.fileTreeModelService.focusedFile?P=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(P=(R=this.fileTreeModelService.selectedFiles[0])===null||R===void 0?void 0:R.uri)),!P)return;let k;if(this.fileTreeService.isMultipleWorkspace)for(const F of await this.workspaceService.roots){const L=new o.URI(F.uri);if(L.isEqualOrParent(P)){k=`./${L.relative(P).toString()}`;break}}else if(this.workspaceService.workspace){const F=new o.URI(this.workspaceService.workspace.uri);F.isEqualOrParent(P)&&(k=`./${F.relative(P).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:k+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:M=>{M?this.revealFile(M):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),D.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var M,R,P;((R=(M=this.workbenchEditorService.currentEditor)===null||M===void 0?void 0:M.currentUri)===null||R===void 0?void 0:R.scheme)===o.Schemes.file&&this.revealFile((P=this.workbenchEditorService.currentEditor)===null||P===void 0?void 0:P.currentUri)}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!M||!M.isVisible||this.fileTreeModelService.collapseAll()}}),D.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!M||!M.isVisible||await this.fileTreeService.refresh()}}),D.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(M,R)=>{if(I(),R?this.willDeleteUris=this.willDeleteUris.concat(R):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(P=>P.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:M=>{if(I(),!M)if(this.fileTreeModelService.contextMenuFile)M=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)M=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async M=>{var R;if(I(),M)this.fileTreeModelService.newFilePrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let P;this.fileTreeService.isMultipleWorkspace?P=new o.URI((await this.workspaceService.roots)[0].uri):P=new o.URI((R=this.workspaceService.workspace)===null||R===void 0?void 0:R.uri),this.fileTreeModelService.newFilePrompt(P)}}}),D.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async M=>{var R;if(I(),M)this.fileTreeModelService.newDirectoryPrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let P;this.fileTreeService.isMultipleWorkspace?P=new o.URI((await this.workspaceService.roots)[0].uri):P=new o.URI((R=this.workspaceService.workspace)===null||R===void 0?void 0:R.uri),this.fileTreeModelService.newDirectoryPrompt(P)}}}),D.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(M,R)=>{if(R&&R.length){const P=this.workbenchEditorService.currentEditor;P&&P.currentUri&&this.fileTreeService.compare(R[0],P.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:M=>{this.fileTreeService.openAndFixedFile(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:M=>{this.fileTreeService.openToTheSide(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)});const O=(M,R)=>{const{availableOpenTypes:P,currentOpenType:k}=this.workbenchEditorService.currentEditorGroup;if(!(P&&M&&k))return{items:[],selectIndex:-1};const F=this.preferenceService.get("workbench.editorAssociations"),L=[],B=(Q,V)=>V.type===s.EditorOpenType.code?Q.type===s.EditorOpenType.code:V.type===s.EditorOpenType.component&&Q.type===s.EditorOpenType.component?Q.componentId===V.componentId:!1,j=(Q,V)=>(Q?Q+=(0,o.localize)("file.open.type.detail.and")+V:Q=V,Q);let W,U;if(F){const Q=Object.keys(F).find(V=>(0,o.match)(V,M.path.toString().toLowerCase())||(0,o.match)(V,M.path.base.toLowerCase()));W=Q&&F[Q]}return P.forEach((Q,V)=>{var $;const Y={label:Q.title||Q.componentId||Q.type,detail:Q.title,run:z=>R(z,Q)};B(k,Q)&&(Y.description=j(Y.description,(0,o.localize)("file.open.type.detail.active")),U=V),W&&(!(($=Q.componentId)===null||$===void 0)&&$.endsWith(W))&&(Y.description=j(Y.description,(0,o.localize)("file.open.type.detail.default"))),L.push(new o.QuickOpenItem(Y))}),{items:L,selectIndex:U}};D.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:M=>{const R=(L,B)=>{var j,W;return L===o.Mode.OPEN?((j=this.workbenchEditorService.currentEditorGroup)===null||j===void 0||j.changeOpenType((W=B.componentId)!==null&&W!==void 0?W:B.type),!0):!1},{items:P,selectIndex:k}=O(M,R);if(P.length===0||typeof k>"u")return;const F=L=>{this.quickOpenService.open({onType:(B,j)=>j(L)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",M.path.base),selectIndex:()=>k})};P.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${M.path.ext}`),showBorder:!0,run:L=>{if(L===o.Mode.OPEN){const B=(U,Q)=>{var V,$,Y;if(U===o.Mode.OPEN){const z="workbench.editorAssociations",H=this.preferenceService.resolve(z).scope,K=this.preferenceService.get(z);return this.preferenceService.set(z,{...K||{},[`*${M.path.ext}`]:(V=Q.componentId)!==null&&V!==void 0?V:Q.type},H),($=this.workbenchEditorService.currentEditorGroup)===null||$===void 0||$.changeOpenType((Y=Q.componentId)!==null&&Y!==void 0?Y:Q.type),!0}return!1},{items:j,selectIndex:W}=O(M,B);if(j.length===0||typeof W>"u")return!0;F(j)}return!1}})),F(P)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async M=>{if(!M)return;let P=M.path.toString();if(M.scheme===s.DIFF_SCHEME){const F=M.getParsedQuery();P=new o.URI(F.modified).path.toString()}let k=decodeURIComponent(P);await this.appService.backendOS===o.OperatingSystem.Windows&&(k=k.slice(1)),await this.clipboardService.writeText(k)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async M=>{if(!M)return;if(M.scheme===s.DIFF_SCHEME){const k=M.getParsedQuery();M=new o.URI(k.modified).withScheme("file")}const R=this.fileTreeService.getNodeByPathOrUri(M);if(R&&R.filestat.isInSymbolicDirectory)return await this.clipboardService.writeText(R.path.split(d.Path.separator).slice(2).join(d.Path.separator));let P;if(this.fileTreeService.isMultipleWorkspace)for(const k of await this.workspaceService.roots){if(P=new o.URI(k.uri),P.isEqual(M))return await this.clipboardService.writeText("./");if(P.isEqualOrParent(M))return await this.clipboardService.writeText(decodeURIComponent(P.relative(M).toString()))}else if(this.workspaceService.workspace)return P=new o.URI(this.workspaceService.workspace.uri),P.isEqual(M)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(P.relative(M).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.copyFile(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.copyFile(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.selectChildNode(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.selectChildNode(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.cutFile(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.cutFile(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:M=>{if(I(),M)this.fileTreeModelService.pasteFile(M);else if(this.fileTreeModelService.focusedFile){let R;this.fileTreeModelService.activeUri?R=this.fileTreeModelService.activeUri:R=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(R)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==f.PasteTypes.NONE||this.appConfig.isElectronRenderer}),D.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(M,R)=>{const P=this.injector.get(o.IWindowService),k={newWindow:!0};return typeof R=="boolean"?k.newWindow=R:k.newWindow=typeof R?.forceNewWindow=="boolean"?R.forceNewWindow:!0,M?P.openWorkspace(M,k):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,k)},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:M=>{const R=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(k=>{k&&k.length>0&&R.openWorkspace(o.URI.file(k[0]),M||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(k=>{var F;k&&k.length>0&&this.injector.get(E.IWorkspaceService).open(k[0],{preserveWindow:(F=M?.newWindow)!==null&&F!==void 0?F:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:M=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const P=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(F=>{F&&F.length>0&&P.openWorkspace(o.URI.file(F[0]),M||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(F=>{var L;F&&F.length>0&&this.injector.get(E.IWorkspaceService).open(F[0],{preserveWindow:(L=M?.newWindow)!==null&&L!==void 0?L:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenWorkspace");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:M=>{var R;let P=M instanceof o.URI?M:M?.uri;const k=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);k&&!k.isVisible&&(k.activate(),setTimeout(()=>{k.setCollapsed(f.RESOURCE_VIEW_ID,!1)},200)),!P&&(!((R=this.workbenchEditorService.currentEditor)===null||R===void 0)&&R.currentUri)&&(P=this.workbenchEditorService.currentEditor.currentUri),P&&this.revealFile(o.URI.parse(P.toString()))}}),D.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);M&&M.activate()}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:M=>this.windowDialogService.showOpenDialog(M)}),D.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:M=>this.windowDialogService.showSaveDialog(M)}),D.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),D.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),D.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),D.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(M,R)=>{if(I(),!R.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const P=await this.workspaceService.roots,k=R.filter(F=>P.find(L=>L.uri===F.toString()));k.length>0&&await this.workspaceService.removeRoots(k)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(M=>{var R;return M.uri===((R=this.fileTreeModelService.contextMenuFile)===null||R===void 0?void 0:R.uri.toString())})})}registerKeybindings(D){D.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${c.FilesExplorerFocusedContext.raw} && ${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(D){D.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${c.FilesExplorerFilteredContext.raw}`,order:0}),D.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:1}),D.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:2}),D.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:f.RESOURCE_VIEW_ID,toggledWhen:`${c.FilesExplorerFilteredContext.raw}`,order:3}),D.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:4}),D.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:f.RESOURCE_VIEW_ID,order:5}),D.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:f.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const D=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(D)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=w,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],w.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(f.IFileTreeService),n.__metadata("design:type",y.FileTreeService)],w.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(l.IMainLayoutService),n.__metadata("design:type",Object)],w.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(v.IProgressService),n.__metadata("design:type",Object)],w.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],w.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(A.FileTreeModelService),n.__metadata("design:type",A.FileTreeModelService)],w.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(_.IDecorationsService),n.__metadata("design:type",_.IDecorationsService)],w.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],w.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],w.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.IWindowDialogService),n.__metadata("design:type",Object)],w.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],w.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(l.IViewsRegistry),n.__metadata("design:type",Object)],w.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],w.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],w.prototype,"appConfig",void 0),t.FileTreeContribution=w=n.__decorate([(0,m.Domain)(p.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,l.MainLayoutContribution)],w)},2812:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(69959),m=e(93239);let _=n=class extends c.TreeModel{constructor(g){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(g)}init(g){this.root=g,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()})}};t.FileTreeModel=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(m.FileTreeDecorationService),r.__metadata("design:type",m.FileTreeDecorationService)],_.prototype,"decorationService",void 0),t.FileTreeModel=_=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.Directory])],_)},46377:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(97267),p=e(41869),v=e(69959),m=n.__importDefault(e(89200)),{Path:_}=p.path,s=({item:g,onClick:l,onDoubleClick:h,onContextMenu:u,dndService:d,itemType:E,decorationService:f,labelService:a,leftPadding:b=8,onTwistierClick:y,decorations:A,defaultLeftPadding:S=8,template:w,hasFolderIcons:T,hasFileIcons:D,hidesExplorerArrows:I,hasPrompt:O,iconService:M})=>{const[R,P]=o.default.useState(-1),k=E===c.TreeNodeType.RenamePrompt,F=E===c.TreeNodeType.NewPrompt,L=k||F,B=!L&&g.name.indexOf(_.separator)>=0,j=(0,p.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),W=(0,p.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),U=L?null:f.getDecoration(g.uri,v.Directory.is(g)),Q=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(B&&P(g.name.split(_.separator).length-1),l(Pe,g,E))},V=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(B&&P(g.name.split(_.separator).length-1),h(Pe,g,E))},$=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(y?y(Pe,g,E):l(Pe,g,E))},Y=o.default.useCallback(Pe=>{Pe.nativeEvent.which!==0&&(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&u(Pe,g,E)},[u,g]),z=o.default.useCallback(Pe=>{const{handleDragStart:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),H=o.default.useCallback(Pe=>{const{handleDragLeave:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),K=o.default.useCallback(Pe=>{const{handleDragEnter:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),Z=o.default.useCallback(Pe=>{const{handleDrop:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),X=o.default.useCallback(Pe=>{const{handleDragOver:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]);let ie=E===c.TreeNodeType.CompositeTreeNode,oe;L?F?(ie=g.type===c.TreeNodeType.CompositeTreeNode,oe=`${S+(g.parent.depth+1||0)*(b||0)+(ie?0:T?I?0:20:0)}px`):(ie=g.target.type===c.TreeNodeType.CompositeTreeNode,oe=`${S+(g.target.depth||0)*(b||0)+(ie?0:T?I?0:20:0)}px`):oe=`${S+(g.depth||0)*(b||0)+(ie?0:T?I?0:20:0)}px`;const le={color:U?U.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:oe,opacity:O&&!L?".6":"1"},pe=(Pe,Ae)=>{if(A&&A?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(c.Loading,null);if(L&&Pe instanceof c.PromptHandle){let we=!1;if(k?we=Pe.target.type===c.TreeNodeType.CompositeTreeNode:we=Pe.type===c.TreeNodeType.CompositeTreeNode,we)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,j,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:F||!(k&&Pe.target.type===c.TreeNodeType.CompositeTreeNode&&Pe.target.expanded)})})}else return o.default.createElement("div",{onClick:Ae,className:(0,r.default)(m.default.file_tree_node_segment,j,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!Pe.expanded})})},q=Pe=>{let Ae,we;L&&Pe instanceof c.PromptHandle?Pe instanceof c.RenamePromptHandle?(Ae=Pe.target.uri.resolve(Pe.$.value),we=v.Directory.is(Pe.target)):(Ae=Pe.parent.uri.resolve(Pe.$.value),we=Pe.type===c.TreeNodeType.CompositeTreeNode):(Ae=Pe.uri,we=Pe.filestat.isDirectory);const be=a.getIcon(Ae,{isDirectory:we,isOpenedDirectory:we&&Pe.expanded});return we&&!T||!we&&!D?null:o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,be,{expanded:we&&Pe.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},Ee=Pe=>{if(w)return o.default.createElement(w,null);if(L&&Pe instanceof c.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(Pe.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(B){const Ae=Pe.displayName.split(_.separator),we=Ae.map((be,fe)=>{const xe=Ae.slice(0,fe+1).join(_.separator),Re=Fe=>{Fe.stopPropagation(),P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));l(Fe,g,E,Ge)},Be=Fe=>{Fe.stopPropagation(),P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));u(Fe,g,E,Ge)},me=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),R!==fe&&(P(fe),d.handleDragOver(Fe,g))},re=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),P(-1)},he=Fe=>{Fe.stopPropagation(),R!==fe&&P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));d.handleDragStart(Fe,g,Ge)},Oe=Fe=>{const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));d.handleDrop(Fe,g,Ge)},Se=(0,r.default)(R===fe&&m.default.active,m.default.compact_name);return o.default.createElement("span",{key:xe},o.default.createElement("a",{className:Se,draggable:!0,onContextMenu:Be,onDragStart:he,onDragOver:me,onDragLeave:re,onDrop:Oe,onClick:Re},be),fe!==Ae.length-1?o.default.createElement("span",{className:m.default.compact_name_separator},_.separator):null)});return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},we)}return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},a.getName(Pe.uri)||Pe.displayName)},_e=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},te()),te=()=>U?o.default.createElement("div",{className:m.default.file_tree_node_status},(0,p.transformLabelWithCodicon)(U.badge.slice(),{color:"inherit"},M.fromString.bind(M))):null,ge=Pe=>{if(I)return null;if(ie)return pe(Pe,$);if(L)return pe(Pe,()=>{})},Te=()=>{let Pe=g.tooltip;return U&&U.badge&&(Pe+=` \u2022 ${U.tooltip}`),Pe};return o.default.createElement("div",{key:g.id,onClick:Q,onDoubleClick:V,onContextMenu:Y,onDragStart:z,onDragOver:X,onDragEnter:K,onDragLeave:H,onDrop:Z,title:Te(),className:(0,r.default)(W,A?A.classlist:null),style:le,draggable:E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode,"data-id":g.id},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},ge(g),q(g),o.default.createElement("div",{className:L?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},Ee(g)),_e()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(68974),m=e(24429),_=e(87420),s=e(6250),g=e(46377),l=n.__importDefault(e(2613)),h=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const u=(0,c.RecycleTreeFilterDecorator)(c.RecycleTree),d=({viewState:f})=>{const[a,b]=(0,o.useState)(!1),[y,A]=(0,o.useState)(!0),[S,w]=(0,o.useState)(!1),[T,D]=(0,o.useState)(!1),[I,O]=(0,o.useState)(),M=(0,o.useRef)(null),R=(0,o.useRef)(new p.DisposableCollection),{height:P}=f,k=(0,p.useInjectable)(s.IFileTreeService),{iconService:F,locationToCurrentFile:L,filterMode:B,indent:j,baseIndent:W}=k,U=(0,p.useInjectable)(h.FileTreeModelService),[Q,V]=(0,o.useState)({indent:j,baseIndent:W}),[$,Y]=(0,o.useState)(B),[z,H]=(0,o.useState)(F.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),K=(0,o.useCallback)(xe=>Z(xe)?!1:xe.shiftKey,[]),Z=(0,o.useCallback)(xe=>{const{metaKey:Re,ctrlKey:Be}=xe;return p.isOSX&&Re||Be},[]),X=(0,o.useCallback)((xe,Re,Be,me)=>{xe.stopPropagation();const{handleItemClick:re,handleItemToggleClick:he,handleItemRangeClick:Oe}=U;if(!Re)return;const Se=K(xe),Fe=Z(xe);Se?Oe(Re,Be):Fe?he(Re,Be):re(Re,Be,me)},[]),ie=(0,o.useCallback)((xe,Re,Be)=>{xe.stopPropagation();const{handleItemDoubleClick:me}=U;Re&&me(Re,Be)},[]),oe=(0,o.useCallback)((xe,Re)=>{xe.stopPropagation();const{toggleDirectory:Be}=U;Be(Re)},[]);(0,o.useEffect)(()=>{a&&U.onFileTreeModelChange(async xe=>{A(!0),xe&&await xe.ensureReady,O(xe),A(!1)})},[a]),(0,o.useEffect)(()=>{var xe,Re,Be;const me=new p.CancellationTokenSource;return q(me.token),(xe=R.current)===null||xe===void 0||xe.push(F.onThemeChange(re=>{H(re)})),(Re=R.current)===null||Re===void 0||Re.push(k.onTreeIndentChange(({indent:re,baseIndent:he})=>{V({indent:re,baseIndent:he})})),(Be=R.current)===null||Be===void 0||Be.push(k.onFilterModeChange(re=>{Y(re)})),()=>{var re;me.cancel(),(re=R.current)===null||re===void 0||re.dispose()}},[]);const le=(0,o.useCallback)((xe,Re)=>{let Be;if(xe&&Re)for(Be=xe.parentNode;Be;){if(Re===Be)return!0;Be=Be.parentNode}return!1},[]),pe=(0,o.useCallback)(xe=>{le(xe.relatedTarget,M.current)||!xe.relatedTarget||(w(!1),U.handleTreeBlur())},[M.current]);(0,o.useEffect)(()=>{$||(U.fileTreeHandle&&U.fileTreeHandle.clearFilter(),U.selectedFiles.length===1&&U.location(U.selectedFiles[0].uri))},[$]),(0,o.useEffect)(()=>{const xe=new p.DisposableCollection;return I&&(xe.push(U.onDidFocusedFileChange(Re=>{Re?Re.isEqual((I?.root).uri)?S||w(!S):S&&w(!S):Re||S&&w(!S)})),xe.push(U.onDidContextMenuFileChange(Re=>{Re?Re.isEqual((I?.root).uri)?S||w(!S):S&&w(!S):Re||S&&w(!S)}))),()=>{xe.dispose()}},[I,S]);const q=(0,o.useCallback)(async xe=>{var Re;if(await U.whenReady,!xe.isCancellationRequested){if(U.treeModel){if(await U.treeModel.ensureReady,O(U.treeModel),xe.isCancellationRequested)return;M.current&&k.initContextKey(M.current)}A(!1),!((Re=R.current)===null||Re===void 0)&&Re.disposed||b(!0)}},[U,R.current]),Ee=(0,o.useCallback)(xe=>{U.handleTreeHandler({...xe,getModel:()=>U.treeModel,hasDirectFocus:()=>M.current===document.activeElement})},[M.current,I]),_e=(0,o.useCallback)(()=>{const{handleItemClick:xe}=U;xe()},[]),te=(0,o.useCallback)(()=>{U.handleDblClick()},[]),ge=(0,o.useCallback)(()=>{const{handleTreeFocus:xe}=U;xe()},[]),Te=(0,o.useCallback)(xe=>{const{handleContextMenu:Re}=U;Re(xe)},[]),Pe=(0,o.useCallback)(xe=>{xe.stopPropagation(),xe.preventDefault()},[]),Ae=(0,o.useCallback)(xe=>{xe.preventDefault(),D(!0)},[]),we=(0,o.useCallback)(()=>{D(!1)},[]),be=(0,o.useCallback)(xe=>{const{handleDrop:Re}=U.dndService;D(!1),Re(xe)},[]),fe=(0,o.useCallback)((xe,Re,Be,me)=>{const{handleContextMenu:re}=U;re(xe,Re,me)},[]);return o.default.createElement("div",{className:(0,r.default)(l.default.file_tree,T&&l.default.outer_drag_over,S&&l.default.outer_active),tabIndex:-1,ref:M,onClick:_e,onDoubleClick:te,onFocus:ge,onBlur:pe,onContextMenu:Te,draggable:!0,onDragStart:Pe,onDragLeave:we,onDragOver:Ae,onDrop:be},o.default.createElement(E,{isLoading:y,isReady:a,height:P,model:I,iconTheme:z,treeIndent:Q,filterMode:$,locationToCurrentFile:L,onTreeReady:Ee,onContextMenu:fe,onItemClick:X,onItemDoubleClick:ie,onTwistierClick:oe}))};t.FileTree=d;const E=(0,o.memo)(({isReady:f,isLoading:a,height:b,model:y,filterMode:A,treeIndent:S,iconTheme:w,onTreeReady:T,onItemClick:D,onItemDoubleClick:I,onContextMenu:O,onTwistierClick:M})=>{const R=(0,p.useInjectable)(s.IFileTreeService),P=(0,p.useInjectable)(_.IIconService),{decorationService:k,labelService:F,locationToCurrentFile:L}=R,B=(0,p.useInjectable)(h.FileTreeModelService),j=(0,o.useCallback)(W=>o.default.createElement(g.FileTreeNode,{item:W.item,itemType:W.itemType,template:W.template,decorationService:k,labelService:F,iconService:P,dndService:B.dndService,decorations:B.decorations.getDecorations(W.item),onClick:D,onDoubleClick:I,onTwistierClick:M,onContextMenu:O,defaultLeftPadding:S.baseIndent,leftPadding:S.indent,hasPrompt:W.hasPrompt,hasFolderIcons:w.hasFolderIcons,hasFileIcons:w.hasFileIcons,hidesExplorerArrows:w.hidesExplorerArrows}),[y,S,w]);return f?a?o.default.createElement(v.Progress,{loading:!0}):y?o.default.createElement(u,{height:b,itemHeight:g.FILE_TREE_NODE_HEIGHT,onReady:T,model:y,filterEnabled:A,filterAfterClear:L,filterAutoFocus:!0,leaveBottomBlank:!0},j):o.default.createElement(m.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(v.Progress,{loading:!0})});E.displayName="FileTreeView"},57781:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(41869),p=e(18193),v=e(26542),m=e(42933),_=e(52416),s=e(51500),g=e(6250),l=e(69959),h=e(88014),u=e(93239),{Path:d}=c.path;let E=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new c.Emitter,this.onTreeIndentChangeEmitter=new c.Emitter,this.onFilterModeChangeEmitter=new c.Emitter,this.onNodeRefreshedEmitter=new c.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const a=this.effectedNodes.slice(0);if(this.effectedNodes=[],a.find(y=>l.Directory.isRoot(y)))this.refresh();else for(const y of a)this.refresh(y)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const a=Array.from(this._changeEventDispatchQueue),b=this.sortPaths(a);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new c.CancellationTokenSource);const y=(0,c.pSeries)(b.map(A=>async()=>{l.Directory.is(A.node)&&await A.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await y},this.locationToCurrentFile=()=>{this.commandService.executeCommand(c.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(a=>{this._roots=a;const b=new c.URI(a[0].uri),y=new l.Directory(this,void 0,b,b.displayName,a[0],this.fileTreeAPI.getReadableTooltip(b));this.root=y,this.onWorkspaceChangeEmitter.fire(y),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(c.Disposable.create(()=>{var a;(a=this._root)===null||a===void 0||a.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(a=>{a.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.fileTree.indent"?(this._indent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=a.newValue,this.refresh())}))}initContextKey(a){this.fileContextKey.initScopedContext(a)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(a=>this.watchFilesChange(a)))}async resolveChildren(a){var b,y,A,S;let w=[];if(a){if(l.Directory.isRoot(a)&&this.isMultipleWorkspace){const T=await this.workspaceService.roots;for(const D of T){const I=this.fileTreeAPI.toNode(this,D,a,this.workspaceService.getWorkspaceName(new c.URI(D.uri)));this.watchFilesChange(new c.URI(D.uri)),w=w.concat(I),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}return w}if(a.uri){const T=await this.fileTreeAPI.resolveChildren(this,a.uri.toString(),a,this.isCompactMode&&!l.Directory.isRoot(a));w=T.children,w.forEach(I=>{(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)});const D=T.filestat;if(D&&this.isCompactMode&&!l.Directory.isRoot(a)){const I=new c.URI(D.uri),O=a.parent;if(a&&O){let M=a.name;if(a.filestat.isSymbolicLink){const R=(y=new c.URI(a.filestat.realUri).relative(I))===null||y===void 0?void 0:y.toString();R&&(M=R,M=[a.uri.displayName].concat(M.split(d.separator)).join(d.separator))}else O.filestat.isSymbolicLink?M=(A=new c.URI(O.filestat.realUri).relative(I))===null||A===void 0?void 0:A.toString():M=(S=O.uri.relative(I))===null||S===void 0?void 0:S.toString();M&&M!==a.name&&a.updateMetaData({name:M,uri:I,tooltip:this.fileTreeAPI.getReadableTooltip(I),fileStat:D})}}return w}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const T=new c.URI((b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri);let D=T.displayName;D=D.slice(0,D.lastIndexOf("."));const I={...this.workspaceService.workspace,isDirectory:!0},O=new l.Directory(this,void 0,T,D,I,this.fileTreeAPI.getReadableTooltip(T));return this.root=O,[O]}else if(this._roots.length>0)return w=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,w.forEach(T=>{const D=this.workspaceService.getWorkspaceName(T.uri);D&&D!==T.name&&T.updateMetaData({name:D}),(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)}),this.watchFilesChange(new c.URI(this._roots[0].uri)),this.root=w[0],w;return[]}async watchFilesChange(a){if(!this._readyToWatch){this._watchRootsQueue.push(a);return}const b=await this.fileServiceClient.watchFileChanges(a);this.toDispose.push(b),this.toDispose.push(b.onFilesChanged(y=>{this.onFilesChanged(y)})),this._fileServiceWatchers.set(a.toString(),b)}updateRefreshable(a){var b;a!==this.refreshable&&(this._refreshable=a,this._refreshable?this.doHandleQueueChange():(b=this.refreshCancelToken)===null||b===void 0||b.cancel())}isContentFile(a){return!!a&&"filestat"in a&&!a.filestat.isDirectory}isFileContentChanged(a){return a.type===m.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(a.uri))}getAffectedChanges(a){const b=[];for(const y of a)this.isFileContentChanged(y)||b.push(y);return b}isRootAffected(a){return this._roots?a.some(b=>b.type>m.FileChangeType.UPDATED&&this._roots&&this._roots.find(y=>b.uri.indexOf(y.uri)>=0)):!1}async onFilesChanged(a){const b=await this.getAffectedNodes(this.getAffectedChanges(a));return b.length>0?this.effectedNodes=this.effectedNodes.concat(b):!(b.length>0)&&this.isRootAffected(a)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(a){var b,y,A,S,w,T;if(!a)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(S=this._roots.find(I=>new c.URI(I.uri).isEqualOrParent(a)))===null||S===void 0?void 0:S.uri,D){const I=new c.URI(D);if(I.isEqualOrParent(a))return new d(((w=this.root)===null||w===void 0?void 0:w.path)||"/").join(I.displayName).join(((T=I.relative(a))===null||T===void 0?void 0:T.toString())||"").toString()}}else if(D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,D){const I=new c.URI(D);if(I.isEqualOrParent(a))return new d(((y=this.root)===null||y===void 0?void 0:y.path)||"").join(((A=I.relative(a))===null||A===void 0?void 0:A.toString())||"").toString()}}async moveNodeByPath(a,b,y,A,S=o.TreeNodeType.TreeNode){const w=new d(a.path).join(y).toString(),T=new d(b.path).join(A).toString();if(w&&T&&T!==w){const D=a.moveNode(w,T);return D&&l.File.is(D)&&(D.updateMetaData({uri:b.uri.resolve(A),fileStat:{...b.filestat,uri:b.uri.resolve(A).toString(),isDirectory:S!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(b.uri.resolve(A))}),l.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(a){const b=a.children;if(!(!b||b.length===0)){for(const y of b)if(l.File.is(y)){const A=a.uri.resolve(y.uri.displayName);y.updateMetaData({uri:A,fileStat:{...y.filestat,uri:A.toString(),isDirectory:!!l.Directory.is(y)},tooltip:this.fileTreeAPI.getReadableTooltip(A)}),l.Directory.is(y)&&this.updateChildren(y)}}}async addNode(a,b,y){let A,S;const w=d.splitPath(b);if(w.length>1){let D=a.uri;for(const I of w)D=D.resolve(I);!this.isCompactMode||l.Directory.isRoot(a)?S=w[0]:y===o.TreeNodeType.CompositeTreeNode?S=b:S=w.slice(0,w.length-1).join(d.separator)}else S=b;A={uri:a.uri.resolve(S).toString(),isDirectory:y===o.TreeNodeType.CompositeTreeNode||w.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const T=await this.fileTreeAPI.toNode(this,A,a,S);return T&&a.addNode(T),T}async deleteAffectedNodeByPath(a,b){var y,A;const S=this.getNodeByPathOrUri(a);S&&S.parent&&(this.isCompactMode&&!b?((y=S.parent.children)===null||y===void 0?void 0:y.length)===2?this.refresh((A=S.parent)===null||A===void 0?void 0:A.parent):this.refresh(S.parent):S.parent.removeNode(S.path))}async deleteAffectedNodes(a,b=[]){const y=[];for(const A of a){const S=this.getNodeByPathOrUri(A);S&&l.File.is(S)&&y.push(S)}for(const A of y)!A?.parent||this._changeEventDispatchQueue.has(A?.parent.path)||await this.deleteAffectedNodeByPath(A.path);return b.filter(A=>A.type!==m.FileChangeType.DELETED)}async getAffectedNodes(a){const b=[];for(const y of a){const A=new c.URI(y.uri),S=this.getNodeByPathOrUri(A.parent);S&&b.push(S)}return b}isFileURI(a){return/^file:\/\//.test(a)}getNodeByPathOrUri(a){var b,y,A,S;let w,T;if(typeof a!="string"?(T=a,a=a.toString()):this.isFileURI(a)?T=new c.URI(a):!this.isFileURI(a)&&typeof a=="string"&&(w=a),this.isFileURI(a)&&T){if(this._symbolicFiles.has(T?.toString()))return this._symbolicFiles.get(T.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(y=this._roots.find(I=>new c.URI(I.uri).isEqualOrParent(T)))===null||y===void 0?void 0:y.uri):D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,this.root&&D){const I=new c.URI(D);if(I.isEqualOrParent(T)){const O=I.relative(T);O&&(this.isMultipleWorkspace?w=new d(this.root.path).join(I.displayName).join(O.toString()).toString():w=new d(this.root.path).join(O.toString()).toString())}}}if(w){const D=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(w);if(!D){let I;const O=w.split(d.separator);for(;O.length>=1;){O.pop();const M=O.join(d.separator);if(I=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(M),I)break}if(I&&l.Directory.is(I)){for(const M of I.children||[])if(M.path.includes(w))return M}}return D}}sortComparator(a,b){return a.constructor===b.constructor?a.name.localeCompare(b.name,"en",{numeric:!0}):a.type===o.TreeNodeType.CompositeTreeNode?-1:b.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}reWatch(){for(const[a,b]of this._fileServiceWatchers)b.dispose(),this.watchFilesChange(new c.URI(a))}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(a){return this.workspaceService.getWorkspaceName(a)}async refresh(a=this.root){if(a)return l.Directory.is(a)||l.File.is(a)&&a.parent&&(a=a.parent),this._changeEventDispatchQueue.add(a.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(a){this.logger.error("flush file change event queue error:",a)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(a){const y=a.slice().map(S=>({node:this.getNodeByPathOrUri(S),path:S})).filter(S=>S&&!!S.node);a.length>1&&y.sort((S,w)=>{var T,D;const I=((T=S.node)===null||T===void 0?void 0:T.depth)||0,O=((D=w.node)===null||D===void 0?void 0:D.depth)||0;return I-O});const A=[];for(let S=y.length-1;S>=0;S--){const w=y[S];let T=!1;for(let D=0;D<S;D++){const I=y[D];l.Directory.is(I)&&w.node.path.startsWith(I.node.path)&&(T=!0)}T||A.push(w)}return A}openFile(a){const b=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:b})}openAndFixedFile(a){this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(a){this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,split:4})}compare(a,b){this.commandService.executeCommand(c.EDITOR_COMMANDS.COMPARE.id,{original:a,modified:b})}toggleFilterMode(){var a;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(a=this.fileContextKey)===null||a===void 0||a.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(c.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=E,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],E.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],E.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(p.CorePreferences),n.__metadata("design:type",Object)],E.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],E.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileTreeDecorationService),n.__metadata("design:type",u.FileTreeDecorationService)],E.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],E.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(h.FileContextKey),n.__metadata("design:type",h.FileContextKey)],E.prototype,"fileContextKey",void 0),t.FileTreeService=E=n.__decorate([(0,r.Injectable)()],E)},83709:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),c=e(41103),p=e(6250),v=e(89508),m=e(40439),_=e(57781),s=e(88808),g=e(93239),l=e(97738),h=e(24861);let u=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:p.IFileTreeAPI,useClass:s.FileTreeAPI},{token:g.FileTreeDecorationService,useClass:g.FileTreeDecorationService},{token:p.IFileTreeService,useClass:_.FileTreeService},{token:l.FileTreeModelService,useClass:l.FileTreeModelService},{token:o.IWindowDialogService,useClass:v.WindowDialogServiceImpl},m.FileTreeContribution]}};t.FileTreeNextModule=u,t.FileTreeNextModule=u=n.__decorate([(0,r.Domain)(h.name),(0,r.ModuleDependencies)([c.WorkspaceModule])],u)},88808:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(42933),v=e(72665),m=e(26199),_=e(69959);let s=class{constructor(){this.onDidResolveChildrenEmitter=new c.Emitter,this.onDidResolveChildren=this.onDidResolveChildrenEmitter.event}async resolveChildren(l,h,u,d){var E;let f;if(!this.userhomePath){const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new c.URI(a.uri))}if(typeof h=="string"?f=await this.fileServiceClient.getFileStat(h):f=await this.fileServiceClient.getFileStat(h.uri),f){if(this.onDidResolveChildrenEmitter.fire(f.uri.toString()),((E=f.children)===null||E===void 0?void 0:E.length)===1&&f.children[0].isDirectory&&d)return await this.resolveChildren(l,f.children[0].uri,u,d);{const a={...f,isInSymbolicDirectory:u?.filestat.isSymbolicLink||u?.filestat.isInSymbolicDirectory};return{children:this.toNodes(l,a,u),filestat:a}}}else return{children:[],filestat:null}}async resolveNodeByPath(l,h,u){const d=await this.fileServiceClient.getFileStat(h);if(d)return this.toNode(l,d,u)}async resolveFileStat(l){return await this.fileServiceClient.getFileStat(l.toString())}toNodes(l,h,u){if(u){if(h.children)return h.children.map(d=>this.toNode(l,d,u))}else return[this.toNode(l,h,u)];return[]}toNode(l,h,u,d){var E;const f=new c.URI(h.uri),a=d||f.displayName;let b;return h.isInSymbolicDirectory=(E=u?.filestat.isSymbolicLink)!==null&&E!==void 0?E:u?.filestat.isInSymbolicDirectory,h.isDirectory?b=new _.Directory(l,u,f,a,h,this.getReadableTooltip(f)):b=new _.File(l,u,f,a,h,this.getReadableTooltip(f)),b}async mvFiles(l,h){const u=[];for(const f of l)if(f.url.isEqualOrParent(h))return;const d=l.sort((f,a)=>f.toString().length-a.toString().length),E=[];for(const f of d)E.length>0&&E.find(a=>a.url.isEqualOrParent(f.url))||E.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,c.localize)("file.confirm.move.ok"),a=(0,c.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,c.formatLocalize)("file.confirm.move",`[ ${E.map(y=>y.url.displayName).join(",")} ]`,h.displayName),[a,f])!==f)return}for(const f of E){const a=await this.mv(f.url,h.resolve(f.url.displayName),f.isDirectory);a&&u.push(a)}return u}async mv(l,h,u=!1){try{await this.workspaceEditService.apply({edits:[{newResource:h,oldResource:l,options:{isDirectory:u,overwrite:!0}}]})}catch(d){return d.message}}async createFile(l,h){try{await this.workspaceEditService.apply({edits:[{newResource:l,options:{content:h}}]})}catch(u){return u.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,l,{disableNavigate:!0,focus:!0})}async createDirectory(l){try{await this.workspaceEditService.apply({edits:[{newResource:l,options:{isDirectory:!0}}]})}catch(h){return h.message}}async delete(l){try{await this.workspaceEditService.apply({edits:[{oldResource:l,options:{}}]});return}catch(h){return h.message}}async copyFile(l,h){let u=1,d;try{d=await this.fileServiceClient.access(h.toString())}catch(E){return E.message}for(;d;){const E=h.displayName.replace(/\Wcopy\W\d+/,""),f=c.path.extname(E),b=`${c.path.basename(E,f)} copy ${u}${f}`;h=h.parent.resolve(b),u++;try{d=await this.fileServiceClient.access(h.toString())}catch{return}}try{return await this.fileServiceClient.copy(l.toString(),h.toString())}catch(E){return E.message}}getReadableTooltip(l){const h=l.toString(),u=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(l)?decodeURIComponent(h.replace(u,"~")):decodeURIComponent(l.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(v.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(41893),p=e(52416);let v=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(_=>{var s,g,l;const h=(g=(s=_._data)===null||s===void 0?void 0:s._iter)===null||g===void 0?void 0:g._value;if(h){const u=new o.URI(h),d=this.getDecoration(u);this.cacheDecorations.has(h)?((l=this.cacheDecorations.get(h))===null||l===void 0?void 0:l.tooltip)!==d?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(h,d),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(_,s=!1){_ instanceof o.URI&&(_=o.Uri.parse(_.toString()));const g=this.decorationsService.getDecoration(_,s);return g?{...g,color:this.themeService.getColor({id:g.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=v,n.__decorate([(0,r.Autowired)(c.IDecorationsService),n.__metadata("design:type",c.IDecorationsService)],v.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],v.prototype,"themeService",void 0),t.FileTreeDecorationService=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v)},30577:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(53622),m=e(14951),_=e(72665),s=e(51500),g=e(6250),l=e(69959),h=r.__importDefault(e(89200)),u=r.__importDefault(e(2613)),d=e(57781),E=e(97738);let f=n=class extends p.WithEventBus{constructor(b){super(),this.model=b,this.toCancelNodeExpansion=new p.DisposableCollection,this.beingDraggedDec=new c.Decoration(h.default.mod_dragging),this.draggedOverDec=new c.Decoration(h.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new p.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(y,A,S)=>{y.stopPropagation();const w=O=>{this.handleDragEnd(O,A)};y.currentTarget.addEventListener("dragend",w,!1);let T=this.model.selectedFiles,D=!1;for(const O of T)O&&O.id===A.id&&(D=!0);D||(T=[A]),this.beingDraggedNodes=T,this.beingDraggedActiveUri=S;const I=T.find(O=>!l.Directory.is(O));if(I&&y.dataTransfer.setData("uri",I.uri.toString()),y.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(O=>O.uri.toString()))),I){const O=I;O.uri.scheme==="file"&&y.dataTransfer.setData("DownloadURL",`application/octet-stream:${O.displayName}:data:application/octet-stream;base64,${(0,p.encodeBase64)(p.BinaryBuffer.fromString(O.filestat.uri))}`)}if(T.forEach(O=>{this.beingDraggedDec.addTarget(O,c.TargetMatchMode.Self)}),y.dataTransfer){let O;T.length===1?O=S?S.displayName:typeof A.name=="string"?A.name:"":O=String(T.length);const M=document.createElement("div");M.className=u.default.file_tree_drag_image,M.textContent=O,document.body.appendChild(M),y.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}},this.handleDragEnter=(y,A)=>{y.stopPropagation(),y.preventDefault()},this.handleDragLeave=(y,A)=>{y.preventDefault(),y.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(y,A)=>{if(y.preventDefault(),y.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(A)>=0)return;this.draggedOverNode=A;const S=l.Directory.is(A)&&A.expanded?A:A.parent;(this.potentialParent!==S||!this.draggedOverDec.hasTarget(S))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==A&&l.Directory.is(A)&&(this.dragOverTrigger.trigger(async()=>{A.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren)):(await A.setExpanded(!0),this.draggedOverNode===A&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(p.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(y,A,S)=>{var w,T;this.eventBus.fire(new v.FileTreeDropEvent({event:y.nativeEvent,targetDir:S?S.codeUri.path:A&&A instanceof l.File?(w=A.parent)===null||w===void 0?void 0:w.uri.codeUri.path:A?A.uri.codeUri.path:new p.URI((T=this.workspaceService.workspace)===null||T===void 0?void 0:T.uri).codeUri.path}));try{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="copy";let D;const I=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&S&&!A?.uri.isEqual(S)?D=null:A?D=l.Directory.is(A)?A:A.parent:D=this.root;let O;if(this.beingDraggedActiveUri){const M=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);O=[new l.Directory(this.fileTreeService,M?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(O=this.beingDraggedNodes,!O||O.length===0)try{const M=JSON.parse(y.dataTransfer.getData("beingDraggedNodes"));M&&M.length!==0&&(O=M.map(R=>this.fileTreeService.getNodeByPathOrUri(new p.URI(R))).filter(Boolean),O.length||(O=await Promise.all(M.map(async R=>{const P=new p.URI(R);let k;const F=await this.filesystem.getFileStat(P.toString());return F?.isDirectory?k=new l.Directory(this.fileTreeService,this.root,P,P.displayName,{uri:P.toString(),isDirectory:!0,lastModification:new Date().getTime()},P.displayName):k=new l.File(this.fileTreeService,this.root,P,P.displayName,{uri:P.toString(),isDirectory:!0,lastModification:new Date().getTime()},P.displayName),k}))))}catch{}if(O.length>0){const M=S||D&&D.uri,R=O.filter(P=>P&&P.parent&&(this.beingDraggedActiveUri?!P.parent.uri.isEqual(M):!0));if(R.length>0){const P=await this.fileTreeAPI.mvFiles(R.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),M);if(P&&P.length>0)P.forEach(k=>{this.messageService.error(k)});else if(P){if(D)if(this.fileTreeService.isCompactMode&&I){for(const k of R)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of R){const F=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:F.displayName,fileStat:{...k.filestat,uri:F.toString()},uri:F,tooltip:this.fileTreeAPI.getReadableTooltip(F)}),l.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(A){if(this.fileTreeService.isCompactMode&&I)for(const k of R)this.fileTreeService.refresh(k.parent);else for(const k of R)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(A.parent)}}else return}}A&&this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(M=>{this.beingDraggedDec.removeTarget(M)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(y,A)=>{this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(S=>{this.beingDraggedDec.removeTarget(S)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(g.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(p.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(_.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(g.IFileTreeService),r.__metadata("design:type",d.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.FileTreeModelService])],f)},97738:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(91830),m=e(93899),_=e(26542),s=e(54414),g=e(14951),l=e(63067),h=e(53576),u=e(72665),d=e(6250),E=e(69959),f=e(2812),a=e(46377),b=r.__importDefault(e(89200)),y=e(57781),A=e(30577),{Path:S,isValidBasename:w}=p.path,{coalesce:T}=p.arrays,{trim:D,rtrim:I}=p.strings;let O=n=class{constructor(){this._isDisposed=!1,this._whenReady=new p.Deferred,this.selectedDecoration=new c.Decoration(b.default.mod_selected),this.focusedDecoration=new c.Decoration(b.default.mod_focused),this.contextMenuDecoration=new c.Decoration(b.default.mod_actived),this.loadingDecoration=new c.Decoration(b.default.mod_loading),this.cutDecoration=new c.Decoration(b.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new p.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new p.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new p.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new p.Throttler,this.onDidFocusedFileChangeEmitter=new p.Emitter,this.onDidContextMenuFileChangeEmitter=new p.Emitter,this.onDidSelectedFileChangeEmitter=new p.Emitter,this.onFileTreeModelChangeEmitter=new p.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(R,P=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.selectedFiles=[R],P&&this.treeModel.dispatchChange())},this.selectFileDecoration=(R,P=!0)=>{R!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this._selectedFiles=[R],P&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=R=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(R),this.contextMenuFile=R,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=R=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(R,P=!1)=>{R!==this.treeModel.root&&(this.focusedFile!==R&&(P?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=R):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),R&&(this._selectedFiles.indexOf(R)<0&&(this.selectedDecoration.addTarget(R),this._selectedFiles.push(R),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(R),this.focusedFile=R)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=R=>{const P=this._selectedFiles.indexOf(R);P>-1?(this.focusedFile===R&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(P,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(R),this.selectedDecoration.addTarget(R),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=R,this.focusedDecoration.addTarget(R)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(R,P)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;R<=P;R++){const k=this.treeModel.root.getTreeNodeAtIndex(R);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var R;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(R=this.treeModel)===null||R===void 0||R.dispatchChange()},this.toggleDirectory=async R=>{R.expanded?this.fileTreeHandle.collapseNode(R):this.fileTreeHandle.expandNode(R)},this.handleDblClick=()=>{this.commandService.executeCommand(p.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(R,P,k)=>{var F;R.stopPropagation(),R.preventDefault();let L,B;P?(B=P,this._isMultiSelected?this.selectedFiles.indexOf(B)>=0?L=this.selectedFiles:L=[B]:L=[B]):(L=[this.treeModel.root],B=this.treeModel.root),this.activateFileActivedDecoration(B),this.setFileTreeContextKey(B),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const j=this.contextMenuService.createMenu({id:m.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),W=j.getMergedMenuNodes();j.dispose(),this.updateExplorerCompressedContextKey(B,k);const{x:U,y:Q}=R.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:U,y:Q},menuNodes:W,args:k?[k,[k]]:[B.uri,L.map(V=>V.uri)]})},this.handleTreeBlur=()=>{var R,P,k;this._isDisposed||((P=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||P===void 0||P.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var R,P;(P=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||P===void 0||P.set(!0)},this.handleItemRangeClick=(R,P)=>{if(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),!this.focusedFile)this.handleItemClick(R,P);else if(this.focusedFile&&this.focusedFile!==R){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(R),F=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);F>k?this.activeFileDecorationByRange(k,F):F<k&&this.activeFileDecorationByRange(F,k)}},this.handleItemToggleClick=(R,P)=>{this._isMultiSelected=!0,!(P!==c.TreeNodeType.CompositeTreeNode&&P!==c.TreeNodeType.TreeNode)&&(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),this.toggleFileSelectedDecoration(R))},this.handleItemClick=(R,P=this.fileTreeService.isMultipleWorkspace?c.TreeNodeType.TreeNode:c.TreeNodeType.CompositeTreeNode,k)=>{var F,L,B,j;if(this.treeModel&&(R||(R=this.treeModel.root),this.updateExplorerCompressedContextKey(R,k),this._isMultiSelected=!1,(P===c.TreeNodeType.CompositeTreeNode||P===c.TreeNodeType.TreeNode)&&this.activeFileDecoration(R),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(L=this.contextKey)===null||L===void 0||L.explorerResourceIsFolder.set(P===c.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(P===c.TreeNodeType.CompositeTreeNode){if((B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0),R===this.treeModel.root)return;this.toggleDirectory(R)}else if(P===c.TreeNodeType.TreeNode){if((j=this.contextKey)===null||j===void 0||j.explorerResourceIsFolder.set(!1),R===this.treeModel.root)return;this.fileTreeService.openFile(R.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(h.RETRACT_BOTTOM_PANEL.id)}}},this.handleItemDoubleClick=(R,P)=>{P===c.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(R.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(R)},this.validateFileName=(R,P)=>{var k;if(P=this.getWellFormedFileName(P),!P||P.length===0||/^\s+$/.test(P))return{message:(0,p.localize)("validate.tree.emptyFileNameError"),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P};if(P[0]==="/"||P[0]==="\\")return{message:(0,p.localize)("validate.tree.fileNameStartsWithSlashError"),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P};if(P[0]===" "||P[P.length-1]===" ")return{message:(0,p.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:c.PROMPT_VALIDATE_TYPE.WARNING,value:P};let F;if(R.target){const B=R.target;if(P===B.name)return null;F=B.parent}else F=R.parent;return F&&!(R instanceof c.RenamePromptHandle&&R.target.displayName.indexOf(S.separator)>0)&&((k=F.children)===null||k===void 0?void 0:k.find(W=>W.name===P))?{message:(0,p.formatLocalize)("validate.tree.fileNameExistsError",P),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P}:T(P.split(/[\\/]/)).some(B=>!w(B))?{message:(0,p.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(P)),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P}:null},this.proxyPrompt=R=>{let P=!1;const k=async V=>{const $=await this.fileTreeService.getNodeByPathOrUri(V);$&&(E.Directory.is($)?this.selectFileDecoration($):this.location($.uri))},F=async V=>{var $,Y,z;if(this.validateMessage=void 0,R instanceof c.RenamePromptHandle){const H=R.target,K=R.target.displayName.split(S.separator),Z=H.name.indexOf(S.separator)>0;if(Z&&this.activeUri&&!R.target.uri.toString().includes(this.activeUri.toString()))return!1;const X=this.activeUri?K.length-R.target.uri.toString().replace(this.activeUri.toString(),"").split(S.separator).length:-1,ie=X===-1?[]:K.slice(0,X).concat(V);let oe=H.uri,le=H.parent.uri.resolve(V);if(Z&&(($=this.activeUri)===null||$===void 0?void 0:$.displayName)===V||!Z&&V===H.name)return!0;R.addAddonAfter("loading_indicator"),Z&&ie.length>0&&E.Directory.is(H.parent)&&(oe=H.parent.uri.resolve(K.slice(0,X+1).join(S.separator)),le=H.parent.uri.resolve(ie.concat().join(S.separator)));const pe=await this.fileTreeAPI.mv(oe,le,H.type===c.TreeNodeType.CompositeTreeNode);if(pe)return this.validateMessage={type:c.PROMPT_VALIDATE_TYPE.ERROR,message:pe,value:V},this.fileTreeService.updateRefreshable(!0),R.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),R.removeAddonAfter(),!Z&&H.parent){const q=await this.fileTreeService.moveNodeByPath(H.parent,H.parent,H.name,V,H.type);q&&this.selectFileDecoration(q,!1),this.fileTreeService.updateRefreshable(!0)}else if(E.Directory.is(H)&&!E.Directory.isRoot(H)){H.updateMetaData({name:ie.concat(K.slice(X+1)).join(S.separator),uri:le,fileStat:{...H.filestat,uri:le.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(le)}),this.treeModel.dispatchChange();let q;E.Directory.is(H.parent)&&(!((Y=H.parent.children)===null||Y===void 0)&&Y.find(Ee=>H.path.indexOf(Ee.path)>=0))?q=this.fileTreeService.refresh(H.parent):q=this.fileTreeService.refresh(H),q.then(()=>{k(le)})}R.removeAddonAfter()}else if(R instanceof c.NewPromptHandle){const H=R.parent,K=H.uri.resolve(V);let Z;if(R.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),R.type===c.TreeNodeType.CompositeTreeNode?Z=await this.fileTreeAPI.createDirectory(K):Z=await this.fileTreeAPI.createFile(K),R.removeAddonAfter(),Z)return this.validateMessage={type:c.PROMPT_VALIDATE_TYPE.ERROR,message:Z,value:V},this.fileTreeService.updateRefreshable(!1),R.addValidateMessage(this.validateMessage),!1;if(V.includes(S.separator)&&this.fileTreeService.refresh(H).then(()=>{k(H.uri.resolve(V))}),this.fileTreeService.isCompactMode)if(R.type===c.TreeNodeType.CompositeTreeNode)if((!H.children||H.children.length===0)&&!E.Directory.isRoot(H)){const ie=H.uri.resolve(V),oe=[H.name].concat(V).join(S.separator);H.updateMetaData({name:oe,uri:ie,fileStat:{...H.filestat,uri:ie.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(ie)}),k(ie)}else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V));else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V));else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V))}return(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),!0},L=async V=>{var $,Y,z,H;if(this.validateMessage&&this.validateMessage.type===c.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(P)return!1;if(!V){($=this.contextKey)===null||$===void 0||$.explorerCompressedFocusContext.set(!1),(Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFirstFocusContext.set(!1),(z=this.contextKey)===null||z===void 0||z.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&R instanceof c.NewPromptHandle&&this.fileTreeService.refresh(R.parent);return}return(H=this.contextKey)===null||H===void 0||H.filesExplorerInputFocused.set(!1),await F(V),!0},B=async V=>{if(P=!0,this.validateMessage&&this.validateMessage.type===c.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(V.trim()===""||this.validateMessage&&this.validateMessage.type!==c.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const $=await F(V);return P=!1,!!$},j=async()=>{var V;(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!0)},W=()=>{var V;this.fileTreeService.updateRefreshable(!0),(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},U=()=>{var V;(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&R instanceof c.NewPromptHandle&&this.fileTreeService.refresh(R.parent)},Q=V=>{const $=this.validateFileName(R,V);$?(this.validateMessage=$,R.addValidateMessage($)):!$&&this.validateMessage&&this.validateMessage.value!==V&&(this.validateMessage=void 0,R.removeValidateMessage())};R.destroyed||(this.fileTreeService.updateRefreshable(!1),R.onChange(Q),R.onCommit(B),R.onBlur(L),R.onFocus(j),R.onDestroy(W),R.onCancel(U))},this.copyFile=async R=>{var P;this.pasteStore&&this.pasteStore.type===d.PasteTypes.CUT&&(this._pasteStore.files.forEach(F=>{F&&this.cutDecoration.removeTarget(F)}),(P=this.contextKey)===null||P===void 0||P.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const F of R){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:d.PasteTypes.COPY},this.clipboardService.writeResources(R)},this.pasteFile=async R=>{var P,k;let F=!1,L=this.fileTreeService.getNodeByPathOrUri(R.toString());if(!L)return;let B=this.pasteStore,j=!1;if(!B){const W=await this.clipboardService.readResources();if(!W||!W.length)return;B={files:[],type:d.PasteTypes.COPY,crossFiles:W},j=!0}if(B){if(E.Directory.is(L)||(F=!0,L=L.parent),j){const W=(0,p.localize)("file.confirm.paste.ok"),U=(0,p.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,p.formatLocalize)("file.confirm.paste",`[ ${(P=B.crossFiles)===null||P===void 0?void 0:P.map(V=>V.displayName).join(",")} ]`,E.Directory.isRoot(L)?L.uri.displayName:L.displayName),[U,W])!==W)return}if(B.type===d.PasteTypes.CUT){for(const U of B.files)U&&this.cutDecoration.removeTarget(U),L.expanded||await L.setExpanded(!0);const W=await this.fileTreeAPI.mvFiles(B.crossFiles?B.crossFiles.map(U=>{var Q;return{url:U,isDirectory:((Q=this.fileTreeService.getNodeByPathOrUri(U))===null||Q===void 0?void 0:Q.filestat.isDirectory)||!1}}):B.files.map(U=>({url:U.uri,isDirectory:U.filestat.isDirectory})),L.uri);W&&W.length>0&&(W.forEach(U=>{this.messageService.error(U)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:d.PasteTypes.NONE,crossFiles:void 0}}else if(B.type===d.PasteTypes.COPY){const W=B.crossFiles?B.crossFiles:B.files.map(U=>U.uri);for(const U of W){L.uri.isEqual(U)&&!F&&(L=L.parent);const Q=L.uri.resolve(U.displayName);L.expanded||await L.setExpanded(!0);const V=await this.fileTreeAPI.copyFile(U,Q);if(V)if(V.uri){const $=new p.URI(V.uri),Y=await this.filesystem.getFileStat(U.toString());this.fileTreeService.addNode(L,$.displayName,Y?.isDirectory?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${U.toString()}, ${V}`)}}}},this.cutFile=async R=>{var P;R.length>0&&((P=this.contextKey)===null||P===void 0||P.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===d.PasteTypes.CUT&&this._pasteStore.files.forEach(F=>{this.cutDecoration.removeTarget(F)});const k=[];for(const F of R){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:d.PasteTypes.CUT};for(const F of k)F&&this.cutDecoration.addTarget(F);this.treeModel.dispatchChange()},this.location=async R=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=R,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const R=this._fileToLocation;let P;if(typeof R=="string"?P=R:P=await this.fileTreeService.getFileTreeNodePathByUri(R),P){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(P,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=R=>{this._nextLocationTarget=R},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(R){this.onDidFocusedFileChangeEmitter.fire(R?R.uri:void 0),this._focusedFile=R}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(R){this.onDidContextMenuFileChangeEmitter.fire(R?R.uri:void 0),this._contextMenuFile=R}get selectedFiles(){return this._selectedFiles}set selectedFiles(R){this.onDidSelectedFileChangeEmitter.fire(R?R.map(P=>P.uri):[]),this._selectedFiles=R}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new v.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const R=(await this.fileTreeService.resolveChildren())[0];if(!R){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[R]),this.initDecorations(R),this._dndService=this.injector.get(A.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(p.STORAGE_NAMESPACE.EXPLORER);const P=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);P&&await this.loadFileTreeSnapshot(P),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),F=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...F})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(R){this._decorations=new c.DecorationsManager(R),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(R){var P;this.currentContextUriContextKey.set(R.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(R.uri)||"").toString()),this.contextMenuResourceContext.set(R.uri),(P=this.contextKey)===null||P===void 0||P.explorerResourceIsFolder.set(R&&R.type===c.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(R){await this._treeModel.loadTreeState(R)}updateExplorerCompressedContextKey(R,P){var k,F,L,B,j,W,U,Q,V,$,Y,z,H,K,Z,X;if(R&&P){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const ie=new S(R.name);ie.name===P.displayName?((F=this.contextKey)===null||F===void 0||F.explorerCompressedLastFocusContext.set(!0),(L=this.contextKey)===null||L===void 0||L.explorerCompressedFirstFocusContext.set(!1)):ie.root&&ie.root.name===P.displayName?((B=this.contextKey)===null||B===void 0||B.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!0)):((W=this.contextKey)===null||W===void 0||W.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!1))}else R?R.name.indexOf(S.separator)>0?((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!0),(V=this.contextKey)===null||V===void 0||V.explorerCompressedFirstFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedLastFocusContext.set(!0)):((Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFocusContext.set(!1),(z=this.contextKey)===null||z===void 0||z.explorerCompressedFirstFocusContext.set(!1),(H=this.contextKey)===null||H===void 0||H.explorerCompressedLastFocusContext.set(!1)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedFirstFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(R){this._fileTreeHandle=R}toggleOrOpenCurrentFile(){let R;this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),R&&(this.activeFileDecoration(R),E.Directory.is(R)?this.toggleDirectory(R):this.fileTreeService.openFile(R.uri))}moveToNext(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const k=this.treeModel.root.getIndexAtTreeNode(R)+1,F=this.treeModel.root.getTreeNodeAtIndex(k),L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=(k+1)*a.FILE_TREE_NODE_HEIGHT-(L.scrollPosition||0),{height:j}=this.fileTreeHandle.getCurrentSize();F&&(this.activateFileFocusedDecoration(F),B>j&&this.fileTreeHandle.ensureVisible(F,"end"))}moveToPrev(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const P=this.treeModel.root.getIndexAtTreeNode(R);if(P===0)return;const k=P-1,F=this.treeModel.root.getTreeNodeAtIndex(k);if(!F)return;const L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=k*a.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(F),(L.scrollPosition||0)>B&&this.fileTreeHandle.ensureVisible(F,"start")}async collapseCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const P=this.selectedFiles.indexOf(R);P>=0&&(this.selectedFiles.splice(P,1),this.selectedDecoration.removeTarget(R));let k;if(E.Directory.is(R)&&R.expanded)k=R;else if(R)E.Directory.isRoot(R.parent)?k=R:k=R.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const P=this.selectedFiles.indexOf(R);P>=0&&(this.selectedFiles.splice(P,1),this.selectedDecoration.removeTarget(R)),this.focusedFile=R,E.Directory.is(R)&&(R.expanded||await this.fileTreeHandle.expandNode(R))}async collapseAll(){await this.treeModel.root.collapsedAll();const R=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);R&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...R,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(R){var P;if(R.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const B=this.applicationService.backendOS===p.OperatingSystem.Linux,j=B?(0,p.localize)("file.confirm.delete.ok"):(0,p.localize)("file.confirm.moveToTrash.ok"),W=(0,p.localize)("file.confirm.delete.cancel"),U=10;let Q=R.slice(0,U).map($=>$.displayName).join(`
|
|
31619
|
+
`,y){const A=this.hashCalculateService.calculate(d);return u.length>m.FILE_SAVE_BY_CHANGE_THRESHOLD?await this.fileSchemeDocClient.saveByChange(h.toString(),{baseMd5:A,changes:E,eol:b},f,a,y):await this.fileSchemeDocClient.saveByContent(h.toString(),{baseMd5:A,content:u},f,a,y)}async provideEditorDocumentModelContentMd5(h,u){return this.fileSchemeDocClient.getMd5(h.toString(),u)}};t.FileSchemeDocumentProvider=_,n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],_.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IFileSchemeDocClient),n.__metadata("design:type",Object)],_.prototype,"fileSchemeDocClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(c.IHashCalculateService),n.__metadata("design:type",Object)],_.prototype,"hashCalculateService",void 0),t.FileSchemeDocumentProvider=_=n.__decorate([(0,r.Injectable)()],_);let s=class{constructor(){this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event,this.listeners={}}isReadonly(h){return!0}handlesScheme(h){return h==="vscode"}async provideEditorDocumentModelContent(h,u){return this.getSchemaContent(h)}getSchemaContent(h){const u=h.toString(),d=this.jsonRegistry.getSchemaContributions().schemas[u];if(d){const E=JSON.stringify(d);if(!this.listeners[u]){const f=o.Disposable.create(()=>{this.jsonRegistry.onDidChangeSchema(a=>{a===u&&this._onDidChangeContent.fire(h)})});this.listeners[u]=f}return E}return"{}"}onDidDisposeModel(h){h.toString()&&(this.listeners[h.toString()].dispose(),delete this.listeners[h.toString()])}};t.VscodeSchemeDocumentProvider=s,n.__decorate([(0,r.Autowired)(o.ISchemaStore),n.__metadata("design:type",Object)],s.prototype,"schemaStore",void 0),n.__decorate([(0,r.Autowired)(o.IJSONSchemaRegistry),n.__metadata("design:type",Object)],s.prototype,"jsonRegistry",void 0),t.VscodeSchemeDocumentProvider=s=n.__decorate([(0,r.Injectable)()],s);let g=class{constructor(){this.documentContentMaps=new Map,this._onDidChangeContent=new o.Emitter,this.onDidChangeContent=this._onDidChangeContent.event}handlesScheme(h){return h===o.Schemes.walkThroughSnippet}provideEditorDocumentModelContent(h,u){return this.documentContentMaps.has(h.toString())||this.documentContentMaps.set(h.toString(),""),this.documentContentMaps.get(h.toString())}isReadonly(){return!1}preferLanguageForUri(){return"plaintext"}};t.WalkThroughSnippetSchemeDocumentProvider=g,t.WalkThroughSnippetSchemeDocumentProvider=g=n.__decorate([(0,r.Injectable)()],g)},41352:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeDocClientService=void 0;const n=e(85608),r=e(76003),o=e(80449);let c=class{saveByChange(v,m,_,s,g){return this.fileDocBackendService.$saveByChange(v,m,_,s,g)}saveByContent(v,m,_,s,g){return this.fileDocBackendService.$saveByContent(v,m,_,s,g)}getMd5(v,m){return this.fileDocBackendService.$getMd5(v,m)}};t.FileSchemeDocClientService=c,n.__decorate([(0,r.Autowired)(o.FileSchemeDocNodeServicePath),n.__metadata("design:type",Object)],c.prototype,"fileDocBackendService",void 0),t.FileSchemeDocClientService=c=n.__decorate([(0,r.Injectable)()],c)},17276:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemEditorComponentContribution=t.FileSystemEditorResourceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(26542),p=e(57517),v=e(17878),m=e(42933),_=e(57646),s=e(60387),g=e(88819),l=e(99025),h="video-preview",u="image-preview",d="external-file",E="large-file-prevent";let f=class{registerResource(y){y.registerResourceProvider(this.untitledResourceProvider)}registerEditorDocumentModelContentProvider(y){y.registerEditorDocumentModelContentProvider(this.fileSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.vscodeSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.walkThroughSnippetSchemeDocumentProvider),y.registerEditorDocumentModelContentProvider(this.untitledSchemeDocumentProvider)}};t.FileSystemEditorResourceContribution=f,n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.FileSchemeDocumentProvider)],f.prototype,"fileSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.VscodeSchemeDocumentProvider)],f.prototype,"vscodeSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",s.WalkThroughSnippetSchemeDocumentProvider)],f.prototype,"walkThroughSnippetSchemeDocumentProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.UntitledSchemeResourceProvider)],f.prototype,"untitledResourceProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.UntitledSchemeDocumentProvider)],f.prototype,"untitledSchemeDocumentProvider",void 0),t.FileSystemEditorResourceContribution=f=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution)],f);let a=class{constructor(){this.cachedFileType=new o.LRUMap(200,100),this.fileServiceClient.onFilesChanged(y=>{y.forEach(A=>{this.cachedFileType.delete(A.uri.toString())})})}registerEditorComponent(y){y.registerEditorComponent({component:l.ImagePreview,uid:u,scheme:o.Schemes.file}),y.registerEditorComponent({component:l.VideoPreview,uid:h,scheme:o.Schemes.file}),y.registerEditorComponent({component:_.BinaryEditorComponent,uid:d,scheme:o.Schemes.file}),y.registerEditorComponent({component:g.LargeFilePrevent,uid:E,scheme:o.Schemes.file}),y.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,(A,S)=>{S.length===0&&S.push({type:p.EditorOpenType.component,componentId:d})}),y.registerEditorComponentResolver(A=>A===o.Schemes.file||this.fileServiceClient.handlesScheme(A)?10:-1,async(A,S)=>{const w=await this.getFileType(A.uri.toString());switch(w){case"image":{S.push({type:p.EditorOpenType.component,componentId:u});break}case"video":{S.push({type:p.EditorOpenType.component,componentId:h});break}case"binary":case"text":{const{metadata:T,uri:D}=A,I=T||{};if(w==="binary"&&!I.skipPreventBinary)break;const O=await this.fileServiceClient.getFileStat(D.toString());await this.preference.ready;const M=this.preference.getValid("editor.largeFile",4*1024*1024*1024);O&&(O.size||0)>M&&!I.skipPreventTooLarge?S.push({type:p.EditorOpenType.component,componentId:E}):S.push({type:p.EditorOpenType.code,title:(0,o.localize)("editorOpenType.code")});break}}}),y.registerEditorComponentResolver(o.Schemes.untitled,(A,S,w)=>{w([{type:p.EditorOpenType.code,priority:"default"}])})}async getFileType(y){return this.cachedFileType.has(y)||((0,c.getLanguageIdFromMonaco)(new o.URI(y))?this.cachedFileType.set(y,"text"):this.cachedFileType.set(y,await this.getRealFileType(y))),this.cachedFileType.get(y)}async getRealFileType(y){try{return await this.fileServiceClient.getFileType(y)}catch{return"text"}}};t.FileSystemEditorComponentContribution=a,n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],a.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],a.prototype,"preference",void 0),t.FileSystemEditorComponentContribution=a=n.__decorate([(0,o.Domain)(p.BrowserEditorContribution),n.__metadata("design:paramtypes",[])],a)},52568:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSchemeModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(80449),p=e(41352),v=e(17276);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[v.FileSystemEditorResourceContribution,v.FileSystemEditorComponentContribution,{token:c.IFileSchemeDocClient,useClass:p.FileSchemeDocClientService}],this.backServices=[{servicePath:c.FileSchemeDocNodeServicePath}]}};t.FileSchemeModule=m,t.FileSchemeModule=m=n.__decorate([(0,r.Injectable)()],m)},88819:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LargeFilePrevent=t.PreventComponent=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(81878),v=e(54414),m=e(82196),_=n.__importDefault(e(19996)),s=l=>o.default.createElement("div",{className:_.default["error-page"]},o.default.createElement("div",{className:(0,r.default)(_.default.icon,(0,c.getExternalIcon)("warning"))}),o.default.createElement("div",{className:_.default.description},l.description),o.default.createElement("div",{className:_.default["actions-wrapper"]},l.actions.map((h,u)=>o.default.createElement(p.Button,{key:u,onClick:()=>h.onClick(),className:_.default["action-button"]},h.label))));t.PreventComponent=s;const g=()=>{const l=(0,c.useInjectable)(v.WorkbenchEditorService),h=(0,c.useInjectable)(c.IEventBus),u=()=>{const d=l.currentResource;d&&(d.metadata={...d.metadata,skipPreventTooLarge:!0},h.fire(new m.ResourceOpenTypeChangedEvent(d.uri)))};return o.default.createElement(t.PreventComponent,{description:(0,c.localize)("editor.largeFile.prevent"),actions:[{label:(0,c.localize)("editor.file.prevent.stillOpen"),onClick:()=>u()}]})};t.LargeFilePrevent=g},99025:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImagePreview=t.VideoPreview=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(41869),c=e(40827),p=n.__importDefault(e(19996)),v=_=>{const s=(0,o.useInjectable)(c.StaticResourceService);return{src:r.default.useMemo(()=>s.resolveStaticResource(_.uri).toString(),[_])}};t.VideoPreview=(0,r.memo)(_=>{const{src:s}=v(_.resource);return r.default.createElement("div",{className:p.default.kt_video_preview},r.default.createElement("video",{playsInline:!0,controls:!0,className:p.default.kt_video,src:s}))});const m=_=>{const s=r.default.useRef(),g=r.default.useRef(),{src:l}=v(_.resource);return r.default.useEffect(()=>{const h=new o.Disposable;return s.current&&(s.current.src=l),()=>{h.dispose()}},[_.resource]),r.default.createElement("div",{className:p.default.kt_image_preview},r.default.createElement("div",{ref:g},r.default.createElement("img",{ref:h=>h&&(s.current=h)})))};t.ImagePreview=m},80449:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeType=t.FileSchemeDocNodeServicePath=t.IFileSchemeDocNodeService=t.IFileSchemeDocClient=t.FILE_SAVE_BY_CHANGE_THRESHOLD=t.FILE_ON_DISK_SCHEME=void 0,t.FILE_ON_DISK_SCHEME="fileOnDisk",t.FILE_SAVE_BY_CHANGE_THRESHOLD=1e5,t.IFileSchemeDocClient=Symbol("IFileSchemeDocClient"),t.IFileSchemeDocNodeService=Symbol("FileSchemeDocNodeService"),t.FileSchemeDocNodeServicePath="FileSchemeDocNodeService";var e;(function(n){n[n.ADDED=1]="ADDED",n[n.REMOVED=2]="REMOVED"})(e||(t.ChangeType=e={}))},15625:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFileSearchService=t.FileSearchServicePath=void 0,t.FileSearchServicePath="FileSearchServicePath",t.IFileSearchService=Symbol("FileSearchService")},84660:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(15625),t)},47720:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(84660),t)},2156:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClient=t.BrowserFileSystemRegistryImpl=void 0;const n=e(85608),r=e(32852),o=e(76003),c=e(41869),p=e(43718),v=e(37406),m=e(8170),_=e(41682),s=e(42933),g=e(81952);let l=class{constructor(){this.providers=new Map}registerFileSystemProvider(d){const E=d.scheme;return this.providers.set(E,d),{dispose:()=>{this.providers.delete(E)}}}};t.BrowserFileSystemRegistryImpl=l,t.BrowserFileSystemRegistryImpl=l=n.__decorate([(0,o.Injectable)()],l);let h=class{get clientId(){return this.applicationService.clientId}constructor(){this.watcherWithSchemaMap=new Map,this.watcherDisposerMap=new Map,this.onFileChangedEmitter=new c.Emitter,this.onFileProviderChangedEmitter=new c.Emitter,this._onFilesChanged=new c.Emitter,this.onFilesChanged=this._onFilesChanged.event,this._onFileProviderChanged=new c.Emitter,this.onFileProviderChanged=this._onFileProviderChanged.event,this._onDidChangeFileSystemProviderRegistrations=new c.Emitter,this.onDidChangeFileSystemProviderRegistrations=this._onDidChangeFileSystemProviderRegistrations.event,this._onWillActivateFileSystemProvider=new c.Emitter,this.onWillActivateFileSystemProvider=this._onWillActivateFileSystemProvider.event,this._onDidChangeFileSystemProviderCapabilities=new c.Emitter,this.onDidChangeFileSystemProviderCapabilities=this._onDidChangeFileSystemProviderCapabilities.event,this.filesExcludesMatcherList=[],this.watcherId=0,this.toDisposable=new c.DisposableCollection,this.watchFileExcludes=[],this.watchFileExcludesMatcherList=[],this.filesExcludes=[],this.workspaceRoots=[],this._providerChanged=new Set,this.fsProviders=new Map,this.userHomeDeferred=new c.Deferred,this.options={encoding:"utf8",overwrite:!1,recursive:!0,moveToTrash:!0},this.uriWatcherMap=new Map,this.toDisposable.push(this.onDidChangeFileSystemProviderRegistrations(d=>{d.added&&d.scheme===p.Schemes.file&&this.doGetCurrentUserHome()}))}async initialize(){const d=await this.getProvider(p.Schemes.file);d.initialize&&await d.initialize(this.clientId,this.appConfig.recursiveWatcherBackend)}async doGetCurrentUserHome(){const E=(await this.getProvider(p.Schemes.file)).getCurrentUserHome();this.userHomeDeferred.resolve(E)}handlesScheme(d){return this.registry.providers.has(d)||this.fsProviders.has(d)}dispose(){return this.toDisposable.dispose()}async resolveContent(d,E){const f=this.convertUri(d),b=await(await this.getProvider(f.scheme)).readFile(f.codeUri),y=b.data||b;return{content:c.BinaryBuffer.wrap(Uint8Array.from(y)).toString(E?.encoding)}}async readFile(d){const E=this.convertUri(d),a=await(await this.getProvider(E.scheme)).readFile(E.codeUri),b=a.data||a;return{content:c.BinaryBuffer.wrap(Uint8Array.from(b))}}async readFileStream(d){const E=this.convertUri(d);return await(await this.getProvider(E.scheme)).readFileStream(E.codeUri)}async getFileStat(d,E=!0){const f=this.convertUri(d),a=await this.getProvider(f.scheme);try{const b=await a.stat(f.codeUri);if(!b)throw s.FileSystemError.FileNotFound(f.codeUri.toString(),"File not found.");return this.filterStat(b,E)}catch(b){if(s.FileSystemError.FileNotFound.is(b))return}}async setContent(d,E,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!await this.isInSync(d,y))throw this.createOutOfSyncError(d);return await b.writeFile(a.codeUri,typeof E=="string"?c.BinaryBuffer.fromString(E).buffer:E,{create:!1,overwrite:!0,encoding:f?.encoding}),await b.stat(a.codeUri)}async updateContent(d,E,f){const a=this.convertUri(d.uri),b=await this.getProvider(a.scheme),y=await b.stat(a.codeUri);if(!y)throw s.FileSystemError.FileNotFound(d.uri,"File not found.");if(y.isDirectory)throw s.FileSystemError.FileIsADirectory(d.uri,"Cannot set the content.");if(!this.checkInSync(d,y))throw this.createOutOfSyncError(d);if(E.length===0)return y;const A=await b.readFile(a.codeUri),S=this.applyContentChanges(c.BinaryBuffer.wrap(A).toString(f?.encoding),E);await b.writeFile(a.codeUri,c.BinaryBuffer.fromString(S).buffer,{create:!1,overwrite:!0,encoding:f?.encoding});const w=await b.stat(a.codeUri);if(!w)throw s.FileSystemError.FileNotFound(a.codeUri.toString(),"File not found.");return w}async createFile(d,E){const f=this.convertUri(d),a=await this.getProvider(f.scheme),b=c.BinaryBuffer.fromString(E?.content||"").buffer;let y=await a.writeFile(f.codeUri,b,{create:!0,overwrite:E&&E.overwrite||!1,encoding:E?.encoding});return y=y||await a.stat(f.codeUri),y}async createFolder(d){const E=this.convertUri(d),f=await this.getProvider(E.scheme),a=await f.createDirectory(E.codeUri);return a||await f.stat(E.codeUri)}async move(d,E,f){const a=this.convertUri(d),b=this.convertUri(E),y=await this.getProvider(a.scheme),A=await y.rename(a.codeUri,b.codeUri,{overwrite:!!(f&&f.overwrite)});return A||await y.stat(b.codeUri)}async copy(d,E,f){const a=this.convertUri(d),b=this.convertUri(E),y=await this.getProvider(a.scheme),A=await this.doGetOverwrite(f);if(!(0,s.containsExtraFileMethod)(y,"copy"))throw this.getErrorProvideNotSupport(a.scheme,"copy");const S=await y.copy(a.codeUri,b.codeUri,{overwrite:!!A});return S||await y.stat(b.codeUri)}async getFsPath(d){if(d.startsWith("file:/"))return c.FileUri.fsPath(d)}fireFilesChange(d){const E=d.changes.map(f=>({uri:f.uri,type:f.type}));this._onFilesChanged.fire(E),this.eventBus.fire(new c.FilesChangeEvent(E))}async watchFileChanges(d,E){const a=(this.appConfig.pollingWatcherDirectories||[]).some(I=>d.path.toString().startsWith(I)),b=this.convertUri(d.toString()),y=this.uriWatcherMap.get(b.toString());if(y)if(y.isDisposed())this.uriWatcherMap.delete(b.toString());else return y;const A=this.watcherId++,S=await this.getProvider(b.scheme),w=this.watcherWithSchemaMap.get(b.scheme)||[],T=await S.watch(b.codeUri,{excludes:E,pollingWatch:a});this.watcherDisposerMap.set(A,{dispose:async()=>{const I=this.uriWatcherMap.get(b.toString());await Promise.all([S.unwatch&&S.unwatch(T),I&&I.dispose()]),this.uriWatcherMap.delete(b.toString())}}),w.push(A),this.watcherWithSchemaMap.set(b.scheme,w);const D=new g.FileSystemWatcher({fileServiceClient:this,watchId:A,uri:d});return this.uriWatcherMap.set(b.toString(),D),D}async setWatchFileExcludes(d){return await(await this.getProvider(p.Schemes.file)).setWatchFileExcludes(d)}async getWatchFileExcludes(){return await(await this.getProvider(p.Schemes.file)).getWatchFileExcludes()}async setFilesExcludes(d,E){this.filesExcludes=d,this.filesExcludesMatcherList=[],E&&this.setWorkspaceRoots(E),this.updateExcludeMatcher()}async setWorkspaceRoots(d){this.workspaceRoots=d,this.updateExcludeMatcher()}async unwatchFileChanges(d){const E=this.watcherDisposerMap.get(d);if(!(!E||!E.dispose))return this.watcherDisposerMap.delete(d),E.dispose()}async delete(d,E){if(this.appConfig.isElectronRenderer&&E?.moveToTrash!==!1){const b=new c.URI(d);if(b.scheme===p.Schemes.file)return this.injector.get(v.IElectronMainUIService).moveToTrash(b.codeUri.fsPath)}const f=this.convertUri(d),a=await this.getProvider(f.scheme);await a.stat(f.codeUri),await a.delete(f.codeUri,{recursive:!0,moveToTrash:await this.doGetMoveToTrash(E)})}async getEncoding(d){return"utf8"}listCapabilities(){return _.Iterable.map(this.fsProviders,([d,E])=>({scheme:d,capabilities:E.capabilities}))}registerProvider(d,E){if(this.fsProviders.has(d))throw new Error(`The file system provider for \`${d}\` already registered`);const f=[];this.fsProviders.set(d,E),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:d,provider:E}),f.push({dispose:()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:d,provider:E}),this.fsProviders.delete(d),this._providerChanged.add(d)}}),E.onDidChangeFile&&f.push(E.onDidChangeFile(b=>this.fireFilesChange({changes:b}))),this.toDisposable.push(E.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:E,scheme:d}))),f.push({dispose:async()=>{const b=[];(this.watcherWithSchemaMap.get(d)||[]).forEach(y=>b.push(this.unwatchFileChanges(y))),await Promise.all(b)}}),this._providerChanged.add(d),this.onFileProviderChangedEmitter.fire(Array.from(this._providerChanged)),this.toDisposable.pushAll(f);const a=new c.DisposableCollection;return a.pushAll(f),this._onFileProviderChanged.fire(Array.from(this._providerChanged)),a}async access(d,E=s.FileAccess.Constants.F_OK){const f=this.convertUri(d),a=await this.getProvider(f.scheme);if(!(0,s.containsExtraFileMethod)(a,"access")){if(E===s.FileAccess.Constants.F_OK)try{return!!await a.stat(f.codeUri)}catch{return!1}throw this.getErrorProvideNotSupport(f.scheme,"access")}return await a.access(f.codeUri,E)}async getFileType(d){const E=this.convertUri(d),f=await this.getProvider(E.scheme);if(!(0,s.containsExtraFileMethod)(f,"getFileType"))throw this.getErrorProvideNotSupport(E.scheme,"getFileType");return await f.getFileType(d)}async getCurrentUserHome(){return this.userHomeDeferred.promise}getErrorProvideNotSupport(d,E){return`Scheme ${d} not support this function: ${E}.`}convertUri(d){const E=new c.URI(d);if(!E.scheme)throw new Error(`Unsupported convert Uri with non-scheme Uri: ${d}`);return E}updateExcludeMatcher(){this.filesExcludes.forEach(d=>{this.workspaceRoots.length>0?this.workspaceRoots.forEach(E=>{const a=new c.URI(E).resolve(d).path.toString();this.filesExcludesMatcherList.push((0,c.parseGlob)(a))}):this.filesExcludesMatcherList.push((0,c.parseGlob)(d))})}async shouldWaitProvider(d){const E=await this._onWillActivateFileSystemProvider.fireAndAwait({scheme:d}),{result:f}=E[0];if(f&&f.includes(d)){const a=await c.Event.toPromise(c.Event.filter(this.onFileProviderChanged,b=>b.includes(d)));if(!(0,p.isUndefined)(a))return!0}return!1}async getProvider(d){this._providerChanged.has(d)&&(await this.eventBus.fireAndAwait(new c.ExtensionActivateEvent({topic:"onFileSystem",data:d}),{timeout:3e3}),this._providerChanged.delete(d));const E=this.fsProviders.get(d);if(!E)throw new Error(`Not find ${d} provider.`);return E}async isReadonly(d){try{const E=new c.URI(d);return!!(await(await this.getProvider(E.scheme)).stat(this.convertUri(d).codeUri)).readonly}catch{return!1}}isExclude(d){const E=new c.URI(d);return this.filesExcludesMatcherList.some(f=>f(E.path.toString()))}filterStat(d,E=!0){if(d&&!this.isExclude(d.uri))return d.children&&E&&(d.children=this.filterStatChildren(d.children)),d}filterStatChildren(d){const E=[];return d.forEach(f=>{if(this.isExclude(f.uri))return!1;const a=this.filterStat(f);a&&E.push(a)}),E}applyContentChanges(d,E){let f=r.TextDocument.create("","",1,d);for(const a of E){let b=a.text;if(a.range){const y=f.offsetAt(a.range.start),A=f.offsetAt(a.range.end);b=f.getText().substr(0,y)+a.text+f.getText().substr(A)}f=r.TextDocument.create(f.uri,f.languageId,f.version,b)}return f.getText()}async isInSync(d,E){return!!this.checkInSync(d,E)}checkInSync(d,E){return E.lastModification===d.lastModification&&E.size===d.size}createOutOfSyncError(d){return s.FileSystemError.FileIsOutOfSync(d.uri)}async doGetEncoding(d){return d&&typeof d.encoding<"u"?d.encoding:this.options.encoding}async doGetOverwrite(d){return d&&typeof d.overwrite<"u"?d.overwrite:this.options.overwrite}async doGetRecursive(d){return d&&typeof d.recursive<"u"?d.recursive:this.options.recursive}async doGetMoveToTrash(d){return d&&typeof d.moveToTrash<"u"?d.moveToTrash:this.options.moveToTrash}};t.FileServiceClient=h,n.__decorate([(0,o.Autowired)(s.IBrowserFileSystemRegistry),n.__metadata("design:type",l)],h.prototype,"registry",void 0),n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(p.IEventBus),n.__metadata("design:type",Object)],h.prototype,"eventBus",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(m.IApplicationService),n.__metadata("design:type",Object)],h.prototype,"applicationService",void 0),t.FileServiceClient=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},69037:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(42933),p=e(2156);let v=class{constructor(){this._disposables=new o.DisposableStore,this._disposables.add(this.fileSystem.registerProvider(o.Schemes.file,this.diskFileServiceProvider))}async initialize(){const _=this.contributionProvider.getContributions();await Promise.all(_.map(async s=>{s.registerProvider&&await s.registerProvider(this.fileSystem)})),await Promise.all(_.map(async s=>{s.onFileServiceReady&&await s.onFileServiceReady()})),this.fileSystem.initialize&&await this.fileSystem.initialize()}dispose(){this._disposables.dispose()}};t.FileServiceContribution=v,n.__decorate([(0,r.Autowired)(c.IFileServiceClient),n.__metadata("design:type",p.FileServiceClient)],v.prototype,"fileSystem",void 0),n.__decorate([(0,r.Autowired)(c.IDiskFileProvider),n.__metadata("design:type",Object)],v.prototype,"diskFileServiceProvider",void 0),n.__decorate([(0,r.Autowired)(o.FsProviderContribution),n.__metadata("design:type",Object)],v.prototype,"contributionProvider",void 0),t.FileServiceContribution=v=n.__decorate([(0,o.Domain)(o.ClientAppContribution),n.__metadata("design:paramtypes",[])],v)},60476:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFsProviderClient=t.CoreFileServiceProviderClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(42933);class p{constructor(){this.onDidChangeFileEmitter=new o.Emitter,this.onDidChangeFile=this.onDidChangeFileEmitter.event}watch(_,s){return this.fileServiceProvider.watch(_,s)}unwatch(_){return this.fileServiceProvider.unwatch&&this.fileServiceProvider.unwatch(_)}async stat(_){return await this.fileServiceProvider.stat(_)}readDirectory(_){return this.fileServiceProvider.readDirectory(_)}createDirectory(_){return this.fileServiceProvider.createDirectory(_)}async readFile(_,s){return s&&(0,o.getDebugLogger)("fileService.fsProvider").warn("encoding option for fsProvider.readFile is deprecated"),await this.fileServiceProvider.readFile(_)}readFileStream(_){if(this.fileServiceProvider.readFileStream)return this.fileServiceProvider.readFileStream(_);throw new Error("readFileStream not supported")}writeFile(_,s,g){return this.fileServiceProvider.writeFile(_,Array.from(s),g)}delete(_,s){return this.fileServiceProvider.delete(_,s)}rename(_,s,g){return this.fileServiceProvider.rename(_,s,g)}}t.CoreFileServiceProviderClient=p,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],p.prototype,"injector",void 0);let v=class extends p{constructor(){super(...arguments),this.onDidChangeCapabilities=o.Event.None}get capabilities(){return this._capabilities||(this._capabilities=12318,o.isLinux&&(this._capabilities|=1024)),this._capabilities}async initialize(_,s){var g,l;if(!((g=this.fileServiceProvider)===null||g===void 0)&&g.initialize)try{await((l=this.fileServiceProvider)===null||l===void 0?void 0:l.initialize(_,s))}catch(h){(0,o.getDebugLogger)("fileService.fsProvider").error("initialize error",h)}}setWatchFileExcludes(_){return this.fileServiceProvider.setWatchFileExcludes(_)}getWatchFileExcludes(){return this.fileServiceProvider.getWatchFileExcludes()}onDidFilesChanged(_){const s=_.changes.map(g=>({uri:g.uri,type:g.type}));this.onDidChangeFileEmitter.fire(s)}copy(_,s,g){return this.fileServiceProvider.copy(_,s,g)}access(_,s){return this.fileServiceProvider.access(_,s)}getCurrentUserHome(){return this.fileServiceProvider.getCurrentUserHome()}getFileType(_){return this.fileServiceProvider.getFileType(_)}};t.DiskFsProviderClient=v,n.__decorate([(0,r.Autowired)(c.DiskFileServicePath),n.__metadata("design:type",Object)],v.prototype,"fileServiceProvider",void 0),n.__decorate([(0,o.debounce)(100),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Array]),n.__metadata("design:returntype",void 0)],v.prototype,"setWatchFileExcludes",null),t.DiskFsProviderClient=v=n.__decorate([(0,r.Injectable)()],v)},96708:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileServiceClientModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(42933),p=e(70671),v=e(2156),m=e(69037),_=e(60476),s=e(23188);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IFileServiceClient,useClass:v.FileServiceClient},{token:c.IBrowserFileSystemRegistry,useClass:v.BrowserFileSystemRegistryImpl},{token:c.IDiskFileProvider,useClass:_.DiskFsProviderClient},{token:c.IShadowFileProvider,useClass:s.ShadowFileSystemProvider},m.FileServiceContribution],this.backServices=[{servicePath:c.DiskFileServicePath,clientToken:c.IDiskFileProvider,protocol:p.DiskFileServiceProtocol}]}};t.FileServiceClientModule=g,t.FileServiceClientModule=g=n.__decorate([(0,r.Injectable)()],g)},23188:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowFileSystemProvider=void 0;const n=e(85608),r=e(76003),o=e(41869);let c=class{constructor(){this.capabilities=2048,this.onDidChangeCapabilities=o.Event.None,this.readonly=!0,this.shadowFiles=new Map,this.fileChangeEmitter=new o.Emitter,this.onDidChangeFile=this.fileChangeEmitter.event}unwatch(v){throw new Error("Method not implemented.")}readFileStream(v){throw new Error("Method not implemented.")}watch(v,m){throw new Error("Method not implemented.")}stat(v){return Promise.resolve({uri:v.toString(),lastModification:0})}readDirectory(v){throw new Error("Method not implemented.")}createDirectory(v){throw new Error("Method not implemented.")}readFile(v){return this.shadowFiles.get(v.toString())||o.BinaryBuffer.fromString("no available").buffer}writeFile(v,m,_){this.shadowFiles.set(v.toString(),m)}delete(v,m){throw new Error("Method not implemented.")}rename(v,m,_){throw new Error("Method not implemented.")}copy(v,m,_){throw new Error("Method not implemented.")}exists(v){throw new Error("Method not implemented.")}access(v,m){throw new Error("Method not implemented.")}};t.ShadowFileSystemProvider=c,t.ShadowFileSystemProvider=c=n.__decorate([(0,r.Injectable)()],c)},81952:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcher=void 0;const n=e(43718);function r(c,p){return c.filter(v=>!!v.uri.startsWith(p))}class o{constructor(p){this.toDispose=new n.DisposableCollection,this.changeEmitter=new n.Emitter,this.toDispose.push(this.changeEmitter),this.fileServiceClient=p.fileServiceClient,this.watchId=p.watchId,this.uri=p.uri,this.fileServiceClient.onFilesChanged(v=>{const m=r(v,this.uri.toString());m&&m.length>0&&this.changeEmitter.fire(m)})}get onFilesChanged(){return this.changeEmitter.event}dispose(){return Promise.all([this.toDispose.dispose(),this.fileServiceClient.unwatchFileChanges(this.watchId)])}isDisposed(){return this.toDispose.disposed}}t.FileSystemWatcher=o},91813:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EXT_LIST_TEXT=t.EXT_LIST_IMAGE=t.EXT_LIST_VIDEO=void 0,t.getFileTypeByExt=e,t.EXT_LIST_VIDEO=new Set(["mp4","webm","mkv","mov","mts","flv","avi","wmv"]),t.EXT_LIST_IMAGE=new Set(["png","gif","jpg","jpeg","svg","bmp","avif","cr2","cr3","dng","flif","heic","icns","jxl","jpm","jpx","nef","raf","rw2","tif","orf","webp","apng"]),t.EXT_LIST_TEXT=new Set(["xml"]);function e(n){let r="text";return n&&(t.EXT_LIST_IMAGE.has(n)?r="image":t.EXT_LIST_VIDEO.has(n)?r="video":t.EXT_LIST_TEXT.has(n)?r="text":r="binary"),r}},79929:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IBrowserFileSystemRegistry=t.IFileServiceClient=void 0;const n=e(43718);t.IFileServiceClient=n.IFileServiceClient,t.IBrowserFileSystemRegistry=Symbol("IBrowserFileSystemRegistry")},49818:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemError=t.FileOperationError=t.FileSystemProviderError=t.FileSystemProviderErrorCode=t.FileAccess=t.IFileService=t.IShadowFileProvider=t.IDiskFileProvider=t.FileStat=t.FileType=void 0,t.createFileSystemProviderError=_,t.markAsFileSystemProviderError=s,t.containsExtraFileMethod=l,t.notEmpty=h,t.isErrnoException=u,t.handleError=d;const n=e(85608),r=e(43718);var o=e(31036);Object.defineProperty(t,"FileType",{enumerable:!0,get:function(){return o.FileType}}),Object.defineProperty(t,"FileStat",{enumerable:!0,get:function(){return o.FileStat}}),n.__exportStar(e(11854),t),t.IDiskFileProvider=Symbol("IDiskFileProvider"),t.IShadowFileProvider=Symbol("IShadowFileProvider"),t.IFileService=Symbol("IFileService");var c;(function(E){let f;(function(a){a.F_OK=0,a.R_OK=4,a.W_OK=2,a.X_OK=1})(f=E.Constants||(E.Constants={}))})(c||(t.FileAccess=c={}));var p;(function(E){E.FileExists="EntryExists",E.FileNotFound="EntryNotFound",E.FileNotADirectory="EntryNotADirectory",E.FileIsADirectory="EntryIsADirectory",E.FileIsOutOfSync="FileIsOutOfSync",E.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",E.FileTooLarge="EntryTooLarge",E.FileWriteLocked="EntryWriteLocked",E.NoPermissions="NoPermissions",E.Unavailable="Unavailable",E.Unknown="Unknown"})(p||(t.FileSystemProviderErrorCode=p={}));class v extends Error{static declare(f,a){return Object.assign((...b)=>_(a(...b),f),{is:b=>{var y;return(y=b.stack)===null||y===void 0?void 0:y.startsWith(f)}})}constructor(f,a){super(f),this.code=a}is(f){return this.name===f.name}}t.FileSystemProviderError=v;class m extends Error{constructor(f,a,b){super(f),this.fileOperationResult=a,this.options=b}static isFileOperationError(f){return f instanceof Error&&!(0,r.isUndefinedOrNull)(f.fileOperationResult)}}t.FileOperationError=m;function _(E,f){const a=new v(E.toString(),f);return s(a,f),a}function s(E,f){return E.name=f?`${f} (FileSystemError)`:"FileSystemError",E}var g;(function(E){E.FileNotFound=v.declare(p.FileNotFound,(f,a)=>`${a?a+" ":""} '${f}' is not found.`),E.FileExists=v.declare(p.FileExists,(f,a)=>`${a?a+" ":""}'${f}' already exists.`),E.FileNotADirectory=v.declare(p.FileNotADirectory,(f,a)=>`${a?a+" ":""}'${f}' is not a directory.`),E.FileIsADirectory=v.declare(p.FileIsADirectory,(f,a)=>`${a?a+" ":""}'${f}' is a directory.`),E.FileIsOutOfSync=v.declare(p.FileIsOutOfSync,(f,a)=>`${a?a+" ":""}'${f}' is out of sync.`),E.FileExceedsMemoryLimit=v.declare(p.FileExceedsMemoryLimit,(f,a)=>`${a?a+" ":""}'${f}' is exceeds memory limit.`),E.FileTooLarge=v.declare(p.FileTooLarge,(f,a)=>`${a?a+" ":""}'${f}' is too large.`),E.FileWriteLocked=v.declare(p.FileWriteLocked,(f,a)=>`${a?a+" ":""}'${f}' is locked.`),E.FileIsNoPermissions=v.declare(p.NoPermissions,(f,a)=>`${a?a+" ":""}'${f}' is no permissions.`),E.Unavailable=v.declare(p.Unavailable,(f,a)=>`${a?a+" ":""}'${f}' is unavailable.`),E.Unknown=v.declare(p.Unknown,(f,a)=>`${a?a+" ":""}'${f}' is unkonw.`)})(g||(t.FileSystemError=g={}));function l(E,f){return(0,r.hasProperty)(E,f)&&(0,r.isFunction)(E[f])}function h(E){return E!==void 0}function u(E){return E.code!==void 0&&E.errno!==void 0}function d(E){var f,a,b,y,A;if(u(E))switch(E.code){case"EEXIST":throw g.FileExists(r.Uri.file((f=E.path)!==null&&f!==void 0?f:""));case"EPERM":case"EACCESS":throw g.FileIsNoPermissions(r.Uri.file((a=E.path)!==null&&a!==void 0?a:""));case"ENOENT":throw g.FileNotFound(r.Uri.file((b=E.path)!==null&&b!==void 0?b:""));case"ENOTDIR":throw g.FileNotADirectory(r.Uri.file((y=E.path)!==null&&y!==void 0?y:""));case"EISDIR":throw g.FileIsADirectory(r.Uri.file((A=E.path)!==null&&A!==void 0?A:""))}throw E}},42933:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79929),t),n.__exportStar(e(49818),t),n.__exportStar(e(28217),t),n.__exportStar(e(91813),t),n.__exportStar(e(50295),t)},70671:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiskFileServiceProtocol=void 0;const n=e(26387),r=e(52890),o=e(50295);t.DiskFileServiceProtocol={name:o.DiskFileServicePath,methods:[{method:"readFile",request:[{name:"uri",type:r.UriComponentsProto}],response:{type:n.Type.binary()}}]}},50295:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileExtServicePath=t.FileWatcherServicePath=t.ShadowFileServicePath=t.DiskFileServicePath=t.FileServicePath=void 0,t.FileServicePath="FileService",t.DiskFileServicePath="DiskFileService",t.ShadowFileServicePath="ShadowFileService",t.FileWatcherServicePath="FileWatcherService",t.FileExtServicePath="FileExtServicePath"},28217:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WatcherProcessManagerProxy=t.WatcherServiceProxy=t.WATCHER_INIT_DATA_KEY=t.SUMI_WATCHER_PROCESS_SOCK_KEY=t.INsfw=void 0;const n=e(86058);var r;(function(o){let c;(function(p){p[p.CREATED=0]="CREATED",p[p.DELETED=1]="DELETED",p[p.MODIFIED=2]="MODIFIED",p[p.RENAMED=3]="RENAMED"})(c=o.actions||(o.actions={}))})(r||(t.INsfw=r={})),t.SUMI_WATCHER_PROCESS_SOCK_KEY="sumi-watcher-process-sock",t.WATCHER_INIT_DATA_KEY="sumi-watcher-init-data",t.WatcherServiceProxy=new n.ProxyIdentifier("WatcherHostServiceImpl"),t.WatcherProcessManagerProxy=new n.ProxyIdentifier("WatcherProcessManagerProxy")},14951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(42933),t)},57942:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(26542),m=e(6250),_=e(2812),s=r.__importDefault(e(89200)),g=e(9018);let l=n=class{static createContainer(u,d){return u.createChild([{token:m.IFileDialogTreeService,useValue:d},{token:m.IFileDialogModel,useClass:n}])}static createModel(u,d){return n.createContainer(u,d).get(m.IFileDialogModel)}constructor(){this.selectedDecoration=new c.Decoration(s.default.mod_selected),this.focusedDecoration=new c.Decoration(s.default.mod_focused),this.loadingDecoration=new c.Decoration(s.default.mod_loading),this.cutDecoration=new c.Decoration(s.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new p.DisposableCollection,this.onDidFocusedFileChangeEmitter=new p.Emitter,this.onDidSelectedFileChangeEmitter=new p.Emitter,this.clearFileSelectedDecoration=()=>{this._selectedFiles.forEach(u=>{this.selectedDecoration.removeTarget(u)}),this._selectedFiles=[],this.onDidSelectedFileChangeEmitter.fire([])},this.activeFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles=[u],this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.selectFileDecoration=(u,d=!0)=>{u!==this.treeModel.root&&(this.preContextMenuFocusedFile&&(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile),this.preContextMenuFocusedFile=null),u&&(this.selectedFiles.length>0&&this.selectedFiles.forEach(E=>{this.selectedDecoration.removeTarget(E)}),this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.selectedDecoration.addTarget(u),this._selectedFiles=[u],this.onDidSelectedFileChangeEmitter.fire([u.uri]),d&&this.treeModel.dispatchChange()))},this.activeFileFocusedDecoration=(u,d=!1)=>{u!==this.treeModel.root&&(this.focusedFile!==u&&(d?(this.preContextMenuFocusedFile?(this.focusedDecoration.removeTarget(this.preContextMenuFocusedFile),this.selectedDecoration.removeTarget(this.preContextMenuFocusedFile)):this.focusedFile&&this.focusedDecoration.removeTarget(this.focusedFile),this.preContextMenuFocusedFile=u):this.focusedFile&&(this.preContextMenuFocusedFile=null,this.focusedDecoration.removeTarget(this.focusedFile)),u&&(this.selectedDecoration.addTarget(u),this.focusedDecoration.addTarget(u),this._focusedFile=u,this._selectedFiles.push(u),this.onDidFocusedFileChangeEmitter.fire(u.uri),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)))),this.treeModel.dispatchChange())},this.activeFileSelectedDecoration=u=>{this._selectedFiles.indexOf(u)>-1||(this._selectedFiles.push(u),this.selectedDecoration.addTarget(u),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(d=>d.uri)),this.treeModel.dispatchChange())},this.activeFileDecorationByRange=(u,d)=>{for(this.clearFileSelectedDecoration(),this.preContextMenuFocusedFile=null;u<=d;u++){const E=this.treeModel.root.getTreeNodeAtIndex(u);E&&(this._selectedFiles.push(E),this.selectedDecoration.addTarget(E))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(E=>E.uri)),this.treeModel.dispatchChange()},this.enactiveFileDecoration=()=>{this.focusedFile&&(this.focusedDecoration.removeTarget(this.focusedFile),this.onDidFocusedFileChangeEmitter.fire(),this.treeModel.dispatchChange()),this._focusedFile=void 0},this.toggleDirectory=async u=>{u.expanded?this.fileTreeHandle.collapseNode(u):this.fileTreeHandle.expandNode(u)},this.handleTreeBlur=()=>{this.enactiveFileDecoration()},this.handleTreeFocus=()=>{},this.handleItemRangeClick=(u,d)=>{if(!this.focusedFile)this.handleItemClick(u,d);else if(this.focusedFile&&this.focusedFile!==u){const E=this.treeModel.root.getIndexAtTreeNode(u),f=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);f>E?this.activeFileDecorationByRange(E,f):f<E&&this.activeFileDecorationByRange(f,E)}},this.handleItemToggleClick=(u,d)=>{d!==c.TreeNodeType.CompositeTreeNode&&d!==c.TreeNodeType.TreeNode||(this.selectedFiles.indexOf(u)>-1?this.focusedFile===u?this.enactiveFileDecoration():this.activeFileFocusedDecoration(u):this.activeFileSelectedDecoration(u))},this.handleItemClick=(u,d)=>{this.clickTimes++,(d===c.TreeNodeType.CompositeTreeNode||d===c.TreeNodeType.TreeNode)&&this.activeFileDecoration(u),d===c.TreeNodeType.CompositeTreeNode&&this.corePreferences["workbench.list.openMode"]==="singleClick"&&this.toggleDirectory(u),this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=setTimeout(()=>{this.clickTimes>1&&d!==c.TreeNodeType.TreeNode&&this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(u),this.clickTimes=0},200)},this.getDirectoryList=()=>this.fileTreeDialogService.getDirectoryList(),this._whenReady=this.initTreeModel()}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get whenReady(){return this._whenReady}get focusedFile(){return this._focusedFile}get selectedFiles(){return this._selectedFiles}async initTreeModel(){const u=(await this.fileTreeDialogService.resolveChildren())[0];this._treeModel=this.injector.get(_.FileTreeModel,[u]),this.initDecorations(u),this.disposableCollection.push(this._decorations),this.disposableCollection.push(this.labelService.onDidChange(()=>{this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,d=>{this.loadingDecoration.addTarget(d)})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,d=>{this.loadingDecoration.removeTarget(d)}))}async updateTreeModel(u){const d=await this.fileTreeDialogService.resolveRoot(u);if(d&&d.length>0){const E=d[0];this._treeModel=this.injector.get(_.FileTreeModel,[E]),this.clearFileSelectedDecoration(),this.initDecorations(E)}}initDecorations(u){this._decorations&&this._decorations.dispose(),this._decorations=new c.DecorationsManager(u),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}handleTreeHandler(u){this._fileTreeHandle=u}dispose(){this.disposableCollection.dispose()}};t.FileTreeDialogModel=l,l.FILE_TREE_SNAPSHOT_KEY="FILE_TREE_SNAPSHOT",l.DEFAULT_LOCATION_FLUSH_DELAY=500,r.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),r.__metadata("design:type",o.Injector)],l.prototype,"injector",void 0),r.__decorate([(0,o.Autowired)(m.IFileDialogTreeService),r.__metadata("design:type",g.FileTreeDialogService)],l.prototype,"fileTreeDialogService",void 0),r.__decorate([(0,o.Autowired)(v.LabelService),r.__metadata("design:type",v.LabelService)],l.prototype,"labelService",void 0),r.__decorate([(0,o.Autowired)(p.CorePreferences),r.__metadata("design:type",Object)],l.prototype,"corePreferences",void 0),t.FileTreeDialogModel=l=n=r.__decorate([(0,o.Injectable)(),r.__metadata("design:paramtypes",[])],l)},69748:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeDialogNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(97267),p=e(41869),v=e(69959),m=n.__importDefault(e(89200)),_=({item:s,onClick:g,itemType:l,labelService:h,leftPadding:u=8,onTwistierClick:d,decorations:E,defaultLeftPadding:f=8,template:a})=>{const b=l===c.TreeNodeType.RenamePrompt,y=l===c.TreeNodeType.NewPrompt,A=b||y,S=(0,p.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),w=(0,p.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),T=W=>{(l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode)&&g(W,s,l)},D=W=>{(l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode)&&(d?d(W,s,l):g(W,s,l))},I=l===c.TreeNodeType.CompositeTreeNode;let O;A?y?O=`${f+(s.parent.depth+1||0)*(u||0)}px`:O=`${f+(s.target.depth||0)*(u||0)}px`:O=I?`${f+(s.depth||0)*(u||0)}px`:`${f+(s.depth||0)*(u||0)+8}px`;const M={height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:O},R=(W,U)=>{if(E&&E?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(c.Loading,null);if(A&&W instanceof c.PromptHandle){let Q=!1;if(b?Q=W.target.type===c.TreeNodeType.CompositeTreeNode:Q=W.type===c.TreeNodeType.CompositeTreeNode,Q)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,S,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:y||!(b&&W.target.type===c.TreeNodeType.CompositeTreeNode&&W.target.expanded)})})}else return o.default.createElement("div",{onClick:U,className:(0,r.default)(m.default.file_tree_node_segment,S,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!W.expanded})})},P=W=>{let U,Q;A&&W instanceof c.PromptHandle?W instanceof c.RenamePromptHandle?(U=W.target.uri.resolve(W.$.value),Q=v.Directory.is(W.target)):(U=W.parent.uri.resolve(W.$.value),Q=W.type===c.TreeNodeType.CompositeTreeNode):(U=W.uri,Q=W.filestat.isDirectory);const V=h.getIcon(U,{isDirectory:Q});return o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,V,{expanded:Q&&W.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},k=W=>a?o.default.createElement(a,null):A&&W instanceof c.PromptHandle?o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(W.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}}))):o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},W.name),F=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},L()),L=()=>null,B=W=>{if(I)return R(W,D);if(A)return R(W,()=>{})},j=()=>s.tooltip||s.name;return o.default.createElement("div",{key:s.id,onClick:T,title:j(),className:(0,r.default)(w,E?E.classlist:null),style:M,draggable:l===c.TreeNodeType.TreeNode||l===c.TreeNodeType.CompositeTreeNode},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},B(s),P(s),o.default.createElement("div",{className:A?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},k(s)),F()))};t.FileTreeDialogNode=_,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},68195:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialogContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(66e3);let p=class{initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.fileDialogViewVisibleContext=c.FileDialogViewVisibleContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileDialogContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.FileDialogContextKey=p=n.__decorate([(0,r.Injectable)()],p)},9018:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDialogService=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(41869),p=e(26542),v=e(54414),m=e(14951),_=e(72665),s=e(51500),g=e(6250),l=e(57781),h=e(97738),u=e(68195);let d=class extends o.Tree{constructor(f){super(),this._whenReady=this.resolveWorkspaceRoot(f)}get whenReady(){return this._whenReady}async resolveWorkspaceRoot(f){if(f){const a=new c.URI(f).withScheme(c.Schemes.file),b=await this.fileTreeAPI.resolveFileStat(a);b&&(this.workspaceRoot=b)}}async resolveChildren(f){if(f){if(f.uri){const{children:a}=await this.fileTreeAPI.resolveChildren(this,f.uri.toString(),f);return a}}else{this.workspaceRoot||(this.workspaceRoot=(await this.workspaceService.roots)[0]);const{children:a}=await this.fileTreeAPI.resolveChildren(this,this.workspaceRoot);return this.root=a[0],a}return[]}async resolveRoot(f){let a;/^file:\/\//.test(f)&&(a=new c.URI(f)),a=c.URI.file(f);const b=await this.fileTreeAPI.resolveFileStat(a);if(b){const{children:y}=await this.fileTreeAPI.resolveChildren(this,b);return this.root=y[0],y}}getDirectoryList(){const f=[];if(!this.root)return f;let a=new c.URI(this.workspaceRoot.uri);if(a&&a.parent)for(;a.parent;){const b=a.codeUri.fsPath;if(f.indexOf(b)>=0)break;f.push(b),a=a.parent}else f.push(a.codeUri.fsPath.toString());return f}sortComparator(f,a){return f.constructor===a.constructor?f.name.startsWith(".")&&!a.name.startsWith(".")?1:!f.name.startsWith(".")&&a.name.startsWith(".")?-1:f.name.localeCompare(a.name,"kn",{numeric:!0}):f.type===o.TreeNodeType.CompositeTreeNode?-1:a.type===o.TreeNodeType.CompositeTreeNode?1:0}initContextKey(f){f&&this.fileDialogContextKey.initScopedContext(f)}get contextKey(){return this.fileDialogContextKey}async saveAs(f){const{oldFilePath:a,newFilePath:b}=f;if(!a||!b)throw new Error("oldFilePath and newFilePath are required");await this.createFile(f);try{const y=c.URI.file(f.newFilePath),A={preview:!1,focus:!0,replace:!0,forceClose:!0,disableNavigate:!1};await this.workbenchEditorService.open(y,A),await this.fileTreeModelService.clearFileSelectedDecoration();const S=this.fileTreeService.getNodeByPathOrUri(y);S&&await this.fileTreeModelService.activeFileDecoration(S)}catch(y){throw new Error(`Failed to open saveAs file: ${y.message}`)}}async createFile(f){try{const{oldFilePath:a,newFilePath:b}=f;if(!await this.fileServiceClient.getFileStat(a))throw new Error(`Source file not found: ${a}`);const{content:A}=await this.fileServiceClient.readFile(a);await this.fileServiceClient.createFile(b,{content:A.toString(),encoding:"utf8",overwrite:!0})}catch(a){throw new Error(`Failed to create file: ${a.message}`)}}renderCustomMsg(){return null}async getDefaultFilePath(f,a){return a}dispose(){super.dispose()}};t.FileTreeDialogService=d,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],d.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],d.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(p.LabelService),n.__metadata("design:type",p.LabelService)],d.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileDialogContextKey),n.__metadata("design:type",u.FileDialogContextKey)],d.prototype,"fileDialogContextKey",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(v.WorkbenchEditorService),n.__metadata("design:type",v.WorkbenchEditorService)],d.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(_.IDialogService),n.__metadata("design:type",Object)],d.prototype,"dialogService",void 0),n.__decorate([(0,r.Autowired)(h.FileTreeModelService),n.__metadata("design:type",h.FileTreeModelService)],d.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(g.IFileTreeService),n.__metadata("design:type",l.FileTreeService)],d.prototype,"fileTreeService",void 0),t.FileTreeDialogService=d=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__param(0,(0,r.Optional)()),n.__metadata("design:paramtypes",[String])],d)},51888:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileDialog=t.FILE_TREE_DIALOG_HEIGHT=void 0;const n=e(85608),r=n.__importStar(e(14041)),o=e(97267),c=e(41869),p=e(68974),v=e(72665),m=e(69748),_=n.__importDefault(e(13294));t.FILE_TREE_DIALOG_HEIGHT=22;const s=({options:g,model:l,isOpenDialog:h,fileService:u})=>{const d=(0,c.useInjectable)(v.IDialogService),E=(0,r.useRef)(null),[f,a]=(0,r.useState)(g.defaultFileName||""),[b,y]=(0,r.useState)(!1),[A,S]=(0,r.useState)(""),[w,T]=(0,r.useState)([]),D=(0,r.useRef)(g.defaultFileName||"");(0,r.useEffect)(()=>{var ie;return l&&(y(!1),R(),(ie=u.contextKey.fileDialogViewVisibleContext)===null||ie===void 0||ie.set(!0)),()=>{l.dispose()}},[l]),(0,r.useEffect)(()=>{g.defaultFileName&&(a(g.defaultFileName||""),D.current=g.defaultFileName||"")},[g]),(0,r.useEffect)(()=>{if(b){const ie=l.getDirectoryList();T(ie)}},[b]);const I=(0,r.useCallback)(()=>{const ie=l.selectedFiles.map(oe=>oe.uri.path.toString());if(D.current&&g.showNameInput&&(ie?.length===1||g.defaultUri)){const oe=ie?.length===1?ie[0]:g.defaultUri.path.toString();g?.saveAs&&u.saveAs({oldFilePath:c.path.join(oe,g?.defaultFileName||""),newFilePath:c.path.join(oe,D.current)}),d.hide([c.path.join(oe,D.current)])}else ie.length>0?d.hide(ie):A?d.hide([A]):g.defaultUri?d.hide([g.defaultUri.path.toString()]):l.treeModel&&l.treeModel.root?d.hide([l.treeModel.root.uri.path.toString()]):d.hide([]);y(!1),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d,l,g,A]),O=async ie=>{let oe=ie.treeModel.root.uri.codeUri.fsPath;return u.getDefaultFilePath&&(oe=await u.getDefaultFilePath(ie,oe)),oe},M=(0,r.useCallback)(()=>{y(!1),d.hide(),u.contextKey.fileDialogViewVisibleContext.set(!1)},[b,d]),R=(0,r.useCallback)(async()=>{await l.whenReady,await l.treeModel.ensureReady;const ie=await O(l);S(ie),y(!0)},[l,A,b]),P=!h,k=(0,r.useCallback)(ie=>{l.handleTreeHandler({...ie,getModel:()=>l.treeModel})},[l]),F=(0,r.useCallback)((ie,oe)=>{ie.stopPropagation();const{toggleDirectory:le}=l;le(oe)},[l]),L=(0,r.useCallback)(ie=>B(ie)?!1:ie.shiftKey,[]),B=(0,r.useCallback)(ie=>{const{metaKey:oe,ctrlKey:le}=ie;return c.isMacintosh&&oe||le},[]),j=(0,r.useCallback)((ie,oe,le)=>{var pe;ie.stopPropagation();const{handleItemClick:q,handleItemToggleClick:Ee,handleItemRangeClick:_e}=l;if(!oe)return;const te=L(event),ge=B(event);if(te&&!P&&g.canSelectMany)_e(oe,le);else if(ge&&!P&&g.canSelectMany)Ee(oe,le);else if(P)le===o.TreeNodeType.CompositeTreeNode&&q(oe,le);else if(g.canSelectFiles&&le===o.TreeNodeType.TreeNode){const Te=new Set(Object.values((pe=g.filters)!==null&&pe!==void 0?pe:{}).flat().map(Pe=>`.${Pe}`));if(Te.size>0){const Pe=c.URI.parse(oe.filestat.uri).path.ext;Te.has(Pe)&&q(oe,le)}else q(oe,le)}else g.canSelectFolders&&le===o.TreeNodeType.CompositeTreeNode&&q(oe,le)},[l,P,g]),W=(0,r.useCallback)(async ie=>{y(!1),S(ie),await l.updateTreeModel(ie),y(!0)},[l,b,A]),U=(0,r.useCallback)(async ie=>{y(!1),S(ie),await l.updateTreeModel(ie),y(!0)},[l,b,A,w]),Q=(0,r.useCallback)(()=>u.renderCustomMsg?u.renderCustomMsg():null,[u.renderCustomMsg]),V=(0,r.useCallback)(ie=>r.default.createElement(m.FileTreeDialogNode,{item:ie.item,itemType:ie.itemType,labelService:l.labelService,decorations:l.decorations.getDecorations(ie.item),onClick:j,onTwistierClick:F,defaultLeftPadding:8,leftPadding:8}),[l.treeModel]),$=(0,r.useCallback)(()=>{if(b){if(l.treeModel)return r.default.createElement(o.RecycleTree,{height:300,itemHeight:t.FILE_TREE_DIALOG_HEIGHT,onReady:k,model:l.treeModel},V)}else return r.default.createElement(p.Progress,{loading:!0})},[b,l]),Y=(0,r.useMemo)(()=>u.showFilePathSearch!==!1,[u.showFilePathSearch]),z=(0,r.useCallback)(()=>{if(w.length>0)return r.default.createElement(o.Select,{onChange:W,onSearchChange:U,className:_.default.select_control,size:"large",searchPlaceholder:A,value:A,showSearch:Y},w.map((ie,oe)=>r.default.createElement(o.Option,{value:ie,key:`${oe} - ${ie}`},ie)))},[w,A]),H=(0,r.useCallback)(ie=>{const{key:oe}=c.KeyCode.createKeyCode(ie),le=ie.shiftKey||ie.metaKey||ie.altKey||ie.ctrlKey;oe&&c.Key.ENTER.keyCode===oe.keyCode&&!le&&I()},[I]);(0,r.useEffect)(()=>{var ie;return E.current&&(u.initContextKey(E.current),u.contextKey.fileDialogViewVisibleContext.set(!0),(ie=E.current)===null||ie===void 0||ie.addEventListener("keyup",H)),()=>{var oe;(oe=E.current)===null||oe===void 0||oe.removeEventListener("keyup",H)}},[]);const K=(0,r.useMemo)(()=>r.default.createElement(r.default.Fragment,null,Q(),r.default.createElement("div",{className:_.default.file_dialog_directory},z()),r.default.createElement("div",{className:_.default.file_dialog_content},$())),[z,$]),Z=(0,r.useMemo)(()=>r.default.createElement("div",{className:_.default.file_dialog_buttons},r.default.createElement(o.Button,{onClick:M,type:"ghost",className:_.default.button},(0,c.localize)("dialog.file.close")),r.default.createElement(o.Button,{onClick:I,type:"primary",className:_.default.button,disabled:P&&g.showNameInput&&f.length===0},h&&g.openLabel||(0,c.localize)("dialog.file.ok"))),[M,I,P,h,f,g]),X=(0,r.useCallback)(ie=>{a(ie.target.value),D.current=ie.target.value},[f]);return r.default.createElement("div",{className:_.default.file_dialog_wrapper,ref:E},r.default.createElement("div",{className:_.default.file_dialog_directory_title},h?g.title||(0,c.localize)("dialog.file.openLabel"):g.saveLabel||(0,c.localize)("dialog.file.saveLabel")),K,!h&&g.showNameInput&&r.default.createElement("div",{className:_.default.file_dialog_file_container},r.default.createElement("span",{className:_.default.file_dialog_file_name},(0,c.localize)("dialog.file.name"),": "),r.default.createElement(o.Input,{size:"small",value:f,autoFocus:!0,selection:{start:0,end:f.indexOf(".")||f.length},onChange:X})),Z)};t.FileDialog=s},89508:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowDialogServiceImpl=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(76003),c=e(41869),p=e(37406),v=e(14951),m=e(72665),_=e(57942),s=n.__importDefault(e(13294)),g=e(9018),l=e(51888);let h=class{constructor(){this.idx=1,this._whenReady=this.init()}async init(){this.recentGlobalStorage=await this.storageProvider(c.STORAGE_NAMESPACE.GLOBAL_RECENT_DATA);const d=await this.recentGlobalStorage.get("RECENT_DIALOG_DEFAULT_URI");if(d)this._defaultUri=new c.URI(d);else{const E=await this.fileServiceClient.getCurrentUserHome();this._defaultUri=new c.URI(E.uri)}}get defaultUri(){return this._defaultUri}get whenReady(){return this._whenReady}async updateRecentDefaultUri(d){this.recentGlobalStorage.set("RECENT_DIALOG_DEFAULT_URI",d.toString()),this._defaultUri=d}async showOpenDialog(d={}){this.dialogService.reset(),await this.whenReady;const E={canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1};if(this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const f=this.injector.get(p.IElectronMainUIService),a=[];d.canSelectFiles&&a.push("openFile"),d.canSelectFolders&&a.push("openDirectory"),d.canSelectMany&&a.push("multiSelections"),c.isMacintosh&&a.push("treatPackageAsDirectory","createDirectory");const b=d.defaultUri||this.defaultUri,y=await f.showOpenDialog(c.electronEnv.currentWindowId,{defaultPath:b.codeUri.fsPath,title:d.title,buttonLabel:d.openLabel,properties:a});if(y&&y.length>0){const A=y.map(S=>c.URI.file(S));return this.updateRecentDefaultUri(A[0].parent),A}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let f;d.defaultUri?f=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):f=this.injector.get(g.FileTreeDialogService),await f.whenReady;const a=_.FileTreeDialogModel.createModel(this.injector,f),b=await this.dialogService.open({message:r.default.createElement(l.FileDialog,{key:this.idx++,fileService:f,model:a,options:{...E,...d},isOpenDialog:!0}),type:c.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),b&&b.length>0){const y=b.map(A=>c.URI.file(A));return this.updateRecentDefaultUri(y[0].parent),y}else return}}async showSaveDialog(d={}){if(await this.whenReady,this.appConfig.isElectronRenderer&&!this.appConfig.isRemote){const E=d.defaultUri||this.defaultUri,a=await this.injector.get(p.IElectronMainUIService).showSaveDialog(c.electronEnv.currentWindowId,{defaultPath:E.resolve(d.defaultFileName||"").codeUri.fsPath,title:d.saveLabel,message:d.saveLabel});if(a){const b=c.URI.file(a);return this.updateRecentDefaultUri(b.parent),b}else return}else{d.defaultUri||(d.defaultUri=this.defaultUri);let E;d.defaultUri?E=this.injector.get(g.FileTreeDialogService,[d.defaultUri.toString()]):E=this.injector.get(g.FileTreeDialogService),await E.whenReady;const f=_.FileTreeDialogModel.createModel(this.injector,E),a=await this.dialogService.open({message:r.default.createElement(l.FileDialog,{key:this.idx++,fileService:E,model:f,options:d,isOpenDialog:!1}),type:c.MessageType.Empty,buttons:[],closable:!0,props:{className:s.default.file_dialog_wrapper}});if(this.dialogService.reset(),a&&a.length>0){const b=c.URI.file(a[0]);return this.updateRecentDefaultUri(b.parent),b}else return}}};t.WindowDialogServiceImpl=h,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],h.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(m.IDialogService),n.__metadata("design:type",Object)],h.prototype,"dialogService",void 0),n.__decorate([(0,o.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],h.prototype,"fileServiceClient",void 0),n.__decorate([(0,o.Autowired)(c.StorageProvider),n.__metadata("design:type",Function)],h.prototype,"storageProvider",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],h.prototype,"appConfig",void 0),t.WindowDialogServiceImpl=h=n.__decorate([(0,o.Injectable)(),n.__metadata("design:paramtypes",[])],h)},88014:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileContextKey=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(16413);let p=class{constructor(){this.explorerResourceIsFolder=c.ExplorerResourceIsFolderContext.bind(this.globalContextKeyService),this.explorerViewletVisibleContext=c.ExplorerViewletVisibleContext.bind(this.globalContextKeyService)}initScopedContext(m){this._contextKeyService=this.globalContextKeyService.createScoped(m),this.explorerFocused=c.ExplorerFocusedContext.bind(this._contextKeyService),this.explorerResourceCut=c.ExplorerResourceCut.bind(this._contextKeyService),this.filesExplorerFocused=c.FilesExplorerFocusedContext.bind(this._contextKeyService),this.filesExplorerInputFocused=c.FilesExplorerInputFocusedContext.bind(this._contextKeyService),this.filesExplorerFilteredContext=c.FilesExplorerFilteredContext.bind(this._contextKeyService),this.explorerCompressedFocusContext=c.ExplorerCompressedFocusContext.bind(this._contextKeyService),this.explorerCompressedFirstFocusContext=c.ExplorerCompressedFirstFocusContext.bind(this._contextKeyService),this.explorerCompressedLastFocusContext=c.ExplorerCompressedLastFocusContext.bind(this._contextKeyService)}get service(){return this._contextKeyService}};t.FileContextKey=p,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],p.prototype,"globalContextKeyService",void 0),t.FileContextKey=p=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],p)},40439:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeContribution=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(16413),p=e(93899),v=e(68969),m=e(98295),_=e(41893),s=e(54414),g=e(32595),l=e(63067),h=e(58296),u=e(72665),d=e(55121),E=e(51500),f=e(6250),a=e(69959),b=e(56384),y=e(57781),A=e(97738),S=e(4446);let w=class{constructor(){this._disposables=new o.DisposableStore,this.isRendered=!1,this.deleteThrottler=new o.Throttler,this.willDeleteUris=[]}initialize(){this.workspaceService.initFileServiceExclude().then(async()=>{await this.fileTreeService.init(),this.fileTreeModelService.initTreeModel()}),this.progressService.registerProgressIndicator(g.EXPLORER_CONTAINER_ID)}async onStart(){this.viewsRegistry.registerViewWelcomeContent(f.RESOURCE_VIEW_ID,{content:(0,o.formatLocalize)("welcome-view.noFolderHelp",o.FILE_COMMANDS.OPEN_FOLDER.id),group:h.ViewContentGroups.Open,order:1}),this.mainLayoutService.collectViewComponent({id:f.RESOURCE_VIEW_ID,name:this.getWorkspaceTitle(),weight:3,priority:9,collapsed:!1,component:b.FileTree},g.EXPLORER_CONTAINER_ID),this._disposables.add(this.workspaceService.onWorkspaceLocationChanged(()=>{const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);D&&D.updateViewTitle(f.RESOURCE_VIEW_ID,this.getWorkspaceTitle())}))}onDidStart(){const D=this.injector.get(S.SymlinkDecorationsProvider,[this.fileTreeService]);this.decorationService.registerDecorationsProvider(D)}onDidRender(){this.isRendered=!0;const D=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);D&&(this.fileTreeModelService.whenReady.then(()=>{this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(D.isActivated())}),D.onActivate(()=>{this.fileTreeModelService.performLocationOnHandleShow(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!0)}),D.onInActivate(()=>{this.fileTreeModelService.handleTreeBlur(),this.fileTreeModelService.contextKey.explorerViewletVisibleContext.set(!1)}))}getWorkspaceTitle(){let D=(0,o.localize)("file.empty.defaultTitle");const I=this.workspaceService.workspace;return I&&(D=new o.URI(I.uri).displayName,!I.isDirectory&&D.endsWith(`.${this.workspaceService.workspaceSuffixName}`)&&(D=D.slice(0,D.lastIndexOf(".")),D===E.UNTITLED_WORKSPACE))?(0,o.localize)("file.workspace.defaultTip"):D}onReconnect(){this.fileTreeService.reWatch()}revealFile(D){if(D)if(this.isRendered){const I=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!I||!I.isVisible||I.isCollapsed(f.RESOURCE_VIEW_ID)?this.fileTreeModelService.locationOnShow(D):this.fileTreeModelService.location(D)}else this.fileTreeModelService.locationOnShow(D)}registerMenus(D){D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new")},order:1,group:"0_new"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new")},order:2,group:"0_new"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.removeFolderFromWorkspace")},order:1,group:"0_workspace",when:"config.workspace.supportMultiRootWorkspace"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_RESOURCES.id,label:(0,o.localize)("file.open")},order:1,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TO_THE_SIDE.id,label:(0,o.localize)("file.open.side")},order:2,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TYPE_WITH.id,label:(0,o.localize)("file.open.type")},order:3,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH.id,label:(0,o.localize)("file.filetree.openTerminalWithPath")},when:"workbench.panel.terminal",order:4,group:"1_open"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.SEARCH_ON_FOLDER.id,label:(0,o.localize)("file.search.folder")},order:1,group:"2_search"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.DELETE_FILE.id,label:(0,o.localize)("file.delete")},order:1,group:"7_modification"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.RENAME_FILE.id,label:(0,o.localize)("file.rename")},order:3,group:"7_modification"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COMPARE_SELECTED.id,label:(0,o.localize)("file.compare")},order:2,group:"3_compare"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_FILE.id,label:(0,o.localize)("file.copy.file")},order:1,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.CUT_FILE.id,label:(0,o.localize)("file.cut.file")},order:2,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.PASTE_FILE.id,label:(0,o.localize)("file.paste.file")},order:3,group:"5_cutcopypaste"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_PATH.id,label:(0,o.localize)("file.copy.path")},group:"6_copypath"}),D.registerMenuItem(p.MenuId.ExplorerContext,{command:{id:o.FILE_COMMANDS.COPY_RELATIVE_PATH.id,label:(0,o.localize)("file.copy.relativepath")},group:"6_copypath"})}registerCommands(D){const I=()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()};D.registerCommand(o.FILE_COMMANDS.OPEN_TERMINAL_WITH_PATH,{execute:M=>{let R=M;if(!R)return;const P=this.fileTreeService.getNodeByPathOrUri(R);P&&!P.filestat.isDirectory&&(R=P.uri.parent),this.commandService.executeCommand(o.TERMINAL_COMMANDS.OPEN_WITH_PATH.id,R)}}),D.registerCommand(o.FILE_COMMANDS.SEARCH_ON_FOLDER,{execute:async M=>{var R;let P=M;if(P||(this.fileTreeModelService.focusedFile?P=this.fileTreeModelService.focusedFile.uri:this.fileTreeModelService.selectedFiles.length>0&&(P=(R=this.fileTreeModelService.selectedFiles[0])===null||R===void 0?void 0:R.uri)),!P)return;let k;if(this.fileTreeService.isMultipleWorkspace)for(const F of await this.workspaceService.roots){const L=new o.URI(F.uri);if(L.isEqualOrParent(P)){k=`./${L.relative(P).toString()}`;break}}else if(this.workspaceService.workspace){const F=new o.URI(this.workspaceService.workspace.uri);F.isEqualOrParent(P)&&(k=`./${F.relative(P).toString()}`)}this.commandService.executeCommand(o.SEARCH_COMMANDS.OPEN_SEARCH.id,{includeValue:k+"/"})},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.LOCATION,{execute:M=>{M?this.revealFile(M):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0&&this.revealFile(this.fileTreeModelService.selectedFiles[0].uri)}}),D.registerCommand(o.FILE_COMMANDS.LOCATION_WITH_EDITOR,{execute:()=>{var M,R,P;((R=(M=this.workbenchEditorService.currentEditor)===null||M===void 0?void 0:M.currentUri)===null||R===void 0?void 0:R.scheme)===o.Schemes.file&&this.revealFile((P=this.workbenchEditorService.currentEditor)===null||P===void 0?void 0:P.currentUri)}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE_ALL,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!M||!M.isVisible||this.fileTreeModelService.collapseAll()}}),D.registerCommand(o.FILE_COMMANDS.REFRESH_ALL,{execute:async()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);!M||!M.isVisible||await this.fileTreeService.refresh()}}),D.registerCommand(o.FILE_COMMANDS.DELETE_FILE,{execute:(M,R)=>{if(I(),R?this.willDeleteUris=this.willDeleteUris.concat(R):this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0?this.willDeleteUris=this.willDeleteUris.concat(this.fileTreeModelService.selectedFiles.map(P=>P.uri)):this.fileTreeModelService.focusedFile&&this.willDeleteUris.push(this.fileTreeModelService.focusedFile.uri),this.willDeleteUris.length!==0)return this.deleteThrottler.queue(this.doDelete.bind(this))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.RENAME_FILE,{execute:M=>{if(I(),!M)if(this.fileTreeModelService.contextMenuFile)M=this.fileTreeModelService.contextMenuFile.uri;else if(this.fileTreeModelService.focusedFile)M=this.fileTreeModelService.focusedFile.uri;else return;this.fileTreeModelService.renamePrompt(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.NEW_FILE,{execute:async M=>{var R;if(I(),M)this.fileTreeModelService.newFilePrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newFilePrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let P;this.fileTreeService.isMultipleWorkspace?P=new o.URI((await this.workspaceService.roots)[0].uri):P=new o.URI((R=this.workspaceService.workspace)===null||R===void 0?void 0:R.uri),this.fileTreeModelService.newFilePrompt(P)}}}),D.registerCommand(o.FILE_COMMANDS.NEW_FOLDER,{execute:async M=>{var R;if(I(),M)this.fileTreeModelService.newDirectoryPrompt(M);else if(this.fileTreeService.isCompactMode&&this.fileTreeModelService.activeUri)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.activeUri);else if(this.fileTreeModelService.selectedFiles&&this.fileTreeModelService.selectedFiles.length>0)this.fileTreeModelService.newDirectoryPrompt(this.fileTreeModelService.selectedFiles[0].uri);else{let P;this.fileTreeService.isMultipleWorkspace?P=new o.URI((await this.workspaceService.roots)[0].uri):P=new o.URI((R=this.workspaceService.workspace)===null||R===void 0?void 0:R.uri),this.fileTreeModelService.newDirectoryPrompt(P)}}}),D.registerCommand(o.FILE_COMMANDS.COMPARE_SELECTED,{execute:(M,R)=>{if(R&&R.length){const P=this.workbenchEditorService.currentEditor;P&&P.currentUri&&this.fileTreeService.compare(R[0],P.currentUri)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_RESOURCES,{execute:M=>{this.fileTreeService.openAndFixedFile(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.OPEN_TO_THE_SIDE,{execute:M=>{this.fileTreeService.openToTheSide(M)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)});const O=(M,R)=>{const{availableOpenTypes:P,currentOpenType:k}=this.workbenchEditorService.currentEditorGroup;if(!(P&&M&&k))return{items:[],selectIndex:-1};const F=this.preferenceService.get("workbench.editorAssociations"),L=[],B=(Q,V)=>V.type===s.EditorOpenType.code?Q.type===s.EditorOpenType.code:V.type===s.EditorOpenType.component&&Q.type===s.EditorOpenType.component?Q.componentId===V.componentId:!1,j=(Q,V)=>(Q?Q+=(0,o.localize)("file.open.type.detail.and")+V:Q=V,Q);let W,U;if(F){const Q=Object.keys(F).find(V=>(0,o.match)(V,M.path.toString().toLowerCase())||(0,o.match)(V,M.path.base.toLowerCase()));W=Q&&F[Q]}return P.forEach((Q,V)=>{var $;const Y={label:Q.title||Q.componentId||Q.type,detail:Q.title,run:z=>R(z,Q)};B(k,Q)&&(Y.description=j(Y.description,(0,o.localize)("file.open.type.detail.active")),U=V),W&&(!(($=Q.componentId)===null||$===void 0)&&$.endsWith(W))&&(Y.description=j(Y.description,(0,o.localize)("file.open.type.detail.default"))),L.push(new o.QuickOpenItem(Y))}),{items:L,selectIndex:U}};D.registerCommand(o.FILE_COMMANDS.OPEN_TYPE_WITH,{execute:M=>{const R=(L,B)=>{var j,W;return L===o.Mode.OPEN?((j=this.workbenchEditorService.currentEditorGroup)===null||j===void 0||j.changeOpenType((W=B.componentId)!==null&&W!==void 0?W:B.type),!0):!1},{items:P,selectIndex:k}=O(M,R);if(P.length===0||typeof k>"u")return;const F=L=>{this.quickOpenService.open({onType:(B,j)=>j(L)},{fuzzyMatchLabel:!0,ignoreFocusOut:!1,placeholder:(0,o.formatLocalize)("file.open.type.placeholder",M.path.base),selectIndex:()=>k})};P.push(new o.QuickOpenItem({label:(0,o.formatLocalize)("file.open.type.preference.default",`*${M.path.ext}`),showBorder:!0,run:L=>{if(L===o.Mode.OPEN){const B=(U,Q)=>{var V,$,Y;if(U===o.Mode.OPEN){const z="workbench.editorAssociations",H=this.preferenceService.resolve(z).scope,K=this.preferenceService.get(z);return this.preferenceService.set(z,{...K||{},[`*${M.path.ext}`]:(V=Q.componentId)!==null&&V!==void 0?V:Q.type},H),($=this.workbenchEditorService.currentEditorGroup)===null||$===void 0||$.changeOpenType((Y=Q.componentId)!==null&&Y!==void 0?Y:Q.type),!0}return!1},{items:j,selectIndex:W}=O(M,B);if(j.length===0||typeof W>"u")return!0;F(j)}return!1}})),F(P)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!a.Directory.is(this.fileTreeModelService.contextMenuFile)}),D.registerCommand(o.FILE_COMMANDS.COPY_PATH,{execute:async M=>{if(!M)return;let P=M.path.toString();if(M.scheme===s.DIFF_SCHEME){const F=M.getParsedQuery();P=new o.URI(F.modified).path.toString()}let k=decodeURIComponent(P);await this.appService.backendOS===o.OperatingSystem.Windows&&(k=k.slice(1)),await this.clipboardService.writeText(k)},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_RELATIVE_PATH,{execute:async M=>{if(!M)return;if(M.scheme===s.DIFF_SCHEME){const k=M.getParsedQuery();M=new o.URI(k.modified).withScheme("file")}const R=this.fileTreeService.getNodeByPathOrUri(M);if(R&&R.filestat.isInSymbolicDirectory)return await this.clipboardService.writeText(R.path.split(d.Path.separator).slice(2).join(d.Path.separator));let P;if(this.fileTreeService.isMultipleWorkspace)for(const k of await this.workspaceService.roots){if(P=new o.URI(k.uri),P.isEqual(M))return await this.clipboardService.writeText("./");if(P.isEqualOrParent(M))return await this.clipboardService.writeText(decodeURIComponent(P.relative(M).toString()))}else if(this.workspaceService.workspace)return P=new o.URI(this.workspaceService.workspace.uri),P.isEqual(M)?await this.clipboardService.writeText("./"):await this.clipboardService.writeText(decodeURIComponent(P.relative(M).toString()))},isVisible:()=>!!this.fileTreeModelService.contextMenuFile}),D.registerCommand(o.FILE_COMMANDS.COPY_FILE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.copyFile(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.copyFile(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.SELECT_CURRENT_NODE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.selectChildNode(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.selectChildNode(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.CUT_FILE,{execute:(M,R)=>{if(R&&R.length)this.fileTreeModelService.cutFile(R);else{const P=this.fileTreeModelService.selectedFiles.map(k=>k.uri);P&&P.length&&this.fileTreeModelService.cutFile(P)}},isVisible:()=>!!this.fileTreeModelService.contextMenuFile&&!this.fileTreeModelService.contextMenuFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)||!!this.fileTreeModelService.focusedFile&&!this.fileTreeModelService.focusedFile.uri.isEqual(this.fileTreeModelService.treeModel.root.uri)}),D.registerCommand(o.FILE_COMMANDS.PASTE_FILE,{execute:M=>{if(I(),M)this.fileTreeModelService.pasteFile(M);else if(this.fileTreeModelService.focusedFile){let R;this.fileTreeModelService.activeUri?R=this.fileTreeModelService.activeUri:R=this.fileTreeModelService.focusedFile.uri,this.fileTreeModelService.pasteFile(R)}},isEnabled:()=>this.fileTreeModelService.pasteStore&&this.fileTreeModelService.pasteStore.type!==f.PasteTypes.NONE||this.appConfig.isElectronRenderer}),D.registerCommand(o.FILE_COMMANDS.VSCODE_OPEN_FOLDER,{execute:(M,R)=>{const P=this.injector.get(o.IWindowService),k={newWindow:!0};return typeof R=="boolean"?k.newWindow=R:k.newWindow=typeof R?.forceNewWindow=="boolean"?R.forceNewWindow:!0,M?P.openWorkspace(M,k):this.commandService.executeCommand(o.FILE_COMMANDS.OPEN_FOLDER.id,k)},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FOLDER,{execute:M=>{const R=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),properties:["openDirectory"]}).then(k=>{k&&k.length>0&&R.openWorkspace(o.URI.file(k[0]),M||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openDirectory"),canSelectFiles:!1,canSelectFolders:!0}).then(k=>{var F;k&&k.length>0&&this.injector.get(E.IWorkspaceService).open(k[0],{preserveWindow:(F=M?.newWindow)!==null&&F!==void 0?F:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenFolder");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.OPEN_WORKSPACE,{execute:M=>{if(!this.preferenceService.get("application.supportsOpenWorkspace"))return;const P=this.injector.get(o.IWindowService);this.appConfig.isElectronRenderer?this.injector.get(o.IElectronNativeDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),properties:["openFile"],filters:[{name:(0,o.localize)("workspace.openWorkspaceTitle"),extensions:[this.workspaceService.workspaceSuffixName]}]}).then(F=>{F&&F.length>0&&P.openWorkspace(o.URI.file(F[0]),M||{newWindow:!0})}):this.injector.get(u.IWindowDialogService).showOpenDialog({title:(0,o.localize)("workspace.openWorkspace"),canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,filters:{workspace:[this.workspaceService.workspaceSuffixName]}}).then(F=>{var L;F&&F.length>0&&this.injector.get(E.IWorkspaceService).open(F[0],{preserveWindow:(L=M?.newWindow)!==null&&L!==void 0?L:!1})})},isVisible:()=>{const M=this.preferenceService.get("application.supportsOpenWorkspace");return M??!1}}),D.registerCommand(o.FILE_COMMANDS.REVEAL_IN_EXPLORER,{execute:M=>{var R;let P=M instanceof o.URI?M:M?.uri;const k=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);k&&!k.isVisible&&(k.activate(),setTimeout(()=>{k.setCollapsed(f.RESOURCE_VIEW_ID,!1)},200)),!P&&(!((R=this.workbenchEditorService.currentEditor)===null||R===void 0)&&R.currentUri)&&(P=this.workbenchEditorService.currentEditor.currentUri),P&&this.revealFile(o.URI.parse(P.toString()))}}),D.registerCommand(o.FILE_COMMANDS.FOCUS_FILES,{execute:()=>{const M=this.mainLayoutService.getTabbarHandler(g.EXPLORER_CONTAINER_ID);M&&M.activate()}}),D.registerCommand(o.FILE_COMMANDS.OPEN_FILE,{execute:M=>this.windowDialogService.showOpenDialog(M)}),D.registerCommand(o.FILE_COMMANDS.SAVE_FILE,{execute:M=>this.windowDialogService.showSaveDialog(M)}),D.registerCommand(o.FILE_COMMANDS.FILTER_TOGGLE,{execute:()=>this.fileTreeService.toggleFilterMode()}),D.registerCommand(o.FILE_COMMANDS.FILTER_OPEN,{execute:()=>{if(!this.fileTreeService.filterMode)return this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.FILTER_CLOSE,{execute:()=>{this.fileTreeService.filterMode&&this.fileTreeService.toggleFilterMode()}}),D.registerCommand(o.FILE_COMMANDS.NEXT,{execute:()=>{this.fileTreeModelService.moveToNext()}}),D.registerCommand(o.FILE_COMMANDS.PREV,{execute:()=>{this.fileTreeModelService.moveToPrev()}}),D.registerCommand(o.FILE_COMMANDS.COLLAPSE,{execute:()=>{this.fileTreeModelService.collapseCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.EXPAND,{execute:()=>{this.fileTreeModelService.expandCurrentFile()}}),D.registerCommand(o.FILE_COMMANDS.TOGGLE_OR_OPEN,{execute:()=>{this.fileTreeModelService.toggleOrOpenCurrentFile()}}),D.registerCommand(o.WORKSPACE_COMMANDS.REMOVE_WORKSPACE_FOLDER,{execute:async(M,R)=>{if(I(),!R.length||!this.workspaceService.isMultiRootWorkspaceOpened)return;const P=await this.workspaceService.roots,k=R.filter(F=>P.find(L=>L.uri===F.toString()));k.length>0&&await this.workspaceService.removeRoots(k)},isVisible:()=>this.workspaceService.isMultiRootWorkspaceOpened&&!!this.fileTreeModelService.contextMenuFile&&!!this.workspaceService.tryGetRoots().find(M=>{var R;return M.uri===((R=this.fileTreeModelService.contextMenuFile)===null||R===void 0?void 0:R.uri.toString())})})}registerKeybindings(D){D.registerKeybinding({command:o.FILE_COMMANDS.COPY_FILE.id,keybinding:"ctrlcmd+c",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PASTE_FILE.id,keybinding:"ctrlcmd+v",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.CUT_FILE.id,keybinding:"ctrlcmd+x",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.SELECT_CURRENT_NODE.id,keybinding:"ctrlcmd+a",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.RENAME_FILE.id,keybinding:"enter",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.DELETE_FILE.id,keybinding:"ctrlcmd+backspace",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_OPEN.id,keybinding:"ctrlcmd+f",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.FILTER_CLOSE.id,keybinding:"esc",when:`${c.FilesExplorerFocusedContext.raw} && ${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.NEXT.id,keybinding:"down",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.PREV.id,keybinding:"up",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.EXPAND.id,keybinding:"right",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.COLLAPSE.id,keybinding:"left",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`}),D.registerKeybinding({command:o.FILE_COMMANDS.TOGGLE_OR_OPEN.id,keybinding:"space",when:`${c.FilesExplorerFocusedContext.raw} && !${c.FilesExplorerInputFocusedContext.raw} && !${c.FilesExplorerFilteredContext.raw}`})}registerToolbarItems(D){D.registerItem({id:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,command:o.FILE_COMMANDS.LOCATION_WITH_EDITOR.id,label:(0,o.localize)("file.location"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !config.explorer.autoReveal && !${c.FilesExplorerFilteredContext.raw}`,order:0}),D.registerItem({id:o.FILE_COMMANDS.NEW_FILE.id,command:o.FILE_COMMANDS.NEW_FILE.id,label:(0,o.localize)("file.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:1}),D.registerItem({id:o.FILE_COMMANDS.NEW_FOLDER.id,command:o.FILE_COMMANDS.NEW_FOLDER.id,label:(0,o.localize)("file.folder.new"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:2}),D.registerItem({id:o.FILE_COMMANDS.FILTER_TOGGLE.id,command:o.FILE_COMMANDS.FILTER_TOGGLE.id,label:(0,o.localize)("file.filetree.filter"),viewId:f.RESOURCE_VIEW_ID,toggledWhen:`${c.FilesExplorerFilteredContext.raw}`,order:3}),D.registerItem({id:o.FILE_COMMANDS.REFRESH_ALL.id,command:o.FILE_COMMANDS.REFRESH_ALL.id,label:(0,o.localize)("file.refresh"),viewId:f.RESOURCE_VIEW_ID,when:`view == '${f.RESOURCE_VIEW_ID}' && !${c.FilesExplorerFilteredContext.raw}`,order:4}),D.registerItem({id:o.FILE_COMMANDS.COLLAPSE_ALL.id,command:o.FILE_COMMANDS.COLLAPSE_ALL.id,label:(0,o.localize)("file.collapse"),viewId:f.RESOURCE_VIEW_ID,order:5}),D.registerItem({id:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,command:o.WORKSPACE_COMMANDS.ADD_WORKSPACE_FOLDER.id,label:(0,o.localize)("workspace.addFolderToWorkspace"),viewId:f.RESOURCE_VIEW_ID,order:0,group:"file_explore_workspace",when:"config.workspace.supportMultiRootWorkspace"})}doDelete(){const D=this.willDeleteUris.slice();return this.willDeleteUris=[],this.fileTreeModelService.deleteFileByUris(D)}dispose(){this._disposables.dispose()}};t.FileTreeContribution=w,n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],w.prototype,"injector",void 0),n.__decorate([(0,r.Autowired)(f.IFileTreeService),n.__metadata("design:type",y.FileTreeService)],w.prototype,"fileTreeService",void 0),n.__decorate([(0,r.Autowired)(l.IMainLayoutService),n.__metadata("design:type",Object)],w.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(v.IProgressService),n.__metadata("design:type",Object)],w.prototype,"progressService",void 0),n.__decorate([(0,r.Autowired)(E.IWorkspaceService),n.__metadata("design:type",Object)],w.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(A.FileTreeModelService),n.__metadata("design:type",A.FileTreeModelService)],w.prototype,"fileTreeModelService",void 0),n.__decorate([(0,r.Autowired)(_.IDecorationsService),n.__metadata("design:type",_.IDecorationsService)],w.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(s.WorkbenchEditorService),n.__metadata("design:type",s.WorkbenchEditorService)],w.prototype,"workbenchEditorService",void 0),n.__decorate([(0,r.Autowired)(o.CommandService),n.__metadata("design:type",Object)],w.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(u.IWindowDialogService),n.__metadata("design:type",Object)],w.prototype,"windowDialogService",void 0),n.__decorate([(0,r.Autowired)(o.IClipboardService),n.__metadata("design:type",Object)],w.prototype,"clipboardService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],w.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(o.QuickOpenService),n.__metadata("design:type",Object)],w.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(l.IViewsRegistry),n.__metadata("design:type",Object)],w.prototype,"viewsRegistry",void 0),n.__decorate([(0,r.Autowired)(o.IApplicationService),n.__metadata("design:type",Object)],w.prototype,"appService",void 0),n.__decorate([(0,r.Autowired)(o.AppConfig),n.__metadata("design:type",Object)],w.prototype,"appConfig",void 0),t.FileTreeContribution=w=n.__decorate([(0,m.Domain)(p.MenuContribution,o.CommandContribution,o.KeybindingContribution,o.TabBarToolbarContribution,o.ClientAppContribution,l.MainLayoutContribution)],w)},2812:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModel=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(69959),m=e(93239);let _=n=class extends c.TreeModel{constructor(g){super(),this.flushDispatchChangeDelayer=new p.ThrottledDelayer(n.DEFAULT_FLUSH_DELAY),this.init(g)}init(g){this.root=g,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()})}};t.FileTreeModel=_,_.DEFAULT_FLUSH_DELAY=100,r.__decorate([(0,o.Autowired)(m.FileTreeDecorationService),r.__metadata("design:type",m.FileTreeDecorationService)],_.prototype,"decorationService",void 0),t.FileTreeModel=_=n=r.__decorate([(0,o.Injectable)({multiple:!0}),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[v.Directory])],_)},46377:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FILE_TREE_BADGE_LIMIT=t.FILE_TREE_NODE_HEIGHT=t.FileTreeNode=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(97267),p=e(41869),v=e(69959),m=n.__importDefault(e(89200)),{Path:_}=p.path,s=({item:g,onClick:l,onDoubleClick:h,onContextMenu:u,dndService:d,itemType:E,decorationService:f,labelService:a,leftPadding:b=8,onTwistierClick:y,decorations:A,defaultLeftPadding:S=8,template:w,hasFolderIcons:T,hasFileIcons:D,hidesExplorerArrows:I,hasPrompt:O,iconService:M})=>{const[R,P]=o.default.useState(-1),k=E===c.TreeNodeType.RenamePrompt,F=E===c.TreeNodeType.NewPrompt,L=k||F,B=!L&&g.name.indexOf(_.separator)>=0,j=(0,p.useDesignStyles)(m.default.expansion_toggle,"expansion_toggle"),W=(0,p.useDesignStyles)(m.default.file_tree_node,"file_tree_node"),U=L?null:f.getDecoration(g.uri,v.Directory.is(g)),Q=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(B&&P(g.name.split(_.separator).length-1),l(Pe,g,E))},V=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(B&&P(g.name.split(_.separator).length-1),h(Pe,g,E))},$=Pe=>{(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&(y?y(Pe,g,E):l(Pe,g,E))},Y=o.default.useCallback(Pe=>{Pe.nativeEvent.which!==0&&(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&u(Pe,g,E)},[u,g]),z=o.default.useCallback(Pe=>{const{handleDragStart:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),H=o.default.useCallback(Pe=>{const{handleDragLeave:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),K=o.default.useCallback(Pe=>{const{handleDragEnter:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),Z=o.default.useCallback(Pe=>{const{handleDrop:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]),X=o.default.useCallback(Pe=>{const{handleDragOver:Ae}=d;(E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode)&&Ae(Pe,g)},[d,g]);let ie=E===c.TreeNodeType.CompositeTreeNode,oe;L?F?(ie=g.type===c.TreeNodeType.CompositeTreeNode,oe=`${S+(g.parent.depth+1||0)*(b||0)+(ie?0:T?I?0:20:0)}px`):(ie=g.target.type===c.TreeNodeType.CompositeTreeNode,oe=`${S+(g.target.depth||0)*(b||0)+(ie?0:T?I?0:20:0)}px`):oe=`${S+(g.depth||0)*(b||0)+(ie?0:T?I?0:20:0)}px`;const le={color:U?U.color:"",height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`,paddingLeft:oe,opacity:O&&!L?".6":"1"},pe=(Pe,Ae)=>{if(A&&A?.classlist.indexOf(m.default.mod_loading)>-1)return o.default.createElement(c.Loading,null);if(L&&Pe instanceof c.PromptHandle){let we=!1;if(k?we=Pe.target.type===c.TreeNodeType.CompositeTreeNode:we=Pe.type===c.TreeNodeType.CompositeTreeNode,we)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,j,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:F||!(k&&Pe.target.type===c.TreeNodeType.CompositeTreeNode&&Pe.target.expanded)})})}else return o.default.createElement("div",{onClick:Ae,className:(0,r.default)(m.default.file_tree_node_segment,j,(0,p.getIcon)("arrow-right"),{[`${m.default.mod_collapsed}`]:!Pe.expanded})})},q=Pe=>{let Ae,we;L&&Pe instanceof c.PromptHandle?Pe instanceof c.RenamePromptHandle?(Ae=Pe.target.uri.resolve(Pe.$.value),we=v.Directory.is(Pe.target)):(Ae=Pe.parent.uri.resolve(Pe.$.value),we=Pe.type===c.TreeNodeType.CompositeTreeNode):(Ae=Pe.uri,we=Pe.filestat.isDirectory);const be=a.getIcon(Ae,{isDirectory:we,isOpenedDirectory:we&&Pe.expanded});return we&&!T||!we&&!D?null:o.default.createElement("div",{className:(0,r.default)(m.default.file_icon,be,{expanded:we&&Pe.expanded}),style:{height:t.FILE_TREE_NODE_HEIGHT,lineHeight:`${t.FILE_TREE_NODE_HEIGHT}px`}})},Ee=Pe=>{if(w)return o.default.createElement(w,null);if(L&&Pe instanceof c.PromptHandle)return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_inputbox)},o.default.createElement("div",{className:(0,r.default)("input-box",m.default.file_tree_node_prompt_box)},o.default.createElement(Pe.ProxiedInput,{wrapperStyle:{height:t.FILE_TREE_NODE_HEIGHT,padding:"0 5px"}})));if(B){const Ae=Pe.displayName.split(_.separator),we=Ae.map((be,fe)=>{const xe=Ae.slice(0,fe+1).join(_.separator),Re=Fe=>{Fe.stopPropagation(),P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));l(Fe,g,E,Ge)},Be=Fe=>{Fe.stopPropagation(),P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));u(Fe,g,E,Ge)},me=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),R!==fe&&(P(fe),d.handleDragOver(Fe,g))},re=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),P(-1)},he=Fe=>{Fe.stopPropagation(),R!==fe&&P(fe);const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));d.handleDragStart(Fe,g,Ge)},Oe=Fe=>{const Ge=g.parent.uri.resolve(Ae.slice(0,fe+1).join(_.separator));d.handleDrop(Fe,g,Ge)},Se=(0,r.default)(R===fe&&m.default.active,m.default.compact_name);return o.default.createElement("span",{key:xe},o.default.createElement("a",{className:Se,draggable:!0,onContextMenu:Be,onDragStart:he,onDragOver:me,onDragLeave:re,onDrop:Oe,onClick:Re},be),fe!==Ae.length-1?o.default.createElement("span",{className:m.default.compact_name_separator},_.separator):null)});return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},we)}return o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_displayname)},a.getName(Pe.uri)||Pe.displayName)},_e=()=>o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_segment,m.default.file_tree_node_tail)},te()),te=()=>U?o.default.createElement("div",{className:m.default.file_tree_node_status},(0,p.transformLabelWithCodicon)(U.badge.slice(),{color:"inherit"},M.fromString.bind(M))):null,ge=Pe=>{if(I)return null;if(ie)return pe(Pe,$);if(L)return pe(Pe,()=>{})},Te=()=>{let Pe=g.tooltip;return U&&U.badge&&(Pe+=` \u2022 ${U.tooltip}`),Pe};return o.default.createElement("div",{key:g.id,onClick:Q,onDoubleClick:V,onContextMenu:Y,onDragStart:z,onDragOver:X,onDragEnter:K,onDragLeave:H,onDrop:Z,title:Te(),className:(0,r.default)(W,A?A.classlist:null),style:le,draggable:E===c.TreeNodeType.TreeNode||E===c.TreeNodeType.CompositeTreeNode,"data-id":g.id},o.default.createElement("div",{className:(0,r.default)(m.default.file_tree_node_content)},ge(g),q(g),o.default.createElement("div",{className:L?m.default.file_tree_node_prompt_wrap:m.default.file_tree_node_overflow_wrap},Ee(g)),_e()))};t.FileTreeNode=s,t.FILE_TREE_NODE_HEIGHT=22,t.FILE_TREE_BADGE_LIMIT=99},56384:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTree=t.FILE_TREE_FILTER_DELAY=t.FILTER_AREA_HEIGHT=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(68974),m=e(24429),_=e(87420),s=e(6250),g=e(46377),l=n.__importDefault(e(2613)),h=e(97738);t.FILTER_AREA_HEIGHT=30,t.FILE_TREE_FILTER_DELAY=500;const u=(0,c.RecycleTreeFilterDecorator)(c.RecycleTree),d=({viewState:f})=>{const[a,b]=(0,o.useState)(!1),[y,A]=(0,o.useState)(!0),[S,w]=(0,o.useState)(!1),[T,D]=(0,o.useState)(!1),[I,O]=(0,o.useState)(),M=(0,o.useRef)(null),R=(0,o.useRef)(new p.DisposableCollection),{height:P}=f,k=(0,p.useInjectable)(s.IFileTreeService),{iconService:F,locationToCurrentFile:L,filterMode:B,indent:j,baseIndent:W}=k,U=(0,p.useInjectable)(h.FileTreeModelService),[Q,V]=(0,o.useState)({indent:j,baseIndent:W}),[$,Y]=(0,o.useState)(B),[z,H]=(0,o.useState)(F.currentTheme||{hasFolderIcons:!0,hasFileIcons:!0,hidesExplorerArrows:!0}),K=(0,o.useCallback)(xe=>Z(xe)?!1:xe.shiftKey,[]),Z=(0,o.useCallback)(xe=>{const{metaKey:Re,ctrlKey:Be}=xe;return p.isOSX&&Re||Be},[]),X=(0,o.useCallback)((xe,Re,Be,me)=>{xe.stopPropagation();const{handleItemClick:re,handleItemToggleClick:he,handleItemRangeClick:Oe}=U;if(!Re)return;const Se=K(xe),Fe=Z(xe);Se?Oe(Re,Be):Fe?he(Re,Be):re(Re,Be,me)},[]),ie=(0,o.useCallback)((xe,Re,Be)=>{xe.stopPropagation();const{handleItemDoubleClick:me}=U;Re&&me(Re,Be)},[]),oe=(0,o.useCallback)((xe,Re)=>{xe.stopPropagation();const{toggleDirectory:Be}=U;Be(Re)},[]);(0,o.useEffect)(()=>{a&&U.onFileTreeModelChange(async xe=>{A(!0),xe&&(await xe.ensureReady,M.current&&k.initContextKey(M.current)),O(xe),A(!1)})},[a,M.current,k]),(0,o.useEffect)(()=>{var xe,Re,Be;const me=new p.CancellationTokenSource;return q(me.token),(xe=R.current)===null||xe===void 0||xe.push(F.onThemeChange(re=>{H(re)})),(Re=R.current)===null||Re===void 0||Re.push(k.onTreeIndentChange(({indent:re,baseIndent:he})=>{V({indent:re,baseIndent:he})})),(Be=R.current)===null||Be===void 0||Be.push(k.onFilterModeChange(re=>{Y(re)})),()=>{var re;me.cancel(),(re=R.current)===null||re===void 0||re.dispose()}},[]);const le=(0,o.useCallback)((xe,Re)=>{let Be;if(xe&&Re)for(Be=xe.parentNode;Be;){if(Re===Be)return!0;Be=Be.parentNode}return!1},[]),pe=(0,o.useCallback)(xe=>{le(xe.relatedTarget,M.current)||!xe.relatedTarget||(w(!1),U.handleTreeBlur())},[M.current]);(0,o.useEffect)(()=>{$||(U.fileTreeHandle&&U.fileTreeHandle.clearFilter(),U.selectedFiles.length===1&&U.location(U.selectedFiles[0].uri))},[$]),(0,o.useEffect)(()=>{const xe=new p.DisposableCollection;return I&&(xe.push(U.onDidFocusedFileChange(Re=>{Re?Re.isEqual((I?.root).uri)?S||w(!S):S&&w(!S):Re||S&&w(!S)})),xe.push(U.onDidContextMenuFileChange(Re=>{Re?Re.isEqual((I?.root).uri)?S||w(!S):S&&w(!S):Re||S&&w(!S)}))),()=>{xe.dispose()}},[I,S]);const q=(0,o.useCallback)(async xe=>{var Re;if(await U.whenReady,!xe.isCancellationRequested){if(U.treeModel){if(await U.treeModel.ensureReady,O(U.treeModel),xe.isCancellationRequested)return;M.current&&k.initContextKey(M.current)}A(!1),!((Re=R.current)===null||Re===void 0)&&Re.disposed||b(!0)}},[U,R.current]),Ee=(0,o.useCallback)(xe=>{U.handleTreeHandler({...xe,getModel:()=>U.treeModel,hasDirectFocus:()=>M.current===document.activeElement})},[M.current,I]),_e=(0,o.useCallback)(()=>{const{handleItemClick:xe}=U;xe()},[]),te=(0,o.useCallback)(()=>{U.handleDblClick()},[]),ge=(0,o.useCallback)(()=>{const{handleTreeFocus:xe}=U;xe()},[]),Te=(0,o.useCallback)(xe=>{const{handleContextMenu:Re}=U;Re(xe)},[]),Pe=(0,o.useCallback)(xe=>{xe.stopPropagation(),xe.preventDefault()},[]),Ae=(0,o.useCallback)(xe=>{xe.preventDefault(),D(!0)},[]),we=(0,o.useCallback)(()=>{D(!1)},[]),be=(0,o.useCallback)(xe=>{const{handleDrop:Re}=U.dndService;D(!1),Re(xe)},[]),fe=(0,o.useCallback)((xe,Re,Be,me)=>{const{handleContextMenu:re}=U;re(xe,Re,me)},[]);return o.default.createElement("div",{className:(0,r.default)(l.default.file_tree,T&&l.default.outer_drag_over,S&&l.default.outer_active),tabIndex:-1,ref:M,onClick:_e,onDoubleClick:te,onFocus:ge,onBlur:pe,onContextMenu:Te,draggable:!0,onDragStart:Pe,onDragLeave:we,onDragOver:Ae,onDrop:be},o.default.createElement(E,{isLoading:y,isReady:a,height:P,model:I,iconTheme:z,treeIndent:Q,filterMode:$,locationToCurrentFile:L,onTreeReady:Ee,onContextMenu:fe,onItemClick:X,onItemDoubleClick:ie,onTwistierClick:oe}))};t.FileTree=d;const E=(0,o.memo)(({isReady:f,isLoading:a,height:b,model:y,filterMode:A,treeIndent:S,iconTheme:w,onTreeReady:T,onItemClick:D,onItemDoubleClick:I,onContextMenu:O,onTwistierClick:M})=>{const R=(0,p.useInjectable)(s.IFileTreeService),P=(0,p.useInjectable)(_.IIconService),{decorationService:k,labelService:F,locationToCurrentFile:L}=R,B=(0,p.useInjectable)(h.FileTreeModelService),j=(0,o.useCallback)(W=>o.default.createElement(g.FileTreeNode,{item:W.item,itemType:W.itemType,template:W.template,decorationService:k,labelService:F,iconService:P,dndService:B.dndService,decorations:B.decorations.getDecorations(W.item),onClick:D,onDoubleClick:I,onTwistierClick:M,onContextMenu:O,defaultLeftPadding:S.baseIndent,leftPadding:S.indent,hasPrompt:W.hasPrompt,hasFolderIcons:w.hasFolderIcons,hasFileIcons:w.hasFileIcons,hidesExplorerArrows:w.hidesExplorerArrows}),[y,S,w]);return f?a?o.default.createElement(v.Progress,{loading:!0}):y?o.default.createElement(u,{height:b,itemHeight:g.FILE_TREE_NODE_HEIGHT,onReady:T,model:y,filterEnabled:A,filterAfterClear:L,filterAutoFocus:!0,leaveBottomBlank:!0},j):o.default.createElement(m.WelcomeView,{viewId:s.FILE_EXPLORER_WELCOME_ID}):o.default.createElement(v.Progress,{loading:!0})});E.displayName="FileTreeView"},57781:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeService=void 0;const n=e(85608),r=e(76003),o=e(97267),c=e(41869),p=e(18193),v=e(26542),m=e(42933),_=e(52416),s=e(51500),g=e(6250),l=e(69959),h=e(88014),u=e(93239),{Path:d}=c.path;let E=class extends o.Tree{constructor(){super(...arguments),this._fileServiceWatchers=new Map,this._symbolicFiles=new Map,this._changeEventDispatchQueue=new Set,this._readyToWatch=!1,this._watchRootsQueue=[],this.effectedNodes=[],this.onWorkspaceChangeEmitter=new c.Emitter,this.onTreeIndentChangeEmitter=new c.Emitter,this.onFilterModeChangeEmitter=new c.Emitter,this.onNodeRefreshedEmitter=new c.Emitter,this._filterMode=!1,this._refreshable=!0,this.refreshEffectNode=()=>{const a=this.effectedNodes.slice(0);if(this.effectedNodes=[],a.find(y=>l.Directory.isRoot(y)))this.refresh();else for(const y of a)this.refresh(y)},this.flushEventQueue=async()=>{if(!this._changeEventDispatchQueue||this._changeEventDispatchQueue.size===0)return;const a=Array.from(this._changeEventDispatchQueue),b=this.sortPaths(a);(!this.refreshCancelToken||this.refreshCancelToken.token.isCancellationRequested)&&(this.refreshCancelToken=new c.CancellationTokenSource);const y=(0,c.pSeries)(b.map(A=>async()=>{l.Directory.is(A.node)&&await A.node.refresh(this.refreshCancelToken)}));return this._changeEventDispatchQueue.clear(),await y},this.locationToCurrentFile=()=>{this.commandService.executeCommand(c.FILE_COMMANDS.LOCATION.id)}}get onNodeRefreshed(){return this.onNodeRefreshedEmitter.event}get refreshable(){return this._refreshable}get filterMode(){return this._filterMode}get baseIndent(){return this._baseIndent}get indent(){return this._indent}get onWorkspaceChange(){return this.onWorkspaceChangeEmitter.event}get onTreeIndentChange(){return this.onTreeIndentChangeEmitter.event}get onFilterModeChange(){return this.onFilterModeChangeEmitter.event}get isCompactMode(){return this._isCompactMode}get contextKey(){return this.fileContextKey}async init(){this._roots=await this.workspaceService.roots,await this.preferenceService.ready,this._baseIndent=this.preferenceService.getValid("explorer.fileTree.baseIndent",8),this._indent=this.preferenceService.getValid("explorer.fileTree.indent",8),this._isCompactMode=this.preferenceService.getValid("explorer.compactFolders",!0),this.toDispose.push(this.workspaceService.onWorkspaceChanged(a=>{this._roots=a;const b=new c.URI(a[0].uri),y=new l.Directory(this,void 0,b,b.displayName,a[0],this.fileTreeAPI.getReadableTooltip(b));this.root=y,this.onWorkspaceChangeEmitter.fire(y),this.refresh()})),this.toDispose.push(this.workspaceService.onWorkspaceFileExcludeChanged(()=>{this.refresh()})),this.toDispose.push(c.Disposable.create(()=>{var a;(a=this._root)===null||a===void 0||a.dispose(),this._roots=null})),this.toDispose.push(this.corePreferences.onPreferenceChanged(a=>{a.preferenceName==="explorer.fileTree.baseIndent"?(this._baseIndent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.fileTree.indent"?(this._indent=a.newValue||8,this.onTreeIndentChangeEmitter.fire({indent:this.indent,baseIndent:this.baseIndent})):a.preferenceName==="explorer.compactFolders"&&(this._isCompactMode=a.newValue,this.refresh())}))}initContextKey(a){this.fileContextKey.initScopedContext(a)}startWatchFileEvent(){return this._readyToWatch=!0,Promise.all(this._watchRootsQueue.map(a=>this.watchFilesChange(a)))}async resolveChildren(a){var b,y,A,S;let w=[];if(a){if(l.Directory.isRoot(a)&&this.isMultipleWorkspace){const T=await this.workspaceService.roots;for(const D of T){const I=this.fileTreeAPI.toNode(this,D,a,this.workspaceService.getWorkspaceName(new c.URI(D.uri)));this.watchFilesChange(new c.URI(D.uri)),w=w.concat(I),(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)}return w}if(a.uri){const T=await this.fileTreeAPI.resolveChildren(this,a.uri.toString(),a,this.isCompactMode&&!l.Directory.isRoot(a));w=T.children,w.forEach(I=>{(I.filestat.isSymbolicLink||I.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(I.filestat.uri,I)});const D=T.filestat;if(D&&this.isCompactMode&&!l.Directory.isRoot(a)){const I=new c.URI(D.uri),O=a.parent;if(a&&O){let M=a.name;if(a.filestat.isSymbolicLink){const R=(y=new c.URI(a.filestat.realUri).relative(I))===null||y===void 0?void 0:y.toString();R&&(M=R,M=[a.uri.displayName].concat(M.split(d.separator)).join(d.separator))}else O.filestat.isSymbolicLink?M=(A=new c.URI(O.filestat.realUri).relative(I))===null||A===void 0?void 0:A.toString():M=(S=O.uri.relative(I))===null||S===void 0?void 0:S.toString();M&&M!==a.name&&a.updateMetaData({name:M,uri:I,tooltip:this.fileTreeAPI.getReadableTooltip(I),fileStat:D})}}return w}}else if(this._roots||(this._roots=await this.workspaceService.roots),this.isMultipleWorkspace){const T=new c.URI((b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri);let D=T.displayName;D=D.slice(0,D.lastIndexOf("."));const I={...this.workspaceService.workspace,isDirectory:!0},O=new l.Directory(this,void 0,T,D,I,this.fileTreeAPI.getReadableTooltip(T));return this.root=O,[O]}else if(this._roots.length>0)return w=await(await this.fileTreeAPI.resolveChildren(this,this._roots[0])).children,w.forEach(T=>{const D=this.workspaceService.getWorkspaceName(T.uri);D&&D!==T.name&&T.updateMetaData({name:D}),(T.filestat.isSymbolicLink||T.filestat.isInSymbolicDirectory)&&this._symbolicFiles.set(T.filestat.uri,T)}),this.watchFilesChange(new c.URI(this._roots[0].uri)),this.root=w[0],w;return[]}async watchFilesChange(a){if(!this._readyToWatch){this._watchRootsQueue.push(a);return}const b=await this.fileServiceClient.watchFileChanges(a);this.toDispose.push(b),this.toDispose.push(b.onFilesChanged(y=>{this.onFilesChanged(y)})),this._fileServiceWatchers.set(a.toString(),b)}updateRefreshable(a){var b;a!==this.refreshable&&(this._refreshable=a,this._refreshable?this.doHandleQueueChange():(b=this.refreshCancelToken)===null||b===void 0||b.cancel())}isContentFile(a){return!!a&&"filestat"in a&&!a.filestat.isDirectory}isFileContentChanged(a){return a.type===m.FileChangeType.UPDATED&&this.isContentFile(this.getNodeByPathOrUri(a.uri))}getAffectedChanges(a){const b=[];for(const y of a)this.isFileContentChanged(y)||b.push(y);return b}isRootAffected(a){return this._roots?a.some(b=>b.type>m.FileChangeType.UPDATED&&this._roots&&this._roots.find(y=>b.uri.indexOf(y.uri)>=0)):!1}async onFilesChanged(a){const b=await this.getAffectedNodes(this.getAffectedChanges(a));return b.length>0?this.effectedNodes=this.effectedNodes.concat(b):!(b.length>0)&&this.isRootAffected(a)&&this.effectedNodes.push(this.root),this.refreshEffectNode()}async getFileTreeNodePathByUri(a){var b,y,A,S,w,T;if(!a)return;let D;if(this.isMultipleWorkspace){if(this._roots||(this._roots=await this.workspaceService.roots),D=(S=this._roots.find(I=>new c.URI(I.uri).isEqualOrParent(a)))===null||S===void 0?void 0:S.uri,D){const I=new c.URI(D);if(I.isEqualOrParent(a))return new d(((w=this.root)===null||w===void 0?void 0:w.path)||"/").join(I.displayName).join(((T=I.relative(a))===null||T===void 0?void 0:T.toString())||"").toString()}}else if(D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,D){const I=new c.URI(D);if(I.isEqualOrParent(a))return new d(((y=this.root)===null||y===void 0?void 0:y.path)||"").join(((A=I.relative(a))===null||A===void 0?void 0:A.toString())||"").toString()}}async moveNodeByPath(a,b,y,A,S=o.TreeNodeType.TreeNode){const w=new d(a.path).join(y).toString(),T=new d(b.path).join(A).toString();if(w&&T&&T!==w){const D=a.moveNode(w,T);return D&&l.File.is(D)&&(D.updateMetaData({uri:b.uri.resolve(A),fileStat:{...b.filestat,uri:b.uri.resolve(A).toString(),isDirectory:S!==o.TreeNodeType.TreeNode},tooltip:this.fileTreeAPI.getReadableTooltip(b.uri.resolve(A))}),l.Directory.is(D)&&this.updateChildren(D)),D}}async updateChildren(a){const b=a.children;if(!(!b||b.length===0)){for(const y of b)if(l.File.is(y)){const A=a.uri.resolve(y.uri.displayName);y.updateMetaData({uri:A,fileStat:{...y.filestat,uri:A.toString(),isDirectory:!!l.Directory.is(y)},tooltip:this.fileTreeAPI.getReadableTooltip(A)}),l.Directory.is(y)&&this.updateChildren(y)}}}async addNode(a,b,y){let A,S;const w=d.splitPath(b);if(w.length>1){let D=a.uri;for(const I of w)D=D.resolve(I);!this.isCompactMode||l.Directory.isRoot(a)?S=w[0]:y===o.TreeNodeType.CompositeTreeNode?S=b:S=w.slice(0,w.length-1).join(d.separator)}else S=b;A={uri:a.uri.resolve(S).toString(),isDirectory:y===o.TreeNodeType.CompositeTreeNode||w.length>1,isSymbolicLink:!1,lastModification:new Date().getTime()};const T=await this.fileTreeAPI.toNode(this,A,a,S);return T&&a.addNode(T),T}async deleteAffectedNodeByPath(a,b){var y,A;const S=this.getNodeByPathOrUri(a);S&&S.parent&&(this.isCompactMode&&!b?((y=S.parent.children)===null||y===void 0?void 0:y.length)===2?this.refresh((A=S.parent)===null||A===void 0?void 0:A.parent):this.refresh(S.parent):S.parent.removeNode(S.path))}async deleteAffectedNodes(a,b=[]){const y=[];for(const A of a){const S=this.getNodeByPathOrUri(A);S&&l.File.is(S)&&y.push(S)}for(const A of y)!A?.parent||this._changeEventDispatchQueue.has(A?.parent.path)||await this.deleteAffectedNodeByPath(A.path);return b.filter(A=>A.type!==m.FileChangeType.DELETED)}async getAffectedNodes(a){const b=[];for(const y of a){const A=new c.URI(y.uri),S=this.getNodeByPathOrUri(A.parent);S&&b.push(S)}return b}isFileURI(a){return/^file:\/\//.test(a)}getNodeByPathOrUri(a){var b,y,A,S;let w,T;if(typeof a!="string"?(T=a,a=a.toString()):this.isFileURI(a)?T=new c.URI(a):!this.isFileURI(a)&&typeof a=="string"&&(w=a),this.isFileURI(a)&&T){if(this._symbolicFiles.has(T?.toString()))return this._symbolicFiles.get(T.toString());let D;if(this.isMultipleWorkspace?this._roots&&(D=(y=this._roots.find(I=>new c.URI(I.uri).isEqualOrParent(T)))===null||y===void 0?void 0:y.uri):D=(b=this.workspaceService.workspace)===null||b===void 0?void 0:b.uri,this.root&&D){const I=new c.URI(D);if(I.isEqualOrParent(T)){const O=I.relative(T);O&&(this.isMultipleWorkspace?w=new d(this.root.path).join(I.displayName).join(O.toString()).toString():w=new d(this.root.path).join(O.toString()).toString())}}}if(w){const D=(A=this.root)===null||A===void 0?void 0:A.getTreeNodeByPath(w);if(!D){let I;const O=w.split(d.separator);for(;O.length>=1;){O.pop();const M=O.join(d.separator);if(I=(S=this.root)===null||S===void 0?void 0:S.getTreeNodeByPath(M),I)break}if(I&&l.Directory.is(I)){for(const M of I.children||[])if(M.path.includes(w))return M}}return D}}sortComparator(a,b){return a.constructor===b.constructor?a.name.localeCompare(b.name,"en",{numeric:!0}):a.type===o.TreeNodeType.CompositeTreeNode?-1:b.type===o.TreeNodeType.CompositeTreeNode?1:0}get contextMenuContextKeyService(){return this.fileContextKey?this.fileContextKey.service:this.contextKeyService}reWatch(){for(const[a,b]of this._fileServiceWatchers)b.dispose(),this.watchFilesChange(new c.URI(a))}get isMultipleWorkspace(){return!!this.workspaceService.workspace&&!this.workspaceService.workspace.isDirectory}getDisplayName(a){return this.workspaceService.getWorkspaceName(a)}async refresh(a=this.root){if(a)return l.Directory.is(a)||l.File.is(a)&&a.parent&&(a=a.parent),this._changeEventDispatchQueue.add(a.path),this.doHandleQueueChange()}async doHandleQueueChange(){if(this.refreshable)try{await this.flushEventQueue()}catch(a){this.logger.error("flush file change event queue error:",a)}finally{this.onNodeRefreshedEmitter.fire()}}sortPaths(a){const y=a.slice().map(S=>({node:this.getNodeByPathOrUri(S),path:S})).filter(S=>S&&!!S.node);a.length>1&&y.sort((S,w)=>{var T,D;const I=((T=S.node)===null||T===void 0?void 0:T.depth)||0,O=((D=w.node)===null||D===void 0?void 0:D.depth)||0;return I-O});const A=[];for(let S=y.length-1;S>=0;S--){const w=y[S];let T=!1;for(let D=0;D<S;D++){const I=y[D];l.Directory.is(I)&&w.node.path.startsWith(I.node.path)&&(T=!0)}T||A.push(w)}return A}openFile(a){const b=this.preferenceService.get("editor.previewMode");this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:b})}openAndFixedFile(a){this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,preview:!1,focus:!0})}openToTheSide(a){this.commandService.executeCommand(c.EDITOR_COMMANDS.OPEN_RESOURCE.id,a,{disableNavigate:!0,split:4})}compare(a,b){this.commandService.executeCommand(c.EDITOR_COMMANDS.COMPARE.id,{original:a,modified:b})}toggleFilterMode(){var a;this._filterMode=!this.filterMode,this.onFilterModeChangeEmitter.fire(this.filterMode),(a=this.fileContextKey)===null||a===void 0||a.filesExplorerFilteredContext.set(this.filterMode),this.filterMode===!1&&this.commandService.executeCommand(c.FILE_COMMANDS.LOCATION.id)}};t.FileTreeService=E,n.__decorate([(0,r.Autowired)(g.IFileTreeAPI),n.__metadata("design:type",Object)],E.prototype,"fileTreeAPI",void 0),n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(s.IWorkspaceService),n.__metadata("design:type",Object)],E.prototype,"workspaceService",void 0),n.__decorate([(0,r.Autowired)(p.CorePreferences),n.__metadata("design:type",Object)],E.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(c.PreferenceService),n.__metadata("design:type",Object)],E.prototype,"preferenceService",void 0),n.__decorate([(0,r.Autowired)(v.LabelService),n.__metadata("design:type",v.LabelService)],E.prototype,"labelService",void 0),n.__decorate([(0,r.Autowired)(u.FileTreeDecorationService),n.__metadata("design:type",u.FileTreeDecorationService)],E.prototype,"decorationService",void 0),n.__decorate([(0,r.Autowired)(m.IFileServiceClient),n.__metadata("design:type",Object)],E.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(_.IIconService),n.__metadata("design:type",Object)],E.prototype,"iconService",void 0),n.__decorate([(0,r.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,r.Autowired)(h.FileContextKey),n.__metadata("design:type",h.FileContextKey)],E.prototype,"fileContextKey",void 0),t.FileTreeService=E=n.__decorate([(0,r.Injectable)()],E)},83709:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeNextModule=void 0;const n=e(85608),r=e(41869),o=e(72665),c=e(41103),p=e(6250),v=e(89508),m=e(40439),_=e(57781),s=e(88808),g=e(93239),l=e(97738),h=e(24861);let u=class extends r.BrowserModule{constructor(){super(...arguments),this.providers=[{token:p.IFileTreeAPI,useClass:s.FileTreeAPI},{token:g.FileTreeDecorationService,useClass:g.FileTreeDecorationService},{token:p.IFileTreeService,useClass:_.FileTreeService},{token:l.FileTreeModelService,useClass:l.FileTreeModelService},{token:o.IWindowDialogService,useClass:v.WindowDialogServiceImpl},m.FileTreeContribution]}};t.FileTreeNextModule=u,t.FileTreeNextModule=u=n.__decorate([(0,r.Domain)(h.name),(0,r.ModuleDependencies)([c.WorkspaceModule])],u)},88808:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeAPI=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(42933),v=e(72665),m=e(26199),_=e(69959);let s=class{constructor(){this.onDidResolveChildrenEmitter=new c.Emitter,this.onDidResolveChildren=this.onDidResolveChildrenEmitter.event}async resolveChildren(l,h,u,d){var E;let f;if(!this.userhomePath){const a=await this.fileServiceClient.getCurrentUserHome();a&&(this.userhomePath=new c.URI(a.uri))}if(typeof h=="string"?f=await this.fileServiceClient.getFileStat(h):f=await this.fileServiceClient.getFileStat(h.uri),f){if(this.onDidResolveChildrenEmitter.fire(f.uri.toString()),((E=f.children)===null||E===void 0?void 0:E.length)===1&&f.children[0].isDirectory&&d)return await this.resolveChildren(l,f.children[0].uri,u,d);{const a={...f,isInSymbolicDirectory:u?.filestat.isSymbolicLink||u?.filestat.isInSymbolicDirectory};return{children:this.toNodes(l,a,u),filestat:a}}}else return{children:[],filestat:null}}async resolveNodeByPath(l,h,u){const d=await this.fileServiceClient.getFileStat(h);if(d)return this.toNode(l,d,u)}async resolveFileStat(l){return await this.fileServiceClient.getFileStat(l.toString())}toNodes(l,h,u){if(u){if(h.children)return h.children.map(d=>this.toNode(l,d,u))}else return[this.toNode(l,h,u)];return[]}toNode(l,h,u,d){var E;const f=new c.URI(h.uri),a=d||f.displayName;let b;return h.isInSymbolicDirectory=(E=u?.filestat.isSymbolicLink)!==null&&E!==void 0?E:u?.filestat.isInSymbolicDirectory,h.isDirectory?b=new _.Directory(l,u,f,a,h,this.getReadableTooltip(f)):b=new _.File(l,u,f,a,h,this.getReadableTooltip(f)),b}async mvFiles(l,h){const u=[];for(const f of l)if(f.url.isEqualOrParent(h))return;const d=l.sort((f,a)=>f.toString().length-a.toString().length),E=[];for(const f of d)E.length>0&&E.find(a=>a.url.isEqualOrParent(f.url))||E.push(f);if(this.corePreferences["explorer.confirmMove"]){const f=(0,c.localize)("file.confirm.move.ok"),a=(0,c.localize)("file.confirm.move.cancel");if(await this.dialogService.warning((0,c.formatLocalize)("file.confirm.move",`[ ${E.map(y=>y.url.displayName).join(",")} ]`,h.displayName),[a,f])!==f)return}for(const f of E){const a=await this.mv(f.url,h.resolve(f.url.displayName),f.isDirectory);a&&u.push(a)}return u}async mv(l,h,u=!1){try{await this.workspaceEditService.apply({edits:[{newResource:h,oldResource:l,options:{isDirectory:u,overwrite:!0}}]})}catch(d){return d.message}}async createFile(l,h){try{await this.workspaceEditService.apply({edits:[{newResource:l,options:{content:h}}]})}catch(u){return u.message}this.commandService.executeCommand(o.EDITOR_COMMANDS.OPEN_RESOURCE.id,l,{disableNavigate:!0,focus:!0})}async createDirectory(l){try{await this.workspaceEditService.apply({edits:[{newResource:l,options:{isDirectory:!0}}]})}catch(h){return h.message}}async delete(l){try{await this.workspaceEditService.apply({edits:[{oldResource:l,options:{}}]});return}catch(h){return h.message}}async copyFile(l,h){let u=1,d;try{d=await this.fileServiceClient.access(h.toString())}catch(E){return E.message}for(;d;){const E=h.displayName.replace(/\Wcopy\W\d+/,""),f=c.path.extname(E),b=`${c.path.basename(E,f)} copy ${u}${f}`;h=h.parent.resolve(b),u++;try{d=await this.fileServiceClient.access(h.toString())}catch{return}}try{return await this.fileServiceClient.copy(l.toString(),h.toString())}catch(E){return E.message}}getReadableTooltip(l){const h=l.toString(),u=this.userhomePath&&this.userhomePath.toString();return this.userhomePath&&this.userhomePath.isEqualOrParent(l)?decodeURIComponent(h.replace(u,"~")):decodeURIComponent(l.withScheme("").toString())}};t.FileTreeAPI=s,n.__decorate([(0,r.Autowired)(p.IFileServiceClient),n.__metadata("design:type",Object)],s.prototype,"fileServiceClient",void 0),n.__decorate([(0,r.Autowired)(m.IWorkspaceEditService),n.__metadata("design:type",Object)],s.prototype,"workspaceEditService",void 0),n.__decorate([(0,r.Autowired)(c.CommandService),n.__metadata("design:type",Object)],s.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(o.CorePreferences),n.__metadata("design:type",Object)],s.prototype,"corePreferences",void 0),n.__decorate([(0,r.Autowired)(v.IDialogService),n.__metadata("design:type",Object)],s.prototype,"dialogService",void 0),t.FileTreeAPI=s=n.__decorate([(0,r.Injectable)()],s)},93239:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeDecorationService=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(41893),p=e(52416);let v=class{constructor(){this.disposeCollection=new o.DisposableCollection,this.onDidChangeEmitter=new o.Emitter,this.cacheDecorations=new Map,this.disposeCollection.pushAll([this.decorationsService.onDidChangeDecorations(_=>{var s,g,l;const h=(g=(s=_._data)===null||s===void 0?void 0:s._iter)===null||g===void 0?void 0:g._value;if(h){const u=new o.URI(h),d=this.getDecoration(u);this.cacheDecorations.has(h)?((l=this.cacheDecorations.get(h))===null||l===void 0?void 0:l.tooltip)!==d?.tooltip&&this.onDidChangeEmitter.fire():(this.cacheDecorations.set(h,d),this.onDidChangeEmitter.fire())}}),this.themeService.onThemeChange(()=>{this.onDidChangeEmitter.fire()})])}get onDidChange(){return this.onDidChangeEmitter.event}getDecoration(_,s=!1){_ instanceof o.URI&&(_=o.Uri.parse(_.toString()));const g=this.decorationsService.getDecoration(_,s);return g?{...g,color:this.themeService.getColor({id:g.color})}:{color:"",tooltip:"",badge:""}}dispose(){this.disposeCollection.dispose()}};t.FileTreeDecorationService=v,n.__decorate([(0,r.Autowired)(c.IDecorationsService),n.__metadata("design:type",c.IDecorationsService)],v.prototype,"decorationsService",void 0),n.__decorate([(0,r.Autowired)(p.IThemeService),n.__metadata("design:type",Object)],v.prototype,"themeService",void 0),t.FileTreeDecorationService=v=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],v)},30577:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DragAndDropService=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(53622),m=e(14951),_=e(72665),s=e(51500),g=e(6250),l=e(69959),h=r.__importDefault(e(89200)),u=r.__importDefault(e(2613)),d=e(57781),E=e(97738);let f=n=class extends p.WithEventBus{constructor(b){super(),this.model=b,this.toCancelNodeExpansion=new p.DisposableCollection,this.beingDraggedDec=new c.Decoration(h.default.mod_dragging),this.draggedOverDec=new c.Decoration(h.default.mod_dragover),this.beingDraggedNodes=[],this.dragOverTrigger=new p.ThrottledDelayer(n.MS_TILL_DRAGGED_OVER_EXPANDS),this.handleDragStart=(y,A,S)=>{y.stopPropagation();const w=O=>{this.handleDragEnd(O,A)};y.currentTarget.addEventListener("dragend",w,!1);let T=this.model.selectedFiles,D=!1;for(const O of T)O&&O.id===A.id&&(D=!0);D||(T=[A]),this.beingDraggedNodes=T,this.beingDraggedActiveUri=S;const I=T.find(O=>!l.Directory.is(O));if(I&&y.dataTransfer.setData("uri",I.uri.toString()),y.dataTransfer.setData("beingDraggedNodes",JSON.stringify(this.beingDraggedNodes.map(O=>O.uri.toString()))),I){const O=I;O.uri.scheme==="file"&&y.dataTransfer.setData("DownloadURL",`application/octet-stream:${O.displayName}:data:application/octet-stream;base64,${(0,p.encodeBase64)(p.BinaryBuffer.fromString(O.filestat.uri))}`)}if(T.forEach(O=>{this.beingDraggedDec.addTarget(O,c.TargetMatchMode.Self)}),y.dataTransfer){let O;T.length===1?O=S?S.displayName:typeof A.name=="string"?A.name:"":O=String(T.length);const M=document.createElement("div");M.className=u.default.file_tree_drag_image,M.textContent=O,document.body.appendChild(M),y.dataTransfer.setDragImage(M,-10,-10),setTimeout(()=>document.body.removeChild(M),0)}},this.handleDragEnter=(y,A)=>{y.stopPropagation(),y.preventDefault()},this.handleDragLeave=(y,A)=>{y.preventDefault(),y.stopPropagation(),this.toCancelNodeExpansion.dispose(),this.potentialParent&&(this.draggedOverDec.removeTarget(this.potentialParent),this.model.treeModel.dispatchChange())},this.handleDragOver=(y,A)=>{if(y.preventDefault(),y.stopPropagation(),!this.toCancelNodeExpansion.disposed||this.beingDraggedNodes.indexOf(A)>=0)return;this.draggedOverNode=A;const S=l.Directory.is(A)&&A.expanded?A:A.parent;(this.potentialParent!==S||!this.draggedOverDec.hasTarget(S))&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=S,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren),this.model.treeModel.dispatchChange()),this.potentialParent!==A&&l.Directory.is(A)&&(this.dragOverTrigger.trigger(async()=>{A.expanded?(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren)):(await A.setExpanded(!0),this.draggedOverNode===A&&(this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.potentialParent=A,this.draggedOverDec.addTarget(this.potentialParent,c.TargetMatchMode.SelfAndChildren))),this.model.treeModel.dispatchChange()}),this.toCancelNodeExpansion.push(p.Disposable.create(()=>{this.dragOverTrigger.isTriggered()||this.dragOverTrigger.cancel()})))},this.handleDrop=async(y,A,S)=>{var w,T;this.eventBus.fire(new v.FileTreeDropEvent({event:y.nativeEvent,targetDir:S?S.codeUri.path:A&&A instanceof l.File?(w=A.parent)===null||w===void 0?void 0:w.uri.codeUri.path:A?A.uri.codeUri.path:new p.URI((T=this.workspaceService.workspace)===null||T===void 0?void 0:T.uri).codeUri.path}));try{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="copy";let D;const I=!!this.beingDraggedActiveUri;this.fileTreeService.isCompactMode&&S&&!A?.uri.isEqual(S)?D=null:A?D=l.Directory.is(A)?A:A.parent:D=this.root;let O;if(this.beingDraggedActiveUri){const M=this.fileTreeService.getNodeByPathOrUri(this.beingDraggedActiveUri);O=[new l.Directory(this.fileTreeService,M?.parent,this.beingDraggedActiveUri,this.beingDraggedActiveUri.displayName,{uri:this.beingDraggedActiveUri.toString(),isDirectory:!0,lastModification:new Date().getTime()},this.beingDraggedActiveUri.displayName)]}else if(O=this.beingDraggedNodes,!O||O.length===0)try{const M=JSON.parse(y.dataTransfer.getData("beingDraggedNodes"));M&&M.length!==0&&(O=M.map(R=>this.fileTreeService.getNodeByPathOrUri(new p.URI(R))).filter(Boolean),O.length||(O=await Promise.all(M.map(async R=>{const P=new p.URI(R);let k;const F=await this.filesystem.getFileStat(P.toString());return F?.isDirectory?k=new l.Directory(this.fileTreeService,this.root,P,P.displayName,{uri:P.toString(),isDirectory:!0,lastModification:new Date().getTime()},P.displayName):k=new l.File(this.fileTreeService,this.root,P,P.displayName,{uri:P.toString(),isDirectory:!0,lastModification:new Date().getTime()},P.displayName),k}))))}catch{}if(O.length>0){const M=S||D&&D.uri,R=O.filter(P=>P&&P.parent&&(this.beingDraggedActiveUri?!P.parent.uri.isEqual(M):!0));if(R.length>0){const P=await this.fileTreeAPI.mvFiles(R.map(k=>({url:k.uri,isDirectory:k.filestat.isDirectory})),M);if(P&&P.length>0)P.forEach(k=>{this.messageService.error(k)});else if(P){if(D)if(this.fileTreeService.isCompactMode&&I){for(const k of R)this.fileTreeService.refresh(k.parent);this.fileTreeService.refresh(D)}else for(const k of R){const F=D.uri.resolve(k.name);this.fileTreeService.moveNodeByPath(k.parent,D,k.name,k.name,k.type),k.updateMetaData({name:F.displayName,fileStat:{...k.filestat,uri:F.toString()},uri:F,tooltip:this.fileTreeAPI.getReadableTooltip(F)}),l.Directory.is(k)&&this.fileTreeService.refresh(k)}else if(A){if(this.fileTreeService.isCompactMode&&I)for(const k of R)this.fileTreeService.refresh(k.parent);else for(const k of R)this.fileTreeService.deleteAffectedNodeByPath(k.path);this.fileTreeService.refresh(A.parent)}}else return}}A&&this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(M=>{this.beingDraggedDec.removeTarget(M)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()}catch(D){this.logger.error(D)}},this.handleDragEnd=(y,A)=>{this.beingDraggedDec.removeTarget(A),this.potentialParent&&this.draggedOverDec.removeTarget(this.potentialParent),this.beingDraggedNodes.forEach(S=>{this.beingDraggedDec.removeTarget(S)}),this.beingDraggedNodes=[],this.beingDraggedActiveUri=void 0,this.potentialParent=null,this.model.treeModel.dispatchChange(),this.toCancelNodeExpansion.disposed||this.toCancelNodeExpansion.dispose()},this.model.decorations.addDecoration(this.beingDraggedDec),this.model.decorations.addDecoration(this.draggedOverDec)}get root(){return this.model.treeModel.root}};t.DragAndDropService=f,f.MS_TILL_DRAGGED_OVER_EXPANDS=500,r.__decorate([(0,o.Autowired)(g.IFileTreeAPI),r.__metadata("design:type",Object)],f.prototype,"fileTreeAPI",void 0),r.__decorate([(0,o.Autowired)(p.ILogger),r.__metadata("design:type",Object)],f.prototype,"logger",void 0),r.__decorate([(0,o.Autowired)(_.IMessageService),r.__metadata("design:type",Object)],f.prototype,"messageService",void 0),r.__decorate([(0,o.Autowired)(g.IFileTreeService),r.__metadata("design:type",d.FileTreeService)],f.prototype,"fileTreeService",void 0),r.__decorate([(0,o.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],f.prototype,"filesystem",void 0),r.__decorate([(0,o.Autowired)(s.IWorkspaceService),r.__metadata("design:type",Object)],f.prototype,"workspaceService",void 0),t.DragAndDropService=f=n=r.__decorate([(0,o.Injectable)(),r.__param(0,(0,o.Optional)()),r.__metadata("design:paramtypes",[E.FileTreeModelService])],f)},97738:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.FileTreeModelService=void 0;const r=e(85608),o=e(76003),c=e(97267),p=e(41869),v=e(91830),m=e(93899),_=e(26542),s=e(54414),g=e(14951),l=e(63067),h=e(53576),u=e(72665),d=e(6250),E=e(69959),f=e(2812),a=e(46377),b=r.__importDefault(e(89200)),y=e(57781),A=e(30577),{Path:S,isValidBasename:w}=p.path,{coalesce:T}=p.arrays,{trim:D,rtrim:I}=p.strings;let O=n=class{constructor(){this._isDisposed=!1,this._whenReady=new p.Deferred,this.selectedDecoration=new c.Decoration(b.default.mod_selected),this.focusedDecoration=new c.Decoration(b.default.mod_focused),this.contextMenuDecoration=new c.Decoration(b.default.mod_actived),this.loadingDecoration=new c.Decoration(b.default.mod_loading),this.cutDecoration=new c.Decoration(b.default.mod_cut),this._selectedFiles=[],this.disposableCollection=new p.DisposableCollection,this._isMultiSelected=!1,this.refreshedActionDelayer=new p.ThrottledDelayer(n.DEFAULT_REFRESHED_ACTION_DELAY),this.labelChangedDelayer=new p.ThrottledDelayer(n.DEFAULT_LABEL_CHANGED_DELAY),this.locationThrottler=new p.Throttler,this.onDidFocusedFileChangeEmitter=new p.Emitter,this.onDidContextMenuFileChangeEmitter=new p.Emitter,this.onDidSelectedFileChangeEmitter=new p.Emitter,this.onFileTreeModelChangeEmitter=new p.Emitter,this._initTreeModelReady=!1,this.clearFileSelectedDecoration=()=>{this.selectedDecoration.clearAppliedTarget(),this._selectedFiles=[]},this.activeFileDecoration=(R,P=!0)=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.selectedFiles=[R],P&&this.treeModel.dispatchChange())},this.selectFileDecoration=(R,P=!0)=>{R!==this.treeModel.root&&(this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),R&&(this.selectedFiles.length>0&&this.selectedDecoration.clearAppliedTarget(),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.selectedDecoration.addTarget(R),this._selectedFiles=[R],P&&this.treeModel.dispatchChange()))},this.activateFileActivedDecoration=R=>{this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuDecoration.addTarget(R),this.contextMenuFile=R,this.treeModel.dispatchChange()},this.activateFileFocusedDecoration=R=>{this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile&&(this.contextMenuDecoration.clearAppliedTarget(),this.contextMenuFile=void 0),this.focusedDecoration.addTarget(R),this.focusedFile=R,this.treeModel.dispatchChange()},this.activeFileFocusedDecoration=(R,P=!1)=>{R!==this.treeModel.root&&(this.focusedFile!==R&&(P?(this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.contextMenuFile=R):this.focusedFile&&(this.contextMenuFile=void 0,this.focusedDecoration.clearAppliedTarget()),R&&(this._selectedFiles.indexOf(R)<0&&(this.selectedDecoration.addTarget(R),this._selectedFiles.push(R),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri))),this.focusedDecoration.addTarget(R),this.focusedFile=R)),this.treeModel.dispatchChange())},this.toggleFileSelectedDecoration=R=>{const P=this._selectedFiles.indexOf(R);P>-1?(this.focusedFile===R&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this._selectedFiles.splice(P,1),this.selectedDecoration.clearAppliedTarget()):(this._selectedFiles.push(R),this.selectedDecoration.addTarget(R),this.focusedFile&&this.focusedDecoration.clearAppliedTarget(),this.focusedFile=R,this.focusedDecoration.addTarget(R)),this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.activeFileDecorationByRange=(R,P)=>{for(this.clearFileSelectedDecoration(),this.contextMenuFile=void 0;R<=P;R++){const k=this.treeModel.root.getTreeNodeAtIndex(R);k&&(this._selectedFiles.push(k),this.selectedDecoration.addTarget(k))}this.onDidSelectedFileChangeEmitter.fire(this._selectedFiles.map(k=>k.uri)),this.treeModel.dispatchChange()},this.deactivateFileDecoration=()=>{var R;this.focusedFile&&(this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0),this.contextMenuFile&&this.contextMenuDecoration.removeTarget(this.contextMenuFile),(R=this.treeModel)===null||R===void 0||R.dispatchChange()},this.toggleDirectory=async R=>{R.expanded?this.fileTreeHandle.collapseNode(R):this.fileTreeHandle.expandNode(R)},this.handleDblClick=()=>{this.commandService.executeCommand(p.FILE_COMMANDS.NEW_FILE.id)},this.handleContextMenu=(R,P,k)=>{var F;R.stopPropagation(),R.preventDefault();let L,B;P?(B=P,this._isMultiSelected?this.selectedFiles.indexOf(B)>=0?L=this.selectedFiles:L=[B]:L=[B]):(L=[this.treeModel.root],B=this.treeModel.root),this.activateFileActivedDecoration(B),this.setFileTreeContextKey(B),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null);const j=this.contextMenuService.createMenu({id:m.MenuId.ExplorerContext,contextKeyService:this.fileTreeService.contextMenuContextKeyService}),W=j.getMergedMenuNodes();j.dispose(),this.updateExplorerCompressedContextKey(B,k);const{x:U,y:Q}=R.nativeEvent;this.ctxMenuRenderer.show({anchor:{x:U,y:Q},menuNodes:W,args:k?[k,[k]]:[B.uri,L.map(V=>V.uri)]})},this.handleTreeBlur=()=>{var R,P,k;this._isDisposed||((P=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||P===void 0||P.set(!1),this.deactivateFileDecoration(),(k=this.contextKey)===null||k===void 0||k.explorerResourceIsFolder.set(!1))},this.handleTreeFocus=()=>{var R,P;(P=(R=this.contextKey)===null||R===void 0?void 0:R.filesExplorerFocused)===null||P===void 0||P.set(!0)},this.handleItemRangeClick=(R,P)=>{if(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),!this.focusedFile)this.handleItemClick(R,P);else if(this.focusedFile&&this.focusedFile!==R){this._isMultiSelected=!0;const k=this.treeModel.root.getIndexAtTreeNode(R),F=this.treeModel.root.getIndexAtTreeNode(this.focusedFile);F>k?this.activeFileDecorationByRange(k,F):F<k&&this.activeFileDecorationByRange(F,k)}},this.handleItemToggleClick=(R,P)=>{this._isMultiSelected=!0,!(P!==c.TreeNodeType.CompositeTreeNode&&P!==c.TreeNodeType.TreeNode)&&(this.selectedFiles.length===1&&E.Directory.isRoot(this.selectedFiles[0])&&this.clearFileSelectedDecoration(),this.toggleFileSelectedDecoration(R))},this.handleItemClick=(R,P=this.fileTreeService.isMultipleWorkspace?c.TreeNodeType.TreeNode:c.TreeNodeType.CompositeTreeNode,k)=>{var F,L,B,j;if(this.treeModel&&(R||(R=this.treeModel.root),this.updateExplorerCompressedContextKey(R,k),this._isMultiSelected=!1,(P===c.TreeNodeType.CompositeTreeNode||P===c.TreeNodeType.TreeNode)&&this.activeFileDecoration(R),this.fileTreeService.isCompactMode&&k?(this._activeUri=k,(F=this.contextKey)===null||F===void 0||F.explorerResourceIsFolder.set(!0)):k||(this._activeUri=null,(L=this.contextKey)===null||L===void 0||L.explorerResourceIsFolder.set(P===c.TreeNodeType.CompositeTreeNode)),this.corePreferences["workbench.list.openMode"]==="singleClick")){if(P===c.TreeNodeType.CompositeTreeNode){if((B=this.contextKey)===null||B===void 0||B.explorerResourceIsFolder.set(!0),R===this.treeModel.root)return;this.toggleDirectory(R)}else if(P===c.TreeNodeType.TreeNode){if((j=this.contextKey)===null||j===void 0||j.explorerResourceIsFolder.set(!1),R===this.treeModel.root)return;this.fileTreeService.openFile(R.uri),this.mainlayoutService.bottomExpanded&&this.commandService.executeCommand(h.RETRACT_BOTTOM_PANEL.id)}}},this.handleItemDoubleClick=(R,P)=>{P===c.TreeNodeType.TreeNode?this.fileTreeService.openAndFixedFile(R.uri):this.corePreferences["workbench.list.openMode"]==="doubleClick"&&this.toggleDirectory(R)},this.validateFileName=(R,P)=>{var k;if(P=this.getWellFormedFileName(P),!P||P.length===0||/^\s+$/.test(P))return{message:(0,p.localize)("validate.tree.emptyFileNameError"),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P};if(P[0]==="/"||P[0]==="\\")return{message:(0,p.localize)("validate.tree.fileNameStartsWithSlashError"),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P};if(P[0]===" "||P[P.length-1]===" ")return{message:(0,p.localize)("validate.tree.fileNameFollowOrStartWithSpaceWarning"),type:c.PROMPT_VALIDATE_TYPE.WARNING,value:P};let F;if(R.target){const B=R.target;if(P===B.name)return null;F=B.parent}else F=R.parent;return F&&!(R instanceof c.RenamePromptHandle&&R.target.displayName.indexOf(S.separator)>0)&&((k=F.children)===null||k===void 0?void 0:k.find(W=>W.name===P))?{message:(0,p.formatLocalize)("validate.tree.fileNameExistsError",P),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P}:T(P.split(/[\\/]/)).some(B=>!w(B))?{message:(0,p.formatLocalize)("validate.tree.invalidFileNameError",this.trimLongName(P)),type:c.PROMPT_VALIDATE_TYPE.ERROR,value:P}:null},this.proxyPrompt=R=>{let P=!1;const k=async V=>{const $=await this.fileTreeService.getNodeByPathOrUri(V);$&&(E.Directory.is($)?this.selectFileDecoration($):this.location($.uri))},F=async V=>{var $,Y,z;if(this.validateMessage=void 0,R instanceof c.RenamePromptHandle){const H=R.target,K=R.target.displayName.split(S.separator),Z=H.name.indexOf(S.separator)>0;if(Z&&this.activeUri&&!R.target.uri.toString().includes(this.activeUri.toString()))return!1;const X=this.activeUri?K.length-R.target.uri.toString().replace(this.activeUri.toString(),"").split(S.separator).length:-1,ie=X===-1?[]:K.slice(0,X).concat(V);let oe=H.uri,le=H.parent.uri.resolve(V);if(Z&&(($=this.activeUri)===null||$===void 0?void 0:$.displayName)===V||!Z&&V===H.name)return!0;R.addAddonAfter("loading_indicator"),Z&&ie.length>0&&E.Directory.is(H.parent)&&(oe=H.parent.uri.resolve(K.slice(0,X+1).join(S.separator)),le=H.parent.uri.resolve(ie.concat().join(S.separator)));const pe=await this.fileTreeAPI.mv(oe,le,H.type===c.TreeNodeType.CompositeTreeNode);if(pe)return this.validateMessage={type:c.PROMPT_VALIDATE_TYPE.ERROR,message:pe,value:V},this.fileTreeService.updateRefreshable(!0),R.addValidateMessage(this.validateMessage),!1;if(this.fileTreeService.updateRefreshable(!1),R.removeAddonAfter(),!Z&&H.parent){const q=await this.fileTreeService.moveNodeByPath(H.parent,H.parent,H.name,V,H.type);q&&this.selectFileDecoration(q,!1),this.fileTreeService.updateRefreshable(!0)}else if(E.Directory.is(H)&&!E.Directory.isRoot(H)){H.updateMetaData({name:ie.concat(K.slice(X+1)).join(S.separator),uri:le,fileStat:{...H.filestat,uri:le.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(le)}),this.treeModel.dispatchChange();let q;E.Directory.is(H.parent)&&(!((Y=H.parent.children)===null||Y===void 0)&&Y.find(Ee=>H.path.indexOf(Ee.path)>=0))?q=this.fileTreeService.refresh(H.parent):q=this.fileTreeService.refresh(H),q.then(()=>{k(le)})}R.removeAddonAfter()}else if(R instanceof c.NewPromptHandle){const H=R.parent,K=H.uri.resolve(V);let Z;if(R.addAddonAfter("loading_indicator"),this.fileTreeService.updateRefreshable(!0),R.type===c.TreeNodeType.CompositeTreeNode?Z=await this.fileTreeAPI.createDirectory(K):Z=await this.fileTreeAPI.createFile(K),R.removeAddonAfter(),Z)return this.validateMessage={type:c.PROMPT_VALIDATE_TYPE.ERROR,message:Z,value:V},this.fileTreeService.updateRefreshable(!1),R.addValidateMessage(this.validateMessage),!1;if(V.includes(S.separator)&&this.fileTreeService.refresh(H).then(()=>{k(H.uri.resolve(V))}),this.fileTreeService.isCompactMode)if(R.type===c.TreeNodeType.CompositeTreeNode)if((!H.children||H.children.length===0)&&!E.Directory.isRoot(H)){const ie=H.uri.resolve(V),oe=[H.name].concat(V).join(S.separator);H.updateMetaData({name:oe,uri:ie,fileStat:{...H.filestat,uri:ie.toString()},tooltip:this.fileTreeAPI.getReadableTooltip(ie)}),k(ie)}else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V));else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V));else await this.fileTreeService.addNode(H,V,R.type),k(H.uri.resolve(V))}return(z=this.contextKey)===null||z===void 0||z.filesExplorerInputFocused.set(!1),!0},L=async V=>{var $,Y,z,H;if(this.validateMessage&&this.validateMessage.type===c.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;if(P)return!1;if(!V){($=this.contextKey)===null||$===void 0||$.explorerCompressedFocusContext.set(!1),(Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFirstFocusContext.set(!1),(z=this.contextKey)===null||z===void 0||z.explorerCompressedLastFocusContext.set(!1),this.fileTreeService.isCompactMode&&R instanceof c.NewPromptHandle&&this.fileTreeService.refresh(R.parent);return}return(H=this.contextKey)===null||H===void 0||H.filesExplorerInputFocused.set(!1),await F(V),!0},B=async V=>{if(P=!0,this.validateMessage&&this.validateMessage.type===c.PROMPT_VALIDATE_TYPE.ERROR)return!1;if(V.trim()===""||this.validateMessage&&this.validateMessage.type!==c.PROMPT_VALIDATE_TYPE.ERROR)return this.validateMessage=void 0,!0;const $=await F(V);return P=!1,!!$},j=async()=>{var V;(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!0)},W=()=>{var V;this.fileTreeService.updateRefreshable(!0),(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),this.contextMenuFile&&this.selectFileDecoration(this.contextMenuFile,!0)},U=()=>{var V;(V=this.contextKey)===null||V===void 0||V.filesExplorerInputFocused.set(!1),this.fileTreeService.isCompactMode&&R instanceof c.NewPromptHandle&&this.fileTreeService.refresh(R.parent)},Q=V=>{const $=this.validateFileName(R,V);$?(this.validateMessage=$,R.addValidateMessage($)):!$&&this.validateMessage&&this.validateMessage.value!==V&&(this.validateMessage=void 0,R.removeValidateMessage())};R.destroyed||(this.fileTreeService.updateRefreshable(!1),R.onChange(Q),R.onCommit(B),R.onBlur(L),R.onFocus(j),R.onDestroy(W),R.onCancel(U))},this.copyFile=async R=>{var P;this.pasteStore&&this.pasteStore.type===d.PasteTypes.CUT&&(this._pasteStore.files.forEach(F=>{F&&this.cutDecoration.removeTarget(F)}),(P=this.contextKey)===null||P===void 0||P.explorerResourceCut.set(!1)),this.treeModel.dispatchChange();const k=[];for(const F of R){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:d.PasteTypes.COPY},this.clipboardService.writeResources(R)},this.pasteFile=async R=>{var P,k;let F=!1,L=this.fileTreeService.getNodeByPathOrUri(R.toString());if(!L)return;let B=this.pasteStore,j=!1;if(!B){const W=await this.clipboardService.readResources();if(!W||!W.length)return;B={files:[],type:d.PasteTypes.COPY,crossFiles:W},j=!0}if(B){if(E.Directory.is(L)||(F=!0,L=L.parent),j){const W=(0,p.localize)("file.confirm.paste.ok"),U=(0,p.localize)("file.confirm.paste.cancel");if(await this.dialogService.warning((0,p.formatLocalize)("file.confirm.paste",`[ ${(P=B.crossFiles)===null||P===void 0?void 0:P.map(V=>V.displayName).join(",")} ]`,E.Directory.isRoot(L)?L.uri.displayName:L.displayName),[U,W])!==W)return}if(B.type===d.PasteTypes.CUT){for(const U of B.files)U&&this.cutDecoration.removeTarget(U),L.expanded||await L.setExpanded(!0);const W=await this.fileTreeAPI.mvFiles(B.crossFiles?B.crossFiles.map(U=>{var Q;return{url:U,isDirectory:((Q=this.fileTreeService.getNodeByPathOrUri(U))===null||Q===void 0?void 0:Q.filestat.isDirectory)||!1}}):B.files.map(U=>({url:U.uri,isDirectory:U.filestat.isDirectory})),L.uri);W&&W.length>0&&(W.forEach(U=>{this.messageService.error(U)}),this.fileTreeService.refresh()),(k=this.contextKey)===null||k===void 0||k.explorerResourceCut.set(!1),this.treeModel.dispatchChange(),this._pasteStore={files:[],type:d.PasteTypes.NONE,crossFiles:void 0}}else if(B.type===d.PasteTypes.COPY){const W=B.crossFiles?B.crossFiles:B.files.map(U=>U.uri);for(const U of W){L.uri.isEqual(U)&&!F&&(L=L.parent);const Q=L.uri.resolve(U.displayName);L.expanded||await L.setExpanded(!0);const V=await this.fileTreeAPI.copyFile(U,Q);if(V)if(V.uri){const $=new p.URI(V.uri),Y=await this.filesystem.getFileStat(U.toString());this.fileTreeService.addNode(L,$.displayName,Y?.isDirectory?c.TreeNodeType.CompositeTreeNode:c.TreeNodeType.TreeNode)}else this.messageService.error(`Error when copy file: ${U.toString()}, ${V}`)}}}},this.cutFile=async R=>{var P;R.length>0&&((P=this.contextKey)===null||P===void 0||P.explorerResourceCut.set(!0)),this._pasteStore&&this._pasteStore.type===d.PasteTypes.CUT&&this._pasteStore.files.forEach(F=>{this.cutDecoration.removeTarget(F)});const k=[];for(const F of R){const L=this.fileTreeService.getNodeByPathOrUri(F);L&&k.push(L)}this._pasteStore={files:k,type:d.PasteTypes.CUT};for(const F of k)F&&this.cutDecoration.addTarget(F);this.treeModel.dispatchChange()},this.location=async R=>{if(await this.whenReady,!this.fileTreeService.filterMode)return this._fileToLocation=R,this.locationThrottler.queue(this.doLocation)},this.doLocation=async()=>{if(!this._fileToLocation)return;const R=this._fileToLocation;let P;if(typeof R=="string"?P=R:P=await this.fileTreeService.getFileTreeNodePathByUri(R),P){if(!this.fileTreeHandle)return;const k=await this.fileTreeHandle.ensureVisible(P,"center",!0);k&&this.selectFileDecoration(k)}this._fileToLocation=void 0},this.locationOnShow=R=>{this._nextLocationTarget=R},this.performLocationOnHandleShow=async()=>{this._nextLocationTarget&&(await this.location(this._nextLocationTarget),this._nextLocationTarget=void 0)}}get onDidFocusedFileChange(){return this.onDidFocusedFileChangeEmitter.event}get onDidContextMenuFileChange(){return this.onDidContextMenuFileChangeEmitter.event}get onDidSelectedFileChange(){return this.onDidSelectedFileChangeEmitter.event}get onFileTreeModelChange(){return this.onFileTreeModelChangeEmitter.event}get fileTreeHandle(){return this._fileTreeHandle}get decorations(){return this._decorations}get treeModel(){return this._treeModel}get dndService(){return this._dndService}get whenReady(){return this._whenReady.promise}get focusedFile(){return this._focusedFile}set focusedFile(R){this.onDidFocusedFileChangeEmitter.fire(R?R.uri:void 0),this._focusedFile=R}get contextMenuFile(){return this._contextMenuFile}set contextMenuFile(R){this.onDidContextMenuFileChangeEmitter.fire(R?R.uri:void 0),this._contextMenuFile=R}get selectedFiles(){return this._selectedFiles}set selectedFiles(R){this.onDidSelectedFileChangeEmitter.fire(R?R.map(P=>P.uri):[]),this._selectedFiles=R}get activeUri(){return this._activeUri}get pasteStore(){return this._pasteStore}get explorerStorage(){return this._explorerStorage}get currentRelativeUriContextKey(){return this._currentRelativeUriContextKey||(this._currentRelativeUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextRelativeUri","")),this._currentRelativeUriContextKey}get currentContextUriContextKey(){return this._currentContextUriContextKey||(this._currentContextUriContextKey=this.fileTreeService.contextMenuContextKeyService.createKey("filetreeContextUri","")),this._currentContextUriContextKey}get contextMenuResourceContext(){return this._contextMenuResourceContext||(this._contextMenuResourceContext=new v.ResourceContextKey(this.fileTreeService.contextMenuContextKeyService)),this._contextMenuResourceContext}get contextKey(){return this.fileTreeService.contextKey}get initTreeModelReady(){return this._initTreeModelReady}async initTreeModel(){this._initTreeModelReady=!1;const R=(await this.fileTreeService.resolveChildren())[0];if(!R){this._whenReady.resolve();return}this._treeModel=this.injector.get(f.FileTreeModel,[R]),this.initDecorations(R),this._dndService=this.injector.get(A.DragAndDropService,[this]),this.treeStateWatcher=this._treeModel.getTreeStateWatcher(!0),this.disposableCollection.push(this.fileTreeService.onNodeRefreshed(()=>{this.initTreeModelReady&&(this.refreshedActionDelayer.isTriggered()||this.refreshedActionDelayer.cancel(),this.refreshedActionDelayer.trigger(async()=>{if(this.selectedFiles.length===0){const k=this.editorService.currentEditor;k&&k.currentUri&&this.location(k.currentUri)}this.fileTreeService.isCompactMode||(this._activeUri=null)}))})),this.disposableCollection.push(this.fileTreeService.onWorkspaceChange(()=>{this.disposableCollection.dispose(),this.initTreeModel()})),this.disposableCollection.push(this.labelService.onDidChange(async()=>{this.initTreeModelReady&&(this.labelChangedDelayer.isTriggered()||this.labelChangedDelayer.cancel(),this.labelChangedDelayer.trigger(async()=>{this.fileTreeService.refresh()}))})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.WillResolveChildren,k=>{this.loadingDecoration.addTarget(k),this.treeModel.dispatchChange()})),this.disposableCollection.push(this.treeModel.root.watcher.on(c.TreeNodeEvent.DidResolveChildren,k=>{this.loadingDecoration.clearAppliedTarget(),this.treeModel.dispatchChange()})),this._explorerStorage=await this.storageProvider(p.STORAGE_NAMESPACE.EXPLORER);const P=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);P&&await this.loadFileTreeSnapshot(P),this.disposableCollection.push(this.treeStateWatcher.onDidChange(()=>{if(!this._initTreeModelReady)return;const k=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),F=this.treeStateWatcher.snapshot();this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...k,...F})})),this.fileTreeService.startWatchFileEvent(),this.onFileTreeModelChangeEmitter.fire(this._treeModel),this._whenReady.resolve(),this._initTreeModelReady=!0}initDecorations(R){this._decorations=new c.DecorationsManager(R),this._decorations.addDecoration(this.selectedDecoration),this._decorations.addDecoration(this.focusedDecoration),this._decorations.addDecoration(this.contextMenuDecoration),this._decorations.addDecoration(this.cutDecoration),this._decorations.addDecoration(this.loadingDecoration)}setFileTreeContextKey(R){var P;this.currentContextUriContextKey.set(R.uri.toString()),this.currentRelativeUriContextKey.set((this.treeModel.root.uri.relative(R.uri)||"").toString()),this.contextMenuResourceContext.set(R.uri),(P=this.contextKey)===null||P===void 0||P.explorerResourceIsFolder.set(R&&R.type===c.TreeNodeType.CompositeTreeNode)}async loadFileTreeSnapshot(R){await this._treeModel.loadTreeState(R)}updateExplorerCompressedContextKey(R,P){var k,F,L,B,j,W,U,Q,V,$,Y,z,H,K,Z,X;if(R&&P){(k=this.contextKey)===null||k===void 0||k.explorerCompressedFocusContext.set(!0);const ie=new S(R.name);ie.name===P.displayName?((F=this.contextKey)===null||F===void 0||F.explorerCompressedLastFocusContext.set(!0),(L=this.contextKey)===null||L===void 0||L.explorerCompressedFirstFocusContext.set(!1)):ie.root&&ie.root.name===P.displayName?((B=this.contextKey)===null||B===void 0||B.explorerCompressedLastFocusContext.set(!1),(j=this.contextKey)===null||j===void 0||j.explorerCompressedFirstFocusContext.set(!0)):((W=this.contextKey)===null||W===void 0||W.explorerCompressedLastFocusContext.set(!1),(U=this.contextKey)===null||U===void 0||U.explorerCompressedFirstFocusContext.set(!1))}else R?R.name.indexOf(S.separator)>0?((Q=this.contextKey)===null||Q===void 0||Q.explorerCompressedFocusContext.set(!0),(V=this.contextKey)===null||V===void 0||V.explorerCompressedFirstFocusContext.set(!1),($=this.contextKey)===null||$===void 0||$.explorerCompressedLastFocusContext.set(!0)):((Y=this.contextKey)===null||Y===void 0||Y.explorerCompressedFocusContext.set(!1),(z=this.contextKey)===null||z===void 0||z.explorerCompressedFirstFocusContext.set(!1),(H=this.contextKey)===null||H===void 0||H.explorerCompressedLastFocusContext.set(!1)):((K=this.contextKey)===null||K===void 0||K.explorerCompressedFocusContext.set(!1),(Z=this.contextKey)===null||Z===void 0||Z.explorerCompressedFirstFocusContext.set(!1),(X=this.contextKey)===null||X===void 0||X.explorerCompressedLastFocusContext.set(!1))}handleTreeHandler(R){this._fileTreeHandle=R}toggleOrOpenCurrentFile(){let R;this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),R&&(this.activeFileDecoration(R),E.Directory.is(R)?this.toggleDirectory(R):this.fileTreeService.openFile(R.uri))}moveToNext(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const k=this.treeModel.root.getIndexAtTreeNode(R)+1,F=this.treeModel.root.getTreeNodeAtIndex(k),L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=(k+1)*a.FILE_TREE_NODE_HEIGHT-(L.scrollPosition||0),{height:j}=this.fileTreeHandle.getCurrentSize();F&&(this.activateFileFocusedDecoration(F),B>j&&this.fileTreeHandle.ensureVisible(F,"end"))}moveToPrev(){let R;if(this.focusedFile?R=this.focusedFile:this.contextMenuFile&&(R=this.contextMenuFile),!R)return;const P=this.treeModel.root.getIndexAtTreeNode(R);if(P===0)return;const k=P-1,F=this.treeModel.root.getTreeNodeAtIndex(k);if(!F)return;const L=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY),B=k*a.FILE_TREE_NODE_HEIGHT;this.activateFileFocusedDecoration(F),(L.scrollPosition||0)>B&&this.fileTreeHandle.ensureVisible(F,"start")}async collapseCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const P=this.selectedFiles.indexOf(R);P>=0&&(this.selectedFiles.splice(P,1),this.selectedDecoration.removeTarget(R));let k;if(E.Directory.is(R)&&R.expanded)k=R;else if(R)E.Directory.isRoot(R.parent)?k=R:k=R.parent;else return;this.focusedFile=k,k&&k.expanded&&(await this.fileTreeHandle.collapseNode(k),this.activeFileFocusedDecoration(k,!0))}async expandCurrentFile(){let R;this.focusedFile?(R=this.focusedFile,this.focusedDecoration.clearAppliedTarget(),this.focusedFile=void 0):this.contextMenuFile&&(R=this.contextMenuFile,this.focusedDecoration.removeTarget(this.contextMenuFile),this.contextMenuFile=void 0);const P=this.selectedFiles.indexOf(R);P>=0&&(this.selectedFiles.splice(P,1),this.selectedDecoration.removeTarget(R)),this.focusedFile=R,E.Directory.is(R)&&(R.expanded||await this.fileTreeHandle.expandNode(R))}async collapseAll(){await this.treeModel.root.collapsedAll();const R=this.explorerStorage.get(n.FILE_TREE_SNAPSHOT_KEY);R&&this.explorerStorage.set(n.FILE_TREE_SNAPSHOT_KEY,{...R,expandedDirectories:{atSurface:[],buried:[]}})}async deleteFileByUris(R){var P;if(R.length===0)return;if(this.corePreferences["explorer.confirmDelete"]){const B=this.applicationService.backendOS===p.OperatingSystem.Linux,j=B?(0,p.localize)("file.confirm.delete.ok"):(0,p.localize)("file.confirm.moveToTrash.ok"),W=(0,p.localize)("file.confirm.delete.cancel"),U=10;let Q=R.slice(0,U).map($=>$.displayName).join(`
|
|
31620
31620
|
`);if(R.length>U&&(Q+=`
|
|
31621
31621
|
...`),B||(Q+=`
|
|
31622
31622
|
|
|
@@ -31738,7 +31738,7 @@ your modifications. Are you sure to regenerate?`,"aiNative.resolve.conflict.mess
|
|
|
31738
31738
|
|
|
31739
31739
|
\u662F\u5426\u8981\u9000\u51FA?`,"authentication.signOutMessageSimple":"\u662F\u5426\u8981\u9000\u51FA {0}?","authentication.useOtherAccount":"\u4F7F\u7528\u5176\u4ED6\u8D26\u6237\u767B\u5F55","authentication.selectAccount":"\u6269\u5C55 '{0}' \u5C06\u8981\u8BBF\u95EE {1} \u8D26\u6237","authentication.getSessionPlaceholder":"\u9009\u62E9\u4E00\u4E2A\u8D26\u6237\u7ED9 '{0}' \u4F7F\u7528","authentication.confirmAuthenticationAccess":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 '{2}' \u8BBF\u95EE {1}","authentication.confirmLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u767B\u5F55","authentication.confirmReLogin":"\u6269\u5C55 '{0}' \u5C06\u8981\u4F7F\u7528 {1} \u518D\u6B21\u767B\u5F55","authentication.signInRequests":"\u767B\u5F55 {0}","authentication.signOut":"\u9000\u51FA {0}","authentication.noAccounts":"\u76EE\u524D\u6CA1\u6709\u767B\u5F55\u4EFB\u4F55\u8D26\u6237","authentication.signedOut":"\u6210\u529F\u9000\u51FA","refactoring-changes.ask.1.create":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.copy":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.move":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.1.delete":"\u6269\u5C55 '{0} ' \u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.create":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u65B0\u5EFA\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.copy":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u590D\u5236\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.move":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u79FB\u52A8\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.ask.N.delete":"{0} \u4E2A\u63D2\u4EF6\u5E0C\u671B\u901A\u8FC7\u5220\u9664\u6B64\u6587\u4EF6\u6765\u8FDB\u884C\u91CD\u6784\u66F4\u6539","refactoring-changes.msg.showPreview":"\u663E\u793A\u9884\u89C8","refactoring-changes.msg.skipChanges":"\u8DF3\u8FC7\u66F4\u6539","keyboard.chooseKeyboardLayout":"\u9009\u62E9\u5E03\u5C40\u6587\u4EF6\u914D\u7F6E","keyboard.autoDetect.label":"\u81EA\u52A8\u68C0\u6D4B","keyboard.autoDetect.description":"\uFF08\u5F53\u524D\uFF1A'{0} '\uFF09","keyboard.autoDetect.detail":"\u5C1D\u8BD5\u901A\u8FC7\u6D4F\u89C8\u5668\u53CA\u6309\u952E\u4FE1\u606F\u8FDB\u884C\u5E03\u5C40\u81EA\u52A8\u68C0\u6D4B","editor.configuration.suggest.filterGraceful":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","editor.configuration.suggest.insertMode":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","editor.configuration.suggest.insertMode.insert":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.insertMode.replace":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","editor.configuration.suggest.localityBonus":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","editor.configuration.suggest.maxVisibleSuggestions.dep":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","editor.configuration.suggest.preview":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","editor.configuration.suggest.shareSuggestSelections":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","editor.configuration.suggest.showIcons":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","editor.configuration.suggest.showInlineDetails":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","editor.configuration.suggest.showStatusBar":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","editor.configuration.suggest.snippetsPreventQuickSuggestions":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","editor.configuration.suggestFontSize":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","editor.configuration.suggestLineHeight":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","editor.configuration.suggestOnTriggerCharacters":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnterSmart":"\u4EC5\u5728\u5EFA\u8BAE\u505A\u51FA\u6587\u672C\u66F4\u6539\u65F6\uFF0C\u624D\u4F7F\u7528 `Enter` \u63A5\u53D7\u5EFA\u8BAE\u3002","editor.configuration.acceptSuggestionOnEnter":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728 `Tab` \u952E\u4E4B\u5916\uFF0C\u8FD8\u4F7F\u7528 `Enter` \u952E\u6765\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u6709\u52A9\u4E8E\u907F\u514D\u5728\u63D2\u5165\u65B0\u884C\u6216\u63A5\u53D7\u5EFA\u8BAE\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","editor.configuration.acceptSuggestionOnCommitCharacter":"\u63A7\u5236\u662F\u5426\u5728\u4F7F\u7528\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u5206\u53F7 (`;`) \u662F\u4E00\u4E2A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u53EF\u4EE5\u63A5\u53D7\u4E00\u4E2A\u5EFA\u8BAE\u5E76\u952E\u5165\u8BE5\u5B57\u7B26\u3002","editor.configuration.snippetSuggestions.top":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u9876\u90E8\u3002","editor.configuration.snippetSuggestions.bottom":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u653E\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u5E95\u90E8\u3002","editor.configuration.snippetSuggestions.inline":"\u5C06\u4EE3\u7801\u7247\u6BB5\u7684\u5EFA\u8BAE\u6DF7\u5408\u5728\u5176\u4ED6\u5EFA\u8BAE\u7684\u4E2D\u95F4\u3002","editor.configuration.snippetSuggestions.none":"\u4E0D\u5C55\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","editor.configuration.snippetSuggestions":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u540C\u663E\u793A\u4EE5\u53CA\u5B83\u4EEC\u7684\u6392\u5E8F\u65B9\u5F0F\u3002","editor.configuration.wordBasedSuggestions":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u8BA1\u7B97\u81EA\u52A8\u8865\u5168\u5217\u8868\u3002","editor.configuration.suggestSelection":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.first":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","editor.configuration.suggestSelection.recentlyUsed":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","editor.configuration.suggestSelection.recentlyUsedByPrefix":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","editor.configuration.tabCompletion":"\u542F\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.off":"\u7981\u7528 Tab \u8865\u5168\u3002","editor.configuration.tabCompletion.on":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","editor.configuration.tabCompletion.onlySnippets":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"editor.configuration.editor.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.editor.guides.bracketPairsHorizontal":"\u63A7\u5236\u662F\u5426\u542F\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.renderLineHighlight":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","editor.configuration.renderLineHighlight.all":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","editor.configuration.renderLineHighlightOnlyWhenFocus":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","editor.configuration.codeLens":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","editor.configuration.suggest.showClasss":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showColors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstants":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showConstructors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showCustomcolors":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showDeprecated":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEnumMembers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showEnums":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showEvents":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFields":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFiles":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFolders":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showFunctions":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showInterfaces":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showIssues":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showKeywords":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showMethods":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showModules":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showOperators":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showPropertys":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showReferences":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showSnippets":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showStructs":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTexts":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showTypeParameters":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"editor.configuration.suggest.showUnits":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showUsers":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"editor.configuration.suggest.showValues":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.showVariables":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","editor.configuration.suggest.maxVisibleSuggestions":"\u63A7\u5236 IntelliSense \u5728\u663E\u793A\u6EDA\u52A8\u6761\u4E4B\u524D\u5C06\u663E\u793A\u7684\u5EFA\u8BAE\u6570\u91CF\uFF08\u6700\u591A 15 \u4E2A\uFF09\u3002","editor.configuration.suggest.details.visible":"\u63A7\u5236\u7F16\u8F91\u5668\u4EE3\u7801\u8865\u5168\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00\u8BE6\u60C5\u4FE1\u606F","editor.configuration.suggest.filtered":"\u63A7\u5236\u662F\u5426\u5E94\u4ECE IntelliSense \u4E2D\u8FC7\u6EE4\u6389\u67D0\u4E9B\u5EFA\u8BAE\u7C7B\u578B\u3002\u53EF\u4EE5\u5728\u6B64\u5904\u627E\u5230\u4E00\u4EFD\u5EFA\u8BAE\u7C7B\u578B\u5217\u8868: https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions.","editor.configuration.suggest.filtered.method":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `method` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.function":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `function` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constructor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constructor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.field":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `field` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.variable":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `variable` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.class":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `class` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.struct":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `struct` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.interface":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `interface` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.module":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `module` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.property":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `property` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.event":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `event` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.operator":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `operator` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.unit":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `unit` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.value":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `value` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.constant":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `constant` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enum":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enum` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.enumMember":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `enumMember` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.keyword":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `keyword` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.text":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `text` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.color":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `color` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.file":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `file` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.reference":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `reference` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.customcolor":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `customcolor` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.folder":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `folder` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.typeParameter":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `typeParameter` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.suggest.filtered.snippet":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u4F1A\u5C55\u793A `snippet` \u7C7B\u578B\u7684\u5EFA\u8BAE\u3002","editor.configuration.editor.gotoLocation.multiple":'\u63A7\u5236 "\u8F6C\u5230" \u547D\u4EE4\uFF08\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\uFF09\u5728\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6\u7684\u884C\u4E3A\u3002',"editor.configuration.gotoLocation.multiple.peek":"\u5728\u901F\u89C8\u89C6\u56FE(Peek View)\u4E2D\u663E\u793A\u7ED3\u679C\u3002(\u9ED8\u8BA4)","editor.configuration.gotoLocation.multiple.gotoAndPeek":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u901F\u89C8\u89C6\u56FE(Peek View)\u3002","editor.configuration.gotoLocation.multiple.goto":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u7ED3\u679C\u542F\u7528\u65E0\u901F\u89C8\u5BFC\u822A","editor.configuration.experimental.stickyScroll.enabled":"\u5728\u7F16\u8F91\u5668\u9876\u90E8\u7684\u6EDA\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u5D4C\u5957\u7684\u5F53\u524D\u4F5C\u7528\u57DF\u3002","editor.configuration.maxTokenizationLineLength":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BC6\u3002","editor.configuration.codeActionsOnSave.organizeImports":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u6574\u7406\u5BFC\u5165\uFF08Import\uFF09\u8BED\u53E5\u3002","editor.configuration.codeActionsOnSave.fixAll":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u6587\u4EF6\u4FDD\u5B58\u65F6\u8FD0\u884C\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u3002","editor.configuration.codeActionsOnSave":"\u5728\u4FDD\u5B58\u65F6\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7C7B\u578B","editor.configuration.codeActionsOnSaveTimeout":"\u5728\u6B64\u8D85\u65F6\u65F6\u95F4(\u6BEB\u79D2)\u4E4B\u540E\u4EE3\u7801\u64CD\u4F5C\u5C06\u88AB\u53D6\u6D88\u3002","editor.configuration.codeActionsOnSaveNotification":"\u4EE3\u7801\u64CD\u4F5C\u6267\u884C\u65F6\u662F\u5426\u5C55\u793A\u901A\u77E5\u4FE1\u606F","editor.configuration.quickSuggestionsDelay":"\u63A7\u5236\u663E\u793A\u667A\u80FD\u63D0\u793A\u7684\u5EF6\u8FDF\u65F6\u957F (\u6BEB\u79D2)\u3002","editor.configuration.tabSize":"\u63A7\u5236 Tab \u7F29\u8FDB\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u82E5\u542F\u7528 `#editor.detectIndentation#`\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6","editor.configuration.fontWeight":'\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\uFF0C\u63A5\u6536 "normal" \u548C "bold" \u5173\u952E\u8BCD\u6216\u8005 1 \u5230 1000 \u6570\u503C\u3002',"editor.configuration.largeFileSize":"\u63A7\u5236\u8D85\u5927\u6587\u4EF6\u7684\u81EA\u5B9A\u4E49\u4F53\u79EF\u3002(\u5355\u4F4D\uFF1AB)","editor.configuration.preferredFormatter":"\u914D\u7F6E\u4F18\u5148\u4F7F\u7528\u7684\u683C\u5F0F\u5316\u5668\u3002","editor.configuration.wrapTab":"\u63A7\u5236\u5F53\u7F16\u8F91\u5668 Tab \u8D85\u8FC7\u53EF\u7528\u7A7A\u95F4\u65F6\uFF0C\u662F\u5426\u4F7F\u7528\u6362\u884C\u6765\u4EE3\u66FF\u6EDA\u52A8\u6A21\u5F0F\u3002","editor.configuration.enablePreviewFromCodeNavigation":"\u63A7\u5236\u5F53\u4EE3\u7801\u5BFC\u822A\u4ECE\u5176\u51FA\u53D1\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u4ECD\u5904\u4E8E\u9884\u89C8\u6A21\u5F0F\u3002","editor.configuration.formatOnSaveTimeout":"\u63A7\u5236\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.formatOnSave#` \u542F\u7528\u65F6\u751F\u6548\u3002","editor.configuration.inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","editor.configuration.inlineSuggest.showToolbar":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.always":"\u6BCF\u5F53\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u65F6\uFF0C\u5C31\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.onHover":"\u5C06\u9F20\u6807\u60AC\u505C\u5728\u5185\u8054\u5EFA\u8BAE\u4E0A\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.inlineSuggest.showToolbar.never":"\u6C38\u4E0D\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","editor.configuration.hover.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u63D0\u793A\u3002","editor.configuration.hover.delay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u663E\u793A\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002","editor.configuration.hover.sticky":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u662F\u5426\u5728\u9F20\u6807\u60AC\u505C\u65F6\u4FDD\u6301\u53EF\u89C1\u3002","editor.configuration.hover.hidingDelay":"\u63A7\u5236\u4EE3\u7801\u63D0\u793A\u9690\u85CF\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\u3002\u9700\u8981 `editor.hover.sticky` \u8BBE\u7F6E\u4E3A true \u65F6\u751F\u6548\u3002","editor.configuration.hover.above":"\u4F18\u5148\u663E\u793A\u4EE3\u7801\u63D0\u793A\u5728\u884C\u4E0A\u65B9\uFF0C\u5982\u679C\u884C\u6709\u7A7A\u95F4\u3002","editor.configuration.autoSave":"\u63A7\u5236\u5982\u4F55\u81EA\u52A8\u4FDD\u5B58\u6587\u4EF6\u3002","editor.configuration.formatOnSave":"\u5728\u4FDD\u5B58\u65F6\u683C\u5F0F\u5316\u6587\u4EF6","editor.configuration.formatOnType":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5728\u952E\u5165\u540E\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","editor.configuration.formatOnPaste":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u9700\u8981\u5F53\u524D\u6587\u4EF6\u6709\u4E00\u4E2A\u683C\u5F0F\u5316\u5DE5\u5177\u5E76\u4E14\u8BE5\u683C\u5F0F\u5316\u683C\u5C40\u5FC5\u987B\u80FD\u591F\u5728\u6587\u6863\u4E2D\u683C\u5F0F\u5316\u4E00\u4E2A\u8303\u56F4\u3002","editor.configuration.autoIndent":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u8BE5\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u6216\u79FB\u52A8\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002\u5FC5\u987B\u63D0\u4F9B\u5E26\u6709\u8BE5\u8BED\u8A00\u7F29\u8FDB\u89C4\u5219\u7684\u6269\u5C55\u3002","editor.configuration.autoSaveDelay":"\u63A7\u5236\u81EA\u52A8\u4FDD\u5B58\u7684\u5EF6\u8FDF\u65F6\u957F\uFF08\u6BEB\u79D2\uFF09\u3002\u4EC5\u5F53 `#editor.autoSave#` \u8BBE\u7F6E\u4E3A\u201C\u7F16\u8F91\u540E\u81EA\u52A8\u4FDD\u5B58\u201D\u65F6\u751F\u6548\u3002","editor.configuration.askIfDiff":"\u4FDD\u5B58\u6587\u4EF6\u65F6\u5982\u679C\u78C1\u76D8\u4E0A\u7684\u6587\u4EF6\u8F83\u65B0\uFF0C\u8FDB\u884C\u63D0\u793A\u624B\u52A8\u89E3\u51B3\u4FDD\u5B58\u51B2\u7A81\u3002","editor.configuration.forceReadOnly":"\u662F\u5426\u542F\u7528 \u53EA\u8BFB\u6A21\u5F0F","editor.configuration.bracketPairColorization.enabled":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","editor.configuration.guides.bracketPairs":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","editor.configuration.mouseBackForwardToNavigate":"\u5141\u8BB8\u4F7F\u7528\u9F20\u6807\u6309\u94AE 4 \u548C 5 \u6765\u6267\u884C\u547D\u4EE4\u201CGo Back\u201D\u548C\u201CGo Forward\u201D\u3002","editor.configuration.previewMode":"\u4F7F\u7528\u9884\u89C8\u6A21\u5F0F\u6253\u5F00","editor.configuration.tokenColorCustomizations":"\u8986\u76D6\u5F53\u524D\u6240\u9009\u989C\u8272\u4E3B\u9898\u4E2D\u7684\u7F16\u8F91\u5668\u989C\u8272\u548C\u5B57\u4F53\u6837\u5F0F","editor.configuration.workbench.editorAssociations":'\u5C06 glob \u6A21\u5F0F\u914D\u7F6E\u5230\u7F16\u8F91\u5668(\u4F8B\u5982 `"*\u5341\u516D\u8FDB\u5236": "hexEditor.hexEdit"`)\u3002\u8FD9\u4E9B\u4F18\u5148\u987A\u5E8F\u9AD8\u4E8E\u9ED8\u8BA4\u884C\u4E3A\u3002',"editor.configuration.guides.indentation":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.guides.highlightActiveIndentation":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","editor.configuration.trimAutoWhitespace":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","editor.configuration.unicodeHighlight.ambiguousCharacters":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u53EF\u80FD\u4E0E\u57FA\u672C ASCII \u5B57\u7B26\u6DF7\u6DC6\u7684\u5B57\u7B26\uFF0C\u4F46\u5F53\u524D\u7528\u6237\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684\u5B57\u7B26\u9664\u5916\u3002","editor.configuration.lightbulb.enabled":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.off":"\u7981\u7528\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.onCode":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","editor.configuration.lightbulb.enabled.on":"\u5F53\u5149\u6807\u4E0E\u4EE3\u7801\u4E00\u8D77\u6392\u5217\u6216\u5728\u7A7A\u7684\u884C\u65F6\uFF0C\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u3002","diffEditor.configuration.renderSideBySide":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u3002","diffEditor.configuration.ignoreTrimWhitespace":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u767D\u5B57\u7B26\u5C06\u4F1A\u5FFD\u7565","diffEditor.action.toggleCollapseUnchangedRegions":"\u6298\u53E0\u672A\u66F4\u6539\u7684\u4EE3\u7801\u533A\u57DF","inlineSuggest.enabled":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","view.component.renderedError":"\u89C6\u56FE\u7EC4\u4EF6\u6E32\u67D3\u5F02\u5E38","view.component.tryAgain":"\u91CD\u65B0\u52A0\u8F7D","test.title":"\u6D4B\u8BD5\u7BA1\u7406\u5668","test.result.runFinished":"\u6D4B\u8BD5\u8FD0\u884C\u5B8C\u6210\u4E8E {0}","test.task.unnamed":"\u672A\u547D\u540D\u4EFB\u52A1","test.results":"\u6D4B\u8BD5\u7ED3\u679C","menu.missing.command":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4\u4E0D\u5B58\u5728\uFF1A{1}","menu.missing.altCommand":"\u83DC\u5355{0} \u8981\u6267\u884C\u7684\u547D\u4EE4(altCommand)\u4E0D\u5B58\u5728\uFF1A{1}","menu.dupe.command":"\u83DC\u5355{0} command({1}) \u548C alt({2}) \u6CE8\u518C\u91CD\u590D","command.category.developerTools":"\u5F00\u53D1\u4EBA\u5458\u5DE5\u5177","connection.start.rtt":"\u67E5\u770B\u901A\u4FE1\u5EF6\u8FDF","connection.stop.rtt":"\u5173\u95ED\u901A\u4FE1\u5EF6\u8FDF\u68C0\u67E5","debug.terminal.label":"\u521B\u5EFA Javascript Debug Terminal","debug.terminal.title":"\u8C03\u8BD5\u8FDB\u7A0B","workbench.action.tasks.runTask":"\u8FD0\u884C\u4EFB\u52A1","workbench.action.tasks.reRunTask":"\u6267\u884C\u4E0A\u6B21\u8FD0\u884C\u7684\u4EFB\u52A1","workbench.action.tasks.restartTask":"\u91CD\u65B0\u5F00\u59CB\u8FD0\u884C\u4E2D\u7684\u4EFB\u52A1","workbench.action.tasks.terminate":"\u7EC8\u6B62\u4EFB\u52A1","workbench.action.tasks.showTasks":"\u5C55\u793A\u4EFB\u52A1","workbench.action.tasks.showLog":"\u5C55\u793A\u4EFB\u52A1\u65E5\u5FD7","task.contribute":"\u8D21\u732E","task.cannotFindTask":"\u672A\u627E\u5230 {0} \u7684\u4EFB\u52A1\uFF0C\u6309\u56DE\u8F66\u952E\u8FD4\u56DE","comment.reply.count":"{0} \u4E2A\u8BC4\u8BBA","comment.reply.lastReply":"\u6700\u540E\u7531 {0} \u8BC4\u8BBA","walkthroughs.welcome":"\u6B22\u8FCE\u4F7F\u7528","walkthroughs.get.started":"\u6253\u5F00 `\u5165\u95E8` \u6F14\u793A","mergeEditor.reset":"\u91CD\u7F6E","mergeEditor.workbench.tab.name":"\u6B63\u5728\u5408\u5E76: {0}","mergeEditor.conflict.action.apply.confirm.title":"\u5F53\u524D\u6587\u4EF6\u8FD8\u6709\u672A\u5904\u7406\u7684\u51B2\u7A81\u6216\u53D8\u66F4\uFF0C\u662F\u5426\u5E94\u7528\u5E76\u4FDD\u5B58\u66F4\u6539\uFF1F","mergeEditor.conflict.action.apply.confirm.continue":"\u7EE7\u7EED\u5408\u5E76","mergeEditor.conflict.action.apply.confirm.complete":"\u786E\u8BA4\u4FDD\u5B58\u5E76\u66F4\u6539","mergeEditor.action.button.apply":"\u5E94\u7528\u66F4\u6539","mergeEditor.action.button.apply-and-stash":"\u5E94\u7528\u5E76\u6682\u5B58","mergeEditor.action.button.accept.left":"\u63A5\u53D7\u5DE6\u8FB9","mergeEditor.action.button.accept.right":"\u63A5\u53D7\u53F3\u8FB9","mergeEditor.open.3way":"3-way \u7F16\u8F91\u5668","mergeEditor.conflict.prev":"\u4E0A\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.next":"\u4E0B\u4E00\u5904\u51B2\u7A81","mergeEditor.conflict.ai.resolve.all":"AI \u89E3\u51B3","mergeEditor.conflict.ai.resolve.all.stop":"\u5168\u90E8\u505C\u6B62","mergeEditor.open.tradition":"\u6587\u672C\u7F16\u8F91\u5668","workbench.quickOpen.preserveInput":"\u662F\u5426\u5728 QuickOpen \u7684\u8F93\u5165\u6846\uFF08\u5305\u62EC\u547D\u4EE4\u9762\u677F\uFF09\u4E2D\u4FDD\u7559\u4E0A\u6B21\u8F93\u5165\u7684\u5185\u5BB9","aiNative.chat.ai.assistant.name":"AI \u7814\u53D1\u52A9\u624B","aiNative.chat.input.placeholder.default":"\u53EF\u4EE5\u95EE\u6211\u4EFB\u4F55\u95EE\u9898\uFF0C\u8F93\u5165 @ \u53EF\u5F15\u7528\u5185\u5BB9","aiNative.chat.stop.immediately":"\u6211\u5148\u4E0D\u60F3\u4E86\uFF0C\u6709\u9700\u8981\u53EF\u4EE5\u968F\u65F6\u95EE\u6211","aiNative.chat.error.response":"\u5F53\u524D\u4E0E\u6211\u4E92\u52A8\u7684\u4EBA\u592A\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF0C\u611F\u8C22\u60A8\u7684\u7406\u89E3\u4E0E\u652F\u6301","aiNative.chat.code.insert":"\u63D2\u5165\u4EE3\u7801","aiNative.chat.code.copy":"\u590D\u5236\u4EE3\u7801","aiNative.chat.code.copy.success":"\u590D\u5236\u6210\u529F","aiNative.chat.expand.unfullscreen":"\u6536\u8D77","aiNative.chat.expand.fullescreen":"\u5C55\u5F00\u5168\u5C4F","aiNative.chat.enter.send":"Enter \u53D1\u9001","aiNative.chat.defaultContextFile":"\u5F53\u524D\u6587\u4EF6","aiNative.chat.defaultContextFolder":"\u5F53\u524D\u6587\u4EF6\u5939","aiNative.chat.thinking":"\u6DF1\u5EA6\u601D\u8003","aiNative.chat.imageUpload":"\u4E0A\u4F20\u56FE\u7247","aiNative.inline.chat.operate.chat.title":"Chat({0})","aiNative.inline.chat.operate.check.title":"\u91C7\u7EB3","aiNative.inline.chat.operate.thumbsup.title":"\u8D5E","aiNative.inline.chat.operate.thumbsdown.title":"\u8E29","aiNative.inline.chat.operate.loading.cancel":"\u6309 ESC \u53D6\u6D88","aiNative.inline.chat.input.placeholder.default":"\u8BF7\u8F93\u5165\u4F60\u7684\u610F\u56FE...(\u2191\u2193 \u5207\u6362\u5386\u53F2)","aiNative.inline.chat.generating.canceled":"Inline Chat \u5DF2\u505C\u6B62\u751F\u6210","aiNative.inline.hint.widget.placeholder":"\u6309 {0} \u5524\u8D77 Inline Chat","aiNative.inline.problem.fix.title":"AI \u4FEE\u590D","aiNative.inline.diff.accept":"\u91C7\u7EB3","aiNative.inline.diff.reject":"\u62D2\u7EDD","aiNative.resolve.conflict.dialog.afresh":"\u4F60\u786E\u5B9A\u8981\u91CD\u65B0\u751F\u6210\u5417\uFF1F","aiNative.resolve.conflict.dialog.detection":`\u68C0\u6D4B\u5230\u60A8\u5DF2\u505A\u4E86\u4FEE\u6539\uFF0C\u91CD\u65B0\u751F\u6210\u4F1A\u8986\u76D6\u6389
|
|
31740
31740
|
\u60A8\u4FEE\u6539\u7684\u90E8\u5206\uFF0C\u662F\u5426\u786E\u8BA4\u8FDB\u884C\u91CD\u65B0\u751F\u6210\u3002`,"aiNative.resolve.conflict.message.not.processed.yet":"AI \u5DF2\u5904\u7406 {0} \u5904\u51B2\u7A81\uFF0C{1} \u5904\u51B2\u7A81\u6682\u672A\u5904\u7406\uFF08\u4ECD\u6807\u8BB0\u4E3A\u9EC4\u8272\u90E8\u5206\uFF09\uFF0C\u9700\u4EBA\u5DE5\u5904\u7406","aiNative.operate.discard.title":"\u4E22\u5F03","aiNative.operate.afresh.title":"\u91CD\u65B0\u751F\u6210","aiNative.operate.stop.title":"\u505C\u6B62","aiNative.operate.close.title":"\u5173\u95ED","aiNative.operate.clear.title":"\u6E05\u7A7A","aiNative.operate.tools.title":"MCP \u5DE5\u5177","aiNative.operate.newChat.title":"\u65B0\u5EFA\u804A\u5929","aiNative.operate.chatHistory.title":"\u804A\u5929\u5386\u53F2","aiNative.operate.chatHistory.searchPlaceholder":"\u8BF7\u641C\u7D22...","aiNative.operate.chatHistory.edit":"\u7F16\u8F91","aiNative.operate.chatHistory.delete":"\u5220\u9664","aiNative.chat.welcome.loading.text":"\u521D\u59CB\u5316\u4E2D...","aiNative.chat.ai.assistant.limit.message":"{0} \u6761\u6700\u65E9\u7684\u6D88\u606F\u56E0\u8F93\u5165 Tokens \u9650\u5236\u800C\u88AB\u4E22\u5F03","aiNative.inlineDiff.acceptAll":"\u63A5\u53D7\u5168\u90E8","aiNative.inlineDiff.rejectAll":"\u62D2\u7EDD\u5168\u90E8","aiNative.inlineDiff.reveal":"\u5728\u804A\u5929\u4E2D\u5C55\u793A","aiNative.inlineDiff.up":"\u4E0A\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.down":"\u4E0B\u4E00\u5904\u53D8\u66F4","aiNative.inlineDiff.right":"\u4E0B\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.left":"\u4E0A\u4E00\u5904\u6587\u4EF6","aiNative.inlineDiff.noMoreChangesUp":"\u9876\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.inlineDiff.noMoreChangesDown":"\u5E95\u90E8\u6CA1\u6709\u66F4\u591A\u53D8\u66F4\u4E86","aiNative.chat.session.max":"\u6700\u591A\u53EA\u80FD\u521B\u5EFA {0} \u4E2A\u804A\u5929","preference.ai.native.inlineChat.title":"Inline Chat","preference.ai.native.chat.title":"Chat","preference.ai.native.interface.quick.title":"\u63A5\u53E3\u5FEB\u901F\u8DF3\u8F6C","preference.ai.native.interface.quick.navigation":"\u70B9\u51FB\u7F16\u8F91\u5668\u5DE6\u4FA7\u56FE\u6807\u5FEB\u901F\u8DF3\u8F6C\u5230\u63A5\u53E3\u5B9E\u73B0","preference.ai.native.interface.quick.navigation.hover":"\u8DF3\u8F6C\u5230\u5B9E\u73B0","preference.ai.native.inlineChat.auto.visible":"\u662F\u5426\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u81EA\u52A8\u663E\u793A Inline Chat?","preference.ai.native.inlineChat.codeAction.enabled":"\u662F\u5426\u542F\u7528\u5728\u9009\u4E2D\u4EE3\u7801\u7247\u6BB5\u65F6\u663E\u793A Inline Chat \u76F8\u5173\u7684 Code Actions?","preference.ai.native.chat.visible.type":"\u63A7\u5236 Chat \u9762\u677F\u9ED8\u8BA4\u7684\u5C55\u793A\u65B9\u5F0F","preference.ai.native.inlineDiff.preview.mode":"Inline Diff \u7684\u9884\u89C8\u6A21\u5F0F","preference.ai.native.inlineDiff.preview.mode.sideBySide":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u5DE6\u53F3 diff \u9762\u677F\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.inlineDiff.preview.mode.inlineLive":"\u5728\u7F16\u8F91\u5668\u5F53\u4E2D\u4EE5\u6D41\u5F0F\u6E32\u67D3\u7684\u65B9\u5F0F\u5C55\u793A","preference.ai.native.intelligentCompletions.title":"\u667A\u80FD\u8865\u5168","preference.ai.native.intelligentCompletions.promptEngineering.enabled":"\u662F\u5426\u542F\u7528\u63D0\u793A\u8BCD\u5DE5\u7A0B\uFF0C\u4E00\u4E9B LLM \u6A21\u578B\u5728\u63D0\u793A\u8BCD\u5DE5\u7A0B\u4E0A\u53EF\u80FD\u8868\u73B0\u4E0D\u4F73\u3002","preference.ai.native.intelligentCompletions.debounceTime":"\u667A\u80FD\u8865\u5168\u7684\u5EF6\u8FDF\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09","preference.ai.native.intelligentCompletions.cache.enabled":"\u662F\u5426\u542F\u7528\u667A\u80FD\u8865\u5168\u7684\u7F13\u5B58","preference.ai.native.intelligentCompletions.alwaysVisible":"\u662F\u5426\u603B\u662F\u5C55\u793A\u667A\u80FD\u8865\u5168","preference.ai.native.codeEdits.title":"\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lintErrors":"\u662F\u5426\u5728\u53D1\u751F Lint Error \u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.lineChange":"\u662F\u5426\u5728\u5149\u6807\u884C\u53F7\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.typing":"\u662F\u5426\u5728\u5185\u5BB9\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u667A\u80FD\u6539\u5199","preference.ai.native.codeEdits.renderType":"\u667A\u80FD\u6539\u5199\u6E32\u67D3\u65B9\u5F0F","preference.ai.native.chat.system.prompt":"\u9ED8\u8BA4\u804A\u5929\u7CFB\u7EDF\u63D0\u793A\u8BCD","webview.webviewTagUnavailable":"\u975E Electron \u73AF\u5883\u4E0D\u652F\u6301 webview \u6807\u7B7E\uFF0C\u8BF7\u4F7F\u7528 iframe \u6807\u7B7E","notebook.kernel.panel.empty":"\u6682\u65E0\u5185\u5BB9","notebook.kernel.panel.title":"\u8FD0\u884C\u7684\u7EC8\u7AEF\u548C\u5185\u6838","notebook.kernel.panel.opened.pages":"\u5DF2\u5F00\u542F\u7684\u6807\u7B7E\u9875","notebook.kernel.panel.running.kernels":"\u8FD0\u884C\u7684\u5185\u6838","notebook.kernel.close.all.confirmation":"\u4F60\u786E\u5B9A\u8981\u5173\u95ED\u5168\u90E8\u5417\uFF1F","notebook.variable.panel.title":"\u53D8\u91CF\u68C0\u67E5\u5668","notebook.variable.panel.unsupported":"\u8BE5\u6587\u4EF6\u683C\u5F0F\u6682\u4E0D\u652F\u6301\u53D8\u91CF\u68C0\u67E5","notebook.variable.panel.refresh.success":"\u53D8\u91CF\u5237\u65B0\u6210\u529F","notebook.variable.panel.refresh.error":"\u53D8\u91CF\u5237\u65B0\u5931\u8D25","notebook.variable.panel.search.placeholder":"\u8BF7\u8F93\u5165\u53D8\u91CF\u540D\u79F0\u641C\u7D22","notebook.variable.panel.show.detail":"\u67E5\u770B\u8BE6\u60C5",...r.browserViews,...o.editorLocalizations,...c.zhCN,"preference.ai.native.llm.apiSettings.title":"\u5927\u6A21\u578B API \u8BBE\u7F6E","preference.ai.native.llm.model.id":"\u6A21\u578B ID","preference.ai.native.deepseek.apiKey":"Deepseek API \u5BC6\u94A5","preference.ai.native.deepseek.apiKey.description":"Deepseek \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey":"Anthropic API \u5BC6\u94A5","preference.ai.native.anthropic.apiKey.description":"Anthropic \u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.apiKey":"OpenAI API \u5BC6\u94A5","preference.ai.native.openai.apiKey.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 API \u5BC6\u94A5","preference.ai.native.openai.baseURL":"OpenAI Base URL","preference.ai.native.openai.baseURL.description":"OpenAI \u517C\u5BB9\u8BED\u8A00\u6A21\u578B\u7684 Base URL","preference.ai.native.contextWindow":"\u4E0A\u4E0B\u6587\u7A97\u53E3","preference.ai.native.contextWindow.description":"\u4E0A\u4E0B\u6587\u7A97\u53E3\u7684\u6700\u5927Token\u6570","preference.ai.native.maxTokens":"\u6700\u5927\u8F93\u51FA","preference.ai.native.maxTokens.description":"\u6700\u5927\u8F93\u51FAToken\u6570","preference.ai.native.mcp.settings.title":"MCP \u670D\u52A1\u5668\u8BBE\u7F6E","preference.ai.native.mcp.servers":"MCP \u670D\u52A1\u5668","preference.ai.native.mcp.servers.description":"\u914D\u7F6E MCP (Model Context Protocol) \u670D\u52A1\u5668","preference.ai.native.mcp.servers.name.description":"MCP \u670D\u52A1\u5668\u540D\u79F0","preference.ai.native.mcp.servers.command.description":"\u542F\u52A8 MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4","preference.ai.native.mcp.servers.args.description":"MCP \u670D\u52A1\u5668\u7684\u547D\u4EE4\u884C\u53C2\u6570","preference.ai.native.mcp.servers.env.description":"MCP \u670D\u52A1\u5668\u7684\u73AF\u5883\u53D8\u91CF","preference.ai.native.mcp.servers.type.description":"MCP \u670D\u52A1\u5668\u8FDE\u63A5\u7C7B\u578B","preference.ai.native.mcp.servers.type.stdio":"Stdio \u8FDE\u63A5","preference.ai.native.mcp.servers.type.sse":"SSE \u8FDE\u63A5","ai.native.mcp.terminal.command":"\u547D\u4EE4","ai.native.mcp.terminal.output":"\u8F93\u51FA","ai.native.mcp.terminal.allow-question":"\u662F\u5426\u5141\u8BB8\u8FD0\u884C\u547D\u4EE4?","ai.native.mcp.terminal.allow":"\u5141\u8BB8","ai.native.mcp.terminal.deny":"\u62D2\u7EDD","ai.native.mcp.name":"\u540D\u79F0:","ai.native.mcp.command":"\u547D\u4EE4:","ai.native.mcp.args":"\u53C2\u6570:","ai.native.mcp.env":"\u73AF\u5883\u53D8\u91CF:","ai.native.mcp.type":"\u7C7B\u578B:","ai.native.mcp.stdio":"Command","ai.native.mcp.sse":"SSE","ai.native.mcp.buttonSave":"\u6DFB\u52A0","ai.native.mcp.buttonUpdate":"\u66F4\u65B0","ai.native.mcp.buttonCancel":"\u53D6\u6D88","ai.native.mcp.addMCPServer.title":"\u6DFB\u52A0 MCP \u670D\u52A1\u5668","ai.native.mcp.editMCPServer.title":"\u7F16\u8F91 MCP \u670D\u52A1\u5668","ai.native.mcp.serverHost.placeHolder":"\u8F93\u5165 SSE URL","ai.native.mcp.command.placeHolder":"\u8F93\u5165\u547D\u4EE4","ai.native.mcp.args.placeHolder":"\u8FD0\u884C\u53C2\u6570","ai.native.mcp.env.placeHolder":"KEY=value\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","ai.native.mcp.name.placeHolder":"\u670D\u52A1\u5668\u540D\u79F0","ai.native.mcp.type.builtin":"\u5185\u7F6E","ai.native.mcp.type.sse":"SSE","ai.native.mcp.type.stdio":"\u547D\u4EE4","ai.native.mcp.serverNameExists":'\u670D\u52A1\u540D\u79F0 "{0}" \u5DF2\u5B58\u5728',"ai.native.mcp.name.isRequired":"\u670D\u52A1\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.command.isRequired":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.serverHost.isRequired":"SSE URL \u4E0D\u80FD\u4E3A\u7A7A","ai.native.mcp.manage.connections":"\u7BA1\u7406\u4F60\u7684 MCP \u670D\u52A1\u5668\u8FDE\u63A5","ai.native.mcp.enabled":"\u5DF2\u542F\u7528","ai.native.mcp.disabled":"\u5DF2\u7981\u7528","ai.native.mcp.enable.title":"\u542F\u52A8\u8BE5\u670D\u52A1","ai.native.mcp.disable.title":"\u505C\u6B62\u8BE5\u670D\u52A1","ai.native.mcp.config.title":"MCP \u914D\u7F6E","ai.native.mcp.tool.arguments":"\u53C2\u6570","ai.native.mcp.tool.results":"\u8FD4\u56DE","ai.native.mcp.tool.action.edit":"\u4FEE\u6539","ai.native.mcp.tool.action.delete":"\u5220\u9664","ai.native.mcp.tool.action.sync":"\u540C\u6B65"}}},10199:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(32581),t)},21774:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(25067),p=e(48644),v=e(85448);let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IKeymapService,useClass:v.KeymapService},p.KeymapsContribution]}};t.KeymapsModule=m,t.KeymapsModule=m=n.__decorate([(0,r.Injectable)()],m)},2312:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsParser=t.keymapsSchema=void 0;const n=e(85608),r=n.__importDefault(e(82174)),o=n.__importStar(e(23304)),c=e(76003);t.keymapsSchema={type:"array",items:{type:"object",properties:{key:{type:"string"},keybinding:{type:"string",deprecated:!0},command:{type:"string"},context:{type:"string"},when:{type:"string"},args:{}},required:["command"],optional:["key","keybinding","when","args"],additionalProperties:!1}};let p=class{constructor(){this.validate=new r.default({jsonPointers:!0}).compile(t.keymapsSchema)}parse(m,_){const s=o.stripComments(m),g=_?[]:void 0,l=o.parse(s,g);if(g&&_)for(const h of g)_.push(`${this.printParseErrorCode(h.error)} at ${h.offset} offset of ${h.length} length`);if(this.validate(l))return l;if(_&&this.validate.errors)for(const h of this.validate.errors)_.push(`${h.message} at ${h.dataPath}`);return[]}printParseErrorCode(m){return o.printParseErrorCode(m)}};t.KeymapsParser=p,t.KeymapsParser=p=n.__decorate([(0,c.Injectable)(),n.__metadata("design:paramtypes",[])],p)},48644:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsContribution=t.KEYMAP_COMMANDS=t.KeymapsContextMenu=t.KeymapsResourceProvider=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(93899),p=e(57517),v=e(42933),m=e(97821),_=e(25067),s=e(34879),g="keymaps-preview";let l=class extends o.WithEventBus{constructor(){super(),this.scheme=_.KEYMAPS_SCHEME}provideResource(f){return{supportsRevive:!0,name:(0,o.localize)("keymaps.tab.name"),icon:(0,o.getIcon)("setting"),uri:f}}provideResourceSubname(f,a){return null}async shouldCloseResource(f,a){return!0}};t.KeymapsResourceProvider=l,t.KeymapsResourceProvider=l=n.__decorate([(0,r.Injectable)(),n.__metadata("design:paramtypes",[])],l);var h;(function(E){E.KEYMAPS="2_keymaps"})(h||(t.KeymapsContextMenu=h={}));var u;(function(E){const f="keymaps";E.OPEN_SOURCE_FILE={id:"keymaps.open.source",label:"%keymaps.editorTitle.openSource%",category:f}})(u||(t.KEYMAP_COMMANDS=u={}));let d=class{registerCommands(f){f.registerCommand(o.COMMON_COMMANDS.OPEN_KEYMAPS,{isEnabled:()=>!0,execute:async()=>{await this.keymapService.open()}}),f.registerCommand(u.OPEN_SOURCE_FILE,{execute:async()=>{this.keymapService.openResource()}}),f.registerCommand(o.KEYBOARD_COMMANDS.CHOOSE_KEYBOARD_LAYOUT,{execute:()=>{this.chooseLayout()}})}registerMenus(f){f.registerMenuItem(c.MenuId.SettingsIconMenu,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,group:h.KEYMAPS}),f.registerMenuItem(c.MenuId.EditorTitle,{command:u.OPEN_SOURCE_FILE.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:`resourceScheme == ${_.KEYMAPS_SCHEME}`}),f.registerMenuItem(c.MenuId.EditorTitle,{command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,iconClass:(0,o.getIcon)("open"),group:"navigation",order:4,when:"resourceFilename =~ /keymaps.json/"})}registerKeybindings(f){f.registerKeybinding({command:o.COMMON_COMMANDS.OPEN_KEYMAPS.id,keybinding:"ctrlcmd+K ctrlcmd+S"})}onStart(){this.keymapService.init()}registerResource(f){f.registerResourceProvider(this.keymapsResourceProvider)}registerEditorComponent(f){f.registerEditorComponent({component:s.KeymapsView,uid:g,scheme:_.KEYMAPS_SCHEME}),f.registerEditorComponentResolver(_.KEYMAPS_SCHEME,(a,b,y)=>{y([{type:p.EditorOpenType.component,componentId:g}])})}async chooseLayout(){const f=this.layoutProvider.currentLayoutData,a={label:(0,o.localize)("keyboard.autoDetect.label"),description:f&&this.layoutProvider.currentLayoutSource!=="user-choice"?(0,o.formatLocalize)("keyboard.autoDetect.description",(0,o.getKeyboardLayoutId)(f.layout)):void 0,detail:(0,o.localize)("keyboard.autoDetect.detail"),value:"autodetect"},b=this.layoutProvider.allLayoutData.map(S=>this.toQuickPickValue(S,f===S));let y;y=[a,...b];const A=await this.quickPickService.show(y,{placeholder:"Choose a keyboard layout"});if(A)return this.layoutProvider.setLayoutData(A)}toQuickPickValue(f,a){return{label:(0,o.getKeyboardLayoutId)(f.layout),value:f}}};t.KeymapsContribution=d,n.__decorate([(0,r.Autowired)(m.QuickPickService),n.__metadata("design:type",Object)],d.prototype,"quickPickService",void 0),n.__decorate([(0,r.Autowired)(o.KeyboardNativeLayoutService),n.__metadata("design:type",Object)],d.prototype,"layoutProvider",void 0),n.__decorate([(0,r.Autowired)(v.IFileServiceClient),n.__metadata("design:type",Object)],d.prototype,"filesystem",void 0),n.__decorate([(0,r.Autowired)(l),n.__metadata("design:type",l)],d.prototype,"keymapsResourceProvider",void 0),n.__decorate([(0,r.Autowired)(_.IKeymapService),n.__metadata("design:type",Object)],d.prototype,"keymapService",void 0),t.KeymapsContribution=d=n.__decorate([(0,o.Domain)(o.CommandContribution,o.KeybindingContribution,o.ClientAppContribution,p.BrowserEditorContribution,c.MenuContribution)],d)},85448:(x,t,e)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapService=void 0;const r=e(85608),o=r.__importStar(e(39050)),c=e(76003),p=e(41869),v=e(68969),m=e(14951),_=e(25067),s=e(2312);let g=n=class{constructor(){this.keymapChangeEmitter=new p.Emitter,this.convertKeySequence=[],this.toUnregisterUserKeybindingMap=new Map,this.toRestoreDefaultKeybindingMap=new Map,this.searchDelayer=new p.ThrottledDelayer(n.DEFAULT_SEARCH_DELAY),this.disposableCollection=new p.DisposableCollection,this._whenReadyDeferred=new p.Deferred,this.fuzzyOptions={pre:"<match>",post:"</match>"},this.reconcileQueue=new p.Throttler,this.keybindings=[],this.updateKeybindings=()=>{this.currentSearchValue?this.doSearchKeybindings(this.currentSearchValue):(0,p.runWhenIdle)(()=>{this.keybindings=this.getKeybindingItems(),this.keymapChangeEmitter.fire(this.keybindings)})},this.setKeybinding=(h,u)=>this.progressService.withProgress({location:p.ProgressLocation.Notification},d=>new Promise((E,f)=>{d.report({message:(0,p.localize)("keymaps.keybinding.loading"),increment:0,total:100});const a=this.storeKeybindings||[];let b=!1;for(const y of a){const A={when:y.when,command:y.command,keybinding:y.key};if(y.command===u.command){b=!0,this.unregisterUserKeybinding(A);const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}y.key=u.keybinding,this.registerUserKeybinding({...A,priority:p.KeybindingWeight.WorkbenchContrib*100})}}if(!b){const y=this.keybindings.find(S=>S.id===u.command&&this.getRaw(S.when)===u.when);if(y&&y.keybinding){this.unregisterDefaultKeybinding({when:this.getRaw(y.when),command:y.id,keybinding:this.getRaw(y.keybinding)});const S=this.toUniqueKey(h),w=this.toRestoreDefaultKeybindingMap.get(S);if(w){const T=this.toUniqueKey(u);this.toRestoreDefaultKeybindingMap.delete(S),this.toRestoreDefaultKeybindingMap.set(T,w)}}const A={when:this.getWhen(u),command:u.command,key:u.keybinding};a.push(A),this.registerUserKeybinding(u)}return this.saveKeybinding(a).then(()=>{E(void 0),d.report({message:(0,p.localize)("keymaps.keybinding.success"),increment:99})}).catch(y=>{f(y),d.report({message:(0,p.localize)("keymaps.keybinding.fail"),increment:99})}).finally(()=>{setTimeout(()=>{d.report({increment:100})},3e3)})}),()=>{}),this.covert=h=>this.keybindingService.convert(h," "),this.clearCovert=()=>this.keybindingService.clearConvert(),this.resetKeybinding=async h=>{if(!this.resource)return;const d=this.storeKeybindings.filter(E=>E.command!==h.command);return this.unregisterUserKeybinding(h),this.restoreDefaultKeybinding(h),this.saveKeybinding(d)},this.fixed=async()=>{this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!1})},this.searchKeybindings=h=>{this.currentSearchValue=h,this.searchDelayer.isTriggered()||this.searchDelayer.cancel(),this.searchDelayer.trigger(async()=>{this.doSearchKeybindings(this.currentSearchValue)})},this.isSearching=!1,this.doSearchKeybindings=h=>{h?this.isSearching=!0:this.isSearching=!1;const u=this.getKeybindingItems(),d=[];u.forEach(E=>{const f=["id","command","keybinding","when","context","source"];let a=!1;for(const b of f){const y=E[b];if(y){const A=o.match(h,y,this.fuzzyOptions);if(A)E[b]=A.rendered,a=!0;else if(b==="keybinding"){const S=h.split("+"),w=y.split(" "),T=[0];let D=[];w.length>1?w.forEach(M=>{const R=M.split("+");T.push(R.length+T[-1]),D.push(...R)}):D=y.split("+"),T.shift();const I=[...D];let O=0;if(S.forEach(M=>{let R={rendered:"",score:0},P=-1;if(y){D.forEach(F=>{const L=o.match(M,F,this.fuzzyOptions);L&&L.score>R.score&&(R=L,P=I.indexOf(F))});const k=R.rendered;k&&(P>-1&&(I[P]=k),D.splice(P,1,""),O+=1)}}),O===S.length){if(T.length>0){const M="";I.forEach((R,P)=>{P===0?M.concat(R):T.indexOf(P)!==-1?M.concat(" "+R):M.concat("+"+R)}),E[b]=M}E[b]=I.join("+"),a=!0}}}}a&&d.push(E)}),this.keybindings=d,this.keymapChangeEmitter.fire(this.keybindings)},this.validateKeybinding=(h,u)=>{if(!u)return(0,p.localize)("keymaps.keybinding.require");try{const d={command:this.isSearching?this.getRaw(h.command):h.command,when:this.isSearching?this.getRaw(h.when):h.when,keybinding:this.isSearching?this.getRaw(u):u};return h.keybinding===u?" ":this.keybindingRegistry.validateKeybindingInScope(d)}catch(d){return d}},this.detectKeybindings=(h,u)=>{if(!u)return[];try{if(h.keybinding===u)return[];const d=this.keybindings.filter(E=>this.getRaw(E.keybinding)===u);if(d.length>0)return d.map(E=>{const f=this.commandRegistry.getCommand(this.getRaw(E.command)),a=this.storeKeybindings.find(b=>f&&b.command===f.id);return E.when=this.getRaw(E.when),E.keybinding=this.getRaw(E.keybinding),{id:f?f.id:this.getRaw(E.command),command:(f?f.label||f.id:E.command)||"",when:this.keybindingService.convertMonacoWhen(E.when),keybinding:this.getRaw(E.keybinding),source:a?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT)}})}catch(d){this.logger.error(d)}return[]}}get onDidKeymapChanges(){return this.keymapChangeEmitter.event}get storeKeybindings(){return this._storeKeybindings&&this._storeKeybindings.map(h=>({...h,command:this.getValidateCommand(h.command),key:h.key||h.keybinding}))}set storeKeybindings(h){this._storeKeybindings=h}get whenReady(){return this._whenReadyDeferred.promise}async init(){await this.reconcile();const h=await this.filesystem.watchFileChanges(n.KEYMAP_FILE_URI);this.disposableCollection.push(h),h.onFilesChanged(()=>{this.reconcileQueue.queue(this.reconcile.bind(this))}),this._whenReadyDeferred.resolve()}async openResource(){if(!this.resource||!this.resource.uri)return;const h=await this.resource.uri;if(!h)return;if(!await this.filesystem.access(h)){const d=await this.filesystem.createFile(h),E=await this.filesystem.setContent(d,`{
|
|
31741
|
-
}`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(b=>({when:b.when,command:this.getValidateCommand(b.command),keybinding:b.key||b.keybinding})),f=[],a=[];this.disposeRegistedKeybinding(),E.forEach(b=>{b.command.startsWith("-")?a.push(b):f.push(b)}),f.map(b=>{this.unregisterDefaultKeybinding(b,!0),this.registerUserKeybinding(b)}),a.map(b=>{b.command=b.command.slice(1),this.unregisterDefaultKeybinding(b,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const f={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(f);const a=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(a,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(f)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const y of h){const A=this.keybindingRegistry.getKeybindingsForCommand(y.id);!A||!A.length?y.label&&u.push({id:y.id,command:y.label,hasCommandLabel:!0}):A.forEach(S=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>y&&D.command===y.id);w={id:y.id,command:y.label||y.id,keybinding:T?T.key:S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(A&&S),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!y.label}}else w={id:y.id,command:y.label||y.id,keybinding:A&&S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:this.getWhen(A&&S),source:A&&S&&typeof S.scope<"u"?this.getScope(S.scope):"",hasCommandLabel:!!y.label};u.push(w)})}const d=u.sort((y,A)=>this.compareItem(y,A)),E=d.filter(y=>!!y.keybinding),f=d.filter(y=>!y.keybinding&&y.hasCommandLabel),a=E.filter(y=>y.hasCommandLabel),b=E.filter(y=>!y.hasCommandLabel);return[...a,...b,...f]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=g,g.DEFAULT_SEARCH_DELAY=100,g.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,c.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],g.prototype,"parser",void 0),r.__decorate([(0,c.Autowired)(p.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,c.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keybindingRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],g.prototype,"keybindingService",void 0),r.__decorate([(0,c.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],g.prototype,"filesystem",void 0),r.__decorate([(0,c.Autowired)(p.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],g.prototype,"progressService",void 0),t.KeymapService=g=n=r.__decorate([(0,c.Injectable)()],g)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:g,validateKeybinding:l,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:f,covert:a,clearCovert:b,fixed:y,onDidKeymapChanges:A,updateKeybindings:S}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:Q,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=Q,[Z,X]=o.default.useState(!1),[ie,oe]=o.default.useState(K||""),[le,pe]=o.default.useState(!1),[q,Ee]=o.default.useState(),[_e,te]=o.default.useState([]),ge=()=>{le||(y(),pe(!0)),b(),oe(E(K)),X(!0)},Te=Be=>{const me=l(Q,Be);me?me!==" "?Ee({message:me,type:c.VALIDATE_TYPE.ERROR}):X(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:Be}),X(!1),b())},Pe=()=>{X(!1)},Ae=Be=>{Be.stopPropagation(),Be.preventDefault();const{key:me}=p.KeyCode.createKeyCode(Be.nativeEvent),re=Be.nativeEvent.shiftKey||Be.nativeEvent.metaKey||Be.nativeEvent.altKey||Be.nativeEvent.ctrlKey;me&&p.Key.ENTER.keyCode===me.keyCode&&!re?ie&&Te(ie):oe(a(Be.nativeEvent))},we=()=>{const Be=()=>{Ee(void 0),ie&&oe(""),b()},me=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:me},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Be,title:(0,p.localize)("keymaps.action.clear")}))},be=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),fe=Be=>{const me=re=>{re.preventDefault(),le||(y(),pe(!0)),d({command:E($),when:E(z)||"",keybinding:ie})};if(Be&&E(Be)===f(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:me,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&_e.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",_e.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},_e.map((Be,me)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Be.id}_${me}`,title:`${Be.command}-${Be.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(Be.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(Be.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(Be.when)||"\u2014"))))))},Re=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},we(),o.default.createElement(c.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:ie,onKeyDown:Ae,onBlur:Pe}),be(),xe());{const Be=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:ge},o.default.createElement("div",{className:m.default.keybinding_action,onClick:ge},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),fe(H)),Be&&Be[0]?Be.map((me,re)=>{const he=me.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${me}_${re}`},he.map((Oe,Se)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${Se}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Ee(void 0),te(ie&&Z?h(Q,ie):[])},[ie]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Re()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(z||"\u2014"),dangerouslySetInnerHTML:{__html:z||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const Q=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:Q}))},k=(0,o.useCallback)(Q=>{I(Q),g(Q)},[D]),F=Q=>{if(!w){const V=Q.target&&Q.target.value?Q.target.value.toLocaleLowerCase():"";k(V)}},L=Q=>{if(w){Q.stopPropagation(),Q.preventDefault();const{key:V}=p.KeyCode.createKeyCode(Q.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(a(Q.nativeEvent))}},B=()=>{D&&(I(""),g("")),b()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(c.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const Q=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},Q.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const Q=A(V=>{M(V)});return S(),()=>{Q.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(c.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:c.LogServiceForClientPath,clientToken:c.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const g=new p.LogServiceClient(_);return g.setup(this.logServiceForClient,s),g}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(c.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let c=n[o];if(c instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=c.stack,c=e(p)}else if(typeof c=="object")try{c=JSON.stringify(c)}catch{}else if(typeof c=="symbol")try{c=c.toString()}catch{}r+=(o>0?" ":"")+c}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),c=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),g=e(68969),l=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,f){super(),this.containerId=E,this.noRestore=f,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,l.observableValue)(this,[]),this.stateObservable=(0,l.observableValue)(this,{}),this.visibleViews=(0,l.derived)(this,a=>{const b=this.viewsObservable.read(a);return this.stateObservable.read(a),b.filter(y=>!this.getViewState(y.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var a,b;let y;if(Object.keys(this.state).forEach(A=>{this.state[A].hidden||this.state[A].collapsed||(y?(this.state[A].size||0)>(this.state[y].size||0)&&(y=A):y=A)}),y&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((a=this.splitPanelService.rootNode)===null||a===void 0)&&a.clientHeight){const A=((b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight)-this.getPanelFullHeight();if(A){const S=this.state;S[y].size+=A,(0,l.transaction)(w=>{this.stateObservable.set({...S},w)}),this.toggleOpen(y,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(a,b,y)=>{this.doToggleOpen(a,b,y)},this.handleContextMenu=(a,b)=>{a.preventDefault();const y=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:b}]},contextKeyService:b?this.viewContextKeyRegistry.getContextKeyService(b):void 0}),A=y.getGroupedMenuNodes();y.dispose(),this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})},this.addDispose((0,l.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,a=>{this.topViewKey=a.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(a,b)=>a||b.payload.affectsSome(this.viewWhenContextkeys),50)(a=>a&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,f){const a=this.views.find(b=>b.id===E);a?(a.name=f,this.didChangeViewTitleEmitter.fire({id:E,title:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,f){const a=this.views.find(b=>b.id===E);a?(a.description=f,this.didChangeViewTitleEmitter.fire({id:E,description:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,f){const a=this.views.find(b=>b.id===E);a?(a.message=f,this.didChangeViewTitleEmitter.fire({id:E,message:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,f){const a=this.views.find(b=>b.id===E);a?(a.badge=f,this.didChangeViewTitleEmitter.fire({id:E,badge:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(a=>E[a.id]={collapsed:!1,hidden:!1});const f=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(f,E)||(0,l.transaction)(a=>{this.stateObservable.set({...f},a)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let f=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,a;if(this.visibleViews.get().forEach((b,y)=>{const A=this.state[b.id];A.collapsed?(this.setSize(y,0,!1,!0),f-=this.headerSize):!A.collapsed&&A.size&&(this.setSize(y,A.size,!1,!0),f-=A.size,a=y)}),a){const b=this.visibleViews.get()[a];this.setSize(a,this.state[b.id].size+f)}}initConfig(E){const{headerSize:f,minSize:a}=E;this.headerSize=f,this.minSize=a}registerContextService(E){let f=this.viewContextKeyRegistry.getContextKeyService(E);return f||(f=this.contextKeyService.createScoped(),f.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,f)),f}getSectionToolbarMenu(E){const f=this.registerContextService(E),a=this.menuService.createMenu(s.MenuId.ViewTitle,f),b=this.views.find(y=>y.id===E);return b&&(b.titleMenu=a),a}updateView(E){(0,l.transaction)(f=>{const a=this.views;if(E.priority){const b=a.findIndex(y=>(y.priority||0)<(E.priority||0));a.splice(b===-1?a.length:b,0,E),this.viewsObservable.set([...a],f)}else this.viewsObservable.set([...a,E],f)})}appendView(E,f){if(this.appendedViewSet.has(E.id)&&!f)return;const a=new p.DisposableCollection;a.push(this.progressService.registerProgressIndicator(E.id));const b=this.views.findIndex(y=>y.id===E.id);if(b!==-1){(0,l.transaction)(y=>{const A=this.views;A[b]=Object.assign({},A[b],E),this.viewsObservable.set([...A],y)});return}if(E.when){this.viewsWithContextKey.add(E);const y=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(y))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),a.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,a),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,a),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const f=this.views.findIndex(b=>b.id===E);f>-1&&(0,l.transaction)(b=>{const y=this.views;y.splice(f,1),this.viewsObservable.set([...y],b)});const a=this.toDispose.get(E);a&&a.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const f=this.forceRevealContextKeys.get(E);f&&f.key.set(!0)}disposeAll(){(0,l.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const f=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const a=document.getElementById(f);if(a){const b=this.state;b[f].size=a.clientHeight,(0,l.transaction)(y=>{this.stateObservable.set({...b},y)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(f=>this.views.find(a=>a.id===f)&&f!==E).reduce((f,a)=>f+(this.state[a].collapsed?this.headerSize:this.state[a].hidden?0:this.state[a].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const f=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${f} == true`,key:this.contextKeyService.createKey(f,!1)}),this.viewWhenContextkeys.add(f),`${f} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:f})=>{this.doToggleView(f)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,f){const a=`view-container.hide.${E}`;return f.push(this.commandRegistry.registerCommand({id:a},{execute:({forceShow:b}={})=>{this.doToggleView(E,b)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),a}doToggleView(E,f){const a=this.getViewState(E);let b;f===void 0?b=!a.hidden:b=!f,a.hidden=b,this.updateViewState(E,a),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,f){this.doToggleView(E,f)}get expandedViews(){return this.views.filter(E=>{const f=this.state[E.id];return!f||f&&!f.hidden&&!f.collapsed})}toggleOpen(E,f){const a=this.visibleViews.get().findIndex(b=>b.id===E);a>-1&&this.doToggleOpen(E,f,a,!0)}getViewState(E){let f=this.state[E];const a=this.views.find(b=>b.id===E);return f||(this.updateViewState(E,{collapsed:a?.collapsed||!1,hidden:a?.hidden||!1}),f=this.state[E]),f}updateViewState(E,f){const a=this.state;a[E]=f,(0,l.transaction)(b=>{this.stateObservable.set({...a},b)})}doToggleOpen(E,f,a,b){var y;const A=this.getViewState(E);this.updateViewState(E,{...A,collapsed:f});const S=this.mainLayoutService.getContainer(this.containerId);if(((y=S?.options)===null||y===void 0?void 0:y.alignment)!=="horizontal"){let w;f?w=this.setSize(a,0,!1,b):w=this.setSize(a,this.expandedViews.length===1?this.getAvailableSize():A.size||this.minSize,!1,b);for(let T=this.visibleViews.get().length-1;T>a;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b);for(let T=a-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:f}))}setSize(E,f,a,b){var y;const A=this.visibleViews.get()[E],S=(y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;b||w.classList.add("resize-ease"),!f&&!a?(f=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(A.id);let I=f;if(a&&(I=Math.max(T-f,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(S))if(I+E*this.minSize>S)I-=I+E*this.minSize-S;else{const O=this.getPanelFullHeight(A.id);I+O<S&&(I+=S-(I+O))}if(this.rendered){let O;f===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,b||setTimeout(()=>{w.classList.remove("resize-ease")},200),a?I-(T-f):f-T}getAvailableSize(){var E;const f=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return f?f-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,f){this.contextKeyService.getKeysInWhen(f).forEach(b=>{E.add(b)})}};t.AccordionService=u,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,c.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,c.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,c.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,c.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,c.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,c.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,c.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,c.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,c.Autowired)(g.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:l="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:f,noRestore:a,style:b})=>{const y=(0,o.useInjectable)(p.LayoutViewSizeConfig),A=(0,o.useInjectable)(m.AccordionServiceFactory)(u,a),S=(0,o.useAutorun)(A.visibleViews);(0,o.useAutorun)(A.stateObservable);const w=(0,r.useMemo)(()=>d||y.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)A.appendView(T)},[h]),r.default.useEffect(()=>{A.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(c.SplitPanel,{className:f,style:b,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:l==="horizontal"?"left-to-right":"top-to-bottom"},S.map((T,D)=>{const I=A.getViewState(T.id),O=T.titleMenu||A.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(_.AccordionSection,{noHeader:S.length===1,onItemClick:()=>{A.handleSectionClick(T.id,!M,D)},onContextMenuHandler:A.handleContextMenu,alignment:l,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:A,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?d:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const g=({children:l})=>r.default.createElement("div",null,l);t.Panel=g,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),g=e(52416),l=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:f,headerClass:a,onItemClick:b,noHeader:y,children:A,badge:S,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,c.useInjectable)(g.IIconService),L=(0,c.useDesignStyles)(l.default.actions_wrap,"actions_wrap"),B=(0,c.useDesignStyles)(l.default.kt_split_panel,"kt_split_panel"),j=(0,c.useDesignStyles)(l.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,c.useDesignStyles)(l.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,c.useDesignStyles)(l.default.section_badge,"section_badge"),Q=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:f,badge:S});o.default.useEffect(()=>{const oe=R.onDidChangeViewTitle(({id:le,title:pe,description:q,message:Ee,badge:_e})=>{let te=!1;const ge={...V};T===le&&pe&&pe!==V.header&&(ge.header=pe,te=!0),T===le&&_e!==V.badge&&(ge.badge=_e,te=!0),T===le&&q&&q!==V.description&&(ge.description=q,te=!0),T===le&&Ee&&Ee!==V.message&&(ge.message=Ee,te=!0),te&&$(ge)});return()=>{oe.dispose()}},[]);const Y=o.default.useCallback(()=>{b()},[b]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,c.useViewState)(T,Q,!0),Z=(0,c.useInjectable)(m.IProgressService).getIndicator(T),X=A,ie=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:B,"data-view-id":T,draggable:!1},!y&&o.default.createElement("div",{...h,className:(0,r.default)(j,a),onClick:Y,onContextMenu:oe=>P(oe,T),style:{height:ie,lineHeight:ie}},o.default.createElement("div",{className:l.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,c.getIcon)("arrow-down"),l.default.arrow_icon,M?"":l.default.kt_mod_collapsed)}),o.default.createElement("div",{className:l.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:l.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:O}):o.default.createElement(p.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[l.default.hide]:!M}]),style:z,ref:Q},o.default.createElement(_.ProgressBar,{className:l.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(c.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:l.default.kt_split_panel_message},V.message),o.default.createElement(X,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(c.TabbarServiceFactory)(v.side),s=r.default.useCallback(l=>{v.containerId&&v.side&&_.handleDragStart(l,v.containerId)},[v.containerId,v.side,_]),g=r.default.useCallback(l=>{_.handleDragEnd(l)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:g},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:g}=s,l=(0,o.useInjectable)(c.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");l.moveContainerTo(E,g)},[l,g]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:c.IMainLayoutService,useClass:v.LayoutService},{token:c.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(c.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=c.MainLayoutContribution}};t.MainLayoutModule=g,t.MainLayoutModule=g=n.__decorate([(0,r.Injectable)()],g)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,c.useInjectable)(p.IMainLayoutService),g=(0,r.useRef)(null),l=r.default.useCallback(()=>{g&&g.current&&queueMicrotask(()=>{var h;return(h=g.current)===null||h===void 0?void 0:h.focus()})},[g.current]);return(0,r.useEffect)(()=>{l();const h=s.getTabbarHandler(m),u=h?.onActivate(l);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:g,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),g=e(17793),l=e(9522),h=e(752),u=e(58999),d={[c.SlotLocation.left]:{currentId:void 0,size:void 0},[c.SlotLocation.right]:{currentId:"",size:void 0},[c.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends c.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.restoreTabbarService=async a=>{var b;this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:y,size:A}=this.state[a.location]||{};a.prevSize=A;let S=a.visibleContainers[0]&&a.visibleContainers[0].options.containerId;const w=this.appConfig.defaultPanels,T=w&&w[a.location];if(w&&T!==void 0)if(T)if(a.containersMap.has(T))S=T;else{const D=this.componentRegistry.getComponentRegistryInfo(T);D&&(!((b=this.appConfig.layoutConfig[a.location])===null||b===void 0)&&b.modules)&&~this.appConfig.layoutConfig[a.location].modules.indexOf(T)?S=D.options.containerId:this.logger.warn(`[defaultPanels] No \`${T}\` view found!`)}else S="";(0,_.isUndefined)(y)?(0,_.isUndefined)(S)?a.updateNextContainerId():a.updateCurrentContainerId(S):y&&!this.isDropContainer(y)?a.containersMap.has(y)?a.updateCurrentContainerId(y):this.findTabbarServiceByContainerId(y)?(this.moveContainerTo(y,a.location),a.updateCurrentContainerId(y)):(a.updateCurrentContainerId(S),a.updateNextContainerId(y)):(y===""||this.isDropContainer(y))&&a.updateCurrentContainerId("")},this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[b,y]of this.pendingViewsMap.entries())y.forEach(({view:A,props:S})=>{this.collectViewComponent(A,b,S)});for(const b of this.contributions.getContributions())b.onDidRender&&b.onDidRender();const a=[];this.tabbarServices.forEach(b=>{c.slotRendererRegistry.isTabbar(b.location)&&b.containersMap.size>0&&a.push(b.viewReady.promise)}),Promise.all(a).then(()=>{this.viewReady.resolve()})}storeState(a,b){this.state[a.location]={currentId:b,size:a.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(a){var b,y,A,S,w;const T=a.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(b=T.getColor("kt.menubar.background"))===null||b===void 0?void 0:b.toString(),sideBarBackground:(y=T.getColor("sideBar.background"))===null||y===void 0?void 0:y.toString(),editorBackground:(A=T.getColor("editor.background"))===null||A===void 0?void 0:A.toString(),panelBackground:(S=T.getColor("panel.background"))===null||S===void 0?void 0:S.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}findTabbarServiceByContainerId(a){let b;for(const y of this.tabbarServices.values())if(y.containersMap.has(a)){b=y;break}return b}moveContainerTo(a,b){var y;const A=this.findTabbarServiceByContainerId(a);if(!A){this.logger.error(`cannot find container: ${a}`);return}const S=A.getContainer(a);if(!S){this.logger.error(`cannot find container: ${a}`);return}if(!(!((y=S.options)===null||y===void 0)&&y.draggable)){this.logger.warn(`container: ${a} is not draggable`);return}const w=this.getTabbarService(b);A.removeContainer(a),(!A.visibleContainers.length||A.currentContainerId.get()===a)&&this.toggleSlot(A.location,!1),w.dynamicAddContainer(a,S);const T=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(w.location)]);this.handleMap.set(a,T)}showDropAreaForContainer(a){const b=this.findTabbarServiceByContainerId(a),y=this.tabbarServices.get("bottom"),A=this.tabbarServices.get("right");if(!b){this.logger.error(`cannot find container: ${a}`);return}b?.location==="right"&&y?.updateCurrentContainerId(g.DROP_BOTTOM_CONTAINER),b?.location==="bottom"&&A?.updateCurrentContainerId(g.DROP_RIGHT_CONTAINER)}hideDropArea(){const a=this.tabbarServices.get("bottom"),b=this.tabbarServices.get("right");a?.currentContainerId.get()===g.DROP_BOTTOM_CONTAINER&&a.updateCurrentContainerId(a.previousContainerId||""),b?.currentContainerId.get()===g.DROP_RIGHT_CONTAINER&&b.updateCurrentContainerId(b.previousContainerId||"")}isVisible(a){return!!this.getTabbarService(a).currentContainerId.get()}isViewVisible(a){const b=this.getTabbarHandler(a);if(!b||!b.isActivated())return!1;const y=b.accordionService.getViewState(a);return!y.collapsed&&!y.hidden}toggleSlot(a,b,y){var A;const S=this.getTabbarService(a);if(!S){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${a}\` was found.`);return}b===!0?S.updateCurrentContainerId(this.findNonDropContainerId(S)):b===!1?S.updateCurrentContainerId(""):S.updateCurrentContainerId(S.currentContainerId.get()?"":this.findNonDropContainerId(S)),S.currentContainerId.get()&&y&&((A=S.resizeHandle)===null||A===void 0||A.setSize(y))}isDropContainer(a){return[g.DROP_BOTTOM_CONTAINER,g.DROP_RIGHT_CONTAINER].includes(a)}findNonDropContainerId(a){const b=a.currentContainerId.get();if(b&&!this.isDropContainer(b))return b;if(a.previousContainerId&&!this.isDropContainer(a.previousContainerId))return a.previousContainerId;for(const y of a.containersMap.keys())if(!this.isDropContainer(y))return y;return""}getTabbarService(a){const b=this.tabbarServices.get(a)||this.injector.get(h.TabbarService,[a]);if(!this.tabbarServices.get(a)){b.addDispose(b.onCurrentChange(({currentId:A})=>{if(this.storeState(b,A),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:A})),A&&g.SUPPORT_ACCORDION_LOCATION.has(b.location)){const S=this.getAccordionService(A);S?.tryUpdateResize(),S?.expandedViews.forEach(w=>{this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),b.viewReady.promise.then(()=>b.restoreState()).then(()=>this.restoreTabbarService(b)).catch(A=>{this.logger.error(`[TabbarService:${a}] restore state error`,A)});const y=(0,r.default)(()=>this.storeState(b,b.currentContainerId.get()),100);if(b.addDispose(b.onSizeChange(y)),a===c.SlotLocation.bottom){const A=(0,r.default)(()=>void this.bottomExpanded,100);b.addDispose(b.onSizeChange(()=>A))}this.tabbarServices.set(a,b)}return b}getAllAccordionService(){return this.accordionServices}getAccordionService(a,b){let y=this.accordionServices.get(a);return y||(y=this.injector.get(l.AccordionService,[a,b]),this.accordionServices.set(a,y)),y}getTabbarHandler(a){let b=this.doGetTabbarHandler(a);if(!b){const y=this.viewToContainerMap.get(a);y?b=this.doGetTabbarHandler(y||""):this.debug.warn(`${a} view tabbar not found.`)}return b}getContainer(a){for(const b of this.tabbarServices.values()){const y=b.getContainer(a);if(y)return y}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(a){let b=this.handleMap.get(a);if(!b){let y;for(const A of this.tabbarServices.values())if(A.getContainer(a)){y=A.location;break}y&&(b=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(y)]),this.handleMap.set(a,b))}return b}collectTabbarComponent(a,b,y,A){if(A&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),b.hideIfEmpty&&!a.length&&!b.component){this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}),this.tabbarUpdateSet.has(b.containerId)&&this.tryUpdateTabbar(b.containerId);const w=this.getAccordionService(b.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(b.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(b.containerId),this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}))})),b.containerId}return this.getTabbarService(y).registerContainer(b.containerId,{views:a,options:b}),a.forEach(w=>{this.viewToContainerMap.set(w.id,b.containerId)}),b.containerId}getViewAccordionService(a){const b=this.viewToContainerMap.get(a);if(b)return this.getAccordionService(b)}collectViewComponent(a,b,y={},A){this.customViews.set(a.id,a),this.viewToContainerMap.set(a.id,b);const S=this.getAccordionService(b);return y&&(a.initialProps=y),S.appendView(a,A?.isReplace),S.views.length===1&&(this.tabbarUpdateSet.add(b),this.tryUpdateTabbar(b)),A?.fromExtension&&this.disposableMap.set(a.id,this.commandRegistry.registerCommand({id:`${a.id}.focus`},{execute:async()=>(await this.ensureViewReady(a.id),this.commandService.executeCommand(`workbench.view.extension.${b}`,{forceShow:!0}))})),b}ensureViewReady(a){const b=this.viewToContainerMap.get(a),y=new _.Deferred,A=this.getAccordionService(b);return A.visibleViews.get().find(S=>S.id===a)?y.resolve():A.addDispose(A.onAfterAppendViewEvent(S=>{S===a&&y.resolve()})),y.promise}tryUpdateTabbar(a){const b=this.holdTabbarComponent.get(a);b&&(this.getTabbarService(b.side).registerContainer(a,{views:b.views,options:b.options}),this.tabbarUpdateSet.delete(a),this.holdTabbarComponent.delete(a))}replaceViewComponent(a,b){const y=this.viewToContainerMap.get(a.id);if(!y){this.debug.warn(`The container corresponding to \`${a.id}\` was not found, please check the incoming parameters!`);return}const A=this.customViews.get(a.id);A&&(a=Object.assign(A,a)),this.collectViewComponent(a,y,b,{isReplace:!0})}disposeViewComponent(a){const b=this.disposableMap.get(a);b&&b.dispose();const y=this.viewToContainerMap.get(a);if(!y){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).disposeView(a)}revealView(a){const b=this.viewToContainerMap.get(a);if(!b){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).revealView(a)}disposeContainer(a){let b;for(const y of this.tabbarServices.values())if(y.getContainer(a)){b=y.location;break}b?this.getTabbarService(b).disposeContainer(a):this.debug.warn(`The Tabbar to the \`${a}\` was not found.`)}expandBottom(a){const b=this.getTabbarService(c.SlotLocation.bottom);b.currentContainerId.get()||b.updateCurrentContainerId(b.currentContainerId.get()||b.previousContainerId||b.containersMap.keys().next().value),b.doExpand(a),this.contextKeyService.createKey("bottomFullExpanded",b.isExpanded)}get bottomExpanded(){const a=this.getTabbarService(c.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",a.isExpanded),a.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(g.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(c.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,c.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),g=e(17793),l=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const f=this.contributionProvider.getContributions();for(const y of f)y.registerComponent&&y.registerComponent(this.componentRegistry);const a=this.rendererContributionProvider.getContributions();for(const y of a)y.registerRenderer&&y.registerRenderer(o.slotRendererRegistry);const b=this.toolBarContributionProvider.getContributions();for(const y of b)y.registerToolbarItems&&y.registerToolbarItems(this.toolBarRegistry)}registerComponent(f){f.register(g.DROP_RIGHT_CONTAINER,[],{component:l.RightDropArea,hideTab:!0,containerId:g.DROP_RIGHT_CONTAINER}),f.register(g.DROP_BOTTOM_CONTAINER,[],{component:l.BottomDropArea,hideTab:!0,containerId:g.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(f){f.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),f.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),f.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(f){f.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),f.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,a)}}),f.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,a,b)}}),f.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),f.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,a)}}),f.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,a,b)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),f.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),f.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),f.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),f.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.right-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,a)}}),f.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.left-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,a)}}),f.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),f.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(f){f.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[c.EXPLORER_CONTAINER_ID,c.SEARCH_CONTAINER_ID,c.SCM_CONTAINER_ID,c.DEBUG_CONTAINER_ID,c.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[c.MARKER_CONTAINER_ID,c.OUTPUT_CONTAINER_ID,c.DEBUG_CONSOLE_CONTAINER_ID,c.TERMINAL_CONTAINER_ID]}).forEach(([a,b],y)=>{const A=this.mainLayoutService.getTabbarService(a);A.viewReady.promise.then(()=>{b.forEach(S=>{var w,T;const D=A.getContainer(S);D&&f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${S}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:S},group:`${3+y}_${a}`})})})}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(f){f.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(g,l)=>l(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var g;const l=this.layoutService.getAllAccordionService(),h=Array.from(l.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(g=l.get(d))===null||g===void 0?void 0:g.views;if(E)for(let f=0,a=E.length;f<a;f++)u.push(this.injector.get(_,[d,E[f],{groupLabel:f===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends c.QuickOpenItem{constructor(g,l){super(l),this.containerId=g,this.options=l}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends c.QuickOpenItem{constructor(g,l,h){super(h),this.containerId=g,this.view=l,this.options=h}getLabel(){var g;return(g=this.view.name)===null||g===void 0?void 0:g.toUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l&&(l.activate(),l.isCollapsed(this.view.id)&&l?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(g=>{g.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):g.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const g=this.tabbarService.getContainer(this.containerId);g&&g.options&&(g.options.titleProps=s,g.options.titleComponent=_,g.fireChange(g))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const g of _){const l=this.accordionService.getViewState(g);this.accordionService.updateViewState(g,{...l,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),g=e(17793),l=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const f=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:Q=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=o.default.useContext(l.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const X=(0,p.useAutorun)(H.currentContainerId),ie=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),oe=U&&ie;oe&&!X&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const le=V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[pe,q]=d(H.visibleContainers.filter(_e=>{var te;return!(!((te=_e.options)===null||te===void 0)&&te.hideTab)}),le);q.forEach(_e=>{H.updateTabInMoreKey(_e.options.containerId,!0)});const Ee=o.default.useCallback((_e,te,ge,Te)=>{var Pe,Ae,we;const be=(Pe=_e.options)===null||Pe===void 0?void 0:Pe.containerId;if(!be||Te&&(!((we=(Ae=_e.options)===null||Ae===void 0?void 0:Ae.hideLocationTab)===null||we===void 0)&&we.includes(Te)))return null;te.updateTabInMoreKey(be,!1);let fe;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(fe){const Re=fe.cloneNode(!0);Re.classList.add(h.default.dragging),L&&(0,p.addClassName)(Re,L),document.body.appendChild(Re),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Re,0,0),document.body.removeChild(Re)})}te.handleDragStart(xe,be)},onDragOver:xe=>{xe.preventDefault(),fe&&fe.classList.add("on-drag-over")},onDragLeave:()=>{fe&&fe.classList.remove("on-drag-over")},onDrop:xe=>{fe&&fe.classList.remove("on-drag-over"),te.handleDrop(xe,be)},onDragEnd:xe=>{te.handleDragEnd(xe)},key:be,id:be,onContextMenu:xe=>te.handleContextMenu(xe,be),onClick:xe=>te.handleTabClick(xe,oe||P),ref:xe=>fe=xe,className:(0,r.default)({active:ge===be},L)},o.default.createElement(M,{component:_e}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},pe.map(_e=>Ee(_e,H,X,$)),Q({props:I,renderContainers:Ee}),q.length?o.default.createElement("li",{key:"tab-more",onClick:_e=>{var te;return H.showMoreMenu(_e,pe[pe.length-1]&&((te=pe[pe.length-1].options)===null||te===void 0?void 0:te.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=f;const a=({component:I})=>{var O,M,R;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=o.default.useState(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const Q=L.options;return Q?.activateKeyBinding?`${Q?.title} (${k.acceleratorForKeyString(Q.activateKeyBinding,"+")})`:Q?.title},[L]);return(0,o.useEffect)(()=>{const Q=L.onChange(V=>{B({...V})});return()=>{Q.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(c.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(c.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=a;const b=({component:I})=>{var O,M,R;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=b;const y=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=y;const A=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=A;const S=I=>{const{barSize:O=48,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.RightTabbarRenderer=S;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=o.default.useContext(l.TabbarConfig),k=(0,p.useInjectable)(g.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),B=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(l.TabbarConfig),O=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),g=e(9522),l=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),f=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),a={display:"block"},b={display:"none"},y=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(B.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(Q=>{var V;const $=(V=Q.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=B.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?a:b,id:R},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(f,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:Q,...P}))))}))};t.BaseTabPanelView=y;const A=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:Q,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,p.useInjectable)(c.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(le=>{z.get(g.AccordionServiceFactory)($).handleContextMenu(le)},[$]);if(!$)return null;const X=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!X)return null;const ie=(0,p.useViewState)(M,j),oe=o.default.useCallback(le=>R?R({children:le}):le,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:O})}):null,Q&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:Q,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:le=>B.current=le},o.default.createElement(s.ProgressBar,{progressModel:X.progressModel}),oe(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:ie,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(l.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=A;const S=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),Q=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,B),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:z,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:B,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:Q},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:X=>L.current=X},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:z})):o.default.createElement(l.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:S,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),g=n.__importDefault(e(5330)),l=e(752);t.TabbarConfig=(0,o.createContext)({side:c.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:f,components:a,direction:b="left-to-right",TabbarView:y,side:A,TabpanelView:S})=>{const w=(0,c.useInjectable)(l.TabbarServiceFactory)(A),T=(0,c.useInjectable)(c.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[O,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),a.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[a]);const R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(b)])},[]);return(0,o.useEffect)(()=>{c.fastdom.measure(()=>{R()});let P;T.onDirective(c.ResizeEvent.createDirective(A),()=>{P&&P.dispose(),P=c.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(g.default.tab_container,f),style:{flexDirection:v.Layout.getFlexDirection(b)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:A,direction:b,fullSize:O}},o.default.createElement(y,null),o.default.createElement(S,null)))});const h=({className:E,components:f,tabbarView:a,tabpanelView:b})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:f,TabbarView:a??_.RightTabbarRenderer,TabpanelView:b??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:f,TabbarView:a??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:f,TabbarView:a??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),g=e(17793),l=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=f=>a=>f.get(g.IMainLayoutService).getTabbarService(a);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends c.WithEventBus{constructor(a){super(),this.location=a,this.doChangeViewEmitter=new c.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},b=>(this.shouldChangeView.read(b),this.containerIdObs.read(b))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new c.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new c.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new c.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new c.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(b=>{this.resizeHandle&&this.resizeHandle.hidePanel(b)},60),this._menuMap=new Map,this.setIsLatter(a===c.SlotLocation.right||a===c.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,c.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,c.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(c.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(a){this.isLatter=a}updateNextContainerId(a){(0,c.isUndefined)(a)?this.useFirstContainerId=!0:this.nextContainerId=a}updateCurrentContainerId(a){(0,s.transaction)(b=>{this.containerIdObs.set(a,b)})}updateBadge(a,b){const y=this.getContainer(a);y&&y.options&&(y.options.badge=b),y?.fireChange(y)}registerPanelCommands(){this.commandRegistry.registerCommand(l.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(l.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(l.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(a,b)=>{this.layoutService.toggleSlot(c.SlotLocation.bottom,a,b)}})}getContainerState(a){return this.state.get(a)}hideContainer(a){const b=this.state.get(a);b&&(b.hidden=!0)}showContainer(a){const b=this.state.get(a);b&&(b.hidden=!1)}updatePanelVisibility(a){a===void 0&&(a=this.containersMap.size>0),this.updatePanel(a)}ensureViewReady(){(0,c.isDefined)(this.barSize)&&(0,c.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(a){this.panelSize=a,(0,c.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(a){this.barSize=a,(0,c.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?c.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(a,b){const y=this.tabInMoreKeyMap.get(a);y&&y.set(b)}get visibleContainers(){const a=[];return this.containersMap.forEach(b=>{const y=b.options&&this.state.get(b.options.containerId);(!y||!y.hidden)&&a.push(b)}),a.sort((b,y)=>this.getContainerState(b.options.containerId).priority-this.getContainerState(y.options.containerId).priority)}registerResizeHandle(a){const{setSize:b,setRelativeSize:y,getSize:A,getRelativeSize:S,lockSize:w,setMaxSize:T,hidePanel:D}=a;return this.resizeHandle={setSize:I=>b(I,this.isLatter),setRelativeSize:(I,O)=>y(I,O,this.isLatter),getSize:()=>A(this.isLatter),getRelativeSize:()=>S(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(a,b){var y;if(this.containersMap.has(a))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(a)),this.nextContainerId===a&&this.updateCurrentContainerId(a);const A=new c.DisposableCollection,S=b.options||{containerId:a};b.options=S;const w=new c.Emitter;this.containersMap.set(a,{fireChange:D=>w.fire(D),onChange:w.event,views:b.views,options:S}),A.push({dispose:()=>{this.containersMap.delete(a),this.state.delete(a)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=b.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,b);for(let D=T;D<this.sortedContainers.length;D++){const O=(y=this.sortedContainers[D].options)===null||y===void 0?void 0:y.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}A.push(this.registerSideEffects(b)),this.eventBus.fire(new g.TabBarRegistrationEvent({tabBarId:a})),a===this.currentContainerId.get()&&this.handleChange(a,""),this.viewContextKeyRegistry.registerContextKeyService(a,this.contextKeyService.createScoped()).createKey("view",a),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(a,A),this.onDidRegisterContainerEmitter.fire(a)}registerSideEffects(a){var b;const y=new c.DisposableCollection;!((b=a.options)===null||b===void 0)&&b.hideTab||(y.push(this.registerHideMenu(a)),y.push(this.registerMoreMenu(a))),y.push(this.registerActivateKeyBinding(a,a.options.fromExtension));const A=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${a.options.containerId}`,!0);return y.push({dispose:()=>{A.set(!1)}}),y.push(this.progressService.registerProgressIndicator(a.options.containerId)),y.push(this.registerContainerPanelRelatedCommand(a)),y}registerContainerPanelRelatedCommand(a){var b,y,A,S,w;const T=new c.DisposableCollection,D=(b=a.options)===null||b===void 0?void 0:b.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,c.formatLocalize)("view.command.show",(A=(y=a.options)===null||y===void 0?void 0:y.title)!==null&&A!==void 0?A:D),labelLocalized:(0,c.createFormatLocalizedStr)("view.command.show",(w=(S=a.options)===null||S===void 0?void 0:S.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(a){const b=new c.DisposableCollection,y=a.options.containerId;return b.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(y,b),label:a.options.title||y},group:"1_widgets"})),b}registerMoreMenu(a){const b=new c.DisposableCollection,y=a.options.containerId,A=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(y),!1);return this.tabInMoreKeyMap.set(y,A),b.push({dispose:()=>this.tabInMoreKeyMap.delete(y)}),b.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(a,b),label:a.options.title||y},group:"inline",when:`${this.getTabInMoreCtxKey(y)} == true`,toggledWhen:`${(0,c.getTabbarCtxKey)(this.location)} == ${y}`,iconClass:a.options.iconClass})),b}disposeContainer(a){var b;const y=this.disposableMap.get(a);y&&y.dispose(),this.currentContainerId.get()===a&&this.updateCurrentContainerId(((b=this.visibleContainers[0].options)===null||b===void 0?void 0:b.containerId)||"")}updateTitle(a,b){const y=this.getContainer(a);y&&(y.options.title=b)}getContainer(a){return a?this.containersMap.get(a):void 0}getTitleToolbarMenu(a){const b=this._menuMap.get(a);if(b)return b;const y=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(a));this._menuMap.set(a,y);const A=this.disposableMap.get(a),S=[y,(0,c.toDisposable)(()=>{this._menuMap.delete(a)})];return A?A.pushAll(S):this.addDispose(S),y}doExpand(a){if(this.resizeHandle){const{setRelativeSize:b}=this.resizeHandle;a?this.isLatter?b(0,1):b(1,0):b(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:a}=this.resizeHandle,b=a().join(",");return this.isLatter?b==="0,1":b==="1,0"}return!1}handleTabClick(a,b){const y=a.currentTarget.id;y===this.currentContainerId.get()&&!b?this.updateCurrentContainerId(""):this.updateCurrentContainerId(y)}handleContextMenu(a,b){a.preventDefault(),a.stopPropagation();const y=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}showMoreMenu(a,b){const y=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{lastContainerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}handleDragStart(a,b){a.dataTransfer.setData("containerId",b),this.layoutService.showDropAreaForContainer(b)}handleDrop(a,b){if(a.dataTransfer.getData("containerId")){const y=a.dataTransfer.getData("containerId"),A=this.visibleContainers,S=A.findIndex(T=>y===T.options.containerId),w=A.findIndex(T=>b===T.options.containerId);this.doInsertTab(A,S,w),this.storeState()}}handleDragEnd(a){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const a of this.state.keys())this.storedState[a]&&this.state.set(a,this.storedState[a]);this.visibleContainers.forEach(a=>{g.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(a.options.containerId)})}removeContainer(a){const b=this.disposableMap.get(a);b?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(a,b){this.registerContainer(a,b),this.updateCurrentContainerId(a),this.doChangeViewEmitter.fire()}doInsertTab(a,b,y){const A=this.getContainerState(a[y].options.containerId).priority,S=(T,D)=>{const I=this.getContainerState(a[T].options.containerId),O=this.getContainerState(a[D].options.containerId);I.priority=O.priority};let w;if(b>y)for(w=y;w<b;w++)S(w,w+1);else for(w=y;w>b;w--)S(w,w-1);this.getContainerState(a[w].options.containerId).priority=A,this.doChangeViewEmitter.fire()}storeState(){const a={};this.state.forEach((b,y)=>{a[y]=b}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),a)}registerActivateKeyBinding(a,b){const y=a.options,A=y.containerId,S=b?`workbench.view.extension.${A}`:`workbench.view.${A}`,w=new c.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:S},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===A?"":A):this.updateCurrentContainerId(A)}})),y.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:S,keybinding:y.activateKeyBinding})),w}registerGlobalToggleCommand(){const a=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:a},{execute:({containerId:b})=>{this.doToggleTab(b)},isEnabled:()=>this.visibleContainers.length>1}),a}registerVisibleToggleCommand(a,b){const y=`activity.bar.toggle.${a}`;return b.push(this.commandRegistry.registerCommand({id:y},{execute:({forceShow:A}={})=>{this.doToggleTab(a,A)},isToggled:()=>!this.getContainerState(a).hidden,isEnabled:()=>this.getContainerState(a).hidden||this.visibleContainers.length!==1})),y}registerMoreToggleCommand(a,b){const{options:y}=a,{containerId:A}=y,S=`activity.bar.activate.more.${A}`;return b.push(this.commandRegistry.registerCommand({id:S},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(A),w){const T=this.getContainerState(A),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),S}getTabInMoreCtxKey(a){return`${a}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:l.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:l.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:l.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(a,b){const y=this.getContainerState(a);b===void 0?y.hidden=!y.hidden:y.hidden=!b,y.hidden&&this.currentContainerId.get()===a&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(a){const b=this.getContainer(a);return b&&b.options&&b.options.expanded}onResize(){c.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const a=this.resizeHandle.getSize();a!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=a,this.onSizeChangeEmitter.fire({size:a}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:a,newValue:b})=>{this.previousContainerId=a===d?"":a,this.handleChange(b,a)})}handleChange(a,b){var y;if(!this.resizeHandle)return;const{getSize:A,setSize:S,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:b,currentId:a});const T=this.shouldExpand(a);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(a,T);else if(a){b&&a!==b&&(this.prevSize=A());const D=this.getContainer(a);S(this.prevSize||this.panelSize+this.barSize),w(!!(!((y=D?.options)===null||y===void 0)&&y.noResize)),this.activatedKey.set(a)}else S(this.barSize),w(!0)}tryRestoreAccordionSize(a){var b,y;if(this.accordionRestored.has(a))return;const A=this.containersMap.get(a);if((!A||!((b=A.options)===null||b===void 0)&&b.component)&&((y=A?.options)===null||y===void 0?void 0:y.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(a).restoreState(),this.accordionRestored.add(a)}handleFullExpanded(a,b){if(!this.resizeHandle)return;const{setRelativeSize:y,setSize:A}=this.resizeHandle;a?b?this.isLatter?y(0,1):y(1,0):A(this.prevSize||this.panelSize+this.barSize):A(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(c.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",c.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(17793);var v;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(g,l){var h,u,d,E;const f=(h=g.group)!==null&&h!==void 0?h:v.More,a=(u=l.group)!==null&&u!==void 0?u:v.More;return f!==a?f.localeCompare(a):((d=g.order)!==null&&d!==void 0?d:5)-((E=l.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const l=this.items.filter(h=>h.visible);return l.length===0&&this.defaultItem?[this.defaultItem.descriptor]:l.map(h=>h.descriptor)}constructor(l){this.id=l,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const l=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of l)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let l=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,l=!0)}l&&this._onDidChange.fire()}dispose(){this.disposables.forEach(l=>l.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new c.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(l,h){return this.viewWelcomeContent.add(l,h),this._onDidChangeViewWelcomeContent.fire(l),{dispose:()=>{this.viewWelcomeContent.delete(l,h),this._onDidChangeViewWelcomeContent.fire(l)}}}registerViewWelcomeContent2(l,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(l,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(l,E),this._onDidChangeViewWelcomeContent.fire(l)}));return this._onDidChangeViewWelcomeContent.fire(l),u}getViewWelcomeContent(l){const h=[];return this.viewWelcomeContent.forEach(l,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=l;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const g=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function l(d){const E=new Array;let f,a=0,b=0;for(;(f=g.exec(d))!==null;){b=f.index||0,E.push(d.substring(a,b)),a=(f.index||0)+f[0].length;const[,y,A]=f;E.push(y?`$(${A})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(A)}))}return a<d.length&&E.push(d.substring(a)),E}const h=d=>{const{contents:E}=d,[f,a]=o.default.useState(E.map(A=>A.precondition?!1:null)),b=(0,p.useInjectable)(p.IContextKeyService),y=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const A=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),S=b.onDidChangeContext(w=>{A.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&a(f.map((I,O)=>O===D?b.match(E[D].precondition):I))})});return()=>S.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:A,precondition:S},w)=>{const T=A.split(`
|
|
31741
|
+
}`);this.resource=E||void 0}h&&this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI(h),{preview:!1})}disposeRegistedKeybinding(){for(const[,h]of this.toUnregisterUserKeybindingMap)h.dispose();for(const[,h]of this.toRestoreDefaultKeybindingMap)h.dispose()}dispose(){this.disposeRegistedKeybinding(),this.disposableCollection.dispose()}getValidateCommand(h){return h.replace(/^monaco.editor/,"editor")}async reconcile(h){const u=n.KEYMAP_FILE_URI.toString();this.resource=await this.filesystem.getFileStat(u),this.resource||(this.resource=await this.filesystem.createFile(u,{content:JSON.stringify([])}));const E=(h?h.slice(0):await this.parseKeybindings()).map(b=>({when:b.when,command:this.getValidateCommand(b.command),keybinding:b.key||b.keybinding})),f=[],a=[];this.disposeRegistedKeybinding(),E.forEach(b=>{b.command.startsWith("-")?a.push(b):f.push(b)}),f.map(b=>{this.unregisterDefaultKeybinding(b,!0),this.registerUserKeybinding(b)}),a.map(b=>{b.command=b.command.slice(1),this.unregisterDefaultKeybinding(b,!0)})}unregisterUserKeybinding(h){const u=this.toUniqueKey(h);if(this.toUnregisterUserKeybindingMap.has(u)){const d=this.toUnregisterUserKeybindingMap.get(u);d?.dispose(),this.toUnregisterUserKeybindingMap.delete(u)}}registerUserKeybinding(h){const u=this.toUniqueKey(h);this.toUnregisterUserKeybindingMap.set(u,this.keybindingRegistry.registerKeybinding(h,p.KeybindingScope.USER))}unregisterDefaultKeybinding(h,u=!1){if(u)this.keybindingRegistry.getKeybindingsForCommand(h.command).map(E=>{const f={...h,keybinding:E.keybinding};this.keybindingRegistry.unregisterKeybinding(f);const a=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(a,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(f)}))});else{this.keybindingRegistry.unregisterKeybinding(h);const d=this.toUniqueKey(h);this.toRestoreDefaultKeybindingMap.set(d,p.Disposable.create(()=>{this.keybindingRegistry.registerKeybinding(h)}))}}restoreDefaultKeybinding(h){const u=this.toUniqueKey(h),d=this.toRestoreDefaultKeybindingMap.get(u);d&&(d?.dispose(),this.toRestoreDefaultKeybindingMap.delete(u))}toUniqueKey(h){return`${h.command}${h.when?`-${h.when}`:"-"}${h.keybinding?`-${h.keybinding}`:"-"}`}async parseKeybindings(){try{const h=await this.resource;if(!h)return[];const{content:u}=await this.filesystem.readFile(h.uri);this.storeKeybindings=this.parser.parse(u.toString())}catch(h){this.logger.warn(`ParseKeybindings fail: ${h.stack}`),this.storeKeybindings=[]}return this.storeKeybindings}async saveKeybinding(h){this.storeKeybindings=h,this.updateKeybindings(),this.resource||(this.resource=await this.filesystem.createFile(n.KEYMAP_FILE_URI.toString()));const u=await this.filesystem.setContent(this.resource,JSON.stringify(h,void 0,2));this.resource=u||void 0}async getKeybindings(){return this.storeKeybindings.map(h=>({command:h.command,keybinding:h.key,when:h.when,args:h.args}))}async open(){this.commandService.executeCommand(p.EDITOR_COMMANDS.OPEN_RESOURCE.id,new p.URI().withScheme(_.KEYMAPS_SCHEME),{preview:!0})}getWhen(h){return h?this.keybindingService.convertMonacoWhen(h.when):""}getScope(h){return h===p.KeybindingScope.DEFAULT?(0,p.localize)("keymaps.source.default"):h===p.KeybindingScope.USER?(0,p.localize)("keymaps.source.user"):h===p.KeybindingScope.WORKSPACE?(0,p.localize)("keymaps.source.workspace"):""}getKeybindingItems(){const h=this.commandRegistry.getCommands(),u=[];for(const y of h){const A=this.keybindingRegistry.getKeybindingsForCommand(y.id);!A||!A.length?y.label&&u.push({id:y.id,command:y.label,hasCommandLabel:!0}):A.forEach(S=>{let w;if(this.storeKeybindings){const T=this.storeKeybindings.find(D=>y&&D.command===y.id);w={id:y.id,command:y.label||y.id,keybinding:T?T.key:S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:T?this.getWhen(T):this.getWhen(A&&S),source:T?this.getScope(p.KeybindingScope.USER):this.getScope(p.KeybindingScope.DEFAULT),hasCommandLabel:!!y.label}}else w={id:y.id,command:y.label||y.id,keybinding:A&&S?this.keybindingRegistry.acceleratorFor(S,"+").join(" "):"",when:this.getWhen(A&&S),source:A&&S&&typeof S.scope<"u"?this.getScope(S.scope):"",hasCommandLabel:!!y.label};u.push(w)})}const d=u.sort((y,A)=>this.compareItem(y,A)),E=d.filter(y=>!!y.keybinding),f=d.filter(y=>!y.keybinding&&y.hasCommandLabel),a=E.filter(y=>y.hasCommandLabel),b=E.filter(y=>!y.hasCommandLabel);return[...a,...b,...f]}compareItem(h,u){return h&&u?h.source===u.source?h.command.toLowerCase().localeCompare(u.command.toLowerCase()):h.source===this.getScope(p.KeybindingScope.USER)?-1:1:0}getRaw(h){return h?h.replace(new RegExp(/<(\/)?match>/gi),""):""}};t.KeymapService=g,g.DEFAULT_SEARCH_DELAY=100,g.KEYMAP_FILE_URI=new p.URI().withScheme(p.Schemes.userStorage).withPath(_.KEYMAPS_FILE_NAME),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keyBindingRegistry",void 0),r.__decorate([(0,c.Autowired)(s.KeymapsParser),r.__metadata("design:type",s.KeymapsParser)],g.prototype,"parser",void 0),r.__decorate([(0,c.Autowired)(p.CommandService),r.__metadata("design:type",Object)],g.prototype,"commandService",void 0),r.__decorate([(0,c.Autowired)(p.CommandRegistry),r.__metadata("design:type",Object)],g.prototype,"commandRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingRegistry),r.__metadata("design:type",Object)],g.prototype,"keybindingRegistry",void 0),r.__decorate([(0,c.Autowired)(p.KeybindingService),r.__metadata("design:type",Object)],g.prototype,"keybindingService",void 0),r.__decorate([(0,c.Autowired)(m.IFileServiceClient),r.__metadata("design:type",Object)],g.prototype,"filesystem",void 0),r.__decorate([(0,c.Autowired)(p.ILogger),r.__metadata("design:type",Object)],g.prototype,"logger",void 0),r.__decorate([(0,c.Autowired)(v.IProgressService),r.__metadata("design:type",Object)],g.prototype,"progressService",void 0),t.KeymapService=g=n=r.__decorate([(0,c.Injectable)()],g)},34879:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeymapsView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25067),m=n.__importDefault(e(78541)),_=()=>{const{keybindings:s,searchKeybindings:g,validateKeybinding:l,detectKeybindings:h,setKeybinding:u,resetKeybinding:d,getRaw:E,getScope:f,covert:a,clearCovert:b,fixed:y,onDidKeymapChanges:A,updateKeybindings:S}=(0,p.useInjectable)(v.IKeymapService),[w,T]=o.default.useState(!1),[D,I]=o.default.useState(""),[O,M]=o.default.useState(s),R=({data:Q,index:V})=>{const{id:$,command:Y,when:z,source:H,keybinding:K}=Q,[Z,X]=o.default.useState(!1),[ie,oe]=o.default.useState(K||""),[le,pe]=o.default.useState(!1),[q,Ee]=o.default.useState(),[_e,te]=o.default.useState([]),ge=()=>{le||(y(),pe(!0)),b(),oe(E(K)),X(!0)},Te=Be=>{const me=l(Q,Be);me?me!==" "?Ee({message:me,type:c.VALIDATE_TYPE.ERROR}):X(!1):(u({command:E($),when:E(z)||"",keybinding:E(K)},{command:E($),when:E(z)||"",keybinding:Be}),X(!1),b())},Pe=()=>{X(!1)},Ae=Be=>{Be.stopPropagation(),Be.preventDefault();const{key:me}=p.KeyCode.createKeyCode(Be.nativeEvent),re=Be.nativeEvent.shiftKey||Be.nativeEvent.metaKey||Be.nativeEvent.altKey||Be.nativeEvent.ctrlKey;me&&p.Key.ENTER.keyCode===me.keyCode&&!re?ie&&Te(ie):oe(a(Be.nativeEvent))},we=()=>{const Be=()=>{Ee(void 0),ie&&oe(""),b()},me=re=>{re.stopPropagation(),re.preventDefault()};return o.default.createElement("div",{className:m.default.keybinding_optional_actions,onMouseDown:me},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:Be,title:(0,p.localize)("keymaps.action.clear")}))},be=()=>o.default.createElement("div",{className:m.default.keybinding_key_input_placeholder},"\u23CE"),fe=Be=>{const me=re=>{re.preventDefault(),le||(y(),pe(!0)),d({command:E($),when:E(z)||"",keybinding:ie})};if(Be&&E(Be)===f(p.KeybindingScope.USER))return o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("rollback"),m.default.keybinding_inline_action),onClick:me,title:(0,p.localize)("keymaps.action.reset")})},xe=()=>{if(!q&&_e.length>0)return o.default.createElement("div",{className:m.default.keybinding_detective_messages},o.default.createElement("div",{className:m.default.keybinding_detective_messages_label},(0,p.formatLocalize)("keymaps.keybinding.duplicate",_e.length)),o.default.createElement("ul",{className:m.default.keybinding_detective_messages_container},_e.map((Be,me)=>o.default.createElement("li",{className:m.default.keybinding_detective_messages_item,key:`${Be.id}_${me}`,title:`${Be.command}-${Be.when}`},o.default.createElement("div",{className:m.default.title},(0,p.localize)("keymaps.header.command.title"),": ",E(Be.command)||"-"),o.default.createElement("div",{className:m.default.description},o.default.createElement("div",{style:{marginRight:4}},(0,p.localize)("keymaps.header.source.title"),": ",E(Be.source)||"-"),o.default.createElement("div",null,(0,p.localize)("keymaps.header.when.title"),": ",E(Be.when)||"\u2014"))))))},Re=()=>{if(Z)return o.default.createElement("div",{className:m.default.keybinding_key_input_container},we(),o.default.createElement(c.ValidateInput,{placeholder:(0,p.localize)("keymaps.edit.placeholder"),validateMessage:q,className:m.default.keybinding_key_input,size:"small",autoFocus:!0,name:p.NO_KEYBINDING_NAME,value:ie,onKeyDown:Ae,onBlur:Pe}),be(),xe());{const Be=K?.split(" ");return o.default.createElement("div",{className:m.default.keybinding_key,title:E(K),onDoubleClick:ge},o.default.createElement("div",{className:m.default.keybinding_action,onClick:ge},o.default.createElement("span",{className:(0,r.default)(K?(0,p.getIcon)("edit"):(0,p.getIcon)("plus"),m.default.keybinding_inline_action),title:K?(0,p.localize)("keymaps.action.edit"):(0,p.localize)("keymaps.action.add")}),fe(H)),Be&&Be[0]?Be.map((me,re)=>{const he=me.split("+");return o.default.createElement("div",{className:m.default.keybinding_key_block,key:`${me}_${re}`},he.map((Oe,Se)=>o.default.createElement("div",{className:m.default.keybinding_key_item,key:`${Oe}_${Se}`,dangerouslySetInnerHTML:{__html:Oe||""}})))}):"\u2014")}};return(0,o.useEffect)(()=>{q&&Ee(void 0),te(ie&&Z?h(Q,ie):[])},[ie]),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item,V%2===1&&m.default.odd)},o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box,m.default.keybinding_command)},o.default.createElement("div",{className:m.default.command_name,title:E(Y),dangerouslySetInnerHTML:{__html:Y}}),o.default.createElement("div",{className:(0,r.default)(m.default.limit_warp,m.default.command_id),title:E($),dangerouslySetInnerHTML:{__html:(0,p.formatLocalize)("keymaps.commandId.title",$)}})),o.default.createElement("div",{className:(0,r.default)(m.default.keybinding_list_item_box)},Re()),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{className:m.default.limit_warp,title:E(z||"\u2014"),dangerouslySetInnerHTML:{__html:z||"\u2014"}})),o.default.createElement("div",{className:m.default.keybinding_list_item_box},o.default.createElement("div",{title:E(H),dangerouslySetInnerHTML:{__html:H||""}})))},P=()=>{const Q=()=>{T(!w)};return o.default.createElement("div",{className:m.default.search_inline_action},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("keyboard"),m.default.search_inline_action_icon,w&&m.default.active),onClick:Q}))},k=(0,o.useCallback)(Q=>{I(Q),g(Q)},[D]),F=Q=>{if(!w){const V=Q.target&&Q.target.value?Q.target.value.toLocaleLowerCase():"";k(V)}},L=Q=>{if(w){Q.stopPropagation(),Q.preventDefault();const{key:V}=p.KeyCode.createKeyCode(Q.nativeEvent);if(V&&p.Key.ENTER.keyCode===V.keyCode)return;k(a(Q.nativeEvent))}},B=()=>{D&&(I(""),g("")),b()},j=()=>o.default.createElement("div",{className:m.default.keybinding_optional_actions},o.default.createElement("span",{className:(0,r.default)((0,p.getIcon)("close-circle-fill"),m.default.keybinding_optional_action),onClick:B,title:(0,p.localize)("keymaps.action.reset")})),W=()=>o.default.createElement("div",{className:m.default.search_container},o.default.createElement(c.Input,{className:m.default.search_input,placeholder:(0,p.localize)(w?"keymaps.search.keyboard.placeholder":"keymaps.search.placeholder"),type:"text",value:D,name:p.NO_KEYBINDING_NAME,onChange:F,onKeyDown:L,addonBefore:P()}),j()),U=(0,o.useMemo)(()=>{const Q=[{title:(0,p.localize)("keymaps.header.command.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.keybinding.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.when.title"),classname:m.default.keybinding_header_item},{title:(0,p.localize)("keymaps.header.source.title"),classname:m.default.keybinding_header_item}];return o.default.createElement("div",{className:m.default.keybinding_header},Q.map((V,$)=>o.default.createElement("div",{className:V.classname,key:`${V.title}_${$}`},V.title)))},[]);return(0,o.useEffect)(()=>{const Q=A(V=>{M(V)});return S(),()=>{Q.dispose()}},[]),o.default.createElement("div",{className:m.default.keybinding_container},o.default.createElement("div",{className:m.default.keybinding_searchbar},W()),o.default.createElement("div",{className:m.default.keybinding_body},U,o.default.createElement("div",{className:m.default.keybinding_list},o.default.createElement(c.RecycleList,{itemHeight:40,data:O,template:R,className:m.default.keybinding_list_container}))))};t.KeymapsView=_},79312:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEYMAPS_FILE_NAME=t.KEYMAPS_SCHEME=void 0,t.KEYMAPS_SCHEME="keymaps",t.KEYMAPS_FILE_NAME="keymaps.json"},25067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(79312),t),n.__exportStar(e(88811),t)},88811:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IKeymapService=void 0,t.IKeymapService=Symbol("IKeymapService")},83507:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogModule=t.LogServiceClient=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(47548),p=e(49187);n.__exportStar(e(47548),t);var v=e(1700);Object.defineProperty(t,"LogServiceClient",{enumerable:!0,get:function(){return v.LogServiceClient}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.ILoggerManagerClient,useClass:p.LoggerManagerClient}],this.backServices=[{servicePath:c.LogServiceForClientPath,clientToken:c.ILoggerManagerClient}]}};t.LogModule=m,t.LogModule=m=n.__decorate([(0,r.Injectable)()],m)},49187:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManagerClient=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(47548),p=e(1700);let v=class{constructor(){this.logLevelChangeEmitter=new o.Emitter}getLogger(_,s){const g=new p.LogServiceClient(_);return g.setup(this.logServiceForClient,s),g}getBrowserLogger(_){return new p.LogServiceClient(_)}async getLogFolder(){return await this.logServiceForClient.getLogFolder()}async setGlobalLogLevel(_){return await this.logServiceForClient.setGlobalLogLevel(_)}async getGlobalLogLevel(){return await this.logServiceForClient.getGlobalLogLevel()}async dispose(){return this.logLevelChangeEmitter.dispose(),await this.logServiceForClient.disposeAll()}get onDidChangeLogLevel(){return this.logLevelChangeEmitter.event}onDidLogLevelChanged(_){this.logLevelChangeEmitter.fire(_)}};t.LoggerManagerClient=v,n.__decorate([(0,r.Autowired)(c.LogServiceForClientPath),n.__metadata("design:type",Object)],v.prototype,"logServiceForClient",void 0),t.LoggerManagerClient=v=n.__decorate([(0,r.Injectable)()],v)},1700:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogServiceClient=void 0;const n=e(43718),r=e(47548);class o{constructor(p){this.level=r.LogLevel.Verbose,this.ready=new n.Deferred,this.namespace=p,this.debugLog=new r.DebugLog(p)}async setup(p,v){this.logServiceForClient=p,this.pid=v;const m=await this.logServiceForClient.getGlobalLogLevel();this.level=m,this.ready.resolve()}async getLevel(){return this.logServiceForClient?await this.logServiceForClient.getLevel(this.namespace):this.level}async setLevel(p){this.level=p,this.logServiceForClient&&await this.logServiceForClient.setLevel(this.namespace,p)}async verbose(...p){this.debugLog.verbose(...p),this.logServiceForClient&&await this.logServiceForClient.verbose(this.namespace,(0,r.format)(p),this.pid)}async debug(...p){this.debugLog.debug(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Debug)&&await this.logServiceForClient.debug(this.namespace,(0,r.format)(p),this.pid))}async log(...p){this.debugLog.log(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Info)&&await this.logServiceForClient.log(this.namespace,(0,r.format)(p),this.pid))}async warn(...p){this.debugLog.warn(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Warning)&&await this.logServiceForClient.warn(this.namespace,(0,r.format)(p),this.pid))}async error(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Error)&&await this.logServiceForClient.error(this.namespace,(0,r.format)(p),this.pid))}async critical(...p){this.debugLog.error(...p),this.logServiceForClient&&(await this.ready.promise,!(this.level>r.LogLevel.Critical)&&await this.logServiceForClient.critical(this.namespace,(0,r.format)(p),this.pid))}async dispose(){this.debugLog.destroy(),this.logServiceForClient&&await this.logServiceForClient.disposeLogger(this.namespace)}}t.LogServiceClient=o},47548:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=e(85608);n.__exportStar(e(4892),t),n.__exportStar(e(46196),t)},46196:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogServiceForClient=void 0,t.format=e,t.ILogServiceForClient=Symbol("LogServiceForClient");function e(n){let r="";for(let o=0;o<n.length;o++){let c=n[o];if(c instanceof Error){const p=Array.prototype.slice.call(arguments);p[0]=c.stack,c=e(p)}else if(typeof c=="object")try{c=JSON.stringify(c)}catch{}else if(typeof c=="symbol")try{c=c.toString()}catch{}r+=(o>0?" ":"")+c}return r}},73344:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(47548),t)},9522:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionServiceFactory=t.AccordionService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=n.__importDefault(e(46343)),c=e(76003),p=e(41869),v=e(81878),m=e(71707),_=e(95416),s=e(93899),g=e(68969),l=e(28423),h=e(17793);let u=class extends p.WithEventBus{get views(){return this.viewsObservable.get()}get state(){return this.stateObservable.get()}constructor(E,f){super(),this.containerId=E,this.noRestore=f,this.forceRevealContextKeys=new Map,this.viewWhenContextkeys=new Set,this.appendedViewSet=new Set,this.viewsWithContextKey=new Set,this.viewsObservable=(0,l.observableValue)(this,[]),this.stateObservable=(0,l.observableValue)(this,{}),this.visibleViews=(0,l.derived)(this,a=>{const b=this.viewsObservable.read(a);return this.stateObservable.read(a),b.filter(y=>!this.getViewState(y.id).hidden)}),this.rendered=!1,this.menuId=`${s.MenuId.AccordionContext}/${this.containerId}`,this.toDispose=new Map,this.didChangeViewTitleEmitter=this.registerDispose(new p.Emitter),this.onDidChangeViewTitle=this.didChangeViewTitleEmitter.event,this.beforeAppendViewEmitter=this.registerDispose(new p.Emitter),this.onBeforeAppendViewEvent=this.beforeAppendViewEmitter.event,this.afterAppendViewEmitter=this.registerDispose(new p.Emitter),this.onAfterAppendViewEvent=this.afterAppendViewEmitter.event,this.afterDisposeViewEmitter=this.registerDispose(new p.Emitter),this.onAfterDisposeViewEvent=this.afterDisposeViewEmitter.event,this.doUpdateResize=(0,r.default)(()=>{var a,b;let y;if(Object.keys(this.state).forEach(A=>{this.state[A].hidden||this.state[A].collapsed||(y?(this.state[A].size||0)>(this.state[y].size||0)&&(y=A):y=A)}),y&&this.splitPanelService.isVisible&&this.expandedViews.length>1&&!((a=this.splitPanelService.rootNode)===null||a===void 0)&&a.clientHeight){const A=((b=this.splitPanelService.rootNode)===null||b===void 0?void 0:b.clientHeight)-this.getPanelFullHeight();if(A){const S=this.state;S[y].size+=A,(0,l.transaction)(w=>{this.stateObservable.set({...S},w)}),this.toggleOpen(y,!1)}}},16),this.storeState=()=>{this.noRestore||!this.rendered||this.layoutState.setState(_.LAYOUT_STATE.getContainerSpace(this.containerId),this.state)},this.handleSectionClick=(a,b,y)=>{this.doToggleOpen(a,b,y)},this.handleContextMenu=(a,b)=>{a.preventDefault();const y=this.ctxMenuService.createMenu({id:this.menuId,config:{args:[{viewId:b}]},contextKeyService:b?this.viewContextKeyRegistry.getContextKeyService(b):void 0}),A=y.getGroupedMenuNodes();y.dispose(),this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})},this.addDispose((0,l.recomputeInitiallyAndOnChange)(this.visibleViews)),this.splitPanelService=this.splitPanelManager.getService(E),this.addDispose(this.splitPanelService),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithSection",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,p.localize)("layout.view.hide","Hide")},group:"0_global",when:"triggerWithSection == true"}),this.viewContextKeyRegistry.afterContextKeyServiceRegistered(this.containerId,a=>{this.topViewKey=a.createKey("view",E),setTimeout(()=>{this.popViewKeyIfOnlyOneViewVisible()})}),this.addDispose(p.Event.debounce(this.contextKeyService.onDidChangeContext,(a,b)=>a||b.payload.affectsSome(this.viewWhenContextkeys),50)(a=>a&&this.handleContextKeyChange(),this)),this.splitPanelService.whenReady.then(()=>{this.listenWindowResize()})}updateViewTitle(E,f){const a=this.views.find(b=>b.id===E);a?(a.name=f,this.didChangeViewTitleEmitter.fire({id:E,title:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion title`)}updateViewDesciption(E,f){const a=this.views.find(b=>b.id===E);a?(a.description=f,this.didChangeViewTitleEmitter.fire({id:E,description:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion description`)}updateViewMessage(E,f){const a=this.views.find(b=>b.id===E);a?(a.message=f,this.didChangeViewTitleEmitter.fire({id:E,message:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}updateViewBadge(E,f){const a=this.views.find(b=>b.id===E);a?(a.badge=f,this.didChangeViewTitleEmitter.fire({id:E,badge:f})):this.logger.error(`No target view \`${E}\` found, unable to update accordion message`)}tryUpdateResize(){this.doUpdateResize()}restoreState(){if(this.noRestore)return;const E={};this.visibleViews.get().forEach(a=>E[a.id]={collapsed:!1,hidden:!1});const f=this.layoutState.getState(_.LAYOUT_STATE.getContainerSpace(this.containerId),E);(0,o.default)(f,E)||(0,l.transaction)(a=>{this.stateObservable.set({...f},a)}),this.popViewKeyIfOnlyOneViewVisible(),this.splitPanelService.whenReady.then(()=>{this.restoreSize(),this.rendered=!0})}restoreSize(){var E;let f=((E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight)||0,a;if(this.visibleViews.get().forEach((b,y)=>{const A=this.state[b.id];A.collapsed?(this.setSize(y,0,!1,!0),f-=this.headerSize):!A.collapsed&&A.size&&(this.setSize(y,A.size,!1,!0),f-=A.size,a=y)}),a){const b=this.visibleViews.get()[a];this.setSize(a,this.state[b.id].size+f)}}initConfig(E){const{headerSize:f,minSize:a}=E;this.headerSize=f,this.minSize=a}registerContextService(E){let f=this.viewContextKeyRegistry.getContextKeyService(E);return f||(f=this.contextKeyService.createScoped(),f.createKey("view",E),this.viewContextKeyRegistry.registerContextKeyService(E,f)),f}getSectionToolbarMenu(E){const f=this.registerContextService(E),a=this.menuService.createMenu(s.MenuId.ViewTitle,f),b=this.views.find(y=>y.id===E);return b&&(b.titleMenu=a),a}updateView(E){(0,l.transaction)(f=>{const a=this.views;if(E.priority){const b=a.findIndex(y=>(y.priority||0)<(E.priority||0));a.splice(b===-1?a.length:b,0,E),this.viewsObservable.set([...a],f)}else this.viewsObservable.set([...a,E],f)})}appendView(E,f){if(this.appendedViewSet.has(E.id)&&!f)return;const a=new p.DisposableCollection;a.push(this.progressService.registerProgressIndicator(E.id));const b=this.views.findIndex(y=>y.id===E.id);if(b!==-1){(0,l.transaction)(y=>{const A=this.views;A[b]=Object.assign({},A[b],E),this.viewsObservable.set([...A],y)});return}if(E.when){this.viewsWithContextKey.add(E);const y=this.createRevealContextKey(E.id);if(this.fillKeysInWhenExpr(this.viewWhenContextkeys,E.when),!this.contextKeyService.match(E.when)&&!this.contextKeyService.match(y))return;this.appendedViewSet.add(E.id)}this.beforeAppendViewEmitter.fire(E.id),this.updateView(E),this.registerContextService(E.id),a.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(E.id,a),label:(E.name||E.id).toUpperCase()},group:"1_widgets"})),this.toDispose.set(E.id,a),this.popViewKeyIfOnlyOneViewVisible(),this.afterAppendViewEmitter.fire(E.id)}disposeView(E){const f=this.views.findIndex(b=>b.id===E);f>-1&&(0,l.transaction)(b=>{const y=this.views;y.splice(f,1),this.viewsObservable.set([...y],b)});const a=this.toDispose.get(E);a&&a.dispose(),this.appendedViewSet.delete(E),this.popViewKeyIfOnlyOneViewVisible(),this.afterDisposeViewEmitter.fire(E)}revealView(E){const f=this.forceRevealContextKeys.get(E);f&&f.key.set(!0)}disposeAll(){(0,l.transaction)(E=>{this.viewsObservable.set([],E)}),this.toDispose.forEach(E=>{E.dispose()})}onResize(E){if(E.payload.slotLocation&&this.state[E.payload.slotLocation]){const f=E.payload.slotLocation;p.fastdom.measureAtNextFrame(()=>{const a=document.getElementById(f);if(a){const b=this.state;b[f].size=a.clientHeight,(0,l.transaction)(y=>{this.stateObservable.set({...b},y)}),this.storeState()}})}}getPanelFullHeight(E){return Object.keys(this.state).filter(f=>this.views.find(a=>a.id===f)&&f!==E).reduce((f,a)=>f+(this.state[a].collapsed?this.headerSize:this.state[a].hidden?0:this.state[a].size),0)}listenWindowResize(){window.addEventListener("resize",this.doUpdateResize),this.addDispose({dispose:()=>window.removeEventListener("resize",this.doUpdateResize)})}createRevealContextKey(E){const f=`forceShow.${E}`;return this.forceRevealContextKeys.set(E,{when:`${f} == true`,key:this.contextKeyService.createKey(f,!1)}),this.viewWhenContextkeys.add(f),`${f} == true`}registerGlobalToggleCommand(){const E=`view-container.hide.${this.containerId}`;return this.commandRegistry.registerCommand({id:E},{execute:({viewId:f})=>{this.doToggleView(f)},isEnabled:()=>this.visibleViews.get().length>1}),E}registerVisibleToggleCommand(E,f){const a=`view-container.hide.${E}`;return f.push(this.commandRegistry.registerCommand({id:a},{execute:({forceShow:b}={})=>{this.doToggleView(E,b)},isToggled:()=>!this.getViewState(E).hidden,isEnabled:()=>this.getViewState(E).hidden||this.visibleViews.get().length>1})),a}doToggleView(E,f){const a=this.getViewState(E);let b;f===void 0?b=!a.hidden:b=!f,a.hidden=b,this.updateViewState(E,a),this.popViewKeyIfOnlyOneViewVisible(),this.storeState()}popViewKeyIfOnlyOneViewVisible(){if(!this.topViewKey)return;const E=this.visibleViews.get();E.length===1?this.topViewKey.set(E[0].id):this.topViewKey.reset()}toggleViewVisibility(E,f){this.doToggleView(E,f)}get expandedViews(){return this.views.filter(E=>{const f=this.state[E.id];return!f||f&&!f.hidden&&!f.collapsed})}toggleOpen(E,f){const a=this.visibleViews.get().findIndex(b=>b.id===E);a>-1&&this.doToggleOpen(E,f,a,!0)}getViewState(E){let f=this.state[E];const a=this.views.find(b=>b.id===E);return f||(this.updateViewState(E,{collapsed:a?.collapsed||!1,hidden:a?.hidden||!1}),f=this.state[E]),f}updateViewState(E,f){const a=this.state;a[E]=f,(0,l.transaction)(b=>{this.stateObservable.set({...a},b)})}doToggleOpen(E,f,a,b){var y;const A=this.getViewState(E);this.updateViewState(E,{...A,collapsed:f});const S=this.mainLayoutService.getContainer(this.containerId);if(((y=S?.options)===null||y===void 0?void 0:y.alignment)!=="horizontal"){let w;f?w=this.setSize(a,0,!1,b):w=this.setSize(a,this.expandedViews.length===1?this.getAvailableSize():A.size||this.minSize,!1,b);for(let T=this.visibleViews.get().length-1;T>a;T--)this.getViewState(this.visibleViews.get()[T].id).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b);for(let T=a-1;T>=0;T--)(this.state[this.visibleViews.get()[T].id]||{}).collapsed!==!0?w=this.setSize(T,w,!0,b):this.setSize(T,0,!1,b)}this.eventBus.fire(new h.ViewCollapseChangedEvent({viewId:E,collapsed:f}))}setSize(E,f,a,b){var y;const A=this.visibleViews.get()[E],S=(y=this.splitPanelService.rootNode)===null||y===void 0?void 0:y.clientHeight,w=this.splitPanelService.panels[E];if(!w)return 0;b||w.classList.add("resize-ease"),!f&&!a?(f=this.headerSize,w.classList.add(v.RESIZE_LOCK)):w.classList.remove(v.RESIZE_LOCK);const T=w.clientHeight,D=this.getViewState(A.id);let I=f;if(a&&(I=Math.max(T-f,this.minSize)),E===this.expandedViews.length-1&&(0,p.isDefined)(S))if(I+E*this.minSize>S)I-=I+E*this.minSize-S;else{const O=this.getPanelFullHeight(A.id);I+O<S&&(I+=S-(I+O))}if(this.rendered){let O;f===this.headerSize?O=T:O=I,O!==this.headerSize&&(D.size=O)}return this.storeState(),D.nextSize=I,b||setTimeout(()=>{w.classList.remove("resize-ease")},200),a?I-(T-f):f-T}getAvailableSize(){var E;const f=(E=this.splitPanelService.rootNode)===null||E===void 0?void 0:E.clientHeight;return f?f-(this.visibleViews.get().length-1)*this.headerSize:0}handleContextKeyChange(){Array.from(this.viewsWithContextKey.values()).forEach(E=>{this.contextKeyService.match(E.when)||this.contextKeyService.match(this.forceRevealContextKeys.get(E.id).when)?this.appendView(E):this.disposeView(E.id)})}fillKeysInWhenExpr(E,f){this.contextKeyService.getKeysInWhen(f).forEach(b=>{E.add(b)})}};t.AccordionService=u,n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",m.SplitPanelManager)],u.prototype,"splitPanelManager",void 0),n.__decorate([(0,c.Autowired)(s.AbstractMenuService),n.__metadata("design:type",s.AbstractMenuService)],u.prototype,"menuService",void 0),n.__decorate([(0,c.Autowired)(s.AbstractContextMenuService),n.__metadata("design:type",s.AbstractContextMenuService)],u.prototype,"ctxMenuService",void 0),n.__decorate([(0,c.Autowired)(s.IMenuRegistry),n.__metadata("design:type",s.IMenuRegistry)],u.prototype,"menuRegistry",void 0),n.__decorate([(0,c.Autowired)(p.CommandRegistry),n.__metadata("design:type",Object)],u.prototype,"commandRegistry",void 0),n.__decorate([(0,c.Autowired)(s.ICtxMenuRenderer),n.__metadata("design:type",s.ICtxMenuRenderer)],u.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,c.Autowired)(),n.__metadata("design:type",p.ViewContextKeyRegistry)],u.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,c.Autowired)(h.IMainLayoutService),n.__metadata("design:type",Object)],u.prototype,"mainLayoutService",void 0),n.__decorate([(0,c.Autowired)(p.IContextKeyService),n.__metadata("design:type",Object)],u.prototype,"contextKeyService",void 0),n.__decorate([(0,c.Autowired)(_.LayoutState),n.__metadata("design:type",_.LayoutState)],u.prototype,"layoutState",void 0),n.__decorate([(0,c.Autowired)(g.IProgressService),n.__metadata("design:type",Object)],u.prototype,"progressService",void 0),n.__decorate([(0,c.Autowired)(p.ILogger),n.__metadata("design:type",Object)],u.prototype,"logger",void 0),n.__decorate([(0,p.OnEvent)(p.ResizeEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[p.ResizeEvent]),n.__metadata("design:returntype",void 0)],u.prototype,"onResize",null),t.AccordionService=u=n.__decorate([(0,c.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Boolean])],u),t.AccordionServiceFactory=Symbol("AccordionServiceFactory")},70936:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Panel=t.AccordionContainer=void 0;const r=e(85608).__importStar(e(14041)),o=e(41869),c=e(81878),p=e(1149),v=e(43718),m=e(9522),_=e(95867),s=({alignment:l="vertical",views:h,containerId:u,headerSize:d=24,minSize:E=120,className:f,noRestore:a,style:b})=>{const y=(0,o.useInjectable)(p.LayoutViewSizeConfig),A=(0,o.useInjectable)(m.AccordionServiceFactory)(u,a),S=(0,o.useAutorun)(A.visibleViews);(0,o.useAutorun)(A.stateObservable);const w=(0,r.useMemo)(()=>d||y.accordionHeaderSizeHeight,[d]);return r.default.useEffect(()=>{if(h.length)for(const T of h)A.appendView(T)},[h]),r.default.useEffect(()=>{A.initConfig({headerSize:w,minSize:E})},[]),r.default.createElement(c.SplitPanel,{className:f,style:b,headerSize:d,dynamicTarget:!0,id:u,resizeKeep:!1,direction:l==="horizontal"?"left-to-right":"top-to-bottom"},S.map((T,D)=>{const I=A.getViewState(T.id),O=T.titleMenu||A.getSectionToolbarMenu(T.id),{collapsed:M,nextSize:R}=I;return r.default.createElement(_.AccordionSection,{noHeader:S.length===1,onItemClick:()=>{A.handleSectionClick(T.id,!M,D)},onContextMenuHandler:A.handleContextMenu,alignment:l,header:T.name&&(0,v.replaceLocalizePlaceholder)(T.name)||T.id,viewId:T.id,key:T.id,message:T.message,description:T.description,badge:T.badge,title:T.name,expanded:!M,accordionService:A,index:D,headerSize:d,minSize:d,initialProps:T.initialProps,titleMenu:O,titleMenuContext:T.titleMenuContext,savedSize:M?d:R,flex:T.weight||1},T.component)}))};t.AccordionContainer=s,t.AccordionContainer.displayName="AccordionContainer";const g=({children:l})=>r.default.createElement("div",null,l);t.Panel=g,t.Panel.displayName="Panel"},95867:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionSection=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(41869),p=e(25918),v=e(93899),m=e(68969),_=e(68974),s=e(69589),g=e(52416),l=n.__importDefault(e(81388)),h={tabIndex:0},u=({header:d,description:E,message:f,headerClass:a,onItemClick:b,noHeader:y,children:A,badge:S,headerSize:w,viewId:T,initialProps:D,titleMenu:I,titleMenuContext:O,expanded:M,accordionService:R,onContextMenuHandler:P,alignment:k})=>{const F=(0,c.useInjectable)(g.IIconService),L=(0,c.useDesignStyles)(l.default.actions_wrap,"actions_wrap"),B=(0,c.useDesignStyles)(l.default.kt_split_panel,"kt_split_panel"),j=(0,c.useDesignStyles)(l.default.kt_split_panel_header,"kt_split_panel_header"),W=(0,c.useDesignStyles)(l.default.kt_split_panel_body,"kt_split_panel_body"),U=(0,c.useDesignStyles)(l.default.section_badge,"section_badge"),Q=o.default.useRef(null),[V,$]=o.default.useState({header:d,description:E,message:f,badge:S});o.default.useEffect(()=>{const oe=R.onDidChangeViewTitle(({id:le,title:pe,description:q,message:Ee,badge:_e})=>{let te=!1;const ge={...V};T===le&&pe&&pe!==V.header&&(ge.header=pe,te=!0),T===le&&_e!==V.badge&&(ge.badge=_e,te=!0),T===le&&q&&q!==V.description&&(ge.description=q,te=!0),T===le&&Ee&&Ee!==V.message&&(ge.message=Ee,te=!0),te&&$(ge)});return()=>{oe.dispose()}},[]);const Y=o.default.useCallback(()=>{b()},[b]),z=o.default.useMemo(()=>({overflow:M?"auto":"hidden"}),[M]),H=(0,c.useViewState)(T,Q,!0),Z=(0,c.useInjectable)(m.IProgressService).getIndicator(T),X=A,ie=o.default.useMemo(()=>M?`${w}px`:k==="horizontal"?"100%":`${w}px`,[M,w,k]);return o.default.createElement("div",{className:B,"data-view-id":T,draggable:!1},!y&&o.default.createElement("div",{...h,className:(0,r.default)(j,a),onClick:Y,onContextMenu:oe=>P(oe,T),style:{height:ie,lineHeight:ie}},o.default.createElement("div",{className:l.default.label_wrap},o.default.createElement("i",{className:(0,r.default)((0,c.getIcon)("arrow-down"),l.default.arrow_icon,M?"":l.default.kt_mod_collapsed)}),o.default.createElement("div",{className:l.default.section_label,style:{lineHeight:w+"px"}},V.header),V.description&&o.default.createElement("div",{className:l.default.section_description,style:{lineHeight:w+"px"}},typeof V.description=="string"?(0,s.transformLabelWithCodicon)(V.description,{},F.fromString.bind(F)):V.description),V.badge&&o.default.createElement("div",{className:U},typeof V.badge=="string"?V.badge:V.badge.value)),M&&I&&o.default.createElement("div",{className:L},(0,v.isIMenu)(I)?o.default.createElement(p.InlineActionBar,{menus:I,context:O}):o.default.createElement(p.InlineMenuBar,{menus:I,context:O}))),o.default.createElement("div",{className:(0,r.default)([W,{[l.default.hide]:!M}]),style:z,ref:Q},o.default.createElement(_.ProgressBar,{className:l.default.progressBar,progressModel:Z.progressModel}),o.default.createElement(c.ErrorBoundary,null,V.message&&o.default.createElement("div",{className:l.default.kt_split_panel_message},V.message),o.default.createElement(X,{...D,viewState:{height:H.height-(V.message?22:0),width:H.width}}))))};t.AccordionSection=u},91527:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TitleBar=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(752),p=n.__importDefault(e(81388));t.TitleBar=r.default.memo(v=>{const m=(0,o.useDesignStyles)(p.default.titlebar,"titlebar"),_=(0,o.useInjectable)(c.TabbarServiceFactory)(v.side),s=r.default.useCallback(l=>{v.containerId&&v.side&&_.handleDragStart(l,v.containerId)},[v.containerId,v.side,_]),g=r.default.useCallback(l=>{_.handleDragEnd(l)},[_]);return r.default.createElement("div",{className:m,style:{height:v.height}},!v.draggable&&r.default.createElement("h1",null,v.title),!!v.draggable&&r.default.createElement("h1",{draggable:!0,style:{cursor:"pointer"},onDragStart:s,onDragEnd:g},v.title),v.menubar||null)}),t.TitleBar.displayName="TitleBar"},25072:(x,t,e)=>{"use strict";var n;n={value:!0},t.s=void 0;const r=e(41869),o=e(17793);t.s={[r.SlotLocation.top]:{modules:["@opensumi/ide-menu-bar"]},[r.SlotLocation.action]:{modules:["@opensumi/ide-toolbar-action"]},[r.SlotLocation.left]:{modules:["@opensumi/ide-explorer","@opensumi/ide-search","@opensumi/ide-scm","@opensumi/ide-extension-manager","@opensumi/ide-debug","@opensumi/ide-notebook"]},[r.SlotLocation.right]:{modules:[o.DROP_RIGHT_CONTAINER]},[r.SlotLocation.main]:{modules:["@opensumi/ide-editor"]},[r.SlotLocation.bottom]:{modules:[o.DROP_BOTTOM_CONTAINER,"@opensumi/ide-terminal-next","@opensumi/ide-output","debug-console","@opensumi/ide-markers"]},[r.SlotLocation.statusBar]:{modules:["@opensumi/ide-status-bar"]},[r.SlotLocation.extra]:{modules:["breadcrumb-menu"]}}},45395:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomDropArea=t.RightDropArea=void 0;const n=e(85608),r=n.__importDefault(e(14041)),o=e(41869),c=e(17793),p=n.__importDefault(e(36623)),v=s=>{const{location:g}=s,l=(0,o.useInjectable)(c.IMainLayoutService),h=r.default.useCallback(u=>{var d;const E=(d=u.dataTransfer)===null||d===void 0?void 0:d.getData("containerId");l.moveContainerTo(E,g)},[l,g]);return r.default.createElement("div",{className:p.default.drop_area,onDrop:h,onDragOver:u=>{u.preventDefault()}},(0,o.localize)("main-layout.drop-area.tip"))},m=()=>r.default.createElement(v,{location:"right"});t.RightDropArea=m;const _=()=>r.default.createElement(v,{location:"bottom"});t.BottomDropArea=_},7480:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModule=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(17793),p=e(9522),v=e(22537),m=e(53576),_=e(752),s=e(58296);let g=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[m.MainLayoutModuleContribution,{token:c.IMainLayoutService,useClass:v.LayoutService},{token:c.IViewsRegistry,useClass:s.ViewsRegistry},{token:_.TabbarServiceFactory,useFactory:_.TabbarServiceFactoryFn},{token:p.AccordionServiceFactory,useFactory:h=>(u,d)=>h.get(c.IMainLayoutService).getAccordionService(u,d)}],this.contributionProvider=c.MainLayoutContribution}};t.MainLayoutModule=g,t.MainLayoutModule=g=n.__decorate([(0,r.Injectable)()],g)},5567:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoFocusedInput=void 0;const r=e(85608).__importStar(e(14041)),o=e(97267),c=e(48560),p=e(17793),v=({containerId:m,..._})=>{const s=(0,c.useInjectable)(p.IMainLayoutService),g=(0,r.useRef)(null),l=r.default.useCallback(()=>{g&&g.current&&queueMicrotask(()=>{var h;return(h=g.current)===null||h===void 0?void 0:h.focus()})},[g.current]);return(0,r.useEffect)(()=>{l();const h=s.getTabbarHandler(m),u=h?.onActivate(l);return()=>{u?.dispose()}},[s]),r.default.createElement(o.Input,{ref:g,..._})};t.AutoFocusedInput=v},22537:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LayoutService=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(81878),v=e(95416),m=e(93899),_=e(43718),s=e(52416),g=e(17793),l=e(9522),h=e(752),u=e(58999),d={[c.SlotLocation.left]:{currentId:void 0,size:void 0},[c.SlotLocation.right]:{currentId:"",size:void 0},[c.SlotLocation.bottom]:{currentId:void 0,size:void 0}};let E=class extends c.WithEventBus{constructor(){super(...arguments),this.handleMap=new Map,this.tabbarServices=new Map,this.accordionServices=new Map,this.pendingViewsMap=new Map,this.viewToContainerMap=new Map,this.disposableMap=new Map,this.state={},this.customViews=new Map,this.debug=(0,_.getDebugLogger)(),this.viewReady=new _.Deferred,this.holdTabbarComponent=new Map,this.tabbarUpdateSet=new Set}didMount(){for(const[b,y]of this.pendingViewsMap.entries())y.forEach(({view:A,props:S})=>{this.collectViewComponent(A,b,S)});for(const b of this.contributions.getContributions())b.onDidRender&&b.onDidRender();const a=[];this.tabbarServices.forEach(b=>{c.slotRendererRegistry.isTabbar(b.location)&&b.containersMap.size>0&&a.push(b.viewReady.promise)}),Promise.all(a).then(()=>{this.viewReady.resolve()})}storeState(a,b){this.state[a.location]={currentId:b,size:a.prevSize},this.layoutState.setState(v.LAYOUT_STATE.MAIN,this.state)}onThemeChange(a){var b,y,A,S,w;const T=a.payload.theme;localStorage.setItem("theme",JSON.stringify({menuBarBackground:(b=T.getColor("kt.menubar.background"))===null||b===void 0?void 0:b.toString(),sideBarBackground:(y=T.getColor("sideBar.background"))===null||y===void 0?void 0:y.toString(),editorBackground:(A=T.getColor("editor.background"))===null||A===void 0?void 0:A.toString(),panelBackground:(S=T.getColor("panel.background"))===null||S===void 0?void 0:S.toString(),statusBarBackground:(w=T.getColor("statusBar.background"))===null||w===void 0?void 0:w.toString()}))}initializeLayout(a){this.state=(0,p.fixLayout)(this.layoutState.getState(v.LAYOUT_STATE.MAIN,d));const{currentId:b,size:y}=this.state[a.location]||{};a.prevSize=y;const A=this.determineDefaultContainer(a);this.updateContainerId(a,b,A)}determineDefaultContainer(a){var b,y;const A=((y=(b=a.visibleContainers[0])===null||b===void 0?void 0:b.options)===null||y===void 0?void 0:y.containerId)||"",{defaultPanels:S}=this.appConfig;if(!S)return A;const w=S[a.location];return w?w===void 0?A:this.getRestorePanelContainer(a,w,a.location)||A:""}getRestorePanelContainer(a,b,y){var A;if(a.containersMap.has(b))return b;const S=this.componentRegistry.getComponentRegistryInfo(b);return S&&this.isValidModule(b,y)?((A=S.options)===null||A===void 0?void 0:A.containerId)||"":(this.logger.warn(`[defaultPanels] No \`${b}\` view found!`),"")}isValidModule(a,b){var y;const A=(y=this.appConfig.layoutConfig[b])===null||y===void 0?void 0:y.modules;return A?A.includes(a):!1}updateContainerId(a,b,y){(0,_.isUndefined)(b)?this.handleUndefinedContainer(a,y):b&&!this.isDropContainer(b)?this.handleExistingContainer(a,b,y):a.updateCurrentContainerId(y||"")}handleUndefinedContainer(a,b){(0,_.isUndefined)(b)?a.updateNextContainerId():a.updateCurrentContainerId(b)}handleExistingContainer(a,b,y){if(a.containersMap.has(b)){a.updateCurrentContainerId(b);return}this.findTabbarServiceByContainerId(b)?(this.moveContainerTo(b,a.location),a.updateCurrentContainerId(b)):(a.updateCurrentContainerId(y),a.updateNextContainerId(b))}findTabbarServiceByContainerId(a){let b;for(const y of this.tabbarServices.values())if(y.containersMap.has(a)){b=y;break}return b}moveContainerTo(a,b){var y;const A=this.findTabbarServiceByContainerId(a);if(!A){this.logger.error(`cannot find container: ${a}`);return}const S=A.getContainer(a);if(!S){this.logger.error(`cannot find container: ${a}`);return}if(!(!((y=S.options)===null||y===void 0)&&y.draggable)){this.logger.warn(`container: ${a} is not draggable`);return}const w=this.getTabbarService(b);A.removeContainer(a),(!A.visibleContainers.length||A.currentContainerId.get()===a)&&this.toggleSlot(A.location,!1),w.dynamicAddContainer(a,S);const T=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(w.location)]);this.handleMap.set(a,T)}showDropAreaForContainer(a){const b=this.findTabbarServiceByContainerId(a),y=this.tabbarServices.get("bottom"),A=this.tabbarServices.get("right");if(!b){this.logger.error(`cannot find container: ${a}`);return}b?.location==="right"&&y?.updateCurrentContainerId(g.DROP_BOTTOM_CONTAINER),b?.location==="bottom"&&A?.updateCurrentContainerId(g.DROP_RIGHT_CONTAINER)}hideDropArea(){const a=this.tabbarServices.get("bottom"),b=this.tabbarServices.get("right");a?.currentContainerId.get()===g.DROP_BOTTOM_CONTAINER&&a.updateCurrentContainerId(a.previousContainerId||""),b?.currentContainerId.get()===g.DROP_RIGHT_CONTAINER&&b.updateCurrentContainerId(b.previousContainerId||"")}isVisible(a){return!!this.getTabbarService(a).currentContainerId.get()}isViewVisible(a){const b=this.getTabbarHandler(a);if(!b||!b.isActivated())return!1;const y=b.accordionService.getViewState(a);return!y.collapsed&&!y.hidden}toggleSlot(a,b,y){var A;const S=this.getTabbarService(a);if(!S){this.debug.error(`Unable to switch panels because no TabbarService corresponding to \`${a}\` was found.`);return}b===!0?S.updateCurrentContainerId(this.findNonDropContainerId(S)):b===!1?S.updateCurrentContainerId(""):S.updateCurrentContainerId(S.currentContainerId.get()?"":this.findNonDropContainerId(S)),S.currentContainerId.get()&&y&&((A=S.resizeHandle)===null||A===void 0||A.setSize(y))}isDropContainer(a){return[g.DROP_BOTTOM_CONTAINER,g.DROP_RIGHT_CONTAINER].includes(a)}findNonDropContainerId(a){const b=a.currentContainerId.get();if(b&&!this.isDropContainer(b))return b;if(a.previousContainerId&&!this.isDropContainer(a.previousContainerId))return a.previousContainerId;for(const y of a.containersMap.keys())if(!this.isDropContainer(y))return y;return""}getTabbarService(a){const b=this.tabbarServices.get(a)||this.injector.get(h.TabbarService,[a]);if(!this.tabbarServices.get(a)){b.addDispose(b.onCurrentChange(({currentId:A})=>{if(this.storeState(b,A),this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:A})),A&&g.SUPPORT_ACCORDION_LOCATION.has(b.location)){const S=this.getAccordionService(A);S?.tryUpdateResize(),S?.expandedViews.forEach(w=>{this.eventBus.fire(new c.ExtensionActivateEvent({topic:"onView",data:w.id}))})}})),b.viewReady.promise.then(()=>b.restoreState()).then(()=>this.initializeLayout(b)).catch(A=>{this.logger.error(`[TabbarService:${a}] restore state error`,A)});const y=(0,r.default)(()=>this.storeState(b,b.currentContainerId.get()),100);if(b.addDispose(b.onSizeChange(y)),a===c.SlotLocation.bottom){const A=(0,r.default)(()=>void this.bottomExpanded,100);b.addDispose(b.onSizeChange(()=>A))}this.tabbarServices.set(a,b)}return b}getAllAccordionService(){return this.accordionServices}getAccordionService(a,b){let y=this.accordionServices.get(a);return y||(y=this.injector.get(l.AccordionService,[a,b]),this.accordionServices.set(a,y)),y}getTabbarHandler(a){let b=this.doGetTabbarHandler(a);if(!b){const y=this.viewToContainerMap.get(a);y?b=this.doGetTabbarHandler(y||""):this.debug.warn(`${a} view tabbar not found.`)}return b}getContainer(a){for(const b of this.tabbarServices.values()){const y=b.getContainer(a);if(y)return y}}getExtraTopMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarTopExtra})}getExtraMenu(){return this.contextmenuService.createMenu({id:m.MenuId.ActivityBarExtra})}doGetTabbarHandler(a){let b=this.handleMap.get(a);if(!b){let y;for(const A of this.tabbarServices.values())if(A.getContainer(a)){y=A.location;break}y&&(b=this.injector.get(u.TabBarHandler,[a,this.getTabbarService(y)]),this.handleMap.set(a,b))}return b}collectTabbarComponent(a,b,y,A){if(A&&this.debug.warn("collectTabbarComponent api warning: Please move react component into options.component!"),b.hideIfEmpty&&!a.length&&!b.component){this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}),this.tabbarUpdateSet.has(b.containerId)&&this.tryUpdateTabbar(b.containerId);const w=this.getAccordionService(b.containerId);return w.addDispose(w.onBeforeAppendViewEvent(()=>{this.tryUpdateTabbar(b.containerId)})),w.addDispose(w.onAfterDisposeViewEvent(()=>{w.views.length===0&&(this.disposeContainer(b.containerId),this.holdTabbarComponent.set(b.containerId,{views:a,options:b,side:y}))})),b.containerId}return this.getTabbarService(y).registerContainer(b.containerId,{views:a,options:b}),a.forEach(w=>{this.viewToContainerMap.set(w.id,b.containerId)}),b.containerId}getViewAccordionService(a){const b=this.viewToContainerMap.get(a);if(b)return this.getAccordionService(b)}collectViewComponent(a,b,y={},A){this.customViews.set(a.id,a),this.viewToContainerMap.set(a.id,b);const S=this.getAccordionService(b);return y&&(a.initialProps=y),S.appendView(a,A?.isReplace),S.views.length===1&&(this.tabbarUpdateSet.add(b),this.tryUpdateTabbar(b)),A?.fromExtension&&this.disposableMap.set(a.id,this.commandRegistry.registerCommand({id:`${a.id}.focus`},{execute:async()=>(await this.ensureViewReady(a.id),this.commandService.executeCommand(`workbench.view.extension.${b}`,{forceShow:!0}))})),b}ensureViewReady(a){const b=this.viewToContainerMap.get(a),y=new _.Deferred,A=this.getAccordionService(b);return A.visibleViews.get().find(S=>S.id===a)?y.resolve():A.addDispose(A.onAfterAppendViewEvent(S=>{S===a&&y.resolve()})),y.promise}tryUpdateTabbar(a){const b=this.holdTabbarComponent.get(a);b&&(this.getTabbarService(b.side).registerContainer(a,{views:b.views,options:b.options}),this.tabbarUpdateSet.delete(a),this.holdTabbarComponent.delete(a))}replaceViewComponent(a,b){const y=this.viewToContainerMap.get(a.id);if(!y){this.debug.warn(`The container corresponding to \`${a.id}\` was not found, please check the incoming parameters!`);return}const A=this.customViews.get(a.id);A&&(a=Object.assign(A,a)),this.collectViewComponent(a,y,b,{isReplace:!0})}disposeViewComponent(a){const b=this.disposableMap.get(a);b&&b.dispose();const y=this.viewToContainerMap.get(a);if(!y){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(y).disposeView(a)}revealView(a){const b=this.viewToContainerMap.get(a);if(!b){this.debug.warn(`The container corresponding to \`${a}\` was not found, please check the incoming parameters!`);return}this.getAccordionService(b).revealView(a)}disposeContainer(a){let b;for(const y of this.tabbarServices.values())if(y.getContainer(a)){b=y.location;break}b?this.getTabbarService(b).disposeContainer(a):this.debug.warn(`The Tabbar to the \`${a}\` was not found.`)}expandBottom(a){const b=this.getTabbarService(c.SlotLocation.bottom);b.currentContainerId.get()||b.updateCurrentContainerId(b.currentContainerId.get()||b.previousContainerId||b.containersMap.keys().next().value),b.doExpand(a),this.contextKeyService.createKey("bottomFullExpanded",b.isExpanded)}get bottomExpanded(){const a=this.getTabbarService(c.SlotLocation.bottom);return this.contextKeyService.createKey("bottomFullExpanded",a.isExpanded),a.isExpanded}};t.LayoutService=E,n.__decorate([(0,o.Autowired)(o.INJECTOR_TOKEN),n.__metadata("design:type",o.Injector)],E.prototype,"injector",void 0),n.__decorate([(0,o.Autowired)(g.MainLayoutContribution),n.__metadata("design:type",Object)],E.prototype,"contributions",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menus",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandService),n.__metadata("design:type",Object)],E.prototype,"commandService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(c.AppConfig),n.__metadata("design:type",Object)],E.prototype,"appConfig",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(c.ComponentRegistry),n.__metadata("design:type",Object)],E.prototype,"componentRegistry",void 0),n.__decorate([(0,o.Autowired)(c.ILogger),n.__metadata("design:type",Object)],E.prototype,"logger",void 0),n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"contextmenuService",void 0),n.__decorate([(0,c.OnEvent)(s.ThemeChangedEvent),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[s.ThemeChangedEvent]),n.__metadata("design:returntype",void 0)],E.prototype,"onThemeChange",null),t.LayoutService=E=n.__decorate([(0,o.Injectable)()],E)},53576:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MainLayoutModuleContribution=t.RETRACT_BOTTOM_PANEL=t.EXPAND_BOTTOM_PANEL=t.IS_VISIBLE_RIGHT_PANEL_COMMAND=t.IS_VISIBLE_LEFT_PANEL_COMMAND=t.IS_VISIBLE_BOTTOM_PANEL_COMMAND=t.TOGGLE_BOTTOM_PANEL_COMMAND=t.SHOW_BOTTOM_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSEPANEL=t.HIDE_BOTTOM_PANEL_COMMAND=t.TOGGLE_RIGHT_PANEL_COMMAND=t.SHOW_RIGHT_PANEL_COMMAND=t.HIDE_RIGHT_PANEL_COMMAND=t.TOGGLE_LEFT_PANEL_COMMAND=t.SHOW_LEFT_PANEL_COMMAND=t.WORKBENCH_ACTION_CLOSESIDECAR=t.HIDE_LEFT_PANEL_COMMAND=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(30144),p=e(68456),v=e(95416),m=e(93899),_=e(43718),s=e(92323),g=e(17793),l=e(45395),h=e(68988),u=e(19951);t.HIDE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.hide",label:"%main-layout.left-panel.hide%"},t.WORKBENCH_ACTION_CLOSESIDECAR={id:"workbench.action.closeSidebar",label:"%main-layout.sidebar.hide%"},t.SHOW_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.show",label:"%main-layout.left-panel.show%"},t.TOGGLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.toggle",label:"%main-layout.left-panel.toggle%"},t.HIDE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.hide",label:"%main-layout.right-panel.hide%"},t.SHOW_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.show",label:"%main-layout.right-panel.show%"},t.TOGGLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.toggle",label:"%main-layout.right-panel.toggle%"},t.HIDE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.hide",label:"%main-layout.bottom-panel.hide%"},t.WORKBENCH_ACTION_CLOSEPANEL={id:"workbench.action.closePanel",delegate:t.HIDE_BOTTOM_PANEL_COMMAND.id},t.SHOW_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.show",label:"%main-layout.bottom-panel.show%"},t.TOGGLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.toggle",iconClass:(0,o.getIcon)("minus"),label:"%layout.tabbar.toggle%"},t.IS_VISIBLE_BOTTOM_PANEL_COMMAND={id:"main-layout.bottom-panel.is-visible"},t.IS_VISIBLE_LEFT_PANEL_COMMAND={id:"main-layout.left-panel.is-visible"},t.IS_VISIBLE_RIGHT_PANEL_COMMAND={id:"main-layout.right-panel.is-visible"},t.EXPAND_BOTTOM_PANEL={id:"main-layout.bottom-panel.expand",label:"%layout.tabbar.expand%",iconClass:(0,o.getIcon)("expand")},t.RETRACT_BOTTOM_PANEL={id:"main-layout.bottom-panel.retract",label:"%layout.tabbar.retract%",iconClass:(0,o.getIcon)("shrink")};let d=class extends _.WithEventBus{async initialize(){await this.layoutState.initStorage();const f=this.contributionProvider.getContributions();for(const y of f)y.registerComponent&&y.registerComponent(this.componentRegistry);const a=this.rendererContributionProvider.getContributions();for(const y of a)y.registerRenderer&&y.registerRenderer(o.slotRendererRegistry);const b=this.toolBarContributionProvider.getContributions();for(const y of b)y.registerToolbarItems&&y.registerToolbarItems(this.toolBarRegistry)}registerComponent(f){f.register(g.DROP_RIGHT_CONTAINER,[],{component:l.RightDropArea,hideTab:!0,containerId:g.DROP_RIGHT_CONTAINER}),f.register(g.DROP_BOTTOM_CONTAINER,[],{component:l.BottomDropArea,hideTab:!0,containerId:g.DROP_BOTTOM_CONTAINER})}async onStart(){this.registerSideToggleKey()}async onDidStart(){this.mainLayoutService.didMount()}registerRenderer(f){f.registerSlotRenderer(o.SlotLocation.right,u.RightTabRenderer),f.registerSlotRenderer(o.SlotLocation.left,u.LeftTabRenderer),f.registerSlotRenderer(o.SlotLocation.bottom,u.BottomTabRenderer)}registerCommands(f){f.registerCommand(t.HIDE_LEFT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1)}}),f.registerCommand(t.SHOW_LEFT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,!0,a)}}),f.registerCommand(t.TOGGLE_LEFT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.left,a,b)}}),f.registerCommand(t.HIDE_RIGHT_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)}}),f.registerCommand(t.SHOW_RIGHT_PANEL_COMMAND,{execute:a=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,!0,a)}}),f.registerCommand(t.TOGGLE_RIGHT_PANEL_COMMAND,{execute:(a,b)=>{this.mainLayoutService.toggleSlot(o.SlotLocation.right,a,b)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSESIDECAR,{execute:()=>Promise.all([this.mainLayoutService.toggleSlot(o.SlotLocation.left,!1),this.mainLayoutService.toggleSlot(o.SlotLocation.right,!1)])}),f.registerCommand(t.SHOW_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!0)}}),f.registerCommand(t.HIDE_BOTTOM_PANEL_COMMAND,{execute:()=>{this.mainLayoutService.toggleSlot(o.SlotLocation.bottom,!1)}}),f.registerCommand(t.WORKBENCH_ACTION_CLOSEPANEL),f.registerCommand(t.IS_VISIBLE_BOTTOM_PANEL_COMMAND,{execute:()=>this.mainLayoutService.getTabbarService("bottom").currentContainerId.get()!==""}),f.registerCommand(t.IS_VISIBLE_LEFT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand(t.IS_VISIBLE_RIGHT_PANEL_COMMAND,{execute:()=>this.mainLayoutService.isVisible(o.SlotLocation.left)}),f.registerCommand({id:"view.outward.right-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.right-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.right-panel.toggle",!0,a)}}),f.registerCommand({id:"view.outward.left-panel.hide"},{execute:()=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!1)}}),f.registerCommand({id:"view.outward.left-panel.show"},{execute:a=>{this.commandService.executeCommand("main-layout.left-panel.toggle",!0,a)}}),f.registerCommand({id:o.LAYOUT_COMMANDS.MAXIMIZE_EDITOR.id},{execute:()=>{this.commandService.executeCommand(t.TOGGLE_RIGHT_PANEL_COMMAND.id,!1),this.commandService.executeCommand(t.TOGGLE_LEFT_PANEL_COMMAND.id,!1)}}),f.registerCommand(o.LAYOUT_COMMANDS.OPEN_VIEW,{execute:()=>{this.commandService.executeCommand(o.QUICK_OPEN_COMMANDS.OPEN_VIEW.id)}})}registerMenus(f){f.registerMenuItem(m.MenuId.ActivityBarExtra,{submenu:m.MenuId.SettingsIconMenu,iconClass:(0,o.getIcon)("setting"),label:(0,_.localize)("layout.tabbar.setting"),order:1,group:"navigation"}),Object.entries({[o.SlotLocation.left]:[c.EXPLORER_CONTAINER_ID,c.SEARCH_CONTAINER_ID,c.SCM_CONTAINER_ID,c.DEBUG_CONTAINER_ID,c.EXTENSION_CONTAINER_ID],[o.SlotLocation.bottom]:[c.MARKER_CONTAINER_ID,c.OUTPUT_CONTAINER_ID,c.DEBUG_CONSOLE_CONTAINER_ID,c.TERMINAL_CONTAINER_ID]}).forEach(([a,b],y)=>{const A=this.mainLayoutService.getTabbarService(a);A.viewReady.promise.then(()=>{b.forEach(S=>{var w,T;const D=A.getContainer(S);D&&f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:`container.toggle.${S}`,label:(T=(w=D.options)===null||w===void 0?void 0:w.title)!==null&&T!==void 0?T:S},group:`${3+y}_${a}`})})})}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_LEFT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_RIGHT_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.TOGGLE_BOTTOM_PANEL_COMMAND,group:"5_panel"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.EXPAND_BOTTOM_PANEL,group:"5_panel",when:"!bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:t.RETRACT_BOTTOM_PANEL,group:"5_panel",when:"bottomFullExpanded"}),f.registerMenuItem(m.MenuId.MenubarViewMenu,{command:{id:o.EDITOR_COMMANDS.TOGGLE_WORD_WRAP.id,label:"%preference.editor.wordWrap%"},group:"6_capability",toggledWhen:"config.editor.wordWrap == on"})}registerSideToggleKey(){this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+b",command:t.TOGGLE_LEFT_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+j",command:t.TOGGLE_BOTTOM_PANEL_COMMAND.id}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.EXPAND_BOTTOM_PANEL.id,when:"!bottomFullExpanded"}),this.keybindingRegistry.registerKeybinding({keybinding:"ctrlcmd+shift+j",command:t.RETRACT_BOTTOM_PANEL.id,when:"bottomFullExpanded"})}registerQuickOpenHandlers(f){f.registerHandler(this.quickOpenViewHandler,{title:(0,_.localize)("layout.action.openView"),commandId:o.LAYOUT_COMMANDS.QUICK_OPEN_VIEW.id,order:5,hideTab:!0})}};t.MainLayoutModuleContribution=d,n.__decorate([(0,r.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],d.prototype,"mainLayoutService",void 0),n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],d.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(_.IEventBus),n.__metadata("design:type",Object)],d.prototype,"eventBus",void 0),n.__decorate([(0,r.Autowired)(p.ComponentContribution),n.__metadata("design:type",Object)],d.prototype,"contributionProvider",void 0),n.__decorate([(0,r.Autowired)(o.SlotRendererContribution),n.__metadata("design:type",Object)],d.prototype,"rendererContributionProvider",void 0),n.__decorate([(0,r.Autowired)(p.ComponentRegistry),n.__metadata("design:type",Object)],d.prototype,"componentRegistry",void 0),n.__decorate([(0,r.Autowired)(s.CommandService),n.__metadata("design:type",Object)],d.prototype,"commandService",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",v.LayoutState)],d.prototype,"layoutState",void 0),n.__decorate([(0,r.Autowired)(p.TabBarToolbarContribution),n.__metadata("design:type",Object)],d.prototype,"toolBarContributionProvider",void 0),n.__decorate([(0,r.Autowired)(),n.__metadata("design:type",p.ToolbarRegistry)],d.prototype,"toolBarRegistry",void 0),n.__decorate([(0,r.Autowired)(o.KeybindingRegistry),n.__metadata("design:type",Object)],d.prototype,"keybindingRegistry",void 0),n.__decorate([(0,r.Autowired)(h.ViewQuickOpenHandler),n.__metadata("design:type",h.ViewQuickOpenHandler)],d.prototype,"quickOpenViewHandler",void 0),t.MainLayoutModuleContribution=d=n.__decorate([(0,_.Domain)(s.CommandContribution,o.ClientAppContribution,o.SlotRendererContribution,m.MenuContribution,o.QuickOpenContribution,p.ComponentContribution)],d)},68988:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewQuickOpenItem=t.ContainerQuickOpenItem=t.ViewQuickOpenHandler=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(74404),p=e(17793);let v=class{constructor(){this.prefix="view ",this.description=(0,o.localize)("layout.action.openView")}getModel(){return{onType:(g,l)=>l(this.getViewQuickOpenItems())}}getViewQuickOpenItems(){var g;const l=this.layoutService.getAllAccordionService(),h=Array.from(l.keys());let u=[];u=u.concat(h.map((d,E)=>this.injector.get(m,[d,{groupLabel:E===0?(0,o.localize)("layout.openView.containerTitle"):"",showBorder:!1}])));for(const d of h){const E=(g=l.get(d))===null||g===void 0?void 0:g.views;if(E)for(let f=0,a=E.length;f<a;f++)u.push(this.injector.get(_,[d,E[f],{groupLabel:f===0?(0,o.formatLocalize)("layout.openView.viewTitle",String(d).toUpperCase()):"",showBorder:!1}]))}return u}getOptions(){return{}}onClose(){}};t.ViewQuickOpenHandler=v,n.__decorate([(0,r.Autowired)(c.PrefixQuickOpenService),n.__metadata("design:type",Object)],v.prototype,"quickOpenService",void 0),n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),n.__decorate([(0,r.Autowired)(r.INJECTOR_TOKEN),n.__metadata("design:type",r.Injector)],v.prototype,"injector",void 0),t.ViewQuickOpenHandler=v=n.__decorate([(0,r.Injectable)()],v);let m=class extends c.QuickOpenItem{constructor(g,l){super(l),this.containerId=g,this.options=l}getLabel(){return String(this.containerId).toLocaleUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l?.activate(),!0}};t.ContainerQuickOpenItem=m,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],m.prototype,"layoutService",void 0),t.ContainerQuickOpenItem=m=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[Object,Object])],m);let _=class extends c.QuickOpenItem{constructor(g,l,h){super(h),this.containerId=g,this.view=l,this.options=h}getLabel(){var g;return(g=this.view.name)===null||g===void 0?void 0:g.toUpperCase()}isHidden(){return super.isHidden()}run(g){if(g!==c.Mode.OPEN)return!1;const l=this.layoutService.getTabbarHandler(this.containerId);return l&&(l.activate(),l.isCollapsed(this.view.id)&&l?.setCollapsed(this.view.id,!1)),!0}};t.ViewQuickOpenItem=_,n.__decorate([(0,r.Autowired)(p.IMainLayoutService),n.__metadata("design:type",Object)],_.prototype,"layoutService",void 0),t.ViewQuickOpenItem=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,Object,Object])],_)},58999:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabBarHandler=void 0;const n=e(85608),r=e(76003),o=e(43718),c=e(17793),p=e(752);let v=class{constructor(_,s){this.containerId=_,this.tabbarService=s,this.onActivateEmitter=new o.Emitter,this.onActivate=this.onActivateEmitter.event,this.onInActivateEmitter=new o.Emitter,this.onInActivate=this.onInActivateEmitter.event,this.onCollapseEmitter=new o.Emitter,this.onCollapse=this.onCollapseEmitter.event,this.isVisible=!1,this.accordionService=this.layoutService.getAccordionService(this.containerId),s.currentContainerId.get()===this.containerId&&(this.onActivateEmitter.fire(),this.isVisible=!0),this.tabbarService.onCurrentChange(g=>{g.currentId===this.containerId?(this.onActivateEmitter.fire(),this.isVisible=!0):g.previousId===this.containerId&&(this.onInActivateEmitter.fire(),this.isVisible=!1)})}dispose(){this.tabbarService.containersMap.delete(this.containerId),this.tabbarService.disposeContainer(this.containerId)}disposeView(_){this.layoutService.disposeViewComponent(_)}activate(){this.tabbarService.updateCurrentContainerId(this.containerId)}deactivate(){this.tabbarService.updateCurrentContainerId("")}isActivated(){return this.tabbarService.currentContainerId.get()===this.containerId}show(){this.tabbarService.showContainer(this.containerId)}hide(){this.tabbarService.hideContainer(this.containerId)}setTitleComponent(_,s){const g=this.tabbarService.getContainer(this.containerId);g&&g.options&&(g.options.titleProps=s,g.options.titleComponent=_,g.fireChange(g))}setSize(_){this.layoutService.toggleSlot(this.tabbarService.location,!0,_+this.tabbarService.getBarSize())}setBadge(_){this.tabbarService.updateBadge(this.containerId,_)}getBadge(){return this.tabbarService.getContainer(this.containerId).options.badge}setIconClass(_){this.tabbarService.getContainer(this.containerId).options.iconClass=_}isCollapsed(_){return this.accordionService.getViewState(_).collapsed}setCollapsed(_,s){this.accordionService.toggleOpen(_,s)}toggleViews(_,s){for(const g of _){const l=this.accordionService.getViewState(g);this.accordionService.updateViewState(g,{...l,hidden:!s})}}updateViewTitle(_,s){this.accordionService.updateViewTitle(_,s)}updateViewDescription(_,s){this.accordionService.updateViewDesciption(_,s)}updateViewMessage(_,s){this.accordionService.updateViewMessage(_,s)}updateTitle(_){this.tabbarService.updateTitle(this.containerId,_)}setResizeLock(_){this.tabbarService.resizeHandle.lockSize(_)}};t.TabBarHandler=v,n.__decorate([(0,r.Autowired)(c.IMainLayoutService),n.__metadata("design:type",Object)],v.prototype,"layoutService",void 0),t.TabBarHandler=v=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String,p.TabbarService])],v)},46245:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChatTabbarRenderer2=t.BottomTabbarRenderer=t.LeftTabbarRenderer=t.RightTabbarRenderer=t.TextElipses=t.IconElipses=t.TextTabView=t.IconTabView=t.TabbarViewBase=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(97267),p=e(41869),v=e(25918),m=e(25719),_=e(63373),s=e(68969),g=e(17793),l=e(19951),h=n.__importDefault(e(5330)),u=e(752);function d(I,O){return O>=I.length?[I,[]]:O<=1?[[],I]:[I.slice(0,O-1),I.slice(O-1)]}function E(I){return typeof I=="string"?parseInt(I,10)>99?"99+":I:typeof I=="object"&&I.value?I.value>99?"99+":I.value:""}const f=I=>{var O;const{TabView:M,MoreTabView:R,forbidCollapse:P,barSize:k=48,panelBorderSize:F=0,tabClassName:L,className:B,margin:j,tabSize:W,canHideTabbar:U,renderOtherVisibleContainers:Q=()=>null,disableAutoAdjust:V}=I,{side:$,direction:Y,fullSize:z}=o.default.useContext(l.TabbarConfig),H=(0,p.useInjectable)(u.TabbarServiceFactory)($),K=(0,p.useDesignStyles)(h.default.tab_bar,"tab_bar"),Z=(0,p.useDesignStyles)(h.default.bar_content,"bar_content");o.default.useEffect(()=>{H.updateBarSize(k+F)},[]);const X=(0,p.useAutorun)(H.currentContainerId),ie=(0,p.usePreference)("workbench.hideSlotTabBarWhenHidePanel",!1),oe=U&&ie;oe&&!X&&((O=H.resizeHandle)===null||O===void 0||O.setSize(0));const le=V?Number.MAX_SAFE_INTEGER:Math.floor(z-(j||0)/W),[pe,q]=d(H.visibleContainers.filter(_e=>{var te;return!(!((te=_e.options)===null||te===void 0)&&te.hideTab)}),le);q.forEach(_e=>{H.updateTabInMoreKey(_e.options.containerId,!0)});const Ee=o.default.useCallback((_e,te,ge,Te)=>{var Pe,Ae,we;const be=(Pe=_e.options)===null||Pe===void 0?void 0:Pe.containerId;if(!be||Te&&(!((we=(Ae=_e.options)===null||Ae===void 0?void 0:Ae.hideLocationTab)===null||we===void 0)&&we.includes(Te)))return null;te.updateTabInMoreKey(be,!1);let fe;return o.default.createElement("li",{draggable:!0,onDragStart:xe=>{if(fe){const Re=fe.cloneNode(!0);Re.classList.add(h.default.dragging),L&&(0,p.addClassName)(Re,L),document.body.appendChild(Re),xe.persist(),requestAnimationFrame(()=>{xe.dataTransfer.setDragImage(Re,0,0),document.body.removeChild(Re)})}te.handleDragStart(xe,be)},onDragOver:xe=>{xe.preventDefault(),fe&&fe.classList.add("on-drag-over")},onDragLeave:()=>{fe&&fe.classList.remove("on-drag-over")},onDrop:xe=>{fe&&fe.classList.remove("on-drag-over"),te.handleDrop(xe,be)},onDragEnd:xe=>{te.handleDragEnd(xe)},key:be,id:be,onContextMenu:xe=>te.handleContextMenu(xe,be),onClick:xe=>te.handleTabClick(xe,oe||P),ref:xe=>fe=xe,className:(0,r.default)({active:ge===be},L)},o.default.createElement(M,{component:_e}))},[]);return o.default.createElement("div",{className:(0,r.default)([K,B])},o.default.createElement("div",{className:Z,style:{flexDirection:m.Layout.getTabbarDirection(Y)}},pe.map(_e=>Ee(_e,H,X,$)),Q({props:I,renderContainers:Ee}),q.length?o.default.createElement("li",{key:"tab-more",onClick:_e=>{var te;return H.showMoreMenu(_e,pe[pe.length-1]&&((te=pe[pe.length-1].options)===null||te===void 0?void 0:te.containerId))},className:L},o.default.createElement(R,null)):null))};t.TabbarViewBase=f;const a=({component:I})=>{var O,M,R;const P=(0,p.useInjectable)(s.IProgressService),k=(0,p.useInjectable)(p.KeybindingRegistry),F=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab"),[L,B]=o.default.useState(I),j=P.getIndicator(((O=L.options)===null||O===void 0?void 0:O.containerId)||""),W=(0,p.useAutorun)(j.progressModel.show),U=o.default.useMemo(()=>{const Q=L.options;return Q?.activateKeyBinding?`${Q?.title} (${k.acceleratorForKeyString(Q.activateKeyBinding,"+")})`:Q?.title},[L]);return(0,o.useEffect)(()=>{const Q=L.onChange(V=>{B({...V})});return()=>{Q.dispose()}},[L]),o.default.createElement("div",{className:F},o.default.createElement("div",{className:(0,r.default)((M=L.options)===null||M===void 0?void 0:M.iconClass,"activity-icon"),title:U}),W?o.default.createElement(c.Badge,{className:h.default.tab_badge},o.default.createElement("span",{className:h.default.icon_wrapper},o.default.createElement(c.Icon,{icon:"time-circle"}))):((R=L.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(L.options.badge)))};t.IconTabView=a;const b=({component:I})=>{var O,M,R;const[P,k]=o.default.useState(I);return(0,o.useEffect)(()=>{const F=P.onChange(L=>{k({...L})});return()=>{F.dispose()}},[P]),o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},(M=(O=P.options)===null||O===void 0?void 0:O.title)===null||M===void 0?void 0:M.toUpperCase()),((R=P.options)===null||R===void 0?void 0:R.badge)&&o.default.createElement(c.Badge,{className:h.default.tab_badge},E(P.options.badge)))};t.TextTabView=b;const y=()=>{const I=(0,p.useDesignStyles)(h.default.icon_tab,"icon_tab");return o.default.createElement("div",{className:I},o.default.createElement("div",{className:(0,r.default)((0,p.getIcon)("ellipsis"),"activity-icon"),title:"extra tabs"}))};t.IconElipses=y;const A=()=>o.default.createElement("div",{className:h.default.text_tab},o.default.createElement("div",{className:h.default.bottom_tab_title},o.default.createElement("i",{className:(0,p.getIcon)("doubleright")})));t.TextElipses=A;const S=I=>{const{barSize:O=48,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R),k=(0,p.useDesignStyles)(h.default.right_tab_bar,"right_tab_bar"),F=(0,p.useDesignStyles)(h.default.right_tab,"right_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.RIGHT_TABBAR,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.RightTabbarRenderer=S;const w=({renderOtherVisibleContainers:I,isRenderExtraTopMenus:O=!0,renderExtraMenus:M,tabbarViewProps:R})=>{const{side:P}=o.default.useContext(l.TabbarConfig),k=(0,p.useInjectable)(g.IMainLayoutService),F=(0,p.useInjectable)(u.TabbarServiceFactory)(P),L=o.default.useMemo(()=>k.getExtraTopMenu(),[k]),B=o.default.useMemo(()=>k.getExtraMenu(),[k]),j=(0,p.useDesignStyles)(h.default.left_tab_bar,"left_tab_bar"),W=(0,p.useDesignStyles)(h.default.left_tab,"left_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.LEFT_TABBAR,className:j,onContextMenu:F.handleContextMenu},O&&o.default.createElement(v.InlineMenuBar,{className:(0,r.default)(h.default.vertical_icons,h.default.extra_top_menus),menus:L}),o.default.createElement(t.TabbarViewBase,{tabSize:48,MoreTabView:t.IconElipses,className:h.default.left_tab_content,tabClassName:W,TabView:t.IconTabView,barSize:48,margin:90,panelBorderSize:1,renderOtherVisibleContainers:I,...R}),M||o.default.createElement(v.InlineMenuBar,{className:h.default.vertical_icons,menus:B}))};t.LeftTabbarRenderer=w;const T=()=>{const{side:I}=o.default.useContext(l.TabbarConfig),O=(0,p.useInjectable)(u.TabbarServiceFactory)(I),M=(0,p.useDesignStyles)(h.default.bottom_bar_container,"bottom_bar_container"),R=(0,p.useDesignStyles)(h.default.bottom_tab,"bottom_tab");return o.default.createElement("div",{id:_.VIEW_CONTAINERS.BOTTOM_TABBAR,onContextMenu:O.handleContextMenu,className:(0,r.default)(M,"next_bottom_bar")},o.default.createElement(t.TabbarViewBase,{tabSize:80,MoreTabView:t.TextElipses,tabClassName:R,TabView:t.TextTabView,barSize:24,panelBorderSize:1,canHideTabbar:!0}))};t.BottomTabbarRenderer=T;const D=I=>{const{barSize:O=32,style:M}=I,{side:R}=o.default.useContext(l.TabbarConfig),P=(0,p.useInjectable)(u.TabbarServiceFactory)(R);(0,o.useEffect)(()=>{P.setIsLatter(!0)},[P]);const k=(0,p.useDesignStyles)(h.default.ai_right_tab_bar,"ai_right_tab_bar"),F=(0,p.useDesignStyles)(h.default.ai_right_tab,"ai_right_tab");return o.default.createElement("div",{id:R,className:k,style:M,onContextMenu:P.handleContextMenu},o.default.createElement(t.TabbarViewBase,{tabSize:32,MoreTabView:t.IconElipses,tabClassName:F,TabView:t.IconTabView,barSize:O,panelBorderSize:1}))};t.ChatTabbarRenderer2=D},66368:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabPanelRenderer=t.LeftTabPanelRenderer=t.RightTabPanelRenderer=t.ContainerView=t.BaseTabPanelView=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(76003),p=e(41869),v=e(25918),m=e(1149),_=e(68969),s=e(68974),g=e(9522),l=e(70936),h=e(91527),u=e(19951),d=n.__importDefault(e(5330)),E=e(752),f=o.default.memo(({children:I})=>I,(I,O)=>!(I.visible||O.visible)),a={display:"block"},b={display:"none"},y=I=>{const{PanelView:O,panelSize:M,id:R,PanelViewProps:P}=I,{side:k}=o.default.useContext(u.TabbarConfig),F=(0,p.useInjectable)(p.AppConfig),L=F.panelSizes&&F.panelSizes[k],B=(0,p.useInjectable)(E.TabbarServiceFactory)(k),j=(0,p.useAutorun)(B.currentContainerId),W=(0,p.useDesignStyles)(d.default.tab_panel,"tab_panel"),U=(0,p.useDesignStyles)(d.default.tab_panel_hidden,"tab_panel_hidden");return o.default.useEffect(()=>{B.updatePanelSize(L||M||335)},[]),o.default.createElement("div",{id:R,className:(0,r.default)("kt-tab-panel",W,{[U]:!j})},B.visibleContainers.map(Q=>{var V;const $=(V=Q.options)===null||V===void 0?void 0:V.containerId;if(!$)return null;const Y=B.getTitleToolbarMenu($);return o.default.createElement("div",{key:$,className:(0,r.default)(d.default.panel_wrap,$),"data-viewlet-id":$,style:j===$?a:b,id:R},o.default.createElement(p.ErrorBoundary,null,o.default.createElement(f,{visible:j===$},o.default.createElement(O,{titleMenu:Y,side:k,component:Q,...P}))))}))};t.BaseTabPanelView=y;const A=({component:I,titleMenu:O,side:M,renderContainerWrap:R,className:P,customTitleBar:k})=>{var F,L;const B=o.default.useRef(),j=o.default.useRef(null),W=(0,p.useInjectable)(p.AppConfig),{title:U,titleComponent:Q,component:V,containerId:$,draggable:Y}=I.options||{},z=(0,p.useInjectable)(c.INJECTOR_TOKEN),H=(0,p.useInjectable)(m.LayoutViewSizeConfig),K=(0,o.useCallback)(le=>{z.get(g.AccordionServiceFactory)($).handleContextMenu(le)},[$]);if(!$)return null;const X=(0,p.useInjectable)(_.IProgressService).getIndicator($);if(!X)return null;const ie=(0,p.useViewState)(M,j),oe=o.default.useCallback(le=>R?R({children:le}):le,[R]);return o.default.createElement("div",{ref:j,className:(0,r.default)(d.default.view_container,P)},!!k&&k,!V&&o.default.createElement("div",{onContextMenu:K,className:d.default.panel_titlebar},U?o.default.createElement(h.TitleBar,{containerId:$,side:M,title:U,draggable:Y,height:H.panelTitleBarHeight,menubar:o.default.createElement(v.InlineActionBar,{menus:O})}):null,Q&&o.default.createElement("div",{className:d.default.panel_component},o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{Component:Q,initialProps:(F=I.options)===null||F===void 0?void 0:F.titleProps})))),o.default.createElement("div",{className:d.default.container_wrap,ref:le=>B.current=le},o.default.createElement(s.ProgressBar,{progressModel:X.progressModel}),oe(V?o.default.createElement(p.ConfigProvider,{value:W},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:ie,...(L=I.options)===null||L===void 0?void 0:L.initialProps},Component:V})):o.default.createElement(l.AccordionContainer,{views:I.views,minSize:I.options.miniSize,containerId:I.options.containerId}))))};t.ContainerView=A;const S=({component:I,titleMenu:O,side:M})=>{var R,P,k,F;const L=o.default.useRef(),B=o.default.useRef(null),j=(0,p.useInjectable)(p.AppConfig),W=(0,p.useInjectable)(E.TabbarServiceFactory)(M),U=(0,p.useDesignStyles)(d.default.panel_title_bar,"panel_title_bar"),Q=(0,p.useDesignStyles)(d.default.panel_toolbar_container,"panel_toolbar_container"),V=(0,p.useViewState)(M,B),$=(0,p.useInjectable)(m.LayoutViewSizeConfig),Y=(0,p.useInjectable)(_.IProgressService),{component:z,containerId:H}=I.options||{},K=I.options&&I.options.titleComponent;if(!H)return null;const Z=Y.getIndicator(H);return Z?o.default.createElement("div",{ref:B,className:d.default.panel_container},o.default.createElement("div",{className:U,style:{height:$.panelTitleBarHeight}},o.default.createElement("h1",null,(P=(R=I.options)===null||R===void 0?void 0:R.title)===null||P===void 0?void 0:P.toUpperCase()),o.default.createElement("div",{className:d.default.title_component_container},K&&o.default.createElement(p.ComponentRenderer,{Component:K,initialProps:(k=I.options)===null||k===void 0?void 0:k.titleProps})),o.default.createElement("div",{className:Q},O&&o.default.createElement(v.InlineActionBar,{menus:O}),o.default.createElement(v.InlineMenuBar,{menus:W.commonTitleMenu,moreAtFirst:!0}))),o.default.createElement("div",{className:d.default.container_wrap,ref:X=>L.current=X},o.default.createElement(s.ProgressBar,{progressModel:Z.progressModel}),z?o.default.createElement(p.ConfigProvider,{value:j},o.default.createElement(p.ComponentRenderer,{initialProps:{viewState:V,...(F=I.options)===null||F===void 0?void 0:F.initialProps},Component:z})):o.default.createElement(l.AccordionContainer,{views:I.views,alignment:"horizontal",minSize:I.options.miniSize,containerId:I.options.containerId}))):null},w=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.RightTabPanelRenderer=w;const T=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:t.ContainerView});t.LeftTabPanelRenderer=T;const D=()=>o.default.createElement(t.BaseTabPanelView,{PanelView:S,panelSize:280});t.BottomTabPanelRenderer=D},19951:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BottomTabRenderer=t.LeftTabRenderer=t.RightTabRenderer=t.TabRendererBase=t.TabbarConfig=void 0;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importStar(e(14041)),c=e(41869),p=e(81878),v=e(25719),m=e(63373),_=e(46245),s=e(66368),g=n.__importDefault(e(5330)),l=e(752);t.TabbarConfig=(0,o.createContext)({side:c.SlotLocation.left,direction:"left-to-right",fullSize:0}),t.TabRendererBase=(0,o.memo)(({id:E,className:f,components:a,direction:b="left-to-right",TabbarView:y,side:A,TabpanelView:S})=>{const w=(0,c.useInjectable)(l.TabbarServiceFactory)(A),T=(0,c.useInjectable)(c.IEventBus),D=(0,o.useContext)(p.PanelContext),I=(0,o.useRef)(null),[O,M]=(0,o.useState)(0);(0,o.useLayoutEffect)(()=>{w.registerResizeHandle(D),a.forEach(P=>{w.registerContainer(P.options.containerId,P)}),w.updatePanelVisibility(),w.ensureViewReady()},[a]);const R=(0,o.useCallback)(()=>{I.current&&M(I.current[v.Layout.getDomSizeProperty(b)])},[]);return(0,o.useEffect)(()=>{c.fastdom.measure(()=>{R()});let P;T.onDirective(c.ResizeEvent.createDirective(A),()=>{P&&P.dispose(),P=c.fastdom.measureAtNextFrame(()=>{R()})})},[]),o.default.createElement("div",{ref:I,id:E,className:(0,r.default)(g.default.tab_container,f),style:{flexDirection:v.Layout.getFlexDirection(b)}},o.default.createElement(t.TabbarConfig.Provider,{value:{side:A,direction:b,fullSize:O}},o.default.createElement(y,null),o.default.createElement(S,null)))});const h=({className:E,components:f,tabbarView:a,tabpanelView:b})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.right,direction:"right-to-left",id:m.VIEW_CONTAINERS.RIGHT_TABBAR_PANEL,className:(0,r.default)(E,"right-slot"),components:f,TabbarView:a??_.RightTabbarRenderer,TabpanelView:b??s.RightTabPanelRenderer});t.RightTabRenderer=h;const u=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.left,direction:"left-to-right",id:m.VIEW_CONTAINERS.LEFT_TABBAR_PANEL,className:(0,r.default)(E,"left-slot"),components:f,TabbarView:a??_.LeftTabbarRenderer,TabpanelView:s.LeftTabPanelRenderer});t.LeftTabRenderer=u;const d=({className:E,components:f,tabbarView:a})=>o.default.createElement(t.TabRendererBase,{side:c.SlotLocation.bottom,id:m.VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL,direction:"bottom-to-top",className:(0,r.default)(E,"bottom-slot"),components:f,TabbarView:a??_.BottomTabbarRenderer,TabpanelView:s.BottomTabPanelRenderer});t.BottomTabRenderer=d},752:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabbarService=t.TabbarServiceFactoryFn=t.TabbarServiceFactory=void 0;const n=e(85608),r=n.__importDefault(e(12784)),o=e(76003),c=e(41869),p=e(30144),v=e(95416),m=e(93899),_=e(68969),s=e(28423),g=e(17793),l=e(53576);t.TabbarServiceFactory=Symbol("TabbarServiceFactory");const h=f=>a=>f.get(g.IMainLayoutService).getTabbarService(a);t.TabbarServiceFactoryFn=h;const u={left:"view",right:"extendView",bottom:"panel"},d=void 0;let E=class extends c.WithEventBus{constructor(a){super(),this.location=a,this.doChangeViewEmitter=new c.Emitter,this.shouldChangeView=(0,s.observableFromEventOpts)({owner:this,equalsFn:()=>!1},this.doChangeViewEmitter.event,()=>{}),this.containerIdObs=(0,s.observableValue)(this,d),this.currentContainerId=(0,s.derivedOpts)({owner:this,equalsFn:()=>!1},b=>(this.shouldChangeView.read(b),this.containerIdObs.read(b))),this.nextContainerId="",this.useFirstContainerId=!1,this.previousContainerId=void 0,this.containersMap=new Map,this.viewReady=new c.Deferred,this.state=new Map,this.storedState={},this.accordionRestored=new Set,this.onCurrentChangeEmitter=new c.Emitter,this.onCurrentChange=this.onCurrentChangeEmitter.event,this.onSizeChangeEmitter=new c.Emitter,this.onSizeChange=this.onSizeChangeEmitter.event,this.menuId=`tabbar/${this.location}`,this.moreMenuId=`tabbar/${this.location}/more`,this.sortedContainers=[],this.disposableMap=new Map,this.tabInMoreKeyMap=new Map,this.shouldWaitForViewRender=!1,this.onDidRegisterContainerEmitter=new c.Emitter,this.isEmptyTabbar=!0,this.updatePanel=(0,r.default)(b=>{this.resizeHandle&&this.resizeHandle.hidePanel(b)},60),this._menuMap=new Map,this.setIsLatter(a===c.SlotLocation.right||a===c.SlotLocation.bottom),this.scopedCtxKeyService=this.contextKeyService.createScoped(),this.scopedCtxKeyService.createKey("triggerWithTab",!0),this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerGlobalToggleCommand(),label:(0,c.localize)("layout.tabbar.toggle")},group:"0_global",when:"triggerWithTab == true"}),this.activatedKey=this.contextKeyService.createKey((0,c.getTabbarCtxKey)(this.location),""),this.location==="bottom"&&(this.registerPanelCommands(),this.registerPanelMenus()),this.eventBus.onDirective(c.ResizeEvent.createDirective(this.location),()=>{this.onResize()})}get onDidRegisterContainer(){return this.onDidRegisterContainerEmitter.event}setIsLatter(a){this.isLatter=a}updateNextContainerId(a){(0,c.isUndefined)(a)?this.useFirstContainerId=!0:this.nextContainerId=a}updateCurrentContainerId(a){(0,s.transaction)(b=>{this.containerIdObs.set(a,b)})}updateBadge(a,b){const y=this.getContainer(a);y&&y.options&&(y.options.badge=b),y?.fireChange(y)}registerPanelCommands(){this.commandRegistry.registerCommand(l.EXPAND_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!0)}}),this.commandRegistry.registerCommand(l.RETRACT_BOTTOM_PANEL,{execute:()=>{this.layoutService.expandBottom(!1)}}),this.commandRegistry.registerCommand(l.TOGGLE_BOTTOM_PANEL_COMMAND,{execute:(a,b)=>{this.layoutService.toggleSlot(c.SlotLocation.bottom,a,b)}})}getContainerState(a){return this.state.get(a)}hideContainer(a){const b=this.state.get(a);b&&(b.hidden=!0)}showContainer(a){const b=this.state.get(a);b&&(b.hidden=!1)}updatePanelVisibility(a){a===void 0&&(a=this.containersMap.size>0),this.updatePanel(a)}ensureViewReady(){(0,c.isDefined)(this.barSize)&&(0,c.isDefined)(this.panelSize)?this.resolveViewReady():this.shouldWaitForViewRender=!0}updatePanelSize(a){this.panelSize=a,(0,c.isDefined)(this.barSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}updateBarSize(a){this.barSize=a,(0,c.isDefined)(this.panelSize)&&this.shouldWaitForViewRender&&this.resolveViewReady()}resolveViewReady(){this.isEmptyTabbar?c.Event.once(this.onDidRegisterContainer)(()=>{this.viewReady.resolve()}):this.viewReady.resolve()}getBarSize(){return this.barSize}updateTabInMoreKey(a,b){const y=this.tabInMoreKeyMap.get(a);y&&y.set(b)}get visibleContainers(){const a=[];return this.containersMap.forEach(b=>{const y=b.options&&this.state.get(b.options.containerId);(!y||!y.hidden)&&a.push(b)}),a.sort((b,y)=>this.getContainerState(b.options.containerId).priority-this.getContainerState(y.options.containerId).priority)}registerResizeHandle(a){const{setSize:b,setRelativeSize:y,getSize:A,getRelativeSize:S,lockSize:w,setMaxSize:T,hidePanel:D}=a;return this.resizeHandle={setSize:I=>b(I,this.isLatter),setRelativeSize:(I,O)=>y(I,O,this.isLatter),getSize:()=>A(this.isLatter),getRelativeSize:()=>S(this.isLatter),setMaxSize:I=>T(I,this.isLatter),lockSize:I=>w(I,this.isLatter),hidePanel:I=>D(I)},this.listenCurrentChange()}registerContainer(a,b){var y;if(this.containersMap.has(a))return;this.useFirstContainerId&&(this.useFirstContainerId=!1,this.updateCurrentContainerId(a)),this.nextContainerId===a&&this.updateCurrentContainerId(a);const A=new c.DisposableCollection,S=b.options||{containerId:a};b.options=S;const w=new c.Emitter;this.containersMap.set(a,{fireChange:D=>w.fire(D),onChange:w.event,views:b.views,options:S}),A.push({dispose:()=>{this.containersMap.delete(a),this.state.delete(a)}}),this.updatePanelVisibility(this.containersMap.size>0);let T=this.sortedContainers.findIndex(D=>{var I,O;return(((I=D.options)===null||I===void 0?void 0:I.priority)||1)<=(((O=b.options)===null||O===void 0?void 0:O.priority)||1)});T===-1&&(T=this.sortedContainers.length),this.sortedContainers.splice(T,0,b);for(let D=T;D<this.sortedContainers.length;D++){const O=(y=this.sortedContainers[D].options)===null||y===void 0?void 0:y.containerId;if(O){const M=this.storedState[O]||this.getContainerState(O)||{};this.state.set(O,{hidden:M.hidden,priority:D})}}A.push(this.registerSideEffects(b)),this.eventBus.fire(new g.TabBarRegistrationEvent({tabBarId:a})),a===this.currentContainerId.get()&&this.handleChange(a,""),this.viewContextKeyRegistry.registerContextKeyService(a,this.contextKeyService.createScoped()).createKey("view",a),this.isEmptyTabbar&&(this.isEmptyTabbar=!1),this.disposableMap.set(a,A),this.onDidRegisterContainerEmitter.fire(a)}registerSideEffects(a){var b;const y=new c.DisposableCollection;!((b=a.options)===null||b===void 0)&&b.hideTab||(y.push(this.registerHideMenu(a)),y.push(this.registerMoreMenu(a))),y.push(this.registerActivateKeyBinding(a,a.options.fromExtension));const A=this.contextKeyService.createKey(`workbench.${u[this.location]||"view"}.${a.options.containerId}`,!0);return y.push({dispose:()=>{A.set(!1)}}),y.push(this.progressService.registerProgressIndicator(a.options.containerId)),y.push(this.registerContainerPanelRelatedCommand(a)),y}registerContainerPanelRelatedCommand(a){var b,y,A,S,w;const T=new c.DisposableCollection,D=(b=a.options)===null||b===void 0?void 0:b.containerId;return T.push(this.commandRegistry.registerCommand({id:"container.show."+D,label:(0,c.formatLocalize)("view.command.show",(A=(y=a.options)===null||y===void 0?void 0:y.title)!==null&&A!==void 0?A:D),labelLocalized:(0,c.createFormatLocalizedStr)("view.command.show",(w=(S=a.options)===null||S===void 0?void 0:S.title)!==null&&w!==void 0?w:D),category:"View"},{execute:()=>{this.updateCurrentContainerId(D)}})),T.push(this.commandRegistry.registerCommand({id:"container.hide."+D},{execute:()=>{this.updateCurrentContainerId("")}})),T.push(this.commandRegistry.registerCommand({id:"container.toggle."+D},{execute:()=>{this.currentContainerId.get()===D?this.updateCurrentContainerId(""):this.updateCurrentContainerId(D)}})),T}registerHideMenu(a){const b=new c.DisposableCollection,y=a.options.containerId;return b.push(this.menuRegistry.registerMenuItem(this.menuId,{command:{id:this.registerVisibleToggleCommand(y,b),label:a.options.title||y},group:"1_widgets"})),b}registerMoreMenu(a){const b=new c.DisposableCollection,y=a.options.containerId,A=this.scopedCtxKeyService.createKey(this.getTabInMoreCtxKey(y),!1);return this.tabInMoreKeyMap.set(y,A),b.push({dispose:()=>this.tabInMoreKeyMap.delete(y)}),b.push(this.menuRegistry.registerMenuItem(this.moreMenuId,{command:{id:this.registerMoreToggleCommand(a,b),label:a.options.title||y},group:"inline",when:`${this.getTabInMoreCtxKey(y)} == true`,toggledWhen:`${(0,c.getTabbarCtxKey)(this.location)} == ${y}`,iconClass:a.options.iconClass})),b}disposeContainer(a){var b;const y=this.disposableMap.get(a);y&&y.dispose(),this.currentContainerId.get()===a&&this.updateCurrentContainerId(((b=this.visibleContainers[0].options)===null||b===void 0?void 0:b.containerId)||"")}updateTitle(a,b){const y=this.getContainer(a);y&&(y.options.title=b)}getContainer(a){return a?this.containersMap.get(a):void 0}getTitleToolbarMenu(a){const b=this._menuMap.get(a);if(b)return b;const y=this.menuService.createMenu(m.MenuId.ViewTitle,this.viewContextKeyRegistry.getContextKeyService(a));this._menuMap.set(a,y);const A=this.disposableMap.get(a),S=[y,(0,c.toDisposable)(()=>{this._menuMap.delete(a)})];return A?A.pushAll(S):this.addDispose(S),y}doExpand(a){if(this.resizeHandle){const{setRelativeSize:b}=this.resizeHandle;a?this.isLatter?b(0,1):b(1,0):b(2,1)}}get isExpanded(){if(this.resizeHandle){const{getRelativeSize:a}=this.resizeHandle,b=a().join(",");return this.isLatter?b==="0,1":b==="1,0"}return!1}handleTabClick(a,b){const y=a.currentTarget.id;y===this.currentContainerId.get()&&!b?this.updateCurrentContainerId(""):this.updateCurrentContainerId(y)}handleContextMenu(a,b){a.preventDefault(),a.stopPropagation();const y=this.menuService.createMenu(this.menuId,b?this.scopedCtxKeyService:this.contextKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{containerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}showMoreMenu(a,b){const y=this.menuService.createMenu(this.moreMenuId,this.scopedCtxKeyService),A=(0,m.generateCtxMenu)({menus:y,args:[{lastContainerId:b}]});this.contextMenuRenderer.show({menuNodes:A[1],anchor:{x:a.clientX,y:a.clientY}})}handleDragStart(a,b){a.dataTransfer.setData("containerId",b),this.layoutService.showDropAreaForContainer(b)}handleDrop(a,b){if(a.dataTransfer.getData("containerId")){const y=a.dataTransfer.getData("containerId"),A=this.visibleContainers,S=A.findIndex(T=>y===T.options.containerId),w=A.findIndex(T=>b===T.options.containerId);this.doInsertTab(A,S,w),this.storeState()}}handleDragEnd(a){this.layoutService.hideDropArea()}restoreState(){this.storedState=this.layoutState.getState(v.LAYOUT_STATE.getTabbarSpace(this.location),{});for(const a of this.state.keys())this.storedState[a]&&this.state.set(a,this.storedState[a]);this.visibleContainers.forEach(a=>{g.SUPPORT_ACCORDION_LOCATION.has(this.location)&&this.tryRestoreAccordionSize(a.options.containerId)})}removeContainer(a){const b=this.disposableMap.get(a);b?.dispose(),this.updateCurrentContainerId(""),this.doChangeViewEmitter.fire()}dynamicAddContainer(a,b){this.registerContainer(a,b),this.updateCurrentContainerId(a),this.doChangeViewEmitter.fire()}doInsertTab(a,b,y){const A=this.getContainerState(a[y].options.containerId).priority,S=(T,D)=>{const I=this.getContainerState(a[T].options.containerId),O=this.getContainerState(a[D].options.containerId);I.priority=O.priority};let w;if(b>y)for(w=y;w<b;w++)S(w,w+1);else for(w=y;w>b;w--)S(w,w-1);this.getContainerState(a[w].options.containerId).priority=A,this.doChangeViewEmitter.fire()}storeState(){const a={};this.state.forEach((b,y)=>{a[y]=b}),this.layoutState.setState(v.LAYOUT_STATE.getTabbarSpace(this.location),a)}registerActivateKeyBinding(a,b){const y=a.options,A=y.containerId,S=b?`workbench.view.extension.${A}`:`workbench.view.${A}`,w=new c.DisposableCollection;return w.push(this.commandRegistry.registerCommand({id:S},{execute:({forceShow:T}={})=>{this.location==="bottom"&&!T?this.updateCurrentContainerId(this.currentContainerId.get()===A?"":A):this.updateCurrentContainerId(A)}})),y.activateKeyBinding&&w.push(this.keybindingRegistry.registerKeybinding({command:S,keybinding:y.activateKeyBinding})),w}registerGlobalToggleCommand(){const a=`activity.bar.toggle.${this.location}`;return this.commandRegistry.registerCommand({id:a},{execute:({containerId:b})=>{this.doToggleTab(b)},isEnabled:()=>this.visibleContainers.length>1}),a}registerVisibleToggleCommand(a,b){const y=`activity.bar.toggle.${a}`;return b.push(this.commandRegistry.registerCommand({id:y},{execute:({forceShow:A}={})=>{this.doToggleTab(a,A)},isToggled:()=>!this.getContainerState(a).hidden,isEnabled:()=>this.getContainerState(a).hidden||this.visibleContainers.length!==1})),y}registerMoreToggleCommand(a,b){const{options:y}=a,{containerId:A}=y,S=`activity.bar.activate.more.${A}`;return b.push(this.commandRegistry.registerCommand({id:S},{execute:({lastContainerId:w})=>{if(this.updateCurrentContainerId(A),w){const T=this.getContainerState(A),D=this.getContainerState(w),I=T.priority;T.priority=D.priority,D.priority=I,this.storeState()}}})),S}getTabInMoreCtxKey(a){return`${a}.isInMore`}registerPanelMenus(){this.menuRegistry.registerMenuItems((0,m.getTabbarCommonMenuId)("bottom"),[{command:l.EXPAND_BOTTOM_PANEL.id,group:"navigation",when:"!bottomFullExpanded",order:1},{command:l.RETRACT_BOTTOM_PANEL.id,group:"navigation",when:"bottomFullExpanded",order:1},{command:l.TOGGLE_BOTTOM_PANEL_COMMAND.id,group:"navigation",order:2}]),this.commonTitleMenu=this.ctxMenuService.createMenu({id:"tabbar/bottom/common"})}doToggleTab(a,b){const y=this.getContainerState(a);b===void 0?y.hidden=!y.hidden:y.hidden=!b,y.hidden&&this.currentContainerId.get()===a&&this.updateCurrentContainerId(this.visibleContainers[0].options.containerId),this.storeState()}shouldExpand(a){const b=this.getContainer(a);return b&&b.options&&b.options.expanded}onResize(){c.fastdom.measureAtNextFrame(()=>{if(!this.currentContainerId||!this.resizeHandle)return;const a=this.resizeHandle.getSize();a!==this.barSize&&!this.shouldExpand(this.currentContainerId.get())&&(this.prevSize=a,this.onSizeChangeEmitter.fire({size:a}))})}listenCurrentChange(){return(0,s.autorunDelta)(this.currentContainerId,({lastValue:a,newValue:b})=>{this.previousContainerId=a===d?"":a,this.handleChange(b,a)})}handleChange(a,b){var y;if(!this.resizeHandle)return;const{getSize:A,setSize:S,lockSize:w}=this.resizeHandle;this.onCurrentChangeEmitter.fire({previousId:b,currentId:a});const T=this.shouldExpand(a);if(this.shouldExpand(this.previousContainerId)||T)this.handleFullExpanded(a,T);else if(a){b&&a!==b&&(this.prevSize=A());const D=this.getContainer(a);S(this.prevSize||this.panelSize+this.barSize),w(!!(!((y=D?.options)===null||y===void 0)&&y.noResize)),this.activatedKey.set(a)}else S(this.barSize),w(!0)}tryRestoreAccordionSize(a){var b,y;if(this.accordionRestored.has(a))return;const A=this.containersMap.get(a);if((!A||!((b=A.options)===null||b===void 0)&&b.component)&&((y=A?.options)===null||y===void 0?void 0:y.containerId)!==p.SCM_CONTAINER_ID)return;this.layoutService.getAccordionService(a).restoreState(),this.accordionRestored.add(a)}handleFullExpanded(a,b){if(!this.resizeHandle)return;const{setRelativeSize:y,setSize:A}=this.resizeHandle;a?b?this.isLatter?y(0,1):y(1,0):A(this.prevSize||this.panelSize+this.barSize):A(this.barSize)}};t.TabbarService=E,n.__decorate([(0,o.Autowired)(m.AbstractMenuService),n.__metadata("design:type",m.AbstractMenuService)],E.prototype,"menuService",void 0),n.__decorate([(0,o.Autowired)(m.AbstractContextMenuService),n.__metadata("design:type",m.AbstractContextMenuService)],E.prototype,"ctxMenuService",void 0),n.__decorate([(0,o.Autowired)(m.IMenuRegistry),n.__metadata("design:type",m.IMenuRegistry)],E.prototype,"menuRegistry",void 0),n.__decorate([(0,o.Autowired)(c.CommandRegistry),n.__metadata("design:type",Object)],E.prototype,"commandRegistry",void 0),n.__decorate([(0,o.Autowired)(m.ICtxMenuRenderer),n.__metadata("design:type",m.ICtxMenuRenderer)],E.prototype,"contextMenuRenderer",void 0),n.__decorate([(0,o.Autowired)(c.KeybindingRegistry),n.__metadata("design:type",Object)],E.prototype,"keybindingRegistry",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",c.ViewContextKeyRegistry)],E.prototype,"viewContextKeyRegistry",void 0),n.__decorate([(0,o.Autowired)(c.IContextKeyService),n.__metadata("design:type",Object)],E.prototype,"contextKeyService",void 0),n.__decorate([(0,o.Autowired)(g.IMainLayoutService),n.__metadata("design:type",Object)],E.prototype,"layoutService",void 0),n.__decorate([(0,o.Autowired)(),n.__metadata("design:type",v.LayoutState)],E.prototype,"layoutState",void 0),n.__decorate([(0,o.Autowired)(_.IProgressService),n.__metadata("design:type",Object)],E.prototype,"progressService",void 0),t.TabbarService=E=n.__decorate([(0,o.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],E)},58296:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewsRegistry=t.ViewsController=t.ViewContentGroups=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(17793);var v;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(v||(t.ViewContentGroups=v={}));function m(g,l){var h,u,d,E;const f=(h=g.group)!==null&&h!==void 0?h:v.More,a=(u=l.group)!==null&&u!==void 0?u:v.More;return f!==a?f.localeCompare(a):((d=g.order)!==null&&d!==void 0?d:5)-((E=l.order)!==null&&E!==void 0?E:5)}let _=class{get contents(){const l=this.items.filter(h=>h.visible);return l.length===0&&this.defaultItem?[this.defaultItem.descriptor]:l.map(h=>h.descriptor)}constructor(l){this.id=l,this._onDidChange=new o.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=[],this.contextKeyService.onDidChangeContext(this.onDidChangeContext,this,this.disposables),o.Event.filter(this.viewsRegistry.onDidChangeViewWelcomeContent,h=>h===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const l=this.viewsRegistry.getViewWelcomeContent(this.id);this.items=[];for(const h of l)if(h.when==="default")this.defaultItem={descriptor:h,visible:!0};else{const u=h.when?this.contextKeyService.match(h.when):!0;this.items.push({descriptor:h,visible:u})}this._onDidChange.fire()}onDidChangeContext(){let l=!1;for(const h of this.items){if(!h.descriptor.when||h.descriptor.when==="default")continue;const u=this.contextKeyService.match(h.descriptor.when);h.visible!==u&&(h.visible=u,l=!0)}l&&this._onDidChange.fire()}dispose(){this.disposables.forEach(l=>l.dispose()),this.disposables=[]}};t.ViewsController=_,n.__decorate([(0,r.Autowired)(o.IContextKeyService),n.__metadata("design:type",Object)],_.prototype,"contextKeyService",void 0),n.__decorate([(0,r.Autowired)(p.IViewsRegistry),n.__metadata("design:type",Object)],_.prototype,"viewsRegistry",void 0),t.ViewsController=_=n.__decorate([(0,r.Injectable)({multiple:!0}),n.__metadata("design:paramtypes",[String])],_);let s=class{constructor(){this.viewWelcomeContent=new c.SetMap,this._onDidChangeViewWelcomeContent=new o.Emitter,this.onDidChangeViewWelcomeContent=this._onDidChangeViewWelcomeContent.event}registerViewWelcomeContent(l,h){return this.viewWelcomeContent.add(l,h),this._onDidChangeViewWelcomeContent.fire(l),{dispose:()=>{this.viewWelcomeContent.delete(l,h),this._onDidChangeViewWelcomeContent.fire(l)}}}registerViewWelcomeContent2(l,h){const u=new Map;for(const[d,E]of h)this.viewWelcomeContent.add(l,E),u.set(d,(0,o.toDisposable)(()=>{this.viewWelcomeContent.delete(l,E),this._onDidChangeViewWelcomeContent.fire(l)}));return this._onDidChangeViewWelcomeContent.fire(l),u}getViewWelcomeContent(l){const h=[];return this.viewWelcomeContent.forEach(l,u=>h.push(u)),h.sort(m),h}};t.ViewsRegistry=s,t.ViewsRegistry=s=n.__decorate([(0,r.Injectable)()],s)},24429:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WelcomeView=t.CSSIcon=void 0,t.renderLabelWithIcons=l;const n=e(85608),r=n.__importDefault(e(53373)),o=n.__importDefault(e(14041)),c=e(48412),p=e(41869),v=e(43718),m=n.__importDefault(e(81388)),_=e(58296);var s;(function(d){d.iconNameSegment="[A-Za-z0-9]+",d.iconNameExpression="[A-Za-z0-9\\-]+",d.iconModifierExpression="~[A-Za-z]+"})(s||(t.CSSIcon=s={}));const g=new RegExp(`(\\\\)?\\$\\((${s.iconNameExpression}(?:${s.iconModifierExpression})?)\\)`,"g");function l(d){const E=new Array;let f,a=0,b=0;for(;(f=g.exec(d))!==null;){b=f.index||0,E.push(d.substring(a,b)),a=(f.index||0)+f[0].length;const[,y,A]=f;E.push(y?`$(${A})`:o.default.createElement("span",{className:(0,p.getExternalIcon)(A)}))}return a<d.length&&E.push(d.substring(a)),E}const h=d=>{const{contents:E}=d,[f,a]=o.default.useState(E.map(A=>A.precondition?!1:null)),b=(0,p.useInjectable)(p.IContextKeyService),y=(0,p.useInjectable)(p.IOpenerService);return o.default.useEffect(()=>{const A=E.map(w=>{if(w.precondition){const T=new Set;return w.precondition.keys().forEach(D=>T.add(D)),T}return null}),S=b.onDidChangeContext(w=>{A.forEach((T,D)=>{T&&w.payload.affectsSome(T)&&a(f.map((I,O)=>O===D?b.match(E[D].precondition):I))})});return()=>S.dispose()},[E]),E.length===0?null:o.default.createElement(o.default.Fragment,null,E.map(({content:A,precondition:S},w)=>{const T=A.split(`
|
|
31742
31742
|
`),D=[];for(let I of T){if(I=I.trim(),!I)continue;const O=(0,v.parseLinkedText)(I);if(O.nodes.length===1&&typeof O.nodes[0]!="string"){const M=O.nodes[0];D.push(o.default.createElement("div",{key:D.length,title:M.title,className:"button-container"},o.default.createElement(c.Button,{disabled:f[w]===!1,onClick:()=>y.open(M.href)},l(M.label))))}else{const M=O.nodes.map((R,P)=>typeof R=="string"?R:o.default.createElement("a",{key:P,className:(0,r.default)({disabled:R.href.startsWith("command:")&&f[w]===!1}),title:R.title,onClick:()=>y.open(R.href)},R.label));D.push(o.default.createElement("p",{key:D.length},M))}}return o.default.createElement(o.default.Fragment,{key:w},D)}))};function u(d,E){return d.viewId===E.viewId}t.WelcomeView=o.default.memo(d=>{const E=(0,p.useInjectable)(_.ViewsController,[d.viewId]),[f,a]=o.default.useState(E.contents);return o.default.useEffect(()=>{E.onDidChange(()=>{const b=E.contents;a(b)})},[]),f.length?o.default.createElement("div",{className:m.default.welcome},o.default.createElement(h,{contents:f})):null},u)},17793:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(72260),t)},72260:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DROP_RIGHT_CONTAINER=t.DROP_BOTTOM_CONTAINER=t.SUPPORT_ACCORDION_LOCATION=t.ViewCollapseChangedEvent=t.IViewsRegistry=t.TabBarRegistrationEvent=t.MainLayoutContribution=t.IMainLayoutService=void 0;const n=e(41869);t.IMainLayoutService=Symbol("IMainLayoutService"),t.MainLayoutContribution=Symbol("MainLayoutContribution");class r extends n.BasicEvent{}t.TabBarRegistrationEvent=r,t.IViewsRegistry=Symbol("IViewsRegistry");class o extends n.BasicEvent{}t.ViewCollapseChangedEvent=o,t.SUPPORT_ACCORDION_LOCATION=new Set([n.SlotLocation.left,n.SlotLocation.right]),t.DROP_BOTTOM_CONTAINER="drop-bottom",t.DROP_RIGHT_CONTAINER="drop-right"},63067:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e(85608).__exportStar(e(17793),t)},93835:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbeddedMarkdownEditorContribution=t.MARKDOWN_EDITOR_COMPONENT_ID=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(43718),p=e(57517),v=e(21066),m=e(81001);t.MARKDOWN_EDITOR_COMPONENT_ID="MARKDOWN_EDITOR_COMPONENT_ID";let _=class{registerEditorComponent(g){g.registerEditorComponent({uid:t.MARKDOWN_EDITOR_COMPONENT_ID,component:m.MarkdownEditorComponent,scheme:c.Schemes.file}),g.registerEditorComponentResolver(c.Schemes.file,(l,h)=>{l.uri.path.ext===".md"&&h.push({type:p.EditorOpenType.component,componentId:t.MARKDOWN_EDITOR_COMPONENT_ID,title:(0,c.localize)("editorOpenType.preview"),weight:this.preferenceService.get("application.preferMarkdownPreview")?10:-1})})}};t.EmbeddedMarkdownEditorContribution=_,n.__decorate([(0,r.Autowired)(v.IMarkdownService),n.__metadata("design:type",Object)],_.prototype,"markdownService",void 0),n.__decorate([(0,r.Autowired)(o.PreferenceService),n.__metadata("design:type",Object)],_.prototype,"preferenceService",void 0),t.EmbeddedMarkdownEditorContribution=_=n.__decorate([(0,c.Domain)(p.BrowserEditorContribution)],_)},81001:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownEditorComponent=void 0;const r=e(85608).__importDefault(e(14041)),o=e(41869),c=e(57517),p=e(21066),v=({resource:m})=>{let _=null;const s=(0,o.useInjectable)(p.IMarkdownService),g=(0,o.useInjectable)(c.IEditorDocumentModelService);return r.default.useEffect(()=>{if(_){const l=new o.Disposable,h=new o.CancellationTokenSource;return l.addDispose({dispose:()=>{h.cancel()}}),g.createModelReference(m.uri,"markdown-preview").then(u=>{if(h.token.isCancellationRequested){u&&u.dispose();return}const d=new o.Emitter;l.addDispose(d),l.addDispose(u.instance.getMonacoModel().onDidChangeContent(E=>{d.fire(u.instance.getText())})),_&&s.previewMarkdownInContainer(u.instance.getText(),_,h.token,void 0,d.event).then(E=>{l.addDispose(E)}),l.addDispose(u)}),()=>{l.dispose()}}}),r.default.createElement("div",{ref:l=>{_=l},style:{height:"100%"}})};t.MarkdownEditorComponent=v},31101:(x,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownModule=t.Markdown=void 0;const n=e(85608),r=e(76003),o=e(41869),c=e(21066),p=e(89637);var v=e(6001);Object.defineProperty(t,"Markdown",{enumerable:!0,get:function(){return v.Markdown}});let m=class extends o.BrowserModule{constructor(){super(...arguments),this.providers=[{token:c.IMarkdownService,useClass:p.MarkdownServiceImpl}]}};t.MarkdownModule=m,t.MarkdownModule=m=n.__decorate([(0,r.Injectable)()],m)},86422:(x,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markdownCss=void 0,t.markdownCss=`
|
|
31743
31743
|
/*---------------------------------------------------------------------------------------------
|
|
31744
31744
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|